=============================================================================== 00009dc0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 9dc0: e5903000 ldr r3, [r0] 9dc4: e593304c ldr r3, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9dc8: e5902010 ldr r2, [r0, #16] switch( node->type ) { 9dcc: e2433001 sub r3, r3, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9dd0: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 9dd4: e3530006 cmp r3, #6 9dd8: 979ff103 ldrls pc, [pc, r3, lsl #2] 9ddc: ea000008 b 9e04 <== NOT EXECUTED 9de0: 00009e2c .word 0x00009e2c <== NOT EXECUTED 9de4: 00009e3c .word 0x00009e3c <== NOT EXECUTED 9de8: 00009e1c .word 0x00009e1c <== NOT EXECUTED 9dec: 00009e1c .word 0x00009e1c <== NOT EXECUTED 9df0: 00009e0c .word 0x00009e0c <== NOT EXECUTED 9df4: 00009e0c .word 0x00009e0c <== NOT EXECUTED 9df8: 00009dfc .word 0x00009dfc <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 9dfc: e59f3048 ldr r3, [pc, #72] ; 9e4c 9e00: e5803008 str r3, [r0, #8] break; } return 0; } 9e04: e3a00000 mov r0, #0 9e08: e12fff1e bx lr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 9e0c: e5923008 ldr r3, [r2, #8] 9e10: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9e14: e3a00000 mov r0, #0 9e18: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 9e1c: e59f302c ldr r3, [pc, #44] ; 9e50 9e20: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9e24: e3a00000 mov r0, #0 9e28: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 9e2c: e592300c ldr r3, [r2, #12] 9e30: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9e34: e3a00000 mov r0, #0 9e38: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 9e3c: e59f3010 ldr r3, [pc, #16] ; 9e54 9e40: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9e44: e3a00000 mov r0, #0 9e48: e12fff1e bx lr =============================================================================== 00009b44 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 9b44: e92d40f0 push {r4, r5, r6, r7, lr} 9b48: e1a01801 lsl r1, r1, #16 9b4c: e1a02802 lsl r2, r2, #16 9b50: e24dd008 sub sp, sp, #8 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 9b54: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 9b58: e1a07821 lsr r7, r1, #16 9b5c: e1a06822 lsr r6, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 9b60: eb0004f0 bl af28 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 9b64: e1d453bc ldrh r5, [r4, #60] ; 0x3c 9b68: e3500000 cmp r0, #0 9b6c: 11550000 cmpne r5, r0 9b70: 03a05000 moveq r5, #0 9b74: 13a05001 movne r5, #1 9b78: 1a000009 bne 9ba4 rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 9b7c: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; 9b80: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); 9b84: e1a0000d mov r0, sp 9b88: e1a01005 mov r1, r5 9b8c: ebffe16e bl 214c 9b90: e59d3000 ldr r3, [sp] 9b94: e5843048 str r3, [r4, #72] ; 0x48 9b98: e1a00005 mov r0, r5 return 0; } 9b9c: e28dd008 add sp, sp, #8 9ba0: e8bd80f0 pop {r4, r5, r6, r7, pc} #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 9ba4: eb0016da bl f714 <__errno> <== NOT EXECUTED 9ba8: e3a03001 mov r3, #1 <== NOT EXECUTED 9bac: e5803000 str r3, [r0] <== NOT EXECUTED 9bb0: e3e00000 mvn r0, #0 <== NOT EXECUTED 9bb4: eafffff8 b 9b9c <== NOT EXECUTED =============================================================================== 00009c78 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 9c78: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 9c7c: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 9c80: e1a05001 mov r5, r1 9c84: e59d6014 ldr r6, [sp, #20] 9c88: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 9c8c: 01a07004 moveq r7, r4 9c90: 1a000001 bne 9c9c node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 9c94: e1a00007 mov r0, r7 <== NOT EXECUTED 9c98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 9c9c: e59f210c ldr r2, [pc, #268] ; 9db0 9ca0: e5922000 ldr r2, [r2] 9ca4: e592202c ldr r2, [r2, #44] ; 0x2c 9ca8: e1a00005 mov r0, r5 9cac: e1c32002 bic r2, r3, r2 9cb0: ebffffc0 bl 9bb8 if ( !node ) 9cb4: e2507000 subs r7, r0, #0 9cb8: 0afffff5 beq 9c94 return NULL; /* * Set the type specific information */ switch (type) { 9cbc: e2455001 sub r5, r5, #1 9cc0: e3550006 cmp r5, #6 9cc4: 979ff105 ldrls pc, [pc, r5, lsl #2] 9cc8: ea000033 b 9d9c <== NOT EXECUTED 9ccc: 00009d80 .word 0x00009d80 <== NOT EXECUTED 9cd0: 00009d6c .word 0x00009d6c <== NOT EXECUTED 9cd4: 00009ce8 .word 0x00009ce8 <== NOT EXECUTED 9cd8: 00009ce8 .word 0x00009ce8 <== NOT EXECUTED 9cdc: 00009d3c .word 0x00009d3c <== NOT EXECUTED 9ce0: 00009d24 .word 0x00009d24 <== NOT EXECUTED 9ce4: 00009d60 .word 0x00009d60 <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 9ce8: e5963000 ldr r3, [r6] 9cec: e5873050 str r3, [r7, #80] ; 0x50 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 9cf0: e5943010 ldr r3, [r4, #16] 9cf4: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 9cf8: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 9cfc: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 9d00: e2833001 add r3, r3, #1 9d04: e5823004 str r3, [r2, #4] * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 9d08: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; 9d0c: e5873038 str r3, [r7, #56] ; 0x38 9d10: e2800050 add r0, r0, #80 ; 0x50 9d14: e1a01007 mov r1, r7 9d18: ebfff0fa bl 6108 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 9d1c: e1a00007 mov r0, r7 9d20: e8bd80f0 pop {r4, r5, r6, r7, pc} node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 9d24: e3a03000 mov r3, #0 <== NOT EXECUTED 9d28: e3a02000 mov r2, #0 <== NOT EXECUTED 9d2c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 9d30: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; 9d34: e3a03000 mov r3, #0 <== NOT EXECUTED 9d38: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9d3c: e3a03000 mov r3, #0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 9d40: e3a01000 mov r1, #0 9d44: e3a02000 mov r2, #0 9d48: e5871050 str r1, [r7, #80] ; 0x50 9d4c: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 9d50: e5873060 str r3, [r7, #96] ; 0x60 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9d54: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; 9d58: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; 9d5c: eaffffe3 b 9cf0 case IMFS_FIFO: node->info.fifo.pipe = NULL; 9d60: e3a03000 mov r3, #0 9d64: e5873050 str r3, [r7, #80] ; 0x50 break; 9d68: eaffffe0 b 9cf0 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 9d6c: e5962004 ldr r2, [r6, #4] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 9d70: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; 9d74: e5872054 str r2, [r7, #84] ; 0x54 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 9d78: e5873050 str r3, [r7, #80] ; 0x50 node->info.device.minor = info->device.minor; break; 9d7c: eaffffdb b 9cf0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9d80: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 9d84: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9d88: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; 9d8c: e3a02000 mov r2, #0 9d90: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); 9d94: e5873058 str r3, [r7, #88] ; 0x58 9d98: eaffffd4 b 9cf0 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 9d9c: e59f0010 ldr r0, [pc, #16] ; 9db4 <== NOT EXECUTED 9da0: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 9da4: e59f200c ldr r2, [pc, #12] ; 9db8 <== NOT EXECUTED 9da8: e59f300c ldr r3, [pc, #12] ; 9dbc <== NOT EXECUTED 9dac: eb0003d8 bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 00003f28 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3f28: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 3f2c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3f30: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3f34: 0a000021 beq 3fc0 assert( level >= 0 ); 3f38: e3510000 cmp r1, #0 3f3c: ba000029 blt 3fe8 assert( the_directory->type == IMFS_DIRECTORY ); 3f40: e590304c ldr r3, [r0, #76] ; 0x4c 3f44: e3530001 cmp r3, #1 3f48: 1a000021 bne 3fd4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3f4c: e5907050 ldr r7, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3f50: e2808054 add r8, r0, #84 ; 0x54 3f54: e1570008 cmp r7, r8 3f58: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 3f5c: e59f6098 ldr r6, [pc, #152] ; 3ffc for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3f60: e281a001 add sl, r1, #1 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 3f64: e3a04000 mov r4, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3f68: e5963000 ldr r3, [r6] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3f6c: e2844001 add r4, r4, #1 fprintf(stdout, "...." ); 3f70: e5933008 ldr r3, [r3, #8] 3f74: e59f0084 ldr r0, [pc, #132] ; 4000 3f78: e3a01001 mov r1, #1 3f7c: e3a02004 mov r2, #4 3f80: eb0042ef bl 14b44 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3f84: e1550004 cmp r5, r4 3f88: aafffff6 bge 3f68 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 3f8c: e1a00007 mov r0, r7 3f90: ebffff7a bl 3d80 if ( the_jnode->type == IMFS_DIRECTORY ) 3f94: e597304c ldr r3, [r7, #76] ; 0x4c 3f98: e3530001 cmp r3, #1 3f9c: 0a000003 beq 3fb0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 3fa0: e5977000 ldr r7, [r7] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3fa4: e1570008 cmp r7, r8 3fa8: 1affffed bne 3f64 3fac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3fb0: e1a00007 mov r0, r7 3fb4: e1a0100a mov r1, sl 3fb8: ebffffda bl 3f28 3fbc: eafffff7 b 3fa0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3fc0: e59f003c ldr r0, [pc, #60] ; 4004 <== NOT EXECUTED 3fc4: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED 3fc8: e59f2038 ldr r2, [pc, #56] ; 4008 <== NOT EXECUTED 3fcc: e59f3038 ldr r3, [pc, #56] ; 400c <== NOT EXECUTED 3fd0: eb000225 bl 486c <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 3fd4: e59f0028 ldr r0, [pc, #40] ; 4004 <== NOT EXECUTED 3fd8: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED 3fdc: e59f2024 ldr r2, [pc, #36] ; 4008 <== NOT EXECUTED 3fe0: e59f3028 ldr r3, [pc, #40] ; 4010 <== NOT EXECUTED 3fe4: eb000220 bl 486c <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 3fe8: e59f0014 ldr r0, [pc, #20] ; 4004 <== NOT EXECUTED 3fec: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 3ff0: e59f2010 ldr r2, [pc, #16] ; 4008 <== NOT EXECUTED 3ff4: e59f3018 ldr r3, [pc, #24] ; 4014 <== NOT EXECUTED 3ff8: eb00021b bl 486c <__assert_func> <== NOT EXECUTED =============================================================================== 00009fe0 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9fe0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 9fe4: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9fe8: e24dd02c sub sp, sp, #44 ; 0x2c 9fec: e58d2000 str r2, [sp] 9ff0: e1a0a000 mov sl, r0 9ff4: e1a04001 mov r4, r1 9ff8: e1a07003 mov r7, r3 IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 9ffc: 1a0000b8 bne a2e4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000: e5936000 ldr r6, [r3] a004: e28d8004 add r8, sp, #4 a008: e28d9028 add r9, sp, #40 ; 0x28 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a00c: e1a02008 mov r2, r8 a010: e1a03009 mov r3, r9 a014: e08a0005 add r0, sl, r5 a018: e1a01004 mov r1, r4 a01c: eb00029d bl aa98 pathnamelen -= len; i += len; if ( !pathloc->node_access ) a020: e5973000 ldr r3, [r7] a024: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a028: e1a0b000 mov fp, r0 pathnamelen -= len; a02c: e59d2028 ldr r2, [sp, #40] ; 0x28 i += len; if ( !pathloc->node_access ) a030: 0a000078 beq a218 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a034: e3500000 cmp r0, #0 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; a038: e0855002 add r5, r5, r2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; a03c: e0624004 rsb r4, r2, r4 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a040: 1a00000f bne a084 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { a044: e593204c ldr r2, [r3, #76] ; 0x4c a048: e3520001 cmp r2, #1 a04c: 0a000076 beq a22c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a050: e1a00007 mov r0, r7 a054: ebffff59 bl 9dc0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a058: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a05c: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a060: e1a00007 mov r0, r7 a064: ebffff7b bl 9e58 a068: e3500000 cmp r0, #0 a06c: 1a000036 bne a14c rtems_set_errno_and_return_minus_one( EACCES ); a070: eb0015a7 bl f714 <__errno> a074: e3a0300d mov r3, #13 a078: e5803000 str r3, [r0] a07c: e3e0b000 mvn fp, #0 a080: ea000031 b a14c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) a084: e596104c ldr r1, [r6, #76] ; 0x4c a088: e3510001 cmp r1, #1 a08c: 0a000053 beq a1e0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a090: e35b0003 cmp fp, #3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a094: e1a06003 mov r6, r3 switch( type ) { a098: 0a000006 beq a0b8 a09c: e35b0004 cmp fp, #4 a0a0: 0a000025 beq a13c a0a4: e35b0002 cmp fp, #2 a0a8: 0a000013 beq a0fc /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a0ac: e35b0004 cmp fp, #4 a0b0: 1affffd5 bne a00c a0b4: eaffffe2 b a044 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a0b8: e593304c ldr r3, [r3, #76] ; 0x4c a0bc: e3530003 cmp r3, #3 a0c0: 0a00004c beq a1f8 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { a0c4: e3530004 cmp r3, #4 a0c8: 0a00007a beq a2b8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0cc: e3530001 cmp r3, #1 a0d0: 1a000069 bne a27c /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); a0d4: e1a00006 mov r0, r6 a0d8: e1a01008 mov r1, r8 a0dc: eb00023e bl a9dc if ( !node ) a0e0: e2506000 subs r6, r0, #0 a0e4: 0a00004b beq a218 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a0e8: e596304c ldr r3, [r6, #76] ; 0x4c a0ec: e3530001 cmp r3, #1 a0f0: 0a000018 beq a158 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a0f4: e5876000 str r6, [r7] break; a0f8: eaffffc3 b a00c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a0fc: e59f11f4 ldr r1, [pc, #500] ; a2f8 a100: e5912000 ldr r2, [r1] a104: e5922018 ldr r2, [r2, #24] a108: e1520003 cmp r2, r3 a10c: 0affffbe beq a00c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a110: e597c010 ldr ip, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a114: e59c201c ldr r2, [ip, #28] a118: e1520003 cmp r2, r3 a11c: 0a00006e beq a2dc return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a120: e5936008 ldr r6, [r3, #8] a124: e3560000 cmp r6, #0 a128: 1afffff1 bne a0f4 rtems_set_errno_and_return_minus_one( ENOENT ); a12c: eb001578 bl f714 <__errno> a130: e580b000 str fp, [r0] a134: e3e0b000 mvn fp, #0 a138: ea000003 b a14c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a13c: eb001574 bl f714 <__errno> a140: e3a0305b mov r3, #91 ; 0x5b a144: e5803000 str r3, [r0] a148: e3e0b000 mvn fp, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a14c: e1a0000b mov r0, fp a150: e28dd02c add sp, sp, #44 ; 0x2c a154: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a158: e596305c ldr r3, [r6, #92] ; 0x5c a15c: e3530000 cmp r3, #0 a160: 108ab005 addne fp, sl, r5 a164: 0affffe2 beq a0f4 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a168: e5db0000 ldrb r0, [fp] a16c: ebffe3aa bl 301c a170: e3500000 cmp r0, #0 ++(*index); --(*len); a174: e1a0c00b mov ip, fp const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a178: 0a00000c beq a1b0 a17c: e5db3000 ldrb r3, [fp] a180: e3530000 cmp r3, #0 a184: 0a000041 beq a290 a188: e3540000 cmp r4, #0 a18c: e28bb001 add fp, fp, #1 a190: 0a000007 beq a1b4 a194: e5db0000 ldrb r0, [fp] a198: ebffe39f bl 301c a19c: e3500000 cmp r0, #0 ++(*index); a1a0: e2855001 add r5, r5, #1 --(*len); a1a4: e2444001 sub r4, r4, #1 a1a8: e1a0c00b mov ip, fp const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a1ac: 1afffff2 bne a17c a1b0: e5db3000 ldrb r3, [fp] * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { a1b4: e353002e cmp r3, #46 ; 0x2e a1b8: 1a000034 bne a290 a1bc: e08a3005 add r3, sl, r5 a1c0: e5d33001 ldrb r3, [r3, #1] a1c4: e353002e cmp r3, #46 ; 0x2e a1c8: 1a000030 bne a290 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; a1cc: e5966008 ldr r6, [r6, #8] *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; a1d0: e2855002 add r5, r5, #2 pathnamelen -= 2; a1d4: e2444002 sub r4, r4, #2 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a1d8: e5876000 str r6, [r7] a1dc: eaffff8a b a00c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a1e0: e1a00007 mov r0, r7 a1e4: ebffff1b bl 9e58 a1e8: e3500000 cmp r0, #0 a1ec: 0affff9f beq a070 a1f0: e5973000 ldr r3, [r7] a1f4: eaffffa5 b a090 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); a1f8: e1a00007 mov r0, r7 a1fc: e3a01000 mov r1, #0 a200: ebffff2e bl 9ec0 node = pathloc->node_access; a204: e5976000 ldr r6, [r7] if ( !node ) a208: e3560000 cmp r6, #0 a20c: 0a00001a beq a27c } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; a210: e596304c ldr r3, [r6, #76] ; 0x4c a214: eaffffac b a0cc */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); a218: eb00153d bl f714 <__errno> a21c: e3a03002 mov r3, #2 a220: e5803000 str r3, [r0] a224: e3e0b000 mvn fp, #0 a228: eaffffc7 b a14c * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { a22c: e593c05c ldr ip, [r3, #92] ; 0x5c a230: e35c0000 cmp ip, #0 a234: 0affff85 beq a050 *pathloc = node->info.directory.mt_fs->mt_fs_root; a238: e28cc01c add ip, ip, #28 <== NOT EXECUTED a23c: e8bc000f ldm ip!, {r0, r1, r2, r3} a240: e1a0e007 mov lr, r7 a244: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a248: e59d1028 ldr r1, [sp, #40] ; 0x28 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; a24c: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a250: e0610005 rsb r0, r1, r5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; a254: e58e2000 str r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a258: e08a0000 add r0, sl, r0 a25c: e0841001 add r1, r4, r1 a260: e59d2000 ldr r2, [sp] a264: e1a03007 mov r3, r7 a268: e597c00c ldr ip, [r7, #12] a26c: e1a0e00f mov lr, pc a270: e59cf000 ldr pc, [ip] a274: e1a0b000 mov fp, r0 a278: eaffffb3 b a14c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a27c: eb001524 bl f714 <__errno> a280: e3a03014 mov r3, #20 a284: e5803000 str r3, [r0] a288: e3e0b000 mvn fp, #0 a28c: eaffffae b a14c * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; a290: e596e05c ldr lr, [r6, #92] ; 0x5c a294: e28ee01c add lr, lr, #28 a298: e8be000f ldm lr!, {r0, r1, r2, r3} a29c: e1a05007 mov r5, r7 a2a0: e8a5000f stmia r5!, {r0, r1, r2, r3} a2a4: e59e2000 ldr r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i], a2a8: e1a0000c mov r0, ip * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; a2ac: e5852000 str r2, [r5] return (*pathloc->ops->evalpath_h)( &pathname[i], a2b0: e1a01004 mov r1, r4 a2b4: eaffffe9 b a260 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a2b8: e1a00007 mov r0, r7 a2bc: e3a01000 mov r1, #0 a2c0: ebffff16 bl 9f20 node = pathloc->node_access; if ( result == -1 ) a2c4: e3700001 cmn r0, #1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a2c8: e1a0b000 mov fp, r0 node = pathloc->node_access; a2cc: e5976000 ldr r6, [r7] if ( result == -1 ) a2d0: 0affff9d beq a14c } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; a2d4: e596304c ldr r3, [r6, #76] ; 0x4c a2d8: eaffff7b b a0cc */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; a2dc: e28cc008 add ip, ip, #8 a2e0: eaffffd5 b a23c char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); a2e4: e59f0010 ldr r0, [pc, #16] ; a2fc <== NOT EXECUTED a2e8: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED a2ec: e59f200c ldr r2, [pc, #12] ; a300 <== NOT EXECUTED a2f0: e59f300c ldr r3, [pc, #12] ; a304 <== NOT EXECUTED a2f4: eb000286 bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000a3dc : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a3dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a3e0: e24dd02c sub sp, sp, #44 ; 0x2c a3e4: e1a07001 mov r7, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a3e8: e5916000 ldr r6, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a3ec: e58d2000 str r2, [sp] a3f0: e1a0a000 mov sl, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a3f4: eb0018cb bl 10728 a3f8: e3a05000 mov r5, #0 a3fc: e28d8004 add r8, sp, #4 a400: e1a04000 mov r4, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a404: e28d3028 add r3, sp, #40 ; 0x28 a408: e08a0005 add r0, sl, r5 a40c: e1a01004 mov r1, r4 a410: e1a02008 mov r2, r8 a414: eb00019f bl aa98 pathlen -= len; i += len; if ( !pathloc->node_access ) a418: e5973000 ldr r3, [r7] a41c: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a420: e1a09000 mov r9, r0 pathlen -= len; a424: e59db028 ldr fp, [sp, #40] ; 0x28 i += len; if ( !pathloc->node_access ) a428: 0a00003b beq a51c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a42c: e3500000 cmp r0, #0 a430: 1a000006 bne a450 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a434: eb0014b6 bl f714 <__errno> a438: e3a03011 mov r3, #17 a43c: e5803000 str r3, [r0] a440: e3e06000 mvn r6, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a444: e1a00006 mov r0, r6 a448: e28dd02c add sp, sp, #44 ; 0x2c a44c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) a450: e596104c ldr r1, [r6, #76] ; 0x4c a454: e3510001 cmp r1, #1 a458: 0a000052 beq a5a8 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a45c: e085500b add r5, r5, fp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a460: e06b4004 rsb r4, fp, r4 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a464: e1a06003 mov r6, r3 switch( type ) { a468: e3590004 cmp r9, #4 a46c: 979ff109 ldrls pc, [pc, r9, lsl #2] a470: eaffffe3 b a404 <== NOT EXECUTED a474: 0000a434 .word 0x0000a434 <== NOT EXECUTED a478: 0000a404 .word 0x0000a404 <== NOT EXECUTED a47c: 0000a4ec .word 0x0000a4ec <== NOT EXECUTED a480: 0000a49c .word 0x0000a49c <== NOT EXECUTED a484: 0000a488 .word 0x0000a488 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a488: eb0014a1 bl f714 <__errno> a48c: e3a0305b mov r3, #91 ; 0x5b a490: e5803000 str r3, [r0] a494: e3e06000 mvn r6, #0 a498: eaffffe9 b a444 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a49c: e593304c ldr r3, [r3, #76] ; 0x4c a4a0: e3530003 cmp r3, #3 a4a4: 0a00006c beq a65c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a4a8: e3530004 cmp r3, #4 a4ac: 0a00006a beq a65c if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) a4b0: e3560000 cmp r6, #0 a4b4: 0a000063 beq a648 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a4b8: e596304c ldr r3, [r6, #76] ; 0x4c a4bc: e3530001 cmp r3, #1 a4c0: 1a000060 bne a648 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a4c4: e1a00006 mov r0, r6 a4c8: e1a01008 mov r1, r8 a4cc: eb000142 bl a9dc /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a4d0: e2506000 subs r6, r0, #0 a4d4: 0a000039 beq a5c0 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a4d8: e596304c ldr r3, [r6, #76] ; 0x4c a4dc: e3530001 cmp r3, #1 a4e0: 0a000012 beq a530 i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; a4e4: e5876000 str r6, [r7] a4e8: eaffffc5 b a404 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a4ec: e59f11ec ldr r1, [pc, #492] ; a6e0 a4f0: e5912000 ldr r2, [r1] a4f4: e5922018 ldr r2, [r2, #24] a4f8: e1520003 cmp r2, r3 a4fc: 0affffc0 beq a404 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a500: e597c010 ldr ip, [r7, #16] a504: e59c201c ldr r2, [ip, #28] a508: e1520003 cmp r2, r3 a50c: 0a000069 beq a6b8 } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a510: e5936008 ldr r6, [r3, #8] a514: e3560000 cmp r6, #0 a518: 1afffff1 bne a4e4 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); a51c: eb00147c bl f714 <__errno> a520: e3a03002 mov r3, #2 a524: e5803000 str r3, [r0] a528: e3e06000 mvn r6, #0 a52c: eaffffc4 b a444 */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a530: e596305c ldr r3, [r6, #92] ; 0x5c a534: e3530000 cmp r3, #0 a538: 108a9005 addne r9, sl, r5 a53c: 1a000008 bne a564 a540: eaffffe7 b a4e4 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a544: e5d93000 ldrb r3, [r9] a548: e3530000 cmp r3, #0 a54c: 0a00004a beq a67c a550: e3540000 cmp r4, #0 a554: e2899001 add r9, r9, #1 a558: 0a000007 beq a57c ++(*index); a55c: e2855001 add r5, r5, #1 --(*len); a560: e2444001 sub r4, r4, #1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a564: e5d90000 ldrb r0, [r9] a568: ebffe2ab bl 301c a56c: e3500000 cmp r0, #0 ++(*index); --(*len); a570: e1a0c009 mov ip, r9 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a574: 1afffff2 bne a544 a578: e5d93000 ldrb r3, [r9] if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { a57c: e353002e cmp r3, #46 ; 0x2e a580: 1a00003d bne a67c a584: e08a3005 add r3, sl, r5 a588: e5d33001 ldrb r3, [r3, #1] a58c: e353002e cmp r3, #46 ; 0x2e a590: 1a000039 bne a67c pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; a594: e5966008 ldr r6, [r6, #8] *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; a598: e2855002 add r5, r5, #2 pathlen -= 2; a59c: e2444002 sub r4, r4, #2 node = node->Parent; } pathloc->node_access = node; a5a0: e5876000 str r6, [r7] a5a4: eaffff96 b a404 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a5a8: e1a00007 mov r0, r7 a5ac: ebfffe29 bl 9e58 a5b0: e3500000 cmp r0, #0 a5b4: 0a00001e beq a634 a5b8: e5973000 ldr r3, [r7] a5bc: eaffffa6 b a45c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a5c0: e59d3028 ldr r3, [sp, #40] ; 0x28 a5c4: e59de000 ldr lr, [sp] a5c8: e0633005 rsb r3, r3, r5 a5cc: e08a3003 add r3, sl, r3 a5d0: e58e3000 str r3, [lr] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { a5d4: e7da0005 ldrb r0, [sl, r5] a5d8: e3500000 cmp r0, #0 a5dc: 0a000008 beq a604 a5e0: e08a5005 add r5, sl, r5 a5e4: ea000002 b a5f4 a5e8: e5f50001 ldrb r0, [r5, #1]! a5ec: e3500000 cmp r0, #0 a5f0: 0a000003 beq a604 if ( !IMFS_is_separator( path[ i ] ) ) a5f4: ebffe288 bl 301c a5f8: e3500000 cmp r0, #0 a5fc: 1afffff9 bne a5e8 a600: eaffffc5 b a51c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a604: e1a00007 mov r0, r7 a608: ebfffdec bl 9dc0 /* * The returned node must be a directory */ node = pathloc->node_access; a60c: e5973000 ldr r3, [r7] a610: e593304c ldr r3, [r3, #76] ; 0x4c a614: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a618: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; a61c: 1a000009 bne a648 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a620: e1a00007 mov r0, r7 a624: e3a01003 mov r1, #3 a628: ebfffe0a bl 9e58 a62c: e3500000 cmp r0, #0 a630: 1affff83 bne a444 rtems_set_errno_and_return_minus_one( EACCES ); a634: eb001436 bl f714 <__errno> a638: e3a0300d mov r3, #13 a63c: e5803000 str r3, [r0] a640: e3e06000 mvn r6, #0 a644: eaffff7e b a444 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a648: eb001431 bl f714 <__errno> a64c: e3a03014 mov r3, #20 a650: e5803000 str r3, [r0] a654: e3e06000 mvn r6, #0 a658: eaffff79 b a444 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a65c: e1a00007 mov r0, r7 a660: e3a01000 mov r1, #0 a664: ebffff27 bl a308 if ( result == -1 ) a668: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a66c: e1a06000 mov r6, r0 if ( result == -1 ) a670: 0affff73 beq a444 a674: e5976000 ldr r6, [r7] a678: eaffff8c b a4b0 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; a67c: e596e05c ldr lr, [r6, #92] ; 0x5c a680: e28ee01c add lr, lr, #28 a684: e8be000f ldm lr!, {r0, r1, r2, r3} a688: e1a04007 mov r4, r7 a68c: e8a4000f stmia r4!, {r0, r1, r2, r3} a690: e59e2000 ldr r2, [lr] a694: e5842000 str r2, [r4] return (*pathloc->ops->evalformake_h)( &path[i], a698: e1a0000c mov r0, ip a69c: e1a01007 mov r1, r7 a6a0: e59d2000 ldr r2, [sp] a6a4: e597300c ldr r3, [r7, #12] a6a8: e1a0e00f mov lr, pc a6ac: e593f004 ldr pc, [r3, #4] a6b0: e1a06000 mov r6, r0 a6b4: eaffff62 b a444 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a6b8: e28cc008 add ip, ip, #8 a6bc: e8bc000f ldm ip!, {r0, r1, r2, r3} a6c0: e1a04007 mov r4, r7 a6c4: e8a4000f stmia r4!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a6c8: e59d0028 ldr r0, [sp, #40] ; 0x28 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a6cc: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a6d0: e0600005 rsb r0, r0, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a6d4: e5842000 str r2, [r4] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a6d8: e08a0000 add r0, sl, r0 a6dc: eaffffee b a69c =============================================================================== 00009ec0 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 9ec0: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 9ec4: e593204c ldr r2, [r3, #76] ; 0x4c 9ec8: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9ecc: e92d4030 push {r4, r5, lr} 9ed0: e1a04000 mov r4, r0 9ed4: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 9ed8: 1a00000d bne 9f14 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 9edc: e5933050 ldr r3, [r3, #80] ; 0x50 9ee0: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 9ee4: ebffffb5 bl 9dc0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9ee8: e1a00004 mov r0, r4 9eec: e1a01005 mov r1, r5 9ef0: ebffffd8 bl 9e58 9ef4: e3500000 cmp r0, #0 9ef8: 13a00000 movne r0, #0 9efc: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 9f00: eb001603 bl f714 <__errno> <== NOT EXECUTED 9f04: e3a0300d mov r3, #13 <== NOT EXECUTED 9f08: e5803000 str r3, [r0] <== NOT EXECUTED 9f0c: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 9f10: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 9f14: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 9f18: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 9f1c: ebffefb0 bl 5de4 <== NOT EXECUTED =============================================================================== 00009e58 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9e58: e3d13007 bics r3, r1, #7 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 9e5c: e92d4070 push {r4, r5, r6, lr} 9e60: e1a05001 mov r5, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9e64: 1a000010 bne 9eac rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 9e68: e5904000 ldr r4, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 9e6c: eb00042d bl af28 9e70: e1a06000 mov r6, r0 st_gid = getegid(); 9e74: eb000426 bl af14 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 9e78: e1d433bc ldrh r3, [r4, #60] ; 0x3c 9e7c: e1530006 cmp r3, r6 flags_to_test <<= 6; 9e80: 01a05305 lsleq r5, r5, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 9e84: 0a000002 beq 9e94 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 9e88: e1d433be ldrh r3, [r4, #62] ; 0x3e 9e8c: e1530000 cmp r3, r0 flags_to_test <<= 3; 9e90: 01a05185 lsleq r5, r5, #3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 9e94: e5940030 ldr r0, [r4, #48] ; 0x30 9e98: e0050000 and r0, r5, r0 9e9c: e1550000 cmp r5, r0 9ea0: 13a00000 movne r0, #0 9ea4: 03a00001 moveq r0, #1 return 1; return 0; } 9ea8: e8bd8070 pop {r4, r5, r6, pc} gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 9eac: eb001618 bl f714 <__errno> <== NOT EXECUTED 9eb0: e3a03001 mov r3, #1 <== NOT EXECUTED 9eb4: e5803000 str r3, [r0] <== NOT EXECUTED 9eb8: e3e00000 mvn r0, #0 <== NOT EXECUTED 9ebc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009f20 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9f20: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 9f24: e5906000 ldr r6, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9f28: e596304c ldr r3, [r6, #76] ; 0x4c 9f2c: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9f30: e24dd004 sub sp, sp, #4 9f34: e1a04000 mov r4, r0 9f38: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9f3c: 1a000024 bne 9fd4 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 9f40: e5963008 ldr r3, [r6, #8] 9f44: e3530000 cmp r3, #0 9f48: 0a00001e beq 9fc8 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 9f4c: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 9f50: e1a0100d mov r1, sp 9f54: e5960050 ldr r0, [r6, #80] ; 0x50 9f58: e1a02004 mov r2, r4 9f5c: eb00054a bl b48c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 9f60: e59d3000 ldr r3, [sp] 9f64: e5966050 ldr r6, [r6, #80] ; 0x50 9f68: e0866003 add r6, r6, r3 9f6c: e1a00006 mov r0, r6 9f70: eb0019ec bl 10728 9f74: e1a02005 mov r2, r5 9f78: e1a01000 mov r1, r0 9f7c: e1a03004 mov r3, r4 9f80: e1a00006 mov r0, r6 9f84: eb000015 bl 9fe0 9f88: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 9f8c: e1a00004 mov r0, r4 9f90: ebffff8a bl 9dc0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9f94: e1a00004 mov r0, r4 9f98: e1a01005 mov r1, r5 9f9c: ebffffad bl 9e58 9fa0: e3500000 cmp r0, #0 9fa4: 0a000002 beq 9fb4 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 9fa8: e1a00006 mov r0, r6 9fac: e28dd004 add sp, sp, #4 9fb0: e8bd8070 pop {r4, r5, r6, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 9fb4: eb0015d6 bl f714 <__errno> <== NOT EXECUTED 9fb8: e3a0300d mov r3, #13 <== NOT EXECUTED 9fbc: e5803000 str r3, [r0] <== NOT EXECUTED 9fc0: e3e06000 mvn r6, #0 <== NOT EXECUTED 9fc4: eafffff7 b 9fa8 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 9fc8: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 9fcc: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 9fd0: ebffef83 bl 5de4 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 9fd4: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 9fd8: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 9fdc: ebffef80 bl 5de4 <== NOT EXECUTED =============================================================================== 0000e3f4 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { e3f4: e92d4070 push {r4, r5, r6, lr} e3f8: e24dd008 sub sp, sp, #8 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; e3fc: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { e400: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); e404: ebfff2c7 bl af28 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) e408: e1d453bc ldrh r5, [r4, #60] ; 0x3c e40c: e3500000 cmp r0, #0 e410: 11550000 cmpne r5, r0 e414: 03a05000 moveq r5, #0 e418: 13a05001 movne r5, #1 e41c: 1a00000e bne e45c /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); e420: e5943030 ldr r3, [r4, #48] ; 0x30 e424: e1a06a06 lsl r6, r6, #20 e428: e3c33eff bic r3, r3, #4080 ; 0xff0 e42c: e3c3300f bic r3, r3, #15 e430: e1a06a26 lsr r6, r6, #20 e434: e1866003 orr r6, r6, r3 e438: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); e43c: e1a0000d mov r0, sp e440: e1a01005 mov r1, r5 e444: ebffcf40 bl 214c e448: e59d3000 ldr r3, [sp] e44c: e5843048 str r3, [r4, #72] ; 0x48 e450: e1a00005 mov r0, r5 return 0; } e454: e28dd008 add sp, sp, #8 e458: e8bd8070 pop {r4, r5, r6, pc} */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); e45c: eb0004ac bl f714 <__errno> <== NOT EXECUTED e460: e3a03001 mov r3, #1 <== NOT EXECUTED e464: e5803000 str r3, [r0] <== NOT EXECUTED e468: e3e00000 mvn r0, #0 <== NOT EXECUTED e46c: eafffff8 b e454 <== NOT EXECUTED =============================================================================== 0000a870 : } int IMFS_fifo_close( rtems_libio_t *iop ) { a870: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a874: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); a878: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { a87c: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); a880: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED a884: ebfffb62 bl 9614 <== NOT EXECUTED if (! err) { a888: e2506000 subs r6, r0, #0 <== NOT EXECUTED a88c: 0a000002 beq a89c <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); a890: ba00000e blt a8d0 <== NOT EXECUTED } a894: e1a00006 mov r0, r6 <== NOT EXECUTED a898: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; a89c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a8a0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED a8a4: e5843014 str r3, [r4, #20] <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) a8a8: e1a00005 mov r0, r5 <== NOT EXECUTED a8ac: eb0001b6 bl af8c <== NOT EXECUTED a8b0: e3500000 cmp r0, #0 <== NOT EXECUTED a8b4: 1afffff6 bne a894 <== NOT EXECUTED a8b8: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED a8bc: e3530000 cmp r3, #0 <== NOT EXECUTED a8c0: 1afffff3 bne a894 <== NOT EXECUTED free(jnode); a8c4: e1a00005 mov r0, r5 <== NOT EXECUTED a8c8: ebffddf6 bl 20a8 <== NOT EXECUTED a8cc: eafffff0 b a894 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); a8d0: eb00138f bl f714 <__errno> <== NOT EXECUTED a8d4: e2666000 rsb r6, r6, #0 <== NOT EXECUTED a8d8: e5806000 str r6, [r0] <== NOT EXECUTED a8dc: e3e06000 mvn r6, #0 <== NOT EXECUTED a8e0: eaffffeb b a894 <== NOT EXECUTED =============================================================================== 0000a73c : void *buffer ) { int err; if (command == FIONBIO) { a73c: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED a740: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED a744: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED a748: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a74c: e92d4010 push {r4, lr} <== NOT EXECUTED a750: e1a03002 mov r3, r2 <== NOT EXECUTED int err; if (command == FIONBIO) { a754: 0a00000a beq a784 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a758: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED a75c: e1a03000 mov r3, r0 <== NOT EXECUTED a760: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED a764: ebfffa9d bl 91e0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a768: e3500000 cmp r0, #0 <== NOT EXECUTED a76c: a8bd8010 popge {r4, pc} <== NOT EXECUTED a770: e2604000 rsb r4, r0, #0 <== NOT EXECUTED a774: eb0013e6 bl f714 <__errno> <== NOT EXECUTED a778: e5804000 str r4, [r0] <== NOT EXECUTED a77c: e3e00000 mvn r0, #0 <== NOT EXECUTED } a780: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) a784: e3520000 cmp r2, #0 <== NOT EXECUTED a788: 03a0400e moveq r4, #14 <== NOT EXECUTED a78c: 0afffff8 beq a774 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) a790: e5924000 ldr r4, [r2] <== NOT EXECUTED a794: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; a798: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a79c: 05903014 ldreq r3, [r0, #20] <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a7a0: 13833001 orrne r3, r3, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a7a4: 03c33001 biceq r3, r3, #1 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a7a8: 15803014 strne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a7ac: 05803014 streq r3, [r0, #20] <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a7b0: 13a00000 movne r0, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a7b4: 01a00004 moveq r0, r4 <== NOT EXECUTED a7b8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 0000a6e4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a6e4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a6e8: e1a0c000 mov ip, r0 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); a6ec: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a6f0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); a6f4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a6f8: e58dc000 str ip, [sp] <== NOT EXECUTED a6fc: ebfffa99 bl 9168 <== NOT EXECUTED a700: e1a03000 mov r3, r0 <== NOT EXECUTED a704: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a708: e3540000 cmp r4, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); a70c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a710: ba000003 blt a724 <== NOT EXECUTED } a714: e1a01004 mov r1, r4 <== NOT EXECUTED a718: e1a00003 mov r0, r3 <== NOT EXECUTED a71c: e28dd004 add sp, sp, #4 <== NOT EXECUTED a720: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); a724: eb0013fa bl f714 <__errno> <== NOT EXECUTED a728: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a72c: e5805000 str r5, [r0] <== NOT EXECUTED a730: e3e03000 mvn r3, #0 <== NOT EXECUTED a734: e3e04000 mvn r4, #0 <== NOT EXECUTED a738: eafffff5 b a714 <== NOT EXECUTED =============================================================================== 0000a818 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a818: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a81c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a820: e1a03000 mov r3, r0 <== NOT EXECUTED a824: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); a828: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a82c: ebfffa84 bl 9244 <== NOT EXECUTED if (err > 0) a830: e2505000 subs r5, r0, #0 <== NOT EXECUTED a834: da000007 ble a858 <== NOT EXECUTED IMFS_update_atime(jnode); a838: e1a0000d mov r0, sp <== NOT EXECUTED a83c: e3a01000 mov r1, #0 <== NOT EXECUTED a840: ebffde41 bl 214c <== NOT EXECUTED a844: e59d3000 ldr r3, [sp] <== NOT EXECUTED a848: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } a84c: e1a00005 mov r0, r5 <== NOT EXECUTED a850: e28dd008 add sp, sp, #8 <== NOT EXECUTED a854: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); a858: 0afffffb beq a84c <== NOT EXECUTED a85c: eb0013ac bl f714 <__errno> <== NOT EXECUTED a860: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a864: e5805000 str r5, [r0] <== NOT EXECUTED a868: e3e05000 mvn r5, #0 <== NOT EXECUTED a86c: eafffff6 b a84c <== NOT EXECUTED =============================================================================== 0000a7bc : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a7bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a7c0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a7c4: e1a03000 mov r3, r0 <== NOT EXECUTED a7c8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); a7cc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a7d0: ebfffb09 bl 93fc <== NOT EXECUTED if (err > 0) { a7d4: e2505000 subs r5, r0, #0 <== NOT EXECUTED a7d8: da000008 ble a800 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); a7dc: e1a0000d mov r0, sp <== NOT EXECUTED a7e0: e3a01000 mov r1, #0 <== NOT EXECUTED a7e4: ebffde58 bl 214c <== NOT EXECUTED a7e8: e59d3000 ldr r3, [sp] <== NOT EXECUTED a7ec: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED a7f0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } a7f4: e1a00005 mov r0, r5 <== NOT EXECUTED a7f8: e28dd008 add sp, sp, #8 <== NOT EXECUTED a7fc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); a800: 0afffffb beq a7f4 <== NOT EXECUTED a804: eb0013c2 bl f714 <__errno> <== NOT EXECUTED a808: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a80c: e5805000 str r5, [r0] <== NOT EXECUTED a810: e3e05000 mvn r5, #0 <== NOT EXECUTED a814: eafffff6 b a7f4 <== NOT EXECUTED =============================================================================== 0000a9dc : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { a9dc: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); a9e0: e2505000 subs r5, r0, #0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { a9e4: e1a04001 mov r4, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); a9e8: 0a000020 beq aa70 if ( !name ) a9ec: e3510000 cmp r1, #0 a9f0: 0a00000c beq aa28 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) a9f4: e1a00001 mov r0, r1 a9f8: e59f1084 ldr r1, [pc, #132] ; aa84 a9fc: eb00166d bl 103b8 aa00: e3500000 cmp r0, #0 aa04: 0a000005 beq aa20 return directory; if ( !strcmp( name, dotdotname ) ) aa08: e1a00004 mov r0, r4 aa0c: e59f1074 ldr r1, [pc, #116] ; aa88 aa10: eb001668 bl 103b8 aa14: e3500000 cmp r0, #0 return directory->Parent; aa18: 05955008 ldreq r5, [r5, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) aa1c: 1a000004 bne aa34 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } aa20: e1a00005 mov r0, r5 aa24: e8bd8070 pop {r4, r5, r6, pc} if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; aa28: e3a05000 mov r5, #0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } aa2c: e1a00005 mov r0, r5 aa30: e8bd8070 pop {r4, r5, r6, pc} if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; aa34: e5956050 ldr r6, [r5, #80] ; 0x50 aa38: e2855054 add r5, r5, #84 ; 0x54 aa3c: e1560005 cmp r6, r5 aa40: 1a000003 bne aa54 aa44: eafffff7 b aa28 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { aa48: e5966000 ldr r6, [r6] if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; aa4c: e1560005 cmp r6, r5 aa50: 0afffff4 beq aa28 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) aa54: e1a00004 mov r0, r4 aa58: e286100c add r1, r6, #12 aa5c: eb001655 bl 103b8 aa60: e3500000 cmp r0, #0 aa64: 1afffff7 bne aa48 aa68: e1a05006 mov r5, r6 aa6c: eaffffeb b aa20 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); aa70: e59f0014 ldr r0, [pc, #20] ; aa8c <== NOT EXECUTED aa74: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED aa78: e59f2010 ldr r2, [pc, #16] ; aa90 <== NOT EXECUTED aa7c: e59f3010 ldr r3, [pc, #16] ; aa94 <== NOT EXECUTED aa80: eb0000a3 bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000a924 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a924: e92d4070 push {r4, r5, r6, lr} /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; a928: e1a0c000 mov ip, r0 a92c: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a930: e24dd014 sub sp, sp, #20 a934: e1a0e000 mov lr, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a938: e8bc000f ldm ip!, {r0, r1, r2, r3} a93c: e1a0600d mov r6, sp a940: e8a6000f stmia r6!, {r0, r1, r2, r3} a944: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a948: e3a03000 mov r3, #0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a94c: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a950: e58e301c str r3, [lr, #28] * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a954: e1a0500d mov r5, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a958: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; a95c: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a960: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a964: ebfffd15 bl 9dc0 if ( jnode->type != IMFS_DIRECTORY ) { a968: e594304c ldr r3, [r4, #76] ; 0x4c a96c: e3530001 cmp r3, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a970: e2842054 add r2, r4, #84 ; 0x54 a974: 1a000010 bne a9bc a978: e5943050 ldr r3, [r4, #80] ; 0x50 a97c: e1530002 cmp r3, r2 a980: 0a00000d beq a9bc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { a984: e3540000 cmp r4, #0 a988: 0a000008 beq a9b0 if ( jnode->type == IMFS_DIRECTORY ) { a98c: e594304c ldr r3, [r4, #76] ; 0x4c a990: e3530001 cmp r3, #1 a994: 1affffef bne a958 a998: e5943050 ldr r3, [r4, #80] ; 0x50 a99c: e2842054 add r2, r4, #84 ; 0x54 a9a0: e1530002 cmp r3, r2 a9a4: 0affffeb beq a958 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a9a8: e2534000 subs r4, r3, #0 a9ac: 1affffe9 bne a958 a9b0: e3a00000 mov r0, #0 return 0; } a9b4: e28dd014 add sp, sp, #20 a9b8: e8bd8070 pop {r4, r5, r6, pc} result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); a9bc: e3a00000 mov r0, #0 a9c0: e1a0100d mov r1, sp a9c4: ebffdc33 bl 1a98 if (result != 0) a9c8: e3500000 cmp r0, #0 a9cc: 01a04006 moveq r4, r6 a9d0: 0affffeb beq a984 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a9d4: e3e00000 mvn r0, #0 <== NOT EXECUTED a9d8: eafffff5 b a9b4 <== NOT EXECUTED =============================================================================== 00001660 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 1660: e59fc0dc ldr ip, [pc, #220] ; 1744 1664: e59cc000 ldr ip, [ip] int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 1668: e35c0010 cmp ip, #16 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 166c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 1670: e1a04000 mov r4, r0 1674: e1a07001 mov r7, r1 1678: e1a08002 mov r8, r2 167c: e1a06003 mov r6, r3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 1680: 0a000008 beq 16a8 1684: e3a03000 mov r3, #0 1688: e3a02020 mov r2, #32 168c: e15c0002 cmp ip, r2 1690: e2833001 add r3, r3, #1 1694: 0a000003 beq 16a8 1698: e3530005 cmp r3, #5 169c: e1a02082 lsl r2, r2, #1 16a0: 1afffff9 bne 168c 16a4: e3a0c080 mov ip, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 16a8: e59f5098 ldr r5, [pc, #152] ; 1748 16ac: e585c000 str ip, [r5] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 16b0: eb002160 bl 9c38 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 16b4: e59fe090 ldr lr, [pc, #144] ; 174c /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 16b8: e584001c str r0, [r4, #28] temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 16bc: e8be000f ldm lr!, {r0, r1, r2, r3} 16c0: e284c038 add ip, r4, #56 ; 0x38 16c4: e8ac000f stmia ip!, {r0, r1, r2, r3} 16c8: e8be000f ldm lr!, {r0, r1, r2, r3} 16cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 16d0: e89e000f ldm lr, {r0, r1, r2, r3} * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 16d4: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 16d8: e88c000f stm ip, {r0, r1, r2, r3} * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 16dc: e5846024 str r6, [r4, #36] ; 0x24 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 16e0: e3a00001 mov r0, #1 16e4: e3a01010 mov r1, #16 16e8: eb0001d8 bl 1e50 if ( !fs_info ) { 16ec: e3500000 cmp r0, #0 16f0: 0a00000c beq 1728 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 16f4: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 16f8: e594101c ldr r1, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 16fc: e3a03001 mov r3, #1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1700: e880000c stm r0, {r2, r3} fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 1704: e580600c str r6, [r0, #12] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 1708: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 170c: e0822003 add r2, r2, r3 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 1710: e5840034 str r0, [r4, #52] ; 0x34 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 1714: e5813038 str r3, [r1, #56] ; 0x38 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1718: e5852004 str r2, [r5, #4] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 171c: eb001e93 bl 9170 1720: e3a00000 mov r0, #0 return 0; } 1724: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 1728: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 172c: eb00025d bl 20a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 1730: eb0037f7 bl f714 <__errno> <== NOT EXECUTED 1734: e3a0300c mov r3, #12 <== NOT EXECUTED 1738: e5803000 str r3, [r0] <== NOT EXECUTED 173c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1740: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00001750 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1750: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1754: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1758: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 175c: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1760: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1764: e3530007 cmp r3, #7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1768: e1a05001 mov r5, r1 176c: e1a06002 mov r6, r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1770: 8a00001e bhi 17f0 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1774: e1a00002 mov r0, r2 1778: eb003bea bl 10728 177c: e28d4004 add r4, sp, #4 1780: e1a01000 mov r1, r0 1784: e1a02004 mov r2, r4 1788: e28d3044 add r3, sp, #68 ; 0x44 178c: e1a00006 mov r0, r6 1790: eb0024c0 bl aa98 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 1794: e3a03ca2 mov r3, #41472 ; 0xa200 1798: e28dc028 add ip, sp, #40 ; 0x28 179c: e1a00005 mov r0, r5 17a0: e1a02004 mov r2, r4 17a4: e2433001 sub r3, r3, #1 17a8: e3a01003 mov r1, #3 17ac: e58dc000 str ip, [sp] 17b0: eb002130 bl 9c78 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 17b4: e3500000 cmp r0, #0 17b8: 0a000011 beq 1804 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 17bc: e59d3028 ldr r3, [sp, #40] ; 0x28 17c0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 17c4: e2822001 add r2, r2, #1 17c8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 17cc: e28d003c add r0, sp, #60 ; 0x3c 17d0: e3a01000 mov r1, #0 17d4: eb00025c bl 214c 17d8: e59d203c ldr r2, [sp, #60] ; 0x3c 17dc: e59d3028 ldr r3, [sp, #40] ; 0x28 17e0: e5832048 str r2, [r3, #72] ; 0x48 17e4: e3a00000 mov r0, #0 return 0; } 17e8: e28dd048 add sp, sp, #72 ; 0x48 17ec: e8bd8070 pop {r4, r5, r6, pc} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 17f0: eb0037c7 bl f714 <__errno> 17f4: e3a0301f mov r3, #31 17f8: e5803000 str r3, [r0] 17fc: e3e00000 mvn r0, #0 1800: eafffff8 b 17e8 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 1804: eb0037c2 bl f714 <__errno> <== NOT EXECUTED 1808: e3a0300c mov r3, #12 <== NOT EXECUTED 180c: e5803000 str r3, [r0] <== NOT EXECUTED 1810: e3e00000 mvn r0, #0 <== NOT EXECUTED 1814: eafffff3 b 17e8 <== NOT EXECUTED =============================================================================== 0000d3a0 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); d3a0: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { d3a4: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); d3a8: 0a00000f beq d3ec if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d3ac: e593304c ldr r3, [r3, #76] ; 0x4c d3b0: e3530005 cmp r3, #5 d3b4: 1a000012 bne d404 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); d3b8: e3a02001 mov r2, #1 d3bc: ebfffe99 bl ce28 if ( *block_entry_ptr ) d3c0: e5904000 ldr r4, [r0] d3c4: e3540000 cmp r4, #0 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); d3c8: e1a05000 mov r5, r0 if ( *block_entry_ptr ) d3cc: 13a00000 movne r0, #0 d3d0: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); d3d4: ebfffe86 bl cdf4 if ( !memory ) d3d8: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; d3dc: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) d3e0: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; d3e4: 11a00004 movne r0, r4 return 0; } d3e8: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); d3ec: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED d3f0: e2811001 add r1, r1, #1 <== NOT EXECUTED d3f4: e59f0020 ldr r0, [pc, #32] ; d41c <== NOT EXECUTED d3f8: e59f2020 ldr r2, [pc, #32] ; d420 <== NOT EXECUTED d3fc: e59f3020 ldr r3, [pc, #32] ; d424 <== NOT EXECUTED d400: ebfff643 bl ad14 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d404: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED d408: e2811001 add r1, r1, #1 <== NOT EXECUTED d40c: e59f0008 ldr r0, [pc, #8] ; d41c <== NOT EXECUTED d410: e59f2008 ldr r2, [pc, #8] ; d420 <== NOT EXECUTED d414: e59f300c ldr r3, [pc, #12] ; d428 <== NOT EXECUTED d418: ebfff63d bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000d42c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { d42c: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); d430: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { d434: e24dd004 sub sp, sp, #4 d438: e1a08001 mov r8, r1 d43c: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); d440: 0a00004f beq d584 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d444: e594304c ldr r3, [r4, #76] ; 0x4c d448: e3530005 cmp r3, #5 d44c: 1a000046 bne d56c if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) d450: e59f3144 ldr r3, [pc, #324] ; d59c d454: e593b000 ldr fp, [r3] d458: e1a0312b lsr r3, fp, #2 d45c: e0213393 mla r1, r3, r3, r3 d460: e0223391 mla r2, r1, r3, r3 d464: e3a03000 mov r3, #0 d468: e1530006 cmp r3, r6 d46c: e2423001 sub r3, r2, #1 d470: e002039b mul r2, fp, r3 d474: da000034 ble d54c rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) d478: e5947054 ldr r7, [r4, #84] ; 0x54 d47c: e1560007 cmp r6, r7 d480: e594a050 ldr sl, [r4, #80] ; 0x50 d484: da000027 ble d528 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; d488: e1a0cfcb asr ip, fp, #31 d48c: e1a0300c mov r3, ip d490: e1a0200b mov r2, fp d494: e1a00008 mov r0, r8 d498: e1a01006 mov r1, r6 d49c: e58dc000 str ip, [sp] d4a0: eb003116 bl 19900 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; d4a4: e59dc000 ldr ip, [sp] /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; d4a8: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; d4ac: e1a01007 mov r1, r7 d4b0: e1a0000a mov r0, sl d4b4: e1a0200b mov r2, fp d4b8: e1a0300c mov r3, ip d4bc: eb00310f bl 19900 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { d4c0: e1550000 cmp r5, r0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; d4c4: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { d4c8: 3a00001b bcc d53c d4cc: e1a07000 mov r7, r0 d4d0: ea000002 b d4e0 d4d4: e2877001 add r7, r7, #1 d4d8: e1550007 cmp r5, r7 d4dc: 3a000016 bcc d53c if ( IMFS_memfile_addblock( the_jnode, block ) ) { d4e0: e1a00004 mov r0, r4 d4e4: e1a01007 mov r1, r7 d4e8: ebffffac bl d3a0 d4ec: e3500000 cmp r0, #0 d4f0: 0afffff7 beq d4d4 d4f4: ea000003 b d508 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); d4f8: e1a01007 mov r1, r7 <== NOT EXECUTED d4fc: e1a00004 mov r0, r4 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { d500: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); d504: ebfffef5 bl d0e0 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { d508: e15a0007 cmp sl, r7 <== NOT EXECUTED d50c: 9afffff9 bls d4f8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); d510: eb00087f bl f714 <__errno> <== NOT EXECUTED d514: e3a0301c mov r3, #28 <== NOT EXECUTED d518: e5803000 str r3, [r0] <== NOT EXECUTED d51c: e3e00000 mvn r0, #0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } d520: e28dd004 add sp, sp, #4 d524: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) d528: 1a000001 bne d534 d52c: e158000a cmp r8, sl d530: 8affffd4 bhi d488 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; d534: e3a00000 mov r0, #0 return 0; d538: eafffff8 b d520 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; d53c: e5846054 str r6, [r4, #84] ; 0x54 d540: e5848050 str r8, [r4, #80] ; 0x50 d544: e3a00000 mov r0, #0 d548: eafffff4 b d520 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) d54c: 1a000001 bne d558 d550: e1520008 cmp r2, r8 d554: 8affffc7 bhi d478 rtems_set_errno_and_return_minus_one( EINVAL ); d558: eb00086d bl f714 <__errno> <== NOT EXECUTED d55c: e3a03016 mov r3, #22 <== NOT EXECUTED d560: e5803000 str r3, [r0] <== NOT EXECUTED d564: e3e00000 mvn r0, #0 <== NOT EXECUTED d568: eaffffec b d520 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d56c: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED d570: e2811001 add r1, r1, #1 <== NOT EXECUTED d574: e59f0024 ldr r0, [pc, #36] ; d5a0 <== NOT EXECUTED d578: e59f2024 ldr r2, [pc, #36] ; d5a4 <== NOT EXECUTED d57c: e59f3024 ldr r3, [pc, #36] ; d5a8 <== NOT EXECUTED d580: ebfff5e3 bl ad14 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); d584: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED d588: e2811001 add r1, r1, #1 <== NOT EXECUTED d58c: e59f000c ldr r0, [pc, #12] ; d5a0 <== NOT EXECUTED d590: e59f200c ldr r2, [pc, #12] ; d5a4 <== NOT EXECUTED d594: e59f3010 ldr r3, [pc, #16] ; d5ac <== NOT EXECUTED d598: ebfff5dd bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000ce28 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ce28: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ce2c: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ce30: e24dd004 sub sp, sp, #4 /* * Perform internal consistency checks */ assert( the_jnode ); ce34: 0a000073 beq d008 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ce38: e594304c ldr r3, [r4, #76] ; 0x4c ce3c: e3530005 cmp r3, #5 ce40: 1a00006b bne cff4 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ce44: e59f31f8 ldr r3, [pc, #504] ; d044 ce48: e5935000 ldr r5, [r3] ce4c: e1a05125 lsr r5, r5, #2 ce50: e2453001 sub r3, r5, #1 ce54: e1510003 cmp r1, r3 ce58: 9a000019 bls cec4 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ce5c: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED ce60: e2463001 sub r3, r6, #1 <== NOT EXECUTED ce64: e1510003 cmp r1, r3 <== NOT EXECUTED ce68: 8a000025 bhi cf04 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; ce6c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ce70: e1a00006 mov r0, r6 <== NOT EXECUTED ce74: e1a01005 mov r1, r5 <== NOT EXECUTED ce78: e58d2000 str r2, [sp] <== NOT EXECUTED ce7c: eb002ff2 bl 18e4c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ce80: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ce84: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ce88: e1a00006 mov r0, r6 <== NOT EXECUTED ce8c: eb002faa bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { ce90: e59d2000 ldr r2, [sp] <== NOT EXECUTED ce94: e3520000 cmp r2, #0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ce98: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; ce9c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { cea0: 0a000047 beq cfc4 <== NOT EXECUTED if ( !p ) { cea4: e3530000 cmp r3, #0 <== NOT EXECUTED cea8: 0a00004c beq cfe0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ceac: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p1 ) { ceb0: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ceb4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { ceb8: 0a000034 beq cf90 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; cebc: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED cec0: ea000005 b cedc <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { cec4: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; cec8: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { cecc: 0a000035 beq cfa8 if ( !p ) { ced0: e3500000 cmp r0, #0 ced4: 0a000002 beq cee4 } if ( !p ) return 0; return &info->indirect[ my_block ]; ced8: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } cedc: e28dd004 add sp, sp, #4 cee0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); cee4: e58d1000 str r1, [sp] cee8: ebffffc1 bl cdf4 if ( !p ) ceec: e3500000 cmp r0, #0 cef0: e59d1000 ldr r1, [sp] return 0; info->indirect = p; cef4: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) cef8: 1afffff6 bne ced8 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; cefc: e3a00000 mov r0, #0 <== NOT EXECUTED cf00: eafffff5 b cedc <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { cf04: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED cf08: e2433001 sub r3, r3, #1 <== NOT EXECUTED cf0c: e1510003 cmp r1, r3 <== NOT EXECUTED cf10: 8afffff9 bhi cefc <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; cf14: e0666001 rsb r6, r6, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; cf18: e1a00006 mov r0, r6 <== NOT EXECUTED cf1c: e1a01005 mov r1, r5 <== NOT EXECUTED cf20: e58d2000 str r2, [sp] <== NOT EXECUTED cf24: eb002fc8 bl 18e4c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; cf28: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; cf2c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; cf30: e1a00006 mov r0, r6 <== NOT EXECUTED cf34: eb002f80 bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; cf38: e1a01005 mov r1, r5 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; cf3c: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; cf40: eb002f7d bl 18d3c <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; cf44: e1a01005 mov r1, r5 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; cf48: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; cf4c: e1a00008 mov r0, r8 <== NOT EXECUTED cf50: eb002fbd bl 18e4c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { cf54: e59d2000 ldr r2, [sp] <== NOT EXECUTED cf58: e3520000 cmp r2, #0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; cf5c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; cf60: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { cf64: 0a000013 beq cfb8 <== NOT EXECUTED if ( !p ) { cf68: e3530000 cmp r3, #0 <== NOT EXECUTED cf6c: 0a00002f beq d030 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; cf70: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) { cf74: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; cf78: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { cf7c: 0a000026 beq d01c <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; cf80: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { cf84: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; cf88: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { cf8c: 1affffca bne cebc <== NOT EXECUTED p2 = memfile_alloc_block(); cf90: ebffff97 bl cdf4 <== NOT EXECUTED if ( !p2 ) cf94: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; cf98: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) cf9c: 0affffd6 beq cefc <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; cfa0: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED cfa4: eaffffcc b cedc <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) cfa8: e3500000 cmp r0, #0 cfac: 1affffc9 bne ced8 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; cfb0: e3a00000 mov r0, #0 <== NOT EXECUTED cfb4: eaffffc8 b cedc <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) cfb8: e3530000 cmp r3, #0 <== NOT EXECUTED cfbc: 0affffce beq cefc <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; cfc0: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) cfc4: e3530000 cmp r3, #0 <== NOT EXECUTED cfc8: 0affffcb beq cefc <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; cfcc: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) cfd0: e3500000 cmp r0, #0 <== NOT EXECUTED cfd4: 0affffc8 beq cefc <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; cfd8: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED cfdc: eaffffbe b cedc <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); cfe0: ebffff83 bl cdf4 <== NOT EXECUTED if ( !p ) cfe4: e2503000 subs r3, r0, #0 <== NOT EXECUTED cfe8: 0affffc3 beq cefc <== NOT EXECUTED return 0; info->doubly_indirect = p; cfec: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED cff0: eaffffad b ceac <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); cff4: e59f004c ldr r0, [pc, #76] ; d048 <== NOT EXECUTED cff8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED cffc: e59f2048 ldr r2, [pc, #72] ; d04c <== NOT EXECUTED d000: e59f3048 ldr r3, [pc, #72] ; d050 <== NOT EXECUTED d004: ebfff742 bl ad14 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); d008: e59f0038 ldr r0, [pc, #56] ; d048 <== NOT EXECUTED d00c: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED d010: e59f2034 ldr r2, [pc, #52] ; d04c <== NOT EXECUTED d014: e59f3038 ldr r3, [pc, #56] ; d054 <== NOT EXECUTED d018: ebfff73d bl ad14 <__assert_func> <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); d01c: ebffff74 bl cdf4 <== NOT EXECUTED if ( !p1 ) d020: e2502000 subs r2, r0, #0 <== NOT EXECUTED d024: 0affffb4 beq cefc <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; d028: e5862000 str r2, [r6] <== NOT EXECUTED d02c: eaffffd3 b cf80 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); d030: ebffff6f bl cdf4 <== NOT EXECUTED if ( !p ) d034: e2503000 subs r3, r0, #0 <== NOT EXECUTED d038: 0affffaf beq cefc <== NOT EXECUTED return 0; info->triply_indirect = p; d03c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED d040: eaffffca b cf70 <== NOT EXECUTED =============================================================================== 0000da48 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { da48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); da4c: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { da50: e24dd014 sub sp, sp, #20 da54: e1a08003 mov r8, r3 da58: e1a0a001 mov sl, r1 da5c: e1a0b002 mov fp, r2 da60: e59d5038 ldr r5, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); da64: 0a000089 beq dc90 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || da68: e599304c ldr r3, [r9, #76] ; 0x4c da6c: e2432005 sub r2, r3, #5 da70: e3520001 cmp r2, #1 da74: 8a000096 bhi dcd4 /* * Error checks on arguments */ assert( dest ); da78: e3580000 cmp r8, #0 da7c: 0a00008e beq dcbc /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) da80: e3550000 cmp r5, #0 da84: 0a000076 beq dc64 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { da88: e3530006 cmp r3, #6 da8c: 0a00005a beq dbfc * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) da90: e5993054 ldr r3, [r9, #84] ; 0x54 da94: e3a02000 mov r2, #0 da98: e1520003 cmp r2, r3 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; da9c: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) daa0: e5992050 ldr r2, [r9, #80] ; 0x50 daa4: e0851001 add r1, r5, r1 daa8: da00004f ble dbec my_length = the_jnode->info.file.size - start; daac: e0635002 rsb r5, r3, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; dab0: e59f624c ldr r6, [pc, #588] ; dd04 dab4: e5964000 ldr r4, [r6] dab8: e1a0000a mov r0, sl dabc: e1a02004 mov r2, r4 dac0: e1a03fc2 asr r3, r2, #31 dac4: e1a0100b mov r1, fp dac8: e98d000c stmib sp, {r2, r3} dacc: eb0030b5 bl 19da8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; dad0: e1a0100b mov r1, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; dad4: e1a0c000 mov ip, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; dad8: e99d000c ldmib sp, {r2, r3} dadc: e1a0000a mov r0, sl dae0: e58dc000 str ip, [sp] dae4: eb002f85 bl 19900 <__divdi3> if ( start_offset ) { dae8: e59dc000 ldr ip, [sp] daec: e35c0000 cmp ip, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; daf0: e1a07000 mov r7, r0 if ( start_offset ) { daf4: 01a0a00c moveq sl, ip daf8: 0a000013 beq db4c to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); dafc: e1a00009 mov r0, r9 db00: e1a01007 mov r1, r7 db04: e3a02000 mov r2, #0 db08: e58dc000 str ip, [sp] db0c: ebfffcc5 bl ce28 assert( block_ptr ); db10: e3500000 cmp r0, #0 db14: e59dc000 ldr ip, [sp] db18: 0a000073 beq dcec */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; db1c: e06ca004 rsb sl, ip, r4 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); db20: e5901000 ldr r1, [r0] */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; db24: e155000a cmp r5, sl db28: 31a0a005 movcc sl, r5 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); db2c: e1a00008 mov r0, r8 db30: e081100c add r1, r1, ip db34: e1a0200a mov r2, sl db38: eb000903 bl ff4c dest += to_copy; block++; my_length -= to_copy; db3c: e5964000 ldr r4, [r6] block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; db40: e088800a add r8, r8, sl block++; db44: e2877001 add r7, r7, #1 my_length -= to_copy; db48: e06a5005 rsb r5, sl, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { db4c: e1550004 cmp r5, r4 db50: 3a000010 bcc db98 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); db54: e1a00009 mov r0, r9 db58: e1a01007 mov r1, r7 db5c: e3a02000 mov r2, #0 db60: ebfffcb0 bl ce28 assert( block_ptr ); db64: e3500000 cmp r0, #0 db68: 0a000042 beq dc78 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); db6c: e5901000 ldr r1, [r0] db70: e1a02004 mov r2, r4 db74: e1a00008 mov r0, r8 db78: eb0008f3 bl ff4c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { db7c: e5963000 ldr r3, [r6] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; db80: e0645005 rsb r5, r4, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { db84: e1530005 cmp r3, r5 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; db88: e0888004 add r8, r8, r4 block++; db8c: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; db90: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { db94: 9affffee bls db54 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { db98: e3550000 cmp r5, #0 db9c: 0a00000a beq dbcc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); dba0: e1a01007 mov r1, r7 dba4: e1a00009 mov r0, r9 dba8: e3a02000 mov r2, #0 dbac: ebfffc9d bl ce28 assert( block_ptr ); dbb0: e2503000 subs r3, r0, #0 dbb4: 0a00003a beq dca4 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); dbb8: e1a00008 mov r0, r8 dbbc: e5931000 ldr r1, [r3] dbc0: e1a02005 mov r2, r5 dbc4: eb0008e0 bl ff4c copied += my_length; dbc8: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); dbcc: e28d000c add r0, sp, #12 dbd0: e3a01000 mov r1, #0 dbd4: ebffd15c bl 214c dbd8: e59d300c ldr r3, [sp, #12] dbdc: e5893040 str r3, [r9, #64] ; 0x40 return copied; dbe0: e1a0000a mov r0, sl } dbe4: e28dd014 add sp, sp, #20 dbe8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) dbec: 1affffaf bne dab0 dbf0: e1510002 cmp r1, r2 dbf4: 9affffad bls dab0 dbf8: eaffffab b daac if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) dbfc: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED dc00: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED dc04: e1a00003 mov r0, r3 <== NOT EXECUTED dc08: e1a01004 mov r1, r4 <== NOT EXECUTED dc0c: e3a02000 mov r2, #0 <== NOT EXECUTED dc10: e050000a subs r0, r0, sl <== NOT EXECUTED dc14: e0c1100b sbc r1, r1, fp <== NOT EXECUTED dc18: e1520001 cmp r2, r1 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; dc1c: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) dc20: da00000b ble dc54 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; dc24: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); dc28: e082100a add r1, r2, sl <== NOT EXECUTED dc2c: e1a00008 mov r0, r8 <== NOT EXECUTED dc30: e1a02005 mov r2, r5 <== NOT EXECUTED dc34: eb0008c4 bl ff4c <== NOT EXECUTED IMFS_update_atime( the_jnode ); dc38: e28d000c add r0, sp, #12 <== NOT EXECUTED dc3c: e3a01000 mov r1, #0 <== NOT EXECUTED dc40: ebffd141 bl 214c <== NOT EXECUTED dc44: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED return my_length; dc48: e1a00005 mov r0, r5 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); dc4c: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED return my_length; dc50: eaffffe3 b dbe4 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) dc54: 1afffff3 bne dc28 <== NOT EXECUTED dc58: e1550000 cmp r5, r0 <== NOT EXECUTED dc5c: 8afffff0 bhi dc24 <== NOT EXECUTED dc60: eafffff0 b dc28 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); dc64: eb0006aa bl f714 <__errno> <== NOT EXECUTED dc68: e3a03016 mov r3, #22 <== NOT EXECUTED dc6c: e5803000 str r3, [r0] <== NOT EXECUTED dc70: e3e00000 mvn r0, #0 <== NOT EXECUTED dc74: eaffffda b dbe4 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); dc78: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED dc7c: e2811003 add r1, r1, #3 <== NOT EXECUTED dc80: e59f0080 ldr r0, [pc, #128] ; dd08 <== NOT EXECUTED dc84: e59f2080 ldr r2, [pc, #128] ; dd0c <== NOT EXECUTED dc88: e59f3080 ldr r3, [pc, #128] ; dd10 <== NOT EXECUTED dc8c: ebfff420 bl ad14 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); dc90: e59f0070 ldr r0, [pc, #112] ; dd08 <== NOT EXECUTED dc94: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED dc98: e59f206c ldr r2, [pc, #108] ; dd0c <== NOT EXECUTED dc9c: e59f3070 ldr r3, [pc, #112] ; dd14 <== NOT EXECUTED dca0: ebfff41b bl ad14 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); dca4: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED dca8: e2811001 add r1, r1, #1 <== NOT EXECUTED dcac: e59f0054 ldr r0, [pc, #84] ; dd08 <== NOT EXECUTED dcb0: e59f2054 ldr r2, [pc, #84] ; dd0c <== NOT EXECUTED dcb4: e59f3054 ldr r3, [pc, #84] ; dd10 <== NOT EXECUTED dcb8: ebfff415 bl ad14 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); dcbc: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED dcc0: e2811002 add r1, r1, #2 <== NOT EXECUTED dcc4: e59f003c ldr r0, [pc, #60] ; dd08 <== NOT EXECUTED dcc8: e59f203c ldr r2, [pc, #60] ; dd0c <== NOT EXECUTED dccc: e59f3044 ldr r3, [pc, #68] ; dd18 <== NOT EXECUTED dcd0: ebfff40f bl ad14 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || dcd4: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED dcd8: e2811001 add r1, r1, #1 <== NOT EXECUTED dcdc: e59f0024 ldr r0, [pc, #36] ; dd08 <== NOT EXECUTED dce0: e59f2024 ldr r2, [pc, #36] ; dd0c <== NOT EXECUTED dce4: e59f3030 ldr r3, [pc, #48] ; dd1c <== NOT EXECUTED dce8: ebfff409 bl ad14 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); dcec: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED dcf0: e2811002 add r1, r1, #2 <== NOT EXECUTED dcf4: e59f000c ldr r0, [pc, #12] ; dd08 <== NOT EXECUTED dcf8: e59f200c ldr r2, [pc, #12] ; dd0c <== NOT EXECUTED dcfc: e59f300c ldr r3, [pc, #12] ; dd10 <== NOT EXECUTED dd00: ebfff403 bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000d130 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { d130: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); d134: e250a000 subs sl, r0, #0 d138: 0a00004f beq d27c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d13c: e59a304c ldr r3, [sl, #76] ; 0x4c d140: e3530005 cmp r3, #5 d144: 1a000052 bne d294 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; d148: e59f615c ldr r6, [pc, #348] ; d2ac * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; d14c: e59a3058 ldr r3, [sl, #88] ; 0x58 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; d150: e5967000 ldr r7, [r6] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; d154: e3530000 cmp r3, #0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; d158: e1a07127 lsr r7, r7, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); d15c: 128a0058 addne r0, sl, #88 ; 0x58 d160: 11a01007 movne r1, r7 d164: 1bffffbb blne d058 } if ( info->doubly_indirect ) { d168: e59a305c ldr r3, [sl, #92] ; 0x5c d16c: e3530000 cmp r3, #0 d170: 0a000014 beq d1c8 for ( i=0 ; i <== NOT EXECUTED d180: e3a02000 mov r2, #0 <== NOT EXECUTED d184: e1a04002 mov r4, r2 <== NOT EXECUTED d188: ea000000 b d190 <== NOT EXECUTED d18c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { d190: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED d194: e3510000 cmp r1, #0 <== NOT EXECUTED d198: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( d19c: 10830002 addne r0, r3, r2 <== NOT EXECUTED d1a0: 11a01007 movne r1, r7 <== NOT EXECUTED d1a4: 1bffffab blne d058 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); d1bc: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED d1c0: e1a01007 mov r1, r7 <== NOT EXECUTED d1c4: ebffffa3 bl d058 <== NOT EXECUTED } if ( info->triply_indirect ) { d1c8: e59a0060 ldr r0, [sl, #96] ; 0x60 d1cc: e3500000 cmp r0, #0 d1d0: 0a000027 beq d274 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; d1e0: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ d1e4: e3550000 cmp r5, #0 <== NOT EXECUTED d1e8: 13a09000 movne r9, #0 <== NOT EXECUTED d1ec: 11a08009 movne r8, r9 <== NOT EXECUTED d1f0: 0a00001c beq d268 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED d1fc: e3a00000 mov r0, #0 <== NOT EXECUTED d200: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { d204: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED d208: e3530000 cmp r3, #0 <== NOT EXECUTED d20c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); d210: 10850000 addne r0, r5, r0 <== NOT EXECUTED d214: 11a01007 movne r1, r7 <== NOT EXECUTED d218: 1bffff8e blne d058 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED d230: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( d234: e0800009 add r0, r0, r9 <== NOT EXECUTED d238: e1a01007 mov r1, r7 <== NOT EXECUTED d23c: ebffff85 bl d058 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; d254: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED d258: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ d25c: e3550000 cmp r5, #0 <== NOT EXECUTED d260: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED d264: 1affffe2 bne d1f4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( d268: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED d26c: e1a01007 mov r1, r7 <== NOT EXECUTED d270: ebffff78 bl d058 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } d274: e3a00000 mov r0, #0 d278: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); d27c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED d280: e2811002 add r1, r1, #2 <== NOT EXECUTED d284: e59f0024 ldr r0, [pc, #36] ; d2b0 <== NOT EXECUTED d288: e59f2024 ldr r2, [pc, #36] ; d2b4 <== NOT EXECUTED d28c: e59f3024 ldr r3, [pc, #36] ; d2b8 <== NOT EXECUTED d290: ebfff69f bl ad14 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d294: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED d298: e2811002 add r1, r1, #2 <== NOT EXECUTED d29c: e59f000c ldr r0, [pc, #12] ; d2b0 <== NOT EXECUTED d2a0: e59f200c ldr r2, [pc, #12] ; d2b4 <== NOT EXECUTED d2a4: e59f3010 ldr r3, [pc, #16] ; d2bc <== NOT EXECUTED d2a8: ebfff699 bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000d0e0 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { d0e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d0e4: e3a02000 mov r2, #0 <== NOT EXECUTED d0e8: ebffff4e bl ce28 <== NOT EXECUTED assert( block_ptr ); d0ec: e2503000 subs r3, r0, #0 <== NOT EXECUTED d0f0: 0a000005 beq d10c <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; d0f4: e3a02000 mov r2, #0 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; d0f8: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; d0fc: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); d100: ebffff33 bl cdd4 <== NOT EXECUTED } return 1; } d104: e3a00001 mov r0, #1 <== NOT EXECUTED d108: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); d10c: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED d110: e2811002 add r1, r1, #2 <== NOT EXECUTED d114: e59f0008 ldr r0, [pc, #8] ; d124 <== NOT EXECUTED d118: e59f2008 ldr r2, [pc, #8] ; d128 <== NOT EXECUTED d11c: e59f3008 ldr r3, [pc, #8] ; d12c <== NOT EXECUTED d120: ebfff6fb bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000d6c4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { d6c4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); d6c8: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { d6cc: e24dd014 sub sp, sp, #20 d6d0: e1a06001 mov r6, r1 d6d4: e1a07002 mov r7, r2 d6d8: e1a08003 mov r8, r3 d6dc: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); d6e0: 0a000079 beq d8cc if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d6e4: e599304c ldr r3, [r9, #76] ; 0x4c d6e8: e3530005 cmp r3, #5 d6ec: 1a000070 bne d8b4 /* * Error check arguments */ assert( source ); d6f0: e3580000 cmp r8, #0 d6f4: 0a000085 beq d910 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) d6f8: e35a0000 cmp sl, #0 d6fc: 0a000062 beq d88c * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { d700: e5993054 ldr r3, [r9, #84] ; 0x54 d704: e3530000 cmp r3, #0 d708: e08a1001 add r1, sl, r1 d70c: ba000054 blt d864 d710: 0a000050 beq d858 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; d714: e59f520c ldr r5, [pc, #524] ; d928 d718: e5954000 ldr r4, [r5] d71c: e1a00006 mov r0, r6 d720: e1a02004 mov r2, r4 d724: e1a03fc2 asr r3, r2, #31 d728: e1a01007 mov r1, r7 d72c: e98d000c stmib sp, {r2, r3} d730: eb00319c bl 19da8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; d734: e1a01007 mov r1, r7 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; d738: e1a0b000 mov fp, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; d73c: e99d000c ldmib sp, {r2, r3} d740: e1a00006 mov r0, r6 d744: eb00306d bl 19900 <__divdi3> if ( start_offset ) { d748: e35b0000 cmp fp, #0 d74c: 01a0700a moveq r7, sl /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; d750: e1a06000 mov r6, r0 if ( start_offset ) { d754: 01a0a00b moveq sl, fp d758: 1a000028 bne d800 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { d75c: e1570004 cmp r7, r4 d760: 3a000010 bcc d7a8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d764: e1a00009 mov r0, r9 d768: e1a01006 mov r1, r6 d76c: e3a02000 mov r2, #0 d770: ebfffdac bl ce28 assert( block_ptr ); d774: e3500000 cmp r0, #0 d778: 0a000048 beq d8a0 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); d77c: e1a01008 mov r1, r8 d780: e5900000 ldr r0, [r0] d784: e1a02004 mov r2, r4 d788: eb0009ef bl ff4c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { d78c: e5953000 ldr r3, [r5] fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; d790: e0647007 rsb r7, r4, r7 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { d794: e1530007 cmp r3, r7 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; d798: e0888004 add r8, r8, r4 block++; d79c: e2866001 add r6, r6, #1 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( d7a0: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { d7a4: 9affffee bls d764 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { d7a8: e3570000 cmp r7, #0 d7ac: 0a00000a beq d7dc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d7b0: e1a01006 mov r1, r6 d7b4: e1a00009 mov r0, r9 d7b8: e3a02000 mov r2, #0 d7bc: ebfffd99 bl ce28 assert( block_ptr ); d7c0: e3500000 cmp r0, #0 d7c4: 0a00004b beq d8f8 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); d7c8: e5900000 ldr r0, [r0] d7cc: e1a01008 mov r1, r8 d7d0: e1a02007 mov r2, r7 d7d4: eb0009dc bl ff4c my_length = 0; copied += to_copy; d7d8: e08aa007 add sl, sl, r7 } IMFS_mtime_ctime_update( the_jnode ); d7dc: e28d000c add r0, sp, #12 d7e0: e3a01000 mov r1, #0 d7e4: ebffd258 bl 214c d7e8: e59d300c ldr r3, [sp, #12] d7ec: e5893048 str r3, [r9, #72] ; 0x48 d7f0: e5893044 str r3, [r9, #68] ; 0x44 return copied; } d7f4: e1a0000a mov r0, sl d7f8: e28dd014 add sp, sp, #20 d7fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d800: e1a00009 mov r0, r9 d804: e1a01006 mov r1, r6 d808: e3a02000 mov r2, #0 d80c: ebfffd85 bl ce28 assert( block_ptr ); d810: e3500000 cmp r0, #0 d814: 0a000032 beq d8e4 */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; d818: e06b3004 rsb r3, fp, r4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); d81c: e5900000 ldr r0, [r0] */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; d820: e153000a cmp r3, sl d824: 21a0300a movcs r3, sl if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); d828: e1a01008 mov r1, r8 d82c: e1a02003 mov r2, r3 d830: e080000b add r0, r0, fp d834: e58d3000 str r3, [sp] d838: eb0009c3 bl ff4c src += to_copy; d83c: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; copied += to_copy; d840: e5954000 ldr r4, [r5] fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; d844: e063700a rsb r7, r3, sl return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; d848: e0888003 add r8, r8, r3 block++; d84c: e2866001 add r6, r6, #1 my_length -= to_copy; copied += to_copy; d850: e1a0a003 mov sl, r3 d854: eaffffc0 b d75c * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { d858: e5993050 ldr r3, [r9, #80] ; 0x50 d85c: e1530001 cmp r3, r1 d860: 2affffab bcs d714 status = IMFS_memfile_extend( the_jnode, last_byte ); d864: e1a00009 mov r0, r9 d868: e3a02000 mov r2, #0 d86c: ebfffeee bl d42c if ( status ) d870: e3500000 cmp r0, #0 d874: 0affffa6 beq d714 rtems_set_errno_and_return_minus_one( ENOSPC ); d878: eb0007a5 bl f714 <__errno> <== NOT EXECUTED d87c: e3a0301c mov r3, #28 <== NOT EXECUTED d880: e5803000 str r3, [r0] <== NOT EXECUTED d884: e3e0a000 mvn sl, #0 <== NOT EXECUTED d888: eaffffd9 b d7f4 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); d88c: eb0007a0 bl f714 <__errno> <== NOT EXECUTED d890: e3a03016 mov r3, #22 <== NOT EXECUTED d894: e5803000 str r3, [r0] <== NOT EXECUTED d898: e3e0a000 mvn sl, #0 <== NOT EXECUTED d89c: eaffffd4 b d7f4 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); d8a0: e59f0084 ldr r0, [pc, #132] ; d92c <== NOT EXECUTED d8a4: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED d8a8: e59f2080 ldr r2, [pc, #128] ; d930 <== NOT EXECUTED d8ac: e59f3080 ldr r3, [pc, #128] ; d934 <== NOT EXECUTED d8b0: ebfff517 bl ad14 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); d8b4: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED d8b8: e2811003 add r1, r1, #3 <== NOT EXECUTED d8bc: e59f0068 ldr r0, [pc, #104] ; d92c <== NOT EXECUTED d8c0: e59f2068 ldr r2, [pc, #104] ; d930 <== NOT EXECUTED d8c4: e59f306c ldr r3, [pc, #108] ; d938 <== NOT EXECUTED d8c8: ebfff511 bl ad14 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); d8cc: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED d8d0: e2811003 add r1, r1, #3 <== NOT EXECUTED d8d4: e59f0050 ldr r0, [pc, #80] ; d92c <== NOT EXECUTED d8d8: e59f2050 ldr r2, [pc, #80] ; d930 <== NOT EXECUTED d8dc: e59f3058 ldr r3, [pc, #88] ; d93c <== NOT EXECUTED d8e0: ebfff50b bl ad14 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); d8e4: e59f0040 ldr r0, [pc, #64] ; d92c <== NOT EXECUTED d8e8: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED d8ec: e59f203c ldr r2, [pc, #60] ; d930 <== NOT EXECUTED d8f0: e59f303c ldr r3, [pc, #60] ; d934 <== NOT EXECUTED d8f4: ebfff506 bl ad14 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); d8f8: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED d8fc: e2811002 add r1, r1, #2 <== NOT EXECUTED d900: e59f0024 ldr r0, [pc, #36] ; d92c <== NOT EXECUTED d904: e59f2024 ldr r2, [pc, #36] ; d930 <== NOT EXECUTED d908: e59f3024 ldr r3, [pc, #36] ; d934 <== NOT EXECUTED d90c: ebfff500 bl ad14 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); d910: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED d914: e2811003 add r1, r1, #3 <== NOT EXECUTED d918: e59f000c ldr r0, [pc, #12] ; d92c <== NOT EXECUTED d91c: e59f200c ldr r2, [pc, #12] ; d930 <== NOT EXECUTED d920: e59f3018 ldr r3, [pc, #24] ; d940 <== NOT EXECUTED d924: ebfff4fa bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 00001818 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 1818: e92d41f0 push {r4, r5, r6, r7, r8, lr} 181c: e24dd040 sub sp, sp, #64 ; 0x40 1820: e1a04001 mov r4, r1 1824: e1a07002 mov r7, r2 1828: e1a06003 mov r6, r3 182c: e1a08000 mov r8, r0 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 1830: eb003bbc bl 10728 1834: e28d5004 add r5, sp, #4 1838: e1a01000 mov r1, r0 183c: e28d303c add r3, sp, #60 ; 0x3c 1840: e1a00008 mov r0, r8 1844: e1a02005 mov r2, r5 1848: eb002492 bl aa98 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 184c: e2043a0f and r3, r4, #61440 ; 0xf000 1850: e3530901 cmp r3, #16384 ; 0x4000 1854: 0a00001b beq 18c8 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 1858: e3530902 cmp r3, #32768 ; 0x8000 185c: 03a01005 moveq r1, #5 1860: 0a000005 beq 187c type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1864: e3530a06 cmp r3, #24576 ; 0x6000 1868: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 186c: 058d7028 streq r7, [sp, #40] ; 0x28 1870: 058d602c streq r6, [sp, #44] ; 0x2c 1874: 03a01002 moveq r1, #2 */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1878: 1a00000a bne 18a8 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 187c: e28dc028 add ip, sp, #40 ; 0x28 1880: e59d0058 ldr r0, [sp, #88] ; 0x58 1884: e1a02005 mov r2, r5 1888: e1a03004 mov r3, r4 188c: e58dc000 str ip, [sp] 1890: eb0020f8 bl 9c78 new_name, mode, &info ); if ( !new_node ) 1894: e3500000 cmp r0, #0 1898: 13a00000 movne r0, #0 189c: 0a00000b beq 18d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 18a0: e28dd040 add sp, sp, #64 ; 0x40 18a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 18a8: e3530a01 cmp r3, #4096 ; 0x1000 18ac: 03a01007 moveq r1, #7 18b0: 0afffff1 beq 187c type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 18b4: eb003796 bl f714 <__errno> <== NOT EXECUTED 18b8: e3a03016 mov r3, #22 <== NOT EXECUTED 18bc: e5803000 str r3, [r0] <== NOT EXECUTED 18c0: e3e00000 mvn r0, #0 <== NOT EXECUTED 18c4: eafffff5 b 18a0 <== NOT EXECUTED 18c8: e3a01001 mov r1, #1 18cc: eaffffea b 187c mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 18d0: eb00378f bl f714 <__errno> <== NOT EXECUTED 18d4: e3a0300c mov r3, #12 <== NOT EXECUTED 18d8: e5803000 str r3, [r0] <== NOT EXECUTED 18dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 18e0: eaffffee b 18a0 <== NOT EXECUTED =============================================================================== 000018e4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 18e4: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18e8: e593204c ldr r2, [r3, #76] ; 0x4c 18ec: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 18f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18f4: 1a000002 bne 1904 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 18f8: e583005c str r0, [r3, #92] ; 0x5c 18fc: e3a00000 mov r0, #0 return 0; } 1900: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1904: eb003782 bl f714 <__errno> <== NOT EXECUTED 1908: e3a03014 mov r3, #20 <== NOT EXECUTED 190c: e5803000 str r3, [r0] <== NOT EXECUTED 1910: e3e00000 mvn r0, #0 <== NOT EXECUTED 1914: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00003d80 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3d80: e92d4030 push {r4, r5, lr} assert( the_jnode ); 3d84: e2504000 subs r4, r0, #0 3d88: 0a000055 beq 3ee4 fprintf(stdout, "%s", the_jnode->name ); 3d8c: e59f5164 ldr r5, [pc, #356] ; 3ef8 3d90: e5953000 ldr r3, [r5] 3d94: e284000c add r0, r4, #12 3d98: e5931008 ldr r1, [r3, #8] 3d9c: eb004053 bl 13ef0 switch( the_jnode->type ) { 3da0: e594204c ldr r2, [r4, #76] ; 0x4c 3da4: e2423001 sub r3, r2, #1 3da8: e3530006 cmp r3, #6 3dac: 979ff103 ldrls pc, [pc, r3, lsl #2] 3db0: ea000011 b 3dfc <== NOT EXECUTED 3db4: 00003e20 .word 0x00003e20 <== NOT EXECUTED 3db8: 00003e3c .word 0x00003e3c <== NOT EXECUTED 3dbc: 00003e58 .word 0x00003e58 <== NOT EXECUTED 3dc0: 00003e84 .word 0x00003e84 <== NOT EXECUTED 3dc4: 00003eb0 .word 0x00003eb0 <== NOT EXECUTED 3dc8: 00003ec8 .word 0x00003ec8 <== NOT EXECUTED 3dcc: 00003dd0 .word 0x00003dd0 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 3dd0: e5953000 ldr r3, [r5] <== NOT EXECUTED 3dd4: e3a01001 mov r1, #1 <== NOT EXECUTED 3dd8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3ddc: e3a02012 mov r2, #18 <== NOT EXECUTED 3de0: e59f0114 ldr r0, [pc, #276] ; 3efc <== NOT EXECUTED 3de4: eb004356 bl 14b44 <== NOT EXECUTED assert(0); 3de8: e59f0110 ldr r0, [pc, #272] ; 3f00 <== NOT EXECUTED 3dec: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 3df0: e59f210c ldr r2, [pc, #268] ; 3f04 <== NOT EXECUTED 3df4: e59f310c ldr r3, [pc, #268] ; 3f08 <== NOT EXECUTED 3df8: eb00029b bl 486c <__assert_func> <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 3dfc: e5953000 ldr r3, [r5] <== NOT EXECUTED 3e00: e59f1104 ldr r1, [pc, #260] ; 3f0c <== NOT EXECUTED 3e04: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3e08: eb003fd7 bl 13d6c <== NOT EXECUTED assert(0); 3e0c: e59f00ec ldr r0, [pc, #236] ; 3f00 <== NOT EXECUTED 3e10: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 3e14: e59f20e8 ldr r2, [pc, #232] ; 3f04 <== NOT EXECUTED 3e18: e59f30e8 ldr r3, [pc, #232] ; 3f08 <== NOT EXECUTED 3e1c: eb000292 bl 486c <__assert_func> <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 3e20: e5953000 ldr r3, [r5] 3e24: e3a0002f mov r0, #47 ; 0x2f 3e28: e5931008 ldr r1, [r3, #8] 3e2c: eb003fea bl 13ddc default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3e30: e59f00d8 ldr r0, [pc, #216] ; 3f10 } 3e34: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3e38: ea004733 b 15b0c case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 3e3c: e5952000 ldr r2, [r5] 3e40: e5943054 ldr r3, [r4, #84] ; 0x54 3e44: e5920008 ldr r0, [r2, #8] 3e48: e59f10c4 ldr r1, [pc, #196] ; 3f14 3e4c: e5942050 ldr r2, [r4, #80] ; 0x50 3e50: eb003fc5 bl 13d6c the_jnode->info.device.major, the_jnode->info.device.minor ); break; 3e54: eafffff5 b 3e30 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 3e58: e5953000 ldr r3, [r5] <== NOT EXECUTED 3e5c: e3a01001 mov r1, #1 <== NOT EXECUTED 3e60: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3e64: e3a02013 mov r2, #19 <== NOT EXECUTED 3e68: e59f00a8 ldr r0, [pc, #168] ; 3f18 <== NOT EXECUTED 3e6c: eb004334 bl 14b44 <== NOT EXECUTED assert(0); 3e70: e59f0088 ldr r0, [pc, #136] ; 3f00 <== NOT EXECUTED 3e74: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3e78: e59f2084 ldr r2, [pc, #132] ; 3f04 <== NOT EXECUTED 3e7c: e59f3084 ldr r3, [pc, #132] ; 3f08 <== NOT EXECUTED 3e80: eb000279 bl 486c <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3e84: e5953000 ldr r3, [r5] <== NOT EXECUTED 3e88: e3a01001 mov r1, #1 <== NOT EXECUTED 3e8c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3e90: e3a02013 mov r2, #19 <== NOT EXECUTED 3e94: e59f007c ldr r0, [pc, #124] ; 3f18 <== NOT EXECUTED 3e98: eb004329 bl 14b44 <== NOT EXECUTED assert(0); 3e9c: e59f005c ldr r0, [pc, #92] ; 3f00 <== NOT EXECUTED 3ea0: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 3ea4: e59f2058 ldr r2, [pc, #88] ; 3f04 <== NOT EXECUTED 3ea8: e59f3058 ldr r3, [pc, #88] ; 3f08 <== NOT EXECUTED 3eac: eb00026e bl 486c <__assert_func> <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 3eb0: e5953000 ldr r3, [r5] 3eb4: e5942050 ldr r2, [r4, #80] ; 0x50 3eb8: e5930008 ldr r0, [r3, #8] 3ebc: e59f1058 ldr r1, [pc, #88] ; 3f1c 3ec0: eb003fa9 bl 13d6c (uint32_t)the_jnode->info.file.size ); #endif break; 3ec4: eaffffd9 b 3e30 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3ec8: e5952000 ldr r2, [r5] <== NOT EXECUTED 3ecc: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3ed0: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3ed4: e59f1044 ldr r1, [pc, #68] ; 3f20 <== NOT EXECUTED 3ed8: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 3edc: eb003fa2 bl 13d6c <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3ee0: eaffffd2 b 3e30 <== NOT EXECUTED void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 3ee4: e59f0014 ldr r0, [pc, #20] ; 3f00 <== NOT EXECUTED 3ee8: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 3eec: e59f2010 ldr r2, [pc, #16] ; 3f04 <== NOT EXECUTED 3ef0: e59f302c ldr r3, [pc, #44] ; 3f24 <== NOT EXECUTED 3ef4: eb00025c bl 486c <__assert_func> <== NOT EXECUTED =============================================================================== 00001924 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 1924: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 1928: e593004c ldr r0, [r3, #76] ; 0x4c 192c: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1930: e92d4010 push {r4, lr} IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 1934: 1a000013 bne 1988 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1938: e3520000 cmp r2, #0 193c: 0a00000f beq 1980 1940: e5930050 ldr r0, [r3, #80] ; 0x50 1944: e5d0c000 ldrb ip, [r0] 1948: e35c0000 cmp ip, #0 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 194c: 13a04000 movne r4, #0 1950: 11a00004 movne r0, r4 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1954: 0a000009 beq 1980 1958: e2800001 add r0, r0, #1 195c: e1520000 cmp r2, r0 buf[i] = node->info.sym_link.name[i]; 1960: e7c1c004 strb ip, [r1, r4] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1964: e1a04000 mov r4, r0 1968: 98bd8010 popls {r4, pc} 196c: e593c050 ldr ip, [r3, #80] ; 0x50 1970: e7dcc000 ldrb ip, [ip, r0] 1974: e35c0000 cmp ip, #0 1978: 1afffff6 bne 1958 197c: e8bd8010 pop {r4, pc} 1980: e3a00000 mov r0, #0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 1984: e8bd8010 pop {r4, pc} <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 1988: eb003761 bl f714 <__errno> <== NOT EXECUTED 198c: e3a03016 mov r3, #22 <== NOT EXECUTED 1990: e5803000 str r3, [r0] <== NOT EXECUTED 1994: e3e00000 mvn r0, #0 <== NOT EXECUTED 1998: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 0000ac20 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; ac20: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { ac24: e593204c ldr r2, [r3, #76] ; 0x4c ac28: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ac2c: e92d4030 push {r4, r5, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ac30: e3520005 cmp r2, #5 ac34: 979ff102 ldrls pc, [pc, r2, lsl #2] ac38: ea00002a b ace8 <== NOT EXECUTED ac3c: 0000acd4 .word 0x0000acd4 <== NOT EXECUTED ac40: 0000ace8 .word 0x0000ace8 <== NOT EXECUTED ac44: 0000ac54 .word 0x0000ac54 <== NOT EXECUTED ac48: 0000acfc .word 0x0000acfc <== NOT EXECUTED ac4c: 0000acfc .word 0x0000acfc <== NOT EXECUTED ac50: 0000ac54 .word 0x0000ac54 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ac54: e3a04000 mov r4, #0 <== NOT EXECUTED ac58: e3a05000 mov r5, #0 <== NOT EXECUTED ac5c: e5814020 str r4, [r1, #32] <== NOT EXECUTED ac60: e5815024 str r5, [r1, #36] ; 0x24 <== NOT EXECUTED */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ac64: e5932030 ldr r2, [r3, #48] ; 0x30 ac68: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; ac6c: e5932038 ldr r2, [r3, #56] ; 0x38 ac70: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; ac74: e5932040 ldr r2, [r3, #64] ; 0x40 ac78: e5812028 str r2, [r1, #40] ; 0x28 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ac7c: e5902010 ldr r2, [r0, #16] ac80: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ac84: e1d353b4 ldrh r5, [r3, #52] ; 0x34 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ac88: e592c000 ldr ip, [r2] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; ac8c: e59f207c ldr r2, [pc, #124] ; ad10 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ac90: e1c151b0 strh r5, [r1, #16] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; ac94: e5924000 ldr r4, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ac98: e3a02cff mov r2, #65280 ; 0xff00 ac9c: e28220fe add r2, r2, #254 ; 0xfe buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; aca0: e5930044 ldr r0, [r3, #68] ; 0x44 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = aca4: e5812000 str r2, [r1] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; aca8: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; acac: e5810030 str r0, [r1, #48] ; 0x30 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; acb0: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; acb4: e5930048 ldr r0, [r3, #72] ; 0x48 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; acb8: e1d333be ldrh r3, [r3, #62] ; 0x3e buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; acbc: e5810038 str r0, [r1, #56] ; 0x38 buf->st_blksize = imfs_rq_memfile_bytes_per_block; acc0: e5814040 str r4, [r1, #64] ; 0x40 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = acc4: e581c004 str ip, [r1, #4] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; acc8: e1c131b4 strh r3, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; accc: e3a00000 mov r0, #0 return 0; } acd0: e8bd8030 pop {r4, r5, pc} switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); acd4: e2832050 add r2, r3, #80 ; 0x50 acd8: e8921004 ldm r2, {r2, ip} acdc: e581c01c str ip, [r1, #28] ace0: e5812018 str r2, [r1, #24] break; ace4: eaffffde b ac64 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ace8: eb001289 bl f714 <__errno> <== NOT EXECUTED acec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED acf0: e5803000 str r3, [r0] <== NOT EXECUTED acf4: e3e00000 mvn r0, #0 <== NOT EXECUTED acf8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; acfc: e2835050 add r5, r3, #80 ; 0x50 ad00: e8950030 ldm r5, {r4, r5} ad04: e5814020 str r4, [r1, #32] ad08: e5815024 str r5, [r1, #36] ; 0x24 break; ad0c: eaffffd4 b ac64 =============================================================================== 00001a00 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1a00: e92d40f0 push {r4, r5, r6, r7, lr} 1a04: e1a06000 mov r6, r0 1a08: e24dd040 sub sp, sp, #64 ; 0x40 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 1a0c: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1a10: e1a07002 mov r7, r2 1a14: e1a05001 mov r5, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 1a18: eb003b42 bl 10728 1a1c: e28d4004 add r4, sp, #4 1a20: e1a01000 mov r1, r0 1a24: e1a02004 mov r2, r4 1a28: e28d303c add r3, sp, #60 ; 0x3c 1a2c: e1a00007 mov r0, r7 1a30: eb002418 bl aa98 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 1a34: e1a00005 mov r0, r5 1a38: eb003b26 bl 106d8 if (info.sym_link.name == NULL) { 1a3c: e3500000 cmp r0, #0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 1a40: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 1a44: 0a00000e beq 1a84 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 1a48: e3a03ca2 mov r3, #41472 ; 0xa200 1a4c: e28dc028 add ip, sp, #40 ; 0x28 1a50: e1a00006 mov r0, r6 1a54: e1a02004 mov r2, r4 1a58: e2433001 sub r3, r3, #1 1a5c: e3a01004 mov r1, #4 1a60: e58dc000 str ip, [sp] 1a64: eb002083 bl 9c78 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 1a68: e3500000 cmp r0, #0 1a6c: 13a00000 movne r0, #0 1a70: 0a000001 beq 1a7c free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 1a74: e28dd040 add sp, sp, #64 ; 0x40 1a78: e8bd80f0 pop {r4, r5, r6, r7, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 1a7c: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 1a80: eb000188 bl 20a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 1a84: eb003722 bl f714 <__errno> <== NOT EXECUTED 1a88: e3a0300c mov r3, #12 <== NOT EXECUTED 1a8c: e5803000 str r3, [r0] <== NOT EXECUTED 1a90: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a94: eafffff6 b 1a74 <== NOT EXECUTED =============================================================================== 00001a98 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1a98: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 1a9c: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1aa0: e595304c ldr r3, [r5, #76] ; 0x4c 1aa4: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1aa8: e24dd01c sub sp, sp, #28 1aac: e1a04001 mov r4, r1 1ab0: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1ab4: 0a000006 beq 1ad4 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 1ab8: e1a00006 mov r0, r6 1abc: e1a01004 mov r1, r4 1ac0: e5943008 ldr r3, [r4, #8] 1ac4: e1a0e00f mov lr, pc 1ac8: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 1acc: e28dd01c add sp, sp, #28 1ad0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 1ad4: e595e050 ldr lr, [r5, #80] ; 0x50 1ad8: e35e0000 cmp lr, #0 1adc: 0a00001f beq 1b60 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1ae0: e1a07001 mov r7, r1 1ae4: e8b7000f ldm r7!, {r0, r1, r2, r3} 1ae8: e1a0c00d mov ip, sp 1aec: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 1af0: e28d801c add r8, sp, #28 1af4: e528e01c str lr, [r8, #-28]! if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1af8: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1afc: e1a0000d mov r0, sp if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1b00: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1b04: eb0020ad bl 9dc0 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 1b08: e5953050 ldr r3, [r5, #80] ; 0x50 1b0c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1b10: e3520001 cmp r2, #1 1b14: 0a000008 beq 1b3c if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 1b18: e2422001 sub r2, r2, #1 1b1c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 1b20: e28d0014 add r0, sp, #20 1b24: e3a01000 mov r1, #0 1b28: eb000187 bl 214c 1b2c: e5953050 ldr r3, [r5, #80] ; 0x50 1b30: e59d2014 ldr r2, [sp, #20] 1b34: e5832048 str r2, [r3, #72] ; 0x48 1b38: eaffffde b 1ab8 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1b3c: e1a0100d mov r1, sp 1b40: e1a00006 mov r0, r6 1b44: e59d3008 ldr r3, [sp, #8] 1b48: e1a0e00f mov lr, pc 1b4c: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 1b50: e3500000 cmp r0, #0 1b54: 13e00000 mvnne r0, #0 1b58: 0affffd6 beq 1ab8 1b5c: eaffffda b 1acc */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 1b60: eb0036eb bl f714 <__errno> <== NOT EXECUTED 1b64: e3a03016 mov r3, #22 <== NOT EXECUTED 1b68: e5803000 str r3, [r0] <== NOT EXECUTED 1b6c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1b70: eaffffd5 b 1acc <== NOT EXECUTED =============================================================================== 00001b74 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1b74: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1b78: e593204c ldr r2, [r3, #76] ; 0x4c 1b7c: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1b80: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1b84: 1a000005 bne 1ba0 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1b88: e593205c ldr r2, [r3, #92] ; 0x5c 1b8c: e3520000 cmp r2, #0 1b90: 0a000007 beq 1bb4 /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 1b94: e3a00000 mov r0, #0 1b98: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1b9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1ba0: eb0036db bl f714 <__errno> <== NOT EXECUTED 1ba4: e3a03014 mov r3, #20 <== NOT EXECUTED 1ba8: e5803000 str r3, [r0] <== NOT EXECUTED 1bac: e3e00000 mvn r0, #0 <== NOT EXECUTED 1bb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1bb4: eb0036d6 bl f714 <__errno> <== NOT EXECUTED 1bb8: e3a03016 mov r3, #22 <== NOT EXECUTED 1bbc: e5803000 str r3, [r0] <== NOT EXECUTED 1bc0: e3e00000 mvn r0, #0 <== NOT EXECUTED 1bc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0000231c : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 231c: e59f30d0 ldr r3, [pc, #208] ; 23f4 2320: e5933000 ldr r3, [r3] 2324: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 2328: e92d4070 push {r4, r5, r6, lr} 232c: e1a05000 mov r5, r0 2330: e1a06001 mov r6, r1 2334: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 2338: 11a0e00f movne lr, pc 233c: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2340: ebffffe1 bl 22cc /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2344: e59f30ac ldr r3, [pc, #172] ; 23f8 2348: e5933000 ldr r3, [r3] 234c: e3530000 cmp r3, #0 2350: 0a000006 beq 2370 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2354: e1a00005 mov r0, r5 <== NOT EXECUTED 2358: e1a01004 mov r1, r4 <== NOT EXECUTED 235c: e1a0e00f mov lr, pc <== NOT EXECUTED 2360: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2364: e0856006 add r6, r5, r6 <== NOT EXECUTED 2368: e0606006 rsb r6, r0, r6 <== NOT EXECUTED 236c: e1a05000 mov r5, r0 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 2370: e59f4084 ldr r4, [pc, #132] ; 23fc 2374: e5d41000 ldrb r1, [r4] 2378: e3510000 cmp r1, #0 237c: 1a000018 bne 23e4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 2380: e59f3078 ldr r3, [pc, #120] ; 2400 2384: e5d33028 ldrb r3, [r3, #40] ; 0x28 2388: e3530000 cmp r3, #0 238c: 1a00000e bne 23cc void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 2390: e59f406c ldr r4, [pc, #108] ; 2404 2394: e1a01005 mov r1, r5 2398: e1a02006 mov r2, r6 239c: e5940000 ldr r0, [r4] 23a0: e3a03004 mov r3, #4 23a4: eb0010b3 bl 6678 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 23a8: e3500000 cmp r0, #0 23ac: 0a00000e beq 23ec rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 23b0: e59f5050 ldr r5, [pc, #80] ; 2408 23b4: e5940000 ldr r0, [r4] 23b8: e5954000 ldr r4, [r5] 23bc: eb0013bf bl 72c0 <_Protected_heap_Get_size> 23c0: e0800004 add r0, r0, r4 23c4: e5850000 str r0, [r5] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 23c8: e8bd8070 pop {r4, r5, r6, pc} if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 23cc: e1a00005 mov r0, r5 23d0: e1a02006 mov r2, r6 23d4: eb003718 bl 1003c * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 23d8: e5d43000 ldrb r3, [r4] 23dc: e3530000 cmp r3, #0 23e0: 0affffea beq 2390 23e4: e59f4018 ldr r4, [pc, #24] ; 2404 23e8: eafffff0 b 23b0 heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 23ec: e280001a add r0, r0, #26 <== NOT EXECUTED 23f0: eb000e7b bl 5de4 <== NOT EXECUTED =============================================================================== 000060f0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 60f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 60f4: e250a000 subs sl, r0, #0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 60f8: e24dd010 sub sp, sp, #16 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 60fc: 0a000031 beq 61c8 <== NOT EXECUTED return; if ( !print_handler ) 6100: e59f4110 ldr r4, [pc, #272] ; 6218 <== NOT EXECUTED 6104: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED 6108: e3570000 cmp r7, #0 <== NOT EXECUTED 610c: 0a00002d beq 61c8 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 6110: e37a0001 cmn sl, #1 <== NOT EXECUTED 6114: 0a000032 beq 61e4 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 6118: e59a80f4 ldr r8, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 611c: e28a50c4 add r5, sl, #196 ; 0xc4 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 6120: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED 6124: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 6128: e2466010 sub r6, r6, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 612c: e1a00009 mov r0, r9 <== NOT EXECUTED 6130: e1a01006 mov r1, r6 <== NOT EXECUTED 6134: ebffffd7 bl 6098 <== NOT EXECUTED if ( high_water_mark ) 6138: e250b000 subs fp, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 613c: 10899006 addne r9, r9, r6 <== NOT EXECUTED 6140: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 6144: e35a0000 cmp sl, #0 <== NOT EXECUTED 6148: 0a00002c beq 6200 <== NOT EXECUTED (*print_handler)( 614c: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 6150: e28d2008 add r2, sp, #8 <== NOT EXECUTED 6154: e3a01005 mov r1, #5 <== NOT EXECUTED 6158: e1a0000a mov r0, sl <== NOT EXECUTED 615c: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED 6160: eb001821 bl c1ec <== NOT EXECUTED 6164: e1a0200a mov r2, sl <== NOT EXECUTED 6168: e1a03000 mov r3, r0 <== NOT EXECUTED 616c: e59f10a8 ldr r1, [pc, #168] ; 621c <== NOT EXECUTED 6170: e1a00009 mov r0, r9 <== NOT EXECUTED 6174: e1a0e00f mov lr, pc <== NOT EXECUTED 6178: e12fff17 bx r7 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 617c: e5953000 ldr r3, [r5] <== NOT EXECUTED 6180: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 6184: e2433001 sub r3, r3, #1 <== NOT EXECUTED 6188: e0823003 add r3, r2, r3 <== NOT EXECUTED 618c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 6190: e58d8000 str r8, [sp] <== NOT EXECUTED 6194: e58d6004 str r6, [sp, #4] <== NOT EXECUTED 6198: e59f1080 ldr r1, [pc, #128] ; 6220 <== NOT EXECUTED 619c: e1a0e00f mov lr, pc <== NOT EXECUTED 61a0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 61a4: e5943000 ldr r3, [r4] <== NOT EXECUTED 61a8: e3530000 cmp r3, #0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 61ac: e59f3064 ldr r3, [pc, #100] ; 6218 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 61b0: 0a000006 beq 61d0 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 61b4: e1a0200b mov r2, fp <== NOT EXECUTED 61b8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 61bc: e59f1060 ldr r1, [pc, #96] ; 6224 <== NOT EXECUTED 61c0: e1a0e00f mov lr, pc <== NOT EXECUTED 61c4: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED } } 61c8: e28dd010 add sp, sp, #16 <== NOT EXECUTED 61cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 61d0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 61d4: e59f104c ldr r1, [pc, #76] ; 6228 <== NOT EXECUTED 61d8: e1a0e00f mov lr, pc <== NOT EXECUTED 61dc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 61e0: eafffff8 b 61c8 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 61e4: e59f5040 ldr r5, [pc, #64] ; 622c <== NOT EXECUTED 61e8: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 61ec: e3530000 cmp r3, #0 <== NOT EXECUTED 61f0: 13a08000 movne r8, #0 <== NOT EXECUTED 61f4: 11a0a008 movne sl, r8 <== NOT EXECUTED 61f8: 1affffc8 bne 6120 <== NOT EXECUTED 61fc: eafffff1 b 61c8 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 6200: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 6204: e59f1024 ldr r1, [pc, #36] ; 6230 <== NOT EXECUTED 6208: e3e02000 mvn r2, #0 <== NOT EXECUTED 620c: e1a0e00f mov lr, pc <== NOT EXECUTED 6210: e12fff17 bx r7 <== NOT EXECUTED 6214: eaffffd8 b 617c <== NOT EXECUTED =============================================================================== 00006098 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 6098: e2803010 add r3, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 609c: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 60a0: e0831001 add r1, r3, r1 <== NOT EXECUTED 60a4: e1530001 cmp r3, r1 <== NOT EXECUTED 60a8: 2a00000c bcs 60e0 <== NOT EXECUTED if (*base != U32_PATTERN) 60ac: e3a02ca6 mov r2, #42496 ; 0xa600 <== NOT EXECUTED 60b0: e242205b sub r2, r2, #91 ; 0x5b <== NOT EXECUTED 60b4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 60b8: e1822802 orr r2, r2, r2, lsl #16 <== NOT EXECUTED 60bc: e1500002 cmp r0, r2 <== NOT EXECUTED 60c0: 0a000003 beq 60d4 <== NOT EXECUTED 60c4: ea000007 b 60e8 <== NOT EXECUTED 60c8: e5932000 ldr r2, [r3] <== NOT EXECUTED 60cc: e1520000 cmp r2, r0 <== NOT EXECUTED 60d0: 1a000004 bne 60e8 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 60d4: e2833004 add r3, r3, #4 <== NOT EXECUTED 60d8: e1510003 cmp r1, r3 <== NOT EXECUTED 60dc: 8afffff9 bhi 60c8 <== NOT EXECUTED 60e0: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 60e4: e12fff1e bx lr <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 60e8: e1a00003 mov r0, r3 <== NOT EXECUTED 60ec: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00043b98 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 43b98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 43b9c: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 43ba0: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED 43ba4: e58d1020 str r1, [sp, #32] <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 43ba8: e5c26000 strb r6, [r2] <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 43bac: e28d1024 add r1, sp, #36 ; 0x24 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 43bb0: e58d201c str r2, [sp, #28] <== NOT EXECUTED 43bb4: e1a04003 mov r4, r3 <== NOT EXECUTED 43bb8: e58d0014 str r0, [sp, #20] <== NOT EXECUTED *found = false; /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 43bbc: ebfffeec bl 43774 <== NOT EXECUTED if (rc > 0) 43bc0: e3500000 cmp r0, #0 <== NOT EXECUTED 43bc4: da000001 ble 43bd0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 43bc8: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED 43bcc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 43bd0: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED 43bd4: e5910000 ldr r0, [r1] <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) 43bd8: e0905584 adds r5, r0, r4, lsl #11 <== NOT EXECUTED 43bdc: 41a05006 movmi r5, r6 <== NOT EXECUTED 43be0: 4a000003 bmi 43bf4 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 43be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 43be8: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 43bec: e1550003 cmp r5, r3 <== NOT EXECUTED end_bit = control->size - 1; 43bf0: 22435001 subcs r5, r3, #1 <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 43bf4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED 43bf8: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 43bfc: e1a02540 asr r2, r0, #10 <== NOT EXECUTED 43c00: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED map_bits = &map[map_index]; 43c04: e59d9024 ldr r9, [sp, #36] ; 0x24 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 43c08: e1a01104 lsl r1, r4, #2 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43c0c: e1a02fa4 lsr r2, r4, #31 <== NOT EXECUTED if (end_bit < 0) end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); 43c10: e1a0a2c0 asr sl, r0, #5 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 43c14: e58d1010 str r1, [sp, #16] <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43c18: e58d200c str r2, [sp, #12] <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 43c1c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED map_bits = &map[map_index]; 43c20: e089910a add r9, r9, sl, lsl #2 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); 43c24: e200301f and r3, r0, #31 <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 43c28: e20a801f and r8, sl, #31 <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 43c2c: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 43c30: e59cc000 ldr ip, [ip] <== NOT EXECUTED 43c34: e35c0000 cmp ip, #0 <== NOT EXECUTED 43c38: e58dc000 str ip, [sp] <== NOT EXECUTED 43c3c: 0a00003a beq 43d2c <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 43c40: e1a01284 lsl r1, r4, #5 <== NOT EXECUTED 43c44: e08ab004 add fp, sl, r4 <== NOT EXECUTED 43c48: e58d1018 str r1, [sp, #24] <== NOT EXECUTED 43c4c: e1a0b28b lsl fp, fp, #5 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 43c50: e3a06001 mov r6, #1 <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 43c54: e358001f cmp r8, #31 <== NOT EXECUTED 43c58: 8a00003f bhi 43d5c <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 43c5c: e1a02816 lsl r2, r6, r8 <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 43c60: e59dc000 ldr ip, [sp] <== NOT EXECUTED 43c64: e112000c tst r2, ip <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 43c68: e58d2004 str r2, [sp, #4] <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 43c6c: 0a000013 beq 43cc0 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 43c70: e1a01316 lsl r1, r6, r3 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 43c74: e5997000 ldr r7, [r9] <== NOT EXECUTED 43c78: e1110007 tst r1, r7 <== NOT EXECUTED 43c7c: 1a00004a bne 43dac <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 43c80: e1550000 cmp r5, r0 <== NOT EXECUTED 43c84: 10833004 addne r3, r3, r4 <== NOT EXECUTED 43c88: 10802004 addne r2, r0, r4 <== NOT EXECUTED 43c8c: 1a000009 bne 43cb8 <== NOT EXECUTED 43c90: ea00000a b 43cc0 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 43c94: e1a01316 lsl r1, r6, r3 <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 43c98: e1a00002 mov r0, r2 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 43c9c: e1110007 tst r1, r7 <== NOT EXECUTED *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 43ca0: e0822004 add r2, r2, r4 <== NOT EXECUTED 43ca4: e0833004 add r3, r3, r4 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 43ca8: e064c002 rsb ip, r4, r2 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 43cac: 1a00003e bne 43dac <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 43cb0: e155000c cmp r5, ip <== NOT EXECUTED 43cb4: 0a000001 beq 43cc0 <== NOT EXECUTED { /* * Find the clear bit in the map. Update the search map and map if * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) 43cb8: e353001f cmp r3, #31 <== NOT EXECUTED 43cbc: 9afffff4 bls 43c94 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 43cc0: e3540000 cmp r4, #0 <== NOT EXECUTED 43cc4: d3a0001f movle r0, #31 <== NOT EXECUTED 43cc8: c3a00000 movgt r0, #0 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43ccc: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 43cd0: d1a03000 movle r3, r0 <== NOT EXECUTED 43cd4: c1a03000 movgt r3, r0 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 43cd8: e08b0000 add r0, fp, r0 <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43cdc: e1550000 cmp r5, r0 <== NOT EXECUTED 43ce0: b3a02000 movlt r2, #0 <== NOT EXECUTED 43ce4: a2022001 andge r2, r2, #1 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 43ce8: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43cec: e3520000 cmp r2, #0 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 43cf0: e0899001 add r9, r9, r1 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 43cf4: e084a00a add sl, r4, sl <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 43cf8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 43cfc: 1a00004c bne 43e34 <== NOT EXECUTED 43d00: e1550000 cmp r5, r0 <== NOT EXECUTED 43d04: c3a01000 movgt r1, #0 <== NOT EXECUTED 43d08: d3a01001 movle r1, #1 <== NOT EXECUTED 43d0c: e3540000 cmp r4, #0 <== NOT EXECUTED 43d10: d3a01000 movle r1, #0 <== NOT EXECUTED 43d14: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED 43d18: e3510000 cmp r1, #0 <== NOT EXECUTED 43d1c: e08bb00c add fp, fp, ip <== NOT EXECUTED 43d20: 1a000037 bne 43e04 <== NOT EXECUTED 43d24: e0848008 add r8, r4, r8 <== NOT EXECUTED 43d28: eaffffc9 b 43c54 <== NOT EXECUTED * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) 43d2c: e3540000 cmp r4, #0 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 43d30: d1e03288 mvnle r3, r8, lsl #5 <== NOT EXECUTED */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 43d34: c2688020 rsbgt r8, r8, #32 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); map_offset = 0; } else { bits_skipped = search_offset + 1; 43d38: d2888001 addle r8, r8, #1 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 43d3c: e0020894 mul r2, r4, r8 <== NOT EXECUTED * * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); 43d40: e3c0001f bic r0, r0, #31 <== NOT EXECUTED if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 43d44: c59d3000 ldrgt r3, [sp] <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 43d48: d0830000 addle r0, r3, r0 <== NOT EXECUTED rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 43d4c: c0800288 addgt r0, r0, r8, lsl #5 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 43d50: d3a0301f movle r3, #31 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; 43d54: e08aa002 add sl, sl, r2 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 43d58: e0899102 add r9, r9, r2, lsl #2 <== NOT EXECUTED map_index += direction * bits_skipped; } search_bits += direction; 43d5c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 43d60: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 43d64: e3540000 cmp r4, #0 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 43d68: e0811002 add r1, r1, r2 <== NOT EXECUTED 43d6c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 43d70: da000029 ble 43e1c <== NOT EXECUTED 43d74: e1550000 cmp r5, r0 <== NOT EXECUTED 43d78: c3a01000 movgt r1, #0 <== NOT EXECUTED 43d7c: d3a01001 movle r1, #1 <== NOT EXECUTED 43d80: e3a02000 mov r2, #0 <== NOT EXECUTED 43d84: e3a08000 mov r8, #0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 43d88: e1110002 tst r1, r2 <== NOT EXECUTED 43d8c: 1affffa6 bne 43c2c <== NOT EXECUTED 43d90: e1550000 cmp r5, r0 <== NOT EXECUTED 43d94: a3540000 cmpge r4, #0 <== NOT EXECUTED 43d98: d3a02000 movle r2, #0 <== NOT EXECUTED 43d9c: c3a02001 movgt r2, #1 <== NOT EXECUTED 43da0: caffffa1 bgt 43c2c <== NOT EXECUTED 43da4: e1a00002 mov r0, r2 <== NOT EXECUTED 43da8: eaffff86 b 43bc8 <== NOT EXECUTED */ static rtems_rfs_bitmap_element rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_element bits) { return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 43dac: e1c71001 bic r1, r7, r1 <== NOT EXECUTED && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, 43db0: e3510000 cmp r1, #0 <== NOT EXECUTED while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); 43db4: e5891000 str r1, [r9] <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 43db8: 059d1008 ldreq r1, [sp, #8] <== NOT EXECUTED 43dbc: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 43dc0: 05913000 ldreq r3, [r1] <== NOT EXECUTED 43dc4: 01c33002 biceq r3, r3, r2 <== NOT EXECUTED 43dc8: 05813000 streq r3, [r1] <== NOT EXECUTED 1 << search_offset); control->free--; 43dcc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 43dd0: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED 43dd4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED 43dd8: e2411001 sub r1, r1, #1 <== NOT EXECUTED 43ddc: e58c1010 str r1, [ip, #16] <== NOT EXECUTED *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 43de0: e5932000 ldr r2, [r3] <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; 43de4: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED *found = true; 43de8: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED 43dec: e3a03001 mov r3, #1 <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; 43df0: e5810000 str r0, [r1] <== NOT EXECUTED *found = true; 43df4: e5cc3000 strb r3, [ip] <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 43df8: e3a00000 mov r0, #0 <== NOT EXECUTED 43dfc: e5c23000 strb r3, [r2] <== NOT EXECUTED 43e00: eaffff70 b 43bc8 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 43e04: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 43e08: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 43e0c: e08cc001 add ip, ip, r1 <== NOT EXECUTED 43e10: e58dc008 str ip, [sp, #8] <== NOT EXECUTED 43e14: e3a01001 mov r1, #1 <== NOT EXECUTED 43e18: eaffffd9 b 43d84 <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 43e1c: e1550000 cmp r5, r0 <== NOT EXECUTED 43e20: c3a01000 movgt r1, #0 <== NOT EXECUTED 43e24: d3a01001 movle r1, #1 <== NOT EXECUTED 43e28: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 43e2c: e3a0801f mov r8, #31 <== NOT EXECUTED 43e30: eaffffd4 b 43d88 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 43e34: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 43e38: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 43e3c: e08cc001 add ip, ip, r1 <== NOT EXECUTED 43e40: e58dc008 str ip, [sp, #8] <== NOT EXECUTED 43e44: e1550000 cmp r5, r0 <== NOT EXECUTED 43e48: c3a01000 movgt r1, #0 <== NOT EXECUTED 43e4c: d3a01001 movle r1, #1 <== NOT EXECUTED 43e50: e3a02001 mov r2, #1 <== NOT EXECUTED 43e54: e3a0801f mov r8, #31 <== NOT EXECUTED 43e58: eaffffca b 43d88 <== NOT EXECUTED =============================================================================== 00000454 <_Barrier_Manager_initialization>: #include #include void _Barrier_Manager_initialization(void) { } 454: e12fff1e bx lr =============================================================================== 00000458 <_Dual_ported_memory_Manager_initialization>: #include #include void _Dual_ported_memory_Manager_initialization(void) { } 458: e12fff1e bx lr =============================================================================== 0000045c <_Event_Manager_initialization>: #include #include void _Event_Manager_initialization(void) { } 45c: e12fff1e bx lr =============================================================================== 00000478 <_Extension_Manager_initialization>: #include #include void _Extension_Manager_initialization(void) { } 478: e12fff1e bx lr =============================================================================== 0000c4e8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { c4e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} c4ec: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; c4f0: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { c4f4: e24dd01c sub sp, sp, #28 c4f8: e1a05001 mov r5, r1 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { c4fc: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { c500: e1a07000 mov r7, r0 - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { c504: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { c508: e1a0b003 mov fp, r3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; c50c: e590a008 ldr sl, [r0, #8] Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; c510: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { c514: 2a000076 bcs c6f4 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { c518: e3530000 cmp r3, #0 c51c: 1a000072 bne c6ec <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { c520: e157000a cmp r7, sl c524: 03a06000 moveq r6, #0 c528: 0a000074 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; c52c: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; c530: e2651004 rsb r1, r5, #4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; c534: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { c538: e3a06000 mov r6, #0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; c53c: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; c540: e58d1014 str r1, [sp, #20] c544: ea000004 b c55c <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { c548: e3540000 cmp r4, #0 c54c: 1a000059 bne c6b8 <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next; c550: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { c554: e157000a cmp r7, sl c558: 0a000068 beq c700 <_Heap_Allocate_aligned_with_boundary+0x218> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { c55c: e59a9004 ldr r9, [sl, #4] c560: e59d2000 ldr r2, [sp] c564: e1520009 cmp r2, r9 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; c568: e2866001 add r6, r6, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { c56c: 2afffff7 bcs c550 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { c570: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; c574: 028a4008 addeq r4, sl, #8 c578: 0afffff2 beq c548 <_Heap_Allocate_aligned_with_boundary+0x60> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; c57c: e59d1014 ldr r1, [sp, #20] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; c580: e3c99001 bic r9, r9, #1 c584: e08a9009 add r9, sl, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; c588: e5973014 ldr r3, [r7, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; c58c: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; c590: e0814009 add r4, r1, r9 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; c594: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); c598: e1a00004 mov r0, r4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; c59c: e0633002 rsb r3, r3, r2 c5a0: e1a01008 mov r1, r8 c5a4: e0839009 add r9, r3, r9 c5a8: eb003227 bl 18e4c <__umodsi3> c5ac: e0604004 rsb r4, r0, r4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; c5b0: e28a3008 add r3, sl, #8 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { c5b4: e1590004 cmp r9, r4 c5b8: e58d3008 str r3, [sp, #8] c5bc: 2a000003 bcs c5d0 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); c5c0: e1a00009 mov r0, r9 c5c4: e1a01008 mov r1, r8 c5c8: eb00321f bl 18e4c <__umodsi3> c5cc: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { c5d0: e35b0000 cmp fp, #0 c5d4: 0a000025 beq c670 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; c5d8: e0849005 add r9, r4, r5 c5dc: e1a00009 mov r0, r9 c5e0: e1a0100b mov r1, fp c5e4: eb003218 bl 18e4c <__umodsi3> c5e8: e0600009 rsb r0, r0, r9 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { c5ec: e1590000 cmp r9, r0 c5f0: 93a03000 movls r3, #0 c5f4: 83a03001 movhi r3, #1 c5f8: e1540000 cmp r4, r0 c5fc: 23a03000 movcs r3, #0 c600: e3530000 cmp r3, #0 c604: 0a000019 beq c670 <_Heap_Allocate_aligned_with_boundary+0x188> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; c608: e59d1008 ldr r1, [sp, #8] c60c: e0819005 add r9, r1, r5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { c610: e1590000 cmp r9, r0 c614: 958d6018 strls r6, [sp, #24] c618: 9a000002 bls c628 <_Heap_Allocate_aligned_with_boundary+0x140> c61c: eaffffcb b c550 <_Heap_Allocate_aligned_with_boundary+0x68> c620: e1590000 cmp r9, r0 c624: 8a000037 bhi c708 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; c628: e0654000 rsb r4, r5, r0 c62c: e1a01008 mov r1, r8 c630: e1a00004 mov r0, r4 c634: eb003204 bl 18e4c <__umodsi3> c638: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; c63c: e0846005 add r6, r4, r5 c640: e1a00006 mov r0, r6 c644: e1a0100b mov r1, fp c648: eb0031ff bl 18e4c <__umodsi3> c64c: e0600006 rsb r0, r0, r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { c650: e1560000 cmp r6, r0 c654: 93a03000 movls r3, #0 c658: 83a03001 movhi r3, #1 c65c: e1540000 cmp r4, r0 c660: 23a03000 movcs r3, #0 c664: e3530000 cmp r3, #0 c668: 1affffec bne c620 <_Heap_Allocate_aligned_with_boundary+0x138> c66c: e59d6018 ldr r6, [sp, #24] boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { c670: e59d2008 ldr r2, [sp, #8] c674: e1520004 cmp r2, r4 c678: 8affffb4 bhi c550 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; c67c: e59d100c ldr r1, [sp, #12] c680: e1a00004 mov r0, r4 c684: eb0031f0 bl 18e4c <__umodsi3> c688: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 c68c: e28998ff add r9, r9, #16711680 ; 0xff0000 c690: e2899cff add r9, r9, #65280 ; 0xff00 c694: e28990f8 add r9, r9, #248 ; 0xf8 c698: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { c69c: e59d1004 ldr r1, [sp, #4] c6a0: e0603009 rsb r3, r0, r9 c6a4: e1590000 cmp r9, r0 c6a8: 11510003 cmpne r1, r3 c6ac: 8affffa7 bhi c550 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { c6b0: e3540000 cmp r4, #0 c6b4: 0affffa5 beq c550 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; c6b8: e597304c ldr r3, [r7, #76] ; 0x4c c6bc: e0833006 add r3, r3, r6 c6c0: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); c6c4: e1a0100a mov r1, sl c6c8: e1a03005 mov r3, r5 c6cc: e1a00007 mov r0, r7 c6d0: e1a02004 mov r2, r4 c6d4: ebffe87f bl 68d8 <_Heap_Block_allocate> c6d8: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; c6dc: e5973044 ldr r3, [r7, #68] ; 0x44 c6e0: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; c6e4: 35876044 strcc r6, [r7, #68] ; 0x44 c6e8: ea000002 b c6f8 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { c6ec: e1550003 cmp r5, r3 c6f0: 9a000006 bls c710 <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; c6f4: e3a00000 mov r0, #0 } return (void *) alloc_begin; } c6f8: e28dd01c add sp, sp, #28 c6fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { c700: e3a00000 mov r0, #0 c704: eafffff4 b c6dc <_Heap_Allocate_aligned_with_boundary+0x1f4> c708: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED c70c: eaffff8f b c550 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { c710: e3580000 cmp r8, #0 c714: 01a08002 moveq r8, r2 c718: eaffff80 b c520 <_Heap_Allocate_aligned_with_boundary+0x38> =============================================================================== 00007688 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7688: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 768c: e59f35dc ldr r3, [pc, #1500] ; 7c70 <_Heap_Walk+0x5e8> uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 7690: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 7694: e5933000 ldr r3, [r3] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 7698: e59f25d4 ldr r2, [pc, #1492] ; 7c74 <_Heap_Walk+0x5ec> 769c: e59fa5d4 ldr sl, [pc, #1492] ; 7c78 <_Heap_Walk+0x5f0> 76a0: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 76a4: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 76a8: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 76ac: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 76b0: e24dd03c sub sp, sp, #60 ; 0x3c 76b4: e1a04000 mov r4, r0 76b8: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 76bc: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 76c0: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 76c4: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 76c8: e5905020 ldr r5, [r0, #32] Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 76cc: 0a000002 beq 76dc <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 76d0: e3a00001 mov r0, #1 block = next_block; } return true; } 76d4: e28dd03c add sp, sp, #60 ; 0x3c 76d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 76dc: e5900018 ldr r0, [r0, #24] 76e0: e594101c ldr r1, [r4, #28] 76e4: e2842008 add r2, r4, #8 76e8: e892000c ldm r2, {r2, r3} 76ec: e59dc024 ldr ip, [sp, #36] ; 0x24 76f0: e98d0003 stmib sp, {r0, r1} 76f4: e58d2014 str r2, [sp, #20] 76f8: e58d3018 str r3, [sp, #24] 76fc: e59f2578 ldr r2, [pc, #1400] ; 7c7c <_Heap_Walk+0x5f4> 7700: e58db000 str fp, [sp] 7704: e58d500c str r5, [sp, #12] 7708: e58dc010 str ip, [sp, #16] 770c: e1a00008 mov r0, r8 7710: e3a01000 mov r1, #0 7714: e59d3020 ldr r3, [sp, #32] 7718: e1a0e00f mov lr, pc 771c: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 7720: e59d2020 ldr r2, [sp, #32] 7724: e3520000 cmp r2, #0 7728: 0a000032 beq 77f8 <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 772c: e59d3020 ldr r3, [sp, #32] 7730: e2139003 ands r9, r3, #3 7734: 1a000036 bne 7814 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 7738: e1a0000b mov r0, fp 773c: e59d1020 ldr r1, [sp, #32] 7740: ebffe534 bl c18 <__umodsi3> 7744: e2506000 subs r6, r0, #0 7748: 1a000038 bne 7830 <_Heap_Walk+0x1a8> ); return false; } if ( 774c: e2850008 add r0, r5, #8 7750: e59d1020 ldr r1, [sp, #32] 7754: ebffe52f bl c18 <__umodsi3> 7758: e2509000 subs r9, r0, #0 775c: 1a00003b bne 7850 <_Heap_Walk+0x1c8> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7760: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 7764: e2176001 ands r6, r7, #1 7768: 0a000040 beq 7870 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 776c: e5953000 ldr r3, [r5] 7770: e59dc020 ldr ip, [sp, #32] 7774: e15c0003 cmp ip, r3 7778: 1a000016 bne 77d8 <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 777c: e59d2024 ldr r2, [sp, #36] ; 0x24 7780: e5923004 ldr r3, [r2, #4] 7784: e3c33001 bic r3, r3, #1 7788: e0823003 add r3, r2, r3 778c: e5939004 ldr r9, [r3, #4] 7790: e2199001 ands r9, r9, #1 7794: 0a000114 beq 7bec <_Heap_Walk+0x564> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7798: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 779c: e5943010 ldr r3, [r4, #16] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 77a0: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 77a4: e58d3028 str r3, [sp, #40] ; 0x28 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 77a8: 0a00006e beq 7968 <_Heap_Walk+0x2e0> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 77ac: e5942020 ldr r2, [r4, #32] RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 77b0: e1520009 cmp r2, r9 77b4: 9a000034 bls 788c <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 77b8: e1a00008 mov r0, r8 77bc: e1a03009 mov r3, r9 77c0: e3a01001 mov r1, #1 77c4: e59f24b4 ldr r2, [pc, #1204] ; 7c80 <_Heap_Walk+0x5f8> 77c8: e1a0e00f mov lr, pc 77cc: e12fff1a bx sl 77d0: e3a00000 mov r0, #0 77d4: eaffffbe b 76d4 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 77d8: e1a00008 mov r0, r8 77dc: e58dc000 str ip, [sp] 77e0: e3a01001 mov r1, #1 77e4: e59f2498 ldr r2, [pc, #1176] ; 7c84 <_Heap_Walk+0x5fc> 77e8: e1a0e00f mov lr, pc 77ec: e12fff1a bx sl 77f0: e1a00009 mov r0, r9 77f4: eaffffb6 b 76d4 <_Heap_Walk+0x4c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 77f8: e1a00008 mov r0, r8 77fc: e3a01001 mov r1, #1 7800: e59f2480 ldr r2, [pc, #1152] ; 7c88 <_Heap_Walk+0x600> 7804: e1a0e00f mov lr, pc 7808: e12fff1a bx sl 780c: e59d0020 ldr r0, [sp, #32] 7810: eaffffaf b 76d4 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 7814: e1a00008 mov r0, r8 7818: e3a01001 mov r1, #1 781c: e59f2468 ldr r2, [pc, #1128] ; 7c8c <_Heap_Walk+0x604> 7820: e1a0e00f mov lr, pc 7824: e12fff1a bx sl 7828: e3a00000 mov r0, #0 782c: eaffffa8 b 76d4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 7830: e1a00008 mov r0, r8 7834: e1a0300b mov r3, fp 7838: e3a01001 mov r1, #1 783c: e59f244c ldr r2, [pc, #1100] ; 7c90 <_Heap_Walk+0x608> 7840: e1a0e00f mov lr, pc 7844: e12fff1a bx sl 7848: e1a00009 mov r0, r9 784c: eaffffa0 b 76d4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 7850: e1a00008 mov r0, r8 7854: e1a03005 mov r3, r5 7858: e3a01001 mov r1, #1 785c: e59f2430 ldr r2, [pc, #1072] ; 7c94 <_Heap_Walk+0x60c> 7860: e1a0e00f mov lr, pc 7864: e12fff1a bx sl 7868: e1a00006 mov r0, r6 786c: eaffff98 b 76d4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7870: e1a00008 mov r0, r8 7874: e3a01001 mov r1, #1 7878: e59f2418 ldr r2, [pc, #1048] ; 7c98 <_Heap_Walk+0x610> 787c: e1a0e00f mov lr, pc 7880: e12fff1a bx sl 7884: e1a00006 mov r0, r6 7888: eaffff91 b 76d4 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 788c: e594c024 ldr ip, [r4, #36] ; 0x24 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7890: e159000c cmp r9, ip && (uintptr_t) block <= (uintptr_t) heap->last_block; 7894: e58dc02c str ip, [sp, #44] ; 0x2c RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 7898: 8affffc6 bhi 77b8 <_Heap_Walk+0x130> ); return false; } if ( 789c: e2890008 add r0, r9, #8 78a0: e1a01003 mov r1, r3 78a4: e58d201c str r2, [sp, #28] 78a8: ebffe4da bl c18 <__umodsi3> 78ac: e3500000 cmp r0, #0 78b0: e59d201c ldr r2, [sp, #28] 78b4: 1a0000d3 bne 7c08 <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 78b8: e5993004 ldr r3, [r9, #4] 78bc: e3c33001 bic r3, r3, #1 78c0: e0893003 add r3, r9, r3 78c4: e5933004 ldr r3, [r3, #4] 78c8: e3130001 tst r3, #1 78cc: 1a0000df bne 7c50 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 78d0: e599c00c ldr ip, [r9, #12] 78d4: e15c0004 cmp ip, r4 78d8: 1a0000d3 bne 7c2c <_Heap_Walk+0x5a4> 78dc: e58d7030 str r7, [sp, #48] ; 0x30 78e0: e58db034 str fp, [sp, #52] ; 0x34 78e4: e59d702c ldr r7, [sp, #44] ; 0x2c 78e8: e59db028 ldr fp, [sp, #40] ; 0x28 78ec: e58d502c str r5, [sp, #44] ; 0x2c 78f0: e58d6038 str r6, [sp, #56] ; 0x38 78f4: e1a0500c mov r5, ip 78f8: e58d4028 str r4, [sp, #40] ; 0x28 78fc: e1a06002 mov r6, r2 7900: ea000011 b 794c <_Heap_Walk+0x2c4> 7904: e1560009 cmp r6, r9 7908: 8affffaa bhi 77b8 <_Heap_Walk+0x130> 790c: e1590007 cmp r9, r7 ); return false; } if ( 7910: e2890008 add r0, r9, #8 7914: e1a0100b mov r1, fp 7918: 8affffa6 bhi 77b8 <_Heap_Walk+0x130> 791c: ebffe4bd bl c18 <__umodsi3> 7920: e3500000 cmp r0, #0 7924: 1a0000b7 bne 7c08 <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 7928: e5993004 ldr r3, [r9, #4] 792c: e3c33001 bic r3, r3, #1 7930: e0833009 add r3, r3, r9 7934: e5933004 ldr r3, [r3, #4] 7938: e3130001 tst r3, #1 793c: 1a0000c3 bne 7c50 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 7940: e599200c ldr r2, [r9, #12] 7944: e1540002 cmp r4, r2 7948: 1a0000b6 bne 7c28 <_Heap_Walk+0x5a0> (*printer)( 794c: e1a04009 mov r4, r9 return false; } prev_block = free_block; free_block = free_block->next; 7950: e5999008 ldr r9, [r9, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7954: e1550009 cmp r5, r9 7958: 1affffe9 bne 7904 <_Heap_Walk+0x27c> 795c: e28d4028 add r4, sp, #40 ; 0x28 7960: e89408b0 ldm r4, {r4, r5, r7, fp} 7964: e59d6038 ldr r6, [sp, #56] ; 0x38 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7968: e59d3024 ldr r3, [sp, #36] ; 0x24 796c: e1530005 cmp r3, r5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7970: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7974: 0affff55 beq 76d0 <_Heap_Walk+0x48> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7978: e3c77001 bic r7, r7, #1 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 797c: e21610ff ands r1, r6, #255 ; 0xff RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7980: e0876005 add r6, r7, r5 7984: 0a000012 beq 79d4 <_Heap_Walk+0x34c> (*printer)( 7988: e1a03005 mov r3, r5 798c: e58d7000 str r7, [sp] 7990: e1a00008 mov r0, r8 7994: e3a01000 mov r1, #0 7998: e59f22fc ldr r2, [pc, #764] ; 7c9c <_Heap_Walk+0x614> 799c: e1a0e00f mov lr, pc 79a0: e12fff1a bx sl RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 79a4: e5943020 ldr r3, [r4, #32] 79a8: e1530006 cmp r3, r6 79ac: 9a000013 bls 7a00 <_Heap_Walk+0x378> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 79b0: e1a00008 mov r0, r8 79b4: e58d6000 str r6, [sp] 79b8: e1a03005 mov r3, r5 79bc: e3a01001 mov r1, #1 79c0: e59f22d8 ldr r2, [pc, #728] ; 7ca0 <_Heap_Walk+0x618> 79c4: e1a0e00f mov lr, pc 79c8: e12fff1a bx sl 79cc: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 79d0: eaffff3f b 76d4 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 79d4: e58d7000 str r7, [sp] 79d8: e5953000 ldr r3, [r5] 79dc: e1a00008 mov r0, r8 79e0: e58d3004 str r3, [sp, #4] 79e4: e59f22b8 ldr r2, [pc, #696] ; 7ca4 <_Heap_Walk+0x61c> 79e8: e1a03005 mov r3, r5 79ec: e1a0e00f mov lr, pc 79f0: e12fff1a bx sl 79f4: e5943020 ldr r3, [r4, #32] 79f8: e1530006 cmp r3, r6 79fc: 8affffeb bhi 79b0 <_Heap_Walk+0x328> 7a00: e5943024 ldr r3, [r4, #36] ; 0x24 7a04: e1530006 cmp r3, r6 7a08: 3affffe8 bcc 79b0 <_Heap_Walk+0x328> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 7a0c: e1a00007 mov r0, r7 7a10: e59d1020 ldr r1, [sp, #32] 7a14: ebffe47f bl c18 <__umodsi3> 7a18: e2509000 subs r9, r0, #0 7a1c: 1a000055 bne 7b78 <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 7a20: e59d2028 ldr r2, [sp, #40] ; 0x28 7a24: e1520007 cmp r2, r7 7a28: 8a00005b bhi 7b9c <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin ) { 7a2c: e1550006 cmp r5, r6 7a30: 2a000064 bcs 7bc8 <_Heap_Walk+0x540> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 7a34: e5963004 ldr r3, [r6, #4] 7a38: e3130001 tst r3, #1 7a3c: 1a000036 bne 7b1c <_Heap_Walk+0x494> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7a40: e595b004 ldr fp, [r5, #4] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7a44: e595200c ldr r2, [r5, #12] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7a48: e5943008 ldr r3, [r4, #8] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7a4c: e3cb7001 bic r7, fp, #1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7a50: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 7a54: e594100c ldr r1, [r4, #12] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7a58: e0859007 add r9, r5, r7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 7a5c: 059f0244 ldreq r0, [pc, #580] ; 7ca8 <_Heap_Walk+0x620> 7a60: 0a000003 beq 7a74 <_Heap_Walk+0x3ec> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 7a64: e59f3240 ldr r3, [pc, #576] ; 7cac <_Heap_Walk+0x624> 7a68: e1520004 cmp r2, r4 7a6c: e59f023c ldr r0, [pc, #572] ; 7cb0 <_Heap_Walk+0x628> 7a70: 11a00003 movne r0, r3 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7a74: e5953008 ldr r3, [r5, #8] 7a78: e1510003 cmp r1, r3 7a7c: 059f1230 ldreq r1, [pc, #560] ; 7cb4 <_Heap_Walk+0x62c> 7a80: 0a000003 beq 7a94 <_Heap_Walk+0x40c> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 7a84: e59fc220 ldr ip, [pc, #544] ; 7cac <_Heap_Walk+0x624> 7a88: e1530004 cmp r3, r4 7a8c: e59f1224 ldr r1, [pc, #548] ; 7cb8 <_Heap_Walk+0x630> 7a90: 11a0100c movne r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7a94: e58d2000 str r2, [sp] 7a98: e98d0009 stmib sp, {r0, r3} 7a9c: e58d100c str r1, [sp, #12] 7aa0: e1a03005 mov r3, r5 7aa4: e1a00008 mov r0, r8 7aa8: e3a01000 mov r1, #0 7aac: e59f2208 ldr r2, [pc, #520] ; 7cbc <_Heap_Walk+0x634> 7ab0: e1a0e00f mov lr, pc 7ab4: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7ab8: e5993000 ldr r3, [r9] 7abc: e1570003 cmp r7, r3 7ac0: 0a00000a beq 7af0 <_Heap_Walk+0x468> (*printer)( 7ac4: e58d3004 str r3, [sp, #4] 7ac8: e1a00008 mov r0, r8 7acc: e58d7000 str r7, [sp] 7ad0: e58d9008 str r9, [sp, #8] 7ad4: e1a03005 mov r3, r5 7ad8: e3a01001 mov r1, #1 7adc: e59f21dc ldr r2, [pc, #476] ; 7cc0 <_Heap_Walk+0x638> 7ae0: e1a0e00f mov lr, pc 7ae4: e12fff1a bx sl 7ae8: e3a00000 mov r0, #0 7aec: eafffef8 b 76d4 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 7af0: e21b9001 ands r9, fp, #1 7af4: 0a000017 beq 7b58 <_Heap_Walk+0x4d0> 7af8: e5943008 ldr r3, [r4, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 7afc: e1530004 cmp r3, r4 7b00: 1a000003 bne 7b14 <_Heap_Walk+0x48c> 7b04: ea00000b b 7b38 <_Heap_Walk+0x4b0> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 7b08: e5933008 ldr r3, [r3, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 7b0c: e1530004 cmp r3, r4 7b10: 0a000008 beq 7b38 <_Heap_Walk+0x4b0> if ( free_block == block ) { 7b14: e1530005 cmp r3, r5 7b18: 1afffffa bne 7b08 <_Heap_Walk+0x480> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7b1c: e59d2024 ldr r2, [sp, #36] ; 0x24 7b20: e1520006 cmp r2, r6 7b24: 0afffee9 beq 76d0 <_Heap_Walk+0x48> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 7b28: e5967004 ldr r7, [r6, #4] 7b2c: e1a05006 mov r5, r6 7b30: e2076001 and r6, r7, #1 7b34: eaffff8f b 7978 <_Heap_Walk+0x2f0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7b38: e1a00008 mov r0, r8 7b3c: e1a03005 mov r3, r5 7b40: e3a01001 mov r1, #1 7b44: e59f2178 ldr r2, [pc, #376] ; 7cc4 <_Heap_Walk+0x63c> 7b48: e1a0e00f mov lr, pc 7b4c: e12fff1a bx sl 7b50: e3a00000 mov r0, #0 7b54: eafffede b 76d4 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 7b58: e1a00008 mov r0, r8 7b5c: e1a03005 mov r3, r5 7b60: e3a01001 mov r1, #1 7b64: e59f215c ldr r2, [pc, #348] ; 7cc8 <_Heap_Walk+0x640> 7b68: e1a0e00f mov lr, pc 7b6c: e12fff1a bx sl 7b70: e1a00009 mov r0, r9 7b74: eafffed6 b 76d4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 7b78: e1a00008 mov r0, r8 7b7c: e58d7000 str r7, [sp] 7b80: e1a03005 mov r3, r5 7b84: e3a01001 mov r1, #1 7b88: e59f213c ldr r2, [pc, #316] ; 7ccc <_Heap_Walk+0x644> 7b8c: e1a0e00f mov lr, pc 7b90: e12fff1a bx sl 7b94: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7b98: eafffecd b 76d4 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 7b9c: e58d2004 str r2, [sp, #4] 7ba0: e1a00008 mov r0, r8 7ba4: e1a0b002 mov fp, r2 7ba8: e58d7000 str r7, [sp] 7bac: e1a03005 mov r3, r5 7bb0: e3a01001 mov r1, #1 7bb4: e59f2114 ldr r2, [pc, #276] ; 7cd0 <_Heap_Walk+0x648> 7bb8: e1a0e00f mov lr, pc 7bbc: e12fff1a bx sl 7bc0: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 7bc4: eafffec2 b 76d4 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 7bc8: e1a00008 mov r0, r8 7bcc: e58d6000 str r6, [sp] 7bd0: e1a03005 mov r3, r5 7bd4: e3a01001 mov r1, #1 7bd8: e59f20f4 ldr r2, [pc, #244] ; 7cd4 <_Heap_Walk+0x64c> 7bdc: e1a0e00f mov lr, pc 7be0: e12fff1a bx sl 7be4: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7be8: eafffeb9 b 76d4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 7bec: e1a00008 mov r0, r8 7bf0: e3a01001 mov r1, #1 7bf4: e59f20dc ldr r2, [pc, #220] ; 7cd8 <_Heap_Walk+0x650> 7bf8: e1a0e00f mov lr, pc 7bfc: e12fff1a bx sl 7c00: e1a00009 mov r0, r9 7c04: eafffeb2 b 76d4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 7c08: e1a00008 mov r0, r8 7c0c: e1a03009 mov r3, r9 7c10: e3a01001 mov r1, #1 7c14: e59f20c0 ldr r2, [pc, #192] ; 7cdc <_Heap_Walk+0x654> 7c18: e1a0e00f mov lr, pc 7c1c: e12fff1a bx sl 7c20: e3a00000 mov r0, #0 7c24: eafffeaa b 76d4 <_Heap_Walk+0x4c> ); return false; } if ( free_block->prev != prev_block ) { 7c28: e1a0c002 mov ip, r2 (*printer)( 7c2c: e1a00008 mov r0, r8 7c30: e58dc000 str ip, [sp] 7c34: e1a03009 mov r3, r9 7c38: e3a01001 mov r1, #1 7c3c: e59f209c ldr r2, [pc, #156] ; 7ce0 <_Heap_Walk+0x658> 7c40: e1a0e00f mov lr, pc 7c44: e12fff1a bx sl 7c48: e3a00000 mov r0, #0 7c4c: eafffea0 b 76d4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 7c50: e1a00008 mov r0, r8 7c54: e1a03009 mov r3, r9 7c58: e3a01001 mov r1, #1 7c5c: e59f2080 ldr r2, [pc, #128] ; 7ce4 <_Heap_Walk+0x65c> 7c60: e1a0e00f mov lr, pc 7c64: e12fff1a bx sl 7c68: e3a00000 mov r0, #0 7c6c: eafffe98 b 76d4 <_Heap_Walk+0x4c> =============================================================================== 00000460 <_Message_queue_Manager_initialization>: #include #include void _Message_queue_Manager_initialization(void) { } 460: e12fff1e bx lr =============================================================================== 00006b48 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6b48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6b4c: e5908034 ldr r8, [r0, #52] ; 0x34 6b50: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 6b54: e24dd014 sub sp, sp, #20 6b58: e1a05000 mov r5, r0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 6b5c: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6b60: 0a00009c beq 6dd8 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 6b64: e1d091b4 ldrh r9, [r0, #20] 6b68: e1d0a1b0 ldrh sl, [r0, #16] 6b6c: e1a01009 mov r1, r9 6b70: e1a0000a mov r0, sl 6b74: eb004870 bl 18d3c <__aeabi_uidiv> 6b78: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6b7c: e1b03823 lsrs r3, r3, #16 6b80: 01a01009 moveq r1, r9 6b84: 01a06007 moveq r6, r7 6b88: 01a04003 moveq r4, r3 6b8c: 0a00000f beq 6bd0 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 6b90: e5984000 ldr r4, [r8] 6b94: e3540000 cmp r4, #0 6b98: 11a01009 movne r1, r9 6b9c: 11a06007 movne r6, r7 6ba0: 13a04000 movne r4, #0 6ba4: 01a01009 moveq r1, r9 6ba8: 01a06007 moveq r6, r7 6bac: 1a000003 bne 6bc0 <_Objects_Extend_information+0x78> 6bb0: ea000006 b 6bd0 <_Objects_Extend_information+0x88> <== NOT EXECUTED 6bb4: e7982104 ldr r2, [r8, r4, lsl #2] 6bb8: e3520000 cmp r2, #0 6bbc: 0a000003 beq 6bd0 <_Objects_Extend_information+0x88> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6bc0: e2844001 add r4, r4, #1 6bc4: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 6bc8: e0866009 add r6, r6, r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 6bcc: 8afffff8 bhi 6bb4 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 6bd0: e08aa001 add sl, sl, r1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 6bd4: e35a0801 cmp sl, #65536 ; 0x10000 6bd8: 2a000064 bcs 6d70 <_Objects_Extend_information+0x228> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { 6bdc: e5d50012 ldrb r0, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6be0: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 6be4: e3500000 cmp r0, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 6be8: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 6bec: 1a000061 bne 6d78 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 6bf0: e58d3000 str r3, [sp] 6bf4: eb000833 bl 8cc8 <_Workspace_Allocate_or_fatal_error> 6bf8: e59d3000 ldr r3, [sp] 6bfc: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 6c00: e1d521b0 ldrh r2, [r5, #16] 6c04: e1560002 cmp r6, r2 6c08: 3a000038 bcc 6cf0 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 6c0c: e283c001 add ip, r3, #1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 6c10: e08c008c add r0, ip, ip, lsl #1 6c14: e08a0000 add r0, sl, r0 6c18: e0800007 add r0, r0, r7 6c1c: e1a00100 lsl r0, r0, #2 6c20: e88d1008 stm sp, {r3, ip} 6c24: eb000833 bl 8cf8 <_Workspace_Allocate> if ( !object_blocks ) { 6c28: e250b000 subs fp, r0, #0 6c2c: e89d1008 ldm sp, {r3, ip} 6c30: 0a00006e beq 6df0 <_Objects_Extend_information+0x2a8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 6c34: e1d521b0 ldrh r2, [r5, #16] 6c38: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6c3c: e08b818c add r8, fp, ip, lsl #3 6c40: e08bc10c add ip, fp, ip, lsl #2 6c44: 3a000051 bcc 6d90 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c48: e3570000 cmp r7, #0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6c4c: 13a02000 movne r2, #0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 6c50: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c54: 0a000003 beq 6c68 <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 6c58: e7881102 str r1, [r8, r2, lsl #2] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c5c: e2822001 add r2, r2, #1 6c60: e1570002 cmp r7, r2 6c64: 8afffffb bhi 6c58 <_Objects_Extend_information+0x110> 6c68: e1a03103 lsl r3, r3, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 6c6c: e1d511b4 ldrh r1, [r5, #20] 6c70: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c74: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6c78: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 6c7c: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c80: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 6c84: 2a000005 bcs 6ca0 <_Objects_Extend_information+0x158> 6c88: e0882106 add r2, r8, r6, lsl #2 6c8c: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 6c90: e2833001 add r3, r3, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6c94: e1510003 cmp r1, r3 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6c98: e4820004 str r0, [r2], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 6c9c: 8afffffb bhi 6c90 <_Objects_Extend_information+0x148> 6ca0: e10f3000 mrs r3, CPSR 6ca4: e3832080 orr r2, r3, #128 ; 0x80 6ca8: e129f002 msr CPSR_fc, r2 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6cac: e5952000 ldr r2, [r5] 6cb0: e1d510b4 ldrh r1, [r5, #4] 6cb4: e1a02c02 lsl r2, r2, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6cb8: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 6cbc: e3822801 orr r2, r2, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6cc0: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 6cc4: e1822d81 orr r2, r2, r1, lsl #27 6cc8: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 6ccc: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 6cd0: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 6cd4: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6cd8: e585200c str r2, [r5, #12] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 6cdc: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 6ce0: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6ce4: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 6ce8: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 6cec: 1b000807 blne 8d10 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cf0: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6cf4: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cf8: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6cfc: e1a01009 mov r1, r9 6d00: e1a00007 mov r0, r7 6d04: e1d521b4 ldrh r2, [r5, #20] 6d08: e5953018 ldr r3, [r5, #24] 6d0c: eb00153f bl c210 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6d10: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6d14: e2858020 add r8, r5, #32 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6d18: ea000008 b 6d40 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 6d1c: e5952000 ldr r2, [r5] 6d20: e1d5c0b4 ldrh ip, [r5, #4] 6d24: e1a02c02 lsl r2, r2, #24 6d28: e3822801 orr r2, r2, #65536 ; 0x10000 6d2c: e1822d8c orr r2, r2, ip, lsl #27 6d30: e1822006 orr r2, r2, r6 6d34: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6d38: ebfffcf2 bl 6108 <_Chain_Append> index++; 6d3c: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6d40: e1a00007 mov r0, r7 6d44: ebfffd03 bl 6158 <_Chain_Get> 6d48: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6d4c: e1a01003 mov r1, r3 6d50: e1a00008 mov r0, r8 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 6d54: 1afffff0 bne 6d1c <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d58: e1d531b4 ldrh r3, [r5, #20] information->inactive = 6d5c: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d60: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 6d64: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d68: e7813004 str r3, [r1, r4] information->inactive = 6d6c: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 6d70: e28dd014 add sp, sp, #20 6d74: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 6d78: e58d3000 str r3, [sp] 6d7c: eb0007dd bl 8cf8 <_Workspace_Allocate> if ( !new_object_block ) 6d80: e2509000 subs r9, r0, #0 6d84: e59d3000 ldr r3, [sp] 6d88: 1affff9c bne 6c00 <_Objects_Extend_information+0xb8> 6d8c: eafffff7 b 6d70 <_Objects_Extend_information+0x228> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 6d90: e1a03103 lsl r3, r3, #2 6d94: e1a02003 mov r2, r3 6d98: e5951034 ldr r1, [r5, #52] ; 0x34 6d9c: e88d1008 stm sp, {r3, ip} 6da0: eb002469 bl ff4c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 6da4: e89d1008 ldm sp, {r3, ip} 6da8: e1a0000c mov r0, ip 6dac: e1a02003 mov r2, r3 6db0: e5951030 ldr r1, [r5, #48] ; 0x30 6db4: eb002464 bl ff4c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6db8: e1d521b0 ldrh r2, [r5, #16] 6dbc: e0872002 add r2, r7, r2 6dc0: e1a02102 lsl r2, r2, #2 6dc4: e1a00008 mov r0, r8 6dc8: e595101c ldr r1, [r5, #28] 6dcc: eb00245e bl ff4c 6dd0: e89d1008 ldm sp, {r3, ip} 6dd4: eaffffa4 b 6c6c <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6dd8: e1a04008 mov r4, r8 6ddc: e1d0a1b0 ldrh sl, [r0, #16] 6de0: e1d011b4 ldrh r1, [r0, #20] 6de4: e1a06007 mov r6, r7 6de8: e1a03008 mov r3, r8 6dec: eaffff77 b 6bd0 <_Objects_Extend_information+0x88> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 6df0: e1a00009 mov r0, r9 6df4: eb0007c5 bl 8d10 <_Workspace_Free> return; 6df8: eaffffdc b 6d70 <_Objects_Extend_information+0x228> =============================================================================== 000068a4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 68a4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 68a8: e1a04001 mov r4, r1 68ac: e24dd004 sub sp, sp, #4 68b0: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 68b4: e1a0100d mov r1, sp 68b8: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 68bc: e1a08002 mov r8, r2 68c0: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 68c4: eb000075 bl 6aa0 <_POSIX_Mutex_Get> 68c8: e3500000 cmp r0, #0 68cc: 0a00000a beq 68fc <_POSIX_Condition_variables_Wait_support+0x58> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 68d0: e59f30dc ldr r3, [pc, #220] ; 69b4 <_POSIX_Condition_variables_Wait_support+0x110> 68d4: e5932000 ldr r2, [r3] 68d8: e2422001 sub r2, r2, #1 68dc: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 68e0: e1a0100d mov r1, sp 68e4: e1a00006 mov r0, r6 68e8: ebffff76 bl 66c8 <_POSIX_Condition_variables_Get> switch ( location ) { 68ec: e59d3000 ldr r3, [sp] 68f0: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 68f4: e1a0a000 mov sl, r0 switch ( location ) { 68f8: 0a000003 beq 690c <_POSIX_Condition_variables_Wait_support+0x68> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 68fc: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 6900: e1a00005 mov r0, r5 6904: e28dd004 add sp, sp, #4 6908: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 690c: e5903014 ldr r3, [r0, #20] 6910: e3530000 cmp r3, #0 6914: 0a000005 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c> 6918: e5942000 ldr r2, [r4] 691c: e1530002 cmp r3, r2 6920: 0a000002 beq 6930 <_POSIX_Condition_variables_Wait_support+0x8c> _Thread_Enable_dispatch(); 6924: eb000c92 bl 9b74 <_Thread_Enable_dispatch> 6928: e3a05016 mov r5, #22 return EINVAL; 692c: eafffff3 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c> } (void) pthread_mutex_unlock( mutex ); 6930: e1a00004 mov r0, r4 6934: eb0000e3 bl 6cc8 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 6938: e3570000 cmp r7, #0 693c: 0a000006 beq 695c <_POSIX_Condition_variables_Wait_support+0xb8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 6940: eb000c8b bl 9b74 <_Thread_Enable_dispatch> 6944: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 6948: e1a00004 mov r0, r4 694c: eb0000bc bl 6c44 if ( mutex_status ) 6950: e3500000 cmp r0, #0 6954: 0affffe9 beq 6900 <_POSIX_Condition_variables_Wait_support+0x5c> 6958: eaffffe7 b 68fc <_POSIX_Condition_variables_Wait_support+0x58> if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 695c: e59f5054 ldr r5, [pc, #84] ; 69b8 <_POSIX_Condition_variables_Wait_support+0x114> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 6960: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 6964: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 6968: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 696c: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 6970: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 6974: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 6978: e5831020 str r1, [r3, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 697c: e3a01001 mov r1, #1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 6980: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 6984: e1a00002 mov r0, r2 6988: e58a1048 str r1, [sl, #72] ; 0x48 698c: e59f2028 ldr r2, [pc, #40] ; 69bc <_POSIX_Condition_variables_Wait_support+0x118> 6990: e1a01008 mov r1, r8 6994: eb000dbc bl a08c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 6998: eb000c75 bl 9b74 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 699c: e5953000 ldr r3, [r5] 69a0: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 69a4: e3550074 cmp r5, #116 ; 0x74 69a8: 13550000 cmpne r5, #0 69ac: 0affffe5 beq 6948 <_POSIX_Condition_variables_Wait_support+0xa4> 69b0: eaffffd2 b 6900 <_POSIX_Condition_variables_Wait_support+0x5c><== NOT EXECUTED =============================================================================== 0000e834 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { e834: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); e838: e5907008 ldr r7, [r0, #8] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); e83c: e1a0ac27 lsr sl, r7, #24 e840: e20aa007 and sl, sl, #7 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; e844: e1a07807 lsl r7, r7, #16 e848: e59f5078 ldr r5, [pc, #120] ; e8c8 <_POSIX_Keys_Run_destructors+0x94> e84c: e1a07727 lsr r7, r7, #14 e850: e28aa005 add sl, sl, #5 if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; e854: e3a08000 mov r8, #0 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; e858: e1d541b0 ldrh r4, [r5, #16] done = true; for ( index = 1 ; index <= max ; ++index ) { e85c: e3540000 cmp r4, #0 e860: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} e864: e3a06001 mov r6, #1 e868: e1a01006 mov r1, r6 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; e86c: e595301c ldr r3, [r5, #28] e870: e7932106 ldr r2, [r3, r6, lsl #2] if ( key != NULL && key->destructor != NULL ) { e874: e3520000 cmp r2, #0 e878: 0a00000a beq e8a8 <_POSIX_Keys_Run_destructors+0x74> e87c: e5923010 ldr r3, [r2, #16] e880: e3530000 cmp r3, #0 e884: 0a000007 beq e8a8 <_POSIX_Keys_Run_destructors+0x74> void *value = key->Values [ thread_api ][ thread_index ]; e888: e792210a ldr r2, [r2, sl, lsl #2] e88c: e7920007 ldr r0, [r2, r7] if ( value != NULL ) { e890: e3500000 cmp r0, #0 e894: 0a000003 beq e8a8 <_POSIX_Keys_Run_destructors+0x74> key->Values [ thread_api ][ thread_index ] = NULL; e898: e7828007 str r8, [r2, r7] <== NOT EXECUTED (*key->destructor)( value ); e89c: e1a0e00f mov lr, pc <== NOT EXECUTED e8a0: e12fff13 bx r3 <== NOT EXECUTED e8a4: e1a01008 mov r1, r8 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { e8a8: e2866001 add r6, r6, #1 e8ac: e1a06806 lsl r6, r6, #16 e8b0: e1a06826 lsr r6, r6, #16 e8b4: e1540006 cmp r4, r6 e8b8: 2affffeb bcs e86c <_POSIX_Keys_Run_destructors+0x38> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { e8bc: e3510000 cmp r1, #0 e8c0: 0affffe4 beq e858 <_POSIX_Keys_Run_destructors+0x24> e8c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 0000b004 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { b004: e92d41f0 push {r4, r5, r6, r7, r8, lr} b008: e1a04000 mov r4, r0 b00c: e24dd010 sub sp, sp, #16 b010: e1a07001 mov r7, r1 b014: e1a06002 mov r6, r2 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( b018: e59f0118 ldr r0, [pc, #280] ; b138 <_POSIX_Message_queue_Receive_support+0x134> b01c: e1a01004 mov r1, r4 b020: e28d200c add r2, sp, #12 b024: e1a05003 mov r5, r3 b028: e5dd8028 ldrb r8, [sp, #40] ; 0x28 b02c: eb000c43 bl e140 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { b030: e59d300c ldr r3, [sp, #12] b034: e3530000 cmp r3, #0 b038: 0a000005 beq b054 <_POSIX_Message_queue_Receive_support+0x50> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); b03c: eb002f7f bl 16e40 <__errno> b040: e3a03009 mov r3, #9 b044: e5803000 str r3, [r0] b048: e3e00000 mvn r0, #0 } b04c: e28dd010 add sp, sp, #16 b050: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { b054: e5903014 ldr r3, [r0, #20] b058: e2032003 and r2, r3, #3 b05c: e3520001 cmp r2, #1 b060: 0a00002e beq b120 <_POSIX_Message_queue_Receive_support+0x11c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; b064: e5900010 ldr r0, [r0, #16] if ( msg_len < the_mq->Message_queue.maximum_message_size ) { b068: e5902068 ldr r2, [r0, #104] ; 0x68 b06c: e1520006 cmp r2, r6 b070: 8a000024 bhi b108 <_POSIX_Message_queue_Receive_support+0x104> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) b074: e3580000 cmp r8, #0 b078: 11a08723 lsrne r8, r3, #14 b07c: 12288001 eorne r8, r8, #1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; b080: e28d3010 add r3, sp, #16 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( b084: e59dc02c ldr ip, [sp, #44] ; 0x2c /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; b088: e3e02000 mvn r2, #0 b08c: e5232008 str r2, [r3, #-8]! /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) b090: 12088001 andne r8, r8, #1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( b094: e280001c add r0, r0, #28 b098: e1a01004 mov r1, r4 b09c: e1a02007 mov r2, r7 b0a0: e88d1100 stm sp, {r8, ip} b0a4: eb00081a bl d114 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); b0a8: eb000e72 bl ea78 <_Thread_Enable_dispatch> if (msg_prio) { b0ac: e3550000 cmp r5, #0 b0b0: 0a000011 beq b0fc <_POSIX_Message_queue_Receive_support+0xf8> *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count b0b4: e59f4080 ldr r4, [pc, #128] ; b13c <_POSIX_Message_queue_Receive_support+0x138> b0b8: e5943000 ldr r3, [r4] timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( b0bc: e5931024 ldr r1, [r3, #36] ; 0x24 b0c0: e0212fc1 eor r2, r1, r1, asr #31 b0c4: e0422fc1 sub r2, r2, r1, asr #31 b0c8: e5852000 str r2, [r5] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) b0cc: e5933034 ldr r3, [r3, #52] ; 0x34 b0d0: e3530000 cmp r3, #0 return length_out; b0d4: 059d0008 ldreq r0, [sp, #8] *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) b0d8: 0affffdb beq b04c <_POSIX_Message_queue_Receive_support+0x48> return length_out; rtems_set_errno_and_return_minus_one( b0dc: eb002f57 bl 16e40 <__errno> b0e0: e5943000 ldr r3, [r4] b0e4: e1a05000 mov r5, r0 b0e8: e5930034 ldr r0, [r3, #52] ; 0x34 b0ec: eb0000b6 bl b3cc <_POSIX_Message_queue_Translate_core_message_queue_return_code> b0f0: e5850000 str r0, [r5] b0f4: e3e00000 mvn r0, #0 b0f8: eaffffd3 b b04c <_POSIX_Message_queue_Receive_support+0x48> do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { b0fc: e59f4038 ldr r4, [pc, #56] ; b13c <_POSIX_Message_queue_Receive_support+0x138><== NOT EXECUTED b100: e5943000 ldr r3, [r4] <== NOT EXECUTED b104: eafffff0 b b0cc <_POSIX_Message_queue_Receive_support+0xc8><== NOT EXECUTED } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); b108: eb000e5a bl ea78 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); b10c: eb002f4b bl 16e40 <__errno> b110: e3a0307a mov r3, #122 ; 0x7a b114: e5803000 str r3, [r0] b118: e3e00000 mvn r0, #0 b11c: eaffffca b b04c <_POSIX_Message_queue_Receive_support+0x48> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); b120: eb000e54 bl ea78 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); b124: eb002f45 bl 16e40 <__errno> b128: e3a03009 mov r3, #9 b12c: e5803000 str r3, [r0] b130: e3e00000 mvn r0, #0 b134: eaffffc4 b b04c <_POSIX_Message_queue_Receive_support+0x48> =============================================================================== 0000b98c <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { b98c: e92d40f0 push {r4, r5, r6, r7, lr} api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); b990: e1a00001 mov r0, r1 */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { b994: e1a06001 mov r6, r1 Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; b998: e5917108 ldr r7, [r1, #264] ; 0x108 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); b99c: eb000b8a bl e7cc <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); b9a0: e1a00006 mov r0, r6 b9a4: eb000ba2 bl e834 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) b9a8: e2874040 add r4, r7, #64 ; 0x40 _POSIX_Keys_Run_destructors( deleted ); /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; b9ac: e5965028 ldr r5, [r6, #40] ; 0x28 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) b9b0: ea000001 b b9bc <_POSIX_Threads_Delete_extension+0x30> *(void **)the_thread->Wait.return_argument = value_ptr; b9b4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED b9b8: e5835000 str r5, [r3] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) b9bc: e1a00004 mov r0, r4 b9c0: ebfff0a7 bl 7c64 <_Thread_queue_Dequeue> b9c4: e3500000 cmp r0, #0 b9c8: 1afffff9 bne b9b4 <_POSIX_Threads_Delete_extension+0x28> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) b9cc: e5973080 ldr r3, [r7, #128] ; 0x80 b9d0: e3530004 cmp r3, #4 b9d4: 0a000004 beq b9ec <_POSIX_Threads_Delete_extension+0x60> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; b9d8: e3a03000 mov r3, #0 (void) _Workspace_Free( api ); b9dc: e1a00007 mov r0, r7 *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; b9e0: e5863108 str r3, [r6, #264] ; 0x108 (void) _Workspace_Free( api ); } b9e4: e8bd40f0 pop {r4, r5, r6, r7, lr} if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); b9e8: eafff4c8 b 8d10 <_Workspace_Free> while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); b9ec: e28700a4 add r0, r7, #164 ; 0xa4 b9f0: ebfff463 bl 8b84 <_Watchdog_Remove> b9f4: eafffff7 b b9d8 <_POSIX_Threads_Delete_extension+0x4c> =============================================================================== 0000f5f4 <_POSIX_signals_Clear_process_signals>: static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( f5f4: e10f2000 mrs r2, CPSR f5f8: e3823080 orr r3, r2, #128 ; 0x80 f5fc: e129f003 msr CPSR_fc, r3 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { f600: e59f1064 ldr r1, [pc, #100] ; f66c <_POSIX_signals_Clear_process_signals+0x78> f604: e0803080 add r3, r0, r0, lsl #1 f608: e1a03103 lsl r3, r3, #2 f60c: e7911003 ldr r1, [r1, r3] f610: e3510002 cmp r1, #2 f614: 0a00000c beq f64c <_POSIX_signals_Clear_process_signals+0x58> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; f618: e59f3050 ldr r3, [pc, #80] ; f670 <_POSIX_signals_Clear_process_signals+0x7c> f61c: e5931000 ldr r1, [r3] f620: e3a0c001 mov ip, #1 f624: e2400001 sub r0, r0, #1 f628: e1c1001c bic r0, r1, ip, lsl r0 if ( !_POSIX_signals_Pending ) f62c: e3500000 cmp r0, #0 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; f630: e5830000 str r0, [r3] if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; f634: 059f3038 ldreq r3, [pc, #56] ; f674 <_POSIX_signals_Clear_process_signals+0x80> f638: 05931000 ldreq r1, [r3] f63c: 02411001 subeq r1, r1, #1 f640: 05831000 streq r1, [r3] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( f644: e129f002 msr CPSR_fc, r2 } _ISR_Enable( level ); } f648: e12fff1e bx lr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) f64c: e59f1024 ldr r1, [pc, #36] ; f678 <_POSIX_signals_Clear_process_signals+0x84> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; f650: e791c003 ldr ip, [r1, r3] f654: e0813003 add r3, r1, r3 f658: e2833004 add r3, r3, #4 f65c: e15c0003 cmp ip, r3 f660: 0affffec beq f618 <_POSIX_signals_Clear_process_signals+0x24> f664: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } f668: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00000464 <_Partition_Manager_initialization>: #include #include void _Partition_Manager_initialization(void) { } 464: e12fff1e bx lr =============================================================================== 00000474 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { } 474: e12fff1e bx lr =============================================================================== 00000468 <_Region_Manager_initialization>: #include #include void _Region_Manager_initialization(void) { } 468: e12fff1e bx lr =============================================================================== 00007e88 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 7e88: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 7e8c: e92d05f0 push {r4, r5, r6, r7, r8, sl} _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7e90: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7e94: e281503c add r5, r1, #60 ; 0x3c 7e98: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7e9c: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 7ea0: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7ea4: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7ea8: e3a05000 mov r5, #0 7eac: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 7eb0: e5814040 str r4, [r1, #64] ; 0x40 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 7eb4: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 7eb8: e5906038 ldr r6, [r0, #56] ; 0x38 7ebc: 159fa178 ldrne sl, [pc, #376] ; 803c <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 7ec0: 1a00001c bne 7f38 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 7ec4: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7ec8: e10f8000 mrs r8, CPSR 7ecc: e3884080 orr r4, r8, #128 ; 0x80 7ed0: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 7ed4: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7ed8: e154000a cmp r4, sl 7edc: 1a000009 bne 7f08 <_Thread_queue_Enqueue_priority+0x80> 7ee0: ea000052 b 8030 <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7ee4: e10f7000 mrs r7, CPSR 7ee8: e129f008 msr CPSR_fc, r8 7eec: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7ef0: e5947010 ldr r7, [r4, #16] 7ef4: e1160007 tst r6, r7 7ef8: 0a000033 beq 7fcc <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 7efc: e5944000 ldr r4, [r4] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7f00: e154000a cmp r4, sl 7f04: 0a000002 beq 7f14 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 7f08: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 7f0c: e1530005 cmp r3, r5 7f10: 8afffff3 bhi 7ee4 <_Thread_queue_Enqueue_priority+0x5c> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7f14: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 7f18: e590c030 ldr ip, [r0, #48] ; 0x30 7f1c: e35c0001 cmp ip, #1 7f20: 0a00002b beq 7fd4 <_Thread_queue_Enqueue_priority+0x14c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 7f24: e5826000 str r6, [r2] return the_thread_queue->sync_state; 7f28: e1a0000c mov r0, ip } 7f2c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 7f30: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7f34: e129f008 msr CPSR_fc, r8 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 7f38: e5da5000 ldrb r5, [sl] 7f3c: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7f40: e10f8000 mrs r8, CPSR 7f44: e3884080 orr r4, r8, #128 ; 0x80 7f48: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 7f4c: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7f50: e154000c cmp r4, ip 7f54: 1a000009 bne 7f80 <_Thread_queue_Enqueue_priority+0xf8> 7f58: ea00000b b 7f8c <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7f5c: e10f7000 mrs r7, CPSR 7f60: e129f008 msr CPSR_fc, r8 7f64: e129f007 msr CPSR_fc, r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7f68: e5947010 ldr r7, [r4, #16] 7f6c: e1160007 tst r6, r7 7f70: 0affffef beq 7f34 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 7f74: e5944004 ldr r4, [r4, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7f78: e154000c cmp r4, ip 7f7c: 0a000002 beq 7f8c <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 7f80: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 7f84: e1530005 cmp r3, r5 7f88: 3afffff3 bcc 7f5c <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7f8c: e590c030 ldr ip, [r0, #48] ; 0x30 7f90: e35c0001 cmp ip, #1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7f94: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7f98: 1affffe1 bne 7f24 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7f9c: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7fa0: e3a03000 mov r3, #0 7fa4: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7fa8: 0a000016 beq 8008 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7fac: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7fb0: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7fb4: e5810044 str r0, [r1, #68] ; 0x44 next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 7fb8: e5841000 str r1, [r4] next_node->previous = the_node; 7fbc: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7fc0: e129f008 msr CPSR_fc, r8 7fc4: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7fc8: eaffffd7 b 7f2c <_Thread_queue_Enqueue_priority+0xa4> 7fcc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 7fd0: eaffffbc b 7ec8 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7fd4: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7fd8: e3a03000 mov r3, #0 7fdc: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7fe0: 0a000008 beq 8008 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7fe4: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7fe8: e5814000 str r4, [r1] the_node->previous = previous_node; 7fec: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7ff0: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7ff4: e5831000 str r1, [r3] search_node->previous = the_node; 7ff8: e5841004 str r1, [r4, #4] 7ffc: e129f008 msr CPSR_fc, r8 8000: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004: eaffffc8 b 7f2c <_Thread_queue_Enqueue_priority+0xa4> 8008: e284403c add r4, r4, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 800c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8010: e5814000 str r4, [r1] the_node->previous = previous_node; 8014: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8018: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 801c: e5831000 str r1, [r3] search_node->previous = the_node; 8020: e5841004 str r1, [r4, #4] 8024: e129f006 msr CPSR_fc, r6 8028: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 802c: eaffffbe b 7f2c <_Thread_queue_Enqueue_priority+0xa4> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8030: e1a06008 mov r6, r8 8034: e3e05000 mvn r5, #0 8038: eaffffb6 b 7f18 <_Thread_queue_Enqueue_priority+0x90> =============================================================================== 00000470 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { } 470: e12fff1e bx lr =============================================================================== 00016a3c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 16a3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 16a40: e24dd024 sub sp, sp, #36 ; 0x24 16a44: e28d700c add r7, sp, #12 16a48: e28d2018 add r2, sp, #24 16a4c: e1a04000 mov r4, r0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 16a50: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 16a54: e282a004 add sl, r2, #4 16a58: e2872004 add r2, r7, #4 16a5c: e58d2000 str r2, [sp] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 16a60: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 16a64: e28d0018 add r0, sp, #24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 16a68: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; 16a6c: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16a70: e2842008 add r2, r4, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16a74: e2843040 add r3, r4, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 16a78: e58da018 str sl, [sp, #24] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 16a7c: e58d0020 str r0, [sp, #32] 16a80: e58d7014 str r7, [sp, #20] 16a84: e59f91a0 ldr r9, [pc, #416] ; 16c2c <_Timer_server_Body+0x1f0> 16a88: e59fb1a0 ldr fp, [pc, #416] ; 16c30 <_Timer_server_Body+0x1f4> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16a8c: e58d2008 str r2, [sp, #8] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16a90: e58d3004 str r3, [sp, #4] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16a94: e2846030 add r6, r4, #48 ; 0x30 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16a98: e2848068 add r8, r4, #104 ; 0x68 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 16a9c: e28d0018 add r0, sp, #24 16aa0: e5840078 str r0, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 16aa4: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 16aa8: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16aac: e1a00006 mov r0, r6 16ab0: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 16ab4: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16ab8: e1a02007 mov r2, r7 16abc: eb00110f bl 1af00 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 16ac0: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 16ac4: e5941074 ldr r1, [r4, #116] ; 0x74 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 16ac8: e1550001 cmp r5, r1 16acc: 8a000022 bhi 16b5c <_Timer_server_Body+0x120> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 16ad0: 3a000018 bcc 16b38 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 16ad4: e5845074 str r5, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 16ad8: e5940078 ldr r0, [r4, #120] ; 0x78 16adc: eb000253 bl 17430 <_Chain_Get> if ( timer == NULL ) { 16ae0: e3500000 cmp r0, #0 16ae4: 0a00000b beq 16b18 <_Timer_server_Body+0xdc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 16ae8: e5903038 ldr r3, [r0, #56] ; 0x38 16aec: e3530001 cmp r3, #1 16af0: 0a000015 beq 16b4c <_Timer_server_Body+0x110> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 16af4: e3530003 cmp r3, #3 16af8: 1afffff6 bne 16ad8 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 16afc: e2801010 add r1, r0, #16 16b00: e1a00008 mov r0, r8 16b04: eb00112c bl 1afbc <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 16b08: e5940078 ldr r0, [r4, #120] ; 0x78 16b0c: eb000247 bl 17430 <_Chain_Get> if ( timer == NULL ) { 16b10: e3500000 cmp r0, #0 16b14: 1afffff3 bne 16ae8 <_Timer_server_Body+0xac> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 16b18: e10f2000 mrs r2, CPSR 16b1c: e3823080 orr r3, r2, #128 ; 0x80 16b20: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 16b24: e59d3018 ldr r3, [sp, #24] 16b28: e15a0003 cmp sl, r3 16b2c: 0a00000f beq 16b70 <_Timer_server_Body+0x134> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 16b30: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 16b34: eaffffda b 16aa4 <_Timer_server_Body+0x68> <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 16b38: e0652001 rsb r2, r5, r1 16b3c: e1a00008 mov r0, r8 16b40: e3a01001 mov r1, #1 16b44: eb0010be bl 1ae44 <_Watchdog_Adjust> 16b48: eaffffe1 b 16ad4 <_Timer_server_Body+0x98> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 16b4c: e2801010 add r1, r0, #16 16b50: e1a00006 mov r0, r6 16b54: eb001118 bl 1afbc <_Watchdog_Insert> 16b58: eaffffde b 16ad8 <_Timer_server_Body+0x9c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 16b5c: e0611005 rsb r1, r1, r5 16b60: e1a00008 mov r0, r8 16b64: e1a02007 mov r2, r7 16b68: eb0010e4 bl 1af00 <_Watchdog_Adjust_to_chain> 16b6c: eaffffd8 b 16ad4 <_Timer_server_Body+0x98> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 16b70: e5840078 str r0, [r4, #120] ; 0x78 16b74: e129f002 msr CPSR_fc, r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 16b78: e59d300c ldr r3, [sp, #12] 16b7c: e59d2000 ldr r2, [sp] 16b80: e1520003 cmp r2, r3 16b84: 159d5000 ldrne r5, [sp] 16b88: 1a00000a bne 16bb8 <_Timer_server_Body+0x17c> 16b8c: ea000011 b 16bd8 <_Timer_server_Body+0x19c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 16b90: e5932000 ldr r2, [r3] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 16b94: e3a00000 mov r0, #0 the_chain->first = new_first; 16b98: e58d200c str r2, [sp, #12] 16b9c: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 16ba0: e5827004 str r7, [r2, #4] 16ba4: e129f001 msr CPSR_fc, r1 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 16ba8: e2830020 add r0, r3, #32 16bac: e8900003 ldm r0, {r0, r1} 16bb0: e1a0e00f mov lr, pc 16bb4: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 16bb8: e10f1000 mrs r1, CPSR 16bbc: e3813080 orr r3, r1, #128 ; 0x80 16bc0: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 16bc4: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 16bc8: e1550003 cmp r5, r3 16bcc: 1affffef bne 16b90 <_Timer_server_Body+0x154> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 16bd0: e129f001 msr CPSR_fc, r1 16bd4: eaffffb0 b 16a9c <_Timer_server_Body+0x60> } } else { ts->active = false; 16bd8: e3a02000 mov r2, #0 16bdc: e5c4207c strb r2, [r4, #124] ; 0x7c 16be0: e59f004c ldr r0, [pc, #76] ; 16c34 <_Timer_server_Body+0x1f8> 16be4: e5903000 ldr r3, [r0] 16be8: e2833001 add r3, r3, #1 16bec: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 16bf0: e3a01008 mov r1, #8 16bf4: e5940000 ldr r0, [r4] 16bf8: eb000e15 bl 1a454 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 16bfc: e1a00004 mov r0, r4 16c00: ebffff61 bl 1698c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 16c04: e1a00004 mov r0, r4 16c08: ebffff75 bl 169e4 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 16c0c: eb000b52 bl 1995c <_Thread_Enable_dispatch> ts->active = true; 16c10: e3a02001 mov r2, #1 16c14: e5c4207c strb r2, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 16c18: e59d0008 ldr r0, [sp, #8] 16c1c: eb001147 bl 1b140 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 16c20: e59d0004 ldr r0, [sp, #4] 16c24: eb001145 bl 1b140 <_Watchdog_Remove> 16c28: eaffff9b b 16a9c <_Timer_server_Body+0x60> =============================================================================== 0000a970 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a970: e92d41f0 push {r4, r5, r6, r7, r8, lr} a974: e1a04000 mov r4, r0 a978: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a97c: e10f3000 mrs r3, CPSR a980: e3832080 orr r2, r3, #128 ; 0x80 a984: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a988: e1a07000 mov r7, r0 a98c: e4972004 ldr r2, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { a990: e1520007 cmp r2, r7 a994: 0a000018 beq a9fc <_Watchdog_Adjust+0x8c> switch ( direction ) { a998: e3510000 cmp r1, #0 a99c: 1a000018 bne aa04 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a9a0: e3550000 cmp r5, #0 a9a4: 0a000014 beq a9fc <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a9a8: e5926010 ldr r6, [r2, #16] a9ac: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a9b0: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { a9b4: 2a000005 bcs a9d0 <_Watchdog_Adjust+0x60> a9b8: ea000018 b aa20 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a9bc: e0555006 subs r5, r5, r6 a9c0: 0a00000d beq a9fc <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a9c4: e5926010 ldr r6, [r2, #16] a9c8: e1560005 cmp r6, r5 a9cc: 8a000013 bhi aa20 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a9d0: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a9d4: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a9d8: e1a00004 mov r0, r4 a9dc: eb00009e bl ac5c <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a9e0: e10f3000 mrs r3, CPSR a9e4: e3832080 orr r2, r3, #128 ; 0x80 a9e8: e129f002 msr CPSR_fc, r2 a9ec: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a9f0: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); a9f4: e1a02001 mov r2, r1 a9f8: 1affffef bne a9bc <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a9fc: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } aa00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { aa04: e3510001 cmp r1, #1 aa08: 1afffffb bne a9fc <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; aa0c: e5921010 ldr r1, [r2, #16] aa10: e0815005 add r5, r1, r5 aa14: e5825010 str r5, [r2, #16] aa18: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } aa1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; aa20: e0655006 rsb r5, r5, r6 aa24: e5825010 str r5, [r2, #16] break; aa28: eafffff3 b a9fc <_Watchdog_Adjust+0x8c> =============================================================================== 0001b1cc <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 1b1cc: e24dd004 sub sp, sp, #4 1b1d0: e58d0000 str r0, [sp] 1b1d4: eb0001f1 bl 1b9a0 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 1b1d8: ebffffe1 bl 1b164 rtems_shutdown_executive(status); 1b1dc: e59d0000 ldr r0, [sp] 1b1e0: eb00003e bl 1b2e0 1b1e4: eafffffe b 1b1e4 <_exit+0x18> <== NOT EXECUTED =============================================================================== 00026870 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 26870: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 26874: e2534000 subs r4, r3, #0 <== NOT EXECUTED uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 26878: e24dd004 sub sp, sp, #4 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2687c: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 26880: 01a05004 moveq r5, r4 <== NOT EXECUTED 26884: 0a00001d beq 26900 <_fat_block_read+0x90> <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 26888: e3a05000 mov r5, #0 <== NOT EXECUTED 2688c: e28db004 add fp, sp, #4 <== NOT EXECUTED 26890: e52b5004 str r5, [fp, #-4]! <== NOT EXECUTED 26894: e1a07002 mov r7, r2 <== NOT EXECUTED 26898: e1a06001 mov r6, r1 <== NOT EXECUTED 2689c: ea00000d b 268d8 <_fat_block_read+0x68> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 268a0: e1d980b0 ldrh r8, [r9] <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 268a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 268a8: e0678008 rsb r8, r7, r8 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 268ac: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 268b0: e1580004 cmp r8, r4 <== NOT EXECUTED 268b4: 21a08004 movcs r8, r4 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 268b8: e0811007 add r1, r1, r7 <== NOT EXECUTED 268bc: e1a02008 mov r2, r8 <== NOT EXECUTED 268c0: eb00840e bl 47900 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 268c4: e0544008 subs r4, r4, r8 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; 268c8: e0885005 add r5, r8, r5 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 268cc: 0a00000b beq 26900 <_fat_block_read+0x90> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 268d0: e2866001 add r6, r6, #1 <== NOT EXECUTED 268d4: e1a0700a mov r7, sl <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 268d8: e1a0300d mov r3, sp <== NOT EXECUTED 268dc: e1a01006 mov r1, r6 <== NOT EXECUTED 268e0: e1a00009 mov r0, r9 <== NOT EXECUTED 268e4: e3a02001 mov r2, #1 <== NOT EXECUTED 268e8: ebfffe8d bl 26324 <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 268ec: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 268f0: e250a000 subs sl, r0, #0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 268f4: e0830005 add r0, r3, r5 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 268f8: 0affffe8 beq 268a0 <_fat_block_read+0x30> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 268fc: e3e05000 mvn r5, #0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 26900: e1a00005 mov r0, r5 <== NOT EXECUTED 26904: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26908: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 0002631c <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2631c: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED 26320: eaffffa4 b 261b8 <== NOT EXECUTED =============================================================================== 0002653c <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2653c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 26540: e2535000 subs r5, r3, #0 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 26544: e24dd004 sub sp, sp, #4 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 26548: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2654c: 01a06005 moveq r6, r5 <== NOT EXECUTED 26550: 0a00002d beq 2660c <_fat_block_write+0xd0> <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 26554: e3a06000 mov r6, #0 <== NOT EXECUTED 26558: e28db004 add fp, sp, #4 <== NOT EXECUTED 2655c: e52b6004 str r6, [fp, #-4]! <== NOT EXECUTED 26560: e1a08002 mov r8, r2 <== NOT EXECUTED 26564: e1a09001 mov r9, r1 <== NOT EXECUTED 26568: ea000015 b 265c4 <_fat_block_write+0x88> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2656c: e1a01009 mov r1, r9 <== NOT EXECUTED 26570: e1a0300d mov r3, sp <== NOT EXECUTED 26574: e3a02001 mov r2, #1 <== NOT EXECUTED 26578: e1a00007 mov r0, r7 <== NOT EXECUTED 2657c: ebffff68 bl 26324 <== NOT EXECUTED if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 26580: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 26584: e1a0a000 mov sl, r0 <== NOT EXECUTED if (rc != RC_OK) 26588: e35a0000 cmp sl, #0 <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2658c: e0831006 add r1, r3, r6 <== NOT EXECUTED 26590: e1a02004 mov r2, r4 <== NOT EXECUTED if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 26594: 1a00001b bne 26608 <_fat_block_write+0xcc> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 26598: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2659c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 265a0: e0800008 add r0, r0, r8 <== NOT EXECUTED 265a4: eb0084d5 bl 47900 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 265a8: e3a03001 mov r3, #1 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 265ac: e0555004 subs r5, r5, r4 <== NOT EXECUTED 265b0: e5c73080 strb r3, [r7, #128] ; 0x80 <== NOT EXECUTED memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 265b4: e0846006 add r6, r4, r6 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 265b8: 0a000013 beq 2660c <_fat_block_write+0xd0> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 265bc: e2899001 add r9, r9, #1 <== NOT EXECUTED 265c0: e1a0800a mov r8, sl <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 265c4: e1d730b0 ldrh r3, [r7] <== NOT EXECUTED 265c8: e0684003 rsb r4, r8, r3 <== NOT EXECUTED 265cc: e1540005 cmp r4, r5 <== NOT EXECUTED 265d0: 21a04005 movcs r4, r5 <== NOT EXECUTED if (c == fs_info->vol.bps) 265d4: e1530004 cmp r3, r4 <== NOT EXECUTED 265d8: 1affffe3 bne 2656c <_fat_block_write+0x30> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 265dc: e1a01009 mov r1, r9 <== NOT EXECUTED 265e0: e3a02002 mov r2, #2 <== NOT EXECUTED 265e4: e1a0300d mov r3, sp <== NOT EXECUTED 265e8: e1a00007 mov r0, r7 <== NOT EXECUTED 265ec: ebffff4c bl 26324 <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 265f0: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 265f4: e1a0a000 mov sl, r0 <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 265f8: e35a0000 cmp sl, #0 <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 265fc: e0831006 add r1, r3, r6 <== NOT EXECUTED 26600: e1a02004 mov r2, r4 <== NOT EXECUTED if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 26604: 0affffe3 beq 26598 <_fat_block_write+0x5c> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 26608: e3e06000 mvn r6, #0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 2660c: e1a00006 mov r0, r6 <== NOT EXECUTED 26610: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26614: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000404d8 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 404d8: e1a00001 mov r0, r1 <== NOT EXECUTED 404dc: e1a01002 mov r1, r2 <== NOT EXECUTED 404e0: e1a02003 mov r2, r3 <== NOT EXECUTED 404e4: eaffff81 b 402f0 <== NOT EXECUTED =============================================================================== 0000af44 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } af44: e3a00001 mov r0, #1 <== NOT EXECUTED af48: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000021b4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 21b4: eaffffe4 b 214c <== NOT EXECUTED =============================================================================== 0002a0bc <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 2a0bc: e1a00001 mov r0, r1 <== NOT EXECUTED 2a0c0: e1a01002 mov r1, r2 <== NOT EXECUTED 2a0c4: eaffff75 b 29ea0 <== NOT EXECUTED =============================================================================== 0002a308 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2a308: e1a00001 mov r0, r1 <== NOT EXECUTED 2a30c: e1a01002 mov r1, r2 <== NOT EXECUTED 2a310: eaffffc2 b 2a220 <== NOT EXECUTED =============================================================================== 0001b2c4 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 1b2c4: e1a00001 mov r0, r1 <== NOT EXECUTED 1b2c8: e1a01002 mov r1, r2 <== NOT EXECUTED 1b2cc: ea00000e b 1b30c <== NOT EXECUTED =============================================================================== 0005e318 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5e318: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 5e31c: e1a00001 mov r0, r1 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5e320: e24dd048 sub sp, sp, #72 ; 0x48 5e324: e1a05001 mov r5, r1 5e328: e1a06002 mov r6, r2 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 5e32c: ebfea620 bl 7bb4 if ( old_parent_pathlen == 0 ) 5e330: e2507000 subs r7, r0, #0 5e334: 1a00008b bne 5e568 <_rename_r+0x250> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5e338: e28d4018 add r4, sp, #24 5e33c: e1a00005 mov r0, r5 5e340: e28d1044 add r1, sp, #68 ; 0x44 5e344: e1a02004 mov r2, r4 5e348: ebfeacf7 bl 972c 5e34c: e1a08007 mov r8, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5e350: e1a0e004 mov lr, r4 5e354: e8be000f ldm lr!, {r0, r1, r2, r3} 5e358: e28dc02c add ip, sp, #44 ; 0x2c 5e35c: e8ac000f stmia ip!, {r0, r1, r2, r3} 5e360: e59e3000 ldr r3, [lr] name = old + old_parent_pathlen; 5e364: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5e368: e58c3000 str r3, [ip] name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5e36c: e1a00005 mov r0, r5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 5e370: e58d5040 str r5, [sp, #64] ; 0x40 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5e374: ebffb3bf bl 4b278 5e378: e1a01000 mov r1, r0 5e37c: e1a00005 mov r0, r5 5e380: ebfea5f6 bl 7b60 5e384: e0855000 add r5, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5e388: e1a00005 mov r0, r5 * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5e38c: e58d5040 str r5, [sp, #64] ; 0x40 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5e390: ebffb3b8 bl 4b278 5e394: e28d702c add r7, sp, #44 ; 0x2c 5e398: e3a0c000 mov ip, #0 5e39c: e1a01000 mov r1, r0 5e3a0: e1a0200c mov r2, ip 5e3a4: e1a00005 mov r0, r5 5e3a8: e1a03007 mov r3, r7 5e3ac: e58dc000 str ip, [sp] 5e3b0: ebfea610 bl 7bf8 0, &old_loc, false ); if ( result != 0 ) { 5e3b4: e3500000 cmp r0, #0 5e3b8: 1a00005b bne 5e52c <_rename_r+0x214> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 5e3bc: e28d5004 add r5, sp, #4 5e3c0: e1a00006 mov r0, r6 5e3c4: e28d1044 add r1, sp, #68 ; 0x44 5e3c8: e1a02005 mov r2, r5 5e3cc: ebfeacd6 bl 972c if ( !new_parent_loc.ops->evalformake_h ) { 5e3d0: e59d3010 ldr r3, [sp, #16] 5e3d4: e5933004 ldr r3, [r3, #4] 5e3d8: e3530000 cmp r3, #0 5e3dc: 0a00008f beq 5e620 <_rename_r+0x308> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 5e3e0: e59d0044 ldr r0, [sp, #68] ; 0x44 5e3e4: e1a01005 mov r1, r5 5e3e8: e0860000 add r0, r6, r0 5e3ec: e28d2040 add r2, sp, #64 ; 0x40 5e3f0: e1a0e00f mov lr, pc 5e3f4: e12fff13 bx r3 if ( result != 0 ) { 5e3f8: e3500000 cmp r0, #0 5e3fc: 1a000065 bne 5e598 <_rename_r+0x280> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 5e400: e59d3014 ldr r3, [sp, #20] 5e404: e59d2028 ldr r2, [sp, #40] ; 0x28 5e408: e1520003 cmp r2, r3 5e40c: 1a000027 bne 5e4b0 <_rename_r+0x198> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 5e410: e59d3010 ldr r3, [sp, #16] 5e414: e593c040 ldr ip, [r3, #64] ; 0x40 5e418: e35c0000 cmp ip, #0 5e41c: 0a00007a beq 5e60c <_rename_r+0x2f4> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 5e420: e59d3040 ldr r3, [sp, #64] ; 0x40 5e424: e1a00004 mov r0, r4 5e428: e1a01007 mov r1, r7 5e42c: e1a02005 mov r2, r5 5e430: e1a0e00f mov lr, pc 5e434: e12fff1c bx ip rtems_filesystem_freenode( &new_parent_loc ); 5e438: e59d3010 ldr r3, [sp, #16] 5e43c: e3530000 cmp r3, #0 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 5e440: e1a06000 mov r6, r0 rtems_filesystem_freenode( &new_parent_loc ); 5e444: 0a000004 beq 5e45c <_rename_r+0x144> 5e448: e593301c ldr r3, [r3, #28] 5e44c: e3530000 cmp r3, #0 5e450: 11a00005 movne r0, r5 5e454: 11a0e00f movne lr, pc 5e458: 112fff13 bxne r3 if ( free_old_parentloc ) 5e45c: e3580000 cmp r8, #0 5e460: 0a000007 beq 5e484 <_rename_r+0x16c> rtems_filesystem_freenode( &old_parent_loc ); 5e464: e59d3024 ldr r3, [sp, #36] ; 0x24 5e468: e3530000 cmp r3, #0 5e46c: 0a000004 beq 5e484 <_rename_r+0x16c> 5e470: e593301c ldr r3, [r3, #28] 5e474: e3530000 cmp r3, #0 5e478: 11a00004 movne r0, r4 5e47c: 11a0e00f movne lr, pc 5e480: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5e484: e59d3038 ldr r3, [sp, #56] ; 0x38 5e488: e3530000 cmp r3, #0 5e48c: 0a000004 beq 5e4a4 <_rename_r+0x18c> 5e490: e593301c ldr r3, [r3, #28] 5e494: e3530000 cmp r3, #0 5e498: 11a00007 movne r0, r7 5e49c: 11a0e00f movne lr, pc 5e4a0: 112fff13 bxne r3 return result; } 5e4a4: e1a00006 mov r0, r6 5e4a8: e28dd048 add sp, sp, #72 ; 0x48 5e4ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 5e4b0: e59d3010 ldr r3, [sp, #16] 5e4b4: e3530000 cmp r3, #0 5e4b8: 0a000004 beq 5e4d0 <_rename_r+0x1b8> 5e4bc: e593301c ldr r3, [r3, #28] 5e4c0: e3530000 cmp r3, #0 5e4c4: 11a00005 movne r0, r5 5e4c8: 11a0e00f movne lr, pc 5e4cc: 112fff13 bxne r3 if ( free_old_parentloc ) 5e4d0: e3580000 cmp r8, #0 5e4d4: 0a000007 beq 5e4f8 <_rename_r+0x1e0> rtems_filesystem_freenode( &old_parent_loc ); 5e4d8: e59d3024 ldr r3, [sp, #36] ; 0x24 5e4dc: e3530000 cmp r3, #0 5e4e0: 0a000004 beq 5e4f8 <_rename_r+0x1e0> 5e4e4: e593301c ldr r3, [r3, #28] 5e4e8: e3530000 cmp r3, #0 5e4ec: 11a00004 movne r0, r4 5e4f0: 11a0e00f movne lr, pc 5e4f4: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5e4f8: e59d3038 ldr r3, [sp, #56] ; 0x38 5e4fc: e3530000 cmp r3, #0 5e500: 0a000004 beq 5e518 <_rename_r+0x200> 5e504: e593301c ldr r3, [r3, #28] 5e508: e3530000 cmp r3, #0 5e50c: 11a00007 movne r0, r7 5e510: 11a0e00f movne lr, pc 5e514: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 5e518: ebff9848 bl 44640 <__errno> 5e51c: e3a03012 mov r3, #18 5e520: e5803000 str r3, [r0] 5e524: e3e06000 mvn r6, #0 5e528: eaffffdd b 5e4a4 <_rename_r+0x18c> name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 5e52c: e3580000 cmp r8, #0 5e530: 1a000001 bne 5e53c <_rename_r+0x224> result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5e534: e3e06000 mvn r6, #0 <== NOT EXECUTED 5e538: eaffffd9 b 5e4a4 <_rename_r+0x18c> <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5e53c: e59d3024 ldr r3, [sp, #36] ; 0x24 5e540: e3530000 cmp r3, #0 5e544: 0afffffa beq 5e534 <_rename_r+0x21c> 5e548: e593301c ldr r3, [r3, #28] 5e54c: e3530000 cmp r3, #0 5e550: 0afffff7 beq 5e534 <_rename_r+0x21c> 5e554: e1a00004 mov r0, r4 5e558: e1a0e00f mov lr, pc 5e55c: e12fff13 bx r3 5e560: e3e06000 mvn r6, #0 5e564: eaffffce b 5e4a4 <_rename_r+0x18c> old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 5e568: e28d4018 add r4, sp, #24 5e56c: e3a0c000 mov ip, #0 5e570: e1a00005 mov r0, r5 5e574: e1a01007 mov r1, r7 5e578: e3a02002 mov r2, #2 5e57c: e1a03004 mov r3, r4 5e580: e58dc000 str ip, [sp] 5e584: ebfea5d7 bl 7ce8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 5e588: e3500000 cmp r0, #0 5e58c: 1affffe8 bne 5e534 <_rename_r+0x21c> 5e590: e3a08001 mov r8, #1 5e594: eaffff6d b 5e350 <_rename_r+0x38> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 5e598: e59d3010 ldr r3, [sp, #16] 5e59c: e3530000 cmp r3, #0 5e5a0: 0a000004 beq 5e5b8 <_rename_r+0x2a0> 5e5a4: e593301c ldr r3, [r3, #28] 5e5a8: e3530000 cmp r3, #0 5e5ac: 11a00005 movne r0, r5 5e5b0: 11a0e00f movne lr, pc 5e5b4: 112fff13 bxne r3 if ( free_old_parentloc ) 5e5b8: e3580000 cmp r8, #0 5e5bc: 0a000007 beq 5e5e0 <_rename_r+0x2c8> rtems_filesystem_freenode( &old_parent_loc ); 5e5c0: e59d3024 ldr r3, [sp, #36] ; 0x24 5e5c4: e3530000 cmp r3, #0 5e5c8: 0a000004 beq 5e5e0 <_rename_r+0x2c8> 5e5cc: e593301c ldr r3, [r3, #28] 5e5d0: e3530000 cmp r3, #0 5e5d4: 11a00004 movne r0, r4 5e5d8: 11a0e00f movne lr, pc 5e5dc: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5e5e0: e59d3038 ldr r3, [sp, #56] ; 0x38 5e5e4: e3530000 cmp r3, #0 5e5e8: 0affffd1 beq 5e534 <_rename_r+0x21c> 5e5ec: e593301c ldr r3, [r3, #28] 5e5f0: e3530000 cmp r3, #0 5e5f4: 0affffce beq 5e534 <_rename_r+0x21c> 5e5f8: e1a00007 mov r0, r7 5e5fc: e1a0e00f mov lr, pc 5e600: e12fff13 bx r3 5e604: e3e06000 mvn r6, #0 5e608: eaffffa5 b 5e4a4 <_rename_r+0x18c> rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 5e60c: e593301c ldr r3, [r3, #28] 5e610: e3530000 cmp r3, #0 5e614: 11a00005 movne r0, r5 5e618: 11a0e00f movne lr, pc 5e61c: 112fff13 bxne r3 if ( free_old_parentloc ) 5e620: e3580000 cmp r8, #0 5e624: 0a000007 beq 5e648 <_rename_r+0x330> rtems_filesystem_freenode( &old_parent_loc ); 5e628: e59d3024 ldr r3, [sp, #36] ; 0x24 5e62c: e3530000 cmp r3, #0 5e630: 0a000004 beq 5e648 <_rename_r+0x330> 5e634: e593301c ldr r3, [r3, #28] 5e638: e3530000 cmp r3, #0 5e63c: 11a00004 movne r0, r4 5e640: 11a0e00f movne lr, pc 5e644: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5e648: e59d3038 ldr r3, [sp, #56] ; 0x38 5e64c: e3530000 cmp r3, #0 5e650: 0a000004 beq 5e668 <_rename_r+0x350> 5e654: e593301c ldr r3, [r3, #28] 5e658: e3530000 cmp r3, #0 5e65c: 11a00007 movne r0, r7 5e660: 11a0e00f movne lr, pc 5e664: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 5e668: ebff97f4 bl 44640 <__errno> 5e66c: e3a03086 mov r3, #134 ; 0x86 5e670: e5803000 str r3, [r0] 5e674: e3e06000 mvn r6, #0 5e678: eaffff89 b 5e4a4 <_rename_r+0x18c> =============================================================================== 00009720 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 9720: e1a00001 mov r0, r1 <== NOT EXECUTED 9724: e1a01002 mov r1, r2 <== NOT EXECUTED 9728: eaffffc2 b 9638 <== NOT EXECUTED =============================================================================== 0000e7c4 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); e7c4: e1a00001 mov r0, r1 <== NOT EXECUTED e7c8: eaffff6c b e580 <== NOT EXECUTED =============================================================================== 00028e00 : #include int chdir( const char *pathname ) { 28e00: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 28e04: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { 28e08: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 28e0c: 0a000031 beq 28ed8 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 28e10: eb008918 bl 4b278 28e14: e28d4004 add r4, sp, #4 28e18: e3a0c001 mov ip, #1 28e1c: e1a01000 mov r1, r0 28e20: e1a0200c mov r2, ip 28e24: e1a00005 mov r0, r5 28e28: e1a03004 mov r3, r4 28e2c: e58dc000 str ip, [sp] 28e30: ebff7bac bl 7ce8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 28e34: e3500000 cmp r0, #0 28e38: 1a000024 bne 28ed0 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 28e3c: e59d2010 ldr r2, [sp, #16] 28e40: e5923010 ldr r3, [r2, #16] 28e44: e3530000 cmp r3, #0 28e48: 0a000018 beq 28eb0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 28e4c: e1a00004 mov r0, r4 28e50: e1a0e00f mov lr, pc 28e54: e12fff13 bx r3 28e58: e3500001 cmp r0, #1 28e5c: 1a000022 bne 28eec rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 28e60: e59f50b8 ldr r5, [pc, #184] ; 28f20 28e64: e595c000 ldr ip, [r5] 28e68: e59c3010 ldr r3, [ip, #16] 28e6c: e3530000 cmp r3, #0 28e70: 0a000006 beq 28e90 28e74: e593301c ldr r3, [r3, #28] 28e78: e3530000 cmp r3, #0 28e7c: 0a000003 beq 28e90 28e80: e28c0004 add r0, ip, #4 28e84: e1a0e00f mov lr, pc 28e88: e12fff13 bx r3 28e8c: e595c000 ldr ip, [r5] rtems_filesystem_current = loc; 28e90: e8b4000f ldm r4!, {r0, r1, r2, r3} 28e94: e28cc004 add ip, ip, #4 28e98: e8ac000f stmia ip!, {r0, r1, r2, r3} 28e9c: e5943000 ldr r3, [r4] 28ea0: e58c3000 str r3, [ip] 28ea4: e3a00000 mov r0, #0 return 0; } 28ea8: e28dd018 add sp, sp, #24 28eac: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 28eb0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 28eb4: e3530000 cmp r3, #0 <== NOT EXECUTED 28eb8: 11a00004 movne r0, r4 <== NOT EXECUTED 28ebc: 11a0e00f movne lr, pc <== NOT EXECUTED 28ec0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 28ec4: eb006ddd bl 44640 <__errno> <== NOT EXECUTED 28ec8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28ecc: e5803000 str r3, [r0] <== NOT EXECUTED 28ed0: e3e00000 mvn r0, #0 28ed4: eafffff3 b 28ea8 { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 28ed8: eb006dd8 bl 44640 <__errno> 28edc: e3a0300e mov r3, #14 28ee0: e5803000 str r3, [r0] 28ee4: e3e00000 mvn r0, #0 28ee8: eaffffee b 28ea8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 28eec: e59d3010 ldr r3, [sp, #16] 28ef0: e3530000 cmp r3, #0 28ef4: 0a000004 beq 28f0c 28ef8: e593301c ldr r3, [r3, #28] 28efc: e3530000 cmp r3, #0 28f00: 11a00004 movne r0, r4 28f04: 11a0e00f movne lr, pc 28f08: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 28f0c: eb006dcb bl 44640 <__errno> 28f10: e3a03014 mov r3, #20 28f14: e5803000 str r3, [r0] 28f18: e3e00000 mvn r0, #0 28f1c: eaffffe1 b 28ea8 =============================================================================== 000077a8 : int chmod( const char *path, mode_t mode ) { 77a8: e92d4070 push {r4, r5, r6, lr} 77ac: e24dd018 sub sp, sp, #24 77b0: e1a05001 mov r5, r1 77b4: e1a06000 mov r6, r0 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 77b8: eb010eae bl 4b278 77bc: e28d4004 add r4, sp, #4 77c0: e1a01000 mov r1, r0 77c4: e3a0c001 mov ip, #1 77c8: e1a00006 mov r0, r6 77cc: e3a02000 mov r2, #0 77d0: e1a03004 mov r3, r4 77d4: e58dc000 str ip, [sp] 77d8: eb000142 bl 7ce8 if ( status != 0 ) 77dc: e3500000 cmp r0, #0 77e0: 1a000020 bne 7868 return -1; if ( !loc.handlers ){ 77e4: e59d300c ldr r3, [sp, #12] 77e8: e3530000 cmp r3, #0 77ec: 0a000012 beq 783c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 77f0: e593301c ldr r3, [r3, #28] 77f4: e3530000 cmp r3, #0 77f8: 0a00001c beq 7870 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 77fc: e1a01005 mov r1, r5 7800: e1a00004 mov r0, r4 7804: e1a0e00f mov lr, pc 7808: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 780c: e59d3010 ldr r3, [sp, #16] 7810: e3530000 cmp r3, #0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 7814: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 7818: 0a000004 beq 7830 781c: e593301c ldr r3, [r3, #28] 7820: e3530000 cmp r3, #0 7824: 11a00004 movne r0, r4 7828: 11a0e00f movne lr, pc 782c: 112fff13 bxne r3 return result; } 7830: e1a00005 mov r0, r5 7834: e28dd018 add sp, sp, #24 7838: e8bd8070 pop {r4, r5, r6, pc} status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 783c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 7840: e3530000 cmp r3, #0 <== NOT EXECUTED 7844: 0a000004 beq 785c <== NOT EXECUTED 7848: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 784c: e3530000 cmp r3, #0 <== NOT EXECUTED 7850: 11a00004 movne r0, r4 <== NOT EXECUTED 7854: 11a0e00f movne lr, pc <== NOT EXECUTED 7858: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 785c: eb00f377 bl 44640 <__errno> <== NOT EXECUTED 7860: e3a03009 mov r3, #9 <== NOT EXECUTED 7864: e5803000 str r3, [r0] <== NOT EXECUTED 7868: e3e05000 mvn r5, #0 786c: eaffffef b 7830 } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 7870: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 7874: e3530000 cmp r3, #0 <== NOT EXECUTED 7878: 0a000004 beq 7890 <== NOT EXECUTED 787c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 7880: e3530000 cmp r3, #0 <== NOT EXECUTED 7884: 11a00004 movne r0, r4 <== NOT EXECUTED 7888: 11a0e00f movne lr, pc <== NOT EXECUTED 788c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 7890: eb00f36a bl 44640 <__errno> <== NOT EXECUTED 7894: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 7898: e5803000 str r3, [r0] <== NOT EXECUTED 789c: e3e05000 mvn r5, #0 <== NOT EXECUTED 78a0: eaffffe2 b 7830 <== NOT EXECUTED =============================================================================== 00028f24 : int chown( const char *path, uid_t owner, gid_t group ) { 28f24: e92d40f0 push {r4, r5, r6, r7, lr} 28f28: e1a01801 lsl r1, r1, #16 28f2c: e24dd018 sub sp, sp, #24 28f30: e1a02802 lsl r2, r2, #16 28f34: e1a06821 lsr r6, r1, #16 28f38: e1a05822 lsr r5, r2, #16 28f3c: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 28f40: eb0088cc bl 4b278 28f44: e28d4004 add r4, sp, #4 28f48: e1a01000 mov r1, r0 28f4c: e3a0c001 mov ip, #1 28f50: e1a00007 mov r0, r7 28f54: e3a02000 mov r2, #0 28f58: e1a03004 mov r3, r4 28f5c: e58dc000 str ip, [sp] 28f60: ebff7b60 bl 7ce8 28f64: e3500000 cmp r0, #0 28f68: 1a00001c bne 28fe0 return -1; if ( !loc.ops->chown_h ) { 28f6c: e59d2010 ldr r2, [sp, #16] 28f70: e5923018 ldr r3, [r2, #24] 28f74: e3530000 cmp r3, #0 28f78: 0a000010 beq 28fc0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 28f7c: e1a02005 mov r2, r5 28f80: e1a01006 mov r1, r6 28f84: e1a00004 mov r0, r4 28f88: e1a0e00f mov lr, pc 28f8c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 28f90: e59d3010 ldr r3, [sp, #16] 28f94: e3530000 cmp r3, #0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 28f98: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 28f9c: 0a000004 beq 28fb4 28fa0: e593301c ldr r3, [r3, #28] 28fa4: e3530000 cmp r3, #0 28fa8: 11a00004 movne r0, r4 28fac: 11a0e00f movne lr, pc 28fb0: 112fff13 bxne r3 return result; } 28fb4: e1a00005 mov r0, r5 28fb8: e28dd018 add sp, sp, #24 28fbc: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 28fc0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 28fc4: e3530000 cmp r3, #0 <== NOT EXECUTED 28fc8: 11a00004 movne r0, r4 <== NOT EXECUTED 28fcc: 11a0e00f movne lr, pc <== NOT EXECUTED 28fd0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 28fd4: eb006d99 bl 44640 <__errno> <== NOT EXECUTED 28fd8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28fdc: e5803000 str r3, [r0] <== NOT EXECUTED 28fe0: e3e05000 mvn r5, #0 28fe4: eafffff2 b 28fb4 =============================================================================== 00028fe8 : #include int chroot( const char *pathname ) { 28fe8: e92d4070 push {r4, r5, r6, lr} int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 28fec: e59f50d8 ldr r5, [pc, #216] ; 290cc 28ff0: e59f30d8 ldr r3, [pc, #216] ; 290d0 28ff4: e5954000 ldr r4, [r5] 28ff8: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 28ffc: e24dd018 sub sp, sp, #24 29000: e1a06000 mov r6, r0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 29004: 0a000020 beq 2908c rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 29008: e1a00006 mov r0, r6 2900c: ebffff7b bl 28e00 if (result) { 29010: e250c000 subs ip, r0, #0 29014: 1a000025 bne 290b0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 29018: e28d4004 add r4, sp, #4 2901c: e1a0200c mov r2, ip 29020: e59f00ac ldr r0, [pc, #172] ; 290d4 29024: e3a01001 mov r1, #1 29028: e1a03004 mov r3, r4 2902c: e58dc000 str ip, [sp] 29030: ebff7b2c bl 7ce8 29034: e3500000 cmp r0, #0 29038: 1a00001c bne 290b0 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 2903c: e595c000 ldr ip, [r5] 29040: e59c3024 ldr r3, [ip, #36] ; 0x24 29044: e3530000 cmp r3, #0 29048: 0a000007 beq 2906c 2904c: e593301c ldr r3, [r3, #28] 29050: e3530000 cmp r3, #0 29054: 0a000004 beq 2906c 29058: e28c0018 add r0, ip, #24 2905c: e1a0e00f mov lr, pc 29060: e12fff13 bx r3 29064: e59f3060 ldr r3, [pc, #96] ; 290cc 29068: e593c000 ldr ip, [r3] rtems_filesystem_root = loc; 2906c: e8b4000f ldm r4!, {r0, r1, r2, r3} 29070: e28cc018 add ip, ip, #24 29074: e8ac000f stmia ip!, {r0, r1, r2, r3} 29078: e5943000 ldr r3, [r4] 2907c: e58c3000 str r3, [ip] 29080: e3a00000 mov r0, #0 return 0; } 29084: e28dd018 add sp, sp, #24 29088: e8bd8070 pop {r4, r5, r6, pc} int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 2908c: eb0005d3 bl 2a7e0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 29090: e5953000 ldr r3, [r5] 29094: e1530004 cmp r3, r4 29098: 1affffda bne 29008 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2909c: eb006d67 bl 44640 <__errno> <== NOT EXECUTED 290a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 290a4: e5803000 str r3, [r0] <== NOT EXECUTED 290a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 290ac: eafffff4 b 29084 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 290b0: eb006d62 bl 44640 <__errno> <== NOT EXECUTED 290b4: e1a04000 mov r4, r0 <== NOT EXECUTED 290b8: eb006d60 bl 44640 <__errno> <== NOT EXECUTED 290bc: e5903000 ldr r3, [r0] <== NOT EXECUTED 290c0: e3e00000 mvn r0, #0 <== NOT EXECUTED 290c4: e5843000 str r3, [r4] <== NOT EXECUTED 290c8: eaffffed b 29084 <== NOT EXECUTED =============================================================================== 00002334 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2334: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 2338: e59f61a0 ldr r6, [pc, #416] ; 24e0 233c: e5967000 ldr r7, [r6] 2340: e1500007 cmp r0, r7 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2344: e24dd004 sub sp, sp, #4 2348: e1a05000 mov r5, r0 234c: e1a04001 mov r4, r1 2350: e1a09002 mov r9, r2 2354: e1a0b003 mov fp, r3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 2358: 35968004 ldrcc r8, [r6, #4] 235c: 2a000043 bcs 2470 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2360: e7987185 ldr r7, [r8, r5, lsl #3] 2364: e1a0a185 lsl sl, r5, #3 2368: e3570000 cmp r7, #0 236c: e088800a add r8, r8, sl 2370: 05988004 ldreq r8, [r8, #4] 2374: 0a000026 beq 2414 2378: e5988004 ldr r8, [r8, #4] 237c: e1540008 cmp r4, r8 2380: 2a000023 bcs 2414 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 2384: e0976104 adds r6, r7, r4, lsl #2 2388: 0a000048 beq 24b0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 238c: e7973104 ldr r3, [r7, r4, lsl #2] 2390: e3530000 cmp r3, #0 2394: 13a0000c movne r0, #12 2398: 0a000001 beq 23a4 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 239c: e28dd004 add sp, sp, #4 23a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 23a4: e3a00034 mov r0, #52 ; 0x34 23a8: eb00042d bl 3464 if (dd == NULL) { 23ac: e2507000 subs r7, r0, #0 23b0: 0a00003e beq 24b0 return RTEMS_NO_MEMORY; } if (name != NULL) { 23b4: e3590000 cmp r9, #0 23b8: 0a00000c beq 23f0 alloc_name = strdup(name); 23bc: e1a00009 mov r0, r9 23c0: eb004856 bl 14520 if (alloc_name == NULL) { 23c4: e3500000 cmp r0, #0 if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 23c8: e1a08000 mov r8, r0 23cc: e1a09000 mov r9, r0 if (alloc_name == NULL) { 23d0: 0a00003e beq 24d0 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 23d4: e3a01c61 mov r1, #24832 ; 0x6100 23d8: e28110ff add r1, r1, #255 ; 0xff 23dc: e1a02005 mov r2, r5 23e0: e1a03004 mov r3, r4 23e4: eb000461 bl 3570 23e8: e3500000 cmp r0, #0 23ec: ba000031 blt 24b8 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 23f0: e3a00000 mov r0, #0 dd->deleted = false; *dd_entry = dd; 23f4: e5867000 str r7, [r6] free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 23f8: e5875000 str r5, [r7] dd->name = alloc_name; dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 23fc: e58b7000 str r7, [fp] free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 2400: e5874004 str r4, [r7, #4] dd->name = alloc_name; 2404: e5879010 str r9, [r7, #16] dd->uses = 0; 2408: e5870014 str r0, [r7, #20] dd->deleted = false; 240c: e5c70030 strb r0, [r7, #48] ; 0x30 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 2410: eaffffe1 b 239c if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 2414: e3580000 cmp r8, #0 2418: 03a03008 moveq r3, #8 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 241c: 11a03088 lslne r3, r8, #1 } if (minor >= new_size) { 2420: e1540003 cmp r4, r3 new_size = minor + 1; 2424: 22843001 addcs r3, r4, #1 } table = realloc(table, new_size * sizeof(*table)); 2428: e1a00007 mov r0, r7 242c: e1a01103 lsl r1, r3, #2 2430: e58d3000 str r3, [sp] 2434: eb0006f3 bl 4008 if (table == NULL) { 2438: e2507000 subs r7, r0, #0 243c: e59d3000 ldr r3, [sp] 2440: 0a00001a beq 24b0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2444: e0682003 rsb r2, r8, r3 2448: e1a02102 lsl r2, r2, #2 244c: e0870108 add r0, r7, r8, lsl #2 2450: e3a01000 mov r1, #0 2454: eb0046b6 bl 13f34 disktab [major].minor = table; 2458: e5962004 ldr r2, [r6, #4] disktab [major].size = new_size; 245c: e59d3000 ldr r3, [sp] if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; 2460: e082a00a add sl, r2, sl disktab [major].size = new_size; 2464: e58a3004 str r3, [sl, #4] if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; 2468: e7827185 str r7, [r2, r5, lsl #3] 246c: eaffffc4 b 2384 rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2470: e1a0a087 lsl sl, r7, #1 if (major >= new_size) { 2474: e150000a cmp r0, sl new_size = major + 1; 2478: 2285a001 addcs sl, r5, #1 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 247c: e5960004 ldr r0, [r6, #4] if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 2480: e1a0118a lsl r1, sl, #3 2484: eb0006df bl 4008 if (table == NULL) { 2488: e2508000 subs r8, r0, #0 248c: 0a000007 beq 24b0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2490: e067200a rsb r2, r7, sl <== NOT EXECUTED 2494: e0880187 add r0, r8, r7, lsl #3 <== NOT EXECUTED 2498: e1a02182 lsl r2, r2, #3 <== NOT EXECUTED 249c: e3a01000 mov r1, #0 <== NOT EXECUTED 24a0: eb0046a3 bl 13f34 <== NOT EXECUTED disktab = table; disktab_size = new_size; 24a4: e586a000 str sl, [r6] <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; 24a8: e5868004 str r8, [r6, #4] <== NOT EXECUTED 24ac: eaffffab b 2360 <== NOT EXECUTED dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 24b0: e3a0001a mov r0, #26 24b4: eaffffb8 b 239c } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 24b8: e1a00008 mov r0, r8 <== NOT EXECUTED 24bc: eb00030f bl 3100 <== NOT EXECUTED free(dd); 24c0: e1a00007 mov r0, r7 <== NOT EXECUTED 24c4: eb00030d bl 3100 <== NOT EXECUTED 24c8: e3a0000d mov r0, #13 <== NOT EXECUTED return RTEMS_UNSATISFIED; 24cc: eaffffb2 b 239c <== NOT EXECUTED if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 24d0: e1a00007 mov r0, r7 <== NOT EXECUTED 24d4: eb000309 bl 3100 <== NOT EXECUTED 24d8: e3a0001a mov r0, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 24dc: eaffffae b 239c <== NOT EXECUTED =============================================================================== 000089b0 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 89b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 89b4: e3d2a007 bics sl, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 89b8: e1a09000 mov r9, r0 89bc: e1a04001 mov r4, r1 89c0: e1a0b003 mov fp, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 89c4: 1a000028 bne 8a6c rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 89c8: e5937000 ldr r7, [r3] if (!device_name_table) 89cc: e3570000 cmp r7, #0 89d0: 0a00002a beq 8a80 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 89d4: e59f30b8 ldr r3, [pc, #184] ; 8a94 89d8: e5938000 ldr r8, [r3] 89dc: e3580000 cmp r8, #0 rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 89e0: 11a0500a movne r5, sl for (i = 0; i < rtems_device_table_size; i++) { 89e4: 0a000011 beq 8a30 if (!device_name_table[i].device_name) 89e8: e08aa10a add sl, sl, sl, lsl #2 89ec: e797610a ldr r6, [r7, sl, lsl #2] 89f0: e3560000 cmp r6, #0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 89f4: e1a00009 mov r0, r9 89f8: e1a02004 mov r2, r4 89fc: e1a01006 mov r1, r6 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8a00: e2855001 add r5, r5, #1 if (!device_name_table[i].device_name) 8a04: e087a10a add sl, r7, sl, lsl #2 8a08: 0a000005 beq 8a24 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8a0c: eb000d69 bl bfb8 8a10: e3500000 cmp r0, #0 8a14: 1a000002 bne 8a24 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8a18: e7d60004 ldrb r0, [r6, r4] 8a1c: e3500000 cmp r0, #0 8a20: 0a000007 beq 8a44 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8a24: e1580005 cmp r8, r5 8a28: e1a0a005 mov sl, r5 8a2c: 8affffed bhi 89e8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8a30: eb0009aa bl b0e0 <__errno> 8a34: e3a03002 mov r3, #2 8a38: e5803000 str r3, [r0] 8a3c: e3e00000 mvn r0, #0 } 8a40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8a44: e59f304c ldr r3, [pc, #76] ; 8a98 8a48: e5933000 ldr r3, [r3] 8a4c: e5933028 ldr r3, [r3, #40] ; 0x28 8a50: e58b3010 str r3, [fp, #16] if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 8a54: e59f3040 ldr r3, [pc, #64] ; 8a9c 8a58: e58b3008 str r3, [fp, #8] pathloc->ops = &devFS_ops; 8a5c: e59f303c ldr r3, [pc, #60] ; 8aa0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 8a60: e58ba000 str sl, [fp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 8a64: e58b300c str r3, [fp, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 8a68: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 8a6c: eb00099b bl b0e0 <__errno> <== NOT EXECUTED 8a70: e3a03001 mov r3, #1 <== NOT EXECUTED 8a74: e5803000 str r3, [r0] <== NOT EXECUTED 8a78: e3e00000 mvn r0, #0 <== NOT EXECUTED 8a7c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 8a80: eb000996 bl b0e0 <__errno> <== NOT EXECUTED 8a84: e3a0300e mov r3, #14 <== NOT EXECUTED 8a88: e5803000 str r3, [r0] <== NOT EXECUTED 8a8c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8a90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 0000137c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 137c: e92d4070 push {r4, r5, r6, lr} rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 1380: e59f605c ldr r6, [pc, #92] ; 13e4 1384: e5963000 ldr r3, [r6] 1388: e0833103 add r3, r3, r3, lsl #2 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 138c: e1a04000 mov r4, r0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 1390: e1a00103 lsl r0, r3, #2 1394: eb001c55 bl 84f0 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 1398: e2505000 subs r5, r0, #0 139c: 0a00000b beq 13d0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 13a0: e5962000 ldr r2, [r6] 13a4: e0822102 add r2, r2, r2, lsl #2 13a8: e1a02102 lsl r2, r2, #2 13ac: e3a01000 mov r1, #0 13b0: eb002978 bl b998 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 13b4: e59f302c ldr r3, [pc, #44] ; 13e8 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 13b8: e2832038 add r2, r3, #56 ; 0x38 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 13bc: e584501c str r5, [r4, #28] sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 13c0: e5842028 str r2, [r4, #40] ; 0x28 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 13c4: e5843024 str r3, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 13c8: e3a00000 mov r0, #0 return 0; } 13cc: e8bd8070 pop {r4, r5, r6, pc} sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 13d0: eb002742 bl b0e0 <__errno> <== NOT EXECUTED 13d4: e3a0300c mov r3, #12 <== NOT EXECUTED 13d8: e5803000 str r3, [r0] <== NOT EXECUTED 13dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 13e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00001558 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1558: e52de004 push {lr} ; (str lr, [sp, #-4]!) 155c: e24dd010 sub sp, sp, #16 1560: e1a03000 mov r3, r0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 1564: e58d1004 str r1, [sp, #4] { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 1568: e5900038 ldr r0, [r0, #56] ; 0x38 args.iop = iop; args.command = command; args.buffer = buffer; 156c: e58d2008 str r2, [sp, #8] status = rtems_io_control( 1570: e590100c ldr r1, [r0, #12] 1574: e1a0200d mov r2, sp 1578: e5900008 ldr r0, [r0, #8] rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 157c: e58d3000 str r3, [sp] args.command = command; args.buffer = buffer; status = rtems_io_control( 1580: eb00107e bl 5780 np->major, np->minor, (void *) &args ); if ( status ) 1584: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; 1588: 059d000c ldreq r0, [sp, #12] np->major, np->minor, (void *) &args ); if ( status ) 158c: 1a000001 bne 1598 return rtems_deviceio_errno(status); return args.ioctl_return; } 1590: e28dd010 add sp, sp, #16 1594: e8bd8000 pop {pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1598: eb001d41 bl 8aa4 <== NOT EXECUTED 159c: eafffffb b 1590 <== NOT EXECUTED =============================================================================== 000013ec : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 13ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13f0: e1a04000 mov r4, r0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 13f4: e5d00000 ldrb r0, [r0] 13f8: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 13fc: e1a05001 mov r5, r1 1400: e1a06002 mov r6, r2 1404: e1a0b003 mov fp, r3 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 1408: 0a000036 beq 14e8 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 140c: e2053a0f and r3, r5, #61440 ; 0xf000 1410: e3530a02 cmp r3, #8192 ; 0x2000 1414: 13530a06 cmpne r3, #24576 ; 0x6000 1418: 03a03000 moveq r3, #0 141c: 13a03001 movne r3, #1 1420: 1a00003a bne 1510 rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 1424: e59d2024 ldr r2, [sp, #36] ; 0x24 1428: e5928000 ldr r8, [r2] if (!device_name_table) 142c: e3580000 cmp r8, #0 1430: 0a000040 beq 1538 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 1434: e59f2110 ldr r2, [pc, #272] ; 154c 1438: e592a000 ldr sl, [r2] 143c: e35a0000 cmp sl, #0 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 1440: 13e09000 mvnne r9, #0 1444: 11a07003 movne r7, r3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 1448: 1a000007 bne 146c 144c: ea000034 b 1524 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 1450: eb0029f8 bl bc38 <== NOT EXECUTED 1454: e3500000 cmp r0, #0 <== NOT EXECUTED 1458: 0a00001d beq 14d4 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 145c: e2877001 add r7, r7, #1 <== NOT EXECUTED 1460: e157000a cmp r7, sl <== NOT EXECUTED 1464: e1a03007 mov r3, r7 <== NOT EXECUTED 1468: 2a000009 bcs 1494 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 146c: e0833103 add r3, r3, r3, lsl #2 1470: e7983103 ldr r3, [r8, r3, lsl #2] 1474: e2531000 subs r1, r3, #0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 1478: e1a00004 mov r0, r4 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 147c: 1afffff3 bne 1450 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 1480: e1a09007 mov r9, r7 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 1484: e2877001 add r7, r7, #1 1488: e157000a cmp r7, sl 148c: e1a03007 mov r3, r7 1490: 3afffff5 bcc 146c else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 1494: e3790001 cmn r9, #1 1498: 0a000021 beq 1524 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 149c: e10f7000 mrs r7, CPSR 14a0: e3873080 orr r3, r7, #128 ; 0x80 14a4: e129f003 msr CPSR_fc, r3 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 14a8: e0899109 add r9, r9, r9, lsl #2 14ac: e1a09109 lsl r9, r9, #2 14b0: e7884009 str r4, [r8, r9] device_name_table[slot].device_name_length = strlen(path); 14b4: e1a00004 mov r0, r4 14b8: eb002aa6 bl bf58 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 14bc: e0888009 add r8, r8, r9 device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 14c0: e5885010 str r5, [r8, #16] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 14c4: e9880841 stmib r8, {r0, r6, fp} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 14c8: e129f007 msr CPSR_fc, r7 14cc: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 14d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 14d4: eb002701 bl b0e0 <__errno> <== NOT EXECUTED 14d8: e3a03011 mov r3, #17 <== NOT EXECUTED 14dc: e5803000 str r3, [r0] <== NOT EXECUTED 14e0: e3e00000 mvn r0, #0 <== NOT EXECUTED 14e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 14e8: e5d43001 ldrb r3, [r4, #1] 14ec: e3530065 cmp r3, #101 ; 0x65 14f0: 1affffc5 bne 140c (path[2] == 'v') && (path[3] == '\0')) 14f4: e5d43002 ldrb r3, [r4, #2] 14f8: e3530076 cmp r3, #118 ; 0x76 14fc: 1affffc2 bne 140c 1500: e5d40003 ldrb r0, [r4, #3] 1504: e3500000 cmp r0, #0 1508: 1affffbf bne 140c 150c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 1510: eb0026f2 bl b0e0 <__errno> <== NOT EXECUTED 1514: e3a03016 mov r3, #22 <== NOT EXECUTED 1518: e5803000 str r3, [r0] <== NOT EXECUTED 151c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1520: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 1524: eb0026ed bl b0e0 <__errno> <== NOT EXECUTED 1528: e3a0300c mov r3, #12 <== NOT EXECUTED 152c: e5803000 str r3, [r0] <== NOT EXECUTED 1530: e3e00000 mvn r0, #0 <== NOT EXECUTED 1534: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 1538: eb0026e8 bl b0e0 <__errno> <== NOT EXECUTED 153c: e3a0300e mov r3, #14 <== NOT EXECUTED 1540: e5803000 str r3, [r0] <== NOT EXECUTED 1544: e3e00000 mvn r0, #0 <== NOT EXECUTED 1548: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000015e0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 15e0: e92d4800 push {fp, lr} <== NOT EXECUTED 15e4: e1a03000 mov r3, r0 <== NOT EXECUTED 15e8: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 15ec: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 15f0: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 15f4: e3a02000 mov r2, #0 <== NOT EXECUTED 15f8: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 15fc: e58d0014 str r0, [sp, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 1600: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 1604: e283c00c add ip, r3, #12 <== NOT EXECUTED 1608: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; 160c: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1610: e2820008 add r0, r2, #8 <== NOT EXECUTED 1614: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 1618: e1a0200d mov r2, sp <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 161c: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 1620: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1624: eb0010b7 bl 5908 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 1628: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 162c: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 1630: 1a000001 bne 163c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 1634: e28dd01c add sp, sp, #28 <== NOT EXECUTED 1638: e8bd8800 pop {fp, pc} <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 163c: eb001d18 bl 8aa4 <== NOT EXECUTED 1640: eafffffb b 1634 <== NOT EXECUTED =============================================================================== 00001644 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 1644: e5903000 ldr r3, [r0] if (!the_dev) 1648: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 164c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) 1650: 0a000007 beq 1674 rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 1654: e5930010 ldr r0, [r3, #16] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 1658: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 165c: e5933008 ldr r3, [r3, #8] 1660: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 1664: e581000c str r0, [r1, #12] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 1668: e5813018 str r3, [r1, #24] buf->st_mode = the_dev->mode; 166c: e3a00000 mov r0, #0 return 0; } 1670: e49df004 pop {pc} ; (ldr pc, [sp], #4) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 1674: eb002699 bl b0e0 <__errno> <== NOT EXECUTED 1678: e3a0300e mov r3, #14 <== NOT EXECUTED 167c: e5803000 str r3, [r0] <== NOT EXECUTED 1680: e3e00000 mvn r0, #0 <== NOT EXECUTED 1684: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00001688 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1688: e92d4800 push {fp, lr} 168c: e1a03000 mov r3, r0 1690: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 1694: e5900014 ldr r0, [r0, #20] np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 1698: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; 169c: e3a02000 mov r2, #0 16a0: e58d2018 str r2, [sp, #24] args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 16a4: e58d0014 str r0, [sp, #20] { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 16a8: e5932038 ldr r2, [r3, #56] ; 0x38 args.iop = iop; args.offset = iop->offset; 16ac: e283c00c add ip, r3, #12 16b0: e89c1800 ldm ip, {fp, ip} args.buffer = (void *) buffer; 16b4: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 16b8: e2820008 add r0, r2, #8 16bc: e8900003 ldm r0, {r0, r1} 16c0: e1a0200d mov r2, sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 16c4: e98d1800 stmib sp, {fp, ip} rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 16c8: e58d3000 str r3, [sp] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 16cc: eb0010a1 bl 5958 np->major, np->minor, (void *) &args ); if ( status ) 16d0: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 16d4: 059d0018 ldreq r0, [sp, #24] np->major, np->minor, (void *) &args ); if ( status ) 16d8: 1a000001 bne 16e4 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } 16dc: e28dd01c add sp, sp, #28 16e0: e8bd8800 pop {fp, pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 16e4: eb001cee bl 8aa4 <== NOT EXECUTED 16e8: eafffffb b 16dc <== NOT EXECUTED =============================================================================== 0000def0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { def0: e52de004 push {lr} ; (str lr, [sp, #-4]!) def4: e24dd010 sub sp, sp, #16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; def8: e88d0007 stm sp, {r0, r1, r2} the_jnode = iop->file_info; defc: e5903038 ldr r3, [r0, #56] ; 0x38 status = rtems_io_control( df00: e1a0200d mov r2, sp df04: e2830050 add r0, r3, #80 ; 0x50 df08: e8900003 ldm r0, {r0, r1} df0c: eb0004ee bl f2cc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) df10: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; df14: 059d000c ldreq r0, [sp, #12] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) df18: 1a000001 bne df24 return rtems_deviceio_errno(status); return args.ioctl_return; } df1c: e28dd010 add sp, sp, #16 df20: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); df24: eb0005a2 bl f5b4 <== NOT EXECUTED df28: eafffffb b df1c <== NOT EXECUTED =============================================================================== 0000df8c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { df8c: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; df90: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; df94: e280c00c add ip, r0, #12 df98: e89c1800 ldm ip, {fp, ip} ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { df9c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; dfa0: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; dfa4: e98d1800 stmib sp, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; dfa8: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; dfac: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; dfb0: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; dfb4: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; dfb8: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; dfbc: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dfc0: e1a0200d mov r2, sp dfc4: e2830050 add r0, r3, #80 ; 0x50 dfc8: e8900003 ldm r0, {r0, r1} dfcc: eb0004e6 bl f36c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) dfd0: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; dfd4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) dfd8: 1a000001 bne dfe4 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } dfdc: e28dd01c add sp, sp, #28 <== NOT EXECUTED dfe0: e8bd8800 pop {fp, pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dfe4: eb000572 bl f5b4 <== NOT EXECUTED dfe8: eafffffb b dfdc <== NOT EXECUTED =============================================================================== 0000df2c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { df2c: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; df30: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; df34: e280c00c add ip, r0, #12 df38: e89c1800 ldm ip, {fp, ip} ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { df3c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; df40: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; df44: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; df48: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; df4c: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; df50: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; df54: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; df58: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; df5c: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( df60: e1a0200d mov r2, sp df64: e2830050 add r0, r3, #80 ; 0x50 df68: e8900003 ldm r0, {r0, r1} df6c: eb000512 bl f3bc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) df70: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; df74: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) df78: 1a000001 bne df84 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } df7c: e28dd01c add sp, sp, #28 df80: e8bd8800 pop {fp, pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); df84: eb00058a bl f5b4 <== NOT EXECUTED df88: eafffffb b df7c <== NOT EXECUTED =============================================================================== 00001f6c : static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 1f6c: e59f3028 ldr r3, [pc, #40] ; 1f9c 1f70: e3a02000 mov r2, #0 } } static void disk_unlock(void) { 1f74: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 1f78: e5930008 ldr r0, [r3, #8] static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 1f7c: e5c3200c strb r2, [r3, #12] sc = rtems_semaphore_release(diskdevs_mutex); 1f80: eb00132c bl 6c38 if (sc != RTEMS_SUCCESSFUL) { 1f84: e3500000 cmp r0, #0 1f88: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 1f8c: e3e00585 mvn r0, #557842432 ; 0x21400000 <== NOT EXECUTED 1f90: e2400949 sub r0, r0, #1196032 ; 0x124000 <== NOT EXECUTED 1f94: e2400e11 sub r0, r0, #272 ; 0x110 <== NOT EXECUTED 1f98: eb001457 bl 70fc <== NOT EXECUTED =============================================================================== 00003e2c : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3e2c: e59030b4 ldr r3, [r0, #180] ; 0xb4 3e30: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 3e34: e92d4030 push {r4, r5, lr} 3e38: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3e3c: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3e40: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3e44: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3e48: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 3e4c: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED 3e50: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 3e54: e1510002 cmp r1, r2 <== NOT EXECUTED 3e58: 0a00000f beq 3e9c <== NOT EXECUTED tty->rawOutBufState = rob_wait; 3e5c: e3a05002 mov r5, #2 <== NOT EXECUTED 3e60: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3e64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 3e68: e3a01000 mov r1, #0 <== NOT EXECUTED 3e6c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 3e70: e1a02001 mov r2, r1 <== NOT EXECUTED 3e74: eb00064c bl 57ac <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3e78: e3500000 cmp r0, #0 <== NOT EXECUTED 3e7c: 1a000008 bne 3ea4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3e80: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3e84: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3e88: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 3e8c: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 3e90: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 3e94: e1510002 cmp r1, r2 <== NOT EXECUTED 3e98: 1afffff0 bne 3e60 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3e9c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 3ea0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3ea4: eb0007ce bl 5de4 <== NOT EXECUTED =============================================================================== 0000279c : int dup2( int fildes, int fildes2 ) { 279c: e92d4070 push {r4, r5, r6, lr} 27a0: e24dd048 sub sp, sp, #72 ; 0x48 27a4: e1a05001 mov r5, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 27a8: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 27ac: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 27b0: eb00019c bl 2e28 if ( status == -1 ) 27b4: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 27b8: e1a0400d mov r4, sp if ( status == -1 ) 27bc: 1a000002 bne 27cc /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 27c0: e3e00000 mvn r0, #0 } 27c4: e28dd048 add sp, sp, #72 ; 0x48 27c8: e8bd8070 pop {r4, r5, r6, pc} /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 27cc: e1a0100d mov r1, sp 27d0: e1a00005 mov r0, r5 27d4: eb000193 bl 2e28 if ( status == -1 ) 27d8: e3700001 cmn r0, #1 27dc: 0afffff7 beq 27c0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 27e0: e1a00006 mov r0, r6 <== NOT EXECUTED 27e4: e1a02005 mov r2, r5 <== NOT EXECUTED 27e8: e3a01000 mov r1, #0 <== NOT EXECUTED 27ec: eb000087 bl 2a10 <== NOT EXECUTED 27f0: eafffff3 b 27c4 <== NOT EXECUTED =============================================================================== 0000389c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 389c: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 38a0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 38a4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 38a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 38ac: e1a04001 mov r4, r1 <== NOT EXECUTED 38b0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 38b4: 0a000007 beq 38d8 <== NOT EXECUTED 38b8: e59f3060 ldr r3, [pc, #96] ; 3920 <== NOT EXECUTED 38bc: e5933000 ldr r3, [r3] <== NOT EXECUTED 38c0: e0833000 add r3, r3, r0 <== NOT EXECUTED 38c4: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 38c8: e2503009 subs r3, r0, #9 <== NOT EXECUTED 38cc: 13a03001 movne r3, #1 <== NOT EXECUTED 38d0: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 38d4: 1a000003 bne 38e8 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 38d8: e1a01004 mov r1, r4 <== NOT EXECUTED 38dc: ebffff92 bl 372c <== NOT EXECUTED } } 38e0: e28dd004 add sp, sp, #4 <== NOT EXECUTED 38e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 38e8: e350000a cmp r0, #10 <== NOT EXECUTED 38ec: 0afffff9 beq 38d8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 38f0: e2203040 eor r3, r0, #64 ; 0x40 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 38f4: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 38f8: e1a0000d mov r0, sp <== NOT EXECUTED 38fc: e3a01002 mov r1, #2 <== NOT EXECUTED 3900: e1a02004 mov r2, r4 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 3904: e5cd3001 strb r3, [sp, #1] <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 3908: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 390c: ebffff3e bl 360c <== NOT EXECUTED tty->column += 2; 3910: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3914: e2833002 add r3, r3, #2 <== NOT EXECUTED 3918: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 391c: eaffffef b 38e0 <== NOT EXECUTED =============================================================================== 000294b8 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 294b8: e59f300c ldr r3, [pc, #12] ; 294cc <== NOT EXECUTED 294bc: e5930000 ldr r0, [r3] <== NOT EXECUTED 294c0: e3500000 cmp r0, #0 <== NOT EXECUTED 294c4: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 294c8: ea006ca9 b 44774 <== NOT EXECUTED =============================================================================== 000294d0 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 294d0: e59f300c ldr r3, [pc, #12] ; 294e4 <== NOT EXECUTED 294d4: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 294d8: e3500000 cmp r0, #0 <== NOT EXECUTED 294dc: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 294e0: ea006ca3 b 44774 <== NOT EXECUTED =============================================================================== 00003924 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 3924: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 3928: e3530000 cmp r3, #0 <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 392c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 3930: e1a04000 mov r4, r0 <== NOT EXECUTED 3934: e1a06001 mov r6, r1 <== NOT EXECUTED if (tty->ccount == 0) 3938: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return; if (lineFlag) { 393c: e3510000 cmp r1, #0 <== NOT EXECUTED 3940: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED 3944: 1a000025 bne 39e0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3948: e59f71d4 ldr r7, [pc, #468] ; 3b24 <== NOT EXECUTED 394c: ea000007 b 3970 <== NOT EXECUTED 3950: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 3954: 1a00005a bne 3ac4 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 3958: e3560000 cmp r6, #0 <== NOT EXECUTED 395c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 3960: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3964: e3530000 cmp r3, #0 <== NOT EXECUTED 3968: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 396c: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 3970: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3974: e5843020 str r3, [r4, #32] <== NOT EXECUTED 3978: e594001c ldr r0, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 397c: e3120008 tst r2, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3980: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 3984: 0afffff3 beq 3958 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3988: e3560000 cmp r6, #0 <== NOT EXECUTED 398c: 1a000001 bne 3998 <== NOT EXECUTED 3990: e3120010 tst r2, #16 <== NOT EXECUTED 3994: 0a000046 beq 3ab4 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 3998: e3550009 cmp r5, #9 <== NOT EXECUTED 399c: 0a000020 beq 3a24 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 39a0: e5973000 ldr r3, [r7] <== NOT EXECUTED 39a4: e2855001 add r5, r5, #1 <== NOT EXECUTED 39a8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 39ac: e3130020 tst r3, #32 <== NOT EXECUTED 39b0: 1affffe6 bne 3950 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 39b4: e59f016c ldr r0, [pc, #364] ; 3b28 <== NOT EXECUTED 39b8: e3a01003 mov r1, #3 <== NOT EXECUTED 39bc: e1a02004 mov r2, r4 <== NOT EXECUTED 39c0: ebffff11 bl 360c <== NOT EXECUTED if (tty->column) 39c4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 39c8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 39cc: 12433001 subne r3, r3, #1 <== NOT EXECUTED 39d0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 39d4: e3560000 cmp r6, #0 <== NOT EXECUTED 39d8: 1affffe0 bne 3960 <== NOT EXECUTED 39dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 39e0: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED 39e4: e2121008 ands r1, r2, #8 <== NOT EXECUTED tty->ccount = 0; 39e8: 05801020 streq r1, [r0, #32] <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 39ec: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 39f0: e2121010 ands r1, r2, #16 <== NOT EXECUTED 39f4: 1affffd3 bne 3948 <== NOT EXECUTED tty->ccount = 0; 39f8: e5801020 str r1, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 39fc: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3a00: e1a01004 mov r1, r4 <== NOT EXECUTED 3a04: ebffffa4 bl 389c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3a08: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3a0c: e3130020 tst r3, #32 <== NOT EXECUTED 3a10: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED echo ('\n', tty); 3a14: e1a01004 mov r1, r4 <== NOT EXECUTED 3a18: e3a0000a mov r0, #10 <== NOT EXECUTED } } if (!lineFlag) break; } } 3a1c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 3a20: eaffff9d b 389c <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3a24: e3530000 cmp r3, #0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 3a28: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3a2c: 0a000011 beq 3a78 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3a30: e5978000 ldr r8, [r7] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 3a34: e202ac02 and sl, r2, #512 ; 0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3a38: e3a02000 mov r2, #0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 3a3c: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED if (c == '\t') { 3a40: e3510009 cmp r1, #9 <== NOT EXECUTED col = (col | 7) + 1; 3a44: 03855007 orreq r5, r5, #7 <== NOT EXECUTED } else if (iscntrl (c)) { 3a48: e088c001 add ip, r8, r1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 3a4c: e2822001 add r2, r2, #1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; 3a50: 02855001 addeq r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 3a54: 0a000005 beq 3a70 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 3a58: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED 3a5c: e3110020 tst r1, #32 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 3a60: 02855001 addeq r5, r5, #1 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3a64: 0a000001 beq 3a70 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 3a68: e35a0000 cmp sl, #0 <== NOT EXECUTED col += 2; 3a6c: 12855002 addne r5, r5, #2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3a70: e1530002 cmp r3, r2 <== NOT EXECUTED 3a74: 1afffff0 bne 3a3c <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3a78: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3a7c: e1550003 cmp r5, r3 <== NOT EXECUTED 3a80: aaffffb4 bge 3958 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 3a84: e59f00a0 ldr r0, [pc, #160] ; 3b2c <== NOT EXECUTED 3a88: e3a01001 mov r1, #1 <== NOT EXECUTED 3a8c: e1a02004 mov r2, r4 <== NOT EXECUTED 3a90: ebfffedd bl 360c <== NOT EXECUTED tty->column--; 3a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3a98: e2433001 sub r3, r3, #1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3a9c: e1550003 cmp r5, r3 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 3aa0: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3aa4: bafffff6 blt 3a84 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 3aa8: e3560000 cmp r6, #0 <== NOT EXECUTED 3aac: 1affffab bne 3960 <== NOT EXECUTED 3ab0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 3ab4: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 3ab8: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 3abc: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 3ac0: eaffff75 b 389c <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 3ac4: e59f005c ldr r0, [pc, #92] ; 3b28 <== NOT EXECUTED 3ac8: e3a01003 mov r1, #3 <== NOT EXECUTED 3acc: e1a02004 mov r2, r4 <== NOT EXECUTED 3ad0: ebfffecd bl 360c <== NOT EXECUTED if (tty->column) 3ad4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3ad8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3adc: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3ae0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 3ae4: e5973000 ldr r3, [r7] <== NOT EXECUTED 3ae8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3aec: e3130020 tst r3, #32 <== NOT EXECUTED 3af0: 0affffaf beq 39b4 <== NOT EXECUTED 3af4: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 3af8: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 3afc: 0affff95 beq 3958 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3b00: e59f0020 ldr r0, [pc, #32] ; 3b28 <== NOT EXECUTED 3b04: e3a01003 mov r1, #3 <== NOT EXECUTED 3b08: e1a02004 mov r2, r4 <== NOT EXECUTED 3b0c: ebfffebe bl 360c <== NOT EXECUTED if (tty->column) 3b10: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3b14: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3b18: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3b1c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3b20: eaffffab b 39d4 <== NOT EXECUTED =============================================================================== 00026324 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 26324: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 26328: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2632c: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 26330: e3500000 cmp r0, #0 <== NOT EXECUTED #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 26334: e1a08003 mov r8, r3 <== NOT EXECUTED 26338: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 2633c: e1a06001 mov r6, r1 <== NOT EXECUTED 26340: e1a07002 mov r7, r2 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 26344: 1594307c ldrne r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26348: 1a00000d bne 26384 <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 2634c: e3520001 cmp r2, #1 <== NOT EXECUTED 26350: 0a000062 beq 264e0 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 26354: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26358: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2635c: e1a02006 mov r2, r6 <== NOT EXECUTED 26360: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 26364: ebff7caf bl 5628 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26368: e3500000 cmp r0, #0 <== NOT EXECUTED 2636c: 1a00006d bne 26528 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 26370: e3a03001 mov r3, #1 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 26374: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 26378: e584607c str r6, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 2637c: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED 26380: e1a03006 mov r3, r6 <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 26384: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 26388: e1520003 cmp r2, r3 <== NOT EXECUTED 2638c: 83a05000 movhi r5, #0 <== NOT EXECUTED 26390: 9a00004d bls 264cc <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 26394: e1560003 cmp r6, r3 <== NOT EXECUTED 26398: 0a000046 beq 264b8 <== NOT EXECUTED { if (fs_info->c.modified) 2639c: e5d4a080 ldrb sl, [r4, #128] ; 0x80 <== NOT EXECUTED 263a0: e35a0000 cmp sl, #0 <== NOT EXECUTED 263a4: 0a000032 beq 26474 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 263a8: e3550000 cmp r5, #0 <== NOT EXECUTED 263ac: 0a000002 beq 263bc <== NOT EXECUTED 263b0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 263b4: e3530000 cmp r3, #0 <== NOT EXECUTED 263b8: 0a00004e beq 264f8 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 263bc: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 263c0: ebff7819 bl 442c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 263c4: e3a03000 mov r3, #0 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 263c8: e3500000 cmp r0, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; 263cc: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 263d0: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 263d4: 1a000053 bne 26528 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 263d8: e3550000 cmp r5, #0 <== NOT EXECUTED 263dc: 0a000029 beq 26488 <== NOT EXECUTED 263e0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 263e4: e3530000 cmp r3, #0 <== NOT EXECUTED 263e8: 1a000026 bne 26488 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 263ec: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 263f0: e3530001 cmp r3, #1 <== NOT EXECUTED 263f4: 9a000023 bls 26488 <== NOT EXECUTED 263f8: e3a05001 mov r5, #1 <== NOT EXECUTED 263fc: e1a0a00d mov sl, sp <== NOT EXECUTED 26400: ea00000d b 2643c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 26404: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26408: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2640c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 26410: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 26414: eb008539 bl 47900 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 26418: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2641c: ebff7802 bl 442c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26420: e2855001 add r5, r5, #1 <== NOT EXECUTED &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) 26424: e3500000 cmp r0, #0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26428: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) 2642c: 1a00000b bne 26460 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26430: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 26434: e1530005 cmp r3, r5 <== NOT EXECUTED 26438: 9a000012 bls 26488 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 2643c: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26440: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 26444: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26448: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2644c: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED 26450: e1a0300d mov r3, sp <== NOT EXECUTED 26454: ebff7c73 bl 5628 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 26458: e3500000 cmp r0, #0 <== NOT EXECUTED 2645c: 0affffe8 beq 26404 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 26460: eb007876 bl 44640 <__errno> <== NOT EXECUTED 26464: e3a0300c mov r3, #12 <== NOT EXECUTED 26468: e5803000 str r3, [r0] <== NOT EXECUTED 2646c: e3e00000 mvn r0, #0 <== NOT EXECUTED 26470: ea000013 b 264c4 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 26474: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 26478: ebff780d bl 44b4 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2647c: e3500000 cmp r0, #0 <== NOT EXECUTED } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 26480: e5c4a081 strb sl, [r4, #129] ; 0x81 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26484: 1a000027 bne 26528 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 26488: e3570001 cmp r7, #1 <== NOT EXECUTED 2648c: 0a00001f beq 26510 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 26490: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26494: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26498: e1a02006 mov r2, r6 <== NOT EXECUTED 2649c: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 264a0: ebff7c60 bl 5628 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 264a4: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; 264a8: 03a03001 moveq r3, #1 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 264ac: 0584607c streq r6, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 264b0: 05c43081 strbeq r3, [r4, #129] ; 0x81 <== NOT EXECUTED } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 264b4: 1a00001b bne 26528 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; 264b8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 264bc: e5883000 str r3, [r8] <== NOT EXECUTED 264c0: e3a00000 mov r0, #0 <== NOT EXECUTED return RC_OK; } 264c4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 264c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 264cc: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 264d0: e1550003 cmp r5, r3 <== NOT EXECUTED 264d4: 93a05000 movls r5, #0 <== NOT EXECUTED 264d8: 83a05001 movhi r5, #1 <== NOT EXECUTED 264dc: eaffffac b 26394 <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 264e0: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 264e4: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 264e8: e1a02006 mov r2, r6 <== NOT EXECUTED 264ec: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 264f0: ebff7c80 bl 56f8 <== NOT EXECUTED 264f4: eaffff9b b 26368 <== NOT EXECUTED if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 264f8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 264fc: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 26500: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 26504: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 26508: eb0084fc bl 47900 <== NOT EXECUTED 2650c: eaffffaa b 263bc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 26510: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26514: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26518: e1a02006 mov r2, r6 <== NOT EXECUTED 2651c: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 26520: ebff7c74 bl 56f8 <== NOT EXECUTED 26524: eaffffde b 264a4 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 26528: eb007844 bl 44640 <__errno> <== NOT EXECUTED 2652c: e3a03005 mov r3, #5 <== NOT EXECUTED 26530: e5803000 str r3, [r0] <== NOT EXECUTED 26534: e3e00000 mvn r0, #0 <== NOT EXECUTED 26538: eaffffe1 b 264c4 <== NOT EXECUTED =============================================================================== 000261b8 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 261b8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 261bc: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 261c0: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 261c4: e3500000 cmp r0, #0 <== NOT EXECUTED return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 261c8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 261cc: 0a000037 beq 262b0 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 261d0: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 261d4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 261d8: e1530002 cmp r3, r2 <== NOT EXECUTED 261dc: 33a05000 movcc r5, #0 <== NOT EXECUTED 261e0: 2a000034 bcs 262b8 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 261e4: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 261e8: e3530000 cmp r3, #0 <== NOT EXECUTED 261ec: 0a000038 beq 262d4 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 261f0: e3550000 cmp r5, #0 <== NOT EXECUTED 261f4: 0a000002 beq 26204 <== NOT EXECUTED 261f8: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 261fc: e3530000 cmp r3, #0 <== NOT EXECUTED 26200: 0a00003a beq 262f0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 26204: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 26208: ebff7887 bl 442c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2620c: e3500000 cmp r0, #0 <== NOT EXECUTED 26210: 1a00003c bne 26308 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 26214: e3550000 cmp r5, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 26218: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 2621c: 0a000030 beq 262e4 <== NOT EXECUTED 26220: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 26224: e3530000 cmp r3, #0 <== NOT EXECUTED 26228: 1a00002d bne 262e4 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2622c: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 26230: e3530001 cmp r3, #1 <== NOT EXECUTED 26234: 9a00002a bls 262e4 <== NOT EXECUTED 26238: e3a05001 mov r5, #1 <== NOT EXECUTED 2623c: e1a0600d mov r6, sp <== NOT EXECUTED 26240: ea00000d b 2627c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 26244: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26248: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2624c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 26250: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 26254: eb0085a9 bl 47900 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 26258: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2625c: ebff7872 bl 442c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26260: e2855001 add r5, r5, #1 <== NOT EXECUTED &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) 26264: e3500000 cmp r0, #0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26268: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) 2626c: 1a00000b bne 262a0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26270: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 26274: e1530005 cmp r3, r5 <== NOT EXECUTED 26278: 9a000019 bls 262e4 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 2627c: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26280: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 26284: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26288: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2628c: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED 26290: e1a0300d mov r3, sp <== NOT EXECUTED 26294: ebff7ce3 bl 5628 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 26298: e3500000 cmp r0, #0 <== NOT EXECUTED 2629c: 0affffe8 beq 26244 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 262a0: eb0078e6 bl 44640 <__errno> <== NOT EXECUTED 262a4: e3a0300c mov r3, #12 <== NOT EXECUTED 262a8: e5803000 str r3, [r0] <== NOT EXECUTED 262ac: e3e00000 mvn r0, #0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 262b0: e28dd004 add sp, sp, #4 <== NOT EXECUTED 262b4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 262b8: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 262bc: e1530005 cmp r3, r5 <== NOT EXECUTED 262c0: 23a05000 movcs r5, #0 <== NOT EXECUTED 262c4: 33a05001 movcc r5, #1 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 262c8: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 262cc: e3530000 cmp r3, #0 <== NOT EXECUTED 262d0: 1affffc6 bne 261f0 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 262d4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 262d8: ebff7875 bl 44b4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 262dc: e3500000 cmp r0, #0 <== NOT EXECUTED 262e0: 1a000008 bne 26308 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 262e4: e3a00000 mov r0, #0 <== NOT EXECUTED 262e8: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED return RC_OK; 262ec: eaffffef b 262b0 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 262f0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 262f4: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 262f8: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 262fc: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 26300: eb00857e bl 47900 <== NOT EXECUTED 26304: eaffffbe b 26204 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 26308: eb0078cc bl 44640 <__errno> <== NOT EXECUTED 2630c: e3a03005 mov r3, #5 <== NOT EXECUTED 26310: e5803000 str r3, [r0] <== NOT EXECUTED 26314: e3e00000 mvn r0, #0 <== NOT EXECUTED 26318: eaffffe4 b 262b0 <== NOT EXECUTED =============================================================================== 00026f98 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 26f98: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 26f9c: e2513000 subs r3, r1, #0 <== NOT EXECUTED 26fa0: e1a0c002 mov ip, r2 <== NOT EXECUTED 26fa4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 26fa8: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 26fac: 1a000003 bne 26fc0 <== NOT EXECUTED 26fb0: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 26fb4: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 26fb8: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 26fbc: 1a000003 bne 26fd0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 26fc0: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 26fc4: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 26fc8: e2433002 sub r3, r3, #2 <== NOT EXECUTED 26fcc: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 26fd0: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 26fd4: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 26fd8: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 26fdc: e3a02000 mov r2, #0 <== NOT EXECUTED 26fe0: e58dc000 str ip, [sp] <== NOT EXECUTED 26fe4: ebfffe21 bl 26870 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 26fe8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26fec: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00026768 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 26768: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2676c: e2513000 subs r3, r1, #0 <== NOT EXECUTED 26770: e1a0c002 mov ip, r2 <== NOT EXECUTED 26774: e24dd004 sub sp, sp, #4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 26778: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 2677c: 1a000003 bne 26790 <== NOT EXECUTED 26780: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 26784: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 26788: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2678c: 1a000003 bne 267a0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 26790: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 26794: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 26798: e2433002 sub r3, r3, #2 <== NOT EXECUTED 2679c: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 267a0: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 267a4: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 267a8: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 267ac: e3a02000 mov r2, #0 <== NOT EXECUTED 267b0: e58dc000 str ip, [sp] <== NOT EXECUTED 267b4: ebffff60 bl 2653c <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 267b8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 267bc: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00026618 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 26618: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2661c: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 26620: e1d533bc ldrh r3, [r5, #60] ; 0x3c <== NOT EXECUTED fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 26624: e24dd00c sub sp, sp, #12 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 26628: e28dc008 add ip, sp, #8 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 2662c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 26630: e58d2004 str r2, [sp, #4] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 26634: e1a01003 mov r1, r3 <== NOT EXECUTED 26638: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED 2663c: e3a03004 mov r3, #4 <== NOT EXECUTED fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 26640: e1a04000 mov r4, r0 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 26644: e58dc000 str ip, [sp] <== NOT EXECUTED 26648: ebffffbb bl 2653c <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2664c: e3a03004 mov r3, #4 <== NOT EXECUTED 26650: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED 26654: e08dc003 add ip, sp, r3 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 26658: e1a06000 mov r6, r0 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2665c: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED 26660: e1a00004 mov r0, r4 <== NOT EXECUTED 26664: e58dc000 str ip, [sp] <== NOT EXECUTED 26668: ebffffb3 bl 2653c <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 2666c: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED 26670: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED return -1; return RC_OK; } 26674: 13e00000 mvnne r0, #0 <== NOT EXECUTED 26678: e28dd00c add sp, sp, #12 <== NOT EXECUTED 2667c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00025d80 : /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 25d80: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 25d84: e3530001 cmp r3, #1 <== NOT EXECUTED { fat_fd->links_num--; 25d88: 82433001 subhi r3, r3, #1 <== NOT EXECUTED int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25d8c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) { fat_fd->links_num--; 25d90: 85813008 strhi r3, [r1, #8] <== NOT EXECUTED int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25d94: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25d98: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25d9c: e1a04001 mov r4, r1 <== NOT EXECUTED * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) { fat_fd->links_num--; 25da0: 83a00000 movhi r0, #0 <== NOT EXECUTED /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 25da4: 88bd80f0 pophi {r4, r5, r6, r7, pc} <== NOT EXECUTED return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 25da8: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED 25dac: e2177001 ands r7, r7, #1 <== NOT EXECUTED 25db0: 0a00000d beq 25dec <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 25db4: e3a02000 mov r2, #0 <== NOT EXECUTED 25db8: ebfffe1d bl 25634 <== NOT EXECUTED if ( rc != RC_OK ) 25dbc: e3500000 cmp r0, #0 <== NOT EXECUTED 25dc0: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 25dc4: e1a00004 mov r0, r4 <== NOT EXECUTED 25dc8: ebff9ccb bl d0fc <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 25dcc: e1a00005 mov r0, r5 <== NOT EXECUTED 25dd0: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 25dd4: eb0000b6 bl 260b4 <== NOT EXECUTED 25dd8: e3500000 cmp r0, #0 <== NOT EXECUTED 25ddc: 1a00000d bne 25e18 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 25de0: e1a00004 mov r0, r4 <== NOT EXECUTED 25de4: ebff87e1 bl 7d70 <== NOT EXECUTED 25de8: ea000004 b 25e00 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 25dec: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 25df0: eb0000af bl 260b4 <== NOT EXECUTED 25df4: e3500000 cmp r0, #0 <== NOT EXECUTED { fat_fd->links_num = 0; 25df8: 15847008 strne r7, [r4, #8] <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 25dfc: 0a000002 beq 25e0c <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 25e00: e1a00006 mov r0, r6 <== NOT EXECUTED return rc; } 25e04: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 25e08: ea0000ea b 261b8 <== NOT EXECUTED 25e0c: e1a00004 mov r0, r4 <== NOT EXECUTED 25e10: ebff9cb9 bl d0fc <_Chain_Extract> <== NOT EXECUTED 25e14: eafffff1 b 25de0 <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 25e18: e1a00005 mov r0, r5 <== NOT EXECUTED 25e1c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 25e20: eb000099 bl 2608c <== NOT EXECUTED 25e24: eaffffed b 25de0 <== NOT EXECUTED =============================================================================== 000253dc : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 253dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 253e0: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 253e4: e3530000 cmp r3, #0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 253e8: e1a08000 mov r8, r0 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 253ec: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 253f0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 253f4: e591201c ldr r2, [r1, #28] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 253f8: 01a00003 moveq r0, r3 <== NOT EXECUTED 253fc: 1a000001 bne 25408 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 25400: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25404: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 25408: e3a03000 mov r3, #0 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 2540c: e1a00005 mov r0, r5 <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 25410: e58d3000 str r3, [sp] <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 25414: e58d2004 str r2, [sp, #4] <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 25418: eb000366 bl 261b8 <== NOT EXECUTED if (rc != RC_OK) 2541c: e250a000 subs sl, r0, #0 <== NOT EXECUTED 25420: 01a0700d moveq r7, sp <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25424: 028d9004 addeq r9, sp, #4 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); if (rc != RC_OK) 25428: 1a00002a bne 254d8 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2542c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 25430: e285200c add r2, r5, #12 <== NOT EXECUTED 25434: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 25438: e0012002 and r2, r1, r2 <== NOT EXECUTED 2543c: e1520003 cmp r2, r3 <== NOT EXECUTED 25440: 2a000024 bcs 254d8 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25444: e3510000 cmp r1, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 25448: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2544c: 0a00001c beq 254c4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25450: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 25454: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 25458: e2416002 sub r6, r1, #2 <== NOT EXECUTED 2545c: e0826316 add r6, r2, r6, lsl r3 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 25460: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED 25464: e3530000 cmp r3, #0 <== NOT EXECUTED 25468: 0a00001d beq 254e4 <== NOT EXECUTED 2546c: e3a04000 mov r4, #0 <== NOT EXECUTED 25470: ea000006 b 25490 <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 25474: e59d0000 ldr r0, [sp] <== NOT EXECUTED 25478: ebff7e83 bl 4e8c <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2547c: e3500000 cmp r0, #0 <== NOT EXECUTED 25480: 1a00000a bne 254b0 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 25484: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED 25488: e1530004 cmp r3, r4 <== NOT EXECUTED 2548c: 9a000013 bls 254e0 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 25490: e0842006 add r2, r4, r6 <== NOT EXECUTED 25494: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED 25498: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2549c: e1a0300d mov r3, sp <== NOT EXECUTED 254a0: ebff8094 bl 56f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 254a4: e3500000 cmp r0, #0 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 254a8: e2844001 add r4, r4, #1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) 254ac: 0afffff0 beq 25474 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 254b0: eb007c62 bl 44640 <__errno> <== NOT EXECUTED 254b4: e3a03005 mov r3, #5 <== NOT EXECUTED 254b8: e5803000 str r3, [r0] <== NOT EXECUTED 254bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 254c0: eaffffce b 25400 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 254c4: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 254c8: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 254cc: 1593601c ldrne r6, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 254d0: 1affffe2 bne 25460 <== NOT EXECUTED 254d4: eaffffdd b 25450 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 254d8: e1a0000a mov r0, sl <== NOT EXECUTED 254dc: eaffffc7 b 25400 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 254e0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 254e4: e1a00008 mov r0, r8 <== NOT EXECUTED 254e8: e1a02009 mov r2, r9 <== NOT EXECUTED 254ec: eb006901 bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 254f0: e3500000 cmp r0, #0 <== NOT EXECUTED 254f4: 0affffcc beq 2542c <== NOT EXECUTED 254f8: eaffffc0 b 25400 <== NOT EXECUTED =============================================================================== 0002573c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2573c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 25740: e1a08003 mov r8, r3 <== NOT EXECUTED uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 25744: e5882000 str r2, [r8] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 25748: e591b018 ldr fp, [r1, #24] <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2574c: e24dd014 sub sp, sp, #20 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 25750: e3a03000 mov r3, #0 <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 25754: e152000b cmp r2, fp <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 25758: e1a04002 mov r4, r2 <== NOT EXECUTED 2575c: e1a05001 mov r5, r1 <== NOT EXECUTED 25760: e1a06000 mov r6, r0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 25764: e58d3008 str r3, [sp, #8] <== NOT EXECUTED uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 25768: e58d3010 str r3, [sp, #16] <== NOT EXECUTED uint32_t new_length, uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2576c: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 25770: 9a000039 bls 2585c <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25774: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 25778: e3530001 cmp r3, #1 <== NOT EXECUTED 2577c: 0a00003a beq 2586c <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 25780: e1d720b6 ldrh r2, [r7, #6] <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 25784: e2423001 sub r3, r2, #1 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 25788: e003a00b and sl, r3, fp <== NOT EXECUTED 2578c: e06aa002 rsb sl, sl, r2 <== NOT EXECUTED 25790: e00aa003 and sl, sl, r3 <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 25794: e06bb004 rsb fp, fp, r4 <== NOT EXECUTED if (bytes2add > bytes_remain) 25798: e15a000b cmp sl, fp <== NOT EXECUTED 2579c: 2a00002e bcs 2585c <== NOT EXECUTED /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 257a0: e05bb00a subs fp, fp, sl <== NOT EXECUTED 257a4: 0a00002c beq 2585c <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 257a8: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 257ac: e24b9001 sub r9, fp, #1 <== NOT EXECUTED 257b0: e1a09339 lsr r9, r9, r3 <== NOT EXECUTED 257b4: e2899001 add r9, r9, #1 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 257b8: e28dc008 add ip, sp, #8 <== NOT EXECUTED 257bc: e1a00006 mov r0, r6 <== NOT EXECUTED 257c0: e28d1010 add r1, sp, #16 <== NOT EXECUTED 257c4: e1a02009 mov r2, r9 <== NOT EXECUTED 257c8: e28d3004 add r3, sp, #4 <== NOT EXECUTED 257cc: e58dc000 str ip, [sp] <== NOT EXECUTED 257d0: eb0068df bl 3fb54 <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 257d4: e3500000 cmp r0, #0 <== NOT EXECUTED 257d8: 11a08000 movne r8, r0 <== NOT EXECUTED 257dc: 1a00001f bne 25860 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 257e0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 257e4: e19aa002 orrs sl, sl, r2 <== NOT EXECUTED 257e8: 0a000025 beq 25884 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 257ec: e1590002 cmp r9, r2 <== NOT EXECUTED 257f0: 0a000008 beq 25818 <== NOT EXECUTED *a_length = new_length - 257f4: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 257f8: e1e01002 mvn r1, r2 <== NOT EXECUTED 257fc: e0819009 add r9, r1, r9 <== NOT EXECUTED 25800: e0449319 sub r9, r4, r9, lsl r3 <== NOT EXECUTED 25804: e1d730b6 ldrh r3, [r7, #6] <== NOT EXECUTED 25808: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2580c: e00bb003 and fp, fp, r3 <== NOT EXECUTED 25810: e06bb009 rsb fp, fp, r9 <== NOT EXECUTED 25814: e588b000 str fp, [r8] <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 25818: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED 2581c: e3530000 cmp r3, #0 <== NOT EXECUTED 25820: 1a00001c bne 25898 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 25824: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED fat_fd->map.file_cln = 0; 25828: e5853034 str r3, [r5, #52] ; 0x34 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 2582c: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED 25830: e585101c str r1, [r5, #28] <== NOT EXECUTED } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 25834: e3520000 cmp r2, #0 <== NOT EXECUTED 25838: 0a000004 beq 25850 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 2583c: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 25840: e3530001 cmp r3, #1 <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; 25844: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 25848: e585303c str r3, [r5, #60] ; 0x3c <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 2584c: 0a00001e beq 258cc <== NOT EXECUTED return rc; } } } fat_fd->fat_file_size = new_length; 25850: e5854018 str r4, [r5, #24] <== NOT EXECUTED 25854: e3a08000 mov r8, #0 <== NOT EXECUTED return RC_OK; 25858: ea000000 b 25860 <== NOT EXECUTED 2585c: e3a08000 mov r8, #0 <== NOT EXECUTED } 25860: e1a00008 mov r0, r8 <== NOT EXECUTED 25864: e28dd014 add sp, sp, #20 <== NOT EXECUTED 25868: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2586c: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 25870: e3530000 cmp r3, #0 <== NOT EXECUTED 25874: 1affffc1 bne 25780 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25878: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED 2587c: e3130003 tst r3, #3 <== NOT EXECUTED 25880: 0affffbe beq 25780 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 25884: eb007b6d bl 44640 <__errno> <== NOT EXECUTED 25888: e3a0301c mov r3, #28 <== NOT EXECUTED 2588c: e5803000 str r3, [r0] <== NOT EXECUTED 25890: e3e08000 mvn r8, #0 <== NOT EXECUTED 25894: eafffff1 b 25860 <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 25898: e595103c ldr r1, [r5, #60] ; 0x3c <== NOT EXECUTED 2589c: e3710001 cmn r1, #1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 258a0: 158d100c strne r1, [sp, #12] <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 258a4: 0a000011 beq 258f0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 258a8: e1a00006 mov r0, r6 <== NOT EXECUTED 258ac: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 258b0: eb00676f bl 3f674 <== NOT EXECUTED if ( rc != RC_OK ) 258b4: e2508000 subs r8, r0, #0 <== NOT EXECUTED 258b8: 1a000008 bne 258e0 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 258bc: e1a00007 mov r0, r7 <== NOT EXECUTED 258c0: eb00023c bl 261b8 <== NOT EXECUTED 258c4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 258c8: eaffffd9 b 25834 <== NOT EXECUTED if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 258cc: e1a00006 mov r0, r6 <== NOT EXECUTED 258d0: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 258d4: eb0003b9 bl 267c0 <== NOT EXECUTED if ( rc != RC_OK ) 258d8: e2508000 subs r8, r0, #0 <== NOT EXECUTED 258dc: 0affffdb beq 25850 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 258e0: e1a00006 mov r0, r6 <== NOT EXECUTED 258e4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 258e8: eb006863 bl 3fa7c <== NOT EXECUTED return rc; 258ec: eaffffdb b 25860 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 258f0: e1a01005 mov r1, r5 <== NOT EXECUTED 258f4: e28dc00c add ip, sp, #12 <== NOT EXECUTED 258f8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 258fc: e1a00006 mov r0, r6 <== NOT EXECUTED 25900: e3a02001 mov r2, #1 <== NOT EXECUTED 25904: e58dc000 str ip, [sp] <== NOT EXECUTED 25908: ebffff0f bl 2554c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2590c: e2508000 subs r8, r0, #0 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 25910: 059d100c ldreq r1, [sp, #12] <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 25914: 0affffe3 beq 258a8 <== NOT EXECUTED 25918: eafffff0 b 258e0 <== NOT EXECUTED =============================================================================== 0002554c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2554c: e92d000c push {r2, r3} <== NOT EXECUTED 25550: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 25554: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 25558: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2555c: e3530001 cmp r3, #1 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 25560: e28d3018 add r3, sp, #24 <== NOT EXECUTED 25564: e58d3000 str r3, [sp] <== NOT EXECUTED int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 25568: e3a02000 mov r2, #0 <== NOT EXECUTED 2556c: e58d2004 str r2, [sp, #4] <== NOT EXECUTED fat_file_fd_t *fat_fd, int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25570: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 25574: 0a000007 beq 25598 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 25578: eb007c30 bl 44640 <__errno> <== NOT EXECUTED 2557c: e3a03016 mov r3, #22 <== NOT EXECUTED 25580: e5803000 str r3, [r0] <== NOT EXECUTED 25584: e3e00000 mvn r0, #0 <== NOT EXECUTED rc = -1; break; } return rc; } 25588: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2558c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED 25590: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25594: e12fff1e bx lr <== NOT EXECUTED case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 25598: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 2559c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 255a0: e2833008 add r3, r3, #8 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 255a4: e1520004 cmp r2, r4 <== NOT EXECUTED switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); 255a8: e58d3000 str r3, [sp] <== NOT EXECUTED 255ac: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 255b0: 2a00001a bcs 25620 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 255b4: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 255b8: e3530001 cmp r3, #1 <== NOT EXECUTED 255bc: 0a000008 beq 255e4 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 255c0: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 255c4: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 255c8: e28d3004 add r3, sp, #4 <== NOT EXECUTED 255cc: ebffff53 bl 25320 <== NOT EXECUTED if ( rc != RC_OK ) 255d0: e3500000 cmp r0, #0 <== NOT EXECUTED 255d4: 1affffeb bne 25588 <== NOT EXECUTED return rc; *ret = cur_cln; 255d8: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 255dc: e5843000 str r3, [r4] <== NOT EXECUTED break; 255e0: eaffffe8 b 25588 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 255e4: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 255e8: e3530000 cmp r3, #0 <== NOT EXECUTED 255ec: 1afffff3 bne 255c0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 255f0: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED 255f4: e3150003 tst r5, #3 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 255f8: 15843000 strne r3, [r4] <== NOT EXECUTED 255fc: 11a00003 movne r0, r3 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25600: 1affffe0 bne 25588 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 25604: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 25608: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 2560c: e28d3004 add r3, sp, #4 <== NOT EXECUTED 25610: ebffff42 bl 25320 <== NOT EXECUTED if ( rc != RC_OK ) 25614: e3500000 cmp r0, #0 <== NOT EXECUTED 25618: 0affffee beq 255d8 <== NOT EXECUTED 2561c: eaffffd9 b 25588 <== NOT EXECUTED pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); 25620: eb007c06 bl 44640 <__errno> <== NOT EXECUTED 25624: e3a03005 mov r3, #5 <== NOT EXECUTED 25628: e5803000 str r3, [r0] <== NOT EXECUTED 2562c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25630: eaffffd4 b 25588 <== NOT EXECUTED =============================================================================== 00025320 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 25320: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 25324: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED 25328: e1580002 cmp r8, r2 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2532c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 25330: e1a05001 mov r5, r1 <== NOT EXECUTED 25334: e1a06002 mov r6, r2 <== NOT EXECUTED 25338: e1a04000 mov r4, r0 <== NOT EXECUTED 2533c: e1a09003 mov r9, r3 <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 25340: 0a000020 beq 253c8 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 25344: 35911038 ldrcc r1, [r1, #56] ; 0x38 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 25348: 2595101c ldrcs r1, [r5, #28] <== NOT EXECUTED uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 2534c: 30688002 rsbcc r8, r8, r2 <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 25350: 21a08002 movcs r8, r2 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 25354: 358d1000 strcc r1, [sp] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 25358: 258d1000 strcs r1, [sp] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2535c: e3580000 cmp r8, #0 <== NOT EXECUTED 25360: 0a000012 beq 253b0 <== NOT EXECUTED 25364: e3a07000 mov r7, #0 <== NOT EXECUTED 25368: e1a0a00d mov sl, sp <== NOT EXECUTED 2536c: ea000002 b 2537c <== NOT EXECUTED 25370: e1580007 cmp r8, r7 <== NOT EXECUTED 25374: 9a00000c bls 253ac <== NOT EXECUTED 25378: e59d1000 ldr r1, [sp] <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2537c: e1a00004 mov r0, r4 <== NOT EXECUTED 25380: e1a0200d mov r2, sp <== NOT EXECUTED 25384: eb00695b bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 25388: e3500000 cmp r0, #0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2538c: e2877001 add r7, r7, #1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) 25390: 0afffff6 beq 25370 <== NOT EXECUTED return rc; 25394: e1a03000 mov r3, r0 <== NOT EXECUTED 25398: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 2539c: e1a01004 mov r1, r4 <== NOT EXECUTED 253a0: e1a00003 mov r0, r3 <== NOT EXECUTED 253a4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 253a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 253ac: e59d1000 ldr r1, [sp] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 253b0: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 253b4: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED *disk_cln = cur_cln; 253b8: e3a03000 mov r3, #0 <== NOT EXECUTED 253bc: e5891000 str r1, [r9] <== NOT EXECUTED 253c0: e3a04000 mov r4, #0 <== NOT EXECUTED 253c4: eafffff4 b 2539c <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 253c8: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED 253cc: e3a04000 mov r4, #0 <== NOT EXECUTED 253d0: e5893000 str r3, [r9] <== NOT EXECUTED 253d4: e3a03000 mov r3, #0 <== NOT EXECUTED 253d8: eaffffef b 2539c <== NOT EXECUTED =============================================================================== 000254fc : static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 254fc: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25500: e3530001 cmp r3, #1 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25504: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 25508: e1a04001 mov r4, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2550c: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25510: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED 25514: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 25518: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2551c: e2066001 and r6, r6, #1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 25520: ebff9ef5 bl d0fc <_Chain_Extract> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 25524: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED 25528: e1a02086 lsl r2, r6, #1 <== NOT EXECUTED 2552c: e0826006 add r6, r2, r6 <== NOT EXECUTED 25530: e0830106 add r0, r3, r6, lsl #2 <== NOT EXECUTED 25534: e1a01004 mov r1, r4 <== NOT EXECUTED 25538: ebff9ee4 bl d0d0 <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 2553c: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED 25540: e3833001 orr r3, r3, #1 <== NOT EXECUTED 25544: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED } 25548: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00025e28 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 25e28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 25e2c: e5915000 ldr r5, [r1] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25e30: e3550001 cmp r5, #1 <== NOT EXECUTED 25e34: e1a08001 mov r8, r1 <== NOT EXECUTED 25e38: e1a0a000 mov sl, r0 <== NOT EXECUTED 25e3c: e1a09002 mov r9, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25e40: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 25e44: 0a000007 beq 25e68 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25e48: e3550000 cmp r5, #0 <== NOT EXECUTED 25e4c: 0a00005b beq 25fc0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25e50: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 25e54: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 25e58: e2455002 sub r5, r5, #2 <== NOT EXECUTED 25e5c: e0835215 add r5, r3, r5, lsl r2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 25e60: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 25e64: e1a05315 lsl r5, r5, r3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25e68: e5983004 ldr r3, [r8, #4] <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 25e6c: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED 25e70: e08554a3 add r5, r5, r3, lsr #9 <== NOT EXECUTED 25e74: e202200f and r2, r2, #15 <== NOT EXECUTED 25e78: e0825205 add r5, r2, r5, lsl #4 <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 25e7c: e2053001 and r3, r5, #1 <== NOT EXECUTED 25e80: e1a07083 lsl r7, r3, #1 <== NOT EXECUTED 25e84: e0877003 add r7, r7, r3 <== NOT EXECUTED 25e88: e594c064 ldr ip, [r4, #100] ; 0x64 <== NOT EXECUTED 25e8c: e1a07107 lsl r7, r7, #2 <== NOT EXECUTED 25e90: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED 25e94: e08cc007 add ip, ip, r7 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 25e98: e28cc004 add ip, ip, #4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25e9c: e15c0003 cmp ip, r3 <== NOT EXECUTED 25ea0: 1a000003 bne 25eb4 <== NOT EXECUTED 25ea4: ea00001e b 25f24 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 25ea8: e5933000 ldr r3, [r3] <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25eac: e15c0003 cmp ip, r3 <== NOT EXECUTED 25eb0: 0a00001b beq 25f24 <== NOT EXECUTED 25eb4: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25eb8: e3520001 cmp r2, #1 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25ebc: e2420002 sub r0, r2, #2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25ec0: 0a00000a beq 25ef0 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25ec4: e3520000 cmp r2, #0 <== NOT EXECUTED 25ec8: 1a000003 bne 25edc <== NOT EXECUTED 25ecc: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED 25ed0: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25ed4: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25ed8: 1a000002 bne 25ee8 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25edc: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED 25ee0: e5942030 ldr r2, [r4, #48] ; 0x30 <== NOT EXECUTED 25ee4: e0822110 add r2, r2, r0, lsl r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 25ee8: e5d46003 ldrb r6, [r4, #3] <== NOT EXECUTED 25eec: e1a02612 lsl r2, r2, r6 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25ef0: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 25ef4: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED 25ef8: e200000f and r0, r0, #15 <== NOT EXECUTED 25efc: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED 25f00: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED 25f04: e1550001 cmp r5, r1 <== NOT EXECUTED 25f08: 1affffe6 bne 25ea8 <== NOT EXECUTED rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 25f0c: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED 25f10: e2822001 add r2, r2, #1 <== NOT EXECUTED 25f14: e5832008 str r2, [r3, #8] <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 25f18: e5893000 str r3, [r9] <== NOT EXECUTED lfat_fd->links_num++; 25f1c: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 25f20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 25f24: e594c068 ldr ip, [r4, #104] ; 0x68 <== NOT EXECUTED 25f28: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED 25f2c: e08cc007 add ip, ip, r7 <== NOT EXECUTED 25f30: e28cc004 add ip, ip, #4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25f34: e153000c cmp r3, ip <== NOT EXECUTED 25f38: 1a000009 bne 25f64 <== NOT EXECUTED 25f3c: e3e0b000 mvn fp, #0 <== NOT EXECUTED 25f40: ea000024 b 25fd8 <== NOT EXECUTED fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 25f44: e3550000 cmp r5, #0 <== NOT EXECUTED 25f48: 0a000021 beq 25fd4 <== NOT EXECUTED 25f4c: e593200c ldr r2, [r3, #12] <== NOT EXECUTED 25f50: e1550002 cmp r5, r2 <== NOT EXECUTED 25f54: 0a00001e beq 25fd4 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 25f58: e5933000 ldr r3, [r3] <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25f5c: e15c0003 cmp ip, r3 <== NOT EXECUTED 25f60: 0afffff5 beq 25f3c <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 25f64: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25f68: e3520001 cmp r2, #1 <== NOT EXECUTED 25f6c: 0a00000b beq 25fa0 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25f70: e3520000 cmp r2, #0 <== NOT EXECUTED 25f74: 1a000003 bne 25f88 <== NOT EXECUTED 25f78: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED 25f7c: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25f80: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25f84: 1a000003 bne 25f98 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25f88: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED 25f8c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 25f90: e2422002 sub r2, r2, #2 <== NOT EXECUTED 25f94: e0802112 add r2, r0, r2, lsl r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 25f98: e5d40003 ldrb r0, [r4, #3] <== NOT EXECUTED 25f9c: e1a02012 lsl r2, r2, r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25fa0: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 25fa4: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED 25fa8: e200000f and r0, r0, #15 <== NOT EXECUTED 25fac: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED 25fb0: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED 25fb4: e1550001 cmp r5, r1 <== NOT EXECUTED 25fb8: 1affffe6 bne 25f58 <== NOT EXECUTED 25fbc: eaffffe0 b 25f44 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25fc0: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 25fc4: e3130003 tst r3, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25fc8: 1594501c ldrne r5, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25fcc: 1affffa3 bne 25e60 <== NOT EXECUTED 25fd0: eaffff9e b 25e50 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25fd4: e3a0b000 mov fp, #0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 25fd8: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED 25fdc: ebff8927 bl 8480 <== NOT EXECUTED if ( lfat_fd == NULL ) 25fe0: e3500000 cmp r0, #0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 25fe4: e1a06000 mov r6, r0 <== NOT EXECUTED 25fe8: e5890000 str r0, [r9] <== NOT EXECUTED if ( lfat_fd == NULL ) 25fec: 0a000021 beq 26078 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 25ff0: e3a01000 mov r1, #0 <== NOT EXECUTED 25ff4: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED 25ff8: eb0086c7 bl 47b1c <== NOT EXECUTED lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 25ffc: e5d6c030 ldrb ip, [r6, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 26000: e898000f ldm r8, {r0, r1, r2, r3} <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 26004: e3cce001 bic lr, ip, #1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 26008: e286c020 add ip, r6, #32 <== NOT EXECUTED if ( rc != RC_OK ) 2600c: e35b0000 cmp fp, #0 <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 26010: e3e08000 mvn r8, #0 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 26014: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 26018: e3a03001 mov r3, #1 <== NOT EXECUTED 2601c: e5863008 str r3, [r6, #8] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 26020: e5c6e030 strb lr, [r6, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 26024: e586803c str r8, [r6, #60] ; 0x3c <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) lfat_fd->ino = key; 26028: 1586500c strne r5, [r6, #12] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 2602c: 0a000005 beq 26048 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 26030: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26034: e1a01006 mov r1, r6 <== NOT EXECUTED 26038: e0800007 add r0, r0, r7 <== NOT EXECUTED 2603c: ebff9c23 bl d0d0 <_Chain_Append> <== NOT EXECUTED 26040: e3a00000 mov r0, #0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 26044: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 26048: e1a0000a mov r0, sl <== NOT EXECUTED 2604c: eb00001e bl 260cc <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 26050: e3500000 cmp r0, #0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 26054: e586000c str r0, [r6, #12] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 26058: 1afffff4 bne 26030 <== NOT EXECUTED { free((*fat_fd)); 2605c: e5990000 ldr r0, [r9] <== NOT EXECUTED 26060: ebff8742 bl 7d70 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 26064: eb007975 bl 44640 <__errno> <== NOT EXECUTED 26068: e3a0300c mov r3, #12 <== NOT EXECUTED 2606c: e5803000 str r3, [r0] <== NOT EXECUTED 26070: e1a00008 mov r0, r8 <== NOT EXECUTED 26074: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 26078: eb007970 bl 44640 <__errno> <== NOT EXECUTED 2607c: e3a0300c mov r3, #12 <== NOT EXECUTED 26080: e5803000 str r3, [r0] <== NOT EXECUTED 26084: e3e00000 mvn r0, #0 <== NOT EXECUTED 26088: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00025b74 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 25b74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 25b78: e2535000 subs r5, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 25b7c: e24dd014 sub sp, sp, #20 <== NOT EXECUTED 25b80: e1a06000 mov r6, r0 <== NOT EXECUTED 25b84: e1a0a001 mov sl, r1 <== NOT EXECUTED 25b88: e1a04002 mov r4, r2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 25b8c: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 25b90: 0a00004d beq 25ccc <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 25b94: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 25b98: e1530002 cmp r3, r2 <== NOT EXECUTED 25b9c: 9a00004a bls 25ccc <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 25ba0: e1550003 cmp r5, r3 <== NOT EXECUTED 25ba4: 9a00004b bls 25cd8 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 25ba8: e0645003 rsb r5, r4, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25bac: e59a3020 ldr r3, [sl, #32] <== NOT EXECUTED 25bb0: e3530001 cmp r3, #1 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 25bb4: e3a03000 mov r3, #0 <== NOT EXECUTED 25bb8: e58d3010 str r3, [sp, #16] <== NOT EXECUTED if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25bbc: 0a000049 beq 25ce8 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 25bc0: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 25bc4: e1a03334 lsr r3, r4, r3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 25bc8: e28db010 add fp, sp, #16 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 25bcc: e58d3004 str r3, [sp, #4] <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 25bd0: e1a02003 mov r2, r3 <== NOT EXECUTED 25bd4: e1a00006 mov r0, r6 <== NOT EXECUTED 25bd8: e1a0100a mov r1, sl <== NOT EXECUTED 25bdc: e1a0300b mov r3, fp <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 25be0: e1d790b6 ldrh r9, [r7, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 25be4: ebfffdcd bl 25320 <== NOT EXECUTED if (rc != RC_OK) 25be8: e2508000 subs r8, r0, #0 <== NOT EXECUTED 25bec: 11a00008 movne r0, r8 <== NOT EXECUTED 25bf0: 1a000036 bne 25cd0 <== NOT EXECUTED return rc; while (count > 0) 25bf4: e3550000 cmp r5, #0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 25bf8: e2499001 sub r9, r9, #1 <== NOT EXECUTED 25bfc: e0049009 and r9, r4, r9 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 25c00: 01a00005 moveq r0, r5 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 25c04: e58d9008 str r9, [sp, #8] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 25c08: 01a08000 moveq r8, r0 <== NOT EXECUTED 25c0c: 01a09000 moveq r9, r0 <== NOT EXECUTED 25c10: 0a000051 beq 25d5c <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 25c14: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED 25c18: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED 25c1c: e58da00c str sl, [sp, #12] <== NOT EXECUTED 25c20: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 25c24: e59da038 ldr sl, [sp, #56] ; 0x38 <== NOT EXECUTED 25c28: ea000003 b 25c3c <== NOT EXECUTED return rc; while (count > 0) 25c2c: e0555004 subs r5, r5, r4 <== NOT EXECUTED 25c30: 0a000047 beq 25d54 <== NOT EXECUTED 25c34: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED 25c38: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 25c3c: e1d740b6 ldrh r4, [r7, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 25c40: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 25c44: e0614004 rsb r4, r1, r4 <== NOT EXECUTED 25c48: e1540005 cmp r4, r5 <== NOT EXECUTED 25c4c: 21a04005 movcs r4, r5 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25c50: e3500000 cmp r0, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 25c54: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25c58: e2400002 sub r0, r0, #2 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25c5c: 1a000003 bne 25c70 <== NOT EXECUTED 25c60: e5d3c00a ldrb ip, [r3, #10] <== NOT EXECUTED 25c64: e31c0003 tst ip, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25c68: 1593e01c ldrne lr, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25c6c: 1a000002 bne 25c7c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25c70: e593c030 ldr ip, [r3, #48] ; 0x30 <== NOT EXECUTED 25c74: e5d3e005 ldrb lr, [r3, #5] <== NOT EXECUTED 25c78: e08cee10 add lr, ip, r0, lsl lr <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 25c7c: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25c80: e0022001 and r2, r2, r1 <== NOT EXECUTED 25c84: e08ac008 add ip, sl, r8 <== NOT EXECUTED 25c88: e1a03004 mov r3, r4 <== NOT EXECUTED 25c8c: e1a00006 mov r0, r6 <== NOT EXECUTED 25c90: e08e1931 add r1, lr, r1, lsr r9 <== NOT EXECUTED 25c94: e58dc000 str ip, [sp] <== NOT EXECUTED 25c98: eb0002f4 bl 26870 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 25c9c: e3500000 cmp r0, #0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; 25ca0: e0888004 add r8, r8, r4 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25ca4: e1a0200b mov r2, fp <== NOT EXECUTED 25ca8: e1a00006 mov r0, r6 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) 25cac: ba000026 blt 25d4c <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 25cb0: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25cb4: e1a01009 mov r1, r9 <== NOT EXECUTED 25cb8: eb00670e bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 25cbc: e2501000 subs r1, r0, #0 <== NOT EXECUTED 25cc0: 0affffd9 beq 25c2c <== NOT EXECUTED 25cc4: e1a00001 mov r0, r1 <== NOT EXECUTED 25cc8: ea000000 b 25cd0 <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 25ccc: e3a00000 mov r0, #0 <== NOT EXECUTED } 25cd0: e28dd014 add sp, sp, #20 <== NOT EXECUTED 25cd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 25cd8: e0652003 rsb r2, r5, r3 <== NOT EXECUTED 25cdc: e1540002 cmp r4, r2 <== NOT EXECUTED 25ce0: 9affffb1 bls 25bac <== NOT EXECUTED 25ce4: eaffffaf b 25ba8 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25ce8: e59a3024 ldr r3, [sl, #36] ; 0x24 <== NOT EXECUTED 25cec: e3530000 cmp r3, #0 <== NOT EXECUTED 25cf0: 1affffb2 bne 25bc0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25cf4: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED 25cf8: e3130003 tst r3, #3 <== NOT EXECUTED 25cfc: 0affffaf beq 25bc0 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 25d00: e59a301c ldr r3, [sl, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25d04: e3530000 cmp r3, #0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25d08: 15d71005 ldrbne r1, [r7, #5] <== NOT EXECUTED 25d0c: 15972030 ldrne r2, [r7, #48] ; 0x30 <== NOT EXECUTED 25d10: 12433002 subne r3, r3, #2 <== NOT EXECUTED 25d14: 10823113 addne r3, r2, r3, lsl r1 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 25d18: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 25d1c: 0597301c ldreq r3, [r7, #28] <== NOT EXECUTED 25d20: e5d71002 ldrb r1, [r7, #2] <== NOT EXECUTED 25d24: e59dc038 ldr ip, [sp, #56] ; 0x38 <== NOT EXECUTED 25d28: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25d2c: e0831134 add r1, r3, r4, lsr r1 <== NOT EXECUTED 25d30: e0042002 and r2, r4, r2 <== NOT EXECUTED 25d34: e1a00006 mov r0, r6 <== NOT EXECUTED 25d38: e1a03005 mov r3, r5 <== NOT EXECUTED 25d3c: e58dc000 str ip, [sp] <== NOT EXECUTED 25d40: eb0002ca bl 26870 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 25d44: e3500000 cmp r0, #0 <== NOT EXECUTED 25d48: aaffffe0 bge 25cd0 <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 25d4c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25d50: eaffffde b 25cd0 <== NOT EXECUTED 25d54: e59da00c ldr sl, [sp, #12] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 25d58: e1a00008 mov r0, r8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25d5c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 25d60: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 25d64: e2424001 sub r4, r2, #1 <== NOT EXECUTED 25d68: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 25d6c: e0848008 add r8, r4, r8 <== NOT EXECUTED 25d70: e08c8338 add r8, ip, r8, lsr r3 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 25d74: e58a9038 str r9, [sl, #56] ; 0x38 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25d78: e58a8034 str r8, [sl, #52] ; 0x34 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 25d7c: eaffffd3 b 25cd0 <== NOT EXECUTED =============================================================================== 00025240 : * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { fat_fd->links_num++; 25240: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED 25244: e2833001 add r3, r3, #1 <== NOT EXECUTED 25248: e5803008 str r3, [r0, #8] <== NOT EXECUTED return RC_OK; } 2524c: e3a00000 mov r0, #0 <== NOT EXECUTED 25250: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00025254 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25254: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25258: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 2525c: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25260: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 25264: e1a05001 mov r5, r1 <== NOT EXECUTED 25268: e1a08000 mov r8, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2526c: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 25270: e591601c ldr r6, [r1, #28] <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25274: 0a000020 beq 252fc <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 25278: e3a03000 mov r3, #0 <== NOT EXECUTED 2527c: e5853018 str r3, [r5, #24] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 25280: e284100c add r1, r4, #12 <== NOT EXECUTED 25284: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 25288: e0061001 and r1, r6, r1 <== NOT EXECUTED 2528c: e1510002 cmp r1, r2 <== NOT EXECUTED 25290: 2a000015 bcs 252ec <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 25294: e28d7004 add r7, sp, #4 <== NOT EXECUTED 25298: e5276004 str r6, [r7, #-4]! <== NOT EXECUTED 2529c: ea00000a b 252cc <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 252a0: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED 252a4: e1d430b6 ldrh r3, [r4, #6] <== NOT EXECUTED 252a8: e0823003 add r3, r2, r3 <== NOT EXECUTED 252ac: e5853018 str r3, [r5, #24] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 252b0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 252b4: e284100c add r1, r4, #12 <== NOT EXECUTED 252b8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 252bc: e0031001 and r1, r3, r1 <== NOT EXECUTED 252c0: e1510002 cmp r1, r2 <== NOT EXECUTED 252c4: 2a000009 bcs 252f0 <== NOT EXECUTED 252c8: e1a06003 mov r6, r3 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 252cc: e1a01006 mov r1, r6 <== NOT EXECUTED 252d0: e1a00008 mov r0, r8 <== NOT EXECUTED 252d4: e1a0200d mov r2, sp <== NOT EXECUTED 252d8: eb006986 bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 252dc: e3500000 cmp r0, #0 <== NOT EXECUTED 252e0: 0affffee beq 252a0 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 252e4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 252e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 252ec: e1a06003 mov r6, r3 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 252f0: e585603c str r6, [r5, #60] ; 0x3c <== NOT EXECUTED 252f4: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 252f8: eafffff9 b 252e4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 252fc: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED 25300: e3500000 cmp r0, #0 <== NOT EXECUTED 25304: 1affffdb bne 25278 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25308: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 2530c: e3130003 tst r3, #3 <== NOT EXECUTED 25310: 0affffd8 beq 25278 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 25314: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 25318: e5813018 str r3, [r1, #24] <== NOT EXECUTED return rc; 2531c: eafffff0 b 252e4 <== NOT EXECUTED =============================================================================== 00025634 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 25634: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 25638: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 2563c: e1530002 cmp r3, r2 <== NOT EXECUTED fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 25640: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 25644: e1a05001 mov r5, r1 <== NOT EXECUTED 25648: e1a04000 mov r4, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2564c: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 25650: 9a00002d bls 2570c <== NOT EXECUTED uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 25654: e3a06000 mov r6, #0 <== NOT EXECUTED 25658: e58d6004 str r6, [sp, #4] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 2565c: e3530000 cmp r3, #0 <== NOT EXECUTED { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 25660: e3e06000 mvn r6, #0 <== NOT EXECUTED 25664: e58d6000 str r6, [sp] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 25668: 0a00002a beq 25718 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2566c: e1dc60b6 ldrh r6, [ip, #6] <== NOT EXECUTED 25670: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED 25674: e2466001 sub r6, r6, #1 <== NOT EXECUTED 25678: e0866002 add r6, r6, r2 <== NOT EXECUTED 2567c: e1a06c36 lsr r6, r6, ip <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 25680: e1530c16 cmp r3, r6, lsl ip <== NOT EXECUTED 25684: 9a000020 bls 2570c <== NOT EXECUTED return RC_OK; if (cl_start != 0) 25688: e3560000 cmp r6, #0 <== NOT EXECUTED 2568c: 0a000004 beq 256a4 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 25690: e2462001 sub r2, r6, #1 <== NOT EXECUTED 25694: e1a0300d mov r3, sp <== NOT EXECUTED 25698: ebffff20 bl 25320 <== NOT EXECUTED if (rc != RC_OK) 2569c: e3500000 cmp r0, #0 <== NOT EXECUTED 256a0: 1a00001a bne 25710 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 256a4: e1a00004 mov r0, r4 <== NOT EXECUTED 256a8: e1a01005 mov r1, r5 <== NOT EXECUTED 256ac: e1a02006 mov r2, r6 <== NOT EXECUTED 256b0: e28d3004 add r3, sp, #4 <== NOT EXECUTED 256b4: ebffff19 bl 25320 <== NOT EXECUTED if (rc != RC_OK) 256b8: e3500000 cmp r0, #0 <== NOT EXECUTED 256bc: 1a000013 bne 25710 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 256c0: e1a00004 mov r0, r4 <== NOT EXECUTED 256c4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 256c8: eb0068eb bl 3fa7c <== NOT EXECUTED if (rc != RC_OK) 256cc: e3500000 cmp r0, #0 <== NOT EXECUTED 256d0: 1a00000e bne 25710 <== NOT EXECUTED return rc; if (cl_start != 0) 256d4: e3560000 cmp r6, #0 <== NOT EXECUTED 256d8: 0a00000c beq 25710 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 256dc: e1a00004 mov r0, r4 <== NOT EXECUTED 256e0: e59d1000 ldr r1, [sp] <== NOT EXECUTED 256e4: e3e02000 mvn r2, #0 <== NOT EXECUTED 256e8: eb0067e1 bl 3f674 <== NOT EXECUTED if ( rc != RC_OK ) 256ec: e3500000 cmp r0, #0 <== NOT EXECUTED 256f0: 1a000006 bne 25710 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 256f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 256f8: e2466001 sub r6, r6, #1 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 256fc: e585303c str r3, [r5, #60] ; 0x3c <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 25700: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 25704: e5853038 str r3, [r5, #56] ; 0x38 <== NOT EXECUTED 25708: ea000000 b 25710 <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 2570c: e3a00000 mov r0, #0 <== NOT EXECUTED } return RC_OK; } 25710: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25714: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 25718: e3a01f9b mov r1, #620 ; 0x26c <== NOT EXECUTED 2571c: e2811001 add r1, r1, #1 <== NOT EXECUTED 25720: e59f0008 ldr r0, [pc, #8] ; 25730 <== NOT EXECUTED 25724: e59f2008 ldr r2, [pc, #8] ; 25734 <== NOT EXECUTED 25728: e59f3008 ldr r3, [pc, #8] ; 25738 <== NOT EXECUTED 2572c: eb000d39 bl 28c18 <__assert_func> <== NOT EXECUTED =============================================================================== 0002591c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2591c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 25920: e2534000 subs r4, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 25924: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 25928: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2592c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 25930: e1a08002 mov r8, r2 <== NOT EXECUTED 25934: e1a07001 mov r7, r1 <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 25938: 01a00004 moveq r0, r4 <== NOT EXECUTED 2593c: 0a00005a beq 25aac <== NOT EXECUTED return cmpltd; if ( start > fat_fd->fat_file_size ) 25940: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 25944: e1530002 cmp r3, r2 <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 25948: e3a03000 mov r3, #0 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 2594c: e58d3010 str r3, [sp, #16] <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 25950: e58d3014 str r3, [sp, #20] <== NOT EXECUTED uint32_t c = 0; if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 25954: 3a000076 bcc 25b34 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 25958: e5913014 ldr r3, [r1, #20] <== NOT EXECUTED 2595c: e1540003 cmp r4, r3 <== NOT EXECUTED 25960: 8a000073 bhi 25b34 <== NOT EXECUTED 25964: e0643003 rsb r3, r4, r3 <== NOT EXECUTED 25968: e1520003 cmp r2, r3 <== NOT EXECUTED 2596c: 8a000070 bhi 25b34 <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 25970: e084a002 add sl, r4, r2 <== NOT EXECUTED 25974: e1a0200a mov r2, sl <== NOT EXECUTED 25978: e28d3010 add r3, sp, #16 <== NOT EXECUTED 2597c: ebffff6e bl 2573c <== NOT EXECUTED if (rc != RC_OK) 25980: e3500000 cmp r0, #0 <== NOT EXECUTED 25984: 1a000048 bne 25aac <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 25988: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2598c: e15a0003 cmp sl, r3 <== NOT EXECUTED count = c - start; 25990: 10684003 rsbne r4, r8, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25994: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED 25998: e3530001 cmp r3, #1 <== NOT EXECUTED 2599c: 0a000044 beq 25ab4 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 259a0: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 259a4: e1a03338 lsr r3, r8, r3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 259a8: e28db014 add fp, sp, #20 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 259ac: e58d3004 str r3, [sp, #4] <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 259b0: e1a02003 mov r2, r3 <== NOT EXECUTED 259b4: e1a00005 mov r0, r5 <== NOT EXECUTED 259b8: e1a01007 mov r1, r7 <== NOT EXECUTED 259bc: e1a0300b mov r3, fp <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 259c0: e1d6a0b6 ldrh sl, [r6, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 259c4: ebfffe55 bl 25320 <== NOT EXECUTED if (rc != RC_OK) 259c8: e3500000 cmp r0, #0 <== NOT EXECUTED 259cc: 1a000036 bne 25aac <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 259d0: e24aa001 sub sl, sl, #1 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 259d4: e3540000 cmp r4, #0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 259d8: e008a00a and sl, r8, sl <== NOT EXECUTED 259dc: e58da008 str sl, [sp, #8] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 259e0: 01a09000 moveq r9, r0 <== NOT EXECUTED 259e4: 01a08000 moveq r8, r0 <== NOT EXECUTED 259e8: 0a000058 beq 25b50 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 259ec: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED 259f0: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED 259f4: e1a08000 mov r8, r0 <== NOT EXECUTED 259f8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 259fc: e58d700c str r7, [sp, #12] <== NOT EXECUTED 25a00: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED 25a04: ea000004 b 25a1c <== NOT EXECUTED return rc; while (count > 0) 25a08: e0544007 subs r4, r4, r7 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 25a0c: e0888007 add r8, r8, r7 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 25a10: 0a00004c beq 25b48 <== NOT EXECUTED 25a14: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED 25a18: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 25a1c: e1d6c0b6 ldrh ip, [r6, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 25a20: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 25a24: e061c00c rsb ip, r1, ip <== NOT EXECUTED 25a28: e15c0004 cmp ip, r4 <== NOT EXECUTED 25a2c: 21a0c004 movcs ip, r4 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25a30: e3500000 cmp r0, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 25a34: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25a38: e2400002 sub r0, r0, #2 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25a3c: 1a000003 bne 25a50 <== NOT EXECUTED 25a40: e5d3e00a ldrb lr, [r3, #10] <== NOT EXECUTED 25a44: e31e0003 tst lr, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25a48: 1593701c ldrne r7, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25a4c: 1a000002 bne 25a5c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25a50: e593e030 ldr lr, [r3, #48] ; 0x30 <== NOT EXECUTED 25a54: e5d37005 ldrb r7, [r3, #5] <== NOT EXECUTED 25a58: e08e7710 add r7, lr, r0, lsl r7 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 25a5c: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25a60: e0022001 and r2, r2, r1 <== NOT EXECUTED 25a64: e08ae008 add lr, sl, r8 <== NOT EXECUTED 25a68: e1a0300c mov r3, ip <== NOT EXECUTED 25a6c: e1a00005 mov r0, r5 <== NOT EXECUTED 25a70: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 25a74: e58de000 str lr, [sp] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 25a78: e58dc010 str ip, [sp, #16] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 25a7c: eb0002ae bl 2653c <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 25a80: e3500000 cmp r0, #0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25a84: e1a0200b mov r2, fp <== NOT EXECUTED 25a88: e1a00005 mov r0, r5 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) 25a8c: ba000026 blt 25b2c <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 25a90: e59d9014 ldr r9, [sp, #20] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25a94: e1a01009 mov r1, r9 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 25a98: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25a9c: eb006795 bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 25aa0: e2501000 subs r1, r0, #0 <== NOT EXECUTED 25aa4: 0affffd7 beq 25a08 <== NOT EXECUTED 25aa8: e1a00001 mov r0, r1 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 25aac: e28dd018 add sp, sp, #24 <== NOT EXECUTED 25ab0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25ab4: e5973024 ldr r3, [r7, #36] ; 0x24 <== NOT EXECUTED 25ab8: e3530000 cmp r3, #0 <== NOT EXECUTED 25abc: 1affffb7 bne 259a0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25ac0: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 25ac4: e3130003 tst r3, #3 <== NOT EXECUTED 25ac8: 0affffb4 beq 259a0 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 25acc: e597201c ldr r2, [r7, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25ad0: e3520000 cmp r2, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 25ad4: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25ad8: 1a000003 bne 25aec <== NOT EXECUTED 25adc: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED 25ae0: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25ae4: 1593301c ldrne r3, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25ae8: 1a000003 bne 25afc <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25aec: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED 25af0: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 25af4: e2422002 sub r2, r2, #2 <== NOT EXECUTED 25af8: e0813312 add r3, r1, r2, lsl r3 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 25afc: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED 25b00: e5d61002 ldrb r1, [r6, #2] <== NOT EXECUTED 25b04: e59dc03c ldr ip, [sp, #60] ; 0x3c <== NOT EXECUTED 25b08: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25b0c: e0831138 add r1, r3, r8, lsr r1 <== NOT EXECUTED 25b10: e0082002 and r2, r8, r2 <== NOT EXECUTED 25b14: e1a00005 mov r0, r5 <== NOT EXECUTED 25b18: e1a03004 mov r3, r4 <== NOT EXECUTED 25b1c: e58dc000 str ip, [sp] <== NOT EXECUTED 25b20: eb000285 bl 2653c <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 25b24: e3500000 cmp r0, #0 <== NOT EXECUTED 25b28: aaffffdf bge 25aac <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 25b2c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25b30: eaffffdd b 25aac <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 25b34: eb007ac1 bl 44640 <__errno> <== NOT EXECUTED 25b38: e3a03005 mov r3, #5 <== NOT EXECUTED 25b3c: e5803000 str r3, [r0] <== NOT EXECUTED 25b40: e3e00000 mvn r0, #0 <== NOT EXECUTED 25b44: eaffffd8 b 25aac <== NOT EXECUTED 25b48: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 25b4c: e1a00008 mov r0, r8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25b50: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 25b54: e2412001 sub r2, r1, #1 <== NOT EXECUTED 25b58: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 25b5c: e0828008 add r8, r2, r8 <== NOT EXECUTED 25b60: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 25b64: e0828338 add r8, r2, r8, lsr r3 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 25b68: e5879038 str r9, [r7, #56] ; 0x38 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25b6c: e5878034 str r8, [r7, #52] ; 0x34 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 25b70: eaffffcd b 25aac <== NOT EXECUTED =============================================================================== 0003fa7c : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3fa7c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3fa80: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fa84: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 3fa88: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED 3fa8c: e0013003 and r3, r1, r3 <== NOT EXECUTED ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 3fa90: e3a07000 mov r7, #0 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3fa94: e24dd004 sub sp, sp, #4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fa98: e1520003 cmp r2, r3 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3fa9c: e1a06000 mov r6, r0 <== NOT EXECUTED 3faa0: e1a09001 mov r9, r1 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 3faa4: e58d7000 str r7, [sp] <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3faa8: 91a08007 movls r8, r7 <== NOT EXECUTED 3faac: 9a00001d bls 3fb28 <== NOT EXECUTED 3fab0: e1a04001 mov r4, r1 <== NOT EXECUTED 3fab4: e1a08007 mov r8, r7 <== NOT EXECUTED 3fab8: e1a0a00d mov sl, sp <== NOT EXECUTED 3fabc: ea000009 b 3fae8 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 3fac0: ebfffeeb bl 3f674 <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 3fac4: e59d4000 ldr r4, [sp] <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fac8: e285200c add r2, r5, #12 <== NOT EXECUTED 3facc: e892000c ldm r2, {r2, r3} <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) 3fad0: e3500000 cmp r0, #0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fad4: e0042002 and r2, r4, r2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) 3fad8: 11a08000 movne r8, r0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fadc: e1520003 cmp r2, r3 <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 3fae0: e2877001 add r7, r7, #1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3fae4: 2a00000f bcs 3fb28 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 3fae8: e1a01004 mov r1, r4 <== NOT EXECUTED 3faec: e1a0200d mov r2, sp <== NOT EXECUTED 3faf0: e1a00006 mov r0, r6 <== NOT EXECUTED 3faf4: ebffff7f bl 3f8f8 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 3faf8: e1a01004 mov r1, r4 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 3fafc: e2504000 subs r4, r0, #0 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 3fb00: e1a02004 mov r2, r4 <== NOT EXECUTED 3fb04: e1a00006 mov r0, r6 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 3fb08: 0affffec beq 3fac0 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 3fb0c: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED 3fb10: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 3fb14: 10873003 addne r3, r7, r3 <== NOT EXECUTED 3fb18: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 3fb1c: e1a00005 mov r0, r5 <== NOT EXECUTED 3fb20: ebff99a4 bl 261b8 <== NOT EXECUTED return rc; 3fb24: ea000007 b 3fb48 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 3fb28: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED 3fb2c: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 3fb30: 10873003 addne r3, r7, r3 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 3fb34: e5859044 str r9, [r5, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls += freed_cls_cnt; 3fb38: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 3fb3c: e1a00005 mov r0, r5 <== NOT EXECUTED 3fb40: ebff999c bl 261b8 <== NOT EXECUTED 3fb44: e1a04008 mov r4, r8 <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 3fb48: e1a00004 mov r0, r4 <== NOT EXECUTED 3fb4c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3fb50: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 0002608c : fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 2608c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 26090: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED 26094: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED 26098: e0622001 rsb r2, r2, r1 <== NOT EXECUTED 2609c: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED 260a0: e2021007 and r1, r2, #7 <== NOT EXECUTED 260a4: e3a0c001 mov ip, #1 <== NOT EXECUTED 260a8: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED 260ac: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED } 260b0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003f8f8 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 3f8f8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 3f8fc: e3a03000 mov r3, #0 <== NOT EXECUTED fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 3f900: e24dd004 sub sp, sp, #4 <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 3f904: e3510001 cmp r1, #1 <== NOT EXECUTED fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 3f908: e1a05001 mov r5, r1 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 3f90c: e58d3000 str r3, [sp] <== NOT EXECUTED fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 3f910: e1a0a002 mov sl, r2 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 3f914: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 3f918: 9a000021 bls 3f9a4 <== NOT EXECUTED 3f91c: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 3f920: e2833001 add r3, r3, #1 <== NOT EXECUTED 3f924: e1510003 cmp r1, r3 <== NOT EXECUTED 3f928: 8a00001d bhi 3f9a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3f92c: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 3f930: e3130001 tst r3, #1 <== NOT EXECUTED 3f934: 1a000020 bne 3f9bc <== NOT EXECUTED 3f938: e3130002 tst r3, #2 <== NOT EXECUTED 3f93c: 15d48002 ldrbne r8, [r4, #2] <== NOT EXECUTED 3f940: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f944: 05d48002 ldrbeq r8, [r4, #2] <== NOT EXECUTED 3f948: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f94c: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED 3f950: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED 3f954: 10838836 addne r8, r3, r6, lsr r8 <== NOT EXECUTED 3f958: 00838836 addeq r8, r3, r6, lsr r8 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f95c: e1a00004 mov r0, r4 <== NOT EXECUTED 3f960: e1a01008 mov r1, r8 <== NOT EXECUTED 3f964: e3a02001 mov r2, #1 <== NOT EXECUTED 3f968: e1a0300d mov r3, sp <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f96c: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f970: ebff9a6b bl 26324 <== NOT EXECUTED if (rc != RC_OK) 3f974: e3500000 cmp r0, #0 <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f978: e1a0700d mov r7, sp <== NOT EXECUTED if (rc != RC_OK) 3f97c: 1a00000c bne 3f9b4 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 3f980: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f984: e2499001 sub r9, r9, #1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 3f988: e3520002 cmp r2, #2 <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f98c: e0066009 and r6, r6, r9 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 3f990: 0a00000e beq 3f9d0 <== NOT EXECUTED 3f994: e3520004 cmp r2, #4 <== NOT EXECUTED 3f998: 0a000025 beq 3fa34 <== NOT EXECUTED 3f99c: e3520001 cmp r2, #1 <== NOT EXECUTED 3f9a0: 0a00000f beq 3f9e4 <== NOT EXECUTED *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 3f9a4: eb001325 bl 44640 <__errno> <== NOT EXECUTED 3f9a8: e3a03005 mov r3, #5 <== NOT EXECUTED 3f9ac: e5803000 str r3, [r0] <== NOT EXECUTED 3f9b0: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 3f9b4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3f9b8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3f9bc: e5d48002 ldrb r8, [r4, #2] <== NOT EXECUTED 3f9c0: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f9c4: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED 3f9c8: e0838836 add r8, r3, r6, lsr r8 <== NOT EXECUTED 3f9cc: eaffffe2 b 3f95c <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 3f9d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f9d4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f9d8: e19330b6 ldrh r3, [r3, r6] <== NOT EXECUTED 3f9dc: e58a3000 str r3, [sl] <== NOT EXECUTED break; 3f9e0: eafffff3 b 3f9b4 <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 3f9e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3f9e8: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 3f9ec: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3f9f0: e2400001 sub r0, r0, #1 <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 3f9f4: e7d13006 ldrb r3, [r1, r6] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3f9f8: e1500006 cmp r0, r6 <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 3f9fc: e58a3000 str r3, [sl] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3fa00: 0a000010 beq 3fa48 <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 3fa04: e0816006 add r6, r1, r6 <== NOT EXECUTED 3fa08: e5d62001 ldrb r2, [r6, #1] <== NOT EXECUTED 3fa0c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 3fa10: e58a3000 str r3, [sl] <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 3fa14: e2150001 ands r0, r5, #1 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3fa18: 01a03a03 lsleq r3, r3, #20 <== NOT EXECUTED { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; 3fa1c: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3fa20: 01a03a23 lsreq r3, r3, #20 <== NOT EXECUTED { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; 3fa24: 158a3000 strne r3, [sl] <== NOT EXECUTED 3fa28: 13a00000 movne r0, #0 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3fa2c: 058a3000 streq r3, [sl] <== NOT EXECUTED 3fa30: eaffffdf b 3f9b4 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 3fa34: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3fa38: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3fa3c: e7933006 ldr r3, [r3, r6] <== NOT EXECUTED 3fa40: e58a3000 str r3, [sl] <== NOT EXECUTED break; 3fa44: eaffffda b 3f9b4 <== NOT EXECUTED * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 3fa48: e1a00004 mov r0, r4 <== NOT EXECUTED 3fa4c: e2881001 add r1, r8, #1 <== NOT EXECUTED 3fa50: e1a0300d mov r3, sp <== NOT EXECUTED 3fa54: ebff9a32 bl 26324 <== NOT EXECUTED &block0); if (rc != RC_OK) 3fa58: e3500000 cmp r0, #0 <== NOT EXECUTED 3fa5c: 1affffd4 bne 3f9b4 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 3fa60: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3fa64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3fa68: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3fa6c: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3fa70: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 3fa74: e58a3000 str r3, [sl] <== NOT EXECUTED 3fa78: eaffffe5 b 3fa14 <== NOT EXECUTED =============================================================================== 000260cc : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 260cc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 260d0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 260d4: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); 260d8: e3a05000 mov r5, #0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 260dc: e3510000 cmp r1, #0 <== NOT EXECUTED 260e0: e1a02001 mov r2, r1 <== NOT EXECUTED 260e4: 0a000019 beq 26150 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 260e8: e284006c add r0, r4, #108 ; 0x6c <== NOT EXECUTED 260ec: e8900009 ldm r0, {r0, r3} <== NOT EXECUTED 260f0: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED 260f4: e203c007 and ip, r3, #7 <== NOT EXECUTED 260f8: e1a02c56 asr r2, r6, ip <== NOT EXECUTED 260fc: e3120001 tst r2, #1 <== NOT EXECUTED 26100: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED 26104: 0a00001b beq 26178 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); 26108: e3a02000 mov r2, #0 <== NOT EXECUTED 2610c: ea000006 b 2612c <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 26110: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED 26114: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED 26118: e203c007 and ip, r3, #7 <== NOT EXECUTED 2611c: e1a07c56 asr r7, r6, ip <== NOT EXECUTED 26120: e3170001 tst r7, #1 <== NOT EXECUTED 26124: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED 26128: 0a000012 beq 26178 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 2612c: e2833001 add r3, r3, #1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 26130: e1510003 cmp r1, r3 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 26134: e2822001 add r2, r2, #1 <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 26138: 81a0c003 movhi ip, r3 <== NOT EXECUTED 2613c: 91a0c005 movls ip, r5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 26140: e1520001 cmp r2, r1 <== NOT EXECUTED FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 26144: e584c070 str ip, [r4, #112] ; 0x70 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 26148: 3afffff0 bcc 26110 <== NOT EXECUTED 2614c: e1a02001 mov r2, r1 <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 26150: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 26154: e26336ff rsb r3, r3, #267386880 ; 0xff00000 <== NOT EXECUTED 26158: e2833aff add r3, r3, #1044480 ; 0xff000 <== NOT EXECUTED 2615c: e2833eff add r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 26160: e1a01082 lsl r1, r2, #1 <== NOT EXECUTED 26164: e283300f add r3, r3, #15 <== NOT EXECUTED 26168: e1510003 cmp r1, r3 <== NOT EXECUTED 2616c: 3a000008 bcc 26194 <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 26170: e3a00000 mov r0, #0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 26174: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 26178: e3a03001 mov r3, #1 <== NOT EXECUTED 2617c: e186cc13 orr ip, r6, r3, lsl ip <== NOT EXECUTED 26180: e5c7c000 strb ip, [r7] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 26184: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 26188: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED 2618c: e0800003 add r0, r0, r3 <== NOT EXECUTED 26190: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 26194: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 26198: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 2619c: ebff8c47 bl 92c0 <== NOT EXECUTED if (fs_info->uino != NULL) 261a0: e3500000 cmp r0, #0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 261a4: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if (fs_info->uino != NULL) 261a8: 0afffff0 beq 26170 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 261ac: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED 261b0: e5841070 str r1, [r4, #112] ; 0x70 <== NOT EXECUTED 261b4: eaffffc8 b 260dc <== NOT EXECUTED =============================================================================== 000267c0 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 267c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 267c4: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 267c8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; 267cc: e58d1000 str r1, [sp] <== NOT EXECUTED int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 267d0: e1a05000 mov r5, r0 <== NOT EXECUTED ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 267d4: e3a01001 mov r1, #1 <== NOT EXECUTED 267d8: e1d400b6 ldrh r0, [r4, #6] <== NOT EXECUTED 267dc: ebff83df bl 7760 <== NOT EXECUTED if ( buf == NULL ) 267e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 267e4: 11a0700d movne r7, sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) 267e8: 0a00001b beq 2685c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 267ec: e59d3000 ldr r3, [sp] <== NOT EXECUTED 267f0: e594e00c ldr lr, [r4, #12] <== NOT EXECUTED 267f4: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 267f8: e1a01003 mov r1, r3 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 267fc: e003300e and r3, r3, lr <== NOT EXECUTED 26800: e153000c cmp r3, ip <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 26804: e1a02006 mov r2, r6 <== NOT EXECUTED 26808: e1a00005 mov r0, r5 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2680c: 2a00000e bcs 2684c <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 26810: ebffffd4 bl 26768 <== NOT EXECUTED 26814: e1a08000 mov r8, r0 <== NOT EXECUTED if ( ret == -1 ) 26818: e3780001 cmn r8, #1 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2681c: e1a0200d mov r2, sp <== NOT EXECUTED 26820: e1a00005 mov r0, r5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) 26824: 0a000003 beq 26838 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 26828: e59d1000 ldr r1, [sp] <== NOT EXECUTED 2682c: eb006431 bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 26830: e2508000 subs r8, r0, #0 <== NOT EXECUTED 26834: 0affffec beq 267ec <== NOT EXECUTED { free(buf); 26838: e1a00006 mov r0, r6 <== NOT EXECUTED 2683c: ebff854b bl 7d70 <== NOT EXECUTED } } free(buf); return rc; } 26840: e1a00008 mov r0, r8 <== NOT EXECUTED 26844: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26848: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED free(buf); return rc; } } free(buf); 2684c: e1a00006 mov r0, r6 <== NOT EXECUTED 26850: ebff8546 bl 7d70 <== NOT EXECUTED 26854: e3a08000 mov r8, #0 <== NOT EXECUTED return rc; 26858: eafffff8 b 26840 <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 2685c: eb007777 bl 44640 <__errno> <== NOT EXECUTED 26860: e3a03005 mov r3, #5 <== NOT EXECUTED 26864: e5803000 str r3, [r0] <== NOT EXECUTED 26868: e3e08000 mvn r8, #0 <== NOT EXECUTED 2686c: eafffff3 b 26840 <== NOT EXECUTED =============================================================================== 0002690c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 2690c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 26910: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED 26914: e1a05000 mov r5, r0 <== NOT EXECUTED char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 26918: e3a06000 mov r6, #0 <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 2691c: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED 26920: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 26924: e58d60b4 str r6, [sp, #180] ; 0xb4 <== NOT EXECUTED int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 26928: e5954034 ldr r4, [r5, #52] ; 0x34 <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 2692c: ebff8b41 bl 9638 <== NOT EXECUTED if (rc == -1) 26930: e3700001 cmn r0, #1 <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 26934: e1a07000 mov r7, r0 <== NOT EXECUTED if (rc == -1) 26938: 0a0000e9 beq 26ce4 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2693c: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED 26940: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 26944: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED 26948: 1a000151 bne 26e94 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 2694c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 26950: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26954: ebff7fa0 bl 67dc <== NOT EXECUTED if (vol->dd == NULL) 26958: e3500000 cmp r0, #0 <== NOT EXECUTED /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 2695c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if (vol->dd == NULL) 26960: 0a000168 beq 26f08 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 26964: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 26968: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 2696c: e1a02006 mov r2, r6 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 26970: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 26974: e5841058 str r1, [r4, #88] ; 0x58 <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 26978: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED 2697c: ebff7b5d bl 56f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26980: e3500000 cmp r0, #0 <== NOT EXECUTED 26984: 1a00015d bne 26f00 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 26988: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED 2698c: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED 26990: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 26994: e28d0004 add r0, sp, #4 <== NOT EXECUTED 26998: eb0083d8 bl 47900 <== NOT EXECUTED sc = rtems_bdbuf_release( block); 2699c: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED 269a0: ebff76c3 bl 44b4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 269a4: e3500000 cmp r0, #0 <== NOT EXECUTED 269a8: 1a00015b bne 26f1c <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 269ac: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED 269b0: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED 269b4: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 269b8: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 269bc: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED if ( (vol->bps != 512) && 269c0: e3520b01 cmp r2, #1024 ; 0x400 <== NOT EXECUTED 269c4: 13520c02 cmpne r2, #512 ; 0x200 <== NOT EXECUTED 269c8: 03a01000 moveq r1, #0 <== NOT EXECUTED 269cc: 13a01001 movne r1, #1 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 269d0: e1c420b0 strh r2, [r4] <== NOT EXECUTED if ( (vol->bps != 512) && 269d4: 0a0000c5 beq 26cf0 <== NOT EXECUTED 269d8: e3520b02 cmp r2, #2048 ; 0x800 <== NOT EXECUTED 269dc: 0a000001 beq 269e8 <== NOT EXECUTED 269e0: e3520a01 cmp r2, #4096 ; 0x1000 <== NOT EXECUTED 269e4: 1a000131 bne 26eb0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 269e8: e3a03000 mov r3, #0 <== NOT EXECUTED 269ec: e5c43003 strb r3, [r4, #3] <== NOT EXECUTED 269f0: e1a034a2 lsr r3, r2, #9 <== NOT EXECUTED 269f4: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED i >>= 1, vol->sec_mul++); 269f8: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 269fc: e2822001 add r2, r2, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 26a00: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 26a04: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 26a08: 0afffffa beq 269f8 <== NOT EXECUTED 26a0c: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 26a10: e1d410b0 ldrh r1, [r4] <== NOT EXECUTED 26a14: e3a03000 mov r3, #0 <== NOT EXECUTED 26a18: e3110001 tst r1, #1 <== NOT EXECUTED 26a1c: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED 26a20: e1a03001 mov r3, r1 <== NOT EXECUTED 26a24: 1a000008 bne 26a4c <== NOT EXECUTED 26a28: e3a02001 mov r2, #1 <== NOT EXECUTED 26a2c: ea000000 b 26a34 <== NOT EXECUTED 26a30: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 26a34: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 26a38: e2820001 add r0, r2, #1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 26a3c: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 26a40: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 26a44: 0afffff9 beq 26a30 <== NOT EXECUTED 26a48: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 26a4c: e5dd3011 ldrb r3, [sp, #17] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 26a50: e3530000 cmp r3, #0 <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 26a54: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 26a58: 0a000114 beq 26eb0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 26a5c: e3a02000 mov r2, #0 <== NOT EXECUTED 26a60: e3130001 tst r3, #1 <== NOT EXECUTED 26a64: e5c42005 strb r2, [r4, #5] <== NOT EXECUTED 26a68: 1a000008 bne 26a90 <== NOT EXECUTED 26a6c: e3a02001 mov r2, #1 <== NOT EXECUTED 26a70: ea000000 b 26a78 <== NOT EXECUTED 26a74: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 26a78: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 26a7c: e2820001 add r0, r2, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 26a80: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 26a84: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 26a88: 0afffff9 beq 26a74 <== NOT EXECUTED 26a8c: e5c42005 strb r2, [r4, #5] <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 26a90: e1a03211 lsl r3, r1, r2 <== NOT EXECUTED 26a94: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26a98: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 26a9c: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED 26aa0: e1c430b6 strh r3, [r4, #6] <== NOT EXECUTED 26aa4: 8a000101 bhi 26eb0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 26aa8: e3a02000 mov r2, #0 <== NOT EXECUTED 26aac: e3130001 tst r3, #1 <== NOT EXECUTED 26ab0: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED 26ab4: 1a000008 bne 26adc <== NOT EXECUTED 26ab8: e3a02001 mov r2, #1 <== NOT EXECUTED 26abc: ea000000 b 26ac4 <== NOT EXECUTED 26ac0: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 26ac4: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 26ac8: e2820001 add r0, r2, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 26acc: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 26ad0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 26ad4: 0afffff9 beq 26ac0 <== NOT EXECUTED 26ad8: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 26adc: e5dd6014 ldrb r6, [sp, #20] <== NOT EXECUTED 26ae0: e5c46009 strb r6, [r4, #9] <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 26ae4: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED 26ae8: e5dd7013 ldrb r7, [sp, #19] <== NOT EXECUTED 26aec: e1837407 orr r7, r3, r7, lsl #8 <== NOT EXECUTED 26af0: e1c471b4 strh r7, [r4, #20] <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 26af4: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED 26af8: e5dd3015 ldrb r3, [sp, #21] <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 26afc: e2410001 sub r0, r1, #1 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 26b00: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 26b04: e0800283 add r0, r0, r3, lsl #5 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 26b08: e1c432b0 strh r3, [r4, #32] <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 26b0c: eb00d6de bl 5c68c <__aeabi_idiv> <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 26b10: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED 26b14: e1a03310 lsl r3, r0, r3 <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 26b18: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 26b1c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 26b20: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED 26b24: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED 26b28: e1932402 orrs r2, r3, r2, lsl #8 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 26b2c: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED 26b30: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED 26b34: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED 26b38: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 26b3c: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 26b40: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED 26b44: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 26b48: 01832c02 orreq r2, r3, r2, lsl #24 <== NOT EXECUTED 26b4c: e5842018 str r2, [r4, #24] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 26b50: e5d4c009 ldrb ip, [r4, #9] <== NOT EXECUTED 26b54: e594e018 ldr lr, [r4, #24] <== NOT EXECUTED 26b58: e1d411b4 ldrh r1, [r4, #20] <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 26b5c: e0807007 add r7, r0, r7 <== NOT EXECUTED 26b60: e0237296 mla r3, r6, r2, r7 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 26b64: e0221c9e mla r2, lr, ip, r1 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 26b68: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 26b6c: e584201c str r2, [r4, #28] <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 26b70: e5dd1018 ldrb r1, [sp, #24] <== NOT EXECUTED 26b74: e5dd2017 ldrb r2, [sp, #23] <== NOT EXECUTED 26b78: e1922401 orrs r2, r2, r1, lsl #8 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 26b7c: 05dd2026 ldrbeq r2, [sp, #38] ; 0x26 <== NOT EXECUTED 26b80: 05dd1025 ldrbeq r1, [sp, #37] ; 0x25 <== NOT EXECUTED 26b84: 01a02802 lsleq r2, r2, #16 <== NOT EXECUTED 26b88: 05dd0024 ldrbeq r0, [sp, #36] ; 0x24 <== NOT EXECUTED 26b8c: 01822401 orreq r2, r2, r1, lsl #8 <== NOT EXECUTED 26b90: 05dd1027 ldrbeq r1, [sp, #39] ; 0x27 <== NOT EXECUTED 26b94: 01822000 orreq r2, r2, r0 <== NOT EXECUTED 26b98: 01822c01 orreq r2, r2, r1, lsl #24 <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 26b9c: e0630002 rsb r0, r3, r2 <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 26ba0: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 26ba4: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED 26ba8: eb00d673 bl 5c57c <__aeabi_uidiv> <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 26bac: e3a03eff mov r3, #4080 ; 0xff0 <== NOT EXECUTED 26bb0: e2833004 add r3, r3, #4 <== NOT EXECUTED 26bb4: e1500003 cmp r0, r3 <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 26bb8: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 26bbc: 8a000050 bhi 26d04 <== NOT EXECUTED { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 26bc0: e3a02eff mov r2, #4080 ; 0xff0 <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 26bc4: e1a03002 mov r3, r2 <== NOT EXECUTED 26bc8: e2833008 add r3, r3, #8 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 26bcc: e282200f add r2, r2, #15 <== NOT EXECUTED vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 26bd0: e3a01001 mov r1, #1 <== NOT EXECUTED 26bd4: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 26bd8: e584200c str r2, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 26bdc: e5843010 str r3, [r4, #16] <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 26be0: e3a03000 mov r3, #0 <== NOT EXECUTED vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 26be4: e3e02000 mvn r2, #0 <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 26be8: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 26bec: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 26bf0: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = 0; 26bf4: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 26bf8: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 26bfc: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26c00: ebfffd6c bl 261b8 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 26c04: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED 26c08: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 26c0c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 26c10: e0232190 mla r3, r0, r1, r2 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26c14: e3a00002 mov r0, #2 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 26c18: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26c1c: e3a0100c mov r1, #12 <== NOT EXECUTED 26c20: ebff82ce bl 7760 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 26c24: e3500000 cmp r0, #0 <== NOT EXECUTED _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26c28: e1a03000 mov r3, r0 <== NOT EXECUTED 26c2c: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 26c30: 0a0000d0 beq 26f78 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); 26c34: e280200c add r2, r0, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26c38: e280c004 add ip, r0, #4 <== NOT EXECUTED the_chain->permanent_null = NULL; 26c3c: e3a05000 mov r5, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26c40: e280e010 add lr, r0, #16 <== NOT EXECUTED the_chain->permanent_null = NULL; 26c44: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 26c48: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26c4c: e3a00002 mov r0, #2 <== NOT EXECUTED 26c50: e3a0100c mov r1, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26c54: e583e00c str lr, [r3, #12] <== NOT EXECUTED 26c58: e583c000 str ip, [r3] <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 26c5c: e5822008 str r2, [r2, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 26c60: e5825004 str r5, [r2, #4] <== NOT EXECUTED 26c64: ebff82bd bl 7760 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 26c68: e1500005 cmp r0, r5 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26c6c: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 26c70: 0a0000bc beq 26f68 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); 26c74: e280300c add r3, r0, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26c78: e2802004 add r2, r0, #4 <== NOT EXECUTED 26c7c: e2801010 add r1, r0, #16 <== NOT EXECUTED 26c80: e580100c str r1, [r0, #12] <== NOT EXECUTED 26c84: e8800024 stm r0, {r2, r5} <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 26c88: e5800008 str r0, [r0, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 26c8c: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 26c90: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 26c94: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED 26c98: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 26c9c: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 26ca0: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 26ca4: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED 26ca8: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 26cac: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; 26cb0: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 26cb4: e3a01001 mov r1, #1 <== NOT EXECUTED 26cb8: ebff82a8 bl 7760 <== NOT EXECUTED if ( fs_info->uino == NULL ) 26cbc: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 26cc0: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if ( fs_info->uino == NULL ) 26cc4: 0a00009b beq 26f38 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 26cc8: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED 26ccc: e3a01001 mov r1, #1 <== NOT EXECUTED 26cd0: ebff82a2 bl 7760 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 26cd4: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 26cd8: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 26cdc: 11a07005 movne r7, r5 <== NOT EXECUTED 26ce0: 0a000079 beq 26ecc <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 26ce4: e1a00007 mov r0, r7 <== NOT EXECUTED 26ce8: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED 26cec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 26cf0: e1a03ca3 lsr r3, r3, #25 <== NOT EXECUTED 26cf4: e3130001 tst r3, #1 <== NOT EXECUTED 26cf8: e5c41003 strb r1, [r4, #3] <== NOT EXECUTED 26cfc: 0affff3c beq 269f4 <== NOT EXECUTED 26d00: eaffff42 b 26a10 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 26d04: e3a03cff mov r3, #65280 ; 0xff00 <== NOT EXECUTED 26d08: e28330f4 add r3, r3, #244 ; 0xf4 <== NOT EXECUTED 26d0c: e1500003 cmp r0, r3 <== NOT EXECUTED 26d10: 9a000054 bls 26e68 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 26d14: e3a03004 mov r3, #4 <== NOT EXECUTED 26d18: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 26d1c: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 26d20: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 26d24: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED 26d28: e5843010 str r3, [r4, #16] <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 26d2c: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED 26d30: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED 26d34: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED 26d38: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26d3c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26d40: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED 26d44: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26d48: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 26d4c: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 26d50: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 26d54: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED if (vol->mirror) 26d58: e3530000 cmp r3, #0 <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 26d5c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED if (vol->mirror) 26d60: 0a000049 beq 26e8c <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 26d64: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 26d68: e203300f and r3, r3, #15 <== NOT EXECUTED 26d6c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 26d70: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED 26d74: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED 26d78: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED if( vol->info_sec == 0 ) 26d7c: e3510000 cmp r1, #0 <== NOT EXECUTED if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 26d80: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED if( vol->info_sec == 0 ) 26d84: 0a000049 beq 26eb0 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 26d88: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED 26d8c: e1a00005 mov r0, r5 <== NOT EXECUTED 26d90: e3a02000 mov r2, #0 <== NOT EXECUTED 26d94: e3a03004 mov r3, #4 <== NOT EXECUTED 26d98: e58d6000 str r6, [sp] <== NOT EXECUTED 26d9c: ebfffeb3 bl 26870 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 26da0: e3500000 cmp r0, #0 <== NOT EXECUTED 26da4: ba00006b blt 26f58 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 26da8: e5dd30aa ldrb r3, [sp, #170] ; 0xaa <== NOT EXECUTED 26dac: e5dd20a9 ldrb r2, [sp, #169] ; 0xa9 <== NOT EXECUTED 26db0: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26db4: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED 26db8: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26dbc: e5dd20ab ldrb r2, [sp, #171] ; 0xab <== NOT EXECUTED 26dc0: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26dc4: e1832c02 orr r2, r3, r2, lsl #24 <== NOT EXECUTED 26dc8: e59f31c4 ldr r3, [pc, #452] ; 26f94 <== NOT EXECUTED 26dcc: e1520003 cmp r2, r3 <== NOT EXECUTED 26dd0: 1a000034 bne 26ea8 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 26dd4: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED 26dd8: e1a00005 mov r0, r5 <== NOT EXECUTED 26ddc: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED 26de0: e3a0300c mov r3, #12 <== NOT EXECUTED 26de4: e58d6000 str r6, [sp] <== NOT EXECUTED 26de8: ebfffea0 bl 26870 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 26dec: e3500000 cmp r0, #0 <== NOT EXECUTED 26df0: ba000056 blt 26f50 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 26df4: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED 26df8: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED 26dfc: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED 26e00: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26e04: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26e08: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED 26e0c: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26e10: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 26e14: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 26e18: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED 26e1c: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED 26e20: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED 26e24: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26e28: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26e2c: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED 26e30: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26e34: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 26e38: e3e01000 mvn r1, #0 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 26e3c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 26e40: e1a00005 mov r0, r5 <== NOT EXECUTED 26e44: e1a02001 mov r2, r1 <== NOT EXECUTED 26e48: ebfffdf2 bl 26618 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 26e4c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 26e50: 0affff69 beq 26bfc <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 26e54: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26e58: ebfffcd6 bl 261b8 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 26e5c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26e60: ebff7ef1 bl 6a2c <== NOT EXECUTED return rc; 26e64: eaffff9e b 26ce4 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 26e68: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26e6c: e3a03cff mov r3, #65280 ; 0xff00 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 26e70: e2422001 sub r2, r2, #1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26e74: e28330f8 add r3, r3, #248 ; 0xf8 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 26e78: e3a01002 mov r1, #2 <== NOT EXECUTED 26e7c: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 26e80: e584200c str r2, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26e84: e5843010 str r3, [r4, #16] <== NOT EXECUTED 26e88: eaffff54 b 26be0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 26e8c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED 26e90: eaffffb6 b 26d70 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 26e94: eb0075e9 bl 44640 <__errno> <== NOT EXECUTED 26e98: e3a03019 mov r3, #25 <== NOT EXECUTED 26e9c: e5803000 str r3, [r0] <== NOT EXECUTED 26ea0: e3e07000 mvn r7, #0 <== NOT EXECUTED 26ea4: eaffff8e b 26ce4 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 26ea8: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26eac: ebfffcc1 bl 261b8 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 26eb0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26eb4: ebff7edc bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 26eb8: eb0075e0 bl 44640 <__errno> <== NOT EXECUTED 26ebc: e3a03016 mov r3, #22 <== NOT EXECUTED 26ec0: e5803000 str r3, [r0] <== NOT EXECUTED 26ec4: e3e07000 mvn r7, #0 <== NOT EXECUTED 26ec8: eaffff85 b 26ce4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 26ecc: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26ed0: ebff7ed5 bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26ed4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26ed8: ebff83a4 bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 26edc: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 26ee0: ebff83a2 bl 7d70 <== NOT EXECUTED free(fs_info->uino); 26ee4: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 26ee8: ebff83a0 bl 7d70 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 26eec: eb0075d3 bl 44640 <__errno> <== NOT EXECUTED 26ef0: e3a0300c mov r3, #12 <== NOT EXECUTED 26ef4: e5803000 str r3, [r0] <== NOT EXECUTED 26ef8: e3e07000 mvn r7, #0 <== NOT EXECUTED 26efc: eaffff78 b 26ce4 <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 26f00: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f04: ebff7ec8 bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); 26f08: eb0075cc bl 44640 <__errno> <== NOT EXECUTED 26f0c: e3a03005 mov r3, #5 <== NOT EXECUTED 26f10: e5803000 str r3, [r0] <== NOT EXECUTED 26f14: e3e07000 mvn r7, #0 <== NOT EXECUTED 26f18: eaffff71 b 26ce4 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 26f1c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f20: ebff7ec1 bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 26f24: eb0075c5 bl 44640 <__errno> <== NOT EXECUTED 26f28: e3a03005 mov r3, #5 <== NOT EXECUTED 26f2c: e5803000 str r3, [r0] <== NOT EXECUTED 26f30: e3e07000 mvn r7, #0 <== NOT EXECUTED 26f34: eaffff6a b 26ce4 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 26f38: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f3c: ebff7eba bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26f40: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26f44: ebff8389 bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 26f48: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 26f4c: eaffffe5 b 26ee8 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 26f50: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26f54: ebfffc97 bl 261b8 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 26f58: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f5c: ebff7eb2 bl 6a2c <== NOT EXECUTED 26f60: e3e07000 mvn r7, #0 <== NOT EXECUTED return -1; 26f64: eaffff5e b 26ce4 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 26f68: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f6c: ebff7eae bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26f70: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26f74: eaffffdb b 26ee8 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 26f78: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26f7c: ebff7eaa bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 26f80: eb0075ae bl 44640 <__errno> <== NOT EXECUTED 26f84: e3a0300c mov r3, #12 <== NOT EXECUTED 26f88: e5803000 str r3, [r0] <== NOT EXECUTED 26f8c: e3e07000 mvn r7, #0 <== NOT EXECUTED 26f90: eaffff53 b 26ce4 <== NOT EXECUTED =============================================================================== 000260b4 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 260b4: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED 260b8: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 260bc: e1500001 cmp r0, r1 <== NOT EXECUTED 260c0: 83a00000 movhi r0, #0 <== NOT EXECUTED 260c4: 93a00001 movls r0, #1 <== NOT EXECUTED 260c8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003fb54 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3fb54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; 3fb58: e3a0b000 mov fp, #0 <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3fb5c: e24dd010 sub sp, sp, #16 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; 3fb60: e58db00c str fp, [sp, #12] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3fb64: e1a04000 mov r4, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3fb68: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 3fb6c: e3520000 cmp r2, #0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 3fb70: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *cls_added, uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3fb74: e58d0004 str r0, [sp, #4] <== NOT EXECUTED uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; 3fb78: e583b000 str fp, [r3] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3fb7c: e1a0a003 mov sl, r3 <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 3fb80: e58d2000 str r2, [sp] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3fb84: e58d1008 str r1, [sp, #8] <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 3fb88: 01a0b002 moveq fp, r2 <== NOT EXECUTED 3fb8c: 0a00003f beq 3fc90 <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 3fb90: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3fb94: e5925044 ldr r5, [r2, #68] ; 0x44 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 3fb98: e2877002 add r7, r7, #2 <== NOT EXECUTED *cls_added = 0; if (count == 0) return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 3fb9c: e3750001 cmn r5, #1 <== NOT EXECUTED 3fba0: 03a05002 moveq r5, #2 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 3fba4: e3570002 cmp r7, #2 <== NOT EXECUTED 3fba8: 9a00003b bls 3fc9c <== NOT EXECUTED 3fbac: e3a06002 mov r6, #2 <== NOT EXECUTED 3fbb0: e28d900c add r9, sp, #12 <== NOT EXECUTED 3fbb4: ea000011 b 3fc00 <== NOT EXECUTED * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 3fbb8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3fbbc: e5825000 str r5, [r2] <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3fbc0: e3e02000 mvn r2, #0 <== NOT EXECUTED 3fbc4: ebfffeaa bl 3f674 <== NOT EXECUTED if ( rc != RC_OK ) 3fbc8: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3fbcc: 1a00002f bne 3fc90 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3fbd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3fbd4: e59d2000 ldr r2, [sp] <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3fbd8: e2833001 add r3, r3, #1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3fbdc: e1520003 cmp r2, r3 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3fbe0: e58a3000 str r3, [sl] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3fbe4: 0a000044 beq 3fcfc <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return rc; 3fbe8: e1a0b005 mov fp, r5 <== NOT EXECUTED } } i++; cl4find++; 3fbec: e2855001 add r5, r5, #1 <== NOT EXECUTED if (cl4find >= data_cls_val) 3fbf0: e1570005 cmp r7, r5 <== NOT EXECUTED 3fbf4: 93a05002 movls r5, #2 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 3fbf8: e1570006 cmp r7, r6 <== NOT EXECUTED 3fbfc: 9a000026 bls 3fc9c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 3fc00: e1a01005 mov r1, r5 <== NOT EXECUTED 3fc04: e1a02009 mov r2, r9 <== NOT EXECUTED 3fc08: e1a00004 mov r0, r4 <== NOT EXECUTED 3fc0c: ebffff39 bl 3f8f8 <== NOT EXECUTED if ( rc != RC_OK ) 3fc10: e3500000 cmp r0, #0 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 3fc14: e2866001 add r6, r6, #1 <== NOT EXECUTED * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) 3fc18: 1a00002c bne 3fcd0 <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 3fc1c: e59d800c ldr r8, [sp, #12] <== NOT EXECUTED 3fc20: e3580000 cmp r8, #0 <== NOT EXECUTED 3fc24: 1afffff0 bne 3fbec <== NOT EXECUTED /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 3fc28: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3fc2c: e3530000 cmp r3, #0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3fc30: e1a01005 mov r1, r5 <== NOT EXECUTED 3fc34: e3e02000 mvn r2, #0 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3fc38: e1a00004 mov r0, r4 <== NOT EXECUTED /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 3fc3c: 0affffdd beq 3fbb8 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3fc40: e1a00004 mov r0, r4 <== NOT EXECUTED 3fc44: ebfffe8a bl 3f674 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3fc48: e1a0100b mov r1, fp <== NOT EXECUTED } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) 3fc4c: e250b000 subs fp, r0, #0 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3fc50: e1a02005 mov r2, r5 <== NOT EXECUTED 3fc54: e1a00004 mov r0, r4 <== NOT EXECUTED } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) 3fc58: 1a000034 bne 3fd30 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3fc5c: ebfffe84 bl 3f674 <== NOT EXECUTED if ( rc != RC_OK ) 3fc60: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3fc64: 0affffd9 beq 3fbd0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3fc68: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 3fc6c: e5901000 ldr r1, [r0] <== NOT EXECUTED 3fc70: e1a00004 mov r0, r4 <== NOT EXECUTED 3fc74: ebffff80 bl 3fa7c <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 3fc78: e1a00004 mov r0, r4 <== NOT EXECUTED 3fc7c: e1a01005 mov r1, r5 <== NOT EXECUTED 3fc80: e1a02008 mov r2, r8 <== NOT EXECUTED 3fc84: ebfffe7a bl 3f674 <== NOT EXECUTED fat_buf_release(fs_info); 3fc88: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3fc8c: ebff9949 bl 261b8 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 3fc90: e1a0000b mov r0, fp <== NOT EXECUTED 3fc94: e28dd010 add sp, sp, #16 <== NOT EXECUTED 3fc98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3fc9c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3fca0: e5903040 ldr r3, [r0, #64] ; 0x40 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 3fca4: e580b044 str fp, [r0, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3fca8: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3fcac: 159a2000 ldrne r2, [sl] <== NOT EXECUTED 3fcb0: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 3fcb4: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); 3fcb8: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3fcbc: e582b000 str fp, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 3fcc0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3fcc4: ebff993b bl 261b8 <== NOT EXECUTED 3fcc8: e3a0b000 mov fp, #0 <== NOT EXECUTED return RC_OK; 3fccc: eaffffef b 3fc90 <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 3fcd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3fcd4: e3530000 cmp r3, #0 <== NOT EXECUTED 3fcd8: e1a08000 mov r8, r0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 3fcdc: 01a0b008 moveq fp, r8 <== NOT EXECUTED 3fce0: 0affffea beq 3fc90 <== NOT EXECUTED 3fce4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3fce8: e1a00004 mov r0, r4 <== NOT EXECUTED 3fcec: e5931000 ldr r1, [r3] <== NOT EXECUTED 3fcf0: ebffff61 bl 3fa7c <== NOT EXECUTED 3fcf4: e1a0b008 mov fp, r8 <== NOT EXECUTED 3fcf8: eaffffe4 b 3fc90 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3fcfc: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3fd00: e5903040 ldr r3, [r0, #64] ; 0x40 <== NOT EXECUTED (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 3fd04: e5805044 str r5, [r0, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3fd08: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3fd0c: 159a2000 ldrne r2, [sl] <== NOT EXECUTED 3fd10: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 3fd14: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); 3fd18: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3fd1c: e5825000 str r5, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 3fd20: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3fd24: ebff9923 bl 261b8 <== NOT EXECUTED 3fd28: e3a0b000 mov fp, #0 <== NOT EXECUTED return rc; 3fd2c: eaffffd7 b 3fc90 <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3fd30: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3fd34: e5931000 ldr r1, [r3] <== NOT EXECUTED 3fd38: ebffff4f bl 3fa7c <== NOT EXECUTED return rc; 3fd3c: eaffffd3 b 3fc90 <== NOT EXECUTED =============================================================================== 0003f674 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 3f674: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 3f678: e3a03000 mov r3, #0 <== NOT EXECUTED fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 3f67c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 3f680: e3510001 cmp r1, #1 <== NOT EXECUTED fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 3f684: e1a05001 mov r5, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 3f688: e58d3000 str r3, [sp] <== NOT EXECUTED fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 3f68c: e1a0b002 mov fp, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3f690: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 3f694: 9a000021 bls 3f720 <== NOT EXECUTED 3f698: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 3f69c: e2833001 add r3, r3, #1 <== NOT EXECUTED 3f6a0: e1510003 cmp r1, r3 <== NOT EXECUTED 3f6a4: 8a00001d bhi 3f720 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3f6a8: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 3f6ac: e3130001 tst r3, #1 <== NOT EXECUTED 3f6b0: 1a000020 bne 3f738 <== NOT EXECUTED 3f6b4: e3130002 tst r3, #2 <== NOT EXECUTED 3f6b8: 15d4a002 ldrbne sl, [r4, #2] <== NOT EXECUTED 3f6bc: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f6c0: 05d4a002 ldrbeq sl, [r4, #2] <== NOT EXECUTED 3f6c4: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f6c8: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED 3f6cc: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED 3f6d0: 1083aa36 addne sl, r3, r6, lsr sl <== NOT EXECUTED 3f6d4: 0083aa36 addeq sl, r3, r6, lsr sl <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f6d8: e1a00004 mov r0, r4 <== NOT EXECUTED 3f6dc: e1a0100a mov r1, sl <== NOT EXECUTED 3f6e0: e3a02001 mov r2, #1 <== NOT EXECUTED 3f6e4: e1a0300d mov r3, sp <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f6e8: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f6ec: ebff9b0c bl 26324 <== NOT EXECUTED if (rc != RC_OK) 3f6f0: e3500000 cmp r0, #0 <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3f6f4: e1a0800d mov r8, sp <== NOT EXECUTED if (rc != RC_OK) 3f6f8: 1a00000c bne 3f730 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 3f6fc: e5d4700a ldrb r7, [r4, #10] <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f700: e2499001 sub r9, r9, #1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 3f704: e3570002 cmp r7, #2 <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 3f708: e0066009 and r6, r6, r9 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 3f70c: 0a00000e beq 3f74c <== NOT EXECUTED 3f710: e3570004 cmp r7, #4 <== NOT EXECUTED 3f714: 0a00002e beq 3f7d4 <== NOT EXECUTED 3f718: e3570001 cmp r7, #1 <== NOT EXECUTED 3f71c: 0a000010 beq 3f764 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 3f720: eb0013c6 bl 44640 <__errno> <== NOT EXECUTED 3f724: e3a03005 mov r3, #5 <== NOT EXECUTED 3f728: e5803000 str r3, [r0] <== NOT EXECUTED 3f72c: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 3f730: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3f734: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3f738: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED 3f73c: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3f740: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED 3f744: e083aa36 add sl, r3, r6, lsr sl <== NOT EXECUTED 3f748: eaffffe2 b 3f6d8 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 3f74c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f750: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f754: e183b0b6 strh fp, [r3, r6] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 3f758: e3a03001 mov r3, #1 <== NOT EXECUTED 3f75c: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 3f760: eafffff2 b 3f730 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 3f764: e3150001 tst r5, #1 <== NOT EXECUTED 3f768: 0a000023 beq 3f7fc <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 3f76c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f770: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 3f774: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3f778: e202200f and r2, r2, #15 <== NOT EXECUTED 3f77c: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 3f780: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f784: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 3f788: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 3f78c: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 3f790: e182282b orr r2, r2, fp, lsr #16 <== NOT EXECUTED 3f794: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 3f798: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 3f79c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3f7a0: e1530006 cmp r3, r6 <== NOT EXECUTED 3f7a4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3f7a8: 0a00002e beq 3f868 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 3f7ac: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f7b0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f7b4: e2866001 add r6, r6, #1 <== NOT EXECUTED 3f7b8: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 3f7bc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f7c0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 3f7c4: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3f7c8: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED 3f7cc: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED 3f7d0: eaffffd6 b 3f730 <== NOT EXECUTED case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 3f7d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f7d8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 3f7dc: e7932006 ldr r2, [r3, r6] <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 3f7e0: e3cbb20f bic fp, fp, #-268435456 ; 0xf0000000 <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 3f7e4: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 3f7e8: e182b00b orr fp, r2, fp <== NOT EXECUTED 3f7ec: e783b006 str fp, [r3, r6] <== NOT EXECUTED 3f7f0: e3a03001 mov r3, #1 <== NOT EXECUTED 3f7f4: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 3f7f8: eaffffcc b 3f730 <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 3f7fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f800: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f804: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 3f808: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f80c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 3f810: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 3f814: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 3f818: e1a0ba2b lsr fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 3f81c: e182200b orr r2, r2, fp <== NOT EXECUTED 3f820: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 3f824: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 3f828: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3f82c: e1530006 cmp r3, r6 <== NOT EXECUTED 3f830: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3f834: 0a00001c beq 3f8ac <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 3f838: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f83c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f840: e2866001 add r6, r6, #1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 3f844: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3f848: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 3f84c: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 3f850: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f854: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 3f858: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3f85c: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED 3f860: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED 3f864: eaffffb1 b 3f730 <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 3f868: e28a1001 add r1, sl, #1 <== NOT EXECUTED 3f86c: e1a0300d mov r3, sp <== NOT EXECUTED 3f870: e1a00004 mov r0, r4 <== NOT EXECUTED 3f874: e1a02007 mov r2, r7 <== NOT EXECUTED 3f878: ebff9aa9 bl 26324 <== NOT EXECUTED &block0); if (rc != RC_OK) 3f87c: e3500000 cmp r0, #0 <== NOT EXECUTED 3f880: 1affffaa bne 3f730 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 3f884: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f888: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3f88c: e5c30000 strb r0, [r3] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 3f890: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f894: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 3f898: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3f89c: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED 3f8a0: e5c3b000 strb fp, [r3] <== NOT EXECUTED 3f8a4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3f8a8: eaffffa0 b 3f730 <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 3f8ac: e28a1001 add r1, sl, #1 <== NOT EXECUTED 3f8b0: e1a0300d mov r3, sp <== NOT EXECUTED 3f8b4: e1a00004 mov r0, r4 <== NOT EXECUTED 3f8b8: e1a02007 mov r2, r7 <== NOT EXECUTED 3f8bc: ebff9a98 bl 26324 <== NOT EXECUTED &block0); if (rc != RC_OK) 3f8c0: e3500000 cmp r0, #0 <== NOT EXECUTED 3f8c4: 1affff99 bne 3f730 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 3f8c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f8cc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 3f8d0: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3f8d4: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 3f8d8: e5c32000 strb r2, [r3] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 3f8dc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3f8e0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 3f8e4: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3f8e8: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED 3f8ec: e5c3b000 strb fp, [r3] <== NOT EXECUTED 3f8f0: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3f8f4: eaffff8d b 3f730 <== NOT EXECUTED =============================================================================== 00026680 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 26680: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 26684: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 26688: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED 2668c: e2155004 ands r5, r5, #4 <== NOT EXECUTED 26690: 1a00002e bne 26750 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 26694: e1a00004 mov r0, r4 <== NOT EXECUTED 26698: ebfffec6 bl 261b8 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 2669c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 266a0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 266a4: ebff74d9 bl 3a10 <== NOT EXECUTED 266a8: e3500000 cmp r0, #0 <== NOT EXECUTED 266ac: 13e05000 mvnne r5, #0 <== NOT EXECUTED 266b0: e3a08000 mov r8, #0 <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 266b4: e5946064 ldr r6, [r4, #100] ; 0x64 <== NOT EXECUTED 266b8: e0866008 add r6, r6, r8 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 266bc: ea000000 b 266c4 <== NOT EXECUTED free(node); 266c0: ebff85aa bl 7d70 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 266c4: e1a00006 mov r0, r6 <== NOT EXECUTED 266c8: ebff9a94 bl d120 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 266cc: e2507000 subs r7, r0, #0 <== NOT EXECUTED 266d0: 1afffffa bne 266c0 <== NOT EXECUTED 266d4: e288800c add r8, r8, #12 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 266d8: e3580018 cmp r8, #24 <== NOT EXECUTED 266dc: 1afffff4 bne 266b4 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 266e0: e5946068 ldr r6, [r4, #104] ; 0x68 <== NOT EXECUTED 266e4: e0866007 add r6, r6, r7 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 266e8: ea000000 b 266f0 <== NOT EXECUTED free(node); 266ec: ebff859f bl 7d70 <== NOT EXECUTED 266f0: e1a00006 mov r0, r6 <== NOT EXECUTED 266f4: ebff9a89 bl d120 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 266f8: e3500000 cmp r0, #0 <== NOT EXECUTED 266fc: 1afffffa bne 266ec <== NOT EXECUTED 26700: e287700c add r7, r7, #12 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 26704: e3570018 cmp r7, #24 <== NOT EXECUTED 26708: 1afffff4 bne 266e0 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2670c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26710: ebff8596 bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 26714: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 26718: ebff8594 bl 7d70 <== NOT EXECUTED free(fs_info->uino); 2671c: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 26720: ebff8592 bl 7d70 <== NOT EXECUTED free(fs_info->sec_buf); 26724: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 26728: ebff8590 bl 7d70 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 2672c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26730: ebff80bd bl 6a2c <== NOT EXECUTED if (rc) 26734: e3550000 cmp r5, #0 <== NOT EXECUTED 26738: 0a000002 beq 26748 <== NOT EXECUTED errno = EIO; 2673c: eb0077bf bl 44640 <__errno> <== NOT EXECUTED 26740: e3a03005 mov r3, #5 <== NOT EXECUTED 26744: e5803000 str r3, [r0] <== NOT EXECUTED return rc; } 26748: e1a00005 mov r0, r5 <== NOT EXECUTED 2674c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 26750: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED 26754: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 26758: ebffffae bl 26618 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2675c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 26760: 13e05000 mvnne r5, #0 <== NOT EXECUTED 26764: eaffffca b 26694 <== NOT EXECUTED =============================================================================== 0004017c : #include int fchdir( int fd ) { 4017c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 40180: e59f3158 ldr r3, [pc, #344] ; 402e0 <== NOT EXECUTED 40184: e5933000 ldr r3, [r3] <== NOT EXECUTED 40188: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 4018c: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 40190: 2a000040 bcs 40298 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40194: e59f3148 ldr r3, [pc, #328] ; 402e4 <== NOT EXECUTED 40198: e5934000 ldr r4, [r3] <== NOT EXECUTED 4019c: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 401a0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 401a4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 401a8: 0a00003a beq 40298 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 401ac: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 401b0: e3530000 cmp r3, #0 <== NOT EXECUTED 401b4: 0a000044 beq 402cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 401b8: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 401bc: e3530000 cmp r3, #0 <== NOT EXECUTED 401c0: 0a000041 beq 402cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 401c4: e2844018 add r4, r4, #24 <== NOT EXECUTED 401c8: e1a00004 mov r0, r4 <== NOT EXECUTED 401cc: e1a0e00f mov lr, pc <== NOT EXECUTED 401d0: e12fff13 bx r3 <== NOT EXECUTED 401d4: e3500001 cmp r0, #1 <== NOT EXECUTED 401d8: e1a0e000 mov lr, r0 <== NOT EXECUTED 401dc: 1a000028 bne 40284 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 401e0: e59f6100 ldr r6, [pc, #256] ; 402e8 <== NOT EXECUTED 401e4: e5967000 ldr r7, [r6] <== NOT EXECUTED 401e8: e287c004 add ip, r7, #4 <== NOT EXECUTED 401ec: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 401f0: e28d5004 add r5, sp, #4 <== NOT EXECUTED 401f4: e1a08005 mov r8, r5 <== NOT EXECUTED 401f8: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED 401fc: e59c3000 ldr r3, [ip] <== NOT EXECUTED 40200: e5883000 str r3, [r8] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 40204: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 40208: e2877004 add r7, r7, #4 <== NOT EXECUTED 4020c: e8a7000f stmia r7!, {r0, r1, r2, r3} <== NOT EXECUTED 40210: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 40214: e3a07000 mov r7, #0 <== NOT EXECUTED 40218: e28d4018 add r4, sp, #24 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 4021c: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 40220: e1a0100e mov r1, lr <== NOT EXECUTED 40224: e1a02007 mov r2, r7 <== NOT EXECUTED 40228: e59f00bc ldr r0, [pc, #188] ; 402ec <== NOT EXECUTED 4022c: e1a03004 mov r3, r4 <== NOT EXECUTED 40230: e58d7000 str r7, [sp] <== NOT EXECUTED 40234: ebff1eab bl 7ce8 <== NOT EXECUTED 40238: e1500007 cmp r0, r7 <== NOT EXECUTED 4023c: 1a00001a bne 402ac <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 40240: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 40244: e3530000 cmp r3, #0 <== NOT EXECUTED 40248: 0a000004 beq 40260 <== NOT EXECUTED 4024c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 40250: e3530000 cmp r3, #0 <== NOT EXECUTED 40254: 11a00005 movne r0, r5 <== NOT EXECUTED 40258: 11a0e00f movne lr, pc <== NOT EXECUTED 4025c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 40260: e596c000 ldr ip, [r6] <== NOT EXECUTED 40264: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 40268: e28cc004 add ip, ip, #4 <== NOT EXECUTED 4026c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 40270: e5943000 ldr r3, [r4] <== NOT EXECUTED 40274: e58c3000 str r3, [ip] <== NOT EXECUTED 40278: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 4027c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 40280: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 40284: eb0010ed bl 44640 <__errno> <== NOT EXECUTED 40288: e3a03014 mov r3, #20 <== NOT EXECUTED 4028c: e5803000 str r3, [r0] <== NOT EXECUTED 40290: e3e00000 mvn r0, #0 <== NOT EXECUTED 40294: eafffff8 b 4027c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40298: eb0010e8 bl 44640 <__errno> <== NOT EXECUTED 4029c: e3a03009 mov r3, #9 <== NOT EXECUTED 402a0: e5803000 str r3, [r0] <== NOT EXECUTED 402a4: e3e00000 mvn r0, #0 <== NOT EXECUTED 402a8: eafffff3 b 4027c <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 402ac: e596c000 ldr ip, [r6] <== NOT EXECUTED 402b0: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED 402b4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 402b8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 402bc: e5983000 ldr r3, [r8] <== NOT EXECUTED 402c0: e3e00000 mvn r0, #0 <== NOT EXECUTED 402c4: e58c3000 str r3, [ip] <== NOT EXECUTED return -1; 402c8: eaffffeb b 4027c <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 402cc: eb0010db bl 44640 <__errno> <== NOT EXECUTED 402d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 402d4: e5803000 str r3, [r0] <== NOT EXECUTED 402d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 402dc: eaffffe6 b 4027c <== NOT EXECUTED =============================================================================== 000290d8 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 290d8: e59f3070 ldr r3, [pc, #112] ; 29150 <== NOT EXECUTED 290dc: e5932000 ldr r2, [r3] <== NOT EXECUTED 290e0: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 290e4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 290e8: 2a00000e bcs 29128 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 290ec: e59f3060 ldr r3, [pc, #96] ; 29154 <== NOT EXECUTED 290f0: e5933000 ldr r3, [r3] <== NOT EXECUTED 290f4: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 290f8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 290fc: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 29100: 0a000008 beq 29128 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 29104: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 29108: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 2910c: e3520000 cmp r2, #0 <== NOT EXECUTED 29110: 0a000009 beq 2913c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 29114: e2830018 add r0, r3, #24 <== NOT EXECUTED 29118: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 2911c: e1a0e00f mov lr, pc <== NOT EXECUTED 29120: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 29124: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 29128: eb006d44 bl 44640 <__errno> <== NOT EXECUTED 2912c: e3a03009 mov r3, #9 <== NOT EXECUTED 29130: e5803000 str r3, [r0] <== NOT EXECUTED 29134: e3e00000 mvn r0, #0 <== NOT EXECUTED 29138: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2913c: eb006d3f bl 44640 <__errno> <== NOT EXECUTED 29140: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 29144: e5803000 str r3, [r0] <== NOT EXECUTED 29148: e3e00000 mvn r0, #0 <== NOT EXECUTED 2914c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00029158 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 29158: e59f3098 ldr r3, [pc, #152] ; 291f8 <== NOT EXECUTED 2915c: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 29160: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 29164: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 29168: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 2916c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 29170: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 29174: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 29178: 2a00000f bcs 291bc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 2917c: e59f3078 ldr r3, [pc, #120] ; 291fc <== NOT EXECUTED 29180: e5933000 ldr r3, [r3] <== NOT EXECUTED 29184: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 29188: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 2918c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 29190: 0a000009 beq 291bc <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 29194: e3130004 tst r3, #4 <== NOT EXECUTED 29198: 0a00000c beq 291d0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 2919c: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 291a0: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 291a4: e3530000 cmp r3, #0 <== NOT EXECUTED 291a8: 0a00000d beq 291e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 291ac: e2800018 add r0, r0, #24 <== NOT EXECUTED 291b0: e1a0e00f mov lr, pc <== NOT EXECUTED 291b4: e12fff13 bx r3 <== NOT EXECUTED } 291b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 291bc: eb006d1f bl 44640 <__errno> <== NOT EXECUTED 291c0: e3a03009 mov r3, #9 <== NOT EXECUTED 291c4: e5803000 str r3, [r0] <== NOT EXECUTED 291c8: e3e00000 mvn r0, #0 <== NOT EXECUTED 291cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 291d0: eb006d1a bl 44640 <__errno> <== NOT EXECUTED 291d4: e3a03016 mov r3, #22 <== NOT EXECUTED 291d8: e5803000 str r3, [r0] <== NOT EXECUTED 291dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 291e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 291e4: eb006d15 bl 44640 <__errno> <== NOT EXECUTED 291e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 291ec: e5803000 str r3, [r0] <== NOT EXECUTED 291f0: e3e00000 mvn r0, #0 <== NOT EXECUTED 291f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000402f0 : int fcntl( int fd, int cmd, ... ) { 402f0: e92d000e push {r1, r2, r3} 402f4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 402f8: e59f31d0 ldr r3, [pc, #464] ; 404d0 402fc: e5933000 ldr r3, [r3] int fcntl( int fd, int cmd, ... ) { 40300: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); 40304: e28d2028 add r2, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40308: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4030c: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 40310: e59d4024 ldr r4, [sp, #36] ; 0x24 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40314: 2a000061 bcs 404a0 iop = rtems_libio_iop( fd ); 40318: e59f81b4 ldr r8, [pc, #436] ; 404d4 4031c: e5986000 ldr r6, [r8] 40320: e0865300 add r5, r6, r0, lsl #6 rtems_libio_check_is_open(iop); 40324: e595c014 ldr ip, [r5, #20] 40328: e31c0c01 tst ip, #256 ; 0x100 4032c: 0a00005b beq 404a0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40330: e3540009 cmp r4, #9 40334: 979ff104 ldrls pc, [pc, r4, lsl #2] 40338: ea00002c b 403f0 4033c: 00040404 .word 0x00040404 40340: 00040464 .word 0x00040464 40344: 00040470 .word 0x00040470 40348: 00040490 .word 0x00040490 4034c: 00040388 .word 0x00040388 40350: 00040364 .word 0x00040364 40354: 00040364 .word 0x00040364 40358: 00040364 .word 0x00040364 4035c: 00040364 .word 0x00040364 40360: 00040364 .word 0x00040364 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40364: eb0010b5 bl 44640 <__errno> 40368: e3a03086 mov r3, #134 ; 0x86 4036c: e5803000 str r3, [r0] 40370: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40374: e1a00006 mov r0, r6 40378: e28dd004 add sp, sp, #4 4037c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 40380: e28dd00c add sp, sp, #12 40384: e12fff1e bx lr case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40388: e5920000 ldr r0, [r2] 4038c: ebff1fc8 bl 82b4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 40390: e5953014 ldr r3, [r5, #20] 40394: e3c00f7f bic r0, r0, #508 ; 0x1fc 40398: e3c00002 bic r0, r0, #2 4039c: e1a00b00 lsl r0, r0, #22 403a0: e3c33c02 bic r3, r3, #512 ; 0x200 403a4: e1a00b20 lsr r0, r0, #22 403a8: e3c33001 bic r3, r3, #1 403ac: e1800003 orr r0, r0, r3 403b0: e5850014 str r0, [r5, #20] 403b4: e3a06000 mov r6, #0 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 403b8: e595303c ldr r3, [r5, #60] ; 0x3c 403bc: e5933030 ldr r3, [r3, #48] ; 0x30 403c0: e3530000 cmp r3, #0 403c4: 0affffea beq 40374 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 403c8: e1a00004 mov r0, r4 403cc: e1a01005 mov r1, r5 403d0: e1a0e00f mov lr, pc 403d4: e12fff13 bx r3 if (err) { 403d8: e2504000 subs r4, r0, #0 403dc: 0affffe4 beq 40374 errno = err; 403e0: eb001096 bl 44640 <__errno> <== NOT EXECUTED 403e4: e5804000 str r4, [r0] <== NOT EXECUTED 403e8: e3e06000 mvn r6, #0 <== NOT EXECUTED 403ec: eaffffe0 b 40374 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 403f0: eb001092 bl 44640 <__errno> 403f4: e3a03016 mov r3, #22 403f8: e5803000 str r3, [r0] 403fc: e3e06000 mvn r6, #0 40400: eaffffdb b 40374 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40404: e5927000 ldr r7, [r2] if ( fd2 ) 40408: e3570000 cmp r7, #0 4040c: 0a000028 beq 404b4 diop = rtems_libio_iop( fd2 ); 40410: e1530007 cmp r3, r7 <== NOT EXECUTED 40414: 93a09000 movls r9, #0 <== NOT EXECUTED 40418: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED 4041c: 91a07009 movls r7, r9 <== NOT EXECUTED 40420: 81a09007 movhi r9, r7 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40424: e2858018 add r8, r5, #24 40428: e8b8000f ldm r8!, {r0, r1, r2, r3} 4042c: e287a018 add sl, r7, #24 40430: e8aa000f stmia sl!, {r0, r1, r2, r3} ret = -1; break; } } diop->handlers = iop->handlers; 40434: e595203c ldr r2, [r5, #60] ; 0x3c diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40438: e5981000 ldr r1, [r8] break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4043c: e5953038 ldr r3, [r5, #56] ; 0x38 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40440: e0666009 rsb r6, r6, r9 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40444: e58a1000 str r1, [sl] ret = -1; break; } } diop->handlers = iop->handlers; 40448: e587203c str r2, [r7, #60] ; 0x3c diop->file_info = iop->file_info; 4044c: e5873038 str r3, [r7, #56] ; 0x38 diop->flags = iop->flags; 40450: e587c014 str ip, [r7, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40454: e1a06346 asr r6, r6, #6 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40458: e3560000 cmp r6, #0 4045c: aaffffd5 bge 403b8 40460: eaffffc3 b 40374 <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 40464: e1a0c5ac lsr ip, ip, #11 40468: e20c6001 and r6, ip, #1 4046c: eaffffd1 b 403b8 * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 40470: e5926000 ldr r6, [r2] 40474: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 40478: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4047c: 03cccb02 biceq ip, ip, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 40480: 1585c014 strne ip, [r5, #20] 40484: 13a06000 movne r6, #0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 40488: 0585c014 streq ip, [r5, #20] 4048c: eaffffc9 b 403b8 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 40490: e1a0000c mov r0, ip 40494: ebff1ee6 bl 8034 40498: e1a06000 mov r6, r0 4049c: eaffffed b 40458 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 404a0: eb001066 bl 44640 <__errno> <== NOT EXECUTED 404a4: e3a03009 mov r3, #9 <== NOT EXECUTED 404a8: e5803000 str r3, [r0] <== NOT EXECUTED 404ac: e3e06000 mvn r6, #0 <== NOT EXECUTED 404b0: eaffffaf b 40374 <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 404b4: ebff1f50 bl 81fc if ( diop == 0 ) { 404b8: e2507000 subs r7, r0, #0 404bc: 0affffc9 beq 403e8 404c0: e5986000 ldr r6, [r8] 404c4: e595c014 ldr ip, [r5, #20] 404c8: e1a09007 mov r9, r7 404cc: eaffffd4 b 40424 =============================================================================== 00002c08 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2c08: e59f3070 ldr r3, [pc, #112] ; 2c80 2c0c: e5933000 ldr r3, [r3] 2c10: e1500003 cmp r0, r3 #include int fdatasync( int fd ) { 2c14: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2c18: 2a00000e bcs 2c58 iop = rtems_libio_iop( fd ); 2c1c: e59f3060 ldr r3, [pc, #96] ; 2c84 2c20: e5933000 ldr r3, [r3] 2c24: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2c28: e5903014 ldr r3, [r0, #20] 2c2c: e3130c01 tst r3, #256 ; 0x100 2c30: 0a000008 beq 2c58 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 2c34: e3130004 tst r3, #4 2c38: 0a000006 beq 2c58 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 2c3c: e590303c ldr r3, [r0, #60] ; 0x3c 2c40: e593302c ldr r3, [r3, #44] ; 0x2c 2c44: e3530000 cmp r3, #0 2c48: 0a000007 beq 2c6c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 2c4c: e1a0e00f mov lr, pc <== NOT EXECUTED 2c50: e12fff13 bx r3 <== NOT EXECUTED } 2c54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 2c58: eb00378d bl 10a94 <__errno> 2c5c: e3a03009 mov r3, #9 2c60: e5803000 str r3, [r0] 2c64: e3e00000 mvn r0, #0 2c68: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2c6c: eb003788 bl 10a94 <__errno> 2c70: e3a03086 mov r3, #134 ; 0x86 2c74: e5803000 str r3, [r0] 2c78: e3e00000 mvn r0, #0 2c7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000972c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 972c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 9730: e59f5400 ldr r5, [pc, #1024] ; 9b38 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 9734: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 9738: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 973c: e24dd00c sub sp, sp, #12 9740: e1a04000 mov r4, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 9744: e1a02001 mov r2, r1 9748: e5950000 ldr r0, [r5] 974c: ebfff016 bl 57ac 9750: e2509000 subs r9, r0, #0 9754: 13e08003 mvnne r8, #3 9758: 1a00001c bne 97d0 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 975c: e5946000 ldr r6, [r4] <== NOT EXECUTED if (pipe == NULL) { 9760: e3560000 cmp r6, #0 <== NOT EXECUTED 9764: 0a00001c beq 97dc <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 9768: e3a01000 mov r1, #0 <== NOT EXECUTED 976c: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 9770: e1a02001 mov r2, r1 <== NOT EXECUTED 9774: ebfff00c bl 57ac <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 9778: e5943000 ldr r3, [r4] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 977c: e3500000 cmp r0, #0 <== NOT EXECUTED 9780: 01a08000 moveq r8, r0 <== NOT EXECUTED 9784: 13e08003 mvnne r8, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 9788: e3530000 cmp r3, #0 <== NOT EXECUTED 978c: 0a0000bc beq 9a84 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 9790: e5950000 ldr r0, [r5] <== NOT EXECUTED 9794: ebfff04c bl 58cc <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 9798: e3580000 cmp r8, #0 <== NOT EXECUTED 979c: 1a00000b bne 97d0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 97a0: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 97a4: e2033006 and r3, r3, #6 <== NOT EXECUTED 97a8: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 97ac: e5945000 ldr r5, [r4] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 97b0: 0a000093 beq 9a04 <== NOT EXECUTED 97b4: e3530006 cmp r3, #6 <== NOT EXECUTED 97b8: 0a00007d beq 99b4 <== NOT EXECUTED 97bc: e3530002 cmp r3, #2 <== NOT EXECUTED 97c0: 0a000057 beq 9924 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 97c4: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 97c8: ebfff03f bl 58cc <== NOT EXECUTED 97cc: e3a08000 mov r8, #0 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 97d0: e1a00008 mov r0, r8 97d4: e28dd00c add sp, sp, #12 97d8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 97dc: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 97e0: ebffe309 bl 240c <== NOT EXECUTED if (pipe == NULL) 97e4: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 97e8: e1a06000 mov r6, r0 <== NOT EXECUTED 97ec: e1a0a000 mov sl, r0 <== NOT EXECUTED if (pipe == NULL) 97f0: 0a0000ce beq 9b30 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 97f4: e1a02000 mov r2, r0 <== NOT EXECUTED 97f8: e4829004 str r9, [r2], #4 <== NOT EXECUTED 97fc: e2822004 add r2, r2, #4 <== NOT EXECUTED 9800: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9804: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9808: e4829004 str r9, [r2], #4 <== NOT EXECUTED 980c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9810: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9814: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9818: e4829004 str r9, [r2], #4 <== NOT EXECUTED 981c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9820: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9824: e4829004 str r9, [r2], #4 <== NOT EXECUTED pipe->Size = PIPE_BUF; 9828: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 982c: e5829000 str r9, [r2] <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 9830: e1a00003 mov r0, r3 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 9834: e5863004 str r3, [r6, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 9838: ebffe2f3 bl 240c <== NOT EXECUTED if (! pipe->Buffer) 983c: e3500000 cmp r0, #0 <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 9840: e5860000 str r0, [r6] <== NOT EXECUTED if (! pipe->Buffer) 9844: 0a0000b7 beq 9b28 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 9848: e59f82ec ldr r8, [pc, #748] ; 9b3c <== NOT EXECUTED 984c: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 9850: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 9854: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 9858: e1a01009 mov r1, r9 <== NOT EXECUTED 985c: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 9860: e1a02009 mov r2, r9 <== NOT EXECUTED 9864: e286302c add r3, r6, #44 ; 0x2c <== NOT EXECUTED 9868: eb000907 bl bc8c <== NOT EXECUTED 986c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 9870: 1a0000aa bne 9b20 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 9874: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 9878: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 987c: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 9880: e2863030 add r3, r6, #48 ; 0x30 <== NOT EXECUTED 9884: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED 9888: e1a02001 mov r2, r1 <== NOT EXECUTED 988c: eb0008fe bl bc8c <== NOT EXECUTED 9890: e2503000 subs r3, r0, #0 <== NOT EXECUTED 9894: 1a00009f bne 9b18 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 9898: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 989c: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 98a0: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 98a4: e286c028 add ip, r6, #40 ; 0x28 <== NOT EXECUTED 98a8: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED 98ac: e3a01001 mov r1, #1 <== NOT EXECUTED 98b0: e3a02010 mov r2, #16 <== NOT EXECUTED 98b4: e58dc000 str ip, [sp] <== NOT EXECUTED 98b8: ebffef20 bl 5540 <== NOT EXECUTED 98bc: e3500000 cmp r0, #0 <== NOT EXECUTED 98c0: 1a000092 bne 9b10 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 98c4: e28da004 add sl, sp, #4 <== NOT EXECUTED 98c8: e596102c ldr r1, [r6, #44] ; 0x2c <== NOT EXECUTED 98cc: e1a0200a mov r2, sl <== NOT EXECUTED 98d0: e59f0268 ldr r0, [pc, #616] ; 9b40 <== NOT EXECUTED 98d4: ebfff59d bl 6f50 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 98d8: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 98dc: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 98e0: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 98e4: ebfff7f6 bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED 98e8: e1a0200a mov r2, sl <== NOT EXECUTED 98ec: e5961030 ldr r1, [r6, #48] ; 0x30 <== NOT EXECUTED 98f0: e59f0248 ldr r0, [pc, #584] ; 9b40 <== NOT EXECUTED 98f4: ebfff595 bl 6f50 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 98f8: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 98fc: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 9900: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 9904: ebfff7ee bl 78c4 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 9908: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 990c: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 9910: e2833001 add r3, r3, #1 <== NOT EXECUTED 9914: e5c83000 strb r3, [r8] <== NOT EXECUTED c = 'a'; 9918: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 991c: 05c83000 strbeq r3, [r8] <== NOT EXECUTED 9920: eaffff90 b 9768 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 9924: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 9928: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 992c: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 9930: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 9934: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 9938: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 993c: e5853010 str r3, [r5, #16] <== NOT EXECUTED 9940: 0a00006a beq 9af0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 9944: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 9948: e3530000 cmp r3, #0 <== NOT EXECUTED 994c: 1affff9c bne 97c4 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 9950: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 9954: e3130001 tst r3, #1 <== NOT EXECUTED 9958: 1affff99 bne 97c4 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 995c: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED 9960: ea000006 b 9980 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 9964: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9968: ebffef8f bl 57ac <== NOT EXECUTED 996c: e3500000 cmp r0, #0 <== NOT EXECUTED 9970: 1a00000a bne 99a0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 9974: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED 9978: e1530006 cmp r3, r6 <== NOT EXECUTED 997c: 1affff90 bne 97c4 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 9980: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9984: ebffefd0 bl 58cc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 9988: e3a01000 mov r1, #0 <== NOT EXECUTED 998c: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 9990: eb000921 bl be1c <== NOT EXECUTED 9994: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 9998: e1a02001 mov r2, r1 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 999c: 0afffff0 beq 9964 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 99a0: e3e08003 mvn r8, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 99a4: e1a00004 mov r0, r4 <== NOT EXECUTED 99a8: e1a01007 mov r1, r7 <== NOT EXECUTED 99ac: ebffff18 bl 9614 <== NOT EXECUTED return err; 99b0: eaffff86 b 97d0 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 99b4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 99b8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 99bc: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 99c0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 99c4: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 99c8: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 99cc: e5853010 str r3, [r5, #16] <== NOT EXECUTED 99d0: 0a00003e beq 9ad0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 99d4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 99d8: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 99dc: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 99e0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 99e4: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 99e8: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 99ec: e5853014 str r3, [r5, #20] <== NOT EXECUTED 99f0: 1affff73 bne 97c4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 99f4: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 99f8: e28d1008 add r1, sp, #8 <== NOT EXECUTED 99fc: eb0008ed bl bdb8 <== NOT EXECUTED 9a00: eaffff6f b 97c4 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 9a04: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 9a08: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9a0c: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 9a10: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9a14: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 9a18: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9a1c: e5853014 str r3, [r5, #20] <== NOT EXECUTED 9a20: 0a00002e beq 9ae0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 9a24: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 9a28: e3530000 cmp r3, #0 <== NOT EXECUTED 9a2c: 1affff64 bne 97c4 <== NOT EXECUTED 9a30: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 9a34: e3130001 tst r3, #1 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 9a38: 05956020 ldreq r6, [r5, #32] <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 9a3c: 0a000007 beq 9a60 <== NOT EXECUTED 9a40: ea00002e b 9b00 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 9a44: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9a48: ebffef57 bl 57ac <== NOT EXECUTED 9a4c: e3500000 cmp r0, #0 <== NOT EXECUTED 9a50: 1affffd2 bne 99a0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 9a54: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 9a58: e1530006 cmp r3, r6 <== NOT EXECUTED 9a5c: 1affff58 bne 97c4 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 9a60: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9a64: ebffef98 bl 58cc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 9a68: e3a01000 mov r1, #0 <== NOT EXECUTED 9a6c: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 9a70: eb0008e9 bl be1c <== NOT EXECUTED 9a74: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 9a78: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 9a7c: 0afffff0 beq 9a44 <== NOT EXECUTED 9a80: eaffffc6 b 99a0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 9a84: e3580000 cmp r8, #0 <== NOT EXECUTED 9a88: 1a000003 bne 9a9c <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 9a8c: e5846000 str r6, [r4] <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 9a90: e5950000 ldr r0, [r5] <== NOT EXECUTED 9a94: ebffef8c bl 58cc <== NOT EXECUTED 9a98: eaffff40 b 97a0 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 9a9c: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED 9aa0: eb0008aa bl bd50 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 9aa4: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 9aa8: eb0008a8 bl bd50 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 9aac: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 9ab0: ebffef14 bl 5708 <== NOT EXECUTED free(pipe->Buffer); 9ab4: e5960000 ldr r0, [r6] <== NOT EXECUTED 9ab8: ebffe17a bl 20a8 <== NOT EXECUTED free(pipe); 9abc: e1a00006 mov r0, r6 <== NOT EXECUTED 9ac0: ebffe178 bl 20a8 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 9ac4: e5950000 ldr r0, [r5] <== NOT EXECUTED 9ac8: ebffef7f bl 58cc <== NOT EXECUTED 9acc: eaffff3f b 97d0 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 9ad0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 9ad4: e28d1008 add r1, sp, #8 <== NOT EXECUTED 9ad8: eb0008b6 bl bdb8 <== NOT EXECUTED 9adc: eaffffbc b 99d4 <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 9ae0: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 9ae4: e28d1008 add r1, sp, #8 <== NOT EXECUTED 9ae8: eb0008b2 bl bdb8 <== NOT EXECUTED 9aec: eaffffcc b 9a24 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 9af0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 9af4: e28d1008 add r1, sp, #8 <== NOT EXECUTED 9af8: eb0008ae bl bdb8 <== NOT EXECUTED 9afc: eaffff90 b 9944 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 9b00: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9b04: ebffef70 bl 58cc <== NOT EXECUTED 9b08: e3e08005 mvn r8, #5 <== NOT EXECUTED err = -ENXIO; goto out_error; 9b0c: eaffffa4 b 99a4 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 9b10: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 9b14: eb00088d bl bd50 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 9b18: e59a002c ldr r0, [sl, #44] ; 0x2c <== NOT EXECUTED 9b1c: eb00088b bl bd50 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 9b20: e59a0000 ldr r0, [sl] <== NOT EXECUTED 9b24: ebffe15f bl 20a8 <== NOT EXECUTED err_buf: free(pipe); 9b28: e1a0000a mov r0, sl <== NOT EXECUTED 9b2c: ebffe15d bl 20a8 <== NOT EXECUTED 9b30: e3e0800b mvn r8, #11 <== NOT EXECUTED 9b34: eaffffe2 b 9ac4 <== NOT EXECUTED =============================================================================== 00002c88 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2c88: e59f30ec ldr r3, [pc, #236] ; 2d7c 2c8c: e5933000 ldr r3, [r3] 2c90: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2c94: e52de004 push {lr} ; (str lr, [sp, #-4]!) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2c98: 2a000032 bcs 2d68 iop = rtems_libio_iop(fd); 2c9c: e59f30dc ldr r3, [pc, #220] ; 2d80 2ca0: e5933000 ldr r3, [r3] 2ca4: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2ca8: e5903014 ldr r3, [r0, #20] 2cac: e3130c01 tst r3, #256 ; 0x100 2cb0: 0a00002c beq 2d68 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2cb4: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2cb8: e351000b cmp r1, #11 2cbc: 979ff101 ldrls pc, [pc, r1, lsl #2] 2cc0: ea00000d b 2cfc 2cc4: 00002d10 .word 0x00002d10 2cc8: 00002d18 .word 0x00002d18 2ccc: 00002d20 .word 0x00002d20 2cd0: 00002d28 .word 0x00002d28 2cd4: 00002d30 .word 0x00002d30 2cd8: 00002d38 .word 0x00002d38 2cdc: 00002d40 .word 0x00002d40 2ce0: 00002d48 .word 0x00002d48 2ce4: 00002d50 .word 0x00002d50 2ce8: 00002d58 .word 0x00002d58 2cec: 00002d60 .word 0x00002d60 2cf0: 00002cf4 .word 0x00002cf4 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2cf4: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2cf8: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2cfc: eb003764 bl 10a94 <__errno> 2d00: e3a03016 mov r3, #22 2d04: e5803000 str r3, [r0] 2d08: e3e00000 mvn r0, #0 break; } return return_value; } 2d0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 2d10: e5930038 ldr r0, [r3, #56] ; 0x38 break; 2d14: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2d18: e593003c ldr r0, [r3, #60] ; 0x3c break; 2d1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2d20: e5930040 ldr r0, [r3, #64] ; 0x40 break; 2d24: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 2d28: e5930044 ldr r0, [r3, #68] ; 0x44 break; 2d2c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 2d30: e5930048 ldr r0, [r3, #72] ; 0x48 break; 2d34: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2d38: e593004c ldr r0, [r3, #76] ; 0x4c break; 2d3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2d40: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2d44: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2d48: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2d4c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2d50: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2d54: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2d58: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2d60: e593005c ldr r0, [r3, #92] ; 0x5c break; 2d64: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 2d68: eb003749 bl 10a94 <__errno> 2d6c: e3a03009 mov r3, #9 2d70: e5803000 str r3, [r0] 2d74: e3e00000 mvn r0, #0 2d78: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000020a8 : void free( void *ptr ) { MSBUMP(free_calls, 1); 20a8: e59f3088 ldr r3, [pc, #136] ; 2138 20ac: e593200c ldr r2, [r3, #12] 20b0: e92d4030 push {r4, r5, lr} 20b4: e2822001 add r2, r2, #1 if ( !ptr ) 20b8: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 20bc: e583200c str r2, [r3, #12] if ( !ptr ) 20c0: 08bd8030 popeq {r4, r5, pc} /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 20c4: e59f3070 ldr r3, [pc, #112] ; 213c 20c8: e5933000 ldr r3, [r3] 20cc: e3530003 cmp r3, #3 20d0: 0a000012 beq 2120 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 20d4: e59f3064 ldr r3, [pc, #100] ; 2140 20d8: e5933000 ldr r3, [r3] 20dc: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 20e0: 11a00004 movne r0, r4 20e4: 11a0e00f movne lr, pc 20e8: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 20ec: e59f5050 ldr r5, [pc, #80] ; 2144 20f0: e1a01004 mov r1, r4 20f4: e5950000 ldr r0, [r5] 20f8: eb001461 bl 7284 <_Protected_heap_Free> 20fc: e3500000 cmp r0, #0 2100: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 2104: e5952000 ldr r2, [r5] <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2108: e59f0038 ldr r0, [pc, #56] ; 2148 <== NOT EXECUTED 210c: e2822018 add r2, r2, #24 <== NOT EXECUTED 2110: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2114: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 2118: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 211c: ea000397 b 2f80 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2120: eb00005d bl 229c 2124: e3500000 cmp r0, #0 2128: 1affffe9 bne 20d4 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 212c: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 2130: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 2134: ea00006b b 22e8 <== NOT EXECUTED =============================================================================== 0002a6cc : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2a6cc: e59f3058 ldr r3, [pc, #88] ; 2a72c <== NOT EXECUTED 2a6d0: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2a6d4: e92d4010 push {r4, lr} <== NOT EXECUTED 2a6d8: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2a6dc: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2a6e0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 2a6e4: e3530000 cmp r3, #0 <== NOT EXECUTED 2a6e8: 0a000004 beq 2a700 <== NOT EXECUTED 2a6ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a6f0: e3530000 cmp r3, #0 <== NOT EXECUTED 2a6f4: 12800004 addne r0, r0, #4 <== NOT EXECUTED 2a6f8: 11a0e00f movne lr, pc <== NOT EXECUTED 2a6fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2a700: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 2a704: e3530000 cmp r3, #0 <== NOT EXECUTED 2a708: 0a000004 beq 2a720 <== NOT EXECUTED 2a70c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a710: e3530000 cmp r3, #0 <== NOT EXECUTED 2a714: 12840018 addne r0, r4, #24 <== NOT EXECUTED 2a718: 11a0e00f movne lr, pc <== NOT EXECUTED 2a71c: 112fff13 bxne r3 <== NOT EXECUTED free(env); 2a720: e1a00004 mov r0, r4 <== NOT EXECUTED } } 2a724: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 2a728: eaff7590 b 7d70 <== NOT EXECUTED =============================================================================== 0001af38 : int fstat( int fd, struct stat *sbuf ) { 1af38: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 1af3c: e2515000 subs r5, r1, #0 1af40: 0a000023 beq 1afd4 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1af44: e59f309c ldr r3, [pc, #156] ; 1afe8 1af48: e5933000 ldr r3, [r3] 1af4c: e1500003 cmp r0, r3 1af50: 2a000015 bcs 1afac 1af54: e59f3090 ldr r3, [pc, #144] ; 1afec 1af58: e5934000 ldr r4, [r3] 1af5c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 1af60: e5943014 ldr r3, [r4, #20] 1af64: e3130c01 tst r3, #256 ; 0x100 1af68: 0a00000f beq 1afac if ( !iop->handlers ) 1af6c: e594303c ldr r3, [r4, #60] ; 0x3c 1af70: e3530000 cmp r3, #0 1af74: 0a00000c beq 1afac rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 1af78: e5933018 ldr r3, [r3, #24] 1af7c: e3530000 cmp r3, #0 1af80: 0a00000e beq 1afc0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 1af84: e3a01000 mov r1, #0 1af88: e3a02048 mov r2, #72 ; 0x48 1af8c: e1a00005 mov r0, r5 1af90: ebffd429 bl 1003c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1af94: e2840018 add r0, r4, #24 1af98: e1a01005 mov r1, r5 1af9c: e594303c ldr r3, [r4, #60] ; 0x3c 1afa0: e1a0e00f mov lr, pc 1afa4: e593f018 ldr pc, [r3, #24] } 1afa8: e8bd8030 pop {r4, r5, pc} iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 1afac: ebffd1d8 bl f714 <__errno> 1afb0: e3a03009 mov r3, #9 1afb4: e5803000 str r3, [r0] 1afb8: e3e00000 mvn r0, #0 1afbc: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1afc0: ebffd1d3 bl f714 <__errno> <== NOT EXECUTED 1afc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1afc8: e5803000 str r3, [r0] <== NOT EXECUTED 1afcc: e3e00000 mvn r0, #0 <== NOT EXECUTED 1afd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 1afd4: ebffd1ce bl f714 <__errno> 1afd8: e3a0300e mov r3, #14 1afdc: e5803000 str r3, [r0] 1afe0: e3e00000 mvn r0, #0 1afe4: e8bd8030 pop {r4, r5, pc} =============================================================================== 000292c4 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 292c4: e59f3070 ldr r3, [pc, #112] ; 2933c 292c8: e5933000 ldr r3, [r3] 292cc: e1500003 cmp r0, r3 #include int fsync( int fd ) { 292d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 292d4: 2a00000e bcs 29314 iop = rtems_libio_iop( fd ); 292d8: e59f3060 ldr r3, [pc, #96] ; 29340 292dc: e5933000 ldr r3, [r3] 292e0: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 292e4: e5903014 ldr r3, [r0, #20] 292e8: e3130c01 tst r3, #256 ; 0x100 292ec: 0a000008 beq 29314 /* * Now process the fsync(). */ if ( !iop->handlers ) 292f0: e590303c ldr r3, [r0, #60] ; 0x3c 292f4: e3530000 cmp r3, #0 292f8: 0a000005 beq 29314 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 292fc: e5933028 ldr r3, [r3, #40] ; 0x28 29300: e3530000 cmp r3, #0 29304: 0a000007 beq 29328 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 29308: e1a0e00f mov lr, pc 2930c: e12fff13 bx r3 } 29310: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 29314: eb006cc9 bl 44640 <__errno> <== NOT EXECUTED 29318: e3a03009 mov r3, #9 <== NOT EXECUTED 2931c: e5803000 str r3, [r0] <== NOT EXECUTED 29320: e3e00000 mvn r0, #0 <== NOT EXECUTED 29324: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 29328: eb006cc4 bl 44640 <__errno> 2932c: e3a03086 mov r3, #134 ; 0x86 29330: e5803000 str r3, [r0] 29334: e3e00000 mvn r0, #0 29338: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000ae04 : int ftruncate( int fd, off_t length ) { ae04: e92d40f0 push {r4, r5, r6, r7, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ae08: e59f30fc ldr r3, [pc, #252] ; af0c ae0c: e5933000 ldr r3, [r3] ae10: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { ae14: e24dd014 sub sp, sp, #20 ae18: e1a05001 mov r5, r1 ae1c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ae20: 2a000025 bcs aebc iop = rtems_libio_iop( fd ); ae24: e59f30e4 ldr r3, [pc, #228] ; af10 ae28: e5934000 ldr r4, [r3] ae2c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); ae30: e5943014 ldr r3, [r4, #20] ae34: e3130c01 tst r3, #256 ; 0x100 ae38: 0a00001f beq aebc rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ae3c: e3130004 tst r3, #4 ae40: 0a000022 beq aed0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ae44: e284c018 add ip, r4, #24 ae48: e8bc000f ldm ip!, {r0, r1, r2, r3} ae4c: e1a0700d mov r7, sp ae50: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) ae54: e59d200c ldr r2, [sp, #12] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ae58: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) ae5c: e5927010 ldr r7, [r2, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ae60: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) ae64: e3570000 cmp r7, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ae68: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) ae6c: 0a00001c beq aee4 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) ae70: e1a0000d mov r0, sp ae74: e1a0e00f mov lr, pc ae78: e12fff17 bx r7 ae7c: e3500001 cmp r0, #1 ae80: 0a00001c beq aef8 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ae84: e5943014 ldr r3, [r4, #20] ae88: e3130004 tst r3, #4 ae8c: 0a00000f beq aed0 if ( !iop->handlers->ftruncate_h ) ae90: e594303c ldr r3, [r4, #60] ; 0x3c ae94: e5933020 ldr r3, [r3, #32] ae98: e3530000 cmp r3, #0 ae9c: 0a000010 beq aee4 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); aea0: e1a00004 mov r0, r4 aea4: e1a01005 mov r1, r5 aea8: e1a02006 mov r2, r6 aeac: e1a0e00f mov lr, pc aeb0: e12fff13 bx r3 } aeb4: e28dd014 add sp, sp, #20 aeb8: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); aebc: eb001214 bl f714 <__errno> <== NOT EXECUTED aec0: e3a03009 mov r3, #9 <== NOT EXECUTED aec4: e5803000 str r3, [r0] <== NOT EXECUTED aec8: e3e00000 mvn r0, #0 <== NOT EXECUTED aecc: eafffff8 b aeb4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); aed0: eb00120f bl f714 <__errno> <== NOT EXECUTED aed4: e3a03016 mov r3, #22 <== NOT EXECUTED aed8: e5803000 str r3, [r0] <== NOT EXECUTED aedc: e3e00000 mvn r0, #0 <== NOT EXECUTED aee0: eafffff3 b aeb4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); aee4: eb00120a bl f714 <__errno> <== NOT EXECUTED aee8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED aeec: e5803000 str r3, [r0] <== NOT EXECUTED aef0: e3e00000 mvn r0, #0 <== NOT EXECUTED aef4: eaffffee b aeb4 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); aef8: eb001205 bl f714 <__errno> aefc: e3a03015 mov r3, #21 af00: e5803000 str r3, [r0] af04: e3e00000 mvn r0, #0 af08: eaffffe9 b aeb4 =============================================================================== 0005e234 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e234: e59f30b8 ldr r3, [pc, #184] ; 5e2f4 5e238: e5933000 ldr r3, [r3] 5e23c: e1500003 cmp r0, r3 5e240: 359f30b0 ldrcc r3, [pc, #176] ; 5e2f8 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5e244: e92d40f0 push {r4, r5, r6, r7, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5e248: 35934000 ldrcc r4, [r3] 5e24c: 23a04000 movcs r4, #0 5e250: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e254: e284c018 add ip, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5e258: e24dd014 sub sp, sp, #20 5e25c: e1a06001 mov r6, r1 5e260: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e264: e8bc000f ldm ip!, {r0, r1, r2, r3} 5e268: e1a0700d mov r7, sp 5e26c: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 5e270: e59d200c ldr r2, [sp, #12] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e274: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 5e278: e5927010 ldr r7, [r2, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e27c: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 5e280: e3570000 cmp r7, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5e284: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 5e288: 0a000014 beq 5e2e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5e28c: e1a0000d mov r0, sp 5e290: e1a0e00f mov lr, pc 5e294: e12fff17 bx r7 5e298: e3500001 cmp r0, #1 5e29c: 1a00000a bne 5e2cc /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5e2a0: e594303c ldr r3, [r4, #60] ; 0x3c 5e2a4: e5933008 ldr r3, [r3, #8] 5e2a8: e3530000 cmp r3, #0 5e2ac: 0a00000b beq 5e2e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5e2b0: e1a00004 mov r0, r4 5e2b4: e1a01006 mov r1, r6 5e2b8: e1a02005 mov r2, r5 5e2bc: e1a0e00f mov lr, pc 5e2c0: e12fff13 bx r3 } 5e2c4: e28dd014 add sp, sp, #20 5e2c8: e8bd80f0 pop {r4, r5, r6, r7, pc} loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5e2cc: ebff98db bl 44640 <__errno> 5e2d0: e3a03014 mov r3, #20 5e2d4: e5803000 str r3, [r0] 5e2d8: e3e00000 mvn r0, #0 5e2dc: eafffff8 b 5e2c4 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5e2e0: ebff98d6 bl 44640 <__errno> <== NOT EXECUTED 5e2e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5e2e8: e5803000 str r3, [r0] <== NOT EXECUTED 5e2ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 5e2f0: eafffff3 b 5e2c4 <== NOT EXECUTED =============================================================================== 0002947c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 2947c: e59f3008 ldr r3, [pc, #8] ; 2948c <== NOT EXECUTED 29480: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 29484: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 29488: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00029ae8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 29ae8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 29aec: e59d801c ldr r8, [sp, #28] 29af0: e1a05000 mov r5, r0 29af4: e1a0a001 mov sl, r1 29af8: e1a04002 mov r4, r2 29afc: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 29b00: ebffffb2 bl 299d0 if ((fp = fopen("/etc/group", "r")) == NULL) { 29b04: e59f00b0 ldr r0, [pc, #176] ; 29bbc 29b08: e59f10b0 ldr r1, [pc, #176] ; 29bc0 29b0c: eb006d3b bl 45000 29b10: e2506000 subs r6, r0, #0 29b14: 1a000006 bne 29b34 29b18: ea000022 b 29ba8 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 29b1c: e5940000 ldr r0, [r4] 29b20: eb00836c bl 4a8d8 29b24: e2700001 rsbs r0, r0, #1 29b28: 33a00000 movcc r0, #0 } else { match = (grp->gr_gid == gid); } if (match) { 29b2c: e3500000 cmp r0, #0 29b30: 1a00000f bne 29b74 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 29b34: e1a01004 mov r1, r4 29b38: e1a02007 mov r2, r7 29b3c: e1a03008 mov r3, r8 29b40: e1a00006 mov r0, r6 29b44: ebfffee1 bl 296d0 29b48: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 29b4c: e1a01005 mov r1, r5 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 29b50: 0a00000d beq 29b8c errno = EINVAL; fclose(fp); return -1; } if (name) { 29b54: e3550000 cmp r5, #0 29b58: 1affffef bne 29b1c match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 29b5c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 29b60: e150000a cmp r0, sl <== NOT EXECUTED 29b64: 13a00000 movne r0, #0 <== NOT EXECUTED 29b68: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 29b6c: e3500000 cmp r0, #0 <== NOT EXECUTED 29b70: 0affffef beq 29b34 <== NOT EXECUTED fclose(fp); 29b74: e1a00006 mov r0, r6 29b78: eb006afd bl 44774 *result = grp; 29b7c: e59d3020 ldr r3, [sp, #32] 29b80: e3a00000 mov r0, #0 29b84: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 29b88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 29b8c: eb006aab bl 44640 <__errno> <== NOT EXECUTED 29b90: e3a03016 mov r3, #22 <== NOT EXECUTED 29b94: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 29b98: e1a00006 mov r0, r6 <== NOT EXECUTED 29b9c: eb006af4 bl 44774 <== NOT EXECUTED 29ba0: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29ba4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 29ba8: eb006aa4 bl 44640 <__errno> <== NOT EXECUTED 29bac: e3a03016 mov r3, #22 <== NOT EXECUTED 29bb0: e5803000 str r3, [r0] <== NOT EXECUTED 29bb4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29bb8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00029824 : return NULL; return p; } struct group *getgrent(void) { 29824: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 29828: e59f4030 ldr r4, [pc, #48] ; 29860 <== NOT EXECUTED 2982c: e5940000 ldr r0, [r4] <== NOT EXECUTED 29830: e3500000 cmp r0, #0 <== NOT EXECUTED 29834: 1a000001 bne 29840 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 29838: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 2983c: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 29840: e2841008 add r1, r4, #8 <== NOT EXECUTED 29844: e2842018 add r2, r4, #24 <== NOT EXECUTED 29848: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2984c: ebffff9f bl 296d0 <== NOT EXECUTED 29850: e3500000 cmp r0, #0 <== NOT EXECUTED 29854: 12840008 addne r0, r4, #8 <== NOT EXECUTED 29858: 18bd8010 popne {r4, pc} <== NOT EXECUTED 2985c: eafffff5 b 29838 <== NOT EXECUTED =============================================================================== 00029c00 : struct group *getgrgid( gid_t gid ) { 29c00: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 29c04: e59f1030 ldr r1, [pc, #48] ; 29c3c <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 29c08: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29c0c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 29c10: e28dc004 add ip, sp, #4 <== NOT EXECUTED 29c14: e2812010 add r2, r1, #16 <== NOT EXECUTED 29c18: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29c1c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 29c20: e58dc000 str ip, [sp] <== NOT EXECUTED 29c24: ebffffe6 bl 29bc4 <== NOT EXECUTED 29c28: e3500000 cmp r0, #0 <== NOT EXECUTED 29c2c: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 29c30: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 29c34: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29c38: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00029bc4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 29bc4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 29bc8: e1a0c002 mov ip, r2 <== NOT EXECUTED 29bcc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29bd0: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 29bd4: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 29bd8: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 29bdc: e1a0300c mov r3, ip <== NOT EXECUTED 29be0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 29be4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 29be8: e1a0200e mov r2, lr <== NOT EXECUTED 29bec: e3a00000 mov r0, #0 <== NOT EXECUTED 29bf0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 29bf4: ebffffbb bl 29ae8 <== NOT EXECUTED } 29bf8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29bfc: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00029ce0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 29ce0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 29ce4: e59d801c ldr r8, [sp, #28] 29ce8: e1a05000 mov r5, r0 29cec: e1a0a001 mov sl, r1 29cf0: e1a04002 mov r4, r2 29cf4: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 29cf8: ebffff34 bl 299d0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 29cfc: e59f00b0 ldr r0, [pc, #176] ; 29db4 29d00: e59f10b0 ldr r1, [pc, #176] ; 29db8 29d04: eb006cbd bl 45000 29d08: e2506000 subs r6, r0, #0 29d0c: 1a000006 bne 29d2c 29d10: ea000022 b 29da0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 29d14: e5940000 ldr r0, [r4] 29d18: eb0082ee bl 4a8d8 29d1c: e2700001 rsbs r0, r0, #1 29d20: 33a00000 movcc r0, #0 } else { match = (pwd->pw_uid == uid); } if (match) { 29d24: e3500000 cmp r0, #0 29d28: 1a00000f bne 29d6c if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 29d2c: e1a01004 mov r1, r4 29d30: e1a02007 mov r2, r7 29d34: e1a03008 mov r3, r8 29d38: e1a00006 mov r0, r6 29d3c: ebfffec8 bl 29864 29d40: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 29d44: e1a01005 mov r1, r5 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 29d48: 0a00000d beq 29d84 errno = EINVAL; fclose(fp); return -1; } if (name) { 29d4c: e3550000 cmp r5, #0 29d50: 1affffef bne 29d14 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 29d54: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 29d58: e150000a cmp r0, sl <== NOT EXECUTED 29d5c: 13a00000 movne r0, #0 <== NOT EXECUTED 29d60: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 29d64: e3500000 cmp r0, #0 <== NOT EXECUTED 29d68: 0affffef beq 29d2c <== NOT EXECUTED fclose(fp); 29d6c: e1a00006 mov r0, r6 29d70: eb006a7f bl 44774 *result = pwd; 29d74: e59d3020 ldr r3, [sp, #32] 29d78: e3a00000 mov r0, #0 29d7c: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 29d80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 29d84: eb006a2d bl 44640 <__errno> <== NOT EXECUTED 29d88: e3a03016 mov r3, #22 <== NOT EXECUTED 29d8c: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 29d90: e1a00006 mov r0, r6 <== NOT EXECUTED 29d94: eb006a76 bl 44774 <== NOT EXECUTED 29d98: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29d9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 29da0: eb006a26 bl 44640 <__errno> <== NOT EXECUTED 29da4: e3a03016 mov r3, #22 <== NOT EXECUTED 29da8: e5803000 str r3, [r0] <== NOT EXECUTED 29dac: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29db0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00029990 : return NULL; return p; } struct passwd *getpwent(void) { 29990: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 29994: e59f4030 ldr r4, [pc, #48] ; 299cc <== NOT EXECUTED 29998: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 2999c: e3500000 cmp r0, #0 <== NOT EXECUTED 299a0: 1a000001 bne 299ac <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 299a4: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 299a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 299ac: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 299b0: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 299b4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 299b8: ebffffa9 bl 29864 <== NOT EXECUTED 299bc: e3500000 cmp r0, #0 <== NOT EXECUTED 299c0: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 299c4: 18bd8010 popne {r4, pc} <== NOT EXECUTED 299c8: eafffff5 b 299a4 <== NOT EXECUTED =============================================================================== 00029df8 : struct passwd *getpwuid( uid_t uid ) { 29df8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 29dfc: e59f1030 ldr r1, [pc, #48] ; 29e34 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 29e00: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29e04: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 29e08: e28dc004 add ip, sp, #4 <== NOT EXECUTED 29e0c: e281201c add r2, r1, #28 <== NOT EXECUTED 29e10: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29e14: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 29e18: e58dc000 str ip, [sp] <== NOT EXECUTED 29e1c: ebffffe6 bl 29dbc <== NOT EXECUTED 29e20: e3500000 cmp r0, #0 <== NOT EXECUTED 29e24: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 29e28: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 29e2c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29e30: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00029dbc : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 29dbc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 29dc0: e1a0c002 mov ip, r2 <== NOT EXECUTED 29dc4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29dc8: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 29dcc: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 29dd0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 29dd4: e1a0300c mov r3, ip <== NOT EXECUTED 29dd8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 29ddc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 29de0: e1a0200e mov r2, lr <== NOT EXECUTED 29de4: e3a00000 mov r0, #0 <== NOT EXECUTED 29de8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 29dec: ebffffbb bl 29ce0 <== NOT EXECUTED } 29df0: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29df4: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 0000214c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 214c: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 2150: e2504000 subs r4, r0, #0 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 2154: e24dd008 sub sp, sp, #8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 2158: 0a00000f beq 219c static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 215c: e10f5000 mrs r5, CPSR 2160: e3853080 orr r3, r5, #128 ; 0x80 2164: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 2168: e1a0000d mov r0, sp 216c: eb0010f2 bl 653c <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2170: e129f005 msr CPSR_fc, r5 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2174: e59f2034 ldr r2, [pc, #52] ; 21b0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 2178: e59d3004 ldr r3, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 217c: e0c10392 smull r0, r1, r2, r3 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 2180: e59d2000 ldr r2, [sp] time->tv_usec = useconds; 2184: e1a03fc3 asr r3, r3, #31 2188: e0633341 rsb r3, r3, r1, asr #6 218c: e884000c stm r4, {r2, r3} 2190: e3a00000 mov r0, #0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 2194: e28dd008 add sp, sp, #8 2198: e8bd8030 pop {r4, r5, pc} void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 219c: eb00355c bl f714 <__errno> <== NOT EXECUTED 21a0: e3a0300e mov r3, #14 <== NOT EXECUTED 21a4: e5803000 str r3, [r0] <== NOT EXECUTED 21a8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 21ac: eafffff8 b 2194 <== NOT EXECUTED =============================================================================== 00007e8c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 7e8c: e59f3008 ldr r3, [pc, #8] ; 7e9c <== NOT EXECUTED 7e90: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 7e94: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 7e98: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00005790 : int ioctl( int fd, ioctl_command_t command, ... ) { 5790: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 5794: e59f3090 ldr r3, [pc, #144] ; 582c int ioctl( int fd, ioctl_command_t command, ... ) { 5798: e52de004 push {lr} ; (str lr, [sp, #-4]!) va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 579c: e5933000 ldr r3, [r3] 57a0: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 57a4: e24dd004 sub sp, sp, #4 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 57a8: 2a000015 bcs 5804 iop = rtems_libio_iop( fd ); 57ac: e59f307c ldr r3, [pc, #124] ; 5830 57b0: e5933000 ldr r3, [r3] 57b4: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 57b8: e5903014 ldr r3, [r0, #20] 57bc: e3130c01 tst r3, #256 ; 0x100 57c0: 0a00000f beq 5804 /* * Now process the ioctl(). */ if ( !iop->handlers ) 57c4: e590303c ldr r3, [r0, #60] ; 0x3c iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 57c8: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 57cc: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 57d0: e58d2000 str r2, [sp] 57d4: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 57d8: 0a000009 beq 5804 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 57dc: e5933010 ldr r3, [r3, #16] 57e0: e3530000 cmp r3, #0 57e4: 0a00000b beq 5818 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 57e8: e59d1008 ldr r1, [sp, #8] 57ec: e1a0e00f mov lr, pc 57f0: e12fff13 bx r3 return rc; } 57f4: e28dd004 add sp, sp, #4 57f8: e49de004 pop {lr} ; (ldr lr, [sp], #4) 57fc: e28dd00c add sp, sp, #12 5800: e12fff1e bx lr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5804: eb003878 bl 139ec <__errno> 5808: e3a03009 mov r3, #9 580c: e5803000 str r3, [r0] 5810: e3e00000 mvn r0, #0 5814: eafffff6 b 57f4 if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5818: eb003873 bl 139ec <__errno> <== NOT EXECUTED 581c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5820: e5803000 str r3, [r0] <== NOT EXECUTED 5824: e3e00000 mvn r0, #0 <== NOT EXECUTED 5828: eafffff1 b 57f4 <== NOT EXECUTED =============================================================================== 00003b30 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 3b30: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 3b34: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3b38: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 3b3c: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 3b40: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 3b44: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3b48: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 3b4c: 0a000007 beq 3b70 <== NOT EXECUTED c = tolower (c); 3b50: e59f2198 ldr r2, [pc, #408] ; 3cf0 <== NOT EXECUTED 3b54: e5922000 ldr r2, [r2] <== NOT EXECUTED 3b58: e0822004 add r2, r2, r4 <== NOT EXECUTED 3b5c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 3b60: e2022003 and r2, r2, #3 <== NOT EXECUTED 3b64: e3520001 cmp r2, #1 <== NOT EXECUTED 3b68: 02844020 addeq r4, r4, #32 <== NOT EXECUTED 3b6c: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 3b70: e354000d cmp r4, #13 <== NOT EXECUTED 3b74: 0a000012 beq 3bc4 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3b78: e354000a cmp r4, #10 <== NOT EXECUTED 3b7c: 0a000034 beq 3c54 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3b80: e3540000 cmp r4, #0 <== NOT EXECUTED 3b84: 1a000015 bne 3be0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3b88: e59f3164 ldr r3, [pc, #356] ; 3cf4 <== NOT EXECUTED 3b8c: e5932000 ldr r2, [r3] <== NOT EXECUTED 3b90: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 3b94: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3b98: e1530002 cmp r3, r2 <== NOT EXECUTED 3b9c: aa00000a bge 3bcc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 3ba0: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED 3ba4: e3120008 tst r2, #8 <== NOT EXECUTED 3ba8: 1a00002c bne 3c60 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 3bac: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 3bb0: e2832001 add r2, r3, #1 <== NOT EXECUTED 3bb4: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 3bb8: e3a00000 mov r0, #0 <== NOT EXECUTED 3bbc: e5852020 str r2, [r5, #32] <== NOT EXECUTED 3bc0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 3bc4: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3bc8: 0a000001 beq 3bd4 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 3bcc: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 3bd0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 3bd4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3bd8: 03a0400d moveq r4, #13 <== NOT EXECUTED 3bdc: 13a0400a movne r4, #10 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3be0: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED 3be4: e3130002 tst r3, #2 <== NOT EXECUTED 3be8: 0affffe6 beq 3b88 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 3bec: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED 3bf0: e1520004 cmp r2, r4 <== NOT EXECUTED 3bf4: 0a000038 beq 3cdc <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3bf8: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED 3bfc: e1520004 cmp r2, r4 <== NOT EXECUTED 3c00: 0a000030 beq 3cc8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3c04: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED 3c08: e1520004 cmp r2, r4 <== NOT EXECUTED 3c0c: 0a000027 beq 3cb0 <== NOT EXECUTED return 1; } else if (c == '\n') { 3c10: e354000a cmp r4, #10 <== NOT EXECUTED 3c14: 0a00001b beq 3c88 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 3c18: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED 3c1c: e1520004 cmp r2, r4 <== NOT EXECUTED 3c20: 0a000002 beq 3c30 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 3c24: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED 3c28: e1520004 cmp r2, r4 <== NOT EXECUTED 3c2c: 1affffd5 bne 3b88 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 3c30: e3130008 tst r3, #8 <== NOT EXECUTED 3c34: 1a00001f bne 3cb8 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 3c38: e285101c add r1, r5, #28 <== NOT EXECUTED 3c3c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3c40: e2832001 add r2, r3, #1 <== NOT EXECUTED 3c44: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 3c48: e3a00001 mov r0, #1 <== NOT EXECUTED 3c4c: e5852020 str r2, [r5, #32] <== NOT EXECUTED return 1; 3c50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3c54: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 3c58: 13a0400d movne r4, #13 <== NOT EXECUTED 3c5c: eaffffdf b 3be0 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 3c60: e1a00004 mov r0, r4 <== NOT EXECUTED 3c64: e1a01005 mov r1, r5 <== NOT EXECUTED 3c68: ebffff0b bl 389c <== NOT EXECUTED 3c6c: e285101c add r1, r5, #28 <== NOT EXECUTED 3c70: e891000a ldm r1, {r1, r3} <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3c74: e2832001 add r2, r3, #1 <== NOT EXECUTED 3c78: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 3c7c: e3a00000 mov r0, #0 <== NOT EXECUTED 3c80: e5852020 str r2, [r5, #32] <== NOT EXECUTED 3c84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 3c88: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 3c8c: 11a00004 movne r0, r4 <== NOT EXECUTED 3c90: 11a01005 movne r1, r5 <== NOT EXECUTED 3c94: 1bffff00 blne 389c <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3c98: e285101c add r1, r5, #28 <== NOT EXECUTED 3c9c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3ca0: e2832001 add r2, r3, #1 <== NOT EXECUTED 3ca4: e3a0000a mov r0, #10 <== NOT EXECUTED 3ca8: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 3cac: e5852020 str r2, [r5, #32] <== NOT EXECUTED 3cb0: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 3cb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 3cb8: e1a00004 mov r0, r4 <== NOT EXECUTED 3cbc: e1a01005 mov r1, r5 <== NOT EXECUTED 3cc0: ebfffef5 bl 389c <== NOT EXECUTED 3cc4: eaffffdb b 3c38 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 3cc8: e1a00005 mov r0, r5 <== NOT EXECUTED 3ccc: e3a01001 mov r1, #1 <== NOT EXECUTED 3cd0: ebffff13 bl 3924 <== NOT EXECUTED 3cd4: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 3cd8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 3cdc: e1a00005 mov r0, r5 <== NOT EXECUTED 3ce0: e3a01000 mov r1, #0 <== NOT EXECUTED 3ce4: ebffff0e bl 3924 <== NOT EXECUTED 3ce8: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 3cec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0000e8cc : int killinfo( pid_t pid, int sig, const union sigval *value ) { e8cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} e8d0: e24dd00c sub sp, sp, #12 e8d4: e1a04000 mov r4, r0 e8d8: e1a05001 mov r5, r1 e8dc: e1a08002 mov r8, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) e8e0: ebfff195 bl af3c e8e4: e1500004 cmp r0, r4 e8e8: 1a000096 bne eb48 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) e8ec: e3550000 cmp r5, #0 e8f0: 0a000099 beq eb5c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); e8f4: e2453001 sub r3, r5, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) e8f8: e353001f cmp r3, #31 e8fc: 8a000096 bhi eb5c rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) e900: e59f6280 ldr r6, [pc, #640] ; eb88 e904: e1a07085 lsl r7, r5, #1 e908: e0872005 add r2, r7, r5 e90c: e0862102 add r2, r6, r2, lsl #2 e910: e5922008 ldr r2, [r2, #8] e914: e3520001 cmp r2, #1 e918: 0a00003a beq ea08 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) e91c: e3550008 cmp r5, #8 e920: 13550004 cmpne r5, #4 e924: 0a00003a beq ea14 e928: e355000b cmp r5, #11 e92c: 0a000038 beq ea14 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); e930: e3a04001 mov r4, #1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; e934: e58d4004 str r4, [sp, #4] /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; e938: e58d5000 str r5, [sp] siginfo->si_code = SI_USER; if ( !value ) { e93c: e3580000 cmp r8, #0 e940: e1a04314 lsl r4, r4, r3 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; e944: 15983000 ldrne r3, [r8] e948: 158d3008 strne r3, [sp, #8] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; e94c: e59f3238 ldr r3, [pc, #568] ; eb8c e950: e5932000 ldr r2, [r3] e954: e2822001 add r2, r2, #1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; e958: 058d8008 streq r8, [sp, #8] e95c: e5832000 str r2, [r3] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; e960: e59f3228 ldr r3, [pc, #552] ; eb90 e964: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; e968: e5903108 ldr r3, [r0, #264] ; 0x108 e96c: e59330cc ldr r3, [r3, #204] ; 0xcc e970: e1d43003 bics r3, r4, r3 e974: 1a000014 bne e9cc /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; e978: e59f1214 ldr r1, [pc, #532] ; eb94 e97c: e4913004 ldr r3, [r1], #4 e980: e1530001 cmp r3, r1 e984: 0a000037 beq ea68 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) e988: e5932030 ldr r2, [r3, #48] ; 0x30 e98c: e1140002 tst r4, r2 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; e990: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; e994: e5932108 ldr r2, [r3, #264] ; 0x108 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) e998: 0a000008 beq e9c0 e99c: ea00000a b e9cc the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { e9a0: e5933000 ldr r3, [r3] /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; e9a4: e1530001 cmp r3, r1 e9a8: 0a00002e beq ea68 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) e9ac: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED e9b0: e1140002 tst r4, r2 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; e9b4: e1a00003 mov r0, r3 <== NOT EXECUTED api = the_thread->API_Extensions[ THREAD_API_POSIX ]; e9b8: e5932108 ldr r2, [r3, #264] ; 0x108 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) e9bc: 1a000002 bne e9cc <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) e9c0: e59220cc ldr r2, [r2, #204] ; 0xcc e9c4: e1d42002 bics r2, r4, r2 e9c8: 0afffff4 beq e9a0 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; e9cc: e3a03001 mov r3, #1 e9d0: e5c03074 strb r3, [r0, #116] ; 0x74 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { e9d4: e1a01005 mov r1, r5 e9d8: e1a0200d mov r2, sp e9dc: eb0000f9 bl edc8 <_POSIX_signals_Unblock_thread> e9e0: e3500000 cmp r0, #0 e9e4: 1a00001c bne ea5c * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { e9e8: e0875005 add r5, r7, r5 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); e9ec: e1a00004 mov r0, r4 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { e9f0: e1a05105 lsl r5, r5, #2 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); e9f4: eb0000e1 bl ed80 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { e9f8: e7963005 ldr r3, [r6, r5] e9fc: e3530002 cmp r3, #2 ea00: 0a000007 beq ea24 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ea04: ebffe3ae bl 78c4 <_Thread_Enable_dispatch> ea08: e3a00000 mov r0, #0 return 0; } ea0c: e28dd00c add sp, sp, #12 ea10: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); ea14: eb0001b6 bl f0f4 ea18: e1a01005 mov r1, r5 ea1c: eb000179 bl f008 ea20: eafffff9 b ea0c */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) ea24: e59f016c ldr r0, [pc, #364] ; eb98 ea28: ebffddca bl 6158 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { ea2c: e250c000 subs ip, r0, #0 ea30: 0a00004e beq eb70 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ea34: e1a0300d mov r3, sp ea38: e8930007 ldm r3, {r0, r1, r2} ea3c: e28c3008 add r3, ip, #8 ea40: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ea44: e59f0150 ldr r0, [pc, #336] ; eb9c ea48: e1a0100c mov r1, ip ea4c: e0800005 add r0, r0, r5 ea50: ebffddac bl 6108 <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ea54: ebffe39a bl 78c4 <_Thread_Enable_dispatch> ea58: eaffffea b ea08 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); ea5c: ebffe398 bl 78c4 <_Thread_Enable_dispatch> ea60: e3a00000 mov r0, #0 return 0; ea64: eaffffe8 b ea0c * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ea68: e59f3130 ldr r3, [pc, #304] ; eba0 ea6c: e5d3c000 ldrb ip, [r3] ea70: e59f812c ldr r8, [pc, #300] ; eba4 ea74: e28cc001 add ip, ip, #1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ea78: e3a0a000 mov sl, #0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ea7c: e5983008 ldr r3, [r8, #8] ea80: e3530000 cmp r3, #0 ea84: 0a000020 beq eb0c continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ea88: e5933004 ldr r3, [r3, #4] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ea8c: e1d301b0 ldrh r0, [r3, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ea90: e3500000 cmp r0, #0 if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; ea94: e593e01c ldr lr, [r3, #28] for ( index = 1 ; index <= maximum ; index++ ) { ea98: 0a00001b beq eb0c ea9c: e3a03001 mov r3, #1 the_thread = (Thread_Control *) object_table[ index ]; eaa0: e79e2103 ldr r2, [lr, r3, lsl #2] if ( !the_thread ) eaa4: e3520000 cmp r2, #0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { eaa8: e2833001 add r3, r3, #1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) eaac: 0a000014 beq eb04 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) eab0: e5921014 ldr r1, [r2, #20] eab4: e151000c cmp r1, ip eab8: 8a000011 bhi eb04 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; eabc: e5929108 ldr r9, [r2, #264] ; 0x108 eac0: e59990cc ldr r9, [r9, #204] ; 0xcc eac4: e1d49009 bics r9, r4, r9 eac8: 0a00000d beq eb04 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { eacc: e151000c cmp r1, ip ead0: 3a000009 bcc eafc * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { ead4: e59a9010 ldr r9, [sl, #16] ead8: e3590000 cmp r9, #0 eadc: 0a000008 beq eb04 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { eae0: e592b010 ldr fp, [r2, #16] eae4: e35b0000 cmp fp, #0 eae8: 0a000003 beq eafc continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { eaec: e3190201 tst r9, #268435456 ; 0x10000000 eaf0: 1a000003 bne eb04 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { eaf4: e31b0201 tst fp, #268435456 ; 0x10000000 eaf8: 0a000001 beq eb04 eafc: e1a0c001 mov ip, r1 eb00: e1a0a002 mov sl, r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { eb04: e1500003 cmp r0, r3 eb08: 2affffe4 bcs eaa0 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { eb0c: e59f3094 ldr r3, [pc, #148] ; eba8 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { eb10: e2888004 add r8, r8, #4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { eb14: e1580003 cmp r8, r3 eb18: 1affffd7 bne ea7c } } } } if ( interested ) { eb1c: e35a0000 cmp sl, #0 eb20: 0affffb0 beq e9e8 eb24: e1a0000a mov r0, sl * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; eb28: e3a03001 mov r3, #1 eb2c: e5c03074 strb r3, [r0, #116] ; 0x74 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { eb30: e1a01005 mov r1, r5 eb34: e1a0200d mov r2, sp eb38: eb0000a2 bl edc8 <_POSIX_signals_Unblock_thread> eb3c: e3500000 cmp r0, #0 eb40: 0affffa8 beq e9e8 eb44: eaffffc4 b ea5c <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); eb48: eb0002f1 bl f714 <__errno> <== NOT EXECUTED eb4c: e3a03003 mov r3, #3 <== NOT EXECUTED eb50: e5803000 str r3, [r0] <== NOT EXECUTED eb54: e3e00000 mvn r0, #0 <== NOT EXECUTED eb58: eaffffab b ea0c <== NOT EXECUTED */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); eb5c: eb0002ec bl f714 <__errno> <== NOT EXECUTED eb60: e3a03016 mov r3, #22 <== NOT EXECUTED eb64: e5803000 str r3, [r0] <== NOT EXECUTED eb68: e3e00000 mvn r0, #0 <== NOT EXECUTED eb6c: eaffffa6 b ea0c <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); eb70: ebffe353 bl 78c4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); eb74: eb0002e6 bl f714 <__errno> eb78: e3a0300b mov r3, #11 eb7c: e5803000 str r3, [r0] eb80: e3e00000 mvn r0, #0 eb84: eaffffa0 b ea0c =============================================================================== 00029ea0 : int link( const char *existing, const char *new ) { 29ea0: e92d4070 push {r4, r5, r6, lr} 29ea4: e24dd034 sub sp, sp, #52 ; 0x34 29ea8: e1a05001 mov r5, r1 29eac: e1a06000 mov r6, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 29eb0: eb0084f0 bl 4b278 29eb4: e28d4018 add r4, sp, #24 29eb8: e1a01000 mov r1, r0 29ebc: e3a0c001 mov ip, #1 29ec0: e1a00006 mov r0, r6 29ec4: e3a02000 mov r2, #0 29ec8: e1a03004 mov r3, r4 29ecc: e58dc000 str ip, [sp] 29ed0: ebff7784 bl 7ce8 0, &existing_loc, true ); if ( result != 0 ) 29ed4: e3500000 cmp r0, #0 29ed8: 0a000003 beq 29eec rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 29edc: e3e05000 mvn r5, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 29ee0: e1a00005 mov r0, r5 29ee4: e28dd034 add sp, sp, #52 ; 0x34 29ee8: e8bd8070 pop {r4, r5, r6, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 29eec: e28d6004 add r6, sp, #4 29ef0: e1a00005 mov r0, r5 29ef4: e28d1030 add r1, sp, #48 ; 0x30 29ef8: e1a02006 mov r2, r6 29efc: ebff7e0a bl 972c if ( !parent_loc.ops->evalformake_h ) { 29f00: e59d3010 ldr r3, [sp, #16] 29f04: e5933004 ldr r3, [r3, #4] 29f08: e3530000 cmp r3, #0 29f0c: 0a000048 beq 2a034 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 29f10: e59d0030 ldr r0, [sp, #48] ; 0x30 29f14: e1a01006 mov r1, r6 29f18: e0850000 add r0, r5, r0 29f1c: e28d202c add r2, sp, #44 ; 0x2c 29f20: e1a0e00f mov lr, pc 29f24: e12fff13 bx r3 if ( result != 0 ) { 29f28: e2505000 subs r5, r0, #0 29f2c: 1a000034 bne 2a004 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 29f30: e59d3028 ldr r3, [sp, #40] ; 0x28 29f34: e59d2014 ldr r2, [sp, #20] 29f38: e1520003 cmp r2, r3 29f3c: 1a00001b bne 29fb0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 29f40: e59d2010 ldr r2, [sp, #16] 29f44: e5923008 ldr r3, [r2, #8] 29f48: e3530000 cmp r3, #0 29f4c: 0a000044 beq 2a064 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 29f50: e1a00004 mov r0, r4 29f54: e1a01006 mov r1, r6 29f58: e59d202c ldr r2, [sp, #44] ; 0x2c 29f5c: e1a0e00f mov lr, pc 29f60: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 29f64: e59d3024 ldr r3, [sp, #36] ; 0x24 29f68: e3530000 cmp r3, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 29f6c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 29f70: 0a000004 beq 29f88 29f74: e593301c ldr r3, [r3, #28] 29f78: e3530000 cmp r3, #0 29f7c: 11a00004 movne r0, r4 29f80: 11a0e00f movne lr, pc 29f84: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 29f88: e59d3010 ldr r3, [sp, #16] 29f8c: e3530000 cmp r3, #0 29f90: 0affffd2 beq 29ee0 29f94: e593301c ldr r3, [r3, #28] 29f98: e3530000 cmp r3, #0 29f9c: 0affffcf beq 29ee0 29fa0: e1a00006 mov r0, r6 29fa4: e1a0e00f mov lr, pc 29fa8: e12fff13 bx r3 29fac: eaffffcb b 29ee0 * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 29fb0: e59d3024 ldr r3, [sp, #36] ; 0x24 29fb4: e3530000 cmp r3, #0 29fb8: 0a000004 beq 29fd0 29fbc: e593301c ldr r3, [r3, #28] 29fc0: e3530000 cmp r3, #0 29fc4: 11a00004 movne r0, r4 29fc8: 11a0e00f movne lr, pc 29fcc: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 29fd0: e59d3010 ldr r3, [sp, #16] 29fd4: e3530000 cmp r3, #0 29fd8: 0a000004 beq 29ff0 29fdc: e593301c ldr r3, [r3, #28] 29fe0: e3530000 cmp r3, #0 29fe4: 11a00006 movne r0, r6 29fe8: 11a0e00f movne lr, pc 29fec: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 29ff0: eb006992 bl 44640 <__errno> 29ff4: e3a03012 mov r3, #18 29ff8: e5803000 str r3, [r0] 29ffc: e3e05000 mvn r5, #0 2a000: eaffffb6 b 29ee0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 2a004: e59d3024 ldr r3, [sp, #36] ; 0x24 2a008: e3530000 cmp r3, #0 2a00c: 0a000004 beq 2a024 2a010: e593301c ldr r3, [r3, #28] 2a014: e3530000 cmp r3, #0 2a018: 11a00004 movne r0, r4 2a01c: 11a0e00f movne lr, pc 2a020: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 2a024: eb006985 bl 44640 <__errno> 2a028: e5805000 str r5, [r0] 2a02c: e3e05000 mvn r5, #0 2a030: eaffffaa b 29ee0 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 2a034: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 2a038: e3530000 cmp r3, #0 <== NOT EXECUTED 2a03c: 0a000004 beq 2a054 <== NOT EXECUTED 2a040: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a044: e3530000 cmp r3, #0 <== NOT EXECUTED 2a048: 11a00004 movne r0, r4 <== NOT EXECUTED 2a04c: 11a0e00f movne lr, pc <== NOT EXECUTED 2a050: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2a054: eb006979 bl 44640 <__errno> <== NOT EXECUTED 2a058: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2a05c: e5803000 str r3, [r0] <== NOT EXECUTED 2a060: eaffff9d b 29edc <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 2a064: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 2a068: e3530000 cmp r3, #0 <== NOT EXECUTED 2a06c: 0a000006 beq 2a08c <== NOT EXECUTED 2a070: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a074: e3530000 cmp r3, #0 <== NOT EXECUTED 2a078: 0a000003 beq 2a08c <== NOT EXECUTED 2a07c: e1a00004 mov r0, r4 <== NOT EXECUTED 2a080: e1a0e00f mov lr, pc <== NOT EXECUTED 2a084: e12fff13 bx r3 <== NOT EXECUTED 2a088: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 2a08c: e3520000 cmp r2, #0 <== NOT EXECUTED 2a090: 0a000004 beq 2a0a8 <== NOT EXECUTED 2a094: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2a098: e3530000 cmp r3, #0 <== NOT EXECUTED 2a09c: 11a00006 movne r0, r6 <== NOT EXECUTED 2a0a0: 11a0e00f movne lr, pc <== NOT EXECUTED 2a0a4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2a0a8: eb006964 bl 44640 <__errno> <== NOT EXECUTED 2a0ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2a0b0: e5803000 str r3, [r0] <== NOT EXECUTED 2a0b4: e3e05000 mvn r5, #0 <== NOT EXECUTED 2a0b8: eaffff88 b 29ee0 <== NOT EXECUTED =============================================================================== 0001b004 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1b004: e59fc134 ldr ip, [pc, #308] ; 1b140 1b008: e59cc000 ldr ip, [ip] 1b00c: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 1b010: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1b014: 2a00003d bcs 1b110 iop = rtems_libio_iop( fd ); 1b018: e59fc124 ldr ip, [pc, #292] ; 1b144 1b01c: e59c4000 ldr r4, [ip] 1b020: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 1b024: e5940014 ldr r0, [r4, #20] 1b028: e3100c01 tst r0, #256 ; 0x100 1b02c: 0a000037 beq 1b110 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 1b030: e594c03c ldr ip, [r4, #60] ; 0x3c 1b034: e59c0014 ldr r0, [ip, #20] 1b038: e3500000 cmp r0, #0 1b03c: 0a000039 beq 1b128 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 1b040: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 1b044: e284600c add r6, r4, #12 1b048: e8960060 ldm r6, {r5, r6} switch ( whence ) { 1b04c: 0a00002a beq 1b0fc 1b050: e3530002 cmp r3, #2 1b054: 0a00000d beq 1b090 1b058: e3530000 cmp r3, #0 1b05c: 1a00001e bne 1b0dc case SEEK_SET: iop->offset = offset; 1b060: e584100c str r1, [r4, #12] 1b064: e5842010 str r2, [r4, #16] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1b068: e1a00004 mov r0, r4 1b06c: e1a0e00f mov lr, pc 1b070: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 1b074: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1b078: e1a02000 mov r2, r0 1b07c: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 1b080: 0a00000e beq 1b0c0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1b084: e1a01003 mov r1, r3 1b088: e1a00002 mov r0, r2 1b08c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 1b090: e9940180 ldmib r4, {r7, r8} 1b094: e0977001 adds r7, r7, r1 1b098: e0a88002 adc r8, r8, r2 1b09c: e584700c str r7, [r4, #12] 1b0a0: e5848010 str r8, [r4, #16] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1b0a4: e1a00004 mov r0, r4 1b0a8: e1a0e00f mov lr, pc 1b0ac: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 1b0b0: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1b0b4: e1a02000 mov r2, r0 1b0b8: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 1b0bc: 1afffff0 bne 1b084 1b0c0: e3710001 cmn r1, #1 1b0c4: 1affffee bne 1b084 iop->offset = old_offset; 1b0c8: e584500c str r5, [r4, #12] 1b0cc: e5846010 str r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1b0d0: e1a01003 mov r1, r3 1b0d4: e1a00002 mov r0, r2 1b0d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1b0dc: ebffd18c bl f714 <__errno> 1b0e0: e3a03016 mov r3, #22 1b0e4: e5803000 str r3, [r0] 1b0e8: e3e02000 mvn r2, #0 1b0ec: e3e03000 mvn r3, #0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1b0f0: e1a01003 mov r1, r3 1b0f4: e1a00002 mov r0, r2 1b0f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 1b0fc: e0917005 adds r7, r1, r5 1b100: e0a28006 adc r8, r2, r6 1b104: e584700c str r7, [r4, #12] 1b108: e5848010 str r8, [r4, #16] break; 1b10c: eaffffd5 b 1b068 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1b110: ebffd17f bl f714 <__errno> <== NOT EXECUTED 1b114: e3a03009 mov r3, #9 <== NOT EXECUTED 1b118: e5803000 str r3, [r0] <== NOT EXECUTED 1b11c: e3e02000 mvn r2, #0 <== NOT EXECUTED 1b120: e3e03000 mvn r3, #0 <== NOT EXECUTED 1b124: eaffffd6 b 1b084 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1b128: ebffd179 bl f714 <__errno> <== NOT EXECUTED 1b12c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1b130: e5803000 str r3, [r0] <== NOT EXECUTED 1b134: e3e02000 mvn r2, #0 <== NOT EXECUTED 1b138: e3e03000 mvn r3, #0 <== NOT EXECUTED 1b13c: eaffffd0 b 1b084 <== NOT EXECUTED =============================================================================== 0002a220 : int _STAT_NAME( const char *path, struct stat *buf ) { 2a220: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2a224: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 2a228: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 2a22c: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2a230: 0a00002f beq 2a2f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 2a234: eb00840f bl 4b278 <== NOT EXECUTED 2a238: e28d4004 add r4, sp, #4 <== NOT EXECUTED 2a23c: e3a0c000 mov ip, #0 <== NOT EXECUTED 2a240: e1a01000 mov r1, r0 <== NOT EXECUTED 2a244: e1a0200c mov r2, ip <== NOT EXECUTED 2a248: e1a00006 mov r0, r6 <== NOT EXECUTED 2a24c: e1a03004 mov r3, r4 <== NOT EXECUTED 2a250: e58dc000 str ip, [sp] <== NOT EXECUTED 2a254: ebff76a3 bl 7ce8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2a258: e2501000 subs r1, r0, #0 <== NOT EXECUTED 2a25c: 1a000022 bne 2a2ec <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 2a260: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 2a264: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2a268: e3530000 cmp r3, #0 <== NOT EXECUTED 2a26c: 0a000013 beq 2a2c0 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 2a270: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 2a274: e1a00005 mov r0, r5 <== NOT EXECUTED 2a278: eb007627 bl 47b1c <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 2a27c: e1a01005 mov r1, r5 <== NOT EXECUTED 2a280: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 2a284: e1a00004 mov r0, r4 <== NOT EXECUTED 2a288: e1a0e00f mov lr, pc <== NOT EXECUTED 2a28c: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2a290: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2a294: e3530000 cmp r3, #0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 2a298: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2a29c: 0a000004 beq 2a2b4 <== NOT EXECUTED 2a2a0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a2a4: e3530000 cmp r3, #0 <== NOT EXECUTED 2a2a8: 11a00004 movne r0, r4 <== NOT EXECUTED 2a2ac: 11a0e00f movne lr, pc <== NOT EXECUTED 2a2b0: 112fff13 bxne r3 <== NOT EXECUTED return status; } 2a2b4: e1a00005 mov r0, r5 <== NOT EXECUTED 2a2b8: e28dd018 add sp, sp, #24 <== NOT EXECUTED 2a2bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 2a2c0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2a2c4: e3530000 cmp r3, #0 <== NOT EXECUTED 2a2c8: 0a000004 beq 2a2e0 <== NOT EXECUTED 2a2cc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a2d0: e3530000 cmp r3, #0 <== NOT EXECUTED 2a2d4: 11a00004 movne r0, r4 <== NOT EXECUTED 2a2d8: 11a0e00f movne lr, pc <== NOT EXECUTED 2a2dc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2a2e0: eb0068d6 bl 44640 <__errno> <== NOT EXECUTED 2a2e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2a2e8: e5803000 str r3, [r0] <== NOT EXECUTED 2a2ec: e3e05000 mvn r5, #0 <== NOT EXECUTED 2a2f0: eaffffef b 2a2b4 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 2a2f4: eb0068d1 bl 44640 <__errno> <== NOT EXECUTED 2a2f8: e3a0300e mov r3, #14 <== NOT EXECUTED 2a2fc: e5803000 str r3, [r0] <== NOT EXECUTED 2a300: e3e05000 mvn r5, #0 <== NOT EXECUTED 2a304: eaffffea b 2a2b4 <== NOT EXECUTED =============================================================================== 0000240c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 240c: e59f30dc ldr r3, [pc, #220] ; 24f0 2410: e5932004 ldr r2, [r3, #4] 2414: e2822001 add r2, r2, #1 2418: e92d4070 push {r4, r5, r6, lr} 241c: e5832004 str r2, [r3, #4] 2420: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2424: ebffffb3 bl 22f8 /* * Validate the parameters */ if ( !size ) 2428: e3540000 cmp r4, #0 242c: 0a00001f beq 24b0 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2430: e59f30bc ldr r3, [pc, #188] ; 24f4 2434: e5933000 ldr r3, [r3] 2438: e3530003 cmp r3, #3 243c: 0a000018 beq 24a4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 2440: e59f30b0 ldr r3, [pc, #176] ; 24f8 2444: e3a02000 mov r2, #0 2448: e5930000 ldr r0, [r3] 244c: e1a01004 mov r1, r4 2450: e1a03002 mov r3, r2 2454: eb001377 bl 7238 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 2458: e2506000 subs r6, r0, #0 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 245c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 2460: 0a000015 beq 24bc } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2464: e59f3090 ldr r3, [pc, #144] ; 24fc 2468: e5933000 ldr r3, [r3] 246c: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 2470: 11a01004 movne r1, r4 2474: 11a00005 movne r0, r5 2478: 11a0e00f movne lr, pc 247c: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2480: e59f3078 ldr r3, [pc, #120] ; 2500 2484: e5933000 ldr r3, [r3] 2488: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 248c: 11a00005 movne r0, r5 2490: 11a0e00f movne lr, pc 2494: 1593f004 ldrne pc, [r3, #4] 2498: e1a06005 mov r6, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 249c: e1a00006 mov r0, r6 24a0: e8bd8070 pop {r4, r5, r6, pc} return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 24a4: ebffff7c bl 229c 24a8: e3500000 cmp r0, #0 24ac: 1affffe3 bne 2440 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 24b0: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 24b4: e1a00006 mov r0, r6 <== NOT EXECUTED 24b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 24bc: e59f3040 ldr r3, [pc, #64] ; 2504 24c0: e5933000 ldr r3, [r3] 24c4: e3530000 cmp r3, #0 24c8: 0a000004 beq 24e0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 24cc: e1a00004 mov r0, r4 <== NOT EXECUTED 24d0: e1a0e00f mov lr, pc <== NOT EXECUTED 24d4: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 24d8: e2505000 subs r5, r0, #0 <== NOT EXECUTED 24dc: 1affffe0 bne 2464 <== NOT EXECUTED errno = ENOMEM; 24e0: eb00348b bl f714 <__errno> 24e4: e3a0300c mov r3, #12 24e8: e5803000 str r3, [r0] return (void *) 0; 24ec: eaffffea b 249c =============================================================================== 000022e8 : } void malloc_deferred_free( void *pointer ) { 22e8: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 22ec: e59f0000 ldr r0, [pc, #0] ; 22f4 <== NOT EXECUTED 22f0: ea000f84 b 6108 <_Chain_Append> <== NOT EXECUTED =============================================================================== 000022f8 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 22f8: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 22fc: ea000000 b 2304 free(to_be_freed); 2300: ebffff68 bl 20a8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 2304: e59f000c ldr r0, [pc, #12] ; 2318 2308: eb000f92 bl 6158 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 230c: e3500000 cmp r0, #0 2310: 1afffffa bne 2300 free(to_be_freed); } 2314: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000d058 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { d058: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); d05c: e2504000 subs r4, r0, #0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { d060: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( block_table ); d064: 0a000014 beq d0bc * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i d074: e3a05000 mov r5, #0 d078: e1a06005 mov r6, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; d07c: e1a0a005 mov sl, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); d08c: ebffff50 bl cdd4 b[i] = 0; d090: e787a005 str sl, [r7, r5] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i d0a4: e5947000 ldr r7, [r4] /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); d0a8: e1a00007 mov r0, r7 d0ac: ebffff48 bl cdd4 *block_table = 0; d0b0: e3a03000 mov r3, #0 d0b4: e5843000 str r3, [r4] } d0b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); d0bc: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED d0c0: e2811003 add r1, r1, #3 <== NOT EXECUTED d0c4: e59f0008 ldr r0, [pc, #8] ; d0d4 <== NOT EXECUTED d0c8: e59f2008 ldr r2, [pc, #8] ; d0d8 <== NOT EXECUTED d0cc: e59f3008 ldr r3, [pc, #8] ; d0dc <== NOT EXECUTED d0d0: ebfff70f bl ad14 <__assert_func> <== NOT EXECUTED =============================================================================== 0000d5b0 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { d5b0: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d5b4: e5904038 ldr r4, [r0, #56] ; 0x38 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) d5b8: e5943054 ldr r3, [r4, #84] ; 0x54 d5bc: e1530002 cmp r3, r2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { d5c0: e24dd008 sub sp, sp, #8 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) d5c4: ba00000e blt d604 d5c8: 0a00000a beq d5f8 * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; d5cc: e5841050 str r1, [r4, #80] ; 0x50 d5d0: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; d5d4: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); d5d8: e3a01000 mov r1, #0 d5dc: e1a0000d mov r0, sp d5e0: ebffd2d9 bl 214c d5e4: e59d3000 ldr r3, [sp] d5e8: e5843040 str r3, [r4, #64] ; 0x40 d5ec: e3a00000 mov r0, #0 return 0; } d5f0: e28dd008 add sp, sp, #8 d5f4: e8bd8010 pop {r4, pc} * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) d5f8: e5943050 ldr r3, [r4, #80] ; 0x50 d5fc: e1530001 cmp r3, r1 d600: 2afffff1 bcs d5cc return IMFS_memfile_extend( the_jnode, length ); d604: e1a00004 mov r0, r4 <== NOT EXECUTED d608: ebffff87 bl d42c <== NOT EXECUTED d60c: eafffff7 b d5f0 <== NOT EXECUTED =============================================================================== 0000d610 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { d610: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d614: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { d618: e595304c ldr r3, [r5, #76] ; 0x4c d61c: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { d620: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { d624: 0a00000d beq d660 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) d628: e1a00005 mov r0, r5 d62c: e284200c add r2, r4, #12 d630: e8920006 ldm r2, {r1, r2} d634: ebffff7c bl d42c d638: e3500000 cmp r0, #0 d63c: 1a00001a bne d6ac rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; d640: e2853050 add r3, r5, #80 ; 0x50 d644: e893000c ldm r3, {r2, r3} d648: e984000c stmib r4, {r2, r3} d64c: e284300c add r3, r4, #12 d650: e893000c ldm r3, {r2, r3} } return iop->offset; } d654: e1a01003 mov r1, r3 d658: e1a00002 mov r0, r2 d65c: e8bd8030 pop {r4, r5, pc} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) d660: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED d664: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED d668: e893000c ldm r3, {r2, r3} <== NOT EXECUTED d66c: e1510003 cmp r1, r3 <== NOT EXECUTED d670: e590000c ldr r0, [r0, #12] <== NOT EXECUTED d674: ca000007 bgt d698 <== NOT EXECUTED d678: 0a000004 beq d690 <== NOT EXECUTED d67c: e1a02000 mov r2, r0 <== NOT EXECUTED d680: e1a03001 mov r3, r1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } d684: e1a01003 mov r1, r3 <== NOT EXECUTED d688: e1a00002 mov r0, r2 <== NOT EXECUTED d68c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) d690: e1500002 cmp r0, r2 <== NOT EXECUTED d694: 9afffff8 bls d67c <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; d698: e584200c str r2, [r4, #12] <== NOT EXECUTED d69c: e5843010 str r3, [r4, #16] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } d6a0: e1a01003 mov r1, r3 <== NOT EXECUTED d6a4: e1a00002 mov r0, r2 <== NOT EXECUTED d6a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); d6ac: eb000818 bl f714 <__errno> <== NOT EXECUTED d6b0: e3a0301c mov r3, #28 <== NOT EXECUTED d6b4: e5803000 str r3, [r0] <== NOT EXECUTED d6b8: e3e02000 mvn r2, #0 <== NOT EXECUTED d6bc: e3e03000 mvn r3, #0 <== NOT EXECUTED d6c0: eaffffe3 b d654 <== NOT EXECUTED =============================================================================== 0000d988 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { d988: e92d4830 push {r4, r5, fp, lr} the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) d98c: e5903014 ldr r3, [r0, #20] d990: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { d994: e24dd004 sub sp, sp, #4 d998: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d99c: e5905038 ldr r5, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) d9a0: 0a000002 beq d9b0 && (the_jnode->type == IMFS_LINEAR_FILE)) { d9a4: e595204c ldr r2, [r5, #76] ; 0x4c d9a8: e3520006 cmp r2, #6 d9ac: 0a00000b beq d9e0 the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) d9b0: e5952050 ldr r2, [r5, #80] ; 0x50 d9b4: e5951054 ldr r1, [r5, #84] ; 0x54 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) d9b8: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; d9bc: 1584200c strne r2, [r4, #12] d9c0: 15841010 strne r1, [r4, #16] d9c4: 15951054 ldrne r1, [r5, #84] ; 0x54 d9c8: 15952050 ldrne r2, [r5, #80] ; 0x50 iop->size = the_jnode->info.file.size; d9cc: e5841008 str r1, [r4, #8] d9d0: e5842004 str r2, [r4, #4] d9d4: e3a00000 mov r0, #0 return 0; } d9d8: e28dd004 add sp, sp, #4 d9dc: e8bd8830 pop {r4, r5, fp, pc} /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; d9e0: e595c050 ldr ip, [r5, #80] ; 0x50 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; d9e4: e3a00000 mov r0, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; d9e8: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; d9ec: e3a01000 mov r1, #0 <== NOT EXECUTED d9f0: e3a02000 mov r2, #0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) d9f4: e35c0000 cmp ip, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; d9f8: e585304c str r3, [r5, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; d9fc: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; da00: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; da04: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED da08: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; da0c: e585005c str r0, [r5, #92] ; 0x5c <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; da10: e5850058 str r0, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) da14: 1a000004 bne da2c <== NOT EXECUTED da18: e1a0b001 mov fp, r1 <== NOT EXECUTED da1c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED da20: e1a01002 mov r1, r2 <== NOT EXECUTED da24: e1a0200b mov r2, fp <== NOT EXECUTED da28: eaffffe2 b d9b8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) da2c: e1a00005 mov r0, r5 <== NOT EXECUTED da30: e58dc000 str ip, [sp] <== NOT EXECUTED da34: ebffff22 bl d6c4 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) da38: e3700001 cmn r0, #1 <== NOT EXECUTED da3c: 0affffe5 beq d9d8 <== NOT EXECUTED da40: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED da44: eaffffd9 b d9b0 <== NOT EXECUTED =============================================================================== 00002518 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2518: e92d41f0 push {r4, r5, r6, r7, r8, lr} 251c: e1a06001 mov r6, r1 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2520: e2011a0f and r1, r1, #61440 ; 0xf000 2524: e3510901 cmp r1, #16384 ; 0x4000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2528: e24dd020 sub sp, sp, #32 252c: e1a05000 mov r5, r0 2530: e1a07002 mov r7, r2 2534: e1a08003 mov r8, r3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2538: 0a00000d beq 2574 253c: 9a000008 bls 2564 2540: e3510a06 cmp r1, #24576 ; 0x6000 2544: 0a00000a beq 2574 2548: e3510902 cmp r1, #32768 ; 0x8000 254c: 0a000008 beq 2574 case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2550: eb00346f bl f714 <__errno> <== NOT EXECUTED 2554: e3a03016 mov r3, #22 <== NOT EXECUTED 2558: e5803000 str r3, [r0] <== NOT EXECUTED 255c: e3e05000 mvn r5, #0 <== NOT EXECUTED 2560: ea000028 b 2608 <== NOT EXECUTED int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2564: e3510a01 cmp r1, #4096 ; 0x1000 2568: 0a000001 beq 2574 256c: e3510a02 cmp r1, #8192 ; 0x2000 2570: 1afffff6 bne 2550 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 2574: e28d4004 add r4, sp, #4 2578: e1a00005 mov r0, r5 257c: e28d101c add r1, sp, #28 2580: e1a02004 mov r2, r4 2584: eb000289 bl 2fb0 if ( !temp_loc.ops->evalformake_h ) { 2588: e59d3010 ldr r3, [sp, #16] 258c: e5933004 ldr r3, [r3, #4] 2590: e3530000 cmp r3, #0 2594: 0a000023 beq 2628 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 2598: e59d001c ldr r0, [sp, #28] 259c: e1a01004 mov r1, r4 25a0: e0850000 add r0, r5, r0 25a4: e28d2018 add r2, sp, #24 25a8: e1a0e00f mov lr, pc 25ac: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 25b0: e3500000 cmp r0, #0 25b4: 1a00001e bne 2634 return -1; if ( !temp_loc.ops->mknod_h ) { 25b8: e59d3010 ldr r3, [sp, #16] 25bc: e593c014 ldr ip, [r3, #20] 25c0: e35c0000 cmp ip, #0 25c4: 0a000012 beq 2614 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 25c8: e1a03008 mov r3, r8 25cc: e58d4000 str r4, [sp] 25d0: e59d0018 ldr r0, [sp, #24] 25d4: e1a01006 mov r1, r6 25d8: e1a02007 mov r2, r7 25dc: e1a0e00f mov lr, pc 25e0: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 25e4: e59d3010 ldr r3, [sp, #16] 25e8: e3530000 cmp r3, #0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 25ec: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 25f0: 0a000004 beq 2608 25f4: e593301c ldr r3, [r3, #28] 25f8: e3530000 cmp r3, #0 25fc: 11a00004 movne r0, r4 2600: 11a0e00f movne lr, pc 2604: 112fff13 bxne r3 return result; } 2608: e1a00005 mov r0, r5 260c: e28dd020 add sp, sp, #32 2610: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 2614: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2618: e3530000 cmp r3, #0 <== NOT EXECUTED 261c: 11a00004 movne r0, r4 <== NOT EXECUTED 2620: 11a0e00f movne lr, pc <== NOT EXECUTED 2624: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2628: eb003439 bl f714 <__errno> <== NOT EXECUTED 262c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2630: e5803000 str r3, [r0] <== NOT EXECUTED 2634: e3e05000 mvn r5, #0 2638: eafffff2 b 2608 =============================================================================== 000026c8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 26c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 26cc: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 26d0: e24dd028 sub sp, sp, #40 ; 0x28 26d4: e58d3004 str r3, [sp, #4] 26d8: e1a08000 mov r8, r0 26dc: e1a07001 mov r7, r1 26e0: e1a0a002 mov sl, r2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 26e4: 8a00009e bhi 2964 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 26e8: e1a00002 mov r0, r2 26ec: eb00232b bl b3a0 if ( !mount_h ) 26f0: e3500000 cmp r0, #0 26f4: e58d000c str r0, [sp, #12] 26f8: 0a000099 beq 2964 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 26fc: e2575000 subs r5, r7, #0 2700: 13a05001 movne r5, #1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2704: e3550000 cmp r5, #0 2708: 0a000090 beq 2950 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 270c: e1a00007 mov r0, r7 2710: e58d7010 str r7, [sp, #16] 2714: eb003803 bl 10728 2718: e58d0008 str r0, [sp, #8] const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 271c: e1a0000a mov r0, sl 2720: eb003800 bl 10728 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2724: e3580000 cmp r8, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2728: e2806001 add r6, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 272c: 01a0b008 moveq fp, r8 2730: 0a000002 beq 2740 2734: e1a00008 mov r0, r8 2738: eb0037fa bl 10728 273c: e280b001 add fp, r0, #1 size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2740: e59d3008 ldr r3, [sp, #8] 2744: e2831075 add r1, r3, #117 ; 0x75 2748: e0811006 add r1, r1, r6 274c: e081100b add r1, r1, fp 2750: e3a00001 mov r0, #1 2754: ebfffdbd bl 1e50 if ( mt_entry != NULL ) { 2758: e2504000 subs r4, r0, #0 275c: 0a000076 beq 293c char *str = (char *) mt_entry + sizeof( *mt_entry ); 2760: e2849074 add r9, r4, #116 ; 0x74 strcpy( str, filesystemtype ); 2764: e1a0100a mov r1, sl 2768: e1a00009 mov r0, r9 276c: eb00379d bl 105e8 mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 2770: e3580000 cmp r8, #0 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; str += filesystemtype_size; 2774: e0896006 add r6, r9, r6 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 2778: e584906c str r9, [r4, #108] ; 0x6c str += filesystemtype_size; if ( source_or_null != NULL ) { 277c: 0a000004 beq 2794 strcpy( str, source_or_null ); 2780: e1a00006 mov r0, r6 2784: e1a01008 mov r1, r8 2788: eb003796 bl 105e8 mt_entry->dev = str; 278c: e5846070 str r6, [r4, #112] ; 0x70 str += source_size; 2790: e086600b add r6, r6, fp } strcpy( str, target ); 2794: e59d1010 ldr r1, [sp, #16] 2798: e1a00006 mov r0, r6 279c: eb003791 bl 105e8 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 27a0: e59fe24c ldr lr, [pc, #588] ; 29f4 27a4: e8be000f ldm lr!, {r0, r1, r2, r3} 27a8: e284c038 add ip, r4, #56 ; 0x38 27ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 27b0: e8be000f ldm lr!, {r0, r1, r2, r3} 27b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 27b8: e89e000f ldm lr, {r0, r1, r2, r3} 27bc: e88c000f stm ip, {r0, r1, r2, r3} ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 27c0: e59d3004 ldr r3, [sp, #4] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 27c4: e3550000 cmp r5, #0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 27c8: e5846068 str r6, [r4, #104] ; 0x68 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 27cc: e5843030 str r3, [r4, #48] ; 0x30 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 27d0: e584402c str r4, [r4, #44] ; 0x2c /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 27d4: 1a000023 bne 2868 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 27d8: e59f3218 ldr r3, [pc, #536] ; 29f8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 27dc: e5932000 ldr r2, [r3] 27e0: e2833004 add r3, r3, #4 27e4: e1520003 cmp r2, r3 27e8: 01a06005 moveq r6, r5 27ec: 1a00006d bne 29a8 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 27f0: e59d104c ldr r1, [sp, #76] ; 0x4c 27f4: e1a00004 mov r0, r4 27f8: e59d300c ldr r3, [sp, #12] 27fc: e1a0e00f mov lr, pc 2800: e12fff13 bx r3 2804: e2507000 subs r7, r0, #0 2808: 1a00005a bne 2978 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 280c: e59f61e8 ldr r6, [pc, #488] ; 29fc 2810: e1a02007 mov r2, r7 2814: e1a01007 mov r1, r7 2818: e5960000 ldr r0, [r6] 281c: eb000be2 bl 57ac RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2820: e1a01004 mov r1, r4 2824: e59f01cc ldr r0, [pc, #460] ; 29f8 2828: eb000e36 bl 6108 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 282c: e5960000 ldr r0, [r6] 2830: eb000c25 bl 58cc */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2834: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; 2838: 059f31c0 ldreq r3, [pc, #448] ; 2a00 283c: 0284401c addeq r4, r4, #28 2840: 0593c000 ldreq ip, [r3] 2844: 08b4000f ldmeq r4!, {r0, r1, r2, r3} 2848: 028cc018 addeq ip, ip, #24 284c: 08ac000f stmiaeq ip!, {r0, r1, r2, r3} 2850: 05943000 ldreq r3, [r4] 2854: 058c3000 streq r3, [ip] */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2858: 11a00007 movne r0, r7 rtems_filesystem_root = mt_entry->mt_fs_root; 285c: 01a00005 moveq r0, r5 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 2860: e28dd028 add sp, sp, #40 ; 0x28 2864: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 2868: e28d6014 add r6, sp, #20 286c: e3a0c001 mov ip, #1 2870: e1a00007 mov r0, r7 2874: e59d1008 ldr r1, [sp, #8] 2878: e3a02007 mov r2, #7 287c: e1a03006 mov r3, r6 2880: e58dc000 str ip, [sp] 2884: ebfffde5 bl 2020 2888: e3700001 cmn r0, #1 288c: 0a000048 beq 29b4 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 2890: e59d3020 ldr r3, [sp, #32] 2894: e5933010 ldr r3, [r3, #16] 2898: e3530000 cmp r3, #0 289c: 0a000050 beq 29e4 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 28a0: e1a00006 mov r0, r6 28a4: e1a0e00f mov lr, pc 28a8: e12fff13 bx r3 28ac: e3500001 cmp r0, #1 28b0: 1a000043 bne 29c4 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 28b4: e59f0148 ldr r0, [pc, #328] ; 2a04 28b8: e59d1014 ldr r1, [sp, #20] 28bc: ebffff63 bl 2650 28c0: e3500000 cmp r0, #0 28c4: 1a000042 bne 29d4 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 28c8: e59d1014 ldr r1, [sp, #20] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 28cc: e59d2020 ldr r2, [sp, #32] * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 28d0: e5841008 str r1, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 28d4: e59d101c ldr r1, [sp, #28] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 28d8: e5923020 ldr r3, [r2, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 28dc: e5841010 str r1, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 28e0: e59d1024 ldr r1, [sp, #36] ; 0x24 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 28e4: e3530000 cmp r3, #0 */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 28e8: e5841018 str r1, [r4, #24] * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 28ec: e5842014 str r2, [r4, #20] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 28f0: 0a00003b beq 29e4 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 28f4: e1a00004 mov r0, r4 28f8: e1a0e00f mov lr, pc 28fc: e12fff13 bx r3 2900: e3500000 cmp r0, #0 2904: 0affffb9 beq 27f0 return 0; cleanup_and_bail: free( mt_entry ); 2908: e1a00004 mov r0, r4 290c: ebfffde5 bl 20a8 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 2910: e596300c ldr r3, [r6, #12] 2914: e3530000 cmp r3, #0 2918: 0a000020 beq 29a0 291c: e593301c ldr r3, [r3, #28] 2920: e3530000 cmp r3, #0 2924: 0a00001d beq 29a0 2928: e1a00006 mov r0, r6 292c: e1a0e00f mov lr, pc 2930: e12fff13 bx r3 2934: e3e00000 mvn r0, #0 2938: eaffffc8 b 2860 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 293c: eb003374 bl f714 <__errno> <== NOT EXECUTED 2940: e3a0300c mov r3, #12 <== NOT EXECUTED 2944: e5803000 str r3, [r0] <== NOT EXECUTED 2948: e3e00000 mvn r0, #0 <== NOT EXECUTED 294c: eaffffc3 b 2860 <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2950: e3a03001 mov r3, #1 2954: e58d3008 str r3, [sp, #8] 2958: e59f30a8 ldr r3, [pc, #168] ; 2a08 295c: e58d3010 str r3, [sp, #16] 2960: eaffff6d b 271c /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 2964: eb00336a bl f714 <__errno> 2968: e3a03016 mov r3, #22 296c: e5803000 str r3, [r0] 2970: e3e00000 mvn r0, #0 2974: eaffffb9 b 2860 if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 2978: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 297c: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 2980: e3530000 cmp r3, #0 <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 2984: 11a00004 movne r0, r4 <== NOT EXECUTED 2988: 11a0e00f movne lr, pc <== NOT EXECUTED 298c: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2990: e1a00004 mov r0, r4 <== NOT EXECUTED 2994: ebfffdc3 bl 20a8 <== NOT EXECUTED if ( loc_to_free ) 2998: e3560000 cmp r6, #0 <== NOT EXECUTED 299c: 1affffdb bne 2910 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 29a0: e3e00000 mvn r0, #0 <== NOT EXECUTED 29a4: eaffffad b 2860 <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 29a8: eb003359 bl f714 <__errno> <== NOT EXECUTED 29ac: e3a03016 mov r3, #22 <== NOT EXECUTED 29b0: e5803000 str r3, [r0] <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 29b4: e1a00004 mov r0, r4 <== NOT EXECUTED 29b8: ebfffdba bl 20a8 <== NOT EXECUTED 29bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 29c0: eaffffa6 b 2860 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 29c4: eb003352 bl f714 <__errno> 29c8: e3a03014 mov r3, #20 29cc: e5803000 str r3, [r0] goto cleanup_and_bail; 29d0: eaffffcc b 2908 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 29d4: eb00334e bl f714 <__errno> 29d8: e3a03010 mov r3, #16 29dc: e5803000 str r3, [r0] goto cleanup_and_bail; 29e0: eaffffc8 b 2908 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 29e4: eb00334a bl f714 <__errno> <== NOT EXECUTED 29e8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 29ec: e5803000 str r3, [r0] <== NOT EXECUTED goto cleanup_and_bail; 29f0: eaffffc4 b 2908 <== NOT EXECUTED =============================================================================== 0003699c : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 3699c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 369a0: e24dd0ac sub sp, sp, #172 ; 0xac <== NOT EXECUTED 369a4: e1a06000 mov r6, r0 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 369a8: e28d5074 add r5, sp, #116 ; 0x74 <== NOT EXECUTED mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 369ac: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 369b0: e3a04000 mov r4, #0 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 369b4: e285c008 add ip, r5, #8 <== NOT EXECUTED mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 369b8: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 369bc: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 369c0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 369c4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 369c8: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 369cc: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 369d0: e58d4074 str r4, [sp, #116] ; 0x74 <== NOT EXECUTED 369d4: e58c4000 str r4, [ip] <== NOT EXECUTED 369d8: e58d4078 str r4, [sp, #120] ; 0x78 <== NOT EXECUTED msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 369dc: e1a08003 mov r8, r3 <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 369e0: e3e03000 mvn r3, #0 <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 369e4: e58d30a0 str r3, [sp, #160] ; 0xa0 <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 369e8: e58d309c str r3, [sp, #156] ; 0x9c <== NOT EXECUTED uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 369ec: e28d9014 add r9, sp, #20 <== NOT EXECUTED const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 369f0: e5963000 ldr r3, [r6] <== NOT EXECUTED mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 369f4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 369f8: e1a07002 mov r7, r2 <== NOT EXECUTED 369fc: e1a0a001 mov sl, r1 <== NOT EXECUTED uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 36a00: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED 36a04: e1a01004 mov r1, r4 <== NOT EXECUTED 36a08: e1a00009 mov r0, r9 <== NOT EXECUTED const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 36a0c: e58d300c str r3, [sp, #12] <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 36a10: e58d40a4 str r4, [sp, #164] ; 0xa4 <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 36a14: e1cd4aba strh r4, [sp, #170] ; 0xaa <== NOT EXECUTED uint16_t date = 0; 36a18: e1cd4ab8 strh r4, [sp, #168] ; 0xa8 <== NOT EXECUTED static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 36a1c: e58d4094 str r4, [sp, #148] ; 0x94 <== NOT EXECUTED dir_pos->sname.ofs = 0; 36a20: e58d4098 str r4, [sp, #152] ; 0x98 <== NOT EXECUTED uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 36a24: eb00443c bl 47b1c <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 36a28: e1a01008 mov r1, r8 <== NOT EXECUTED 36a2c: e1a02005 mov r2, r5 <== NOT EXECUTED 36a30: e3a0300b mov r3, #11 <== NOT EXECUTED 36a34: e1a00007 mov r0, r7 <== NOT EXECUTED 36a38: eb000811 bl 38a84 <== NOT EXECUTED 36a3c: e1a0b000 mov fp, r0 <== NOT EXECUTED /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 36a40: e1a00004 mov r0, r4 <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 36a44: e5cd4080 strb r4, [sp, #128] ; 0x80 <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 36a48: eb00667f bl 5044c