=============================================================================== 00009c28 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 9c28: e5903000 ldr r3, [r0] 9c2c: 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; 9c30: e5902010 ldr r2, [r0, #16] switch( node->type ) { 9c34: 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; 9c38: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 9c3c: e3530006 cmp r3, #6 9c40: 979ff103 ldrls pc, [pc, r3, lsl #2] 9c44: ea000008 b 9c6c <== NOT EXECUTED 9c48: 00009c94 .word 0x00009c94 <== NOT EXECUTED 9c4c: 00009ca4 .word 0x00009ca4 <== NOT EXECUTED 9c50: 00009c84 .word 0x00009c84 <== NOT EXECUTED 9c54: 00009c84 .word 0x00009c84 <== NOT EXECUTED 9c58: 00009c74 .word 0x00009c74 <== NOT EXECUTED 9c5c: 00009c74 .word 0x00009c74 <== NOT EXECUTED 9c60: 00009c64 .word 0x00009c64 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 9c64: e59f3048 ldr r3, [pc, #72] ; 9cb4 9c68: e5803008 str r3, [r0, #8] break; } return 0; } 9c6c: e3a00000 mov r0, #0 9c70: 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; 9c74: e5923008 ldr r3, [r2, #8] 9c78: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9c7c: e3a00000 mov r0, #0 9c80: 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; 9c84: e59f302c ldr r3, [pc, #44] ; 9cb8 9c88: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9c8c: e3a00000 mov r0, #0 9c90: 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; 9c94: e592300c ldr r3, [r2, #12] 9c98: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9c9c: e3a00000 mov r0, #0 9ca0: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 9ca4: e59f3010 ldr r3, [pc, #16] ; 9cbc 9ca8: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 9cac: e3a00000 mov r0, #0 9cb0: e12fff1e bx lr =============================================================================== 00009ae0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 9ae0: 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 ) 9ae4: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 9ae8: e1a05001 mov r5, r1 9aec: e59d6014 ldr r6, [sp, #20] 9af0: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 9af4: 01a07004 moveq r7, r4 9af8: 1a000001 bne 9b04 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 9afc: e1a00007 mov r0, r7 <== NOT EXECUTED 9b00: 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 ); 9b04: e59f210c ldr r2, [pc, #268] ; 9c18 9b08: e5922000 ldr r2, [r2] 9b0c: e592202c ldr r2, [r2, #44] ; 0x2c 9b10: e1a00005 mov r0, r5 9b14: e1c32002 bic r2, r3, r2 9b18: ebffffc1 bl 9a24 if ( !node ) 9b1c: e2507000 subs r7, r0, #0 9b20: 0afffff5 beq 9afc return NULL; /* * Set the type specific information */ switch (type) { 9b24: e2455001 sub r5, r5, #1 9b28: e3550006 cmp r5, #6 9b2c: 979ff105 ldrls pc, [pc, r5, lsl #2] 9b30: ea000033 b 9c04 <== NOT EXECUTED 9b34: 00009be8 .word 0x00009be8 <== NOT EXECUTED 9b38: 00009bd4 .word 0x00009bd4 <== NOT EXECUTED 9b3c: 00009b50 .word 0x00009b50 <== NOT EXECUTED 9b40: 00009b50 .word 0x00009b50 <== NOT EXECUTED 9b44: 00009ba4 .word 0x00009ba4 <== NOT EXECUTED 9b48: 00009b8c .word 0x00009b8c <== NOT EXECUTED 9b4c: 00009bc8 .word 0x00009bc8 <== 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; 9b50: e5963000 ldr r3, [r6] 9b54: 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; 9b58: e5943010 ldr r3, [r4, #16] 9b5c: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 9b60: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 9b64: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 9b68: e2833001 add r3, r3, #1 9b6c: 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; 9b70: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; 9b74: e5873038 str r3, [r7, #56] ; 0x38 9b78: e2800050 add r0, r0, #80 ; 0x50 9b7c: e1a01007 mov r1, r7 9b80: ebfff14d bl 60bc <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 9b84: e1a00007 mov r0, r7 9b88: 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; 9b8c: e3a03000 mov r3, #0 <== NOT EXECUTED 9b90: e3a02000 mov r2, #0 <== NOT EXECUTED 9b94: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 9b98: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; 9b9c: e3a03000 mov r3, #0 <== NOT EXECUTED 9ba0: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9ba4: 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; 9ba8: e3a01000 mov r1, #0 9bac: e3a02000 mov r2, #0 9bb0: e5871050 str r1, [r7, #80] ; 0x50 9bb4: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 9bb8: 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; 9bbc: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; 9bc0: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; 9bc4: eaffffe3 b 9b58 case IMFS_FIFO: node->info.fifo.pipe = NULL; 9bc8: e3a03000 mov r3, #0 9bcc: e5873050 str r3, [r7, #80] ; 0x50 break; 9bd0: eaffffe0 b 9b58 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; 9bd4: 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; 9bd8: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; 9bdc: 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; 9be0: e5873050 str r3, [r7, #80] ; 0x50 node->info.device.minor = info->device.minor; break; 9be4: eaffffdb b 9b58 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9be8: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 9bec: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9bf0: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; 9bf4: e3a02000 mov r2, #0 9bf8: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); 9bfc: e5873058 str r3, [r7, #88] ; 0x58 9c00: eaffffd4 b 9b58 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 9c04: e59f0010 ldr r0, [pc, #16] ; 9c1c <== NOT EXECUTED 9c08: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 9c0c: e59f200c ldr r2, [pc, #12] ; 9c20 <== NOT EXECUTED 9c10: e59f300c ldr r3, [pc, #12] ; 9c24 <== NOT EXECUTED 9c14: eb0003ce bl ab54 <__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: eb003dda bl 136f0 !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 =============================================================================== 00009e20 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9e20: 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 ) ) { 9e24: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9e28: e24dd02c sub sp, sp, #44 ; 0x2c 9e2c: e58d2000 str r2, [sp] 9e30: e1a0a000 mov sl, r0 9e34: e1a04001 mov r4, r1 9e38: 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 ) ) { 9e3c: 1a0000b8 bne a124 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9e40: e5936000 ldr r6, [r3] 9e44: e28d8004 add r8, sp, #4 9e48: 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 ); 9e4c: e1a02008 mov r2, r8 9e50: e1a03009 mov r3, r9 9e54: e08a0005 add r0, sl, r5 9e58: e1a01004 mov r1, r4 9e5c: eb00029d bl a8d8 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 9e60: e5973000 ldr r3, [r7] 9e64: 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 ); 9e68: e1a0b000 mov fp, r0 pathnamelen -= len; 9e6c: e59d2028 ldr r2, [sp, #40] ; 0x28 i += len; if ( !pathloc->node_access ) 9e70: 0a000078 beq a058 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 9e74: 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; 9e78: 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; 9e7c: 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 ) 9e80: 1a00000f bne 9ec4 * 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 ) { 9e84: e593204c ldr r2, [r3, #76] ; 0x4c 9e88: e3520001 cmp r2, #1 9e8c: 0a000076 beq a06c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9e90: e1a00007 mov r0, r7 9e94: ebffff63 bl 9c28 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9e98: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9e9c: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9ea0: e1a00007 mov r0, r7 9ea4: ebffff85 bl 9cc0 9ea8: e3500000 cmp r0, #0 9eac: 1a000036 bne 9f8c rtems_set_errno_and_return_minus_one( EACCES ); 9eb0: eb001102 bl e2c0 <__errno> 9eb4: e3a0300d mov r3, #13 9eb8: e5803000 str r3, [r0] 9ebc: e3e0b000 mvn fp, #0 9ec0: ea000031 b 9f8c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 9ec4: e596104c ldr r1, [r6, #76] ; 0x4c 9ec8: e3510001 cmp r1, #1 9ecc: 0a000053 beq a020 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 9ed0: 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; 9ed4: e1a06003 mov r6, r3 switch( type ) { 9ed8: 0a000006 beq 9ef8 9edc: e35b0004 cmp fp, #4 9ee0: 0a000025 beq 9f7c 9ee4: e35b0002 cmp fp, #2 9ee8: 0a000013 beq 9f3c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 9eec: e35b0004 cmp fp, #4 9ef0: 1affffd5 bne 9e4c 9ef4: eaffffe2 b 9e84 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 9ef8: e593304c ldr r3, [r3, #76] ; 0x4c 9efc: e3530003 cmp r3, #3 9f00: 0a00004c beq a038 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 9f04: e3530004 cmp r3, #4 9f08: 0a00007a beq a0f8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9f0c: e3530001 cmp r3, #1 9f10: 1a000069 bne a0bc /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 9f14: e1a00006 mov r0, r6 9f18: e1a01008 mov r1, r8 9f1c: eb00023e bl a81c if ( !node ) 9f20: e2506000 subs r6, r0, #0 9f24: 0a00004b beq a058 * 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 )) { 9f28: e596304c ldr r3, [r6, #76] ; 0x4c 9f2c: e3530001 cmp r3, #1 9f30: 0a000018 beq 9f98 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 9f34: e5876000 str r6, [r7] break; 9f38: eaffffc3 b 9e4c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 9f3c: e59f11f4 ldr r1, [pc, #500] ; a138 9f40: e5912000 ldr r2, [r1] 9f44: e5922018 ldr r2, [r2, #24] 9f48: e1520003 cmp r2, r3 9f4c: 0affffbe beq 9e4c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 9f50: e597c010 ldr ip, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 9f54: e59c201c ldr r2, [ip, #28] 9f58: e1520003 cmp r2, r3 9f5c: 0a00006e beq a11c return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 9f60: e5936008 ldr r6, [r3, #8] 9f64: e3560000 cmp r6, #0 9f68: 1afffff1 bne 9f34 rtems_set_errno_and_return_minus_one( ENOENT ); 9f6c: eb0010d3 bl e2c0 <__errno> 9f70: e580b000 str fp, [r0] 9f74: e3e0b000 mvn fp, #0 9f78: ea000003 b 9f8c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 9f7c: eb0010cf bl e2c0 <__errno> 9f80: e3a0305b mov r3, #91 ; 0x5b 9f84: e5803000 str r3, [r0] 9f88: e3e0b000 mvn fp, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 9f8c: e1a0000b mov r0, fp 9f90: e28dd02c add sp, sp, #44 ; 0x2c 9f94: 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 )) { 9f98: e596305c ldr r3, [r6, #92] ; 0x5c 9f9c: e3530000 cmp r3, #0 9fa0: 108ab005 addne fp, sl, r5 9fa4: 0affffe2 beq 9f34 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 9fa8: e5db0000 ldrb r0, [fp] 9fac: ebffe41a bl 301c 9fb0: e3500000 cmp r0, #0 ++(*index); --(*len); 9fb4: 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 ) { 9fb8: 0a00000c beq 9ff0 9fbc: e5db3000 ldrb r3, [fp] 9fc0: e3530000 cmp r3, #0 9fc4: 0a000041 beq a0d0 9fc8: e3540000 cmp r4, #0 9fcc: e28bb001 add fp, fp, #1 9fd0: 0a000007 beq 9ff4 9fd4: e5db0000 ldrb r0, [fp] 9fd8: ebffe40f bl 301c 9fdc: e3500000 cmp r0, #0 ++(*index); 9fe0: e2855001 add r5, r5, #1 --(*len); 9fe4: e2444001 sub r4, r4, #1 9fe8: 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 ) { 9fec: 1afffff2 bne 9fbc 9ff0: 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] != '.')) { 9ff4: e353002e cmp r3, #46 ; 0x2e 9ff8: 1a000034 bne a0d0 9ffc: e08a3005 add r3, sl, r5 a000: e5d33001 ldrb r3, [r3, #1] a004: e353002e cmp r3, #46 ; 0x2e a008: 1a000030 bne a0d0 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; a00c: 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; a010: e2855002 add r5, r5, #2 pathnamelen -= 2; a014: e2444002 sub r4, r4, #2 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a018: e5876000 str r6, [r7] a01c: eaffff8a b 9e4c /* * 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 ) ) a020: e1a00007 mov r0, r7 a024: ebffff25 bl 9cc0 a028: e3500000 cmp r0, #0 a02c: 0affff9f beq 9eb0 a030: e5973000 ldr r3, [r7] a034: eaffffa5 b 9ed0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); a038: e1a00007 mov r0, r7 a03c: e3a01000 mov r1, #0 a040: ebffff2e bl 9d00 node = pathloc->node_access; a044: e5976000 ldr r6, [r7] if ( !node ) a048: e3560000 cmp r6, #0 a04c: 0a00001a beq a0bc } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; a050: e596304c ldr r3, [r6, #76] ; 0x4c a054: eaffffac b 9f0c */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); a058: eb001098 bl e2c0 <__errno> a05c: e3a03002 mov r3, #2 a060: e5803000 str r3, [r0] a064: e3e0b000 mvn fp, #0 a068: eaffffc7 b 9f8c * * 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 ) { a06c: e593c05c ldr ip, [r3, #92] ; 0x5c a070: e35c0000 cmp ip, #0 a074: 0affff85 beq 9e90 *pathloc = node->info.directory.mt_fs->mt_fs_root; a078: e28cc01c add ip, ip, #28 <== NOT EXECUTED a07c: e8bc000f ldm ip!, {r0, r1, r2, r3} a080: e1a0e007 mov lr, r7 a084: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a088: 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; a08c: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a090: 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; a094: e58e2000 str r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a098: e08a0000 add r0, sl, r0 a09c: e0841001 add r1, r4, r1 a0a0: e59d2000 ldr r2, [sp] a0a4: e1a03007 mov r3, r7 a0a8: e597c00c ldr ip, [r7, #12] a0ac: e1a0e00f mov lr, pc a0b0: e59cf000 ldr pc, [ip] a0b4: e1a0b000 mov fp, r0 a0b8: eaffffb3 b 9f8c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a0bc: eb00107f bl e2c0 <__errno> a0c0: e3a03014 mov r3, #20 a0c4: e5803000 str r3, [r0] a0c8: e3e0b000 mvn fp, #0 a0cc: eaffffae b 9f8c * 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; a0d0: e596e05c ldr lr, [r6, #92] ; 0x5c a0d4: e28ee01c add lr, lr, #28 a0d8: e8be000f ldm lr!, {r0, r1, r2, r3} a0dc: e1a05007 mov r5, r7 a0e0: e8a5000f stmia r5!, {r0, r1, r2, r3} a0e4: e59e2000 ldr r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i], a0e8: 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; a0ec: e5852000 str r2, [r5] return (*pathloc->ops->evalpath_h)( &pathname[i], a0f0: e1a01004 mov r1, r4 a0f4: eaffffe9 b a0a0 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a0f8: e1a00007 mov r0, r7 a0fc: e3a01000 mov r1, #0 a100: ebffff16 bl 9d60 node = pathloc->node_access; if ( result == -1 ) a104: 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 ); a108: e1a0b000 mov fp, r0 node = pathloc->node_access; a10c: e5976000 ldr r6, [r7] if ( result == -1 ) a110: 0affff9d beq 9f8c } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; a114: e596304c ldr r3, [r6, #76] ; 0x4c a118: eaffff7b b 9f0c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; a11c: e28cc008 add ip, ip, #8 a120: eaffffd5 b a07c char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); a124: e59f0010 ldr r0, [pc, #16] ; a13c <== NOT EXECUTED a128: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED a12c: e59f200c ldr r2, [pc, #12] ; a140 <== NOT EXECUTED a130: e59f300c ldr r3, [pc, #12] ; a144 <== NOT EXECUTED a134: eb000286 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000a21c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a21c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a220: e24dd02c sub sp, sp, #44 ; 0x2c a224: e1a07001 mov r7, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a228: 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 */ ) { a22c: e58d2000 str r2, [sp] a230: e1a0a000 mov sl, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a234: eb001426 bl f2d4 a238: e3a05000 mov r5, #0 a23c: e28d8004 add r8, sp, #4 a240: 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 ); a244: e28d3028 add r3, sp, #40 ; 0x28 a248: e08a0005 add r0, sl, r5 a24c: e1a01004 mov r1, r4 a250: e1a02008 mov r2, r8 a254: eb00019f bl a8d8 pathlen -= len; i += len; if ( !pathloc->node_access ) a258: e5973000 ldr r3, [r7] a25c: 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 ); a260: e1a09000 mov r9, r0 pathlen -= len; a264: e59db028 ldr fp, [sp, #40] ; 0x28 i += len; if ( !pathloc->node_access ) a268: 0a00003b beq a35c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a26c: e3500000 cmp r0, #0 a270: 1a000006 bne a290 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a274: eb001011 bl e2c0 <__errno> a278: e3a03011 mov r3, #17 a27c: e5803000 str r3, [r0] a280: e3e06000 mvn r6, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a284: e1a00006 mov r0, r6 a288: e28dd02c add sp, sp, #44 ; 0x2c a28c: 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 ) a290: e596104c ldr r1, [r6, #76] ; 0x4c a294: e3510001 cmp r1, #1 a298: 0a000052 beq a3e8 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a29c: e085500b add r5, r5, fp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a2a0: 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; a2a4: e1a06003 mov r6, r3 switch( type ) { a2a8: e3590004 cmp r9, #4 a2ac: 979ff109 ldrls pc, [pc, r9, lsl #2] a2b0: eaffffe3 b a244 <== NOT EXECUTED a2b4: 0000a274 .word 0x0000a274 <== NOT EXECUTED a2b8: 0000a244 .word 0x0000a244 <== NOT EXECUTED a2bc: 0000a32c .word 0x0000a32c <== NOT EXECUTED a2c0: 0000a2dc .word 0x0000a2dc <== NOT EXECUTED a2c4: 0000a2c8 .word 0x0000a2c8 <== 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 ); a2c8: eb000ffc bl e2c0 <__errno> a2cc: e3a0305b mov r3, #91 ; 0x5b a2d0: e5803000 str r3, [r0] a2d4: e3e06000 mvn r6, #0 a2d8: eaffffe9 b a284 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a2dc: e593304c ldr r3, [r3, #76] ; 0x4c a2e0: e3530003 cmp r3, #3 a2e4: 0a00006c beq a49c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a2e8: e3530004 cmp r3, #4 a2ec: 0a00006a beq a49c if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) a2f0: e3560000 cmp r6, #0 a2f4: 0a000063 beq a488 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a2f8: e596304c ldr r3, [r6, #76] ; 0x4c a2fc: e3530001 cmp r3, #1 a300: 1a000060 bne a488 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a304: e1a00006 mov r0, r6 a308: e1a01008 mov r1, r8 a30c: eb000142 bl a81c /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a310: e2506000 subs r6, r0, #0 a314: 0a000039 beq a400 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a318: e596304c ldr r3, [r6, #76] ; 0x4c a31c: e3530001 cmp r3, #1 a320: 0a000012 beq a370 i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; a324: e5876000 str r6, [r7] a328: eaffffc5 b a244 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a32c: e59f11ec ldr r1, [pc, #492] ; a520 a330: e5912000 ldr r2, [r1] a334: e5922018 ldr r2, [r2, #24] a338: e1520003 cmp r2, r3 a33c: 0affffc0 beq a244 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a340: e597c010 ldr ip, [r7, #16] a344: e59c201c ldr r2, [ip, #28] a348: e1520003 cmp r2, r3 a34c: 0a000069 beq a4f8 } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a350: e5936008 ldr r6, [r3, #8] a354: e3560000 cmp r6, #0 a358: 1afffff1 bne a324 * 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 ); a35c: eb000fd7 bl e2c0 <__errno> a360: e3a03002 mov r3, #2 a364: e5803000 str r3, [r0] a368: e3e06000 mvn r6, #0 a36c: eaffffc4 b a284 */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { a370: e596305c ldr r3, [r6, #92] ; 0x5c a374: e3530000 cmp r3, #0 a378: 108a9005 addne r9, sl, r5 a37c: 1a000008 bne a3a4 a380: eaffffe7 b a324 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { a384: e5d93000 ldrb r3, [r9] a388: e3530000 cmp r3, #0 a38c: 0a00004a beq a4bc a390: e3540000 cmp r4, #0 a394: e2899001 add r9, r9, #1 a398: 0a000007 beq a3bc ++(*index); a39c: e2855001 add r5, r5, #1 --(*len); a3a0: 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 ) { a3a4: e5d90000 ldrb r0, [r9] a3a8: ebffe31b bl 301c a3ac: e3500000 cmp r0, #0 ++(*index); --(*len); a3b0: 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 ) { a3b4: 1afffff2 bne a384 a3b8: 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] != '.')) { a3bc: e353002e cmp r3, #46 ; 0x2e a3c0: 1a00003d bne a4bc a3c4: e08a3005 add r3, sl, r5 a3c8: e5d33001 ldrb r3, [r3, #1] a3cc: e353002e cmp r3, #46 ; 0x2e a3d0: 1a000039 bne a4bc pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; a3d4: 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; a3d8: e2855002 add r5, r5, #2 pathlen -= 2; a3dc: e2444002 sub r4, r4, #2 node = node->Parent; } pathloc->node_access = node; a3e0: e5876000 str r6, [r7] a3e4: eaffff96 b a244 * 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 ) ) a3e8: e1a00007 mov r0, r7 a3ec: ebfffe33 bl 9cc0 a3f0: e3500000 cmp r0, #0 a3f4: 0a00001e beq a474 a3f8: e5973000 ldr r3, [r7] a3fc: eaffffa6 b a29c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a400: e59d3028 ldr r3, [sp, #40] ; 0x28 a404: e59de000 ldr lr, [sp] a408: e0633005 rsb r3, r3, r5 a40c: e08a3003 add r3, sl, r3 a410: 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++) { a414: e7da0005 ldrb r0, [sl, r5] a418: e3500000 cmp r0, #0 a41c: 0a000008 beq a444 a420: e08a5005 add r5, sl, r5 a424: ea000002 b a434 a428: e5f50001 ldrb r0, [r5, #1]! a42c: e3500000 cmp r0, #0 a430: 0a000003 beq a444 if ( !IMFS_is_separator( path[ i ] ) ) a434: ebffe2f8 bl 301c a438: e3500000 cmp r0, #0 a43c: 1afffff9 bne a428 a440: eaffffc5 b a35c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a444: e1a00007 mov r0, r7 a448: ebfffdf6 bl 9c28 /* * The returned node must be a directory */ node = pathloc->node_access; a44c: e5973000 ldr r3, [r7] a450: e593304c ldr r3, [r3, #76] ; 0x4c a454: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a458: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; a45c: 1a000009 bne a488 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a460: e1a00007 mov r0, r7 a464: e3a01003 mov r1, #3 a468: ebfffe14 bl 9cc0 a46c: e3500000 cmp r0, #0 a470: 1affff83 bne a284 rtems_set_errno_and_return_minus_one( EACCES ); a474: eb000f91 bl e2c0 <__errno> a478: e3a0300d mov r3, #13 a47c: e5803000 str r3, [r0] a480: e3e06000 mvn r6, #0 a484: eaffff7e b a284 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a488: eb000f8c bl e2c0 <__errno> a48c: e3a03014 mov r3, #20 a490: e5803000 str r3, [r0] a494: e3e06000 mvn r6, #0 a498: eaffff79 b a284 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a49c: e1a00007 mov r0, r7 a4a0: e3a01000 mov r1, #0 a4a4: ebffff27 bl a148 if ( result == -1 ) a4a8: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a4ac: e1a06000 mov r6, r0 if ( result == -1 ) a4b0: 0affff73 beq a284 a4b4: e5976000 ldr r6, [r7] a4b8: eaffff8c b a2f0 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; a4bc: e596e05c ldr lr, [r6, #92] ; 0x5c a4c0: e28ee01c add lr, lr, #28 a4c4: e8be000f ldm lr!, {r0, r1, r2, r3} a4c8: e1a04007 mov r4, r7 a4cc: e8a4000f stmia r4!, {r0, r1, r2, r3} a4d0: e59e2000 ldr r2, [lr] a4d4: e5842000 str r2, [r4] return (*pathloc->ops->evalformake_h)( &path[i], a4d8: e1a0000c mov r0, ip a4dc: e1a01007 mov r1, r7 a4e0: e59d2000 ldr r2, [sp] a4e4: e597300c ldr r3, [r7, #12] a4e8: e1a0e00f mov lr, pc a4ec: e593f004 ldr pc, [r3, #4] a4f0: e1a06000 mov r6, r0 a4f4: eaffff62 b a284 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a4f8: e28cc008 add ip, ip, #8 a4fc: e8bc000f ldm ip!, {r0, r1, r2, r3} a500: e1a04007 mov r4, r7 a504: e8a4000f stmia r4!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a508: e59d0028 ldr r0, [sp, #40] ; 0x28 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a50c: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a510: e0600005 rsb r0, r0, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; a514: e5842000 str r2, [r4] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a518: e08a0000 add r0, sl, r0 a51c: eaffffee b a4dc =============================================================================== 00009d00 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 9d00: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 9d04: e593204c ldr r2, [r3, #76] ; 0x4c 9d08: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9d0c: e92d4030 push {r4, r5, lr} 9d10: e1a04000 mov r4, r0 9d14: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 9d18: 1a00000d bne 9d54 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 9d1c: e5933050 ldr r3, [r3, #80] ; 0x50 9d20: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 9d24: ebffffbf bl 9c28 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9d28: e1a00004 mov r0, r4 9d2c: e1a01005 mov r1, r5 9d30: ebffffe2 bl 9cc0 9d34: e3500000 cmp r0, #0 9d38: 13a00000 movne r0, #0 9d3c: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 9d40: eb00115e bl e2c0 <__errno> <== NOT EXECUTED 9d44: e3a0300d mov r3, #13 <== NOT EXECUTED 9d48: e5803000 str r3, [r0] <== NOT EXECUTED 9d4c: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 9d50: 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); 9d54: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 9d58: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 9d5c: ebfff01f bl 5de0 <== NOT EXECUTED =============================================================================== 00009cc0 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9cc0: e3d13007 bics r3, r1, #7 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 9cc4: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9cc8: 1a000007 bne 9cec /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 9ccc: e5903000 ldr r3, [r0] 9cd0: e5930030 ldr r0, [r3, #48] ; 0x30 9cd4: e1a01301 lsl r1, r1, #6 9cd8: e0010000 and r0, r1, r0 9cdc: e1510000 cmp r1, r0 9ce0: 13a00000 movne r0, #0 9ce4: 03a00001 moveq r0, #1 return 1; return 0; } 9ce8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 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 ); 9cec: eb001173 bl e2c0 <__errno> <== NOT EXECUTED 9cf0: e3a03001 mov r3, #1 <== NOT EXECUTED 9cf4: e5803000 str r3, [r0] <== NOT EXECUTED 9cf8: e3e00000 mvn r0, #0 <== NOT EXECUTED 9cfc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00009d60 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9d60: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 9d64: e5906000 ldr r6, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9d68: e596304c ldr r3, [r6, #76] ; 0x4c 9d6c: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9d70: e24dd004 sub sp, sp, #4 9d74: e1a04000 mov r4, r0 9d78: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9d7c: 1a000024 bne 9e14 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 9d80: e5963008 ldr r3, [r6, #8] 9d84: e3530000 cmp r3, #0 9d88: 0a00001e beq 9e08 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 9d8c: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 9d90: e1a0100d mov r1, sp 9d94: e5960050 ldr r0, [r6, #80] ; 0x50 9d98: e1a02004 mov r2, r4 9d9c: eb00053c bl b294 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 9da0: e59d3000 ldr r3, [sp] 9da4: e5966050 ldr r6, [r6, #80] ; 0x50 9da8: e0866003 add r6, r6, r3 9dac: e1a00006 mov r0, r6 9db0: eb001547 bl f2d4 9db4: e1a02005 mov r2, r5 9db8: e1a01000 mov r1, r0 9dbc: e1a03004 mov r3, r4 9dc0: e1a00006 mov r0, r6 9dc4: eb000015 bl 9e20 9dc8: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 9dcc: e1a00004 mov r0, r4 9dd0: ebffff94 bl 9c28 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9dd4: e1a00004 mov r0, r4 9dd8: e1a01005 mov r1, r5 9ddc: ebffffb7 bl 9cc0 9de0: e3500000 cmp r0, #0 9de4: 0a000002 beq 9df4 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 9de8: e1a00006 mov r0, r6 9dec: e28dd004 add sp, sp, #4 9df0: 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 ); 9df4: eb001131 bl e2c0 <__errno> <== NOT EXECUTED 9df8: e3a0300d mov r3, #13 <== NOT EXECUTED 9dfc: e5803000 str r3, [r0] <== NOT EXECUTED 9e00: e3e06000 mvn r6, #0 <== NOT EXECUTED 9e04: eafffff7 b 9de8 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 9e08: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 9e0c: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 9e10: ebffeff2 bl 5de0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 9e14: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 9e18: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 9e1c: ebffefef bl 5de0 <== NOT EXECUTED =============================================================================== 0000a6b0 : } int IMFS_fifo_close( rtems_libio_t *iop ) { a6b0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a6b4: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); a6b8: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { a6bc: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); a6c0: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED a6c4: ebfffb8f bl 9508 <== NOT EXECUTED if (! err) { a6c8: e2506000 subs r6, r0, #0 <== NOT EXECUTED a6cc: 0a000002 beq a6dc <== 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); a6d0: ba00000e blt a710 <== NOT EXECUTED } a6d4: e1a00006 mov r0, r6 <== NOT EXECUTED a6d8: 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; a6dc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a6e0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED a6e4: 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) a6e8: e1a00005 mov r0, r5 <== NOT EXECUTED a6ec: eb0001a8 bl ad94 <== NOT EXECUTED a6f0: e3500000 cmp r0, #0 <== NOT EXECUTED a6f4: 1afffff6 bne a6d4 <== NOT EXECUTED a6f8: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED a6fc: e3530000 cmp r3, #0 <== NOT EXECUTED a700: 1afffff3 bne a6d4 <== NOT EXECUTED free(jnode); a704: e1a00005 mov r0, r5 <== NOT EXECUTED a708: ebffde66 bl 20a8 <== NOT EXECUTED a70c: eafffff0 b a6d4 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); a710: eb000eea bl e2c0 <__errno> <== NOT EXECUTED a714: e2666000 rsb r6, r6, #0 <== NOT EXECUTED a718: e5806000 str r6, [r0] <== NOT EXECUTED a71c: e3e06000 mvn r6, #0 <== NOT EXECUTED a720: eaffffeb b a6d4 <== NOT EXECUTED =============================================================================== 0000a57c : void *buffer ) { int err; if (command == FIONBIO) { a57c: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED a580: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED a584: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED a588: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a58c: e92d4010 push {r4, lr} <== NOT EXECUTED a590: e1a03002 mov r3, r2 <== NOT EXECUTED int err; if (command == FIONBIO) { a594: 0a00000a beq a5c4 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a598: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED a59c: e1a03000 mov r3, r0 <== NOT EXECUTED a5a0: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED a5a4: ebfffad0 bl 90ec <== NOT EXECUTED IMFS_FIFO_RETURN(err); a5a8: e3500000 cmp r0, #0 <== NOT EXECUTED a5ac: a8bd8010 popge {r4, pc} <== NOT EXECUTED a5b0: e2604000 rsb r4, r0, #0 <== NOT EXECUTED a5b4: eb000f41 bl e2c0 <__errno> <== NOT EXECUTED a5b8: e5804000 str r4, [r0] <== NOT EXECUTED a5bc: e3e00000 mvn r0, #0 <== NOT EXECUTED } a5c0: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) a5c4: e3520000 cmp r2, #0 <== NOT EXECUTED a5c8: 03a0400e moveq r4, #14 <== NOT EXECUTED a5cc: 0afffff8 beq a5b4 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) a5d0: e5924000 ldr r4, [r2] <== NOT EXECUTED a5d4: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; a5d8: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a5dc: 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; a5e0: 13833001 orrne r3, r3, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a5e4: 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; a5e8: 15803014 strne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a5ec: 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; a5f0: 13a00000 movne r0, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a5f4: 01a00004 moveq r0, r4 <== NOT EXECUTED a5f8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 0000a524 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a524: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a528: e1a0c000 mov ip, r0 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); a52c: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a530: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); a534: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a538: e58dc000 str ip, [sp] <== NOT EXECUTED a53c: ebfffacc bl 9074 <== NOT EXECUTED a540: e1a03000 mov r3, r0 <== NOT EXECUTED a544: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a548: 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); a54c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a550: ba000003 blt a564 <== NOT EXECUTED } a554: e1a01004 mov r1, r4 <== NOT EXECUTED a558: e1a00003 mov r0, r3 <== NOT EXECUTED a55c: e28dd004 add sp, sp, #4 <== NOT EXECUTED a560: 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); a564: eb000f55 bl e2c0 <__errno> <== NOT EXECUTED a568: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a56c: e5805000 str r5, [r0] <== NOT EXECUTED a570: e3e03000 mvn r3, #0 <== NOT EXECUTED a574: e3e04000 mvn r4, #0 <== NOT EXECUTED a578: eafffff5 b a554 <== NOT EXECUTED =============================================================================== 0000a658 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a658: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a65c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a660: e1a03000 mov r3, r0 <== NOT EXECUTED a664: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); a668: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a66c: ebfffb37 bl 9350 <== NOT EXECUTED if (err > 0) a670: e2505000 subs r5, r0, #0 <== NOT EXECUTED a674: da000007 ble a698 <== NOT EXECUTED IMFS_update_atime(jnode); a678: e1a0000d mov r0, sp <== NOT EXECUTED a67c: e3a01000 mov r1, #0 <== NOT EXECUTED a680: ebffdeb1 bl 214c <== NOT EXECUTED a684: e59d3000 ldr r3, [sp] <== NOT EXECUTED a688: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } a68c: e1a00005 mov r0, r5 <== NOT EXECUTED a690: e28dd008 add sp, sp, #8 <== NOT EXECUTED a694: 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); a698: 0afffffb beq a68c <== NOT EXECUTED a69c: eb000f07 bl e2c0 <__errno> <== NOT EXECUTED a6a0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a6a4: e5805000 str r5, [r0] <== NOT EXECUTED a6a8: e3e05000 mvn r5, #0 <== NOT EXECUTED a6ac: eafffff6 b a68c <== NOT EXECUTED =============================================================================== 0000a5fc : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a5fc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; a600: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a604: e1a03000 mov r3, r0 <== NOT EXECUTED a608: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); a60c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a610: ebffface bl 9150 <== NOT EXECUTED if (err > 0) { a614: e2505000 subs r5, r0, #0 <== NOT EXECUTED a618: da000008 ble a640 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); a61c: e1a0000d mov r0, sp <== NOT EXECUTED a620: e3a01000 mov r1, #0 <== NOT EXECUTED a624: ebffdec8 bl 214c <== NOT EXECUTED a628: e59d3000 ldr r3, [sp] <== NOT EXECUTED a62c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED a630: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } a634: e1a00005 mov r0, r5 <== NOT EXECUTED a638: e28dd008 add sp, sp, #8 <== NOT EXECUTED a63c: 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); a640: 0afffffb beq a634 <== NOT EXECUTED a644: eb000f1d bl e2c0 <__errno> <== NOT EXECUTED a648: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a64c: e5805000 str r5, [r0] <== NOT EXECUTED a650: e3e05000 mvn r5, #0 <== NOT EXECUTED a654: eafffff6 b a634 <== NOT EXECUTED =============================================================================== 0000a81c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { a81c: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); a820: e2505000 subs r5, r0, #0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { a824: e1a04001 mov r4, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); a828: 0a000020 beq a8b0 if ( !name ) a82c: e3510000 cmp r1, #0 a830: 0a00000c beq a868 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) a834: e1a00001 mov r0, r1 a838: e59f1084 ldr r1, [pc, #132] ; a8c4 a83c: eb0011c8 bl ef64 a840: e3500000 cmp r0, #0 a844: 0a000005 beq a860 return directory; if ( !strcmp( name, dotdotname ) ) a848: e1a00004 mov r0, r4 a84c: e59f1074 ldr r1, [pc, #116] ; a8c8 a850: eb0011c3 bl ef64 a854: e3500000 cmp r0, #0 return directory->Parent; a858: 05955008 ldreq r5, [r5, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) a85c: 1a000004 bne a874 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } a860: e1a00005 mov r0, r5 a864: 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; a868: e3a05000 mov r5, #0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } a86c: e1a00005 mov r0, r5 a870: 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; a874: e5956050 ldr r6, [r5, #80] ; 0x50 a878: e2855054 add r5, r5, #84 ; 0x54 a87c: e1560005 cmp r6, r5 a880: 1a000003 bne a894 a884: eafffff7 b a868 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { a888: e5966000 ldr r6, [r6] if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; a88c: e1560005 cmp r6, r5 a890: 0afffff4 beq a868 !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 ) ) a894: e1a00004 mov r0, r4 a898: e286100c add r1, r6, #12 a89c: eb0011b0 bl ef64 a8a0: e3500000 cmp r0, #0 a8a4: 1afffff7 bne a888 a8a8: e1a05006 mov r5, r6 a8ac: eaffffeb b a860 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); a8b0: e59f0014 ldr r0, [pc, #20] ; a8cc <== NOT EXECUTED a8b4: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED a8b8: e59f2010 ldr r2, [pc, #16] ; a8d0 <== NOT EXECUTED a8bc: e59f3010 ldr r3, [pc, #16] ; a8d4 <== NOT EXECUTED a8c0: eb0000a3 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000a764 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a764: 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; a768: e1a0c000 mov ip, r0 a76c: 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 ) { a770: e24dd014 sub sp, sp, #20 a774: 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; a778: e8bc000f ldm ip!, {r0, r1, r2, r3} a77c: e1a0600d mov r6, sp a780: e8a6000f stmia r6!, {r0, r1, r2, r3} a784: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a788: 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; a78c: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a790: 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; a794: 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 ); a798: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; a79c: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a7a0: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a7a4: ebfffd1f bl 9c28 if ( jnode->type != IMFS_DIRECTORY ) { a7a8: e594304c ldr r3, [r4, #76] ; 0x4c a7ac: e3530001 cmp r3, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a7b0: e2842054 add r2, r4, #84 ; 0x54 a7b4: 1a000010 bne a7fc a7b8: e5943050 ldr r3, [r4, #80] ; 0x50 a7bc: e1530002 cmp r3, r2 a7c0: 0a00000d beq a7fc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { a7c4: e3540000 cmp r4, #0 a7c8: 0a000008 beq a7f0 if ( jnode->type == IMFS_DIRECTORY ) { a7cc: e594304c ldr r3, [r4, #76] ; 0x4c a7d0: e3530001 cmp r3, #1 a7d4: 1affffef bne a798 a7d8: e5943050 ldr r3, [r4, #80] ; 0x50 a7dc: e2842054 add r2, r4, #84 ; 0x54 a7e0: e1530002 cmp r3, r2 a7e4: 0affffeb beq a798 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a7e8: e2534000 subs r4, r3, #0 a7ec: 1affffe9 bne a798 a7f0: e3a00000 mov r0, #0 return 0; } a7f4: e28dd014 add sp, sp, #20 a7f8: 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 ); a7fc: e3a00000 mov r0, #0 a800: e1a0100d mov r1, sp a804: ebffdca3 bl 1a98 if (result != 0) a808: e3500000 cmp r0, #0 a80c: 01a04006 moveq r4, r6 a810: 0affffeb beq a7c4 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a814: e3e00000 mvn r0, #0 <== NOT EXECUTED a818: eafffff5 b a7f4 <== 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: eb0020fa bl 9aa0 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: eb001e56 bl 907c 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: eb0032e2 bl e2c0 <__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: eb0036d5 bl f2d4 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: eb002450 bl a8d8 * 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: eb0020ca bl 9ae0 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: eb0032b2 bl e2c0 <__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: eb0032ad bl e2c0 <__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 =============================================================================== 0000c980 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); c980: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { c984: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); c988: 0a00000f beq c9cc if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c98c: e593304c ldr r3, [r3, #76] ; 0x4c c990: e3530005 cmp r3, #5 c994: 1a000012 bne c9e4 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 ); c998: e3a02001 mov r2, #1 c99c: ebfffe99 bl c408 if ( *block_entry_ptr ) c9a0: e5904000 ldr r4, [r0] c9a4: 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 ); c9a8: e1a05000 mov r5, r0 if ( *block_entry_ptr ) c9ac: 13a00000 movne r0, #0 c9b0: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); c9b4: ebfffe86 bl c3d4 if ( !memory ) c9b8: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; c9bc: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) c9c0: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; c9c4: 11a00004 movne r0, r4 return 0; } c9c8: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); c9cc: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED c9d0: e2811001 add r1, r1, #1 <== NOT EXECUTED c9d4: e59f0020 ldr r0, [pc, #32] ; c9fc <== NOT EXECUTED c9d8: e59f2020 ldr r2, [pc, #32] ; ca00 <== NOT EXECUTED c9dc: e59f3020 ldr r3, [pc, #32] ; ca04 <== NOT EXECUTED c9e0: ebfff85b bl ab54 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c9e4: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED c9e8: e2811001 add r1, r1, #1 <== NOT EXECUTED c9ec: e59f0008 ldr r0, [pc, #8] ; c9fc <== NOT EXECUTED c9f0: e59f2008 ldr r2, [pc, #8] ; ca00 <== NOT EXECUTED c9f4: e59f300c ldr r3, [pc, #12] ; ca08 <== NOT EXECUTED c9f8: ebfff855 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000ca0c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ca0c: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ca10: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ca14: e24dd004 sub sp, sp, #4 ca18: e1a08001 mov r8, r1 ca1c: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); ca20: 0a00004f beq cb64 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ca24: e594304c ldr r3, [r4, #76] ; 0x4c ca28: e3530005 cmp r3, #5 ca2c: 1a000046 bne cb4c if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ca30: e59f3144 ldr r3, [pc, #324] ; cb7c ca34: e593b000 ldr fp, [r3] ca38: e1a0312b lsr r3, fp, #2 ca3c: e0213393 mla r1, r3, r3, r3 ca40: e0223391 mla r2, r1, r3, r3 ca44: e3a03000 mov r3, #0 ca48: e1530006 cmp r3, r6 ca4c: e2423001 sub r3, r2, #1 ca50: e002039b mul r2, fp, r3 ca54: da000034 ble cb2c rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) ca58: e5947054 ldr r7, [r4, #84] ; 0x54 ca5c: e1560007 cmp r6, r7 ca60: e594a050 ldr sl, [r4, #80] ; 0x50 ca64: da000027 ble cb08 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ca68: e1a0cfcb asr ip, fp, #31 ca6c: e1a0300c mov r3, ip ca70: e1a0200b mov r2, fp ca74: e1a00008 mov r0, r8 ca78: e1a01006 mov r1, r6 ca7c: e58dc000 str ip, [sp] ca80: eb002e89 bl 184ac <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ca84: e59dc000 ldr ip, [sp] /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ca88: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ca8c: e1a01007 mov r1, r7 ca90: e1a0000a mov r0, sl ca94: e1a0200b mov r2, fp ca98: e1a0300c mov r3, ip ca9c: eb002e82 bl 184ac <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { caa0: 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; caa4: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { caa8: 3a00001b bcc cb1c caac: e1a07000 mov r7, r0 cab0: ea000002 b cac0 cab4: e2877001 add r7, r7, #1 cab8: e1550007 cmp r5, r7 cabc: 3a000016 bcc cb1c if ( IMFS_memfile_addblock( the_jnode, block ) ) { cac0: e1a00004 mov r0, r4 cac4: e1a01007 mov r1, r7 cac8: ebffffac bl c980 cacc: e3500000 cmp r0, #0 cad0: 0afffff7 beq cab4 cad4: ea000003 b cae8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); cad8: e1a01007 mov r1, r7 <== NOT EXECUTED cadc: 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-- ) { cae0: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); cae4: ebfffef5 bl c6c0 <== 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-- ) { cae8: e15a0007 cmp sl, r7 <== NOT EXECUTED caec: 9afffff9 bls cad8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); caf0: eb0005f2 bl e2c0 <__errno> <== NOT EXECUTED caf4: e3a0301c mov r3, #28 <== NOT EXECUTED caf8: e5803000 str r3, [r0] <== NOT EXECUTED cafc: e3e00000 mvn r0, #0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } cb00: e28dd004 add sp, sp, #4 cb04: 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 ) cb08: 1a000001 bne cb14 cb0c: e158000a cmp r8, sl cb10: 8affffd4 bhi ca68 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; cb14: e3a00000 mov r0, #0 return 0; cb18: eafffff8 b cb00 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; cb1c: e5846054 str r6, [r4, #84] ; 0x54 cb20: e5848050 str r8, [r4, #80] ; 0x50 cb24: e3a00000 mov r0, #0 cb28: eafffff4 b cb00 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 ) cb2c: 1a000001 bne cb38 cb30: e1520008 cmp r2, r8 cb34: 8affffc7 bhi ca58 rtems_set_errno_and_return_minus_one( EINVAL ); cb38: eb0005e0 bl e2c0 <__errno> <== NOT EXECUTED cb3c: e3a03016 mov r3, #22 <== NOT EXECUTED cb40: e5803000 str r3, [r0] <== NOT EXECUTED cb44: e3e00000 mvn r0, #0 <== NOT EXECUTED cb48: eaffffec b cb00 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); cb4c: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED cb50: e2811001 add r1, r1, #1 <== NOT EXECUTED cb54: e59f0024 ldr r0, [pc, #36] ; cb80 <== NOT EXECUTED cb58: e59f2024 ldr r2, [pc, #36] ; cb84 <== NOT EXECUTED cb5c: e59f3024 ldr r3, [pc, #36] ; cb88 <== NOT EXECUTED cb60: ebfff7fb bl ab54 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); cb64: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED cb68: e2811001 add r1, r1, #1 <== NOT EXECUTED cb6c: e59f000c ldr r0, [pc, #12] ; cb80 <== NOT EXECUTED cb70: e59f200c ldr r2, [pc, #12] ; cb84 <== NOT EXECUTED cb74: e59f3010 ldr r3, [pc, #16] ; cb8c <== NOT EXECUTED cb78: ebfff7f5 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000c408 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c408: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c40c: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c410: e24dd004 sub sp, sp, #4 /* * Perform internal consistency checks */ assert( the_jnode ); c414: 0a000073 beq c5e8 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); c418: e594304c ldr r3, [r4, #76] ; 0x4c c41c: e3530005 cmp r3, #5 c420: 1a00006b bne c5d4 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { c424: e59f31f8 ldr r3, [pc, #504] ; c624 c428: e5935000 ldr r5, [r3] c42c: e1a05125 lsr r5, r5, #2 c430: e2453001 sub r3, r5, #1 c434: e1510003 cmp r1, r3 c438: 9a000019 bls c4a4 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { c43c: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED c440: e2463001 sub r3, r6, #1 <== NOT EXECUTED c444: e1510003 cmp r1, r3 <== NOT EXECUTED c448: 8a000025 bhi c4e4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; c44c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c450: e1a00006 mov r0, r6 <== NOT EXECUTED c454: e1a01005 mov r1, r5 <== NOT EXECUTED c458: e58d2000 str r2, [sp] <== NOT EXECUTED c45c: eb002d65 bl 179f8 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c460: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c464: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c468: e1a00006 mov r0, r6 <== NOT EXECUTED c46c: eb002d1d bl 178e8 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { c470: e59d2000 ldr r2, [sp] <== NOT EXECUTED c474: 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; c478: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; c47c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { c480: 0a000047 beq c5a4 <== NOT EXECUTED if ( !p ) { c484: e3530000 cmp r3, #0 <== NOT EXECUTED c488: 0a00004c beq c5c0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; c48c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p1 ) { c490: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; c494: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { c498: 0a000034 beq c570 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c49c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED c4a0: ea000005 b c4bc <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { c4a4: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; c4a8: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { c4ac: 0a000035 beq c588 if ( !p ) { c4b0: e3500000 cmp r0, #0 c4b4: 0a000002 beq c4c4 } if ( !p ) return 0; return &info->indirect[ my_block ]; c4b8: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } c4bc: e28dd004 add sp, sp, #4 c4c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c4c4: e58d1000 str r1, [sp] c4c8: ebffffc1 bl c3d4 if ( !p ) c4cc: e3500000 cmp r0, #0 c4d0: e59d1000 ldr r1, [sp] return 0; info->indirect = p; c4d4: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) c4d8: 1afffff6 bne c4b8 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c4dc: e3a00000 mov r0, #0 <== NOT EXECUTED c4e0: eafffff5 b c4bc <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { c4e4: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED c4e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED c4ec: e1510003 cmp r1, r3 <== NOT EXECUTED c4f0: 8afffff9 bhi c4dc <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; c4f4: e0666001 rsb r6, r6, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c4f8: e1a00006 mov r0, r6 <== NOT EXECUTED c4fc: e1a01005 mov r1, r5 <== NOT EXECUTED c500: e58d2000 str r2, [sp] <== NOT EXECUTED c504: eb002d3b bl 179f8 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c508: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c50c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c510: e1a00006 mov r0, r6 <== NOT EXECUTED c514: eb002cf3 bl 178e8 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c518: 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; c51c: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c520: eb002cf0 bl 178e8 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c524: 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; c528: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c52c: e1a00008 mov r0, r8 <== NOT EXECUTED c530: eb002d30 bl 179f8 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { c534: e59d2000 ldr r2, [sp] <== NOT EXECUTED c538: 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; c53c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; c540: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { c544: 0a000013 beq c598 <== NOT EXECUTED if ( !p ) { c548: e3530000 cmp r3, #0 <== NOT EXECUTED c54c: 0a00002f beq c610 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; c550: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) { c554: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; c558: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { c55c: 0a000026 beq c5fc <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; c560: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { c564: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; c568: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { c56c: 1affffca bne c49c <== NOT EXECUTED p2 = memfile_alloc_block(); c570: ebffff97 bl c3d4 <== NOT EXECUTED if ( !p2 ) c574: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; c578: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) c57c: 0affffd6 beq c4dc <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c580: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED c584: eaffffcc b c4bc <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) c588: e3500000 cmp r0, #0 c58c: 1affffc9 bne c4b8 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; c590: e3a00000 mov r0, #0 <== NOT EXECUTED c594: eaffffc8 b c4bc <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) c598: e3530000 cmp r3, #0 <== NOT EXECUTED c59c: 0affffce beq c4dc <== 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 ]; c5a0: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) c5a4: e3530000 cmp r3, #0 <== NOT EXECUTED c5a8: 0affffcb beq c4dc <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; c5ac: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) c5b0: e3500000 cmp r0, #0 <== NOT EXECUTED c5b4: 0affffc8 beq c4dc <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; c5b8: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED c5bc: eaffffbe b c4bc <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c5c0: ebffff83 bl c3d4 <== NOT EXECUTED if ( !p ) c5c4: e2503000 subs r3, r0, #0 <== NOT EXECUTED c5c8: 0affffc3 beq c4dc <== NOT EXECUTED return 0; info->doubly_indirect = p; c5cc: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED c5d0: eaffffad b c48c <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); c5d4: e59f004c ldr r0, [pc, #76] ; c628 <== NOT EXECUTED c5d8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED c5dc: e59f2048 ldr r2, [pc, #72] ; c62c <== NOT EXECUTED c5e0: e59f3048 ldr r3, [pc, #72] ; c630 <== NOT EXECUTED c5e4: ebfff95a bl ab54 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); c5e8: e59f0038 ldr r0, [pc, #56] ; c628 <== NOT EXECUTED c5ec: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED c5f0: e59f2034 ldr r2, [pc, #52] ; c62c <== NOT EXECUTED c5f4: e59f3038 ldr r3, [pc, #56] ; c634 <== NOT EXECUTED c5f8: ebfff955 bl ab54 <__assert_func> <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); c5fc: ebffff74 bl c3d4 <== NOT EXECUTED if ( !p1 ) c600: e2502000 subs r2, r0, #0 <== NOT EXECUTED c604: 0affffb4 beq c4dc <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; c608: e5862000 str r2, [r6] <== NOT EXECUTED c60c: eaffffd3 b c560 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); c610: ebffff6f bl c3d4 <== NOT EXECUTED if ( !p ) c614: e2503000 subs r3, r0, #0 <== NOT EXECUTED c618: 0affffaf beq c4dc <== NOT EXECUTED return 0; info->triply_indirect = p; c61c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED c620: eaffffca b c550 <== NOT EXECUTED =============================================================================== 0000d028 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { d028: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); d02c: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { d030: e24dd014 sub sp, sp, #20 d034: e1a08003 mov r8, r3 d038: e1a0a001 mov sl, r1 d03c: e1a0b002 mov fp, r2 d040: e59d5038 ldr r5, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); d044: 0a000089 beq d270 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || d048: e599304c ldr r3, [r9, #76] ; 0x4c d04c: e2432005 sub r2, r3, #5 d050: e3520001 cmp r2, #1 d054: 8a000096 bhi d2b4 /* * Error checks on arguments */ assert( dest ); d058: e3580000 cmp r8, #0 d05c: 0a00008e beq d29c /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) d060: e3550000 cmp r5, #0 d064: 0a000076 beq d244 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { d068: e3530006 cmp r3, #6 d06c: 0a00005a beq d1dc * 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 ) d070: e5993054 ldr r3, [r9, #84] ; 0x54 d074: e3a02000 mov r2, #0 d078: 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; d07c: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) d080: e5992050 ldr r2, [r9, #80] ; 0x50 d084: e0851001 add r1, r5, r1 d088: da00004f ble d1cc my_length = the_jnode->info.file.size - start; d08c: e0635002 rsb r5, r3, r2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; d090: e59f624c ldr r6, [pc, #588] ; d2e4 d094: e5964000 ldr r4, [r6] d098: e1a0000a mov r0, sl d09c: e1a02004 mov r2, r4 d0a0: e1a03fc2 asr r3, r2, #31 d0a4: e1a0100b mov r1, fp d0a8: e98d000c stmib sp, {r2, r3} d0ac: eb002e28 bl 18954 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; d0b0: e1a0100b mov r1, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; d0b4: e1a0c000 mov ip, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; d0b8: e99d000c ldmib sp, {r2, r3} d0bc: e1a0000a mov r0, sl d0c0: e58dc000 str ip, [sp] d0c4: eb002cf8 bl 184ac <__divdi3> if ( start_offset ) { d0c8: e59dc000 ldr ip, [sp] d0cc: 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; d0d0: e1a07000 mov r7, r0 if ( start_offset ) { d0d4: 01a0a00c moveq sl, ip d0d8: 0a000013 beq d12c 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 ); d0dc: e1a00009 mov r0, r9 d0e0: e1a01007 mov r1, r7 d0e4: e3a02000 mov r2, #0 d0e8: e58dc000 str ip, [sp] d0ec: ebfffcc5 bl c408 assert( block_ptr ); d0f0: e3500000 cmp r0, #0 d0f4: e59dc000 ldr ip, [sp] d0f8: 0a000073 beq d2cc */ 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; d0fc: 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 ); d100: 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; d104: e155000a cmp r5, sl d108: 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 ); d10c: e1a00008 mov r0, r8 d110: e081100c add r1, r1, ip d114: e1a0200a mov r2, sl d118: eb000676 bl eaf8 dest += to_copy; block++; my_length -= to_copy; d11c: 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; d120: e088800a add r8, r8, sl block++; d124: e2877001 add r7, r7, #1 my_length -= to_copy; d128: 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 ) { d12c: e1550004 cmp r5, r4 d130: 3a000010 bcc d178 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d134: e1a00009 mov r0, r9 d138: e1a01007 mov r1, r7 d13c: e3a02000 mov r2, #0 d140: ebfffcb0 bl c408 assert( block_ptr ); d144: e3500000 cmp r0, #0 d148: 0a000042 beq d258 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); d14c: e5901000 ldr r1, [r0] d150: e1a02004 mov r2, r4 d154: e1a00008 mov r0, r8 d158: eb000666 bl eaf8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { d15c: e5963000 ldr r3, [r6] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; d160: 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 ) { d164: 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; d168: e0888004 add r8, r8, r4 block++; d16c: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; d170: 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 ) { d174: 9affffee bls d134 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { d178: e3550000 cmp r5, #0 d17c: 0a00000a beq d1ac block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); d180: e1a01007 mov r1, r7 d184: e1a00009 mov r0, r9 d188: e3a02000 mov r2, #0 d18c: ebfffc9d bl c408 assert( block_ptr ); d190: e2503000 subs r3, r0, #0 d194: 0a00003a beq d284 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); d198: e1a00008 mov r0, r8 d19c: e5931000 ldr r1, [r3] d1a0: e1a02005 mov r2, r5 d1a4: eb000653 bl eaf8 copied += my_length; d1a8: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); d1ac: e28d000c add r0, sp, #12 d1b0: e3a01000 mov r1, #0 d1b4: ebffd3e4 bl 214c d1b8: e59d300c ldr r3, [sp, #12] d1bc: e5893040 str r3, [r9, #64] ; 0x40 return copied; d1c0: e1a0000a mov r0, sl } d1c4: e28dd014 add sp, sp, #20 d1c8: 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 ) d1cc: 1affffaf bne d090 d1d0: e1510002 cmp r1, r2 d1d4: 9affffad bls d090 d1d8: eaffffab b d08c 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)) d1dc: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED d1e0: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED d1e4: e1a00003 mov r0, r3 <== NOT EXECUTED d1e8: e1a01004 mov r1, r4 <== NOT EXECUTED d1ec: e3a02000 mov r2, #0 <== NOT EXECUTED d1f0: e050000a subs r0, r0, sl <== NOT EXECUTED d1f4: e0c1100b sbc r1, r1, fp <== NOT EXECUTED d1f8: 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; d1fc: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) d200: da00000b ble d234 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; d204: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); d208: e082100a add r1, r2, sl <== NOT EXECUTED d20c: e1a00008 mov r0, r8 <== NOT EXECUTED d210: e1a02005 mov r2, r5 <== NOT EXECUTED d214: eb000637 bl eaf8 <== NOT EXECUTED IMFS_update_atime( the_jnode ); d218: e28d000c add r0, sp, #12 <== NOT EXECUTED d21c: e3a01000 mov r1, #0 <== NOT EXECUTED d220: ebffd3c9 bl 214c <== NOT EXECUTED d224: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED return my_length; d228: 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 ); d22c: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED return my_length; d230: eaffffe3 b d1c4 <== 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)) d234: 1afffff3 bne d208 <== NOT EXECUTED d238: e1550000 cmp r5, r0 <== NOT EXECUTED d23c: 8afffff0 bhi d204 <== NOT EXECUTED d240: eafffff0 b d208 <== 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 ); d244: eb00041d bl e2c0 <__errno> <== NOT EXECUTED d248: e3a03016 mov r3, #22 <== NOT EXECUTED d24c: e5803000 str r3, [r0] <== NOT EXECUTED d250: e3e00000 mvn r0, #0 <== NOT EXECUTED d254: eaffffda b d1c4 <== 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 ); d258: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED d25c: e2811003 add r1, r1, #3 <== NOT EXECUTED d260: e59f0080 ldr r0, [pc, #128] ; d2e8 <== NOT EXECUTED d264: e59f2080 ldr r2, [pc, #128] ; d2ec <== NOT EXECUTED d268: e59f3080 ldr r3, [pc, #128] ; d2f0 <== NOT EXECUTED d26c: ebfff638 bl ab54 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); d270: e59f0070 ldr r0, [pc, #112] ; d2e8 <== NOT EXECUTED d274: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED d278: e59f206c ldr r2, [pc, #108] ; d2ec <== NOT EXECUTED d27c: e59f3070 ldr r3, [pc, #112] ; d2f4 <== NOT EXECUTED d280: ebfff633 bl ab54 <__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 ); d284: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED d288: e2811001 add r1, r1, #1 <== NOT EXECUTED d28c: e59f0054 ldr r0, [pc, #84] ; d2e8 <== NOT EXECUTED d290: e59f2054 ldr r2, [pc, #84] ; d2ec <== NOT EXECUTED d294: e59f3054 ldr r3, [pc, #84] ; d2f0 <== NOT EXECUTED d298: ebfff62d bl ab54 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); d29c: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED d2a0: e2811002 add r1, r1, #2 <== NOT EXECUTED d2a4: e59f003c ldr r0, [pc, #60] ; d2e8 <== NOT EXECUTED d2a8: e59f203c ldr r2, [pc, #60] ; d2ec <== NOT EXECUTED d2ac: e59f3044 ldr r3, [pc, #68] ; d2f8 <== NOT EXECUTED d2b0: ebfff627 bl ab54 <__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 || d2b4: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED d2b8: e2811001 add r1, r1, #1 <== NOT EXECUTED d2bc: e59f0024 ldr r0, [pc, #36] ; d2e8 <== NOT EXECUTED d2c0: e59f2024 ldr r2, [pc, #36] ; d2ec <== NOT EXECUTED d2c4: e59f3030 ldr r3, [pc, #48] ; d2fc <== NOT EXECUTED d2c8: ebfff621 bl ab54 <__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 ); d2cc: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED d2d0: e2811002 add r1, r1, #2 <== NOT EXECUTED d2d4: e59f000c ldr r0, [pc, #12] ; d2e8 <== NOT EXECUTED d2d8: e59f200c ldr r2, [pc, #12] ; d2ec <== NOT EXECUTED d2dc: e59f300c ldr r3, [pc, #12] ; d2f0 <== NOT EXECUTED d2e0: ebfff61b bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000c710 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { c710: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c714: e250a000 subs sl, r0, #0 c718: 0a00004f beq c85c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c71c: e59a304c ldr r3, [sl, #76] ; 0x4c c720: e3530005 cmp r3, #5 c724: 1a000052 bne c874 /* * 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; c728: e59f615c ldr r6, [pc, #348] ; c88c * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c72c: 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; c730: e5967000 ldr r7, [r6] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c734: 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; c738: e1a07127 lsr r7, r7, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); c73c: 128a0058 addne r0, sl, #88 ; 0x58 c740: 11a01007 movne r1, r7 c744: 1bffffbb blne c638 } if ( info->doubly_indirect ) { c748: e59a305c ldr r3, [sl, #92] ; 0x5c c74c: e3530000 cmp r3, #0 c750: 0a000014 beq c7a8 for ( i=0 ; i <== NOT EXECUTED c760: e3a02000 mov r2, #0 <== NOT EXECUTED c764: e1a04002 mov r4, r2 <== NOT EXECUTED c768: ea000000 b c770 <== NOT EXECUTED c76c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { c770: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED c774: e3510000 cmp r1, #0 <== NOT EXECUTED c778: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( c77c: 10830002 addne r0, r3, r2 <== NOT EXECUTED c780: 11a01007 movne r1, r7 <== NOT EXECUTED c784: 1bffffab blne c638 <== 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 ); c79c: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED c7a0: e1a01007 mov r1, r7 <== NOT EXECUTED c7a4: ebffffa3 bl c638 <== NOT EXECUTED } if ( info->triply_indirect ) { c7a8: e59a0060 ldr r0, [sl, #96] ; 0x60 c7ac: e3500000 cmp r0, #0 c7b0: 0a000027 beq c854 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; c7c0: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ c7c4: e3550000 cmp r5, #0 <== NOT EXECUTED c7c8: 13a09000 movne r9, #0 <== NOT EXECUTED c7cc: 11a08009 movne r8, r9 <== NOT EXECUTED c7d0: 0a00001c beq c848 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED c7dc: e3a00000 mov r0, #0 <== NOT EXECUTED c7e0: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { c7e4: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED c7e8: e3530000 cmp r3, #0 <== NOT EXECUTED c7ec: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); c7f0: 10850000 addne r0, r5, r0 <== NOT EXECUTED c7f4: 11a01007 movne r1, r7 <== NOT EXECUTED c7f8: 1bffff8e blne c638 <== 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 c810: 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( c814: e0800009 add r0, r0, r9 <== NOT EXECUTED c818: e1a01007 mov r1, r7 <== NOT EXECUTED c81c: ebffff85 bl c638 <== 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]; c834: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED c838: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ c83c: e3550000 cmp r5, #0 <== NOT EXECUTED c840: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED c844: 1affffe2 bne c7d4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( c848: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED c84c: e1a01007 mov r1, r7 <== NOT EXECUTED c850: ebffff78 bl c638 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } c854: e3a00000 mov r0, #0 c858: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); c85c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED c860: e2811002 add r1, r1, #2 <== NOT EXECUTED c864: e59f0024 ldr r0, [pc, #36] ; c890 <== NOT EXECUTED c868: e59f2024 ldr r2, [pc, #36] ; c894 <== NOT EXECUTED c86c: e59f3024 ldr r3, [pc, #36] ; c898 <== NOT EXECUTED c870: ebfff8b7 bl ab54 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c874: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED c878: e2811002 add r1, r1, #2 <== NOT EXECUTED c87c: e59f000c ldr r0, [pc, #12] ; c890 <== NOT EXECUTED c880: e59f200c ldr r2, [pc, #12] ; c894 <== NOT EXECUTED c884: e59f3010 ldr r3, [pc, #16] ; c89c <== NOT EXECUTED c888: ebfff8b1 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000c6c0 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { c6c0: 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 ); c6c4: e3a02000 mov r2, #0 <== NOT EXECUTED c6c8: ebffff4e bl c408 <== NOT EXECUTED assert( block_ptr ); c6cc: e2503000 subs r3, r0, #0 <== NOT EXECUTED c6d0: 0a000005 beq c6ec <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; c6d4: 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; c6d8: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; c6dc: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); c6e0: ebffff33 bl c3b4 <== NOT EXECUTED } return 1; } c6e4: e3a00001 mov r0, #1 <== NOT EXECUTED c6e8: 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 ); c6ec: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED c6f0: e2811002 add r1, r1, #2 <== NOT EXECUTED c6f4: e59f0008 ldr r0, [pc, #8] ; c704 <== NOT EXECUTED c6f8: e59f2008 ldr r2, [pc, #8] ; c708 <== NOT EXECUTED c6fc: e59f3008 ldr r3, [pc, #8] ; c70c <== NOT EXECUTED c700: ebfff913 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000cca4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { cca4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); cca8: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ccac: e24dd014 sub sp, sp, #20 ccb0: e1a06001 mov r6, r1 ccb4: e1a07002 mov r7, r2 ccb8: e1a08003 mov r8, r3 ccbc: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); ccc0: 0a000079 beq ceac if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ccc4: e599304c ldr r3, [r9, #76] ; 0x4c ccc8: e3530005 cmp r3, #5 cccc: 1a000070 bne ce94 /* * Error check arguments */ assert( source ); ccd0: e3580000 cmp r8, #0 ccd4: 0a000085 beq cef0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) ccd8: e35a0000 cmp sl, #0 ccdc: 0a000062 beq ce6c * 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 ) { cce0: e5993054 ldr r3, [r9, #84] ; 0x54 cce4: e3530000 cmp r3, #0 cce8: e08a1001 add r1, sl, r1 ccec: ba000054 blt ce44 ccf0: 0a000050 beq ce38 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ccf4: e59f520c ldr r5, [pc, #524] ; cf08 ccf8: e5954000 ldr r4, [r5] ccfc: e1a00006 mov r0, r6 cd00: e1a02004 mov r2, r4 cd04: e1a03fc2 asr r3, r2, #31 cd08: e1a01007 mov r1, r7 cd0c: e98d000c stmib sp, {r2, r3} cd10: eb002f0f bl 18954 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; cd14: e1a01007 mov r1, r7 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; cd18: e1a0b000 mov fp, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; cd1c: e99d000c ldmib sp, {r2, r3} cd20: e1a00006 mov r0, r6 cd24: eb002de0 bl 184ac <__divdi3> if ( start_offset ) { cd28: e35b0000 cmp fp, #0 cd2c: 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; cd30: e1a06000 mov r6, r0 if ( start_offset ) { cd34: 01a0a00b moveq sl, fp cd38: 1a000028 bne cde0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cd3c: e1570004 cmp r7, r4 cd40: 3a000010 bcc cd88 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); cd44: e1a00009 mov r0, r9 cd48: e1a01006 mov r1, r6 cd4c: e3a02000 mov r2, #0 cd50: ebfffdac bl c408 assert( block_ptr ); cd54: e3500000 cmp r0, #0 cd58: 0a000048 beq ce80 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 ); cd5c: e1a01008 mov r1, r8 cd60: e5900000 ldr r0, [r0] cd64: e1a02004 mov r2, r4 cd68: eb000762 bl eaf8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cd6c: 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; cd70: 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 ) { cd74: 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; cd78: e0888004 add r8, r8, r4 block++; cd7c: 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( cd80: 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 ) { cd84: 9affffee bls cd44 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { cd88: e3570000 cmp r7, #0 cd8c: 0a00000a beq cdbc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); cd90: e1a01006 mov r1, r6 cd94: e1a00009 mov r0, r9 cd98: e3a02000 mov r2, #0 cd9c: ebfffd99 bl c408 assert( block_ptr ); cda0: e3500000 cmp r0, #0 cda4: 0a00004b beq ced8 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 ); cda8: e5900000 ldr r0, [r0] cdac: e1a01008 mov r1, r8 cdb0: e1a02007 mov r2, r7 cdb4: eb00074f bl eaf8 my_length = 0; copied += to_copy; cdb8: e08aa007 add sl, sl, r7 } IMFS_mtime_ctime_update( the_jnode ); cdbc: e28d000c add r0, sp, #12 cdc0: e3a01000 mov r1, #0 cdc4: ebffd4e0 bl 214c cdc8: e59d300c ldr r3, [sp, #12] cdcc: e5893048 str r3, [r9, #72] ; 0x48 cdd0: e5893044 str r3, [r9, #68] ; 0x44 return copied; } cdd4: e1a0000a mov r0, sl cdd8: e28dd014 add sp, sp, #20 cddc: 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 ); cde0: e1a00009 mov r0, r9 cde4: e1a01006 mov r1, r6 cde8: e3a02000 mov r2, #0 cdec: ebfffd85 bl c408 assert( block_ptr ); cdf0: e3500000 cmp r0, #0 cdf4: 0a000032 beq cec4 */ 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; cdf8: 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 ); cdfc: 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; ce00: e153000a cmp r3, sl ce04: 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 ); ce08: e1a01008 mov r1, r8 ce0c: e1a02003 mov r2, r3 ce10: e080000b add r0, r0, fp ce14: e58d3000 str r3, [sp] ce18: eb000736 bl eaf8 src += to_copy; ce1c: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; copied += to_copy; ce20: 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; ce24: 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; ce28: e0888003 add r8, r8, r3 block++; ce2c: e2866001 add r6, r6, #1 my_length -= to_copy; copied += to_copy; ce30: e1a0a003 mov sl, r3 ce34: eaffffc0 b cd3c * 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 ) { ce38: e5993050 ldr r3, [r9, #80] ; 0x50 ce3c: e1530001 cmp r3, r1 ce40: 2affffab bcs ccf4 status = IMFS_memfile_extend( the_jnode, last_byte ); ce44: e1a00009 mov r0, r9 ce48: e3a02000 mov r2, #0 ce4c: ebfffeee bl ca0c if ( status ) ce50: e3500000 cmp r0, #0 ce54: 0affffa6 beq ccf4 rtems_set_errno_and_return_minus_one( ENOSPC ); ce58: eb000518 bl e2c0 <__errno> <== NOT EXECUTED ce5c: e3a0301c mov r3, #28 <== NOT EXECUTED ce60: e5803000 str r3, [r0] <== NOT EXECUTED ce64: e3e0a000 mvn sl, #0 <== NOT EXECUTED ce68: eaffffd9 b cdd4 <== 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 ); ce6c: eb000513 bl e2c0 <__errno> <== NOT EXECUTED ce70: e3a03016 mov r3, #22 <== NOT EXECUTED ce74: e5803000 str r3, [r0] <== NOT EXECUTED ce78: e3e0a000 mvn sl, #0 <== NOT EXECUTED ce7c: eaffffd4 b cdd4 <== 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 ); ce80: e59f0084 ldr r0, [pc, #132] ; cf0c <== NOT EXECUTED ce84: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED ce88: e59f2080 ldr r2, [pc, #128] ; cf10 <== NOT EXECUTED ce8c: e59f3080 ldr r3, [pc, #128] ; cf14 <== NOT EXECUTED ce90: ebfff72f bl ab54 <__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 ); ce94: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED ce98: e2811003 add r1, r1, #3 <== NOT EXECUTED ce9c: e59f0068 ldr r0, [pc, #104] ; cf0c <== NOT EXECUTED cea0: e59f2068 ldr r2, [pc, #104] ; cf10 <== NOT EXECUTED cea4: e59f306c ldr r3, [pc, #108] ; cf18 <== NOT EXECUTED cea8: ebfff729 bl ab54 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ceac: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED ceb0: e2811003 add r1, r1, #3 <== NOT EXECUTED ceb4: e59f0050 ldr r0, [pc, #80] ; cf0c <== NOT EXECUTED ceb8: e59f2050 ldr r2, [pc, #80] ; cf10 <== NOT EXECUTED cebc: e59f3058 ldr r3, [pc, #88] ; cf1c <== NOT EXECUTED cec0: ebfff723 bl ab54 <__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 ); cec4: e59f0040 ldr r0, [pc, #64] ; cf0c <== NOT EXECUTED cec8: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED cecc: e59f203c ldr r2, [pc, #60] ; cf10 <== NOT EXECUTED ced0: e59f303c ldr r3, [pc, #60] ; cf14 <== NOT EXECUTED ced4: ebfff71e bl ab54 <__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 ); ced8: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED cedc: e2811002 add r1, r1, #2 <== NOT EXECUTED cee0: e59f0024 ldr r0, [pc, #36] ; cf0c <== NOT EXECUTED cee4: e59f2024 ldr r2, [pc, #36] ; cf10 <== NOT EXECUTED cee8: e59f3024 ldr r3, [pc, #36] ; cf14 <== NOT EXECUTED ceec: ebfff718 bl ab54 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); cef0: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED cef4: e2811003 add r1, r1, #3 <== NOT EXECUTED cef8: e59f000c ldr r0, [pc, #12] ; cf0c <== NOT EXECUTED cefc: e59f200c ldr r2, [pc, #12] ; cf10 <== NOT EXECUTED cf00: e59f3018 ldr r3, [pc, #24] ; cf20 <== NOT EXECUTED cf04: ebfff712 bl ab54 <__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: eb0036a7 bl f2d4 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: eb002422 bl a8d8 /* * 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: eb002092 bl 9ae0 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: eb003281 bl e2c0 <__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: eb00327a bl e2c0 <__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: eb00326d bl e2c0 <__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: eb003b3e bl 12a9c 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: eb003e41 bl 136f0 <== 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: eb003ac2 bl 12918 <== 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: eb003ad5 bl 12988 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: ea00421e b 146b8 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: eb003ab0 bl 12918 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: eb003e1f bl 136f0 <== 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: eb003e14 bl 136f0 <== 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: eb003a94 bl 12918 (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: eb003a8d bl 12918 <== 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: eb00324c bl e2c0 <__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 =============================================================================== 0000aa60 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; aa60: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { aa64: e593204c ldr r2, [r3, #76] ; 0x4c aa68: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { aa6c: e92d4030 push {r4, r5, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { aa70: e3520005 cmp r2, #5 aa74: 979ff102 ldrls pc, [pc, r2, lsl #2] aa78: ea00002a b ab28 <== NOT EXECUTED aa7c: 0000ab14 .word 0x0000ab14 <== NOT EXECUTED aa80: 0000ab28 .word 0x0000ab28 <== NOT EXECUTED aa84: 0000aa94 .word 0x0000aa94 <== NOT EXECUTED aa88: 0000ab3c .word 0x0000ab3c <== NOT EXECUTED aa8c: 0000ab3c .word 0x0000ab3c <== NOT EXECUTED aa90: 0000aa94 .word 0x0000aa94 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; aa94: e3a04000 mov r4, #0 <== NOT EXECUTED aa98: e3a05000 mov r5, #0 <== NOT EXECUTED aa9c: e5814020 str r4, [r1, #32] <== NOT EXECUTED aaa0: 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; aaa4: e5932030 ldr r2, [r3, #48] ; 0x30 aaa8: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; aaac: e5932038 ldr r2, [r3, #56] ; 0x38 aab0: 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; aab4: e5932040 ldr r2, [r3, #64] ; 0x40 aab8: 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 ); aabc: e5902010 ldr r2, [r0, #16] aac0: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; aac4: 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 ); aac8: 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; aacc: e59f207c ldr r2, [pc, #124] ; ab50 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; aad0: 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; aad4: e5924000 ldr r4, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; aad8: e3a02cff mov r2, #65280 ; 0xff00 aadc: 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; aae0: 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 = aae4: 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; aae8: 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; aaec: 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; aaf0: 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; aaf4: 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; aaf8: 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; aafc: e5810038 str r0, [r1, #56] ; 0x38 buf->st_blksize = imfs_rq_memfile_bytes_per_block; ab00: 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 = ab04: 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; ab08: 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; ab0c: e3a00000 mov r0, #0 return 0; } ab10: 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 ); ab14: e2832050 add r2, r3, #80 ; 0x50 ab18: e8921004 ldm r2, {r2, ip} ab1c: e581c01c str ip, [r1, #28] ab20: e5812018 str r2, [r1, #24] break; ab24: eaffffde b aaa4 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ab28: eb000de4 bl e2c0 <__errno> <== NOT EXECUTED ab2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED ab30: e5803000 str r3, [r0] <== NOT EXECUTED ab34: e3e00000 mvn r0, #0 <== NOT EXECUTED ab38: 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; ab3c: e2835050 add r5, r3, #80 ; 0x50 ab40: e8950030 ldm r5, {r4, r5} ab44: e5814020 str r4, [r1, #32] ab48: e5815024 str r5, [r1, #36] ; 0x24 break; ab4c: eaffffd4 b aaa4 =============================================================================== 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: eb00362d bl f2d4 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: eb0023a8 bl a8d8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 1a34: e1a00005 mov r0, r5 1a38: eb003611 bl f284 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: eb00201d bl 9ae0 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: eb00320d bl e2c0 <__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: eb002047 bl 9c28 /* * 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: eb0031d6 bl e2c0 <__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: eb0031c6 bl e2c0 <__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: eb0031c1 bl e2c0 <__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: eb0010a0 bl 662c <_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: eb0013a2 bl 724c <_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: eb003203 bl ebe8 * 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: eb000e7a bl 5de0 <== 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: e59a80f0 ldr r8, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 611c: e28a50c0 add r5, sl, #192 ; 0xc0 <== 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 =============================================================================== 00042698 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 42698: 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; 4269c: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 426a0: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED 426a4: e58d1020 str r1, [sp, #32] <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 426a8: e5c26000 strb r6, [r2] <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 426ac: e28d1024 add r1, sp, #36 ; 0x24 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 426b0: e58d201c str r2, [sp, #28] <== NOT EXECUTED 426b4: e1a04003 mov r4, r3 <== NOT EXECUTED 426b8: e58d0014 str r0, [sp, #20] <== NOT EXECUTED *found = false; /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 426bc: ebfffeec bl 42274 <== NOT EXECUTED if (rc > 0) 426c0: e3500000 cmp r0, #0 <== NOT EXECUTED 426c4: da000001 ble 426d0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 426c8: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED 426cc: 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; 426d0: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED 426d4: e5910000 ldr r0, [r1] <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) 426d8: e0905584 adds r5, r0, r4, lsl #11 <== NOT EXECUTED 426dc: 41a05006 movmi r5, r6 <== NOT EXECUTED 426e0: 4a000003 bmi 426f4 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 426e4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 426e8: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 426ec: e1550003 cmp r5, r3 <== NOT EXECUTED end_bit = control->size - 1; 426f0: 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]; 426f4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED 426f8: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED 426fc: e1a02540 asr r2, r0, #10 <== NOT EXECUTED 42700: e0833102 add r3, r3, r2, lsl #2 <== NOT EXECUTED map_bits = &map[map_index]; 42704: e59d9024 ldr r9, [sp, #36] ; 0x24 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 42708: 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)) 4270c: 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); 42710: e1a0a2c0 asr sl, r0, #5 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 42714: 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)) 42718: 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]; 4271c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED map_bits = &map[map_index]; 42720: 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); 42724: 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); 42728: 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)) 4272c: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 42730: e59cc000 ldr ip, [ip] <== NOT EXECUTED 42734: e35c0000 cmp ip, #0 <== NOT EXECUTED 42738: e58dc000 str ip, [sp] <== NOT EXECUTED 4273c: 0a00003a beq 4282c <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 42740: e1a01284 lsl r1, r4, #5 <== NOT EXECUTED 42744: e08ab004 add fp, sl, r4 <== NOT EXECUTED 42748: e58d1018 str r1, [sp, #24] <== NOT EXECUTED 4274c: 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); 42750: 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) 42754: e358001f cmp r8, #31 <== NOT EXECUTED 42758: 8a00003f bhi 4285c <== 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); 4275c: 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)) 42760: e59dc000 ldr ip, [sp] <== NOT EXECUTED 42764: 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); 42768: 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)) 4276c: 0a000013 beq 427c0 <== 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); 42770: 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)) 42774: e5997000 ldr r7, [r9] <== NOT EXECUTED 42778: e1110007 tst r1, r7 <== NOT EXECUTED 4277c: 1a00004a bne 428ac <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 42780: e1550000 cmp r5, r0 <== NOT EXECUTED 42784: 10833004 addne r3, r3, r4 <== NOT EXECUTED 42788: 10802004 addne r2, r0, r4 <== NOT EXECUTED 4278c: 1a000009 bne 427b8 <== NOT EXECUTED 42790: ea00000a b 427c0 <== 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); 42794: e1a01316 lsl r1, r6, r3 <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 42798: 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)) 4279c: 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); 427a0: e0822004 add r2, r2, r4 <== NOT EXECUTED 427a4: e0833004 add r3, r3, r4 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 427a8: 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)) 427ac: 1a00003e bne 428ac <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 427b0: e155000c cmp r5, ip <== NOT EXECUTED 427b4: 0a000001 beq 427c0 <== 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) 427b8: e353001f cmp r3, #31 <== NOT EXECUTED 427bc: 9afffff4 bls 42794 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 427c0: e3540000 cmp r4, #0 <== NOT EXECUTED 427c4: d3a0001f movle r0, #31 <== NOT EXECUTED 427c8: 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)) 427cc: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 427d0: d1a03000 movle r3, r0 <== NOT EXECUTED 427d4: c1a03000 movgt r3, r0 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 427d8: e08b0000 add r0, fp, r0 <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 427dc: e1550000 cmp r5, r0 <== NOT EXECUTED 427e0: b3a02000 movlt r2, #0 <== NOT EXECUTED 427e4: a2022001 andge r2, r2, #1 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 427e8: 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)) 427ec: e3520000 cmp r2, #0 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 427f0: e0899001 add r9, r9, r1 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 427f4: 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)) 427f8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 427fc: 1a00004c bne 42934 <== NOT EXECUTED 42800: e1550000 cmp r5, r0 <== NOT EXECUTED 42804: c3a01000 movgt r1, #0 <== NOT EXECUTED 42808: d3a01001 movle r1, #1 <== NOT EXECUTED 4280c: e3540000 cmp r4, #0 <== NOT EXECUTED 42810: d3a01000 movle r1, #0 <== NOT EXECUTED 42814: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED 42818: e3510000 cmp r1, #0 <== NOT EXECUTED 4281c: e08bb00c add fp, fp, ip <== NOT EXECUTED 42820: 1a000037 bne 42904 <== NOT EXECUTED 42824: e0848008 add r8, r4, r8 <== NOT EXECUTED 42828: eaffffc9 b 42754 <== 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) 4282c: 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; 42830: 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; 42834: 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; 42838: 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; 4283c: 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); 42840: 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 (); 42844: 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; 42848: 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 (); 4284c: 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; 42850: d3a0301f movle r3, #31 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; 42854: 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; 42858: e0899102 add r9, r9, r2, lsl #2 <== NOT EXECUTED map_index += direction * bits_skipped; } search_bits += direction; 4285c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 42860: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 42864: e3540000 cmp r4, #0 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 42868: e0811002 add r1, r1, r2 <== NOT EXECUTED 4286c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 42870: da000029 ble 4291c <== NOT EXECUTED 42874: e1550000 cmp r5, r0 <== NOT EXECUTED 42878: c3a01000 movgt r1, #0 <== NOT EXECUTED 4287c: d3a01001 movle r1, #1 <== NOT EXECUTED 42880: e3a02000 mov r2, #0 <== NOT EXECUTED 42884: e3a08000 mov r8, #0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 42888: e1110002 tst r1, r2 <== NOT EXECUTED 4288c: 1affffa6 bne 4272c <== NOT EXECUTED 42890: e1550000 cmp r5, r0 <== NOT EXECUTED 42894: a3540000 cmpge r4, #0 <== NOT EXECUTED 42898: d3a02000 movle r2, #0 <== NOT EXECUTED 4289c: c3a02001 movgt r2, #1 <== NOT EXECUTED 428a0: caffffa1 bgt 4272c <== NOT EXECUTED 428a4: e1a00002 mov r0, r2 <== NOT EXECUTED 428a8: eaffff86 b 426c8 <== 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); 428ac: 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, 428b0: 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); 428b4: 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, 428b8: 059d1008 ldreq r1, [sp, #8] <== NOT EXECUTED 428bc: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 428c0: 05913000 ldreq r3, [r1] <== NOT EXECUTED 428c4: 01c33002 biceq r3, r3, r2 <== NOT EXECUTED 428c8: 05813000 streq r3, [r1] <== NOT EXECUTED 1 << search_offset); control->free--; 428cc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 428d0: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED 428d4: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED 428d8: e2411001 sub r1, r1, #1 <== NOT EXECUTED 428dc: e58c1010 str r1, [ip, #16] <== NOT EXECUTED *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 428e0: 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; 428e4: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED *found = true; 428e8: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED 428ec: 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; 428f0: e5810000 str r0, [r1] <== NOT EXECUTED *found = true; 428f4: e5cc3000 strb r3, [ip] <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 428f8: e3a00000 mov r0, #0 <== NOT EXECUTED 428fc: e5c23000 strb r3, [r2] <== NOT EXECUTED 42900: eaffff70 b 426c8 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 42904: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 42908: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 4290c: e08cc001 add ip, ip, r1 <== NOT EXECUTED 42910: e58dc008 str ip, [sp, #8] <== NOT EXECUTED 42914: e3a01001 mov r1, #1 <== NOT EXECUTED 42918: eaffffd9 b 42884 <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 4291c: e1550000 cmp r5, r0 <== NOT EXECUTED 42920: c3a01000 movgt r1, #0 <== NOT EXECUTED 42924: d3a01001 movle r1, #1 <== NOT EXECUTED 42928: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 4292c: e3a0801f mov r8, #31 <== NOT EXECUTED 42930: eaffffd4 b 42888 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 42934: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED 42938: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 4293c: e08cc001 add ip, ip, r1 <== NOT EXECUTED 42940: e58dc008 str ip, [sp, #8] <== NOT EXECUTED 42944: e1550000 cmp r5, r0 <== NOT EXECUTED 42948: c3a01000 movgt r1, #0 <== NOT EXECUTED 4294c: d3a01001 movle r1, #1 <== NOT EXECUTED 42950: e3a02001 mov r2, #1 <== NOT EXECUTED 42954: e3a0801f mov r8, #31 <== NOT EXECUTED 42958: eaffffca b 42888 <== NOT EXECUTED =============================================================================== 00000454 <_Barrier_Manager_initialization>: #include #include void _Barrier_Manager_initialization(void) { } 454: e12fff1e bx lr =============================================================================== 0000b980 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; b980: e59f3138 ldr r3, [pc, #312] ; bac0 <_CORE_mutex_Seize_interrupt_trylock+0x140> b984: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; b988: e3a02000 mov r2, #0 b98c: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { b990: e590c050 ldr ip, [r0, #80] ; 0x50 b994: e15c0002 cmp ip, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { b998: e92d4070 push {r4, r5, r6, lr} b99c: 0a00000e beq b9dc <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; b9a0: e5802050 str r2, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; b9a4: e590c048 ldr ip, [r0, #72] ; 0x48 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; b9a8: e5935008 ldr r5, [r3, #8] the_mutex->nest_count = 1; b9ac: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || b9b0: e35c0002 cmp ip, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; b9b4: e5805060 str r5, [r0, #96] ; 0x60 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; b9b8: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; b9bc: e5804054 str r4, [r0, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || b9c0: 0a00000a beq b9f0 <_CORE_mutex_Seize_interrupt_trylock+0x70> b9c4: e35c0003 cmp ip, #3 b9c8: 0a000019 beq ba34 <_CORE_mutex_Seize_interrupt_trylock+0xb4> b9cc: e5913000 ldr r3, [r1] b9d0: e129f003 msr CPSR_fc, r3 b9d4: e3a00000 mov r0, #0 b9d8: e8bd8070 pop {r4, r5, r6, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { b9dc: e590205c ldr r2, [r0, #92] ; 0x5c b9e0: e1530002 cmp r3, r2 b9e4: 0a000008 beq ba0c <_CORE_mutex_Seize_interrupt_trylock+0x8c> b9e8: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } b9ec: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; b9f0: e593201c ldr r2, [r3, #28] b9f4: e2822001 add r2, r2, #1 b9f8: e583201c str r2, [r3, #28] b9fc: e5913000 ldr r3, [r1] ba00: e129f003 msr CPSR_fc, r3 ba04: e3a00000 mov r0, #0 ba08: e8bd8070 pop {r4, r5, r6, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ba0c: e5902040 ldr r2, [r0, #64] ; 0x40 ba10: e3520000 cmp r2, #0 ba14: 1a000017 bne ba78 <_CORE_mutex_Seize_interrupt_trylock+0xf8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ba18: e5903054 ldr r3, [r0, #84] ; 0x54 ba1c: e2833001 add r3, r3, #1 ba20: e5803054 str r3, [r0, #84] ; 0x54 ba24: e5913000 ldr r3, [r1] ba28: e129f003 msr CPSR_fc, r3 ba2c: e3a00000 mov r0, #0 ba30: e8bd8070 pop {r4, r5, r6, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ba34: e593c01c ldr ip, [r3, #28] ba38: e08c5004 add r5, ip, r4 ba3c: e583501c str r5, [r3, #28] { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; ba40: e5935014 ldr r5, [r3, #20] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ba44: e590604c ldr r6, [r0, #76] ; 0x4c current = executing->current_priority; if ( current == ceiling ) { ba48: e1560005 cmp r6, r5 ba4c: 0affffde beq b9cc <_CORE_mutex_Seize_interrupt_trylock+0x4c> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { ba50: 3a00000d bcc ba8c <_CORE_mutex_Seize_interrupt_trylock+0x10c> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ba54: e3a05006 mov r5, #6 ba58: e5835034 str r5, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ ba5c: e5802054 str r2, [r0, #84] ; 0x54 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; ba60: e5804050 str r4, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ ba64: e583c01c str ip, [r3, #28] ba68: e5913000 ldr r3, [r1] ba6c: e129f003 msr CPSR_fc, r3 ba70: e3a00000 mov r0, #0 ba74: e8bd8070 pop {r4, r5, r6, pc} * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ba78: e3520001 cmp r2, #1 ba7c: 1affffd9 bne b9e8 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ba80: e3a02002 mov r2, #2 <== NOT EXECUTED ba84: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED ba88: eaffffcf b b9cc <_CORE_mutex_Seize_interrupt_trylock+0x4c> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ba8c: e59f3030 ldr r3, [pc, #48] ; bac4 <_CORE_mutex_Seize_interrupt_trylock+0x144> ba90: e5932000 ldr r2, [r3] ba94: e2822001 add r2, r2, #1 ba98: e5832000 str r2, [r3] ba9c: e5913000 ldr r3, [r1] baa0: e129f003 msr CPSR_fc, r3 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( baa4: e3a02000 mov r2, #0 baa8: e590104c ldr r1, [r0, #76] ; 0x4c baac: e590005c ldr r0, [r0, #92] ; 0x5c bab0: ebffedfb bl 72a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); bab4: ebffef65 bl 7850 <_Thread_Enable_dispatch> bab8: e3a00000 mov r0, #0 babc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 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 =============================================================================== 0000bb3c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb3c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} bb40: 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; bb44: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb48: e24dd01c sub sp, sp, #28 bb4c: 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 ) { bb50: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb54: 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 ) { bb58: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { bb5c: 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; bb60: 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; bb64: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { bb68: 2a000076 bcs bd48 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { bb6c: e3530000 cmp r3, #0 bb70: 1a000072 bne bd40 <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bb74: e157000a cmp r7, sl bb78: 03a06000 moveq r6, #0 bb7c: 0a000074 beq bd54 <_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; bb80: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bb84: 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; bb88: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bb8c: 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; bb90: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bb94: e58d1014 str r1, [sp, #20] bb98: ea000004 b bbb0 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { bb9c: e3540000 cmp r4, #0 bba0: 1a000059 bne bd0c <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next; bba4: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bba8: e157000a cmp r7, sl bbac: 0a000068 beq bd54 <_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 ) { bbb0: e59a9004 ldr r9, [sl, #4] bbb4: e59d2000 ldr r2, [sp] bbb8: e1520009 cmp r2, r9 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; bbbc: 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 ) { bbc0: 2afffff7 bcs bba4 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { bbc4: 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; bbc8: 028a4008 addeq r4, sl, #8 bbcc: 0afffff2 beq bb9c <_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; bbd0: 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; bbd4: e3c99001 bic r9, r9, #1 bbd8: 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; bbdc: 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; bbe0: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; bbe4: 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; bbe8: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bbec: 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; bbf0: e0633002 rsb r3, r3, r2 bbf4: e1a01008 mov r1, r8 bbf8: e0839009 add r9, r3, r9 bbfc: eb002f7d bl 179f8 <__umodsi3> bc00: 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; bc04: 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 ) { bc08: e1590004 cmp r9, r4 bc0c: e58d3008 str r3, [sp, #8] bc10: 2a000003 bcs bc24 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); bc14: e1a00009 mov r0, r9 bc18: e1a01008 mov r1, r8 bc1c: eb002f75 bl 179f8 <__umodsi3> bc20: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { bc24: e35b0000 cmp fp, #0 bc28: 0a000025 beq bcc4 <_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; bc2c: e0849005 add r9, r4, r5 bc30: e1a00009 mov r0, r9 bc34: e1a0100b mov r1, fp bc38: eb002f6e bl 179f8 <__umodsi3> bc3c: 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 ) { bc40: e1590000 cmp r9, r0 bc44: 93a03000 movls r3, #0 bc48: 83a03001 movhi r3, #1 bc4c: e1540000 cmp r4, r0 bc50: 23a03000 movcs r3, #0 bc54: e3530000 cmp r3, #0 bc58: 0a000019 beq bcc4 <_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; bc5c: e59d1008 ldr r1, [sp, #8] bc60: 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 ) { bc64: e1590000 cmp r9, r0 bc68: 958d6018 strls r6, [sp, #24] bc6c: 9a000002 bls bc7c <_Heap_Allocate_aligned_with_boundary+0x140> bc70: eaffffcb b bba4 <_Heap_Allocate_aligned_with_boundary+0x68> bc74: e1590000 cmp r9, r0 bc78: 8a000037 bhi bd5c <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; bc7c: e0654000 rsb r4, r5, r0 bc80: e1a01008 mov r1, r8 bc84: e1a00004 mov r0, r4 bc88: eb002f5a bl 179f8 <__umodsi3> bc8c: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; bc90: e0846005 add r6, r4, r5 bc94: e1a00006 mov r0, r6 bc98: e1a0100b mov r1, fp bc9c: eb002f55 bl 179f8 <__umodsi3> bca0: 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 ) { bca4: e1560000 cmp r6, r0 bca8: 93a03000 movls r3, #0 bcac: 83a03001 movhi r3, #1 bcb0: e1540000 cmp r4, r0 bcb4: 23a03000 movcs r3, #0 bcb8: e3530000 cmp r3, #0 bcbc: 1affffec bne bc74 <_Heap_Allocate_aligned_with_boundary+0x138> bcc0: 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 ) { bcc4: e59d2008 ldr r2, [sp, #8] bcc8: e1520004 cmp r2, r4 bccc: 8affffb4 bhi bba4 <_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; bcd0: e59d100c ldr r1, [sp, #12] bcd4: e1a00004 mov r0, r4 bcd8: eb002f46 bl 179f8 <__umodsi3> bcdc: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 bce0: e28998ff add r9, r9, #16711680 ; 0xff0000 bce4: e2899cff add r9, r9, #65280 ; 0xff00 bce8: e28990f8 add r9, r9, #248 ; 0xf8 bcec: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { bcf0: e59d1004 ldr r1, [sp, #4] bcf4: e0603009 rsb r3, r0, r9 bcf8: e1590000 cmp r9, r0 bcfc: 11510003 cmpne r1, r3 bd00: 8affffa7 bhi bba4 <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { bd04: e3540000 cmp r4, #0 bd08: 0affffa5 beq bba4 <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; bd0c: e597304c ldr r3, [r7, #76] ; 0x4c bd10: e0833006 add r3, r3, r6 bd14: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); bd18: e1a0100a mov r1, sl bd1c: e1a03005 mov r3, r5 bd20: e1a00007 mov r0, r7 bd24: e1a02004 mov r2, r4 bd28: ebffead7 bl 688c <_Heap_Block_allocate> bd2c: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; bd30: e5973044 ldr r3, [r7, #68] ; 0x44 bd34: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; bd38: 35876044 strcc r6, [r7, #68] ; 0x44 bd3c: ea000002 b bd4c <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { bd40: e1550003 cmp r5, r3 bd44: 9a000006 bls bd64 <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; bd48: e3a00000 mov r0, #0 } return (void *) alloc_begin; } bd4c: e28dd01c add sp, sp, #28 bd50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { bd54: e3a00000 mov r0, #0 bd58: eafffff4 b bd30 <_Heap_Allocate_aligned_with_boundary+0x1f4> bd5c: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED bd60: eaffff8f b bba4 <_Heap_Allocate_aligned_with_boundary+0x68><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { bd64: e3580000 cmp r8, #0 bd68: 01a08002 moveq r8, r2 bd6c: eaffff80 b bb74 <_Heap_Allocate_aligned_with_boundary+0x38> =============================================================================== 0000763c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 763c: 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() ) ) { 7640: e59f35dc ldr r3, [pc, #1500] ; 7c24 <_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; 7644: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 7648: 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; 764c: e59f25d4 ldr r2, [pc, #1492] ; 7c28 <_Heap_Walk+0x5ec> 7650: e59fa5d4 ldr sl, [pc, #1492] ; 7c2c <_Heap_Walk+0x5f0> 7654: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 7658: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 765c: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 7660: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 7664: e24dd03c sub sp, sp, #60 ; 0x3c 7668: e1a04000 mov r4, r0 766c: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 7670: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 7674: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 7678: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 767c: 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() ) ) { 7680: 0a000002 beq 7690 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7684: e3a00001 mov r0, #1 block = next_block; } return true; } 7688: e28dd03c add sp, sp, #60 ; 0x3c 768c: 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)( 7690: e5900018 ldr r0, [r0, #24] 7694: e594101c ldr r1, [r4, #28] 7698: e2842008 add r2, r4, #8 769c: e892000c ldm r2, {r2, r3} 76a0: e59dc024 ldr ip, [sp, #36] ; 0x24 76a4: e98d0003 stmib sp, {r0, r1} 76a8: e58d2014 str r2, [sp, #20] 76ac: e58d3018 str r3, [sp, #24] 76b0: e59f2578 ldr r2, [pc, #1400] ; 7c30 <_Heap_Walk+0x5f4> 76b4: e58db000 str fp, [sp] 76b8: e58d500c str r5, [sp, #12] 76bc: e58dc010 str ip, [sp, #16] 76c0: e1a00008 mov r0, r8 76c4: e3a01000 mov r1, #0 76c8: e59d3020 ldr r3, [sp, #32] 76cc: e1a0e00f mov lr, pc 76d0: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 76d4: e59d2020 ldr r2, [sp, #32] 76d8: e3520000 cmp r2, #0 76dc: 0a000032 beq 77ac <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 76e0: e59d3020 ldr r3, [sp, #32] 76e4: e2139003 ands r9, r3, #3 76e8: 1a000036 bne 77c8 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 76ec: e1a0000b mov r0, fp 76f0: e59d1020 ldr r1, [sp, #32] 76f4: ebffe547 bl c18 <__umodsi3> 76f8: e2506000 subs r6, r0, #0 76fc: 1a000038 bne 77e4 <_Heap_Walk+0x1a8> ); return false; } if ( 7700: e2850008 add r0, r5, #8 7704: e59d1020 ldr r1, [sp, #32] 7708: ebffe542 bl c18 <__umodsi3> 770c: e2509000 subs r9, r0, #0 7710: 1a00003b bne 7804 <_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; 7714: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 7718: e2176001 ands r6, r7, #1 771c: 0a000040 beq 7824 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 7720: e5953000 ldr r3, [r5] 7724: e59dc020 ldr ip, [sp, #32] 7728: e15c0003 cmp ip, r3 772c: 1a000016 bne 778c <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 7730: e59d2024 ldr r2, [sp, #36] ; 0x24 7734: e5923004 ldr r3, [r2, #4] 7738: e3c33001 bic r3, r3, #1 773c: e0823003 add r3, r2, r3 7740: e5939004 ldr r9, [r3, #4] 7744: e2199001 ands r9, r9, #1 7748: 0a000114 beq 7ba0 <_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; 774c: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7750: 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 ) { 7754: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 7758: 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 ) { 775c: 0a00006e beq 791c <_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; 7760: 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 7764: e1520009 cmp r2, r9 7768: 9a000034 bls 7840 <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 776c: e1a00008 mov r0, r8 7770: e1a03009 mov r3, r9 7774: e3a01001 mov r1, #1 7778: e59f24b4 ldr r2, [pc, #1204] ; 7c34 <_Heap_Walk+0x5f8> 777c: e1a0e00f mov lr, pc 7780: e12fff1a bx sl 7784: e3a00000 mov r0, #0 7788: eaffffbe b 7688 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 778c: e1a00008 mov r0, r8 7790: e58dc000 str ip, [sp] 7794: e3a01001 mov r1, #1 7798: e59f2498 ldr r2, [pc, #1176] ; 7c38 <_Heap_Walk+0x5fc> 779c: e1a0e00f mov lr, pc 77a0: e12fff1a bx sl 77a4: e1a00009 mov r0, r9 77a8: eaffffb6 b 7688 <_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" ); 77ac: e1a00008 mov r0, r8 77b0: e3a01001 mov r1, #1 77b4: e59f2480 ldr r2, [pc, #1152] ; 7c3c <_Heap_Walk+0x600> 77b8: e1a0e00f mov lr, pc 77bc: e12fff1a bx sl 77c0: e59d0020 ldr r0, [sp, #32] 77c4: eaffffaf b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 77c8: e1a00008 mov r0, r8 77cc: e3a01001 mov r1, #1 77d0: e59f2468 ldr r2, [pc, #1128] ; 7c40 <_Heap_Walk+0x604> 77d4: e1a0e00f mov lr, pc 77d8: e12fff1a bx sl 77dc: e3a00000 mov r0, #0 77e0: eaffffa8 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 77e4: e1a00008 mov r0, r8 77e8: e1a0300b mov r3, fp 77ec: e3a01001 mov r1, #1 77f0: e59f244c ldr r2, [pc, #1100] ; 7c44 <_Heap_Walk+0x608> 77f4: e1a0e00f mov lr, pc 77f8: e12fff1a bx sl 77fc: e1a00009 mov r0, r9 7800: eaffffa0 b 7688 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 7804: e1a00008 mov r0, r8 7808: e1a03005 mov r3, r5 780c: e3a01001 mov r1, #1 7810: e59f2430 ldr r2, [pc, #1072] ; 7c48 <_Heap_Walk+0x60c> 7814: e1a0e00f mov lr, pc 7818: e12fff1a bx sl 781c: e1a00006 mov r0, r6 7820: eaffff98 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 7824: e1a00008 mov r0, r8 7828: e3a01001 mov r1, #1 782c: e59f2418 ldr r2, [pc, #1048] ; 7c4c <_Heap_Walk+0x610> 7830: e1a0e00f mov lr, pc 7834: e12fff1a bx sl 7838: e1a00006 mov r0, r6 783c: eaffff91 b 7688 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 7840: 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 7844: e159000c cmp r9, ip && (uintptr_t) block <= (uintptr_t) heap->last_block; 7848: 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 784c: 8affffc6 bhi 776c <_Heap_Walk+0x130> ); return false; } if ( 7850: e2890008 add r0, r9, #8 7854: e1a01003 mov r1, r3 7858: e58d201c str r2, [sp, #28] 785c: ebffe4ed bl c18 <__umodsi3> 7860: e3500000 cmp r0, #0 7864: e59d201c ldr r2, [sp, #28] 7868: 1a0000d3 bne 7bbc <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 786c: e5993004 ldr r3, [r9, #4] 7870: e3c33001 bic r3, r3, #1 7874: e0893003 add r3, r9, r3 7878: e5933004 ldr r3, [r3, #4] 787c: e3130001 tst r3, #1 7880: 1a0000df bne 7c04 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 7884: e599c00c ldr ip, [r9, #12] 7888: e15c0004 cmp ip, r4 788c: 1a0000d3 bne 7be0 <_Heap_Walk+0x5a4> 7890: e58d7030 str r7, [sp, #48] ; 0x30 7894: e58db034 str fp, [sp, #52] ; 0x34 7898: e59d702c ldr r7, [sp, #44] ; 0x2c 789c: e59db028 ldr fp, [sp, #40] ; 0x28 78a0: e58d502c str r5, [sp, #44] ; 0x2c 78a4: e58d6038 str r6, [sp, #56] ; 0x38 78a8: e1a0500c mov r5, ip 78ac: e58d4028 str r4, [sp, #40] ; 0x28 78b0: e1a06002 mov r6, r2 78b4: ea000011 b 7900 <_Heap_Walk+0x2c4> 78b8: e1560009 cmp r6, r9 78bc: 8affffaa bhi 776c <_Heap_Walk+0x130> 78c0: e1590007 cmp r9, r7 ); return false; } if ( 78c4: e2890008 add r0, r9, #8 78c8: e1a0100b mov r1, fp 78cc: 8affffa6 bhi 776c <_Heap_Walk+0x130> 78d0: ebffe4d0 bl c18 <__umodsi3> 78d4: e3500000 cmp r0, #0 78d8: 1a0000b7 bne 7bbc <_Heap_Walk+0x580> ); return false; } if ( _Heap_Is_used( free_block ) ) { 78dc: e5993004 ldr r3, [r9, #4] 78e0: e3c33001 bic r3, r3, #1 78e4: e0833009 add r3, r3, r9 78e8: e5933004 ldr r3, [r3, #4] 78ec: e3130001 tst r3, #1 78f0: 1a0000c3 bne 7c04 <_Heap_Walk+0x5c8> ); return false; } if ( free_block->prev != prev_block ) { 78f4: e599200c ldr r2, [r9, #12] 78f8: e1540002 cmp r4, r2 78fc: 1a0000b6 bne 7bdc <_Heap_Walk+0x5a0> (*printer)( 7900: e1a04009 mov r4, r9 return false; } prev_block = free_block; free_block = free_block->next; 7904: 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 ) { 7908: e1550009 cmp r5, r9 790c: 1affffe9 bne 78b8 <_Heap_Walk+0x27c> 7910: e28d4028 add r4, sp, #40 ; 0x28 7914: e89408b0 ldm r4, {r4, r5, r7, fp} 7918: e59d6038 ldr r6, [sp, #56] ; 0x38 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 791c: e59d3024 ldr r3, [sp, #36] ; 0x24 7920: 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)" : ""), 7924: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7928: 0affff55 beq 7684 <_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; 792c: 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 ) { 7930: 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); 7934: e0876005 add r6, r7, r5 7938: 0a000012 beq 7988 <_Heap_Walk+0x34c> (*printer)( 793c: e1a03005 mov r3, r5 7940: e58d7000 str r7, [sp] 7944: e1a00008 mov r0, r8 7948: e3a01000 mov r1, #0 794c: e59f22fc ldr r2, [pc, #764] ; 7c50 <_Heap_Walk+0x614> 7950: e1a0e00f mov lr, pc 7954: 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 7958: e5943020 ldr r3, [r4, #32] 795c: e1530006 cmp r3, r6 7960: 9a000013 bls 79b4 <_Heap_Walk+0x378> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 7964: e1a00008 mov r0, r8 7968: e58d6000 str r6, [sp] 796c: e1a03005 mov r3, r5 7970: e3a01001 mov r1, #1 7974: e59f22d8 ldr r2, [pc, #728] ; 7c54 <_Heap_Walk+0x618> 7978: e1a0e00f mov lr, pc 797c: e12fff1a bx sl 7980: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 7984: eaffff3f b 7688 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7988: e58d7000 str r7, [sp] 798c: e5953000 ldr r3, [r5] 7990: e1a00008 mov r0, r8 7994: e58d3004 str r3, [sp, #4] 7998: e59f22b8 ldr r2, [pc, #696] ; 7c58 <_Heap_Walk+0x61c> 799c: e1a03005 mov r3, r5 79a0: e1a0e00f mov lr, pc 79a4: e12fff1a bx sl 79a8: e5943020 ldr r3, [r4, #32] 79ac: e1530006 cmp r3, r6 79b0: 8affffeb bhi 7964 <_Heap_Walk+0x328> 79b4: e5943024 ldr r3, [r4, #36] ; 0x24 79b8: e1530006 cmp r3, r6 79bc: 3affffe8 bcc 7964 <_Heap_Walk+0x328> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 79c0: e1a00007 mov r0, r7 79c4: e59d1020 ldr r1, [sp, #32] 79c8: ebffe492 bl c18 <__umodsi3> 79cc: e2509000 subs r9, r0, #0 79d0: 1a000055 bne 7b2c <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 79d4: e59d2028 ldr r2, [sp, #40] ; 0x28 79d8: e1520007 cmp r2, r7 79dc: 8a00005b bhi 7b50 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin ) { 79e0: e1550006 cmp r5, r6 79e4: 2a000064 bcs 7b7c <_Heap_Walk+0x540> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 79e8: e5963004 ldr r3, [r6, #4] 79ec: e3130001 tst r3, #1 79f0: 1a000036 bne 7ad0 <_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; 79f4: 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)( 79f8: 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; 79fc: 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; 7a00: 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; 7a04: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 7a08: 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); 7a0c: 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; 7a10: 059f0244 ldreq r0, [pc, #580] ; 7c5c <_Heap_Walk+0x620> 7a14: 0a000003 beq 7a28 <_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)" : ""), 7a18: e59f3240 ldr r3, [pc, #576] ; 7c60 <_Heap_Walk+0x624> 7a1c: e1520004 cmp r2, r4 7a20: e59f023c ldr r0, [pc, #572] ; 7c64 <_Heap_Walk+0x628> 7a24: 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)( 7a28: e5953008 ldr r3, [r5, #8] 7a2c: e1510003 cmp r1, r3 7a30: 059f1230 ldreq r1, [pc, #560] ; 7c68 <_Heap_Walk+0x62c> 7a34: 0a000003 beq 7a48 <_Heap_Walk+0x40c> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 7a38: e59fc220 ldr ip, [pc, #544] ; 7c60 <_Heap_Walk+0x624> 7a3c: e1530004 cmp r3, r4 7a40: e59f1224 ldr r1, [pc, #548] ; 7c6c <_Heap_Walk+0x630> 7a44: 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)( 7a48: e58d2000 str r2, [sp] 7a4c: e98d0009 stmib sp, {r0, r3} 7a50: e58d100c str r1, [sp, #12] 7a54: e1a03005 mov r3, r5 7a58: e1a00008 mov r0, r8 7a5c: e3a01000 mov r1, #0 7a60: e59f2208 ldr r2, [pc, #520] ; 7c70 <_Heap_Walk+0x634> 7a64: e1a0e00f mov lr, pc 7a68: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7a6c: e5993000 ldr r3, [r9] 7a70: e1570003 cmp r7, r3 7a74: 0a00000a beq 7aa4 <_Heap_Walk+0x468> (*printer)( 7a78: e58d3004 str r3, [sp, #4] 7a7c: e1a00008 mov r0, r8 7a80: e58d7000 str r7, [sp] 7a84: e58d9008 str r9, [sp, #8] 7a88: e1a03005 mov r3, r5 7a8c: e3a01001 mov r1, #1 7a90: e59f21dc ldr r2, [pc, #476] ; 7c74 <_Heap_Walk+0x638> 7a94: e1a0e00f mov lr, pc 7a98: e12fff1a bx sl 7a9c: e3a00000 mov r0, #0 7aa0: eafffef8 b 7688 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 7aa4: e21b9001 ands r9, fp, #1 7aa8: 0a000017 beq 7b0c <_Heap_Walk+0x4d0> 7aac: 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 ) { 7ab0: e1530004 cmp r3, r4 7ab4: 1a000003 bne 7ac8 <_Heap_Walk+0x48c> 7ab8: ea00000b b 7aec <_Heap_Walk+0x4b0> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 7abc: 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 ) { 7ac0: e1530004 cmp r3, r4 7ac4: 0a000008 beq 7aec <_Heap_Walk+0x4b0> if ( free_block == block ) { 7ac8: e1530005 cmp r3, r5 7acc: 1afffffa bne 7abc <_Heap_Walk+0x480> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 7ad0: e59d2024 ldr r2, [sp, #36] ; 0x24 7ad4: e1520006 cmp r2, r6 7ad8: 0afffee9 beq 7684 <_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 ) { 7adc: e5967004 ldr r7, [r6, #4] 7ae0: e1a05006 mov r5, r6 7ae4: e2076001 and r6, r7, #1 7ae8: eaffff8f b 792c <_Heap_Walk+0x2f0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 7aec: e1a00008 mov r0, r8 7af0: e1a03005 mov r3, r5 7af4: e3a01001 mov r1, #1 7af8: e59f2178 ldr r2, [pc, #376] ; 7c78 <_Heap_Walk+0x63c> 7afc: e1a0e00f mov lr, pc 7b00: e12fff1a bx sl 7b04: e3a00000 mov r0, #0 7b08: eafffede b 7688 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 7b0c: e1a00008 mov r0, r8 7b10: e1a03005 mov r3, r5 7b14: e3a01001 mov r1, #1 7b18: e59f215c ldr r2, [pc, #348] ; 7c7c <_Heap_Walk+0x640> 7b1c: e1a0e00f mov lr, pc 7b20: e12fff1a bx sl 7b24: e1a00009 mov r0, r9 7b28: eafffed6 b 7688 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 7b2c: e1a00008 mov r0, r8 7b30: e58d7000 str r7, [sp] 7b34: e1a03005 mov r3, r5 7b38: e3a01001 mov r1, #1 7b3c: e59f213c ldr r2, [pc, #316] ; 7c80 <_Heap_Walk+0x644> 7b40: e1a0e00f mov lr, pc 7b44: e12fff1a bx sl 7b48: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 7b4c: eafffecd b 7688 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 7b50: e58d2004 str r2, [sp, #4] 7b54: e1a00008 mov r0, r8 7b58: e1a0b002 mov fp, r2 7b5c: e58d7000 str r7, [sp] 7b60: e1a03005 mov r3, r5 7b64: e3a01001 mov r1, #1 7b68: e59f2114 ldr r2, [pc, #276] ; 7c84 <_Heap_Walk+0x648> 7b6c: e1a0e00f mov lr, pc 7b70: e12fff1a bx sl 7b74: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 7b78: eafffec2 b 7688 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 7b7c: e1a00008 mov r0, r8 7b80: e58d6000 str r6, [sp] 7b84: e1a03005 mov r3, r5 7b88: e3a01001 mov r1, #1 7b8c: e59f20f4 ldr r2, [pc, #244] ; 7c88 <_Heap_Walk+0x64c> 7b90: e1a0e00f mov lr, pc 7b94: e12fff1a bx sl 7b98: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 7b9c: eafffeb9 b 7688 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 7ba0: e1a00008 mov r0, r8 7ba4: e3a01001 mov r1, #1 7ba8: e59f20dc ldr r2, [pc, #220] ; 7c8c <_Heap_Walk+0x650> 7bac: e1a0e00f mov lr, pc 7bb0: e12fff1a bx sl 7bb4: e1a00009 mov r0, r9 7bb8: eafffeb2 b 7688 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 7bbc: e1a00008 mov r0, r8 7bc0: e1a03009 mov r3, r9 7bc4: e3a01001 mov r1, #1 7bc8: e59f20c0 ldr r2, [pc, #192] ; 7c90 <_Heap_Walk+0x654> 7bcc: e1a0e00f mov lr, pc 7bd0: e12fff1a bx sl 7bd4: e3a00000 mov r0, #0 7bd8: eafffeaa b 7688 <_Heap_Walk+0x4c> ); return false; } if ( free_block->prev != prev_block ) { 7bdc: e1a0c002 mov ip, r2 (*printer)( 7be0: e1a00008 mov r0, r8 7be4: e58dc000 str ip, [sp] 7be8: e1a03009 mov r3, r9 7bec: e3a01001 mov r1, #1 7bf0: e59f209c ldr r2, [pc, #156] ; 7c94 <_Heap_Walk+0x658> 7bf4: e1a0e00f mov lr, pc 7bf8: e12fff1a bx sl 7bfc: e3a00000 mov r0, #0 7c00: eafffea0 b 7688 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 7c04: e1a00008 mov r0, r8 7c08: e1a03009 mov r3, r9 7c0c: e3a01001 mov r1, #1 7c10: e59f2080 ldr r2, [pc, #128] ; 7c98 <_Heap_Walk+0x65c> 7c14: e1a0e00f mov lr, pc 7c18: e12fff1a bx sl 7c1c: e3a00000 mov r0, #0 7c20: eafffe98 b 7688 <_Heap_Walk+0x4c> =============================================================================== 00000460 <_Message_queue_Manager_initialization>: #include #include void _Message_queue_Manager_initialization(void) { } 460: e12fff1e bx lr =============================================================================== 00006afc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 6afc: 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 ) 6b00: e5908034 ldr r8, [r0, #52] ; 0x34 6b04: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 6b08: e24dd014 sub sp, sp, #20 6b0c: 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 ); 6b10: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 6b14: 0a00009c beq 6d8c <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 6b18: e1d091b4 ldrh r9, [r0, #20] 6b1c: e1d0a1b0 ldrh sl, [r0, #16] 6b20: e1a01009 mov r1, r9 6b24: e1a0000a mov r0, sl 6b28: eb00436e bl 178e8 <__aeabi_uidiv> 6b2c: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 6b30: e1b03823 lsrs r3, r3, #16 6b34: 01a01009 moveq r1, r9 6b38: 01a06007 moveq r6, r7 6b3c: 01a04003 moveq r4, r3 6b40: 0a00000f beq 6b84 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 6b44: e5984000 ldr r4, [r8] 6b48: e3540000 cmp r4, #0 6b4c: 11a01009 movne r1, r9 6b50: 11a06007 movne r6, r7 6b54: 13a04000 movne r4, #0 6b58: 01a01009 moveq r1, r9 6b5c: 01a06007 moveq r6, r7 6b60: 1a000003 bne 6b74 <_Objects_Extend_information+0x78> 6b64: ea000006 b 6b84 <_Objects_Extend_information+0x88> <== NOT EXECUTED 6b68: e7982104 ldr r2, [r8, r4, lsl #2] 6b6c: e3520000 cmp r2, #0 6b70: 0a000003 beq 6b84 <_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++ ) { 6b74: e2844001 add r4, r4, #1 6b78: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 6b7c: 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++ ) { 6b80: 8afffff8 bhi 6b68 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 6b84: 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 ) { 6b88: e35a0801 cmp sl, #65536 ; 0x10000 6b8c: 2a000064 bcs 6d24 <_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 ) { 6b90: 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; 6b94: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 6b98: 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; 6b9c: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 6ba0: 1a000061 bne 6d2c <_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 ); 6ba4: e58d3000 str r3, [sp] 6ba8: eb000809 bl 8bd4 <_Workspace_Allocate_or_fatal_error> 6bac: e59d3000 ldr r3, [sp] 6bb0: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 6bb4: e1d521b0 ldrh r2, [r5, #16] 6bb8: e1560002 cmp r6, r2 6bbc: 3a000038 bcc 6ca4 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 6bc0: 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 ); 6bc4: e08c008c add r0, ip, ip, lsl #1 6bc8: e08a0000 add r0, sl, r0 6bcc: e0800007 add r0, r0, r7 6bd0: e1a00100 lsl r0, r0, #2 6bd4: e88d1008 stm sp, {r3, ip} 6bd8: eb000809 bl 8c04 <_Workspace_Allocate> if ( !object_blocks ) { 6bdc: e250b000 subs fp, r0, #0 6be0: e89d1008 ldm sp, {r3, ip} 6be4: 0a00006e beq 6da4 <_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 ) { 6be8: e1d521b0 ldrh r2, [r5, #16] 6bec: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 6bf0: e08b818c add r8, fp, ip, lsl #3 6bf4: e08bc10c add ip, fp, ip, lsl #2 6bf8: 3a000051 bcc 6d44 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6bfc: 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, 6c00: 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; 6c04: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 6c08: 0a000003 beq 6c1c <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 6c0c: 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++ ) { 6c10: e2822001 add r2, r2, #1 6c14: e1570002 cmp r7, r2 6c18: 8afffffb bhi 6c0c <_Objects_Extend_information+0x110> 6c1c: 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 ); 6c20: e1d511b4 ldrh r1, [r5, #20] 6c24: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c28: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 6c2c: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 6c30: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 6c34: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 6c38: 2a000005 bcs 6c54 <_Objects_Extend_information+0x158> 6c3c: e0882106 add r2, r8, r6, lsl #2 6c40: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 6c44: 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 ; 6c48: e1510003 cmp r1, r3 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 6c4c: 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 ; 6c50: 8afffffb bhi 6c44 <_Objects_Extend_information+0x148> 6c54: e10f3000 mrs r3, CPSR 6c58: e3832080 orr r2, r3, #128 ; 0x80 6c5c: 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( 6c60: e5952000 ldr r2, [r5] 6c64: e1d510b4 ldrh r1, [r5, #4] 6c68: 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; 6c6c: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 6c70: 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; 6c74: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 6c78: e1822d81 orr r2, r2, r1, lsl #27 6c7c: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 6c80: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 6c84: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 6c88: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 6c8c: 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; 6c90: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 6c94: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6c98: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 6c9c: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 6ca0: 1b0007dd blne 8c1c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6ca4: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6ca8: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cac: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 6cb0: e1a01009 mov r1, r9 6cb4: e1a00007 mov r0, r7 6cb8: e1d521b4 ldrh r2, [r5, #20] 6cbc: e5953018 ldr r3, [r5, #24] 6cc0: eb0012e7 bl b864 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 6cc4: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6cc8: 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 ) { 6ccc: ea000008 b 6cf4 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 6cd0: e5952000 ldr r2, [r5] 6cd4: e1d5c0b4 ldrh ip, [r5, #4] 6cd8: e1a02c02 lsl r2, r2, #24 6cdc: e3822801 orr r2, r2, #65536 ; 0x10000 6ce0: e1822d8c orr r2, r2, ip, lsl #27 6ce4: e1822006 orr r2, r2, r6 6ce8: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6cec: ebfffcf2 bl 60bc <_Chain_Append> index++; 6cf0: 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 ) { 6cf4: e1a00007 mov r0, r7 6cf8: ebfffd03 bl 610c <_Chain_Get> 6cfc: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 6d00: e1a01003 mov r1, r3 6d04: 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 ) { 6d08: 1afffff0 bne 6cd0 <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d0c: e1d531b4 ldrh r3, [r5, #20] information->inactive = 6d10: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d14: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 6d18: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 6d1c: e7813004 str r3, [r1, r4] information->inactive = 6d20: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 6d24: e28dd014 add sp, sp, #20 6d28: 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 ); 6d2c: e58d3000 str r3, [sp] 6d30: eb0007b3 bl 8c04 <_Workspace_Allocate> if ( !new_object_block ) 6d34: e2509000 subs r9, r0, #0 6d38: e59d3000 ldr r3, [sp] 6d3c: 1affff9c bne 6bb4 <_Objects_Extend_information+0xb8> 6d40: eafffff7 b 6d24 <_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, 6d44: e1a03103 lsl r3, r3, #2 6d48: e1a02003 mov r2, r3 6d4c: e5951034 ldr r1, [r5, #52] ; 0x34 6d50: e88d1008 stm sp, {r3, ip} 6d54: eb001f67 bl eaf8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 6d58: e89d1008 ldm sp, {r3, ip} 6d5c: e1a0000c mov r0, ip 6d60: e1a02003 mov r2, r3 6d64: e5951030 ldr r1, [r5, #48] ; 0x30 6d68: eb001f62 bl eaf8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 6d6c: e1d521b0 ldrh r2, [r5, #16] 6d70: e0872002 add r2, r7, r2 6d74: e1a02102 lsl r2, r2, #2 6d78: e1a00008 mov r0, r8 6d7c: e595101c ldr r1, [r5, #28] 6d80: eb001f5c bl eaf8 6d84: e89d1008 ldm sp, {r3, ip} 6d88: eaffffa4 b 6c20 <_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 ) 6d8c: e1a04008 mov r4, r8 6d90: e1d0a1b0 ldrh sl, [r0, #16] 6d94: e1d011b4 ldrh r1, [r0, #20] 6d98: e1a06007 mov r6, r7 6d9c: e1a03008 mov r3, r8 6da0: eaffff77 b 6b84 <_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 ); 6da4: e1a00009 mov r0, r9 6da8: eb00079b bl 8c1c <_Workspace_Free> return; 6dac: eaffffdc b 6d24 <_Objects_Extend_information+0x228> =============================================================================== 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 =============================================================================== 00007dd4 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 7dd4: 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 ) { 7dd8: 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 ]; 7ddc: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7de0: e281503c add r5, r1, #60 ; 0x3c 7de4: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 7de8: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 7dec: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 7df0: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7df4: e3a05000 mov r5, #0 7df8: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 7dfc: 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 ]; 7e00: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 7e04: e5906038 ldr r6, [r0, #56] ; 0x38 7e08: 159fa178 ldrne sl, [pc, #376] ; 7f88 <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 7e0c: 1a00001c bne 7e84 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 7e10: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7e14: e10f8000 mrs r8, CPSR 7e18: e3884080 orr r4, r8, #128 ; 0x80 7e1c: 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; 7e20: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7e24: e154000a cmp r4, sl 7e28: 1a000009 bne 7e54 <_Thread_queue_Enqueue_priority+0x80> 7e2c: ea000052 b 7f7c <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7e30: e10f7000 mrs r7, CPSR 7e34: e129f008 msr CPSR_fc, r8 7e38: 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) ) { 7e3c: e5947010 ldr r7, [r4, #16] 7e40: e1160007 tst r6, r7 7e44: 0a000033 beq 7f18 <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 7e48: 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 ) ) { 7e4c: e154000a cmp r4, sl 7e50: 0a000002 beq 7e60 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 7e54: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 7e58: e1530005 cmp r3, r5 7e5c: 8afffff3 bhi 7e30 <_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 ) ) { 7e60: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 7e64: e590c030 ldr ip, [r0, #48] ; 0x30 7e68: e35c0001 cmp ip, #1 7e6c: 0a00002b beq 7f20 <_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; 7e70: e5826000 str r6, [r2] return the_thread_queue->sync_state; 7e74: e1a0000c mov r0, ip } 7e78: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 7e7c: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7e80: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 7e84: e5da5000 ldrb r5, [sl] 7e88: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7e8c: e10f8000 mrs r8, CPSR 7e90: e3884080 orr r4, r8, #128 ; 0x80 7e94: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 7e98: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7e9c: e154000c cmp r4, ip 7ea0: 1a000009 bne 7ecc <_Thread_queue_Enqueue_priority+0xf8> 7ea4: ea00000b b 7ed8 <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7ea8: e10f7000 mrs r7, CPSR 7eac: e129f008 msr CPSR_fc, r8 7eb0: 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) ) { 7eb4: e5947010 ldr r7, [r4, #16] 7eb8: e1160007 tst r6, r7 7ebc: 0affffef beq 7e80 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 7ec0: 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 ) ) { 7ec4: e154000c cmp r4, ip 7ec8: 0a000002 beq 7ed8 <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 7ecc: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 7ed0: e1530005 cmp r3, r5 7ed4: 3afffff3 bcc 7ea8 <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7ed8: e590c030 ldr ip, [r0, #48] ; 0x30 7edc: 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 ) ) { 7ee0: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7ee4: 1affffe1 bne 7e70 <_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 ) 7ee8: 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; 7eec: e3a03000 mov r3, #0 7ef0: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7ef4: 0a000016 beq 7f54 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7ef8: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7efc: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f00: 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; 7f04: e5841000 str r1, [r4] next_node->previous = the_node; 7f08: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7f0c: e129f008 msr CPSR_fc, r8 7f10: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f14: eaffffd7 b 7e78 <_Thread_queue_Enqueue_priority+0xa4> 7f18: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 7f1c: eaffffbc b 7e14 <_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 ) 7f20: 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; 7f24: e3a03000 mov r3, #0 7f28: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7f2c: 0a000008 beq 7f54 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7f30: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7f34: e5814000 str r4, [r1] the_node->previous = previous_node; 7f38: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f3c: 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; 7f40: e5831000 str r1, [r3] search_node->previous = the_node; 7f44: e5841004 str r1, [r4, #4] 7f48: e129f008 msr CPSR_fc, r8 7f4c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f50: eaffffc8 b 7e78 <_Thread_queue_Enqueue_priority+0xa4> 7f54: 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; 7f58: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7f5c: e5814000 str r4, [r1] the_node->previous = previous_node; 7f60: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7f64: 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; 7f68: e5831000 str r1, [r3] search_node->previous = the_node; 7f6c: e5841004 str r1, [r4, #4] 7f70: e129f006 msr CPSR_fc, r6 7f74: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7f78: eaffffbe b 7e78 <_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 ) ) { 7f7c: e1a06008 mov r6, r8 7f80: e3e05000 mvn r5, #0 7f84: eaffffb6 b 7e64 <_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: eb00109c bl 1ad34 <_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: eb000240 bl 173e4 <_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: eb0010b9 bl 1adf0 <_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: eb000234 bl 173e4 <_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: eb00104b bl 1ac78 <_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: eb0010a5 bl 1adf0 <_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: eb001071 bl 1ad34 <_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: eb000db2 bl 1a2c8 <_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: eb000aff bl 19810 <_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: eb0010d4 bl 1af74 <_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: eb0010d2 bl 1af74 <_Watchdog_Remove> 16c28: eaffff9b b 16a9c <_Timer_server_Body+0x60> =============================================================================== 0000a858 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a858: e92d41f0 push {r4, r5, r6, r7, r8, lr} a85c: e1a04000 mov r4, r0 a860: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a864: e10f3000 mrs r3, CPSR a868: e3832080 orr r2, r3, #128 ; 0x80 a86c: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a870: e1a07000 mov r7, r0 a874: 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 ) ) { a878: e1520007 cmp r2, r7 a87c: 0a000018 beq a8e4 <_Watchdog_Adjust+0x8c> switch ( direction ) { a880: e3510000 cmp r1, #0 a884: 1a000018 bne a8ec <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a888: e3550000 cmp r5, #0 a88c: 0a000014 beq a8e4 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a890: e5926010 ldr r6, [r2, #16] a894: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a898: 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 ) { a89c: 2a000005 bcs a8b8 <_Watchdog_Adjust+0x60> a8a0: ea000018 b a908 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a8a4: e0555006 subs r5, r5, r6 a8a8: 0a00000d beq a8e4 <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { a8ac: e5926010 ldr r6, [r2, #16] a8b0: e1560005 cmp r6, r5 a8b4: 8a000013 bhi a908 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a8b8: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a8bc: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); a8c0: e1a00004 mov r0, r4 a8c4: eb00009e bl ab44 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a8c8: e10f3000 mrs r3, CPSR a8cc: e3832080 orr r2, r3, #128 ; 0x80 a8d0: e129f002 msr CPSR_fc, r2 a8d4: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a8d8: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); a8dc: e1a02001 mov r2, r1 a8e0: 1affffef bne a8a4 <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a8e4: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a8e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a8ec: e3510001 cmp r1, #1 a8f0: 1afffffb bne a8e4 <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a8f4: e5921010 ldr r1, [r2, #16] a8f8: e0815005 add r5, r1, r5 a8fc: e5825010 str r5, [r2, #16] a900: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } a904: 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; a908: e0655006 rsb r5, r5, r6 a90c: e5825010 str r5, [r2, #16] break; a910: eafffff3 b a8e4 <_Watchdog_Adjust+0x8c> =============================================================================== 0002207c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2207c: e3a00000 mov r0, #0 <== NOT EXECUTED 22080: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00019d78 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 19d78: e24dd004 sub sp, sp, #4 19d7c: e58d0000 str r0, [sp] 19d80: eb0001f2 bl 1a550 <___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(); 19d84: ebffffe1 bl 19d10 rtems_shutdown_executive(status); 19d88: e59d0000 ldr r0, [sp] 19d8c: eb00003e bl 19e8c 19d90: eafffffe b 19d90 <_exit+0x18> <== NOT EXECUTED =============================================================================== 00026648 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 26648: 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) 2664c: e2534000 subs r4, r3, #0 <== NOT EXECUTED uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 26650: e24dd004 sub sp, sp, #4 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 26654: 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) 26658: 01a05004 moveq r5, r4 <== NOT EXECUTED 2665c: 0a00001d beq 266d8 <_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; 26660: e3a05000 mov r5, #0 <== NOT EXECUTED 26664: e28db004 add fp, sp, #4 <== NOT EXECUTED 26668: e52b5004 str r5, [fp, #-4]! <== NOT EXECUTED 2666c: e1a07002 mov r7, r2 <== NOT EXECUTED 26670: e1a06001 mov r6, r1 <== NOT EXECUTED 26674: ea00000d b 266b0 <_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)); 26678: e1d980b0 ldrh r8, [r9] <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 2667c: 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)); 26680: e0678008 rsb r8, r7, r8 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 26684: 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)); 26688: e1580004 cmp r8, r4 <== NOT EXECUTED 2668c: 21a08004 movcs r8, r4 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 26690: e0811007 add r1, r1, r7 <== NOT EXECUTED 26694: e1a02008 mov r2, r8 <== NOT EXECUTED 26698: eb007f04 bl 462b0 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2669c: 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; 266a0: 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) 266a4: 0a00000b beq 266d8 <_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++; 266a8: e2866001 add r6, r6, #1 <== NOT EXECUTED 266ac: 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); 266b0: e1a0300d mov r3, sp <== NOT EXECUTED 266b4: e1a01006 mov r1, r6 <== NOT EXECUTED 266b8: e1a00009 mov r0, r9 <== NOT EXECUTED 266bc: e3a02001 mov r2, #1 <== NOT EXECUTED 266c0: ebfffe8d bl 260fc <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 266c4: 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) 266c8: e250a000 subs sl, r0, #0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 266cc: 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) 266d0: 0affffe8 beq 26678 <_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++; 266d4: e3e05000 mvn r5, #0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 266d8: e1a00005 mov r0, r5 <== NOT EXECUTED 266dc: e28dd004 add sp, sp, #4 <== NOT EXECUTED 266e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000260f4 <_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); 260f4: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED 260f8: eaffffa4 b 25f90 <== NOT EXECUTED =============================================================================== 00026314 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 26314: 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) 26318: 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) { 2631c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 26320: 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) 26324: 01a06005 moveq r6, r5 <== NOT EXECUTED 26328: 0a00002d beq 263e4 <_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; 2632c: e3a06000 mov r6, #0 <== NOT EXECUTED 26330: e28db004 add fp, sp, #4 <== NOT EXECUTED 26334: e52b6004 str r6, [fp, #-4]! <== NOT EXECUTED 26338: e1a08002 mov r8, r2 <== NOT EXECUTED 2633c: e1a09001 mov r9, r1 <== NOT EXECUTED 26340: ea000015 b 2639c <_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); 26344: e1a01009 mov r1, r9 <== NOT EXECUTED 26348: e1a0300d mov r3, sp <== NOT EXECUTED 2634c: e3a02001 mov r2, #1 <== NOT EXECUTED 26350: e1a00007 mov r0, r7 <== NOT EXECUTED 26354: ebffff68 bl 260fc <== NOT EXECUTED if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 26358: 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); 2635c: e1a0a000 mov sl, r0 <== NOT EXECUTED if (rc != RC_OK) 26360: e35a0000 cmp sl, #0 <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 26364: e0831006 add r1, r3, r6 <== NOT EXECUTED 26368: 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) 2636c: 1a00001b bne 263e0 <_fat_block_write+0xcc> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 26370: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26374: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 26378: e0800008 add r0, r0, r8 <== NOT EXECUTED 2637c: eb007fcb bl 462b0 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 26380: 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) 26384: e0555004 subs r5, r5, r4 <== NOT EXECUTED 26388: 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; 2638c: 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) 26390: 0a000013 beq 263e4 <_fat_block_write+0xd0> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 26394: e2899001 add r9, r9, #1 <== NOT EXECUTED 26398: 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)); 2639c: e1d730b0 ldrh r3, [r7] <== NOT EXECUTED 263a0: e0684003 rsb r4, r8, r3 <== NOT EXECUTED 263a4: e1540005 cmp r4, r5 <== NOT EXECUTED 263a8: 21a04005 movcs r4, r5 <== NOT EXECUTED if (c == fs_info->vol.bps) 263ac: e1530004 cmp r3, r4 <== NOT EXECUTED 263b0: 1affffe3 bne 26344 <_fat_block_write+0x30> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 263b4: e1a01009 mov r1, r9 <== NOT EXECUTED 263b8: e3a02002 mov r2, #2 <== NOT EXECUTED 263bc: e1a0300d mov r3, sp <== NOT EXECUTED 263c0: e1a00007 mov r0, r7 <== NOT EXECUTED 263c4: ebffff4c bl 260fc <== 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); 263c8: 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); 263cc: e1a0a000 mov sl, r0 <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 263d0: e35a0000 cmp sl, #0 <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 263d4: e0831006 add r1, r3, r6 <== NOT EXECUTED 263d8: 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) 263dc: 0affffe3 beq 26370 <_fat_block_write+0x5c> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 263e0: e3e06000 mvn r6, #0 <== NOT EXECUTED ofs = 0; } return cmpltd; } 263e4: e1a00006 mov r0, r6 <== NOT EXECUTED 263e8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 263ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 0003f9d4 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 3f9d4: e1a00001 mov r0, r1 <== NOT EXECUTED 3f9d8: e1a01002 mov r1, r2 <== NOT EXECUTED 3f9dc: e1a02003 mov r2, r3 <== NOT EXECUTED 3f9e0: eaffff81 b 3f7ec <== NOT EXECUTED =============================================================================== 0002205c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 2205c: e3a00001 mov r0, #1 <== NOT EXECUTED 22060: 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 =============================================================================== 00022074 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 22074: e3a00000 mov r0, #0 <== NOT EXECUTED 22078: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00029db8 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 29db8: e1a00001 mov r0, r1 <== NOT EXECUTED 29dbc: e1a01002 mov r1, r2 <== NOT EXECUTED 29dc0: eaffff75 b 29b9c <== NOT EXECUTED =============================================================================== 0002a004 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2a004: e1a00001 mov r0, r1 <== NOT EXECUTED 2a008: e1a01002 mov r1, r2 <== NOT EXECUTED 2a00c: eaffffc2 b 29f1c <== NOT EXECUTED =============================================================================== 00019e70 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 19e70: e1a00001 mov r0, r1 <== NOT EXECUTED 19e74: e1a01002 mov r1, r2 <== NOT EXECUTED 19e78: ea00000e b 19eb8 <== NOT EXECUTED =============================================================================== 0005ccac <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5ccac: 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 ); 5ccb0: e1a00001 mov r0, r1 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5ccb4: e24dd048 sub sp, sp, #72 ; 0x48 5ccb8: e1a05001 mov r5, r1 5ccbc: 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 ); 5ccc0: ebfeabbb bl 7bb4 if ( old_parent_pathlen == 0 ) 5ccc4: e2507000 subs r7, r0, #0 5ccc8: 1a00008b bne 5cefc <_rename_r+0x250> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5cccc: e28d4018 add r4, sp, #24 5ccd0: e1a00005 mov r0, r5 5ccd4: e28d1044 add r1, sp, #68 ; 0x44 5ccd8: e1a02004 mov r2, r4 5ccdc: ebfeb292 bl 972c 5cce0: e1a08007 mov r8, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5cce4: e1a0e004 mov lr, r4 5cce8: e8be000f ldm lr!, {r0, r1, r2, r3} 5ccec: e28dc02c add ip, sp, #44 ; 0x2c 5ccf0: e8ac000f stmia ip!, {r0, r1, r2, r3} 5ccf4: e59e3000 ldr r3, [lr] name = old + old_parent_pathlen; 5ccf8: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5ccfc: e58c3000 str r3, [ip] name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5cd00: 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; 5cd04: e58d5040 str r5, [sp, #64] ; 0x40 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5cd08: ebffb3b5 bl 49be4 5cd0c: e1a01000 mov r1, r0 5cd10: e1a00005 mov r0, r5 5cd14: ebfeab91 bl 7b60 5cd18: e0855000 add r5, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5cd1c: 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 ) ); 5cd20: e58d5040 str r5, [sp, #64] ; 0x40 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5cd24: ebffb3ae bl 49be4 5cd28: e28d702c add r7, sp, #44 ; 0x2c 5cd2c: e3a0c000 mov ip, #0 5cd30: e1a01000 mov r1, r0 5cd34: e1a0200c mov r2, ip 5cd38: e1a00005 mov r0, r5 5cd3c: e1a03007 mov r3, r7 5cd40: e58dc000 str ip, [sp] 5cd44: ebfeabab bl 7bf8 0, &old_loc, false ); if ( result != 0 ) { 5cd48: e3500000 cmp r0, #0 5cd4c: 1a00005b bne 5cec0 <_rename_r+0x214> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 5cd50: e28d5004 add r5, sp, #4 5cd54: e1a00006 mov r0, r6 5cd58: e28d1044 add r1, sp, #68 ; 0x44 5cd5c: e1a02005 mov r2, r5 5cd60: ebfeb271 bl 972c if ( !new_parent_loc.ops->evalformake_h ) { 5cd64: e59d3010 ldr r3, [sp, #16] 5cd68: e5933004 ldr r3, [r3, #4] 5cd6c: e3530000 cmp r3, #0 5cd70: 0a00008f beq 5cfb4 <_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 ); 5cd74: e59d0044 ldr r0, [sp, #68] ; 0x44 5cd78: e1a01005 mov r1, r5 5cd7c: e0860000 add r0, r6, r0 5cd80: e28d2040 add r2, sp, #64 ; 0x40 5cd84: e1a0e00f mov lr, pc 5cd88: e12fff13 bx r3 if ( result != 0 ) { 5cd8c: e3500000 cmp r0, #0 5cd90: 1a000065 bne 5cf2c <_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 ) { 5cd94: e59d3014 ldr r3, [sp, #20] 5cd98: e59d2028 ldr r2, [sp, #40] ; 0x28 5cd9c: e1520003 cmp r2, r3 5cda0: 1a000027 bne 5ce44 <_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 ) { 5cda4: e59d3010 ldr r3, [sp, #16] 5cda8: e593c040 ldr ip, [r3, #64] ; 0x40 5cdac: e35c0000 cmp ip, #0 5cdb0: 0a00007a beq 5cfa0 <_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 ); 5cdb4: e59d3040 ldr r3, [sp, #64] ; 0x40 5cdb8: e1a00004 mov r0, r4 5cdbc: e1a01007 mov r1, r7 5cdc0: e1a02005 mov r2, r5 5cdc4: e1a0e00f mov lr, pc 5cdc8: e12fff1c bx ip rtems_filesystem_freenode( &new_parent_loc ); 5cdcc: e59d3010 ldr r3, [sp, #16] 5cdd0: 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 ); 5cdd4: e1a06000 mov r6, r0 rtems_filesystem_freenode( &new_parent_loc ); 5cdd8: 0a000004 beq 5cdf0 <_rename_r+0x144> 5cddc: e593301c ldr r3, [r3, #28] 5cde0: e3530000 cmp r3, #0 5cde4: 11a00005 movne r0, r5 5cde8: 11a0e00f movne lr, pc 5cdec: 112fff13 bxne r3 if ( free_old_parentloc ) 5cdf0: e3580000 cmp r8, #0 5cdf4: 0a000007 beq 5ce18 <_rename_r+0x16c> rtems_filesystem_freenode( &old_parent_loc ); 5cdf8: e59d3024 ldr r3, [sp, #36] ; 0x24 5cdfc: e3530000 cmp r3, #0 5ce00: 0a000004 beq 5ce18 <_rename_r+0x16c> 5ce04: e593301c ldr r3, [r3, #28] 5ce08: e3530000 cmp r3, #0 5ce0c: 11a00004 movne r0, r4 5ce10: 11a0e00f movne lr, pc 5ce14: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5ce18: e59d3038 ldr r3, [sp, #56] ; 0x38 5ce1c: e3530000 cmp r3, #0 5ce20: 0a000004 beq 5ce38 <_rename_r+0x18c> 5ce24: e593301c ldr r3, [r3, #28] 5ce28: e3530000 cmp r3, #0 5ce2c: 11a00007 movne r0, r7 5ce30: 11a0e00f movne lr, pc 5ce34: 112fff13 bxne r3 return result; } 5ce38: e1a00006 mov r0, r6 5ce3c: e28dd048 add sp, sp, #72 ; 0x48 5ce40: 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 ); 5ce44: e59d3010 ldr r3, [sp, #16] 5ce48: e3530000 cmp r3, #0 5ce4c: 0a000004 beq 5ce64 <_rename_r+0x1b8> 5ce50: e593301c ldr r3, [r3, #28] 5ce54: e3530000 cmp r3, #0 5ce58: 11a00005 movne r0, r5 5ce5c: 11a0e00f movne lr, pc 5ce60: 112fff13 bxne r3 if ( free_old_parentloc ) 5ce64: e3580000 cmp r8, #0 5ce68: 0a000007 beq 5ce8c <_rename_r+0x1e0> rtems_filesystem_freenode( &old_parent_loc ); 5ce6c: e59d3024 ldr r3, [sp, #36] ; 0x24 5ce70: e3530000 cmp r3, #0 5ce74: 0a000004 beq 5ce8c <_rename_r+0x1e0> 5ce78: e593301c ldr r3, [r3, #28] 5ce7c: e3530000 cmp r3, #0 5ce80: 11a00004 movne r0, r4 5ce84: 11a0e00f movne lr, pc 5ce88: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5ce8c: e59d3038 ldr r3, [sp, #56] ; 0x38 5ce90: e3530000 cmp r3, #0 5ce94: 0a000004 beq 5ceac <_rename_r+0x200> 5ce98: e593301c ldr r3, [r3, #28] 5ce9c: e3530000 cmp r3, #0 5cea0: 11a00007 movne r0, r7 5cea4: 11a0e00f movne lr, pc 5cea8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 5ceac: ebff984f bl 42ff0 <__errno> 5ceb0: e3a03012 mov r3, #18 5ceb4: e5803000 str r3, [r0] 5ceb8: e3e06000 mvn r6, #0 5cebc: eaffffdd b 5ce38 <_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 ) 5cec0: e3580000 cmp r8, #0 5cec4: 1a000001 bne 5ced0 <_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 ); 5cec8: e3e06000 mvn r6, #0 <== NOT EXECUTED 5cecc: eaffffd9 b 5ce38 <_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 ); 5ced0: e59d3024 ldr r3, [sp, #36] ; 0x24 5ced4: e3530000 cmp r3, #0 5ced8: 0afffffa beq 5cec8 <_rename_r+0x21c> 5cedc: e593301c ldr r3, [r3, #28] 5cee0: e3530000 cmp r3, #0 5cee4: 0afffff7 beq 5cec8 <_rename_r+0x21c> 5cee8: e1a00004 mov r0, r4 5ceec: e1a0e00f mov lr, pc 5cef0: e12fff13 bx r3 5cef4: e3e06000 mvn r6, #0 5cef8: eaffffce b 5ce38 <_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, 5cefc: e28d4018 add r4, sp, #24 5cf00: e3a0c000 mov ip, #0 5cf04: e1a00005 mov r0, r5 5cf08: e1a01007 mov r1, r7 5cf0c: e3a02002 mov r2, #2 5cf10: e1a03004 mov r3, r4 5cf14: e58dc000 str ip, [sp] 5cf18: ebfeab72 bl 7ce8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 5cf1c: e3500000 cmp r0, #0 5cf20: 1affffe8 bne 5cec8 <_rename_r+0x21c> 5cf24: e3a08001 mov r8, #1 5cf28: eaffff6d b 5cce4 <_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 ); 5cf2c: e59d3010 ldr r3, [sp, #16] 5cf30: e3530000 cmp r3, #0 5cf34: 0a000004 beq 5cf4c <_rename_r+0x2a0> 5cf38: e593301c ldr r3, [r3, #28] 5cf3c: e3530000 cmp r3, #0 5cf40: 11a00005 movne r0, r5 5cf44: 11a0e00f movne lr, pc 5cf48: 112fff13 bxne r3 if ( free_old_parentloc ) 5cf4c: e3580000 cmp r8, #0 5cf50: 0a000007 beq 5cf74 <_rename_r+0x2c8> rtems_filesystem_freenode( &old_parent_loc ); 5cf54: e59d3024 ldr r3, [sp, #36] ; 0x24 5cf58: e3530000 cmp r3, #0 5cf5c: 0a000004 beq 5cf74 <_rename_r+0x2c8> 5cf60: e593301c ldr r3, [r3, #28] 5cf64: e3530000 cmp r3, #0 5cf68: 11a00004 movne r0, r4 5cf6c: 11a0e00f movne lr, pc 5cf70: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5cf74: e59d3038 ldr r3, [sp, #56] ; 0x38 5cf78: e3530000 cmp r3, #0 5cf7c: 0affffd1 beq 5cec8 <_rename_r+0x21c> 5cf80: e593301c ldr r3, [r3, #28] 5cf84: e3530000 cmp r3, #0 5cf88: 0affffce beq 5cec8 <_rename_r+0x21c> 5cf8c: e1a00007 mov r0, r7 5cf90: e1a0e00f mov lr, pc 5cf94: e12fff13 bx r3 5cf98: e3e06000 mvn r6, #0 5cf9c: eaffffa5 b 5ce38 <_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 ); 5cfa0: e593301c ldr r3, [r3, #28] 5cfa4: e3530000 cmp r3, #0 5cfa8: 11a00005 movne r0, r5 5cfac: 11a0e00f movne lr, pc 5cfb0: 112fff13 bxne r3 if ( free_old_parentloc ) 5cfb4: e3580000 cmp r8, #0 5cfb8: 0a000007 beq 5cfdc <_rename_r+0x330> rtems_filesystem_freenode( &old_parent_loc ); 5cfbc: e59d3024 ldr r3, [sp, #36] ; 0x24 5cfc0: e3530000 cmp r3, #0 5cfc4: 0a000004 beq 5cfdc <_rename_r+0x330> 5cfc8: e593301c ldr r3, [r3, #28] 5cfcc: e3530000 cmp r3, #0 5cfd0: 11a00004 movne r0, r4 5cfd4: 11a0e00f movne lr, pc 5cfd8: 112fff13 bxne r3 rtems_filesystem_freenode( &old_loc ); 5cfdc: e59d3038 ldr r3, [sp, #56] ; 0x38 5cfe0: e3530000 cmp r3, #0 5cfe4: 0a000004 beq 5cffc <_rename_r+0x350> 5cfe8: e593301c ldr r3, [r3, #28] 5cfec: e3530000 cmp r3, #0 5cff0: 11a00007 movne r0, r7 5cff4: 11a0e00f movne lr, pc 5cff8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTSUP ); 5cffc: ebff97fb bl 42ff0 <__errno> 5d000: e3a03086 mov r3, #134 ; 0x86 5d004: e5803000 str r3, [r0] 5d008: e3e06000 mvn r6, #0 5d00c: eaffff89 b 5ce38 <_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 =============================================================================== 0000dd70 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); dd70: e1a00001 mov r0, r1 <== NOT EXECUTED dd74: eaffff6c b db2c <== NOT EXECUTED =============================================================================== 00028b0c : #include int chdir( const char *pathname ) { 28b0c: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 28b10: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { 28b14: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 28b18: 0a000031 beq 28be4 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 28b1c: eb008430 bl 49be4 28b20: e28d4004 add r4, sp, #4 28b24: e3a0c001 mov ip, #1 28b28: e1a01000 mov r1, r0 28b2c: e1a0200c mov r2, ip 28b30: e1a00005 mov r0, r5 28b34: e1a03004 mov r3, r4 28b38: e58dc000 str ip, [sp] 28b3c: ebff7c69 bl 7ce8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 28b40: e3500000 cmp r0, #0 28b44: 1a000024 bne 28bdc return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 28b48: e59d2010 ldr r2, [sp, #16] 28b4c: e5923010 ldr r3, [r2, #16] 28b50: e3530000 cmp r3, #0 28b54: 0a000018 beq 28bbc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 28b58: e1a00004 mov r0, r4 28b5c: e1a0e00f mov lr, pc 28b60: e12fff13 bx r3 28b64: e3500001 cmp r0, #1 28b68: 1a000022 bne 28bf8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 28b6c: e59f50b8 ldr r5, [pc, #184] ; 28c2c 28b70: e595c000 ldr ip, [r5] 28b74: e59c3010 ldr r3, [ip, #16] 28b78: e3530000 cmp r3, #0 28b7c: 0a000006 beq 28b9c 28b80: e593301c ldr r3, [r3, #28] 28b84: e3530000 cmp r3, #0 28b88: 0a000003 beq 28b9c 28b8c: e28c0004 add r0, ip, #4 28b90: e1a0e00f mov lr, pc 28b94: e12fff13 bx r3 28b98: e595c000 ldr ip, [r5] rtems_filesystem_current = loc; 28b9c: e8b4000f ldm r4!, {r0, r1, r2, r3} 28ba0: e28cc004 add ip, ip, #4 28ba4: e8ac000f stmia ip!, {r0, r1, r2, r3} 28ba8: e5943000 ldr r3, [r4] 28bac: e58c3000 str r3, [ip] 28bb0: e3a00000 mov r0, #0 return 0; } 28bb4: e28dd018 add sp, sp, #24 28bb8: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 28bbc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 28bc0: e3530000 cmp r3, #0 <== NOT EXECUTED 28bc4: 11a00004 movne r0, r4 <== NOT EXECUTED 28bc8: 11a0e00f movne lr, pc <== NOT EXECUTED 28bcc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 28bd0: eb006906 bl 42ff0 <__errno> <== NOT EXECUTED 28bd4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28bd8: e5803000 str r3, [r0] <== NOT EXECUTED 28bdc: e3e00000 mvn r0, #0 28be0: eafffff3 b 28bb4 { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 28be4: eb006901 bl 42ff0 <__errno> 28be8: e3a0300e mov r3, #14 28bec: e5803000 str r3, [r0] 28bf0: e3e00000 mvn r0, #0 28bf4: eaffffee b 28bb4 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 ); 28bf8: e59d3010 ldr r3, [sp, #16] 28bfc: e3530000 cmp r3, #0 28c00: 0a000004 beq 28c18 28c04: e593301c ldr r3, [r3, #28] 28c08: e3530000 cmp r3, #0 28c0c: 11a00004 movne r0, r4 28c10: 11a0e00f movne lr, pc 28c14: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 28c18: eb0068f4 bl 42ff0 <__errno> 28c1c: e3a03014 mov r3, #20 28c20: e5803000 str r3, [r0] 28c24: e3e00000 mvn r0, #0 28c28: eaffffe1 b 28bb4 =============================================================================== 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: eb010909 bl 49be4 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: eb00ede3 bl 42ff0 <__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: eb00edd6 bl 42ff0 <__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 =============================================================================== 00028c30 : int chown( const char *path, uid_t owner, gid_t group ) { 28c30: e92d40f0 push {r4, r5, r6, r7, lr} 28c34: e1a01801 lsl r1, r1, #16 28c38: e24dd018 sub sp, sp, #24 28c3c: e1a02802 lsl r2, r2, #16 28c40: e1a06821 lsr r6, r1, #16 28c44: e1a05822 lsr r5, r2, #16 28c48: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 28c4c: eb0083e4 bl 49be4 28c50: e28d4004 add r4, sp, #4 28c54: e1a01000 mov r1, r0 28c58: e3a0c001 mov ip, #1 28c5c: e1a00007 mov r0, r7 28c60: e3a02000 mov r2, #0 28c64: e1a03004 mov r3, r4 28c68: e58dc000 str ip, [sp] 28c6c: ebff7c1d bl 7ce8 28c70: e3500000 cmp r0, #0 28c74: 1a00001c bne 28cec return -1; if ( !loc.ops->chown_h ) { 28c78: e59d2010 ldr r2, [sp, #16] 28c7c: e5923018 ldr r3, [r2, #24] 28c80: e3530000 cmp r3, #0 28c84: 0a000010 beq 28ccc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 28c88: e1a02005 mov r2, r5 28c8c: e1a01006 mov r1, r6 28c90: e1a00004 mov r0, r4 28c94: e1a0e00f mov lr, pc 28c98: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 28c9c: e59d3010 ldr r3, [sp, #16] 28ca0: 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 ); 28ca4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 28ca8: 0a000004 beq 28cc0 28cac: e593301c ldr r3, [r3, #28] 28cb0: e3530000 cmp r3, #0 28cb4: 11a00004 movne r0, r4 28cb8: 11a0e00f movne lr, pc 28cbc: 112fff13 bxne r3 return result; } 28cc0: e1a00005 mov r0, r5 28cc4: e28dd018 add sp, sp, #24 28cc8: 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 ); 28ccc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 28cd0: e3530000 cmp r3, #0 <== NOT EXECUTED 28cd4: 11a00004 movne r0, r4 <== NOT EXECUTED 28cd8: 11a0e00f movne lr, pc <== NOT EXECUTED 28cdc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 28ce0: eb0068c2 bl 42ff0 <__errno> <== NOT EXECUTED 28ce4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28ce8: e5803000 str r3, [r0] <== NOT EXECUTED 28cec: e3e05000 mvn r5, #0 28cf0: eafffff2 b 28cc0 =============================================================================== 00028cf4 : #include int chroot( const char *pathname ) { 28cf4: 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) { 28cf8: e59f50d8 ldr r5, [pc, #216] ; 28dd8 28cfc: e59f30d8 ldr r3, [pc, #216] ; 28ddc 28d00: e5954000 ldr r4, [r5] 28d04: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 28d08: e24dd018 sub sp, sp, #24 28d0c: 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) { 28d10: 0a000020 beq 28d98 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); 28d14: e1a00006 mov r0, r6 28d18: ebffff7b bl 28b0c if (result) { 28d1c: e250c000 subs ip, r0, #0 28d20: 1a000025 bne 28dbc rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 28d24: e28d4004 add r4, sp, #4 28d28: e1a0200c mov r2, ip 28d2c: e59f00ac ldr r0, [pc, #172] ; 28de0 28d30: e3a01001 mov r1, #1 28d34: e1a03004 mov r3, r4 28d38: e58dc000 str ip, [sp] 28d3c: ebff7be9 bl 7ce8 28d40: e3500000 cmp r0, #0 28d44: 1a00001c bne 28dbc /* 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); 28d48: e595c000 ldr ip, [r5] 28d4c: e59c3024 ldr r3, [ip, #36] ; 0x24 28d50: e3530000 cmp r3, #0 28d54: 0a000007 beq 28d78 28d58: e593301c ldr r3, [r3, #28] 28d5c: e3530000 cmp r3, #0 28d60: 0a000004 beq 28d78 28d64: e28c0018 add r0, ip, #24 28d68: e1a0e00f mov lr, pc 28d6c: e12fff13 bx r3 28d70: e59f3060 ldr r3, [pc, #96] ; 28dd8 28d74: e593c000 ldr ip, [r3] rtems_filesystem_root = loc; 28d78: e8b4000f ldm r4!, {r0, r1, r2, r3} 28d7c: e28cc018 add ip, ip, #24 28d80: e8ac000f stmia ip!, {r0, r1, r2, r3} 28d84: e5943000 ldr r3, [r4] 28d88: e58c3000 str r3, [ip] 28d8c: e3a00000 mov r0, #0 return 0; } 28d90: e28dd018 add sp, sp, #24 28d94: 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*/ 28d98: eb0005cf bl 2a4dc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 28d9c: e5953000 ldr r3, [r5] 28da0: e1530004 cmp r3, r4 28da4: 1affffda bne 28d14 rtems_set_errno_and_return_minus_one( ENOTSUP ); 28da8: eb006890 bl 42ff0 <__errno> <== NOT EXECUTED 28dac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28db0: e5803000 str r3, [r0] <== NOT EXECUTED 28db4: e3e00000 mvn r0, #0 <== NOT EXECUTED 28db8: eafffff4 b 28d90 <== 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 ); 28dbc: eb00688b bl 42ff0 <__errno> <== NOT EXECUTED 28dc0: e1a04000 mov r4, r0 <== NOT EXECUTED 28dc4: eb006889 bl 42ff0 <__errno> <== NOT EXECUTED 28dc8: e5903000 ldr r3, [r0] <== NOT EXECUTED 28dcc: e3e00000 mvn r0, #0 <== NOT EXECUTED 28dd0: e5843000 str r3, [r4] <== NOT EXECUTED 28dd4: eaffffed b 28d90 <== 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: eb00434e bl 13100 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: eb0041ae bl 12b14 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: eb00419b bl 12b14 <== 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 =============================================================================== 000088f0 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 88f0: 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 ) ) 88f4: e3d2a007 bics sl, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 88f8: e1a09000 mov r9, r0 88fc: e1a04001 mov r4, r1 8900: 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 ) ) 8904: 1a000028 bne 89ac rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8908: e5937000 ldr r7, [r3] if (!device_name_table) 890c: e3570000 cmp r7, #0 8910: 0a00002a beq 89c0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8914: e59f30b8 ldr r3, [pc, #184] ; 89d4 8918: e5938000 ldr r8, [r3] 891c: 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 ); 8920: 11a0500a movne r5, sl for (i = 0; i < rtems_device_table_size; i++) { 8924: 0a000011 beq 8970 if (!device_name_table[i].device_name) 8928: e08aa10a add sl, sl, sl, lsl #2 892c: e797610a ldr r6, [r7, sl, lsl #2] 8930: e3560000 cmp r6, #0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8934: e1a00009 mov r0, r9 8938: e1a02004 mov r2, r4 893c: 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++) { 8940: e2855001 add r5, r5, #1 if (!device_name_table[i].device_name) 8944: e087a10a add sl, r7, sl, lsl #2 8948: 0a000005 beq 8964 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 894c: eb000a3e bl b24c 8950: e3500000 cmp r0, #0 8954: 1a000002 bne 8964 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8958: e7d60004 ldrb r0, [r6, r4] 895c: e3500000 cmp r0, #0 8960: 0a000007 beq 8984 /* 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++) { 8964: e1580005 cmp r8, r5 8968: e1a0a005 mov sl, r5 896c: 8affffed bhi 8928 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8970: eb00067f bl a374 <__errno> 8974: e3a03002 mov r3, #2 8978: e5803000 str r3, [r0] 897c: e3e00000 mvn r0, #0 } 8980: 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; 8984: e59f304c ldr r3, [pc, #76] ; 89d8 8988: e5933000 ldr r3, [r3] 898c: e5933028 ldr r3, [r3, #40] ; 0x28 8990: 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; 8994: e59f3040 ldr r3, [pc, #64] ; 89dc 8998: e58b3008 str r3, [fp, #8] pathloc->ops = &devFS_ops; 899c: e59f303c ldr r3, [pc, #60] ; 89e0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 89a0: e58ba000 str sl, [fp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 89a4: e58b300c str r3, [fp, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 89a8: 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 ); 89ac: eb000670 bl a374 <__errno> <== NOT EXECUTED 89b0: e3a03001 mov r3, #1 <== NOT EXECUTED 89b4: e5803000 str r3, [r0] <== NOT EXECUTED 89b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 89bc: 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 ); 89c0: eb00066b bl a374 <__errno> <== NOT EXECUTED 89c4: e3a0300e mov r3, #14 <== NOT EXECUTED 89c8: e5803000 str r3, [r0] <== NOT EXECUTED 89cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 89d0: 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: eb001c25 bl 8430 <_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: eb00261d bl ac2c 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: eb0023e7 bl a374 <__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: eb00107d bl 577c 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: eb001d11 bl 89e4 <== 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: eb00269d bl aecc <== 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: eb00274b bl b1ec 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: eb0023a6 bl a374 <__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: eb002397 bl a374 <__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: eb002392 bl a374 <__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: eb00238d bl a374 <__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: eb0010b6 bl 5904 <== 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: eb001ce8 bl 89e4 <== 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: eb00233e bl a374 <__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: eb0010a0 bl 5954 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: eb001cbe bl 89e4 <== NOT EXECUTED 16e8: eafffffb b 16dc <== NOT EXECUTED =============================================================================== 0000d4d0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { d4d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) d4d4: e24dd010 sub sp, sp, #16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; d4d8: e88d0007 stm sp, {r0, r1, r2} the_jnode = iop->file_info; d4dc: e5903038 ldr r3, [r0, #56] ; 0x38 status = rtems_io_control( d4e0: e1a0200d mov r2, sp d4e4: e2830050 add r0, r3, #80 ; 0x50 d4e8: e8900003 ldm r0, {r0, r1} d4ec: eb000292 bl df3c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d4f0: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; d4f4: 059d000c ldreq r0, [sp, #12] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d4f8: 1a000001 bne d504 return rtems_deviceio_errno(status); return args.ioctl_return; } d4fc: e28dd010 add sp, sp, #16 d500: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); d504: eb000337 bl e1e8 <== NOT EXECUTED d508: eafffffb b d4fc <== NOT EXECUTED =============================================================================== 0000d56c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { d56c: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d570: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d574: e280c00c add ip, r0, #12 d578: e89c1800 ldm ip, {fp, ip} ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { d57c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d580: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d584: e98d1800 stmib sp, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; d588: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; d58c: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; d590: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; d594: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; d598: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d59c: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( d5a0: e1a0200d mov r2, sp d5a4: e2830050 add r0, r3, #80 ; 0x50 d5a8: e8900003 ldm r0, {r0, r1} d5ac: eb00028a bl dfdc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d5b0: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; d5b4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d5b8: 1a000001 bne d5c4 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } d5bc: e28dd01c add sp, sp, #28 <== NOT EXECUTED d5c0: e8bd8800 pop {fp, pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); d5c4: eb000307 bl e1e8 <== NOT EXECUTED d5c8: eafffffb b d5bc <== NOT EXECUTED =============================================================================== 0000d50c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { d50c: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; d510: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d514: e280c00c add ip, r0, #12 d518: e89c1800 ldm ip, {fp, ip} ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { d51c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; d520: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d524: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; d528: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; d52c: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; d530: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; d534: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; d538: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d53c: 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( d540: e1a0200d mov r2, sp d544: e2830050 add r0, r3, #80 ; 0x50 d548: e8900003 ldm r0, {r0, r1} d54c: eb0002b6 bl e02c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d550: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; d554: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d558: 1a000001 bne d564 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } d55c: e28dd01c add sp, sp, #28 d560: e8bd8800 pop {fp, pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); d564: eb00031f bl e1e8 <== NOT EXECUTED d568: eafffffb b d55c <== 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: eb001456 bl 70f8 <== 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: eb0007cd bl 5de0 <== 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 =============================================================================== 000291b4 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 291b4: e59f300c ldr r3, [pc, #12] ; 291c8 <== NOT EXECUTED 291b8: e5930000 ldr r0, [r3] <== NOT EXECUTED 291bc: e3500000 cmp r0, #0 <== NOT EXECUTED 291c0: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 291c4: ea0067d6 b 43124 <== NOT EXECUTED =============================================================================== 000291cc : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 291cc: e59f300c ldr r3, [pc, #12] ; 291e0 <== NOT EXECUTED 291d0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 291d4: e3500000 cmp r0, #0 <== NOT EXECUTED 291d8: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 291dc: ea0067d0 b 43124 <== 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 =============================================================================== 000260fc : #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) { 260fc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 26100: 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) 26104: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 26108: 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) { 2610c: e1a08003 mov r8, r3 <== NOT EXECUTED 26110: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 26114: e1a06001 mov r6, r1 <== NOT EXECUTED 26118: 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) 2611c: 1594307c ldrne r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26120: 1a00000d bne 2615c <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 26124: e3520001 cmp r2, #1 <== NOT EXECUTED 26128: 0a000062 beq 262b8 <== 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); 2612c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26130: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26134: e1a02006 mov r2, r6 <== NOT EXECUTED 26138: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 2613c: ebff7d39 bl 5628 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26140: e3500000 cmp r0, #0 <== NOT EXECUTED 26144: 1a00006d bne 26300 <== 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; 26148: 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; 2614c: 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; 26150: e584607c str r6, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 26154: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED 26158: e1a03006 mov r3, r6 <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2615c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 26160: e1520003 cmp r2, r3 <== NOT EXECUTED 26164: 83a05000 movhi r5, #0 <== NOT EXECUTED 26168: 9a00004d bls 262a4 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2616c: e1560003 cmp r6, r3 <== NOT EXECUTED 26170: 0a000046 beq 26290 <== NOT EXECUTED { if (fs_info->c.modified) 26174: e5d4a080 ldrb sl, [r4, #128] ; 0x80 <== NOT EXECUTED 26178: e35a0000 cmp sl, #0 <== NOT EXECUTED 2617c: 0a000032 beq 2624c <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 26180: e3550000 cmp r5, #0 <== NOT EXECUTED 26184: 0a000002 beq 26194 <== NOT EXECUTED 26188: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 2618c: e3530000 cmp r3, #0 <== NOT EXECUTED 26190: 0a00004e beq 262d0 <== 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); 26194: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 26198: ebff78a3 bl 442c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 2619c: e3a03000 mov r3, #0 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 261a0: 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; 261a4: 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; 261a8: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 261ac: 1a000053 bne 26300 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 261b0: e3550000 cmp r5, #0 <== NOT EXECUTED 261b4: 0a000029 beq 26260 <== NOT EXECUTED 261b8: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 261bc: e3530000 cmp r3, #0 <== NOT EXECUTED 261c0: 1a000026 bne 26260 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 261c4: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 261c8: e3530001 cmp r3, #1 <== NOT EXECUTED 261cc: 9a000023 bls 26260 <== NOT EXECUTED 261d0: e3a05001 mov r5, #1 <== NOT EXECUTED 261d4: e1a0a00d mov sl, sp <== NOT EXECUTED 261d8: ea00000d b 26214 <== 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); 261dc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 261e0: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 261e4: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 261e8: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 261ec: eb00802f bl 462b0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 261f0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 261f4: ebff788c 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++) 261f8: 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) 261fc: 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++) 26200: 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) 26204: 1a00000b bne 26238 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26208: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 2620c: e1530005 cmp r3, r5 <== NOT EXECUTED 26210: 9a000012 bls 26260 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 26214: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26218: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 2621c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26220: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26224: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED 26228: e1a0300d mov r3, sp <== NOT EXECUTED 2622c: ebff7cfd bl 5628 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 26230: e3500000 cmp r0, #0 <== NOT EXECUTED 26234: 0affffe8 beq 261dc <== 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); 26238: eb00736c bl 42ff0 <__errno> <== NOT EXECUTED 2623c: e3a0300c mov r3, #12 <== NOT EXECUTED 26240: e5803000 str r3, [r0] <== NOT EXECUTED 26244: e3e00000 mvn r0, #0 <== NOT EXECUTED 26248: ea000013 b 2629c <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2624c: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 26250: ebff7897 bl 44b4 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 26254: e3500000 cmp r0, #0 <== NOT EXECUTED } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 26258: e5c4a081 strb sl, [r4, #129] ; 0x81 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2625c: 1a000027 bne 26300 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 26260: e3570001 cmp r7, #1 <== NOT EXECUTED 26264: 0a00001f beq 262e8 <== 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); 26268: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 2626c: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26270: e1a02006 mov r2, r6 <== NOT EXECUTED 26274: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 26278: ebff7cea bl 5628 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2627c: 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; 26280: 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; 26284: 0584607c streq r6, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 26288: 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) 2628c: 1a00001b bne 26300 <== 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; 26290: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 26294: e5883000 str r3, [r8] <== NOT EXECUTED 26298: e3a00000 mov r0, #0 <== NOT EXECUTED return RC_OK; } 2629c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 262a0: 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) && 262a4: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 262a8: e1550003 cmp r5, r3 <== NOT EXECUTED 262ac: 93a05000 movls r5, #0 <== NOT EXECUTED 262b0: 83a05001 movhi r5, #1 <== NOT EXECUTED 262b4: eaffffac b 2616c <== 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); 262b8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 262bc: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 262c0: e1a02006 mov r2, r6 <== NOT EXECUTED 262c4: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 262c8: ebff7d0a bl 56f8 <== NOT EXECUTED 262cc: eaffff9b b 26140 <== 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, 262d0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 262d4: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 262d8: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 262dc: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 262e0: eb007ff2 bl 462b0 <== NOT EXECUTED 262e4: eaffffaa b 26194 <== 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); 262e8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 262ec: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 262f0: e1a02006 mov r2, r6 <== NOT EXECUTED 262f4: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 262f8: ebff7cfe bl 56f8 <== NOT EXECUTED 262fc: eaffffde b 2627c <== 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); 26300: eb00733a bl 42ff0 <__errno> <== NOT EXECUTED 26304: e3a03005 mov r3, #5 <== NOT EXECUTED 26308: e5803000 str r3, [r0] <== NOT EXECUTED 2630c: e3e00000 mvn r0, #0 <== NOT EXECUTED 26310: eaffffe1 b 2629c <== NOT EXECUTED =============================================================================== 00025f90 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 25f90: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 25f94: 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) 25f98: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 25f9c: e3500000 cmp r0, #0 <== NOT EXECUTED return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 25fa0: 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) 25fa4: 0a000037 beq 26088 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 25fa8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 25fac: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 25fb0: e1530002 cmp r3, r2 <== NOT EXECUTED 25fb4: 33a05000 movcc r5, #0 <== NOT EXECUTED 25fb8: 2a000034 bcs 26090 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 25fbc: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 25fc0: e3530000 cmp r3, #0 <== NOT EXECUTED 25fc4: 0a000038 beq 260ac <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 25fc8: e3550000 cmp r5, #0 <== NOT EXECUTED 25fcc: 0a000002 beq 25fdc <== NOT EXECUTED 25fd0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 25fd4: e3530000 cmp r3, #0 <== NOT EXECUTED 25fd8: 0a00003a beq 260c8 <== 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); 25fdc: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 25fe0: ebff7911 bl 442c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 25fe4: e3500000 cmp r0, #0 <== NOT EXECUTED 25fe8: 1a00003c bne 260e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 25fec: 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; 25ff0: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 25ff4: 0a000030 beq 260bc <== NOT EXECUTED 25ff8: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 25ffc: e3530000 cmp r3, #0 <== NOT EXECUTED 26000: 1a00002d bne 260bc <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26004: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 26008: e3530001 cmp r3, #1 <== NOT EXECUTED 2600c: 9a00002a bls 260bc <== NOT EXECUTED 26010: e3a05001 mov r5, #1 <== NOT EXECUTED 26014: e1a0600d mov r6, sp <== NOT EXECUTED 26018: ea00000d b 26054 <== 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); 2601c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26020: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 26024: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 26028: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 2602c: eb00809f bl 462b0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 26030: e59d0000 ldr r0, [sp] <== NOT EXECUTED 26034: ebff78fc 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++) 26038: 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) 2603c: 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++) 26040: 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) 26044: 1a00000b bne 26078 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 26048: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED 2604c: e1530005 cmp r3, r5 <== NOT EXECUTED 26050: 9a000019 bls 260bc <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 26054: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 26058: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 2605c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26060: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 26064: e0223295 mla r2, r5, r2, r3 <== NOT EXECUTED 26068: e1a0300d mov r3, sp <== NOT EXECUTED 2606c: ebff7d6d bl 5628 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 26070: e3500000 cmp r0, #0 <== NOT EXECUTED 26074: 0affffe8 beq 2601c <== 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); 26078: eb0073dc bl 42ff0 <__errno> <== NOT EXECUTED 2607c: e3a0300c mov r3, #12 <== NOT EXECUTED 26080: e5803000 str r3, [r0] <== NOT EXECUTED 26084: 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; } 26088: e28dd004 add sp, sp, #4 <== NOT EXECUTED 2608c: 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) 26090: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 26094: e1530005 cmp r3, r5 <== NOT EXECUTED 26098: 23a05000 movcs r5, #0 <== NOT EXECUTED 2609c: 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) 260a0: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 260a4: e3530000 cmp r3, #0 <== NOT EXECUTED 260a8: 1affffc6 bne 25fc8 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 260ac: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 260b0: ebff78ff bl 44b4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 260b4: e3500000 cmp r0, #0 <== NOT EXECUTED 260b8: 1a000008 bne 260e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 260bc: e3a00000 mov r0, #0 <== NOT EXECUTED 260c0: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED return RC_OK; 260c4: eaffffef b 26088 <== 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); 260c8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 260cc: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 260d0: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 260d4: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 260d8: eb008074 bl 462b0 <== NOT EXECUTED 260dc: eaffffbe b 25fdc <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 260e0: eb0073c2 bl 42ff0 <__errno> <== NOT EXECUTED 260e4: e3a03005 mov r3, #5 <== NOT EXECUTED 260e8: e5803000 str r3, [r0] <== NOT EXECUTED 260ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 260f0: eaffffe4 b 26088 <== NOT EXECUTED =============================================================================== 00026d70 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 26d70: 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)) ) 26d74: e2513000 subs r3, r1, #0 <== NOT EXECUTED 26d78: e1a0c002 mov ip, r2 <== NOT EXECUTED 26d7c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 26d80: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 26d84: 1a000003 bne 26d98 <== NOT EXECUTED 26d88: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 26d8c: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 26d90: 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)) ) 26d94: 1a000003 bne 26da8 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 26d98: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 26d9c: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 26da0: e2433002 sub r3, r3, #2 <== NOT EXECUTED 26da4: 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, 26da8: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 26dac: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 26db0: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 26db4: e3a02000 mov r2, #0 <== NOT EXECUTED 26db8: e58dc000 str ip, [sp] <== NOT EXECUTED 26dbc: ebfffe21 bl 26648 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 26dc0: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26dc4: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00026540 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 26540: 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)) ) 26544: e2513000 subs r3, r1, #0 <== NOT EXECUTED 26548: e1a0c002 mov ip, r2 <== NOT EXECUTED 2654c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 26550: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 26554: 1a000003 bne 26568 <== NOT EXECUTED 26558: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 2655c: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 26560: 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)) ) 26564: 1a000003 bne 26578 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 26568: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 2656c: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 26570: e2433002 sub r3, r3, #2 <== NOT EXECUTED 26574: 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, 26578: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 2657c: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 26580: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 26584: e3a02000 mov r2, #0 <== NOT EXECUTED 26588: e58dc000 str ip, [sp] <== NOT EXECUTED 2658c: ebffff60 bl 26314 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 26590: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26594: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 000263f0 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 263f0: 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; 263f4: 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, 263f8: 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 ) { 263fc: 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, 26400: 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); 26404: e58d1008 str r1, [sp, #8] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 26408: e58d2004 str r2, [sp, #4] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2640c: e1a01003 mov r1, r3 <== NOT EXECUTED 26410: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED 26414: 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 ) { 26418: 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, 2641c: e58dc000 str ip, [sp] <== NOT EXECUTED 26420: ebffffbb bl 26314 <_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, 26424: e3a03004 mov r3, #4 <== NOT EXECUTED 26428: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED 2642c: 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, 26430: 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, 26434: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED 26438: e1a00004 mov r0, r4 <== NOT EXECUTED 2643c: e58dc000 str ip, [sp] <== NOT EXECUTED 26440: ebffffb3 bl 26314 <_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) ) 26444: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED 26448: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED return -1; return RC_OK; } 2644c: 13e00000 mvnne r0, #0 <== NOT EXECUTED 26450: e28dd00c add sp, sp, #12 <== NOT EXECUTED 26454: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00025b58 : /* * 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) 25b58: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 25b5c: e3530001 cmp r3, #1 <== NOT EXECUTED { fat_fd->links_num--; 25b60: 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 ) { 25b64: 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--; 25b68: 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 ) { 25b6c: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25b70: 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 ) { 25b74: 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--; 25b78: 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) 25b7c: 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) 25b80: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED 25b84: e2177001 ands r7, r7, #1 <== NOT EXECUTED 25b88: 0a00000d beq 25bc4 <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 25b8c: e3a02000 mov r2, #0 <== NOT EXECUTED 25b90: ebfffe1d bl 2540c <== NOT EXECUTED if ( rc != RC_OK ) 25b94: e3500000 cmp r0, #0 <== NOT EXECUTED 25b98: 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 ); 25b9c: e1a00004 mov r0, r4 <== NOT EXECUTED 25ba0: ebff9d42 bl d0b0 <_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) ) 25ba4: e1a00005 mov r0, r5 <== NOT EXECUTED 25ba8: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 25bac: eb0000b6 bl 25e8c <== NOT EXECUTED 25bb0: e3500000 cmp r0, #0 <== NOT EXECUTED 25bb4: 1a00000d bne 25bf0 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 25bb8: e1a00004 mov r0, r4 <== NOT EXECUTED 25bbc: ebff886b bl 7d70 <== NOT EXECUTED 25bc0: ea000004 b 25bd8 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 25bc4: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 25bc8: eb0000af bl 25e8c <== NOT EXECUTED 25bcc: e3500000 cmp r0, #0 <== NOT EXECUTED { fat_fd->links_num = 0; 25bd0: 15847008 strne r7, [r4, #8] <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 25bd4: 0a000002 beq 25be4 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 25bd8: e1a00006 mov r0, r6 <== NOT EXECUTED return rc; } 25bdc: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 25be0: ea0000ea b 25f90 <== NOT EXECUTED 25be4: e1a00004 mov r0, r4 <== NOT EXECUTED 25be8: ebff9d30 bl d0b0 <_Chain_Extract> <== NOT EXECUTED 25bec: eafffff1 b 25bb8 <== 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); 25bf0: e1a00005 mov r0, r5 <== NOT EXECUTED 25bf4: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 25bf8: eb000099 bl 25e64 <== NOT EXECUTED 25bfc: eaffffed b 25bb8 <== NOT EXECUTED =============================================================================== 000251b4 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 251b4: 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) 251b8: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 251bc: e3530000 cmp r3, #0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 251c0: 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; 251c4: 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 ) { 251c8: 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; 251cc: 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) 251d0: 01a00003 moveq r0, r3 <== NOT EXECUTED 251d4: 1a000001 bne 251e0 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 251d8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 251dc: 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; 251e0: 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); 251e4: 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; 251e8: 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; 251ec: 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); 251f0: eb000366 bl 25f90 <== NOT EXECUTED if (rc != RC_OK) 251f4: e250a000 subs sl, r0, #0 <== NOT EXECUTED 251f8: 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); 251fc: 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) 25200: 1a00002a bne 252b0 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 25204: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 25208: e285200c add r2, r5, #12 <== NOT EXECUTED 2520c: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 25210: e0012002 and r2, r1, r2 <== NOT EXECUTED 25214: e1520003 cmp r2, r3 <== NOT EXECUTED 25218: 2a000024 bcs 252b0 <== 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)) ) 2521c: 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; 25220: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 25224: 0a00001c beq 2529c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25228: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 2522c: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 25230: e2416002 sub r6, r1, #2 <== NOT EXECUTED 25234: 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++ ) 25238: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED 2523c: e3530000 cmp r3, #0 <== NOT EXECUTED 25240: 0a00001d beq 252bc <== NOT EXECUTED 25244: e3a04000 mov r4, #0 <== NOT EXECUTED 25248: ea000006 b 25268 <== 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); 2524c: e59d0000 ldr r0, [sp] <== NOT EXECUTED 25250: ebff7f0d bl 4e8c <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 25254: e3500000 cmp r0, #0 <== NOT EXECUTED 25258: 1a00000a bne 25288 <== 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++ ) 2525c: e5d53004 ldrb r3, [r5, #4] <== NOT EXECUTED 25260: e1530004 cmp r3, r4 <== NOT EXECUTED 25264: 9a000013 bls 252b8 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 25268: e0842006 add r2, r4, r6 <== NOT EXECUTED 2526c: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED 25270: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 25274: e1a0300d mov r3, sp <== NOT EXECUTED 25278: ebff811e bl 56f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2527c: 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++ ) 25280: e2844001 add r4, r4, #1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) 25284: 0afffff0 beq 2524c <== 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 ); 25288: eb007758 bl 42ff0 <__errno> <== NOT EXECUTED 2528c: e3a03005 mov r3, #5 <== NOT EXECUTED 25290: e5803000 str r3, [r0] <== NOT EXECUTED 25294: e3e00000 mvn r0, #0 <== NOT EXECUTED 25298: eaffffce b 251d8 <== 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)) ) 2529c: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 252a0: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 252a4: 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)) ) 252a8: 1affffe2 bne 25238 <== NOT EXECUTED 252ac: eaffffdd b 25228 <== 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) 252b0: e1a0000a mov r0, sl <== NOT EXECUTED 252b4: eaffffc7 b 251d8 <== 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++ ) 252b8: 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); 252bc: e1a00008 mov r0, r8 <== NOT EXECUTED 252c0: e1a02009 mov r2, r9 <== NOT EXECUTED 252c4: eb0066d7 bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 252c8: e3500000 cmp r0, #0 <== NOT EXECUTED 252cc: 0affffcc beq 25204 <== NOT EXECUTED 252d0: eaffffc0 b 251d8 <== NOT EXECUTED =============================================================================== 00025514 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 25514: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 25518: 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; 2551c: e5882000 str r2, [r8] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 25520: 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 ) { 25524: 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; 25528: 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) 2552c: 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 ) { 25530: e1a04002 mov r4, r2 <== NOT EXECUTED 25534: e1a05001 mov r5, r1 <== NOT EXECUTED 25538: 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; 2553c: 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; 25540: 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; 25544: 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) 25548: 9a000039 bls 25634 <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2554c: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 25550: e3530001 cmp r3, #1 <== NOT EXECUTED 25554: 0a00003a beq 25644 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 25558: e1d720b6 ldrh r2, [r7, #6] <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 2555c: 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 - 25560: e003a00b and sl, r3, fp <== NOT EXECUTED 25564: e06aa002 rsb sl, sl, r2 <== NOT EXECUTED 25568: 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; 2556c: e06bb004 rsb fp, fp, r4 <== NOT EXECUTED if (bytes2add > bytes_remain) 25570: e15a000b cmp sl, fp <== NOT EXECUTED 25574: 2a00002e bcs 25634 <== 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) 25578: e05bb00a subs fp, fp, sl <== NOT EXECUTED 2557c: 0a00002c beq 25634 <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 25580: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 25584: e24b9001 sub r9, fp, #1 <== NOT EXECUTED 25588: e1a09339 lsr r9, r9, r3 <== NOT EXECUTED 2558c: e2899001 add r9, r9, #1 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 25590: e28dc008 add ip, sp, #8 <== NOT EXECUTED 25594: e1a00006 mov r0, r6 <== NOT EXECUTED 25598: e28d1010 add r1, sp, #16 <== NOT EXECUTED 2559c: e1a02009 mov r2, r9 <== NOT EXECUTED 255a0: e28d3004 add r3, sp, #4 <== NOT EXECUTED 255a4: e58dc000 str ip, [sp] <== NOT EXECUTED 255a8: eb0066b5 bl 3f084 <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 255ac: e3500000 cmp r0, #0 <== NOT EXECUTED 255b0: 11a08000 movne r8, r0 <== NOT EXECUTED 255b4: 1a00001f bne 25638 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 255b8: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 255bc: e19aa002 orrs sl, sl, r2 <== NOT EXECUTED 255c0: 0a000025 beq 2565c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 255c4: e1590002 cmp r9, r2 <== NOT EXECUTED 255c8: 0a000008 beq 255f0 <== NOT EXECUTED *a_length = new_length - 255cc: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 255d0: e1e01002 mvn r1, r2 <== NOT EXECUTED 255d4: e0819009 add r9, r1, r9 <== NOT EXECUTED 255d8: e0449319 sub r9, r4, r9, lsl r3 <== NOT EXECUTED 255dc: e1d730b6 ldrh r3, [r7, #6] <== NOT EXECUTED 255e0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 255e4: e00bb003 and fp, fp, r3 <== NOT EXECUTED 255e8: e06bb009 rsb fp, fp, r9 <== NOT EXECUTED 255ec: 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 ) 255f0: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED 255f4: e3530000 cmp r3, #0 <== NOT EXECUTED 255f8: 1a00001c bne 25670 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 255fc: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED fat_fd->map.file_cln = 0; 25600: 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; 25604: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED 25608: 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) 2560c: e3520000 cmp r2, #0 <== NOT EXECUTED 25610: 0a000004 beq 25628 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 25614: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 25618: 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; 2561c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 25620: e585303c str r3, [r5, #60] ; 0x3c <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 25624: 0a00001e beq 256a4 <== NOT EXECUTED return rc; } } } fat_fd->fat_file_size = new_length; 25628: e5854018 str r4, [r5, #24] <== NOT EXECUTED 2562c: e3a08000 mov r8, #0 <== NOT EXECUTED return RC_OK; 25630: ea000000 b 25638 <== NOT EXECUTED 25634: e3a08000 mov r8, #0 <== NOT EXECUTED } 25638: e1a00008 mov r0, r8 <== NOT EXECUTED 2563c: e28dd014 add sp, sp, #20 <== NOT EXECUTED 25640: 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)) && 25644: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 25648: e3530000 cmp r3, #0 <== NOT EXECUTED 2564c: 1affffc1 bne 25558 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25650: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED 25654: e3130003 tst r3, #3 <== NOT EXECUTED 25658: 0affffbe beq 25558 <== 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); 2565c: eb007663 bl 42ff0 <__errno> <== NOT EXECUTED 25660: e3a0301c mov r3, #28 <== NOT EXECUTED 25664: e5803000 str r3, [r0] <== NOT EXECUTED 25668: e3e08000 mvn r8, #0 <== NOT EXECUTED 2566c: eafffff1 b 25638 <== 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) 25670: e595103c ldr r1, [r5, #60] ; 0x3c <== NOT EXECUTED 25674: e3710001 cmn r1, #1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 25678: 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) 2567c: 0a000011 beq 256c8 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 25680: e1a00006 mov r0, r6 <== NOT EXECUTED 25684: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 25688: eb006545 bl 3eba4 <== NOT EXECUTED if ( rc != RC_OK ) 2568c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 25690: 1a000008 bne 256b8 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 25694: e1a00007 mov r0, r7 <== NOT EXECUTED 25698: eb00023c bl 25f90 <== NOT EXECUTED 2569c: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 256a0: eaffffd9 b 2560c <== 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); 256a4: e1a00006 mov r0, r6 <== NOT EXECUTED 256a8: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 256ac: eb0003b9 bl 26598 <== NOT EXECUTED if ( rc != RC_OK ) 256b0: e2508000 subs r8, r0, #0 <== NOT EXECUTED 256b4: 0affffdb beq 25628 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 256b8: e1a00006 mov r0, r6 <== NOT EXECUTED 256bc: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 256c0: eb006639 bl 3efac <== NOT EXECUTED return rc; 256c4: eaffffdb b 25638 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 256c8: e1a01005 mov r1, r5 <== NOT EXECUTED 256cc: e28dc00c add ip, sp, #12 <== NOT EXECUTED 256d0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 256d4: e1a00006 mov r0, r6 <== NOT EXECUTED 256d8: e3a02001 mov r2, #1 <== NOT EXECUTED 256dc: e58dc000 str ip, [sp] <== NOT EXECUTED 256e0: ebffff0f bl 25324 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 256e4: e2508000 subs r8, r0, #0 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 256e8: 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 ) 256ec: 0affffe3 beq 25680 <== NOT EXECUTED 256f0: eafffff0 b 256b8 <== NOT EXECUTED =============================================================================== 00025324 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 25324: e92d000c push {r2, r3} <== NOT EXECUTED 25328: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2532c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 25330: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 25334: 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); 25338: e28d3018 add r3, sp, #24 <== NOT EXECUTED 2533c: 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; 25340: e3a02000 mov r2, #0 <== NOT EXECUTED 25344: 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; 25348: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2534c: 0a000007 beq 25370 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 25350: eb007726 bl 42ff0 <__errno> <== NOT EXECUTED 25354: e3a03016 mov r3, #22 <== NOT EXECUTED 25358: e5803000 str r3, [r0] <== NOT EXECUTED 2535c: e3e00000 mvn r0, #0 <== NOT EXECUTED rc = -1; break; } return rc; } 25360: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25364: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED 25368: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2536c: 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 ) 25370: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 25374: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 25378: e2833008 add r3, r3, #8 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 2537c: e1520004 cmp r2, r4 <== NOT EXECUTED switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); 25380: e58d3000 str r3, [sp] <== NOT EXECUTED 25384: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 25388: 2a00001a bcs 253f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2538c: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 25390: e3530001 cmp r3, #1 <== NOT EXECUTED 25394: 0a000008 beq 253bc <== 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); 25398: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 2539c: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 253a0: e28d3004 add r3, sp, #4 <== NOT EXECUTED 253a4: ebffff53 bl 250f8 <== NOT EXECUTED if ( rc != RC_OK ) 253a8: e3500000 cmp r0, #0 <== NOT EXECUTED 253ac: 1affffeb bne 25360 <== NOT EXECUTED return rc; *ret = cur_cln; 253b0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 253b4: e5843000 str r3, [r4] <== NOT EXECUTED break; 253b8: eaffffe8 b 25360 <== 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)) && 253bc: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 253c0: e3530000 cmp r3, #0 <== NOT EXECUTED 253c4: 1afffff3 bne 25398 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 253c8: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED 253cc: e3150003 tst r5, #3 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 253d0: 15843000 strne r3, [r4] <== NOT EXECUTED 253d4: 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))) 253d8: 1affffe0 bne 25360 <== 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); 253dc: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 253e0: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 253e4: e28d3004 add r3, sp, #4 <== NOT EXECUTED 253e8: ebffff42 bl 250f8 <== NOT EXECUTED if ( rc != RC_OK ) 253ec: e3500000 cmp r0, #0 <== NOT EXECUTED 253f0: 0affffee beq 253b0 <== NOT EXECUTED 253f4: eaffffd9 b 25360 <== 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 ); 253f8: eb0076fc bl 42ff0 <__errno> <== NOT EXECUTED 253fc: e3a03005 mov r3, #5 <== NOT EXECUTED 25400: e5803000 str r3, [r0] <== NOT EXECUTED 25404: e3e00000 mvn r0, #0 <== NOT EXECUTED 25408: eaffffd4 b 25360 <== NOT EXECUTED =============================================================================== 000250f8 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 250f8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 250fc: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED 25100: 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 ) { 25104: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 25108: e1a05001 mov r5, r1 <== NOT EXECUTED 2510c: e1a06002 mov r6, r2 <== NOT EXECUTED 25110: e1a04000 mov r4, r0 <== NOT EXECUTED 25114: e1a09003 mov r9, r3 <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 25118: 0a000020 beq 251a0 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2511c: 35911038 ldrcc r1, [r1, #56] ; 0x38 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 25120: 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; 25124: 30688002 rsbcc r8, r8, r2 <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 25128: 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; 2512c: 358d1000 strcc r1, [sp] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 25130: 258d1000 strcs r1, [sp] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 25134: e3580000 cmp r8, #0 <== NOT EXECUTED 25138: 0a000012 beq 25188 <== NOT EXECUTED 2513c: e3a07000 mov r7, #0 <== NOT EXECUTED 25140: e1a0a00d mov sl, sp <== NOT EXECUTED 25144: ea000002 b 25154 <== NOT EXECUTED 25148: e1580007 cmp r8, r7 <== NOT EXECUTED 2514c: 9a00000c bls 25184 <== NOT EXECUTED 25150: e59d1000 ldr r1, [sp] <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25154: e1a00004 mov r0, r4 <== NOT EXECUTED 25158: e1a0200d mov r2, sp <== NOT EXECUTED 2515c: eb006731 bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 25160: e3500000 cmp r0, #0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 25164: e2877001 add r7, r7, #1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) 25168: 0afffff6 beq 25148 <== NOT EXECUTED return rc; 2516c: e1a03000 mov r3, r0 <== NOT EXECUTED 25170: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 25174: e1a01004 mov r1, r4 <== NOT EXECUTED 25178: e1a00003 mov r0, r3 <== NOT EXECUTED 2517c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 25180: 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++) 25184: e59d1000 ldr r1, [sp] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 25188: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2518c: e5851038 str r1, [r5, #56] ; 0x38 <== NOT EXECUTED *disk_cln = cur_cln; 25190: e3a03000 mov r3, #0 <== NOT EXECUTED 25194: e5891000 str r1, [r9] <== NOT EXECUTED 25198: e3a04000 mov r4, #0 <== NOT EXECUTED 2519c: eafffff4 b 25174 <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 251a0: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED 251a4: e3a04000 mov r4, #0 <== NOT EXECUTED 251a8: e5893000 str r3, [r9] <== NOT EXECUTED 251ac: e3a03000 mov r3, #0 <== NOT EXECUTED 251b0: eaffffef b 25174 <== NOT EXECUTED =============================================================================== 000252d4 : 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) + 252d4: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 252d8: 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 ) { 252dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 252e0: e1a04001 mov r4, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 252e4: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 252e8: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED 252ec: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 252f0: 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 ); 252f4: e2066001 and r6, r6, #1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 252f8: ebff9f6c bl d0b0 <_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 ); 252fc: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED 25300: e1a02086 lsl r2, r6, #1 <== NOT EXECUTED 25304: e0826006 add r6, r2, r6 <== NOT EXECUTED 25308: e0830106 add r0, r3, r6, lsl #2 <== NOT EXECUTED 2530c: e1a01004 mov r1, r4 <== NOT EXECUTED 25310: ebff9f5b bl d084 <_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; 25314: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED 25318: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2531c: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED } 25320: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00025c00 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 25c00: 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) + 25c04: e5915000 ldr r5, [r1] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25c08: e3550001 cmp r5, #1 <== NOT EXECUTED 25c0c: e1a08001 mov r8, r1 <== NOT EXECUTED 25c10: e1a0a000 mov sl, r0 <== NOT EXECUTED 25c14: e1a09002 mov r9, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25c18: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 25c1c: 0a000007 beq 25c40 <== 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)) ) 25c20: e3550000 cmp r5, #0 <== NOT EXECUTED 25c24: 0a00005b beq 25d98 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25c28: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 25c2c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 25c30: e2455002 sub r5, r5, #2 <== NOT EXECUTED 25c34: 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) << 25c38: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 25c3c: e1a05315 lsl r5, r5, r3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25c40: 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) + 25c44: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED 25c48: e08554a3 add r5, r5, r3, lsr #9 <== NOT EXECUTED 25c4c: e202200f and r2, r2, #15 <== NOT EXECUTED 25c50: 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; 25c54: e2053001 and r3, r5, #1 <== NOT EXECUTED 25c58: e1a07083 lsl r7, r3, #1 <== NOT EXECUTED 25c5c: e0877003 add r7, r7, r3 <== NOT EXECUTED 25c60: e594c064 ldr ip, [r4, #100] ; 0x64 <== NOT EXECUTED 25c64: e1a07107 lsl r7, r7, #2 <== NOT EXECUTED 25c68: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED 25c6c: 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; 25c70: e28cc004 add ip, ip, #4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25c74: e15c0003 cmp ip, r3 <== NOT EXECUTED 25c78: 1a000003 bne 25c8c <== NOT EXECUTED 25c7c: ea00001e b 25cfc <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 25c80: 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) ; ) 25c84: e15c0003 cmp ip, r3 <== NOT EXECUTED 25c88: 0a00001b beq 25cfc <== NOT EXECUTED 25c8c: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25c90: 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) + 25c94: e2420002 sub r0, r2, #2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25c98: 0a00000a beq 25cc8 <== 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)) ) 25c9c: e3520000 cmp r2, #0 <== NOT EXECUTED 25ca0: 1a000003 bne 25cb4 <== NOT EXECUTED 25ca4: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED 25ca8: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25cac: 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)) ) 25cb0: 1a000002 bne 25cc0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25cb4: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED 25cb8: e5942030 ldr r2, [r4, #48] ; 0x30 <== NOT EXECUTED 25cbc: 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) << 25cc0: e5d46003 ldrb r6, [r4, #3] <== NOT EXECUTED 25cc4: e1a02612 lsl r2, r2, r6 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25cc8: 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) 25ccc: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED 25cd0: e200000f and r0, r0, #15 <== NOT EXECUTED 25cd4: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED 25cd8: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED 25cdc: e1550001 cmp r5, r1 <== NOT EXECUTED 25ce0: 1affffe6 bne 25c80 <== 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++; 25ce4: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED 25ce8: e2822001 add r2, r2, #1 <== NOT EXECUTED 25cec: 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; 25cf0: e5893000 str r3, [r9] <== NOT EXECUTED lfat_fd->links_num++; 25cf4: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 25cf8: 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; 25cfc: e594c068 ldr ip, [r4, #104] ; 0x68 <== NOT EXECUTED 25d00: e79c3007 ldr r3, [ip, r7] <== NOT EXECUTED 25d04: e08cc007 add ip, ip, r7 <== NOT EXECUTED 25d08: e28cc004 add ip, ip, #4 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 25d0c: e153000c cmp r3, ip <== NOT EXECUTED 25d10: 1a000009 bne 25d3c <== NOT EXECUTED 25d14: e3e0b000 mvn fp, #0 <== NOT EXECUTED 25d18: ea000024 b 25db0 <== 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) ) 25d1c: e3550000 cmp r5, #0 <== NOT EXECUTED 25d20: 0a000021 beq 25dac <== NOT EXECUTED 25d24: e593200c ldr r2, [r3, #12] <== NOT EXECUTED 25d28: e1550002 cmp r5, r2 <== NOT EXECUTED 25d2c: 0a00001e beq 25dac <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 25d30: 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) ; ) 25d34: e15c0003 cmp ip, r3 <== NOT EXECUTED 25d38: 0afffff5 beq 25d14 <== 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) + 25d3c: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 25d40: e3520001 cmp r2, #1 <== NOT EXECUTED 25d44: 0a00000b beq 25d78 <== 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)) ) 25d48: e3520000 cmp r2, #0 <== NOT EXECUTED 25d4c: 1a000003 bne 25d60 <== NOT EXECUTED 25d50: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED 25d54: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25d58: 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)) ) 25d5c: 1a000003 bne 25d70 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25d60: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED 25d64: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 25d68: e2422002 sub r2, r2, #2 <== NOT EXECUTED 25d6c: 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) << 25d70: e5d40003 ldrb r0, [r4, #3] <== NOT EXECUTED 25d74: e1a02012 lsl r2, r2, r0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 25d78: 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) 25d7c: e1a002a1 lsr r0, r1, #5 <== NOT EXECUTED 25d80: e200000f and r0, r0, #15 <== NOT EXECUTED 25d84: e08214a1 add r1, r2, r1, lsr #9 <== NOT EXECUTED 25d88: e0801201 add r1, r0, r1, lsl #4 <== NOT EXECUTED 25d8c: e1550001 cmp r5, r1 <== NOT EXECUTED 25d90: 1affffe6 bne 25d30 <== NOT EXECUTED 25d94: eaffffe0 b 25d1c <== 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)) ) 25d98: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 25d9c: e3130003 tst r3, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25da0: 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)) ) 25da4: 1affffa3 bne 25c38 <== NOT EXECUTED 25da8: eaffff9e b 25c28 <== 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) ; ) 25dac: 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)); 25db0: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED 25db4: ebff89b1 bl 8480 <== NOT EXECUTED if ( lfat_fd == NULL ) 25db8: 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)); 25dbc: e1a06000 mov r6, r0 <== NOT EXECUTED 25dc0: e5890000 str r0, [r9] <== NOT EXECUTED if ( lfat_fd == NULL ) 25dc4: 0a000021 beq 25e50 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 25dc8: e3a01000 mov r1, #0 <== NOT EXECUTED 25dcc: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED 25dd0: eb0081bd bl 464cc <== NOT EXECUTED lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 25dd4: e5d6c030 ldrb ip, [r6, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 25dd8: 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; 25ddc: e3cce001 bic lr, ip, #1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 25de0: e286c020 add ip, r6, #32 <== NOT EXECUTED if ( rc != RC_OK ) 25de4: 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; 25de8: e3e08000 mvn r8, #0 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 25dec: 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; 25df0: e3a03001 mov r3, #1 <== NOT EXECUTED 25df4: e5863008 str r3, [r6, #8] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 25df8: e5c6e030 strb lr, [r6, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 25dfc: e586803c str r8, [r6, #60] ; 0x3c <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) lfat_fd->ino = key; 25e00: 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 ) 25e04: 0a000005 beq 25e20 <== 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 ); 25e08: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 25e0c: e1a01006 mov r1, r6 <== NOT EXECUTED 25e10: e0800007 add r0, r0, r7 <== NOT EXECUTED 25e14: ebff9c9a bl d084 <_Chain_Append> <== NOT EXECUTED 25e18: e3a00000 mov r0, #0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 25e1c: 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); 25e20: e1a0000a mov r0, sl <== NOT EXECUTED 25e24: eb00001e bl 25ea4 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 25e28: e3500000 cmp r0, #0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 25e2c: e586000c str r0, [r6, #12] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 25e30: 1afffff4 bne 25e08 <== NOT EXECUTED { free((*fat_fd)); 25e34: e5990000 ldr r0, [r9] <== NOT EXECUTED 25e38: ebff87cc 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 ); 25e3c: eb00746b bl 42ff0 <__errno> <== NOT EXECUTED 25e40: e3a0300c mov r3, #12 <== NOT EXECUTED 25e44: e5803000 str r3, [r0] <== NOT EXECUTED 25e48: e1a00008 mov r0, r8 <== NOT EXECUTED 25e4c: 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 ); 25e50: eb007466 bl 42ff0 <__errno> <== NOT EXECUTED 25e54: e3a0300c mov r3, #12 <== NOT EXECUTED 25e58: e5803000 str r3, [r0] <== NOT EXECUTED 25e5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25e60: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 0002594c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2594c: 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) 25950: e2535000 subs r5, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 25954: e24dd014 sub sp, sp, #20 <== NOT EXECUTED 25958: e1a06000 mov r6, r0 <== NOT EXECUTED 2595c: e1a0a001 mov sl, r1 <== NOT EXECUTED 25960: e1a04002 mov r4, r2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 25964: 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) 25968: 0a00004d beq 25aa4 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 2596c: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 25970: e1530002 cmp r3, r2 <== NOT EXECUTED 25974: 9a00004a bls 25aa4 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 25978: e1550003 cmp r5, r3 <== NOT EXECUTED 2597c: 9a00004b bls 25ab0 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 25980: e0645003 rsb r5, r4, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25984: e59a3020 ldr r3, [sl, #32] <== NOT EXECUTED 25988: 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; 2598c: e3a03000 mov r3, #0 <== NOT EXECUTED 25990: 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)) && 25994: 0a000049 beq 25ac0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 25998: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 2599c: 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); 259a0: e28db010 add fp, sp, #16 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 259a4: 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); 259a8: e1a02003 mov r2, r3 <== NOT EXECUTED 259ac: e1a00006 mov r0, r6 <== NOT EXECUTED 259b0: e1a0100a mov r1, sl <== NOT EXECUTED 259b4: 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); 259b8: e1d790b6 ldrh r9, [r7, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 259bc: ebfffdcd bl 250f8 <== NOT EXECUTED if (rc != RC_OK) 259c0: e2508000 subs r8, r0, #0 <== NOT EXECUTED 259c4: 11a00008 movne r0, r8 <== NOT EXECUTED 259c8: 1a000036 bne 25aa8 <== NOT EXECUTED return rc; while (count > 0) 259cc: 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); 259d0: e2499001 sub r9, r9, #1 <== NOT EXECUTED 259d4: 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) 259d8: 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); 259dc: 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) 259e0: 01a08000 moveq r8, r0 <== NOT EXECUTED 259e4: 01a09000 moveq r9, r0 <== NOT EXECUTED 259e8: 0a000051 beq 25b34 <== 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: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED 259f0: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED 259f4: e58da00c str sl, [sp, #12] <== NOT EXECUTED 259f8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 259fc: e59da038 ldr sl, [sp, #56] ; 0x38 <== NOT EXECUTED 25a00: ea000003 b 25a14 <== NOT EXECUTED return rc; while (count > 0) 25a04: e0555004 subs r5, r5, r4 <== NOT EXECUTED 25a08: 0a000047 beq 25b2c <== NOT EXECUTED 25a0c: e5d79002 ldrb r9, [r7, #2] <== NOT EXECUTED 25a10: e1d720b0 ldrh r2, [r7] <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 25a14: e1d740b6 ldrh r4, [r7, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 25a18: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 25a1c: e0614004 rsb r4, r1, r4 <== NOT EXECUTED 25a20: e1540005 cmp r4, r5 <== NOT EXECUTED 25a24: 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)) ) 25a28: 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; 25a2c: 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) + 25a30: 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)) ) 25a34: 1a000003 bne 25a48 <== NOT EXECUTED 25a38: e5d3c00a ldrb ip, [r3, #10] <== NOT EXECUTED 25a3c: e31c0003 tst ip, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25a40: 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)) ) 25a44: 1a000002 bne 25a54 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25a48: e593c030 ldr ip, [r3, #48] ; 0x30 <== NOT EXECUTED 25a4c: e5d3e005 ldrb lr, [r3, #5] <== NOT EXECUTED 25a50: 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); 25a54: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25a58: e0022001 and r2, r2, r1 <== NOT EXECUTED 25a5c: e08ac008 add ip, sl, r8 <== NOT EXECUTED 25a60: e1a03004 mov r3, r4 <== NOT EXECUTED 25a64: e1a00006 mov r0, r6 <== NOT EXECUTED 25a68: e08e1931 add r1, lr, r1, lsr r9 <== NOT EXECUTED 25a6c: e58dc000 str ip, [sp] <== NOT EXECUTED 25a70: eb0002f4 bl 26648 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 25a74: e3500000 cmp r0, #0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; 25a78: e0888004 add r8, r8, r4 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25a7c: e1a0200b mov r2, fp <== NOT EXECUTED 25a80: 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 ) 25a84: ba000026 blt 25b24 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 25a88: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25a8c: e1a01009 mov r1, r9 <== NOT EXECUTED 25a90: eb0064e4 bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 25a94: e2501000 subs r1, r0, #0 <== NOT EXECUTED 25a98: 0affffd9 beq 25a04 <== NOT EXECUTED 25a9c: e1a00001 mov r0, r1 <== NOT EXECUTED 25aa0: ea000000 b 25aa8 <== 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; 25aa4: e3a00000 mov r0, #0 <== NOT EXECUTED } 25aa8: e28dd014 add sp, sp, #20 <== NOT EXECUTED 25aac: 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) || 25ab0: e0652003 rsb r2, r5, r3 <== NOT EXECUTED 25ab4: e1540002 cmp r4, r2 <== NOT EXECUTED 25ab8: 9affffb1 bls 25984 <== NOT EXECUTED 25abc: eaffffaf b 25980 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 25ac0: e59a3024 ldr r3, [sl, #36] ; 0x24 <== NOT EXECUTED 25ac4: e3530000 cmp r3, #0 <== NOT EXECUTED 25ac8: 1affffb2 bne 25998 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25acc: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED 25ad0: e3130003 tst r3, #3 <== NOT EXECUTED 25ad4: 0affffaf beq 25998 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 25ad8: 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)) ) 25adc: e3530000 cmp r3, #0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25ae0: 15d71005 ldrbne r1, [r7, #5] <== NOT EXECUTED 25ae4: 15972030 ldrne r2, [r7, #48] ; 0x30 <== NOT EXECUTED 25ae8: 12433002 subne r3, r3, #2 <== NOT EXECUTED 25aec: 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); 25af0: 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; 25af4: 0597301c ldreq r3, [r7, #28] <== NOT EXECUTED 25af8: e5d71002 ldrb r1, [r7, #2] <== NOT EXECUTED 25afc: e59dc038 ldr ip, [sp, #56] ; 0x38 <== NOT EXECUTED 25b00: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25b04: e0831134 add r1, r3, r4, lsr r1 <== NOT EXECUTED 25b08: e0042002 and r2, r4, r2 <== NOT EXECUTED 25b0c: e1a00006 mov r0, r6 <== NOT EXECUTED 25b10: e1a03005 mov r3, r5 <== NOT EXECUTED 25b14: e58dc000 str ip, [sp] <== NOT EXECUTED 25b18: eb0002ca bl 26648 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 25b1c: e3500000 cmp r0, #0 <== NOT EXECUTED 25b20: aaffffe0 bge 25aa8 <== 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; 25b24: e3e00000 mvn r0, #0 <== NOT EXECUTED 25b28: eaffffde b 25aa8 <== NOT EXECUTED 25b2c: 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) 25b30: e1a00008 mov r0, r8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25b34: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 25b38: e5d73008 ldrb r3, [r7, #8] <== NOT EXECUTED 25b3c: e2424001 sub r4, r2, #1 <== NOT EXECUTED 25b40: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 25b44: e0848008 add r8, r4, r8 <== NOT EXECUTED 25b48: 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; 25b4c: 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 + 25b50: 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; 25b54: eaffffd3 b 25aa8 <== NOT EXECUTED =============================================================================== 00025018 : * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { fat_fd->links_num++; 25018: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED 2501c: e2833001 add r3, r3, #1 <== NOT EXECUTED 25020: e5803008 str r3, [r0, #8] <== NOT EXECUTED return RC_OK; } 25024: e3a00000 mov r0, #0 <== NOT EXECUTED 25028: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0002502c : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2502c: 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)) && 25030: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 25034: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 25038: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 2503c: e1a05001 mov r5, r1 <== NOT EXECUTED 25040: e1a08000 mov r8, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25044: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 25048: 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)) && 2504c: 0a000020 beq 250d4 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 25050: e3a03000 mov r3, #0 <== NOT EXECUTED 25054: e5853018 str r3, [r5, #24] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 25058: e284100c add r1, r4, #12 <== NOT EXECUTED 2505c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 25060: e0061001 and r1, r6, r1 <== NOT EXECUTED 25064: e1510002 cmp r1, r2 <== NOT EXECUTED 25068: 2a000015 bcs 250c4 <== 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; 2506c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 25070: e5276004 str r6, [r7, #-4]! <== NOT EXECUTED 25074: ea00000a b 250a4 <== 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; 25078: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED 2507c: e1d430b6 ldrh r3, [r4, #6] <== NOT EXECUTED 25080: e0823003 add r3, r2, r3 <== NOT EXECUTED 25084: 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) 25088: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2508c: e284100c add r1, r4, #12 <== NOT EXECUTED 25090: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 25094: e0031001 and r1, r3, r1 <== NOT EXECUTED 25098: e1510002 cmp r1, r2 <== NOT EXECUTED 2509c: 2a000009 bcs 250c8 <== NOT EXECUTED 250a0: e1a06003 mov r6, r3 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 250a4: e1a01006 mov r1, r6 <== NOT EXECUTED 250a8: e1a00008 mov r0, r8 <== NOT EXECUTED 250ac: e1a0200d mov r2, sp <== NOT EXECUTED 250b0: eb00675c bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 250b4: e3500000 cmp r0, #0 <== NOT EXECUTED 250b8: 0affffee beq 25078 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 250bc: e28dd004 add sp, sp, #4 <== NOT EXECUTED 250c0: 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) 250c4: 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; 250c8: e585603c str r6, [r5, #60] ; 0x3c <== NOT EXECUTED 250cc: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 250d0: eafffff9 b 250bc <== 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)) && 250d4: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED 250d8: e3500000 cmp r0, #0 <== NOT EXECUTED 250dc: 1affffdb bne 25050 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 250e0: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 250e4: e3130003 tst r3, #3 <== NOT EXECUTED 250e8: 0affffd8 beq 25050 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 250ec: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 250f0: e5813018 str r3, [r1, #24] <== NOT EXECUTED return rc; 250f4: eafffff0 b 250bc <== NOT EXECUTED =============================================================================== 0002540c : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2540c: 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 ) 25410: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 25414: 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 ) { 25418: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 2541c: e1a05001 mov r5, r1 <== NOT EXECUTED 25420: e1a04000 mov r4, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 25424: 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 ) 25428: 9a00002d bls 254e4 <== 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; 2542c: e3a06000 mov r6, #0 <== NOT EXECUTED 25430: e58d6004 str r6, [sp, #4] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 25434: 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; 25438: e3e06000 mvn r6, #0 <== NOT EXECUTED 2543c: e58d6000 str r6, [sp] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 25440: 0a00002a beq 254f0 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 25444: e1dc60b6 ldrh r6, [ip, #6] <== NOT EXECUTED 25448: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED 2544c: e2466001 sub r6, r6, #1 <== NOT EXECUTED 25450: e0866002 add r6, r6, r2 <== NOT EXECUTED 25454: e1a06c36 lsr r6, r6, ip <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 25458: e1530c16 cmp r3, r6, lsl ip <== NOT EXECUTED 2545c: 9a000020 bls 254e4 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 25460: e3560000 cmp r6, #0 <== NOT EXECUTED 25464: 0a000004 beq 2547c <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 25468: e2462001 sub r2, r6, #1 <== NOT EXECUTED 2546c: e1a0300d mov r3, sp <== NOT EXECUTED 25470: ebffff20 bl 250f8 <== NOT EXECUTED if (rc != RC_OK) 25474: e3500000 cmp r0, #0 <== NOT EXECUTED 25478: 1a00001a bne 254e8 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2547c: e1a00004 mov r0, r4 <== NOT EXECUTED 25480: e1a01005 mov r1, r5 <== NOT EXECUTED 25484: e1a02006 mov r2, r6 <== NOT EXECUTED 25488: e28d3004 add r3, sp, #4 <== NOT EXECUTED 2548c: ebffff19 bl 250f8 <== NOT EXECUTED if (rc != RC_OK) 25490: e3500000 cmp r0, #0 <== NOT EXECUTED 25494: 1a000013 bne 254e8 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 25498: e1a00004 mov r0, r4 <== NOT EXECUTED 2549c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 254a0: eb0066c1 bl 3efac <== NOT EXECUTED if (rc != RC_OK) 254a4: e3500000 cmp r0, #0 <== NOT EXECUTED 254a8: 1a00000e bne 254e8 <== NOT EXECUTED return rc; if (cl_start != 0) 254ac: e3560000 cmp r6, #0 <== NOT EXECUTED 254b0: 0a00000c beq 254e8 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 254b4: e1a00004 mov r0, r4 <== NOT EXECUTED 254b8: e59d1000 ldr r1, [sp] <== NOT EXECUTED 254bc: e3e02000 mvn r2, #0 <== NOT EXECUTED 254c0: eb0065b7 bl 3eba4 <== NOT EXECUTED if ( rc != RC_OK ) 254c4: e3500000 cmp r0, #0 <== NOT EXECUTED 254c8: 1a000006 bne 254e8 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 254cc: 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; 254d0: e2466001 sub r6, r6, #1 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 254d4: 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; 254d8: e5856034 str r6, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 254dc: e5853038 str r3, [r5, #56] ; 0x38 <== NOT EXECUTED 254e0: ea000000 b 254e8 <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 254e4: e3a00000 mov r0, #0 <== NOT EXECUTED } return RC_OK; } 254e8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 254ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 254f0: e3a01f9b mov r1, #620 ; 0x26c <== NOT EXECUTED 254f4: e2811001 add r1, r1, #1 <== NOT EXECUTED 254f8: e59f0008 ldr r0, [pc, #8] ; 25508 <== NOT EXECUTED 254fc: e59f2008 ldr r2, [pc, #8] ; 2550c <== NOT EXECUTED 25500: e59f3008 ldr r3, [pc, #8] ; 25510 <== NOT EXECUTED 25504: eb000d06 bl 28924 <__assert_func> <== NOT EXECUTED =============================================================================== 000256f4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 256f4: 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 ) 256f8: e2534000 subs r4, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 256fc: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 25700: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 25704: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 25708: e1a08002 mov r8, r2 <== NOT EXECUTED 2570c: 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 ) 25710: 01a00004 moveq r0, r4 <== NOT EXECUTED 25714: 0a00005a beq 25884 <== NOT EXECUTED return cmpltd; if ( start > fat_fd->fat_file_size ) 25718: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 2571c: 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; 25720: 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; 25724: 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; 25728: e58d3014 str r3, [sp, #20] <== NOT EXECUTED uint32_t c = 0; if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 2572c: 3a000076 bcc 2590c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 25730: e5913014 ldr r3, [r1, #20] <== NOT EXECUTED 25734: e1540003 cmp r4, r3 <== NOT EXECUTED 25738: 8a000073 bhi 2590c <== NOT EXECUTED 2573c: e0643003 rsb r3, r4, r3 <== NOT EXECUTED 25740: e1520003 cmp r2, r3 <== NOT EXECUTED 25744: 8a000070 bhi 2590c <== 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); 25748: e084a002 add sl, r4, r2 <== NOT EXECUTED 2574c: e1a0200a mov r2, sl <== NOT EXECUTED 25750: e28d3010 add r3, sp, #16 <== NOT EXECUTED 25754: ebffff6e bl 25514 <== NOT EXECUTED if (rc != RC_OK) 25758: e3500000 cmp r0, #0 <== NOT EXECUTED 2575c: 1a000048 bne 25884 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 25760: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 25764: e15a0003 cmp sl, r3 <== NOT EXECUTED count = c - start; 25768: 10684003 rsbne r4, r8, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2576c: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED 25770: e3530001 cmp r3, #1 <== NOT EXECUTED 25774: 0a000044 beq 2588c <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 25778: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 2577c: 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); 25780: e28db014 add fp, sp, #20 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 25784: 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); 25788: e1a02003 mov r2, r3 <== NOT EXECUTED 2578c: e1a00005 mov r0, r5 <== NOT EXECUTED 25790: e1a01007 mov r1, r7 <== NOT EXECUTED 25794: 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); 25798: e1d6a0b6 ldrh sl, [r6, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2579c: ebfffe55 bl 250f8 <== NOT EXECUTED if (rc != RC_OK) 257a0: e3500000 cmp r0, #0 <== NOT EXECUTED 257a4: 1a000036 bne 25884 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 257a8: 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) 257ac: 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); 257b0: e008a00a and sl, r8, sl <== NOT EXECUTED 257b4: 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) 257b8: 01a09000 moveq r9, r0 <== NOT EXECUTED 257bc: 01a08000 moveq r8, r0 <== NOT EXECUTED 257c0: 0a000058 beq 25928 <== 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) 257c4: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED 257c8: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED 257cc: e1a08000 mov r8, r0 <== NOT EXECUTED 257d0: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 257d4: e58d700c str r7, [sp, #12] <== NOT EXECUTED 257d8: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED 257dc: ea000004 b 257f4 <== NOT EXECUTED return rc; while (count > 0) 257e0: 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; 257e4: 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) 257e8: 0a00004c beq 25920 <== NOT EXECUTED 257ec: e5d69002 ldrb r9, [r6, #2] <== NOT EXECUTED 257f0: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 257f4: e1d6c0b6 ldrh ip, [r6, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 257f8: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 257fc: e061c00c rsb ip, r1, ip <== NOT EXECUTED 25800: e15c0004 cmp ip, r4 <== NOT EXECUTED 25804: 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)) ) 25808: 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; 2580c: 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) + 25810: 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)) ) 25814: 1a000003 bne 25828 <== NOT EXECUTED 25818: e5d3e00a ldrb lr, [r3, #10] <== NOT EXECUTED 2581c: e31e0003 tst lr, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 25820: 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)) ) 25824: 1a000002 bne 25834 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 25828: e593e030 ldr lr, [r3, #48] ; 0x30 <== NOT EXECUTED 2582c: e5d37005 ldrb r7, [r3, #5] <== NOT EXECUTED 25830: 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); 25834: e2422001 sub r2, r2, #1 <== NOT EXECUTED 25838: e0022001 and r2, r2, r1 <== NOT EXECUTED 2583c: e08ae008 add lr, sl, r8 <== NOT EXECUTED 25840: e1a0300c mov r3, ip <== NOT EXECUTED 25844: e1a00005 mov r0, r5 <== NOT EXECUTED 25848: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 2584c: e58de000 str lr, [sp] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 25850: 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); 25854: eb0002ae bl 26314 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 25858: 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); 2585c: e1a0200b mov r2, fp <== NOT EXECUTED 25860: 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 ) 25864: ba000026 blt 25904 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 25868: e59d9014 ldr r9, [sp, #20] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2586c: e1a01009 mov r1, r9 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 25870: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 25874: eb00656b bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 25878: e2501000 subs r1, r0, #0 <== NOT EXECUTED 2587c: 0affffd7 beq 257e0 <== NOT EXECUTED 25880: 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; } 25884: e28dd018 add sp, sp, #24 <== NOT EXECUTED 25888: 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)) && 2588c: e5973024 ldr r3, [r7, #36] ; 0x24 <== NOT EXECUTED 25890: e3530000 cmp r3, #0 <== NOT EXECUTED 25894: 1affffb7 bne 25778 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 25898: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 2589c: e3130003 tst r3, #3 <== NOT EXECUTED 258a0: 0affffb4 beq 25778 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 258a4: 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)) ) 258a8: 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; 258ac: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 258b0: 1a000003 bne 258c4 <== NOT EXECUTED 258b4: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED 258b8: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 258bc: 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)) ) 258c0: 1a000003 bne 258d4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 258c4: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED 258c8: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 258cc: e2422002 sub r2, r2, #2 <== NOT EXECUTED 258d0: 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); 258d4: e1d620b0 ldrh r2, [r6] <== NOT EXECUTED 258d8: e5d61002 ldrb r1, [r6, #2] <== NOT EXECUTED 258dc: e59dc03c ldr ip, [sp, #60] ; 0x3c <== NOT EXECUTED 258e0: e2422001 sub r2, r2, #1 <== NOT EXECUTED 258e4: e0831138 add r1, r3, r8, lsr r1 <== NOT EXECUTED 258e8: e0082002 and r2, r8, r2 <== NOT EXECUTED 258ec: e1a00005 mov r0, r5 <== NOT EXECUTED 258f0: e1a03004 mov r3, r4 <== NOT EXECUTED 258f4: e58dc000 str ip, [sp] <== NOT EXECUTED 258f8: eb000285 bl 26314 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 258fc: e3500000 cmp r0, #0 <== NOT EXECUTED 25900: aaffffdf bge 25884 <== 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; 25904: e3e00000 mvn r0, #0 <== NOT EXECUTED 25908: eaffffdd b 25884 <== 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 ); 2590c: eb0075b7 bl 42ff0 <__errno> <== NOT EXECUTED 25910: e3a03005 mov r3, #5 <== NOT EXECUTED 25914: e5803000 str r3, [r0] <== NOT EXECUTED 25918: e3e00000 mvn r0, #0 <== NOT EXECUTED 2591c: eaffffd8 b 25884 <== NOT EXECUTED 25920: 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) 25924: e1a00008 mov r0, r8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 25928: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2592c: e2412001 sub r2, r1, #1 <== NOT EXECUTED 25930: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 25934: e0828008 add r8, r2, r8 <== NOT EXECUTED 25938: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 2593c: 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; 25940: 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 + 25944: 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; 25948: eaffffcd b 25884 <== NOT EXECUTED =============================================================================== 0003efac : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3efac: 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; 3efb0: 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) 3efb4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 3efb8: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED 3efbc: 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; 3efc0: e3a07000 mov r7, #0 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3efc4: 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) 3efc8: e1520003 cmp r2, r3 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3efcc: e1a06000 mov r6, r0 <== NOT EXECUTED 3efd0: 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; 3efd4: e58d7000 str r7, [sp] <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 3efd8: 91a08007 movls r8, r7 <== NOT EXECUTED 3efdc: 9a00001d bls 3f058 <== NOT EXECUTED 3efe0: e1a04001 mov r4, r1 <== NOT EXECUTED 3efe4: e1a08007 mov r8, r7 <== NOT EXECUTED 3efe8: e1a0a00d mov sl, sp <== NOT EXECUTED 3efec: ea000009 b 3f018 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 3eff0: ebfffeeb bl 3eba4 <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 3eff4: 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) 3eff8: e285200c add r2, r5, #12 <== NOT EXECUTED 3effc: 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 ) 3f000: 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) 3f004: 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 ) 3f008: 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) 3f00c: 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++; 3f010: 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) 3f014: 2a00000f bcs 3f058 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 3f018: e1a01004 mov r1, r4 <== NOT EXECUTED 3f01c: e1a0200d mov r2, sp <== NOT EXECUTED 3f020: e1a00006 mov r0, r6 <== NOT EXECUTED 3f024: ebffff7f bl 3ee28 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 3f028: 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 ) 3f02c: 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); 3f030: e1a02004 mov r2, r4 <== NOT EXECUTED 3f034: 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 ) 3f038: 0affffec beq 3eff0 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 3f03c: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED 3f040: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 3f044: 10873003 addne r3, r7, r3 <== NOT EXECUTED 3f048: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 3f04c: e1a00005 mov r0, r5 <== NOT EXECUTED 3f050: ebff9bce bl 25f90 <== NOT EXECUTED return rc; 3f054: ea000007 b 3f078 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 3f058: e5953040 ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED 3f05c: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 3f060: 10873003 addne r3, r7, r3 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 3f064: 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; 3f068: 15853040 strne r3, [r5, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 3f06c: e1a00005 mov r0, r5 <== NOT EXECUTED 3f070: ebff9bc6 bl 25f90 <== NOT EXECUTED 3f074: e1a04008 mov r4, r8 <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 3f078: e1a00004 mov r0, r4 <== NOT EXECUTED 3f07c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3f080: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00025e64 : 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; 25e64: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 25e68: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED 25e6c: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED 25e70: e0622001 rsb r2, r2, r1 <== NOT EXECUTED 25e74: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED 25e78: e2021007 and r1, r2, #7 <== NOT EXECUTED 25e7c: e3a0c001 mov ip, #1 <== NOT EXECUTED 25e80: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED 25e84: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED } 25e88: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003ee28 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 3ee28: 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; 3ee2c: 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 ) { 3ee30: 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)) ) 3ee34: 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 ) { 3ee38: 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; 3ee3c: 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 ) { 3ee40: e1a0a002 mov sl, r2 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 3ee44: 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)) ) 3ee48: 9a000021 bls 3eed4 <== NOT EXECUTED 3ee4c: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 3ee50: e2833001 add r3, r3, #1 <== NOT EXECUTED 3ee54: e1510003 cmp r1, r3 <== NOT EXECUTED 3ee58: 8a00001d bhi 3eed4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3ee5c: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 3ee60: e3130001 tst r3, #1 <== NOT EXECUTED 3ee64: 1a000020 bne 3eeec <== NOT EXECUTED 3ee68: e3130002 tst r3, #2 <== NOT EXECUTED 3ee6c: 15d48002 ldrbne r8, [r4, #2] <== NOT EXECUTED 3ee70: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3ee74: 05d48002 ldrbeq r8, [r4, #2] <== NOT EXECUTED 3ee78: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3ee7c: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED 3ee80: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED 3ee84: 10838836 addne r8, r3, r6, lsr r8 <== NOT EXECUTED 3ee88: 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); 3ee8c: e1a00004 mov r0, r4 <== NOT EXECUTED 3ee90: e1a01008 mov r1, r8 <== NOT EXECUTED 3ee94: e3a02001 mov r2, #1 <== NOT EXECUTED 3ee98: 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); 3ee9c: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3eea0: ebff9c95 bl 260fc <== NOT EXECUTED if (rc != RC_OK) 3eea4: 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); 3eea8: e1a0700d mov r7, sp <== NOT EXECUTED if (rc != RC_OK) 3eeac: 1a00000c bne 3eee4 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 3eeb0: 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); 3eeb4: 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 ) 3eeb8: 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); 3eebc: 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 ) 3eec0: 0a00000e beq 3ef00 <== NOT EXECUTED 3eec4: e3520004 cmp r2, #4 <== NOT EXECUTED 3eec8: 0a000025 beq 3ef64 <== NOT EXECUTED 3eecc: e3520001 cmp r2, #1 <== NOT EXECUTED 3eed0: 0a00000f beq 3ef14 <== 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); 3eed4: eb001045 bl 42ff0 <__errno> <== NOT EXECUTED 3eed8: e3a03005 mov r3, #5 <== NOT EXECUTED 3eedc: e5803000 str r3, [r0] <== NOT EXECUTED 3eee0: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 3eee4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3eee8: 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) + 3eeec: e5d48002 ldrb r8, [r4, #2] <== NOT EXECUTED 3eef0: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3eef4: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED 3eef8: e0838836 add r8, r3, r6, lsr r8 <== NOT EXECUTED 3eefc: eaffffe2 b 3ee8c <== 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); 3ef00: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ef04: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ef08: e19330b6 ldrh r3, [r3, r6] <== NOT EXECUTED 3ef0c: e58a3000 str r3, [sl] <== NOT EXECUTED break; 3ef10: eafffff3 b 3eee4 <== 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))); 3ef14: e59d3000 ldr r3, [sp] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3ef18: 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))); 3ef1c: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3ef20: 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))); 3ef24: e7d13006 ldrb r3, [r1, r6] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3ef28: 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))); 3ef2c: e58a3000 str r3, [sl] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 3ef30: 0a000010 beq 3ef78 <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 3ef34: e0816006 add r6, r1, r6 <== NOT EXECUTED 3ef38: e5d62001 ldrb r2, [r6, #1] <== NOT EXECUTED 3ef3c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 3ef40: e58a3000 str r3, [sl] <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 3ef44: e2150001 ands r0, r5, #1 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3ef48: 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; 3ef4c: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3ef50: 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; 3ef54: 158a3000 strne r3, [sl] <== NOT EXECUTED 3ef58: 13a00000 movne r0, #0 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3ef5c: 058a3000 streq r3, [sl] <== NOT EXECUTED 3ef60: eaffffdf b 3eee4 <== 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); 3ef64: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ef68: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ef6c: e7933006 ldr r3, [r3, r6] <== NOT EXECUTED 3ef70: e58a3000 str r3, [sl] <== NOT EXECUTED break; 3ef74: eaffffda b 3eee4 <== 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, 3ef78: e1a00004 mov r0, r4 <== NOT EXECUTED 3ef7c: e2881001 add r1, r8, #1 <== NOT EXECUTED 3ef80: e1a0300d mov r3, sp <== NOT EXECUTED 3ef84: ebff9c5c bl 260fc <== NOT EXECUTED &block0); if (rc != RC_OK) 3ef88: e3500000 cmp r0, #0 <== NOT EXECUTED 3ef8c: 1affffd4 bne 3eee4 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 3ef90: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ef94: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ef98: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3ef9c: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3efa0: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 3efa4: e58a3000 str r3, [sl] <== NOT EXECUTED 3efa8: eaffffe5 b 3ef44 <== NOT EXECUTED =============================================================================== 00025ea4 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 25ea4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 25ea8: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 25eac: 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); 25eb0: 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++) 25eb4: e3510000 cmp r1, #0 <== NOT EXECUTED 25eb8: e1a02001 mov r2, r1 <== NOT EXECUTED 25ebc: 0a000019 beq 25f28 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 25ec0: e284006c add r0, r4, #108 ; 0x6c <== NOT EXECUTED 25ec4: e8900009 ldm r0, {r0, r3} <== NOT EXECUTED 25ec8: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED 25ecc: e203c007 and ip, r3, #7 <== NOT EXECUTED 25ed0: e1a02c56 asr r2, r6, ip <== NOT EXECUTED 25ed4: e3120001 tst r2, #1 <== NOT EXECUTED 25ed8: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED 25edc: 0a00001b beq 25f50 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); 25ee0: e3a02000 mov r2, #0 <== NOT EXECUTED 25ee4: ea000006 b 25f04 <== 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)) 25ee8: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED 25eec: e7d061a3 ldrb r6, [r0, r3, lsr #3] <== NOT EXECUTED 25ef0: e203c007 and ip, r3, #7 <== NOT EXECUTED 25ef4: e1a07c56 asr r7, r6, ip <== NOT EXECUTED 25ef8: e3170001 tst r7, #1 <== NOT EXECUTED 25efc: e08071a3 add r7, r0, r3, lsr #3 <== NOT EXECUTED 25f00: 0a000012 beq 25f50 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 25f04: e2833001 add r3, r3, #1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 25f08: 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++) 25f0c: 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; 25f10: 81a0c003 movhi ip, r3 <== NOT EXECUTED 25f14: 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++) 25f18: 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; 25f1c: 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++) 25f20: 3afffff0 bcc 25ee8 <== NOT EXECUTED 25f24: 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)) 25f28: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 25f2c: e26336ff rsb r3, r3, #267386880 ; 0xff00000 <== NOT EXECUTED 25f30: e2833aff add r3, r3, #1044480 ; 0xff000 <== NOT EXECUTED 25f34: e2833eff add r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 25f38: e1a01082 lsl r1, r2, #1 <== NOT EXECUTED 25f3c: e283300f add r3, r3, #15 <== NOT EXECUTED 25f40: e1510003 cmp r1, r3 <== NOT EXECUTED 25f44: 3a000008 bcc 25f6c <== 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)) 25f48: e3a00000 mov r0, #0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 25f4c: 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); 25f50: e3a03001 mov r3, #1 <== NOT EXECUTED 25f54: e186cc13 orr ip, r6, r3, lsl ip <== NOT EXECUTED 25f58: e5c7c000 strb ip, [r7] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 25f5c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 25f60: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED 25f64: e0800003 add r0, r0, r3 <== NOT EXECUTED 25f68: 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; 25f6c: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 25f70: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 25f74: ebff8cd1 bl 92c0 <== NOT EXECUTED if (fs_info->uino != NULL) 25f78: 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); 25f7c: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if (fs_info->uino != NULL) 25f80: 0afffff0 beq 25f48 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 25f84: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED 25f88: e5841070 str r1, [r4, #112] ; 0x70 <== NOT EXECUTED 25f8c: eaffffc8 b 25eb4 <== NOT EXECUTED =============================================================================== 00026598 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 26598: 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; 2659c: 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 ) { 265a0: 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; 265a4: e58d1000 str r1, [sp] <== NOT EXECUTED int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 265a8: 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)); 265ac: e3a01001 mov r1, #1 <== NOT EXECUTED 265b0: e1d400b6 ldrh r0, [r4, #6] <== NOT EXECUTED 265b4: ebff8469 bl 7760 <== NOT EXECUTED if ( buf == NULL ) 265b8: e2506000 subs r6, r0, #0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 265bc: 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 ) 265c0: 0a00001b beq 26634 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 265c4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 265c8: e594e00c ldr lr, [r4, #12] <== NOT EXECUTED 265cc: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 265d0: 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) 265d4: e003300e and r3, r3, lr <== NOT EXECUTED 265d8: e153000c cmp r3, ip <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 265dc: e1a02006 mov r2, r6 <== NOT EXECUTED 265e0: 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) 265e4: 2a00000e bcs 26624 <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 265e8: ebffffd4 bl 26540 <== NOT EXECUTED 265ec: e1a08000 mov r8, r0 <== NOT EXECUTED if ( ret == -1 ) 265f0: e3780001 cmn r8, #1 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 265f4: e1a0200d mov r2, sp <== NOT EXECUTED 265f8: 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 ) 265fc: 0a000003 beq 26610 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 26600: e59d1000 ldr r1, [sp] <== NOT EXECUTED 26604: eb006207 bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 26608: e2508000 subs r8, r0, #0 <== NOT EXECUTED 2660c: 0affffec beq 265c4 <== NOT EXECUTED { free(buf); 26610: e1a00006 mov r0, r6 <== NOT EXECUTED 26614: ebff85d5 bl 7d70 <== NOT EXECUTED } } free(buf); return rc; } 26618: e1a00008 mov r0, r8 <== NOT EXECUTED 2661c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 26620: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED free(buf); return rc; } } free(buf); 26624: e1a00006 mov r0, r6 <== NOT EXECUTED 26628: ebff85d0 bl 7d70 <== NOT EXECUTED 2662c: e3a08000 mov r8, #0 <== NOT EXECUTED return rc; 26630: eafffff8 b 26618 <== 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 ); 26634: eb00726d bl 42ff0 <__errno> <== NOT EXECUTED 26638: e3a03005 mov r3, #5 <== NOT EXECUTED 2663c: e5803000 str r3, [r0] <== NOT EXECUTED 26640: e3e08000 mvn r8, #0 <== NOT EXECUTED 26644: eafffff3 b 26618 <== NOT EXECUTED =============================================================================== 000266e4 : * 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) { 266e4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 266e8: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED 266ec: 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; 266f0: e3a06000 mov r6, #0 <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 266f4: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED 266f8: 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; 266fc: 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; 26700: 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); 26704: ebff8bcb bl 9638 <== NOT EXECUTED if (rc == -1) 26708: 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); 2670c: e1a07000 mov r7, r0 <== NOT EXECUTED if (rc == -1) 26710: 0a0000e9 beq 26abc <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 26714: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED 26718: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 2671c: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED 26720: 1a000151 bne 26c6c <== 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); 26724: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 26728: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2672c: ebff802a bl 67dc <== NOT EXECUTED if (vol->dd == NULL) 26730: 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); 26734: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if (vol->dd == NULL) 26738: 0a000168 beq 26ce0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 2673c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 26740: 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); 26744: 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; 26748: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 2674c: 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); 26750: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED 26754: ebff7be7 bl 56f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26758: e3500000 cmp r0, #0 <== NOT EXECUTED 2675c: 1a00015d bne 26cd8 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 26760: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED 26764: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED 26768: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 2676c: e28d0004 add r0, sp, #4 <== NOT EXECUTED 26770: eb007ece bl 462b0 <== NOT EXECUTED sc = rtems_bdbuf_release( block); 26774: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED 26778: ebff774d bl 44b4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2677c: e3500000 cmp r0, #0 <== NOT EXECUTED 26780: 1a00015b bne 26cf4 <== 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); 26784: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED 26788: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED 2678c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26790: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26794: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED if ( (vol->bps != 512) && 26798: e3520b01 cmp r2, #1024 ; 0x400 <== NOT EXECUTED 2679c: 13520c02 cmpne r2, #512 ; 0x200 <== NOT EXECUTED 267a0: 03a01000 moveq r1, #0 <== NOT EXECUTED 267a4: 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); 267a8: e1c420b0 strh r2, [r4] <== NOT EXECUTED if ( (vol->bps != 512) && 267ac: 0a0000c5 beq 26ac8 <== NOT EXECUTED 267b0: e3520b02 cmp r2, #2048 ; 0x800 <== NOT EXECUTED 267b4: 0a000001 beq 267c0 <== NOT EXECUTED 267b8: e3520a01 cmp r2, #4096 ; 0x1000 <== NOT EXECUTED 267bc: 1a000131 bne 26c88 <== 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; 267c0: e3a03000 mov r3, #0 <== NOT EXECUTED 267c4: e5c43003 strb r3, [r4, #3] <== NOT EXECUTED 267c8: e1a034a2 lsr r3, r2, #9 <== NOT EXECUTED 267cc: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED i >>= 1, vol->sec_mul++); 267d0: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 267d4: 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; 267d8: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 267dc: 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; 267e0: 0afffffa beq 267d0 <== NOT EXECUTED 267e4: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 267e8: e1d410b0 ldrh r1, [r4] <== NOT EXECUTED 267ec: e3a03000 mov r3, #0 <== NOT EXECUTED 267f0: e3110001 tst r1, #1 <== NOT EXECUTED 267f4: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED 267f8: e1a03001 mov r3, r1 <== NOT EXECUTED 267fc: 1a000008 bne 26824 <== NOT EXECUTED 26800: e3a02001 mov r2, #1 <== NOT EXECUTED 26804: ea000000 b 2680c <== NOT EXECUTED 26808: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 2680c: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 26810: 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; 26814: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->sec_log2++); 26818: 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; 2681c: 0afffff9 beq 26808 <== NOT EXECUTED 26820: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 26824: e5dd3011 ldrb r3, [sp, #17] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 26828: 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); 2682c: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 26830: 0a000114 beq 26c88 <== 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; 26834: e3a02000 mov r2, #0 <== NOT EXECUTED 26838: e3130001 tst r3, #1 <== NOT EXECUTED 2683c: e5c42005 strb r2, [r4, #5] <== NOT EXECUTED 26840: 1a000008 bne 26868 <== NOT EXECUTED 26844: e3a02001 mov r2, #1 <== NOT EXECUTED 26848: ea000000 b 26850 <== NOT EXECUTED 2684c: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 26850: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 26854: 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; 26858: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 2685c: 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; 26860: 0afffff9 beq 2684c <== NOT EXECUTED 26864: 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) 26868: e1a03211 lsl r3, r1, r2 <== NOT EXECUTED 2686c: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26870: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 26874: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED 26878: e1c430b6 strh r3, [r4, #6] <== NOT EXECUTED 2687c: 8a000101 bhi 26c88 <== 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; 26880: e3a02000 mov r2, #0 <== NOT EXECUTED 26884: e3130001 tst r3, #1 <== NOT EXECUTED 26888: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED 2688c: 1a000008 bne 268b4 <== NOT EXECUTED 26890: e3a02001 mov r2, #1 <== NOT EXECUTED 26894: ea000000 b 2689c <== NOT EXECUTED 26898: e1a02000 mov r2, r0 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 2689c: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED 268a0: 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; 268a4: e3130001 tst r3, #1 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 268a8: 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; 268ac: 0afffff9 beq 26898 <== NOT EXECUTED 268b0: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 268b4: e5dd6014 ldrb r6, [sp, #20] <== NOT EXECUTED 268b8: e5c46009 strb r6, [r4, #9] <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 268bc: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED 268c0: e5dd7013 ldrb r7, [sp, #19] <== NOT EXECUTED 268c4: e1837407 orr r7, r3, r7, lsl #8 <== NOT EXECUTED 268c8: e1c471b4 strh r7, [r4, #20] <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 268cc: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED 268d0: 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)) / 268d4: 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); 268d8: 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)) / 268dc: 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); 268e0: 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)) / 268e4: eb00d1c3 bl 5aff8 <__aeabi_idiv> <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 268e8: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED 268ec: 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)) / 268f0: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 268f4: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 268f8: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED 268fc: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED 26900: 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); 26904: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED 26908: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED 2690c: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED 26910: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 26914: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 26918: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED 2691c: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 26920: 01832c02 orreq r2, r3, r2, lsl #24 <== NOT EXECUTED 26924: 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; 26928: e5d4c009 ldrb ip, [r4, #9] <== NOT EXECUTED 2692c: e594e018 ldr lr, [r4, #24] <== NOT EXECUTED 26930: 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 + 26934: e0807007 add r7, r0, r7 <== NOT EXECUTED 26938: 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; 2693c: 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 + 26940: 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; 26944: e584201c str r2, [r4, #28] <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 26948: e5dd1018 ldrb r1, [sp, #24] <== NOT EXECUTED 2694c: e5dd2017 ldrb r2, [sp, #23] <== NOT EXECUTED 26950: 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); 26954: 05dd2026 ldrbeq r2, [sp, #38] ; 0x26 <== NOT EXECUTED 26958: 05dd1025 ldrbeq r1, [sp, #37] ; 0x25 <== NOT EXECUTED 2695c: 01a02802 lsleq r2, r2, #16 <== NOT EXECUTED 26960: 05dd0024 ldrbeq r0, [sp, #36] ; 0x24 <== NOT EXECUTED 26964: 01822401 orreq r2, r2, r1, lsl #8 <== NOT EXECUTED 26968: 05dd1027 ldrbeq r1, [sp, #39] ; 0x27 <== NOT EXECUTED 2696c: 01822000 orreq r2, r2, r0 <== NOT EXECUTED 26970: 01822c01 orreq r2, r2, r1, lsl #24 <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 26974: 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); 26978: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 2697c: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED 26980: eb00d158 bl 5aee8 <__aeabi_uidiv> <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 26984: e3a03eff mov r3, #4080 ; 0xff0 <== NOT EXECUTED 26988: e2833004 add r3, r3, #4 <== NOT EXECUTED 2698c: 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; 26990: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 26994: 8a000050 bhi 26adc <== NOT EXECUTED { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 26998: e3a02eff mov r2, #4080 ; 0xff0 <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 2699c: e1a03002 mov r3, r2 <== NOT EXECUTED 269a0: 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; 269a4: 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; 269a8: e3a01001 mov r1, #1 <== NOT EXECUTED 269ac: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 269b0: e584200c str r2, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 269b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 269b8: e3a03000 mov r3, #0 <== NOT EXECUTED vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 269bc: e3e02000 mvn r2, #0 <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 269c0: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 269c4: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 269c8: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = 0; 269cc: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 269d0: 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); 269d4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 269d8: ebfffd6c bl 25f90 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 269dc: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED 269e0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 269e4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 269e8: 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)); 269ec: 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; 269f0: 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)); 269f4: e3a0100c mov r1, #12 <== NOT EXECUTED 269f8: ebff8358 bl 7760 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 269fc: 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)); 26a00: e1a03000 mov r3, r0 <== NOT EXECUTED 26a04: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 26a08: 0a0000d0 beq 26d50 <== 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); 26a0c: 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); 26a10: e280c004 add ip, r0, #4 <== NOT EXECUTED the_chain->permanent_null = NULL; 26a14: e3a05000 mov r5, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26a18: e280e010 add lr, r0, #16 <== NOT EXECUTED the_chain->permanent_null = NULL; 26a1c: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 26a20: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 26a24: e3a00002 mov r0, #2 <== NOT EXECUTED 26a28: e3a0100c mov r1, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 26a2c: e583e00c str lr, [r3, #12] <== NOT EXECUTED 26a30: e583c000 str ip, [r3] <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 26a34: 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; 26a38: e5825004 str r5, [r2, #4] <== NOT EXECUTED 26a3c: ebff8347 bl 7760 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 26a40: 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)); 26a44: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 26a48: 0a0000bc beq 26d40 <== 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); 26a4c: 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); 26a50: e2802004 add r2, r0, #4 <== NOT EXECUTED 26a54: e2801010 add r1, r0, #16 <== NOT EXECUTED 26a58: e580100c str r1, [r0, #12] <== NOT EXECUTED 26a5c: e8800024 stm r0, {r2, r5} <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 26a60: 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; 26a64: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 26a68: 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; 26a6c: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED 26a70: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 26a74: 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; 26a78: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 26a7c: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED 26a80: 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; 26a84: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; 26a88: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 26a8c: e3a01001 mov r1, #1 <== NOT EXECUTED 26a90: ebff8332 bl 7760 <== NOT EXECUTED if ( fs_info->uino == NULL ) 26a94: 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)); 26a98: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if ( fs_info->uino == NULL ) 26a9c: 0a00009b beq 26d10 <== 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)); 26aa0: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED 26aa4: e3a01001 mov r1, #1 <== NOT EXECUTED 26aa8: ebff832c bl 7760 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 26aac: 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)); 26ab0: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 26ab4: 11a07005 movne r7, r5 <== NOT EXECUTED 26ab8: 0a000079 beq 26ca4 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 26abc: e1a00007 mov r0, r7 <== NOT EXECUTED 26ac0: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED 26ac4: 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; 26ac8: e1a03ca3 lsr r3, r3, #25 <== NOT EXECUTED 26acc: e3130001 tst r3, #1 <== NOT EXECUTED 26ad0: e5c41003 strb r1, [r4, #3] <== NOT EXECUTED 26ad4: 0affff3c beq 267cc <== NOT EXECUTED 26ad8: eaffff42 b 267e8 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 26adc: e3a03cff mov r3, #65280 ; 0xff00 <== NOT EXECUTED 26ae0: e28330f4 add r3, r3, #244 ; 0xf4 <== NOT EXECUTED 26ae4: e1500003 cmp r0, r3 <== NOT EXECUTED 26ae8: 9a000054 bls 26c40 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 26aec: e3a03004 mov r3, #4 <== NOT EXECUTED 26af0: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 26af4: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 26af8: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 26afc: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED 26b00: e5843010 str r3, [r4, #16] <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 26b04: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED 26b08: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED 26b0c: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED 26b10: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26b14: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26b18: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED 26b1c: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26b20: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 26b24: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 26b28: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 26b2c: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED if (vol->mirror) 26b30: 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; 26b34: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED if (vol->mirror) 26b38: 0a000049 beq 26c64 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 26b3c: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 26b40: e203300f and r3, r3, #15 <== NOT EXECUTED 26b44: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 26b48: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED 26b4c: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED 26b50: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED if( vol->info_sec == 0 ) 26b54: 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); 26b58: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED if( vol->info_sec == 0 ) 26b5c: 0a000049 beq 26c88 <== 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, 26b60: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED 26b64: e1a00005 mov r0, r5 <== NOT EXECUTED 26b68: e3a02000 mov r2, #0 <== NOT EXECUTED 26b6c: e3a03004 mov r3, #4 <== NOT EXECUTED 26b70: e58d6000 str r6, [sp] <== NOT EXECUTED 26b74: ebfffeb3 bl 26648 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 26b78: e3500000 cmp r0, #0 <== NOT EXECUTED 26b7c: ba00006b blt 26d30 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 26b80: e5dd30aa ldrb r3, [sp, #170] ; 0xaa <== NOT EXECUTED 26b84: e5dd20a9 ldrb r2, [sp, #169] ; 0xa9 <== NOT EXECUTED 26b88: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26b8c: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED 26b90: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26b94: e5dd20ab ldrb r2, [sp, #171] ; 0xab <== NOT EXECUTED 26b98: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26b9c: e1832c02 orr r2, r3, r2, lsl #24 <== NOT EXECUTED 26ba0: e59f31c4 ldr r3, [pc, #452] ; 26d6c <== NOT EXECUTED 26ba4: e1520003 cmp r2, r3 <== NOT EXECUTED 26ba8: 1a000034 bne 26c80 <== 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, 26bac: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED 26bb0: e1a00005 mov r0, r5 <== NOT EXECUTED 26bb4: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED 26bb8: e3a0300c mov r3, #12 <== NOT EXECUTED 26bbc: e58d6000 str r6, [sp] <== NOT EXECUTED 26bc0: ebfffea0 bl 26648 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 26bc4: e3500000 cmp r0, #0 <== NOT EXECUTED 26bc8: ba000056 blt 26d28 <== 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); 26bcc: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED 26bd0: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED 26bd4: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED 26bd8: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26bdc: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26be0: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED 26be4: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26be8: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 26bec: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 26bf0: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED 26bf4: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED 26bf8: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED 26bfc: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 26c00: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 26c04: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED 26c08: e1833001 orr r3, r3, r1 <== NOT EXECUTED 26c0c: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 26c10: 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); 26c14: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 26c18: e1a00005 mov r0, r5 <== NOT EXECUTED 26c1c: e1a02001 mov r2, r1 <== NOT EXECUTED 26c20: ebfffdf2 bl 263f0 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 26c24: e2507000 subs r7, r0, #0 <== NOT EXECUTED 26c28: 0affff69 beq 269d4 <== 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); 26c2c: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26c30: ebfffcd6 bl 25f90 <== 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); 26c34: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26c38: ebff7f7b bl 6a2c <== NOT EXECUTED return rc; 26c3c: eaffff9e b 26abc <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 26c40: e3a02801 mov r2, #65536 ; 0x10000 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26c44: 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; 26c48: e2422001 sub r2, r2, #1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26c4c: e28330f8 add r3, r3, #248 ; 0xf8 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 26c50: e3a01002 mov r1, #2 <== NOT EXECUTED 26c54: e5c4100a strb r1, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 26c58: e584200c str r2, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 26c5c: e5843010 str r3, [r4, #16] <== NOT EXECUTED 26c60: eaffff54 b 269b8 <== 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; 26c64: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED 26c68: eaffffb6 b 26b48 <== 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); 26c6c: eb0070df bl 42ff0 <__errno> <== NOT EXECUTED 26c70: e3a03019 mov r3, #25 <== NOT EXECUTED 26c74: e5803000 str r3, [r0] <== NOT EXECUTED 26c78: e3e07000 mvn r7, #0 <== NOT EXECUTED 26c7c: eaffff8e b 26abc <== 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); 26c80: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26c84: ebfffcc1 bl 25f90 <== 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); 26c88: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26c8c: ebff7f66 bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 26c90: eb0070d6 bl 42ff0 <__errno> <== NOT EXECUTED 26c94: e3a03016 mov r3, #22 <== NOT EXECUTED 26c98: e5803000 str r3, [r0] <== NOT EXECUTED 26c9c: e3e07000 mvn r7, #0 <== NOT EXECUTED 26ca0: eaffff85 b 26abc <== 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); 26ca4: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26ca8: ebff7f5f bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26cac: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26cb0: ebff842e bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 26cb4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 26cb8: ebff842c bl 7d70 <== NOT EXECUTED free(fs_info->uino); 26cbc: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 26cc0: ebff842a bl 7d70 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 26cc4: eb0070c9 bl 42ff0 <__errno> <== NOT EXECUTED 26cc8: e3a0300c mov r3, #12 <== NOT EXECUTED 26ccc: e5803000 str r3, [r0] <== NOT EXECUTED 26cd0: e3e07000 mvn r7, #0 <== NOT EXECUTED 26cd4: eaffff78 b 26abc <== 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); 26cd8: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26cdc: ebff7f52 bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); 26ce0: eb0070c2 bl 42ff0 <__errno> <== NOT EXECUTED 26ce4: e3a03005 mov r3, #5 <== NOT EXECUTED 26ce8: e5803000 str r3, [r0] <== NOT EXECUTED 26cec: e3e07000 mvn r7, #0 <== NOT EXECUTED 26cf0: eaffff71 b 26abc <== 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); 26cf4: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26cf8: ebff7f4b bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 26cfc: eb0070bb bl 42ff0 <__errno> <== NOT EXECUTED 26d00: e3a03005 mov r3, #5 <== NOT EXECUTED 26d04: e5803000 str r3, [r0] <== NOT EXECUTED 26d08: e3e07000 mvn r7, #0 <== NOT EXECUTED 26d0c: eaffff6a b 26abc <== 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); 26d10: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26d14: ebff7f44 bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26d18: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26d1c: ebff8413 bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 26d20: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 26d24: eaffffe5 b 26cc0 <== 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); 26d28: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 26d2c: ebfffc97 bl 25f90 <== 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); 26d30: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26d34: ebff7f3c bl 6a2c <== NOT EXECUTED 26d38: e3e07000 mvn r7, #0 <== NOT EXECUTED return -1; 26d3c: eaffff5e b 26abc <== 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); 26d40: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26d44: ebff7f38 bl 6a2c <== NOT EXECUTED free(fs_info->vhash); 26d48: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 26d4c: eaffffdb b 26cc0 <== 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); 26d50: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26d54: ebff7f34 bl 6a2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 26d58: eb0070a4 bl 42ff0 <__errno> <== NOT EXECUTED 26d5c: e3a0300c mov r3, #12 <== NOT EXECUTED 26d60: e5803000 str r3, [r0] <== NOT EXECUTED 26d64: e3e07000 mvn r7, #0 <== NOT EXECUTED 26d68: eaffff53 b 26abc <== NOT EXECUTED =============================================================================== 00025e8c : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 25e8c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED 25e90: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 25e94: e1500001 cmp r0, r1 <== NOT EXECUTED 25e98: 83a00000 movhi r0, #0 <== NOT EXECUTED 25e9c: 93a00001 movls r0, #1 <== NOT EXECUTED 25ea0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003f084 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3f084: 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; 3f088: e3a0b000 mov fp, #0 <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3f08c: 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; 3f090: e58db00c str fp, [sp, #12] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3f094: e1a04000 mov r4, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3f098: 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) 3f09c: 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; 3f0a0: 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; 3f0a4: 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; 3f0a8: e583b000 str fp, [r3] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3f0ac: 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) 3f0b0: e58d2000 str r2, [sp] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3f0b4: 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) 3f0b8: 01a0b002 moveq fp, r2 <== NOT EXECUTED 3f0bc: 0a00003f beq 3f1c0 <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 3f0c0: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 3f0c4: 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; 3f0c8: e2877002 add r7, r7, #2 <== NOT EXECUTED *cls_added = 0; if (count == 0) return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 3f0cc: e3750001 cmn r5, #1 <== NOT EXECUTED 3f0d0: 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) 3f0d4: e3570002 cmp r7, #2 <== NOT EXECUTED 3f0d8: 9a00003b bls 3f1cc <== NOT EXECUTED 3f0dc: e3a06002 mov r6, #2 <== NOT EXECUTED 3f0e0: e28d900c add r9, sp, #12 <== NOT EXECUTED 3f0e4: ea000011 b 3f130 <== NOT EXECUTED * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 3f0e8: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3f0ec: e5825000 str r5, [r2] <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3f0f0: e3e02000 mvn r2, #0 <== NOT EXECUTED 3f0f4: ebfffeaa bl 3eba4 <== NOT EXECUTED if ( rc != RC_OK ) 3f0f8: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3f0fc: 1a00002f bne 3f1c0 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3f100: e59a3000 ldr r3, [sl] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3f104: e59d2000 ldr r2, [sp] <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3f108: e2833001 add r3, r3, #1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3f10c: e1520003 cmp r2, r3 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3f110: e58a3000 str r3, [sl] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3f114: 0a000044 beq 3f22c <== 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; 3f118: e1a0b005 mov fp, r5 <== NOT EXECUTED } } i++; cl4find++; 3f11c: e2855001 add r5, r5, #1 <== NOT EXECUTED if (cl4find >= data_cls_val) 3f120: e1570005 cmp r7, r5 <== NOT EXECUTED 3f124: 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) 3f128: e1570006 cmp r7, r6 <== NOT EXECUTED 3f12c: 9a000026 bls 3f1cc <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 3f130: e1a01005 mov r1, r5 <== NOT EXECUTED 3f134: e1a02009 mov r2, r9 <== NOT EXECUTED 3f138: e1a00004 mov r0, r4 <== NOT EXECUTED 3f13c: ebffff39 bl 3ee28 <== NOT EXECUTED if ( rc != RC_OK ) 3f140: e3500000 cmp r0, #0 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 3f144: 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 ) 3f148: 1a00002c bne 3f200 <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 3f14c: e59d800c ldr r8, [sp, #12] <== NOT EXECUTED 3f150: e3580000 cmp r8, #0 <== NOT EXECUTED 3f154: 1afffff0 bne 3f11c <== 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) 3f158: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3f15c: 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); 3f160: e1a01005 mov r1, r5 <== NOT EXECUTED 3f164: 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); 3f168: 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) 3f16c: 0affffdd beq 3f0e8 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3f170: e1a00004 mov r0, r4 <== NOT EXECUTED 3f174: ebfffe8a bl 3eba4 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3f178: 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 ) 3f17c: 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); 3f180: e1a02005 mov r2, r5 <== NOT EXECUTED 3f184: 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 ) 3f188: 1a000034 bne 3f260 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3f18c: ebfffe84 bl 3eba4 <== NOT EXECUTED if ( rc != RC_OK ) 3f190: e250b000 subs fp, r0, #0 <== NOT EXECUTED 3f194: 0affffd9 beq 3f100 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3f198: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 3f19c: e5901000 ldr r1, [r0] <== NOT EXECUTED 3f1a0: e1a00004 mov r0, r4 <== NOT EXECUTED 3f1a4: ebffff80 bl 3efac <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 3f1a8: e1a00004 mov r0, r4 <== NOT EXECUTED 3f1ac: e1a01005 mov r1, r5 <== NOT EXECUTED 3f1b0: e1a02008 mov r2, r8 <== NOT EXECUTED 3f1b4: ebfffe7a bl 3eba4 <== NOT EXECUTED fat_buf_release(fs_info); 3f1b8: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3f1bc: ebff9b73 bl 25f90 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 3f1c0: e1a0000b mov r0, fp <== NOT EXECUTED 3f1c4: e28dd010 add sp, sp, #16 <== NOT EXECUTED 3f1c8: 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) 3f1cc: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3f1d0: e5903040 ldr r3, [r0, #64] ; 0x40 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 3f1d4: e580b044 str fp, [r0, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3f1d8: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3f1dc: 159a2000 ldrne r2, [sl] <== NOT EXECUTED 3f1e0: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 3f1e4: 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); 3f1e8: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3f1ec: e582b000 str fp, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 3f1f0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3f1f4: ebff9b65 bl 25f90 <== NOT EXECUTED 3f1f8: e3a0b000 mov fp, #0 <== NOT EXECUTED return RC_OK; 3f1fc: eaffffef b 3f1c0 <== 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) 3f200: e59a3000 ldr r3, [sl] <== NOT EXECUTED 3f204: e3530000 cmp r3, #0 <== NOT EXECUTED 3f208: e1a08000 mov r8, r0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 3f20c: 01a0b008 moveq fp, r8 <== NOT EXECUTED 3f210: 0affffea beq 3f1c0 <== NOT EXECUTED 3f214: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3f218: e1a00004 mov r0, r4 <== NOT EXECUTED 3f21c: e5931000 ldr r1, [r3] <== NOT EXECUTED 3f220: ebffff61 bl 3efac <== NOT EXECUTED 3f224: e1a0b008 mov fp, r8 <== NOT EXECUTED 3f228: eaffffe4 b 3f1c0 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3f22c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3f230: 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; 3f234: e5805044 str r5, [r0, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3f238: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3f23c: 159a2000 ldrne r2, [sl] <== NOT EXECUTED 3f240: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 3f244: 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); 3f248: 15803040 strne r3, [r0, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3f24c: e5825000 str r5, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 3f250: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3f254: ebff9b4d bl 25f90 <== NOT EXECUTED 3f258: e3a0b000 mov fp, #0 <== NOT EXECUTED return rc; 3f25c: eaffffd7 b 3f1c0 <== 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)); 3f260: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 3f264: e5931000 ldr r1, [r3] <== NOT EXECUTED 3f268: ebffff4f bl 3efac <== NOT EXECUTED return rc; 3f26c: eaffffd3 b 3f1c0 <== NOT EXECUTED =============================================================================== 0003eba4 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 3eba4: 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; 3eba8: 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 ) { 3ebac: 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)) ) 3ebb0: 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 ) { 3ebb4: 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; 3ebb8: 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 ) { 3ebbc: e1a0b002 mov fp, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 3ebc0: 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)) ) 3ebc4: 9a000021 bls 3ec50 <== NOT EXECUTED 3ebc8: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 3ebcc: e2833001 add r3, r3, #1 <== NOT EXECUTED 3ebd0: e1510003 cmp r1, r3 <== NOT EXECUTED 3ebd4: 8a00001d bhi 3ec50 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 3ebd8: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 3ebdc: e3130001 tst r3, #1 <== NOT EXECUTED 3ebe0: 1a000020 bne 3ec68 <== NOT EXECUTED 3ebe4: e3130002 tst r3, #2 <== NOT EXECUTED 3ebe8: 15d4a002 ldrbne sl, [r4, #2] <== NOT EXECUTED 3ebec: 1594304c ldrne r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3ebf0: 05d4a002 ldrbeq sl, [r4, #2] <== NOT EXECUTED 3ebf4: 0594304c ldreq r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3ebf8: 11a06081 lslne r6, r1, #1 <== NOT EXECUTED 3ebfc: 01a06101 lsleq r6, r1, #2 <== NOT EXECUTED 3ec00: 1083aa36 addne sl, r3, r6, lsr sl <== NOT EXECUTED 3ec04: 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); 3ec08: e1a00004 mov r0, r4 <== NOT EXECUTED 3ec0c: e1a0100a mov r1, sl <== NOT EXECUTED 3ec10: e3a02001 mov r2, #1 <== NOT EXECUTED 3ec14: 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); 3ec18: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3ec1c: ebff9d36 bl 260fc <== NOT EXECUTED if (rc != RC_OK) 3ec20: 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); 3ec24: e1a0800d mov r8, sp <== NOT EXECUTED if (rc != RC_OK) 3ec28: 1a00000c bne 3ec60 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 3ec2c: 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); 3ec30: 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 ) 3ec34: 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); 3ec38: 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 ) 3ec3c: 0a00000e beq 3ec7c <== NOT EXECUTED 3ec40: e3570004 cmp r7, #4 <== NOT EXECUTED 3ec44: 0a00002e beq 3ed04 <== NOT EXECUTED 3ec48: e3570001 cmp r7, #1 <== NOT EXECUTED 3ec4c: 0a000010 beq 3ec94 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 3ec50: eb0010e6 bl 42ff0 <__errno> <== NOT EXECUTED 3ec54: e3a03005 mov r3, #5 <== NOT EXECUTED 3ec58: e5803000 str r3, [r0] <== NOT EXECUTED 3ec5c: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 3ec60: e28dd004 add sp, sp, #4 <== NOT EXECUTED 3ec64: 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) + 3ec68: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED 3ec6c: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3ec70: e08160a1 add r6, r1, r1, lsr #1 <== NOT EXECUTED 3ec74: e083aa36 add sl, r3, r6, lsr sl <== NOT EXECUTED 3ec78: eaffffe2 b 3ec08 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 3ec7c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ec80: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ec84: 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; 3ec88: e3a03001 mov r3, #1 <== NOT EXECUTED 3ec8c: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 3ec90: eafffff2 b 3ec60 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 3ec94: e3150001 tst r5, #1 <== NOT EXECUTED 3ec98: 0a000023 beq 3ed2c <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 3ec9c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3eca0: 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)) = 3eca4: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3eca8: e202200f and r2, r2, #15 <== NOT EXECUTED 3ecac: e7c32006 strb r2, [r3, r6] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 3ecb0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ecb4: 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)) = 3ecb8: 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; 3ecbc: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 3ecc0: e182282b orr r2, r2, fp, lsr #16 <== NOT EXECUTED 3ecc4: 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) ) 3ecc8: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 3eccc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3ecd0: e1530006 cmp r3, r6 <== NOT EXECUTED 3ecd4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3ecd8: 0a00002e beq 3ed98 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 3ecdc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ece0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ece4: e2866001 add r6, r6, #1 <== NOT EXECUTED 3ece8: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 3ecec: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ecf0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 3ecf4: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3ecf8: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED 3ecfc: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED 3ed00: eaffffd6 b 3ec60 <== 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)); 3ed04: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ed08: 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)) = 3ed0c: e7932006 ldr r2, [r3, r6] <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 3ed10: 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)) = 3ed14: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 3ed18: e182b00b orr fp, r2, fp <== NOT EXECUTED 3ed1c: e783b006 str fp, [r3, r6] <== NOT EXECUTED 3ed20: e3a03001 mov r3, #1 <== NOT EXECUTED 3ed24: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 3ed28: eaffffcc b 3ec60 <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 3ed2c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ed30: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ed34: e7c30006 strb r0, [r3, r6] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 3ed38: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ed3c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 3ed40: e1a0ba0b lsl fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 3ed44: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 3ed48: e1a0ba2b lsr fp, fp, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 3ed4c: e182200b orr r2, r2, fp <== NOT EXECUTED 3ed50: 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) ) 3ed54: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 3ed58: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3ed5c: e1530006 cmp r3, r6 <== NOT EXECUTED 3ed60: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3ed64: 0a00001c beq 3eddc <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 3ed68: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ed6c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3ed70: e2866001 add r6, r6, #1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 3ed74: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3ed78: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 3ed7c: 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))) | 3ed80: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ed84: 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)) = 3ed88: e7d32006 ldrb r2, [r3, r6] <== NOT EXECUTED 3ed8c: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED 3ed90: e7c3b006 strb fp, [r3, r6] <== NOT EXECUTED 3ed94: eaffffb1 b 3ec60 <== 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, 3ed98: e28a1001 add r1, sl, #1 <== NOT EXECUTED 3ed9c: e1a0300d mov r3, sp <== NOT EXECUTED 3eda0: e1a00004 mov r0, r4 <== NOT EXECUTED 3eda4: e1a02007 mov r2, r7 <== NOT EXECUTED 3eda8: ebff9cd3 bl 260fc <== NOT EXECUTED &block0); if (rc != RC_OK) 3edac: e3500000 cmp r0, #0 <== NOT EXECUTED 3edb0: 1affffaa bne 3ec60 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 3edb4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3edb8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3edbc: e5c30000 strb r0, [r3] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 3edc0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3edc4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 3edc8: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3edcc: e182bc2b orr fp, r2, fp, lsr #24 <== NOT EXECUTED 3edd0: e5c3b000 strb fp, [r3] <== NOT EXECUTED 3edd4: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3edd8: eaffffa0 b 3ec60 <== 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, 3eddc: e28a1001 add r1, sl, #1 <== NOT EXECUTED 3ede0: e1a0300d mov r3, sp <== NOT EXECUTED 3ede4: e1a00004 mov r0, r4 <== NOT EXECUTED 3ede8: e1a02007 mov r2, r7 <== NOT EXECUTED 3edec: ebff9cc2 bl 260fc <== NOT EXECUTED &block0); if (rc != RC_OK) 3edf0: e3500000 cmp r0, #0 <== NOT EXECUTED 3edf4: 1affff99 bne 3ec60 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 3edf8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3edfc: 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)) = 3ee00: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3ee04: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 3ee08: e5c32000 strb r2, [r3] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 3ee0c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3ee10: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 3ee14: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3ee18: e182b42b orr fp, r2, fp, lsr #8 <== NOT EXECUTED 3ee1c: e5c3b000 strb fp, [r3] <== NOT EXECUTED 3ee20: e5c47080 strb r7, [r4, #128] ; 0x80 <== NOT EXECUTED 3ee24: eaffff8d b 3ec60 <== NOT EXECUTED =============================================================================== 00026458 : * 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) { 26458: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2645c: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 26460: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED 26464: e2155004 ands r5, r5, #4 <== NOT EXECUTED 26468: 1a00002e bne 26528 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 2646c: e1a00004 mov r0, r4 <== NOT EXECUTED 26470: ebfffec6 bl 25f90 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 26474: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 26478: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 2647c: ebff7563 bl 3a10 <== NOT EXECUTED 26480: e3500000 cmp r0, #0 <== NOT EXECUTED 26484: 13e05000 mvnne r5, #0 <== NOT EXECUTED 26488: 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; 2648c: e5946064 ldr r6, [r4, #100] ; 0x64 <== NOT EXECUTED 26490: e0866008 add r6, r6, r8 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 26494: ea000000 b 2649c <== NOT EXECUTED free(node); 26498: ebff8634 bl 7d70 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 2649c: e1a00006 mov r0, r6 <== NOT EXECUTED 264a0: ebff9b0b bl d0d4 <_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 ) 264a4: e2507000 subs r7, r0, #0 <== NOT EXECUTED 264a8: 1afffffa bne 26498 <== NOT EXECUTED 264ac: 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++) 264b0: e3580018 cmp r8, #24 <== NOT EXECUTED 264b4: 1afffff4 bne 2648c <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 264b8: e5946068 ldr r6, [r4, #104] ; 0x68 <== NOT EXECUTED 264bc: e0866007 add r6, r6, r7 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 264c0: ea000000 b 264c8 <== NOT EXECUTED free(node); 264c4: ebff8629 bl 7d70 <== NOT EXECUTED 264c8: e1a00006 mov r0, r6 <== NOT EXECUTED 264cc: ebff9b00 bl d0d4 <_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 ) 264d0: e3500000 cmp r0, #0 <== NOT EXECUTED 264d4: 1afffffa bne 264c4 <== NOT EXECUTED 264d8: 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++) 264dc: e3570018 cmp r7, #24 <== NOT EXECUTED 264e0: 1afffff4 bne 264b8 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 264e4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 264e8: ebff8620 bl 7d70 <== NOT EXECUTED free(fs_info->rhash); 264ec: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 264f0: ebff861e bl 7d70 <== NOT EXECUTED free(fs_info->uino); 264f4: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 264f8: ebff861c bl 7d70 <== NOT EXECUTED free(fs_info->sec_buf); 264fc: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 26500: ebff861a bl 7d70 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 26504: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 26508: ebff8147 bl 6a2c <== NOT EXECUTED if (rc) 2650c: e3550000 cmp r5, #0 <== NOT EXECUTED 26510: 0a000002 beq 26520 <== NOT EXECUTED errno = EIO; 26514: eb0072b5 bl 42ff0 <__errno> <== NOT EXECUTED 26518: e3a03005 mov r3, #5 <== NOT EXECUTED 2651c: e5803000 str r3, [r0] <== NOT EXECUTED return rc; } 26520: e1a00005 mov r0, r5 <== NOT EXECUTED 26524: 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, 26528: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED 2652c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 26530: ebffffae bl 263f0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 26534: e2505000 subs r5, r0, #0 <== NOT EXECUTED 26538: 13e05000 mvnne r5, #0 <== NOT EXECUTED 2653c: eaffffca b 2646c <== NOT EXECUTED =============================================================================== 0003f678 : #include int fchdir( int fd ) { 3f678: 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 ); 3f67c: e59f3158 ldr r3, [pc, #344] ; 3f7dc <== NOT EXECUTED 3f680: e5933000 ldr r3, [r3] <== NOT EXECUTED 3f684: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 3f688: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3f68c: 2a000040 bcs 3f794 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3f690: e59f3148 ldr r3, [pc, #328] ; 3f7e0 <== NOT EXECUTED 3f694: e5934000 ldr r4, [r3] <== NOT EXECUTED 3f698: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3f69c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3f6a0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3f6a4: 0a00003a beq 3f794 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 3f6a8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 3f6ac: e3530000 cmp r3, #0 <== NOT EXECUTED 3f6b0: 0a000044 beq 3f7c8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 3f6b4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 3f6b8: e3530000 cmp r3, #0 <== NOT EXECUTED 3f6bc: 0a000041 beq 3f7c8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 3f6c0: e2844018 add r4, r4, #24 <== NOT EXECUTED 3f6c4: e1a00004 mov r0, r4 <== NOT EXECUTED 3f6c8: e1a0e00f mov lr, pc <== NOT EXECUTED 3f6cc: e12fff13 bx r3 <== NOT EXECUTED 3f6d0: e3500001 cmp r0, #1 <== NOT EXECUTED 3f6d4: e1a0e000 mov lr, r0 <== NOT EXECUTED 3f6d8: 1a000028 bne 3f780 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 3f6dc: e59f6100 ldr r6, [pc, #256] ; 3f7e4 <== NOT EXECUTED 3f6e0: e5967000 ldr r7, [r6] <== NOT EXECUTED 3f6e4: e287c004 add ip, r7, #4 <== NOT EXECUTED 3f6e8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3f6ec: e28d5004 add r5, sp, #4 <== NOT EXECUTED 3f6f0: e1a08005 mov r8, r5 <== NOT EXECUTED 3f6f4: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED 3f6f8: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3f6fc: e5883000 str r3, [r8] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 3f700: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3f704: e2877004 add r7, r7, #4 <== NOT EXECUTED 3f708: e8a7000f stmia r7!, {r0, r1, r2, r3} <== NOT EXECUTED 3f70c: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 3f710: e3a07000 mov r7, #0 <== NOT EXECUTED 3f714: e28d4018 add r4, sp, #24 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 3f718: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 3f71c: e1a0100e mov r1, lr <== NOT EXECUTED 3f720: e1a02007 mov r2, r7 <== NOT EXECUTED 3f724: e59f00bc ldr r0, [pc, #188] ; 3f7e8 <== NOT EXECUTED 3f728: e1a03004 mov r3, r4 <== NOT EXECUTED 3f72c: e58d7000 str r7, [sp] <== NOT EXECUTED 3f730: ebff216c bl 7ce8 <== NOT EXECUTED 3f734: e1500007 cmp r0, r7 <== NOT EXECUTED 3f738: 1a00001a bne 3f7a8 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 3f73c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3f740: e3530000 cmp r3, #0 <== NOT EXECUTED 3f744: 0a000004 beq 3f75c <== NOT EXECUTED 3f748: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3f74c: e3530000 cmp r3, #0 <== NOT EXECUTED 3f750: 11a00005 movne r0, r5 <== NOT EXECUTED 3f754: 11a0e00f movne lr, pc <== NOT EXECUTED 3f758: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 3f75c: e596c000 ldr ip, [r6] <== NOT EXECUTED 3f760: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3f764: e28cc004 add ip, ip, #4 <== NOT EXECUTED 3f768: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3f76c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3f770: e58c3000 str r3, [ip] <== NOT EXECUTED 3f774: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 3f778: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 3f77c: 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 ); 3f780: eb000e1a bl 42ff0 <__errno> <== NOT EXECUTED 3f784: e3a03014 mov r3, #20 <== NOT EXECUTED 3f788: e5803000 str r3, [r0] <== NOT EXECUTED 3f78c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3f790: eafffff8 b 3f778 <== 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); 3f794: eb000e15 bl 42ff0 <__errno> <== NOT EXECUTED 3f798: e3a03009 mov r3, #9 <== NOT EXECUTED 3f79c: e5803000 str r3, [r0] <== NOT EXECUTED 3f7a0: e3e00000 mvn r0, #0 <== NOT EXECUTED 3f7a4: eafffff3 b 3f778 <== 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; 3f7a8: e596c000 ldr ip, [r6] <== NOT EXECUTED 3f7ac: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED 3f7b0: e28cc004 add ip, ip, #4 <== NOT EXECUTED 3f7b4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3f7b8: e5983000 ldr r3, [r8] <== NOT EXECUTED 3f7bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 3f7c0: e58c3000 str r3, [ip] <== NOT EXECUTED return -1; 3f7c4: eaffffeb b 3f778 <== 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 ); 3f7c8: eb000e08 bl 42ff0 <__errno> <== NOT EXECUTED 3f7cc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3f7d0: e5803000 str r3, [r0] <== NOT EXECUTED 3f7d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3f7d8: eaffffe6 b 3f778 <== NOT EXECUTED =============================================================================== 00028de4 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28de4: e59f3070 ldr r3, [pc, #112] ; 28e5c <== NOT EXECUTED 28de8: e5932000 ldr r2, [r3] <== NOT EXECUTED 28dec: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 28df0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28df4: 2a00000e bcs 28e34 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 28df8: e59f3060 ldr r3, [pc, #96] ; 28e60 <== NOT EXECUTED 28dfc: e5933000 ldr r3, [r3] <== NOT EXECUTED 28e00: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 28e04: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 28e08: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 28e0c: 0a000008 beq 28e34 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 28e10: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 28e14: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 28e18: e3520000 cmp r2, #0 <== NOT EXECUTED 28e1c: 0a000009 beq 28e48 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 28e20: e2830018 add r0, r3, #24 <== NOT EXECUTED 28e24: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 28e28: e1a0e00f mov lr, pc <== NOT EXECUTED 28e2c: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 28e30: 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); 28e34: eb00686d bl 42ff0 <__errno> <== NOT EXECUTED 28e38: e3a03009 mov r3, #9 <== NOT EXECUTED 28e3c: e5803000 str r3, [r0] <== NOT EXECUTED 28e40: e3e00000 mvn r0, #0 <== NOT EXECUTED 28e44: 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 ); 28e48: eb006868 bl 42ff0 <__errno> <== NOT EXECUTED 28e4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28e50: e5803000 str r3, [r0] <== NOT EXECUTED 28e54: e3e00000 mvn r0, #0 <== NOT EXECUTED 28e58: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00028e64 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28e64: e59f3098 ldr r3, [pc, #152] ; 28f04 <== NOT EXECUTED 28e68: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 28e6c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 28e70: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28e74: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 28e78: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 28e7c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 28e80: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28e84: 2a00000f bcs 28ec8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 28e88: e59f3078 ldr r3, [pc, #120] ; 28f08 <== NOT EXECUTED 28e8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 28e90: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 28e94: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 28e98: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 28e9c: 0a000009 beq 28ec8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 28ea0: e3130004 tst r3, #4 <== NOT EXECUTED 28ea4: 0a00000c beq 28edc <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 28ea8: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 28eac: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 28eb0: e3530000 cmp r3, #0 <== NOT EXECUTED 28eb4: 0a00000d beq 28ef0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 28eb8: e2800018 add r0, r0, #24 <== NOT EXECUTED 28ebc: e1a0e00f mov lr, pc <== NOT EXECUTED 28ec0: e12fff13 bx r3 <== NOT EXECUTED } 28ec4: 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); 28ec8: eb006848 bl 42ff0 <__errno> <== NOT EXECUTED 28ecc: e3a03009 mov r3, #9 <== NOT EXECUTED 28ed0: e5803000 str r3, [r0] <== NOT EXECUTED 28ed4: e3e00000 mvn r0, #0 <== NOT EXECUTED 28ed8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 28edc: eb006843 bl 42ff0 <__errno> <== NOT EXECUTED 28ee0: e3a03016 mov r3, #22 <== NOT EXECUTED 28ee4: e5803000 str r3, [r0] <== NOT EXECUTED 28ee8: e3e00000 mvn r0, #0 <== NOT EXECUTED 28eec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 28ef0: eb00683e bl 42ff0 <__errno> <== NOT EXECUTED 28ef4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 28ef8: e5803000 str r3, [r0] <== NOT EXECUTED 28efc: e3e00000 mvn r0, #0 <== NOT EXECUTED 28f00: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0003f7ec : int fcntl( int fd, int cmd, ... ) { 3f7ec: e92d000e push {r1, r2, r3} 3f7f0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3f7f4: e59f31d0 ldr r3, [pc, #464] ; 3f9cc 3f7f8: e5933000 ldr r3, [r3] int fcntl( int fd, int cmd, ... ) { 3f7fc: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); 3f800: e28d2028 add r2, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3f804: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 3f808: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 3f80c: e59d4024 ldr r4, [sp, #36] ; 0x24 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3f810: 2a000061 bcs 3f99c iop = rtems_libio_iop( fd ); 3f814: e59f81b4 ldr r8, [pc, #436] ; 3f9d0 3f818: e5986000 ldr r6, [r8] 3f81c: e0865300 add r5, r6, r0, lsl #6 rtems_libio_check_is_open(iop); 3f820: e595c014 ldr ip, [r5, #20] 3f824: e31c0c01 tst ip, #256 ; 0x100 3f828: 0a00005b beq 3f99c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 3f82c: e3540009 cmp r4, #9 3f830: 979ff104 ldrls pc, [pc, r4, lsl #2] 3f834: ea00002c b 3f8ec 3f838: 0003f900 .word 0x0003f900 3f83c: 0003f960 .word 0x0003f960 3f840: 0003f96c .word 0x0003f96c 3f844: 0003f98c .word 0x0003f98c 3f848: 0003f884 .word 0x0003f884 3f84c: 0003f860 .word 0x0003f860 3f850: 0003f860 .word 0x0003f860 3f854: 0003f860 .word 0x0003f860 3f858: 0003f860 .word 0x0003f860 3f85c: 0003f860 .word 0x0003f860 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3f860: eb000de2 bl 42ff0 <__errno> 3f864: e3a03086 mov r3, #134 ; 0x86 3f868: e5803000 str r3, [r0] 3f86c: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 3f870: e1a00006 mov r0, r6 3f874: e28dd004 add sp, sp, #4 3f878: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 3f87c: e28dd00c add sp, sp, #12 3f880: 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 ) ); 3f884: e5920000 ldr r0, [r2] 3f888: ebff2289 bl 82b4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 3f88c: e5953014 ldr r3, [r5, #20] 3f890: e3c00f7f bic r0, r0, #508 ; 0x1fc 3f894: e3c00002 bic r0, r0, #2 3f898: e1a00b00 lsl r0, r0, #22 3f89c: e3c33c02 bic r3, r3, #512 ; 0x200 3f8a0: e1a00b20 lsr r0, r0, #22 3f8a4: e3c33001 bic r3, r3, #1 3f8a8: e1800003 orr r0, r0, r3 3f8ac: e5850014 str r0, [r5, #20] 3f8b0: 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) { 3f8b4: e595303c ldr r3, [r5, #60] ; 0x3c 3f8b8: e5933030 ldr r3, [r3, #48] ; 0x30 3f8bc: e3530000 cmp r3, #0 3f8c0: 0affffea beq 3f870 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 3f8c4: e1a00004 mov r0, r4 3f8c8: e1a01005 mov r1, r5 3f8cc: e1a0e00f mov lr, pc 3f8d0: e12fff13 bx r3 if (err) { 3f8d4: e2504000 subs r4, r0, #0 3f8d8: 0affffe4 beq 3f870 errno = err; 3f8dc: eb000dc3 bl 42ff0 <__errno> <== NOT EXECUTED 3f8e0: e5804000 str r4, [r0] <== NOT EXECUTED 3f8e4: e3e06000 mvn r6, #0 <== NOT EXECUTED 3f8e8: eaffffe0 b 3f870 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 3f8ec: eb000dbf bl 42ff0 <__errno> 3f8f0: e3a03016 mov r3, #22 3f8f4: e5803000 str r3, [r0] 3f8f8: e3e06000 mvn r6, #0 3f8fc: eaffffdb b 3f870 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 3f900: e5927000 ldr r7, [r2] if ( fd2 ) 3f904: e3570000 cmp r7, #0 3f908: 0a000028 beq 3f9b0 diop = rtems_libio_iop( fd2 ); 3f90c: e1530007 cmp r3, r7 <== NOT EXECUTED 3f910: 93a09000 movls r9, #0 <== NOT EXECUTED 3f914: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED 3f918: 91a07009 movls r7, r9 <== NOT EXECUTED 3f91c: 81a09007 movhi r9, r7 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3f920: e2858018 add r8, r5, #24 3f924: e8b8000f ldm r8!, {r0, r1, r2, r3} 3f928: e287a018 add sl, r7, #24 3f92c: e8aa000f stmia sl!, {r0, r1, r2, r3} ret = -1; break; } } diop->handlers = iop->handlers; 3f930: e595203c ldr r2, [r5, #60] ; 0x3c diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3f934: e5981000 ldr r1, [r8] break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 3f938: e5953038 ldr r3, [r5, #56] ; 0x38 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3f93c: e0666009 rsb r6, r6, r9 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3f940: e58a1000 str r1, [sl] ret = -1; break; } } diop->handlers = iop->handlers; 3f944: e587203c str r2, [r7, #60] ; 0x3c diop->file_info = iop->file_info; 3f948: e5873038 str r3, [r7, #56] ; 0x38 diop->flags = iop->flags; 3f94c: e587c014 str ip, [r7, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3f950: 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) { 3f954: e3560000 cmp r6, #0 3f958: aaffffd5 bge 3f8b4 3f95c: eaffffc3 b 3f870 <== 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); 3f960: e1a0c5ac lsr ip, ip, #11 3f964: e20c6001 and r6, ip, #1 3f968: eaffffd1 b 3f8b4 * 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 ) ) 3f96c: e5926000 ldr r6, [r2] 3f970: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3f974: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3f978: 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; 3f97c: 1585c014 strne ip, [r5, #20] 3f980: 13a06000 movne r6, #0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3f984: 0585c014 streq ip, [r5, #20] 3f988: eaffffc9 b 3f8b4 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 3f98c: e1a0000c mov r0, ip 3f990: ebff21a7 bl 8034 3f994: e1a06000 mov r6, r0 3f998: eaffffed b 3f954 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 3f99c: eb000d93 bl 42ff0 <__errno> <== NOT EXECUTED 3f9a0: e3a03009 mov r3, #9 <== NOT EXECUTED 3f9a4: e5803000 str r3, [r0] <== NOT EXECUTED 3f9a8: e3e06000 mvn r6, #0 <== NOT EXECUTED 3f9ac: eaffffaf b 3f870 <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 3f9b0: ebff2211 bl 81fc if ( diop == 0 ) { 3f9b4: e2507000 subs r7, r0, #0 3f9b8: 0affffc9 beq 3f8e4 3f9bc: e5986000 ldr r6, [r8] 3f9c0: e595c014 ldr ip, [r5, #20] 3f9c4: e1a09007 mov r9, r7 3f9c8: eaffffd4 b 3f920 =============================================================================== 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: eb003278 bl f640 <__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: eb003273 bl f640 <__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) =============================================================================== 00009620 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 9620: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 9624: e59f53bc ldr r5, [pc, #956] ; 99e8 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 9628: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 962c: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 9630: e24dd008 sub sp, sp, #8 9634: e1a04000 mov r4, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 9638: e1a02001 mov r2, r1 963c: e5950000 ldr r0, [r5] 9640: ebfff059 bl 57ac 9644: e2509000 subs r9, r0, #0 9648: 13e08003 mvnne r8, #3 964c: 1a00001c bne 96c4 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 9650: e5946000 ldr r6, [r4] <== NOT EXECUTED if (pipe == NULL) { 9654: e3560000 cmp r6, #0 <== NOT EXECUTED 9658: 0a00001c beq 96d0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 965c: e3a01000 mov r1, #0 <== NOT EXECUTED 9660: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 9664: e1a02001 mov r2, r1 <== NOT EXECUTED 9668: ebfff04f bl 57ac <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 966c: e5943000 ldr r3, [r4] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 9670: e3500000 cmp r0, #0 <== NOT EXECUTED 9674: 01a08000 moveq r8, r0 <== NOT EXECUTED 9678: 13e08003 mvnne r8, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 967c: e3530000 cmp r3, #0 <== NOT EXECUTED 9680: 0a0000ab beq 9934 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 9684: e5950000 ldr r0, [r5] <== NOT EXECUTED 9688: ebfff08f bl 58cc <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 968c: e3580000 cmp r8, #0 <== NOT EXECUTED 9690: 1a00000b bne 96c4 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 9694: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 9698: e2033006 and r3, r3, #6 <== NOT EXECUTED 969c: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 96a0: e5945000 ldr r5, [r4] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 96a4: 0a000082 beq 98b4 <== NOT EXECUTED 96a8: e3530006 cmp r3, #6 <== NOT EXECUTED 96ac: 0a00006c beq 9864 <== NOT EXECUTED 96b0: e3530002 cmp r3, #2 <== NOT EXECUTED 96b4: 0a000046 beq 97d4 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 96b8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 96bc: ebfff082 bl 58cc <== NOT EXECUTED 96c0: e3a08000 mov r8, #0 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 96c4: e1a00008 mov r0, r8 96c8: e28dd008 add sp, sp, #8 96cc: 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)); 96d0: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 96d4: ebffe34c bl 240c <== NOT EXECUTED if (pipe == NULL) 96d8: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 96dc: e1a06000 mov r6, r0 <== NOT EXECUTED 96e0: e1a0a000 mov sl, r0 <== NOT EXECUTED if (pipe == NULL) 96e4: 0a0000bd beq 99e0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 96e8: e1a02000 mov r2, r0 <== NOT EXECUTED 96ec: e4829004 str r9, [r2], #4 <== NOT EXECUTED 96f0: e2822004 add r2, r2, #4 <== NOT EXECUTED 96f4: e4829004 str r9, [r2], #4 <== NOT EXECUTED 96f8: e4829004 str r9, [r2], #4 <== NOT EXECUTED 96fc: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9700: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9704: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9708: e4829004 str r9, [r2], #4 <== NOT EXECUTED 970c: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9710: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9714: e4829004 str r9, [r2], #4 <== NOT EXECUTED 9718: e4829004 str r9, [r2], #4 <== NOT EXECUTED pipe->Size = PIPE_BUF; 971c: 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)); 9720: e5829000 str r9, [r2] <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 9724: 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; 9728: e5863004 str r3, [r6, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 972c: ebffe336 bl 240c <== NOT EXECUTED if (! pipe->Buffer) 9730: 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); 9734: e5860000 str r0, [r6] <== NOT EXECUTED if (! pipe->Buffer) 9738: 0a0000a6 beq 99d8 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 973c: e59f82a8 ldr r8, [pc, #680] ; 99ec <== NOT EXECUTED 9740: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 9744: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 9748: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 974c: e1a01009 mov r1, r9 <== NOT EXECUTED 9750: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 9754: e1a02009 mov r2, r9 <== NOT EXECUTED 9758: e286302c add r3, r6, #44 ; 0x2c <== NOT EXECUTED 975c: eb0006df bl b2e0 <== NOT EXECUTED 9760: e2501000 subs r1, r0, #0 <== NOT EXECUTED 9764: 1a000099 bne 99d0 <== 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( 9768: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 976c: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 9770: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 9774: e2863030 add r3, r6, #48 ; 0x30 <== NOT EXECUTED 9778: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED 977c: e1a02001 mov r2, r1 <== NOT EXECUTED 9780: eb0006d6 bl b2e0 <== NOT EXECUTED 9784: e2503000 subs r3, r0, #0 <== NOT EXECUTED 9788: 1a00008e bne 99c8 <== 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( 978c: e5d80000 ldrb r0, [r8] <== NOT EXECUTED 9790: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED 9794: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED 9798: e286c028 add ip, r6, #40 ; 0x28 <== NOT EXECUTED 979c: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED 97a0: e3a01001 mov r1, #1 <== NOT EXECUTED 97a4: e3a02010 mov r2, #16 <== NOT EXECUTED 97a8: e58dc000 str ip, [sp] <== NOT EXECUTED 97ac: ebffef63 bl 5540 <== NOT EXECUTED 97b0: e3500000 cmp r0, #0 <== NOT EXECUTED 97b4: 1a000081 bne 99c0 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 97b8: e5d83000 ldrb r3, [r8] <== NOT EXECUTED 97bc: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 97c0: e2833001 add r3, r3, #1 <== NOT EXECUTED 97c4: e5c83000 strb r3, [r8] <== NOT EXECUTED c = 'a'; 97c8: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 97cc: 05c83000 strbeq r3, [r8] <== NOT EXECUTED 97d0: eaffffa1 b 965c <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 97d4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 97d8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 97dc: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 97e0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 97e4: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 97e8: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 97ec: e5853010 str r3, [r5, #16] <== NOT EXECUTED 97f0: 0a00006a beq 99a0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 97f4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 97f8: e3530000 cmp r3, #0 <== NOT EXECUTED 97fc: 1affffad bne 96b8 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 9800: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 9804: e3130001 tst r3, #1 <== NOT EXECUTED 9808: 1affffaa bne 96b8 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 980c: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED 9810: ea000006 b 9830 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 9814: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9818: ebffefe3 bl 57ac <== NOT EXECUTED 981c: e3500000 cmp r0, #0 <== NOT EXECUTED 9820: 1a00000a bne 9850 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 9824: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED 9828: e1530006 cmp r3, r6 <== NOT EXECUTED 982c: 1affffa1 bne 96b8 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 9830: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9834: ebfff024 bl 58cc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 9838: e3a01000 mov r1, #0 <== NOT EXECUTED 983c: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 9840: eb00070a bl b470 <== NOT EXECUTED 9844: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 9848: 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)) 984c: 0afffff0 beq 9814 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 9850: e3e08003 mvn r8, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 9854: e1a00004 mov r0, r4 <== NOT EXECUTED 9858: e1a01007 mov r1, r7 <== NOT EXECUTED 985c: ebffff29 bl 9508 <== NOT EXECUTED return err; 9860: eaffff97 b 96c4 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 9864: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 9868: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 986c: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 9870: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 9874: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 9878: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 987c: e5853010 str r3, [r5, #16] <== NOT EXECUTED 9880: 0a00003e beq 9980 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 9884: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 9888: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 988c: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 9890: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9894: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 9898: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 989c: e5853014 str r3, [r5, #20] <== NOT EXECUTED 98a0: 1affff84 bne 96b8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 98a4: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 98a8: e28d1004 add r1, sp, #4 <== NOT EXECUTED 98ac: eb0006d6 bl b40c <== NOT EXECUTED 98b0: eaffff80 b 96b8 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 98b4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 98b8: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 98bc: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 98c0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 98c4: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 98c8: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 98cc: e5853014 str r3, [r5, #20] <== NOT EXECUTED 98d0: 0a00002e beq 9990 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 98d4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 98d8: e3530000 cmp r3, #0 <== NOT EXECUTED 98dc: 1affff75 bne 96b8 <== NOT EXECUTED 98e0: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 98e4: e3130001 tst r3, #1 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 98e8: 05956020 ldreq r6, [r5, #32] <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 98ec: 0a000007 beq 9910 <== NOT EXECUTED 98f0: ea00002e b 99b0 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 98f4: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 98f8: ebffefab bl 57ac <== NOT EXECUTED 98fc: e3500000 cmp r0, #0 <== NOT EXECUTED 9900: 1affffd2 bne 9850 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 9904: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 9908: e1530006 cmp r3, r6 <== NOT EXECUTED 990c: 1affff69 bne 96b8 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 9910: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 9914: ebffefec bl 58cc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 9918: e3a01000 mov r1, #0 <== NOT EXECUTED 991c: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 9920: eb0006d2 bl b470 <== NOT EXECUTED 9924: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 9928: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 992c: 0afffff0 beq 98f4 <== NOT EXECUTED 9930: eaffffc6 b 9850 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 9934: e3580000 cmp r8, #0 <== NOT EXECUTED 9938: 1a000003 bne 994c <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 993c: e5846000 str r6, [r4] <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 9940: e5950000 ldr r0, [r5] <== NOT EXECUTED 9944: ebffefe0 bl 58cc <== NOT EXECUTED 9948: eaffff51 b 9694 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 994c: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED 9950: eb000693 bl b3a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 9954: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 9958: eb000691 bl b3a4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 995c: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED 9960: ebffef68 bl 5708 <== NOT EXECUTED free(pipe->Buffer); 9964: e5960000 ldr r0, [r6] <== NOT EXECUTED 9968: ebffe1ce bl 20a8 <== NOT EXECUTED free(pipe); 996c: e1a00006 mov r0, r6 <== NOT EXECUTED 9970: ebffe1cc bl 20a8 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 9974: e5950000 ldr r0, [r5] <== NOT EXECUTED 9978: ebffefd3 bl 58cc <== NOT EXECUTED 997c: eaffff50 b 96c4 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 9980: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 9984: e28d1004 add r1, sp, #4 <== NOT EXECUTED 9988: eb00069f bl b40c <== NOT EXECUTED 998c: eaffffbc b 9884 <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 9990: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 9994: e28d1004 add r1, sp, #4 <== NOT EXECUTED 9998: eb00069b bl b40c <== NOT EXECUTED 999c: eaffffcc b 98d4 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 99a0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 99a4: e28d1004 add r1, sp, #4 <== NOT EXECUTED 99a8: eb000697 bl b40c <== NOT EXECUTED 99ac: eaffff90 b 97f4 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 99b0: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED 99b4: ebffefc4 bl 58cc <== NOT EXECUTED 99b8: e3e08005 mvn r8, #5 <== NOT EXECUTED err = -ENXIO; goto out_error; 99bc: eaffffa4 b 9854 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 99c0: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED 99c4: eb000676 bl b3a4 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 99c8: e59a002c ldr r0, [sl, #44] ; 0x2c <== NOT EXECUTED 99cc: eb000674 bl b3a4 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 99d0: e59a0000 ldr r0, [sl] <== NOT EXECUTED 99d4: ebffe1b3 bl 20a8 <== NOT EXECUTED err_buf: free(pipe); 99d8: e1a0000a mov r0, sl <== NOT EXECUTED 99dc: ebffe1b1 bl 20a8 <== NOT EXECUTED 99e0: e3e0800b mvn r8, #11 <== NOT EXECUTED 99e4: eaffffe2 b 9974 <== 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: eb00324f bl f640 <__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: eb003234 bl f640 <__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: eb001444 bl 7210 <_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 =============================================================================== 0002a3c8 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2a3c8: e59f3058 ldr r3, [pc, #88] ; 2a428 <== NOT EXECUTED 2a3cc: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2a3d0: e92d4010 push {r4, lr} <== NOT EXECUTED 2a3d4: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2a3d8: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2a3dc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 2a3e0: e3530000 cmp r3, #0 <== NOT EXECUTED 2a3e4: 0a000004 beq 2a3fc <== NOT EXECUTED 2a3e8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a3ec: e3530000 cmp r3, #0 <== NOT EXECUTED 2a3f0: 12800004 addne r0, r0, #4 <== NOT EXECUTED 2a3f4: 11a0e00f movne lr, pc <== NOT EXECUTED 2a3f8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2a3fc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 2a400: e3530000 cmp r3, #0 <== NOT EXECUTED 2a404: 0a000004 beq 2a41c <== NOT EXECUTED 2a408: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2a40c: e3530000 cmp r3, #0 <== NOT EXECUTED 2a410: 12840018 addne r0, r4, #24 <== NOT EXECUTED 2a414: 11a0e00f movne lr, pc <== NOT EXECUTED 2a418: 112fff13 bxne r3 <== NOT EXECUTED free(env); 2a41c: e1a00004 mov r0, r4 <== NOT EXECUTED } } 2a420: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 2a424: eaff7651 b 7d70 <== NOT EXECUTED =============================================================================== 00019ae4 : int fstat( int fd, struct stat *sbuf ) { 19ae4: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 19ae8: e2515000 subs r5, r1, #0 19aec: 0a000023 beq 19b80 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 19af0: e59f309c ldr r3, [pc, #156] ; 19b94 19af4: e5933000 ldr r3, [r3] 19af8: e1500003 cmp r0, r3 19afc: 2a000015 bcs 19b58 19b00: e59f3090 ldr r3, [pc, #144] ; 19b98 19b04: e5934000 ldr r4, [r3] 19b08: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 19b0c: e5943014 ldr r3, [r4, #20] 19b10: e3130c01 tst r3, #256 ; 0x100 19b14: 0a00000f beq 19b58 if ( !iop->handlers ) 19b18: e594303c ldr r3, [r4, #60] ; 0x3c 19b1c: e3530000 cmp r3, #0 19b20: 0a00000c beq 19b58 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 19b24: e5933018 ldr r3, [r3, #24] 19b28: e3530000 cmp r3, #0 19b2c: 0a00000e beq 19b6c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 19b30: e3a01000 mov r1, #0 19b34: e3a02048 mov r2, #72 ; 0x48 19b38: e1a00005 mov r0, r5 19b3c: ebffd429 bl ebe8 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 19b40: e2840018 add r0, r4, #24 19b44: e1a01005 mov r1, r5 19b48: e594303c ldr r3, [r4, #60] ; 0x3c 19b4c: e1a0e00f mov lr, pc 19b50: e593f018 ldr pc, [r3, #24] } 19b54: 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 ); 19b58: ebffd1d8 bl e2c0 <__errno> 19b5c: e3a03009 mov r3, #9 19b60: e5803000 str r3, [r0] 19b64: e3e00000 mvn r0, #0 19b68: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 19b6c: ebffd1d3 bl e2c0 <__errno> <== NOT EXECUTED 19b70: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 19b74: e5803000 str r3, [r0] <== NOT EXECUTED 19b78: e3e00000 mvn r0, #0 <== NOT EXECUTED 19b7c: 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 ); 19b80: ebffd1ce bl e2c0 <__errno> 19b84: e3a0300e mov r3, #14 19b88: e5803000 str r3, [r0] 19b8c: e3e00000 mvn r0, #0 19b90: e8bd8030 pop {r4, r5, pc} =============================================================================== 00028fd0 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28fd0: e59f3070 ldr r3, [pc, #112] ; 29048 28fd4: e5933000 ldr r3, [r3] 28fd8: e1500003 cmp r0, r3 #include int fsync( int fd ) { 28fdc: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 28fe0: 2a00000e bcs 29020 iop = rtems_libio_iop( fd ); 28fe4: e59f3060 ldr r3, [pc, #96] ; 2904c 28fe8: e5933000 ldr r3, [r3] 28fec: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 28ff0: e5903014 ldr r3, [r0, #20] 28ff4: e3130c01 tst r3, #256 ; 0x100 28ff8: 0a000008 beq 29020 /* * Now process the fsync(). */ if ( !iop->handlers ) 28ffc: e590303c ldr r3, [r0, #60] ; 0x3c 29000: e3530000 cmp r3, #0 29004: 0a000005 beq 29020 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 29008: e5933028 ldr r3, [r3, #40] ; 0x28 2900c: e3530000 cmp r3, #0 29010: 0a000007 beq 29034 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 29014: e1a0e00f mov lr, pc 29018: e12fff13 bx r3 } 2901c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 29020: eb0067f2 bl 42ff0 <__errno> <== NOT EXECUTED 29024: e3a03009 mov r3, #9 <== NOT EXECUTED 29028: e5803000 str r3, [r0] <== NOT EXECUTED 2902c: e3e00000 mvn r0, #0 <== NOT EXECUTED 29030: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 29034: eb0067ed bl 42ff0 <__errno> 29038: e3a03086 mov r3, #134 ; 0x86 2903c: e5803000 str r3, [r0] 29040: e3e00000 mvn r0, #0 29044: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000ac44 : int ftruncate( int fd, off_t length ) { ac44: e92d40f0 push {r4, r5, r6, r7, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ac48: e59f30fc ldr r3, [pc, #252] ; ad4c ac4c: e5933000 ldr r3, [r3] ac50: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { ac54: e24dd014 sub sp, sp, #20 ac58: e1a05001 mov r5, r1 ac5c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ac60: 2a000025 bcs acfc iop = rtems_libio_iop( fd ); ac64: e59f30e4 ldr r3, [pc, #228] ; ad50 ac68: e5934000 ldr r4, [r3] ac6c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); ac70: e5943014 ldr r3, [r4, #20] ac74: e3130c01 tst r3, #256 ; 0x100 ac78: 0a00001f beq acfc rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ac7c: e3130004 tst r3, #4 ac80: 0a000022 beq ad10 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ac84: e284c018 add ip, r4, #24 ac88: e8bc000f ldm ip!, {r0, r1, r2, r3} ac8c: e1a0700d mov r7, sp ac90: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) ac94: e59d200c ldr r2, [sp, #12] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ac98: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) ac9c: e5927010 ldr r7, [r2, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; aca0: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) aca4: e3570000 cmp r7, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; aca8: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) acac: 0a00001c beq ad24 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) acb0: e1a0000d mov r0, sp acb4: e1a0e00f mov lr, pc acb8: e12fff17 bx r7 acbc: e3500001 cmp r0, #1 acc0: 0a00001c beq ad38 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); acc4: e5943014 ldr r3, [r4, #20] acc8: e3130004 tst r3, #4 accc: 0a00000f beq ad10 if ( !iop->handlers->ftruncate_h ) acd0: e594303c ldr r3, [r4, #60] ; 0x3c acd4: e5933020 ldr r3, [r3, #32] acd8: e3530000 cmp r3, #0 acdc: 0a000010 beq ad24 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); ace0: e1a00004 mov r0, r4 ace4: e1a01005 mov r1, r5 ace8: e1a02006 mov r2, r6 acec: e1a0e00f mov lr, pc acf0: e12fff13 bx r3 } acf4: e28dd014 add sp, sp, #20 acf8: 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); acfc: eb000d6f bl e2c0 <__errno> <== NOT EXECUTED ad00: e3a03009 mov r3, #9 <== NOT EXECUTED ad04: e5803000 str r3, [r0] <== NOT EXECUTED ad08: e3e00000 mvn r0, #0 <== NOT EXECUTED ad0c: eafffff8 b acf4 <== 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 ); ad10: eb000d6a bl e2c0 <__errno> <== NOT EXECUTED ad14: e3a03016 mov r3, #22 <== NOT EXECUTED ad18: e5803000 str r3, [r0] <== NOT EXECUTED ad1c: e3e00000 mvn r0, #0 <== NOT EXECUTED ad20: eafffff3 b acf4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ad24: eb000d65 bl e2c0 <__errno> <== NOT EXECUTED ad28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED ad2c: e5803000 str r3, [r0] <== NOT EXECUTED ad30: e3e00000 mvn r0, #0 <== NOT EXECUTED ad34: eaffffee b acf4 <== 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 ); ad38: eb000d60 bl e2c0 <__errno> ad3c: e3a03015 mov r3, #21 ad40: e5803000 str r3, [r0] ad44: e3e00000 mvn r0, #0 ad48: eaffffe9 b acf4 =============================================================================== 0005cba0 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5cba0: e59f30b8 ldr r3, [pc, #184] ; 5cc60 5cba4: e5933000 ldr r3, [r3] 5cba8: e1500003 cmp r0, r3 5cbac: 359f30b0 ldrcc r3, [pc, #176] ; 5cc64 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5cbb0: e92d40f0 push {r4, r5, r6, r7, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5cbb4: 35934000 ldrcc r4, [r3] 5cbb8: 23a04000 movcs r4, #0 5cbbc: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5cbc0: e284c018 add ip, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5cbc4: e24dd014 sub sp, sp, #20 5cbc8: e1a06001 mov r6, r1 5cbcc: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5cbd0: e8bc000f ldm ip!, {r0, r1, r2, r3} 5cbd4: e1a0700d mov r7, sp 5cbd8: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 5cbdc: e59d200c ldr r2, [sp, #12] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5cbe0: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 5cbe4: e5927010 ldr r7, [r2, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5cbe8: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 5cbec: e3570000 cmp r7, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5cbf0: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 5cbf4: 0a000014 beq 5cc4c rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5cbf8: e1a0000d mov r0, sp 5cbfc: e1a0e00f mov lr, pc 5cc00: e12fff17 bx r7 5cc04: e3500001 cmp r0, #1 5cc08: 1a00000a bne 5cc38 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 5cc0c: e594303c ldr r3, [r4, #60] ; 0x3c 5cc10: e5933008 ldr r3, [r3, #8] 5cc14: e3530000 cmp r3, #0 5cc18: 0a00000b beq 5cc4c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5cc1c: e1a00004 mov r0, r4 5cc20: e1a01006 mov r1, r6 5cc24: e1a02005 mov r2, r5 5cc28: e1a0e00f mov lr, pc 5cc2c: e12fff13 bx r3 } 5cc30: e28dd014 add sp, sp, #20 5cc34: 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 ); 5cc38: ebff98ec bl 42ff0 <__errno> 5cc3c: e3a03014 mov r3, #20 5cc40: e5803000 str r3, [r0] 5cc44: e3e00000 mvn r0, #0 5cc48: eafffff8 b 5cc30 * 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 ); 5cc4c: ebff98e7 bl 42ff0 <__errno> <== NOT EXECUTED 5cc50: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5cc54: e5803000 str r3, [r0] <== NOT EXECUTED 5cc58: e3e00000 mvn r0, #0 <== NOT EXECUTED 5cc5c: eafffff3 b 5cc30 <== NOT EXECUTED =============================================================================== 00029188 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 29188: e59f3008 ldr r3, [pc, #8] ; 29198 <== NOT EXECUTED 2918c: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 29190: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 29194: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000297e4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 297e4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 297e8: e59d801c ldr r8, [sp, #28] 297ec: e1a05000 mov r5, r0 297f0: e1a0a001 mov sl, r1 297f4: e1a04002 mov r4, r2 297f8: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 297fc: ebffffb2 bl 296cc if ((fp = fopen("/etc/group", "r")) == NULL) { 29800: e59f00b0 ldr r0, [pc, #176] ; 298b8 29804: e59f10b0 ldr r1, [pc, #176] ; 298bc 29808: eb006868 bl 439b0 2980c: e2506000 subs r6, r0, #0 29810: 1a000006 bne 29830 29814: ea000022 b 298a4 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 29818: e5940000 ldr r0, [r4] 2981c: eb007e88 bl 49244 29820: e2700001 rsbs r0, r0, #1 29824: 33a00000 movcc r0, #0 } else { match = (grp->gr_gid == gid); } if (match) { 29828: e3500000 cmp r0, #0 2982c: 1a00000f bne 29870 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 29830: e1a01004 mov r1, r4 29834: e1a02007 mov r2, r7 29838: e1a03008 mov r3, r8 2983c: e1a00006 mov r0, r6 29840: ebfffee1 bl 293cc 29844: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 29848: e1a01005 mov r1, r5 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 2984c: 0a00000d beq 29888 errno = EINVAL; fclose(fp); return -1; } if (name) { 29850: e3550000 cmp r5, #0 29854: 1affffef bne 29818 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 29858: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 2985c: e150000a cmp r0, sl <== NOT EXECUTED 29860: 13a00000 movne r0, #0 <== NOT EXECUTED 29864: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 29868: e3500000 cmp r0, #0 <== NOT EXECUTED 2986c: 0affffef beq 29830 <== NOT EXECUTED fclose(fp); 29870: e1a00006 mov r0, r6 29874: eb00662a bl 43124 *result = grp; 29878: e59d3020 ldr r3, [sp, #32] 2987c: e3a00000 mov r0, #0 29880: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 29884: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 29888: eb0065d8 bl 42ff0 <__errno> <== NOT EXECUTED 2988c: e3a03016 mov r3, #22 <== NOT EXECUTED 29890: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 29894: e1a00006 mov r0, r6 <== NOT EXECUTED 29898: eb006621 bl 43124 <== NOT EXECUTED 2989c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 298a0: 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; 298a4: eb0065d1 bl 42ff0 <__errno> <== NOT EXECUTED 298a8: e3a03016 mov r3, #22 <== NOT EXECUTED 298ac: e5803000 str r3, [r0] <== NOT EXECUTED 298b0: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 298b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00029520 : return NULL; return p; } struct group *getgrent(void) { 29520: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 29524: e59f4030 ldr r4, [pc, #48] ; 2955c <== NOT EXECUTED 29528: e5940000 ldr r0, [r4] <== NOT EXECUTED 2952c: e3500000 cmp r0, #0 <== NOT EXECUTED 29530: 1a000001 bne 2953c <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 29534: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 29538: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 2953c: e2841008 add r1, r4, #8 <== NOT EXECUTED 29540: e2842018 add r2, r4, #24 <== NOT EXECUTED 29544: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29548: ebffff9f bl 293cc <== NOT EXECUTED 2954c: e3500000 cmp r0, #0 <== NOT EXECUTED 29550: 12840008 addne r0, r4, #8 <== NOT EXECUTED 29554: 18bd8010 popne {r4, pc} <== NOT EXECUTED 29558: eafffff5 b 29534 <== NOT EXECUTED =============================================================================== 000298fc : struct group *getgrgid( gid_t gid ) { 298fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 29900: e59f1030 ldr r1, [pc, #48] ; 29938 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 29904: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29908: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2990c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 29910: e2812010 add r2, r1, #16 <== NOT EXECUTED 29914: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29918: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 2991c: e58dc000 str ip, [sp] <== NOT EXECUTED 29920: ebffffe6 bl 298c0 <== NOT EXECUTED 29924: e3500000 cmp r0, #0 <== NOT EXECUTED 29928: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 2992c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 29930: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29934: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 000298c0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 298c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 298c4: e1a0c002 mov ip, r2 <== NOT EXECUTED 298c8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 298cc: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 298d0: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 298d4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 298d8: e1a0300c mov r3, ip <== NOT EXECUTED 298dc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 298e0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 298e4: e1a0200e mov r2, lr <== NOT EXECUTED 298e8: e3a00000 mov r0, #0 <== NOT EXECUTED 298ec: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 298f0: ebffffbb bl 297e4 <== NOT EXECUTED } 298f4: e28dd008 add sp, sp, #8 <== NOT EXECUTED 298f8: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00022054 : */ pid_t getpid( void ) { return _Objects_Local_node; } 22054: e3a00001 mov r0, #1 <== NOT EXECUTED 22058: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000299dc : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 299dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 299e0: e59d801c ldr r8, [sp, #28] 299e4: e1a05000 mov r5, r0 299e8: e1a0a001 mov sl, r1 299ec: e1a04002 mov r4, r2 299f0: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 299f4: ebffff34 bl 296cc if ((fp = fopen("/etc/passwd", "r")) == NULL) { 299f8: e59f00b0 ldr r0, [pc, #176] ; 29ab0 299fc: e59f10b0 ldr r1, [pc, #176] ; 29ab4 29a00: eb0067ea bl 439b0 29a04: e2506000 subs r6, r0, #0 29a08: 1a000006 bne 29a28 29a0c: ea000022 b 29a9c <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 29a10: e5940000 ldr r0, [r4] 29a14: eb007e0a bl 49244 29a18: e2700001 rsbs r0, r0, #1 29a1c: 33a00000 movcc r0, #0 } else { match = (pwd->pw_uid == uid); } if (match) { 29a20: e3500000 cmp r0, #0 29a24: 1a00000f bne 29a68 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 29a28: e1a01004 mov r1, r4 29a2c: e1a02007 mov r2, r7 29a30: e1a03008 mov r3, r8 29a34: e1a00006 mov r0, r6 29a38: ebfffec8 bl 29560 29a3c: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 29a40: e1a01005 mov r1, r5 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 29a44: 0a00000d beq 29a80 errno = EINVAL; fclose(fp); return -1; } if (name) { 29a48: e3550000 cmp r5, #0 29a4c: 1affffef bne 29a10 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 29a50: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 29a54: e150000a cmp r0, sl <== NOT EXECUTED 29a58: 13a00000 movne r0, #0 <== NOT EXECUTED 29a5c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 29a60: e3500000 cmp r0, #0 <== NOT EXECUTED 29a64: 0affffef beq 29a28 <== NOT EXECUTED fclose(fp); 29a68: e1a00006 mov r0, r6 29a6c: eb0065ac bl 43124 *result = pwd; 29a70: e59d3020 ldr r3, [sp, #32] 29a74: e3a00000 mov r0, #0 29a78: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 29a7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 29a80: eb00655a bl 42ff0 <__errno> <== NOT EXECUTED 29a84: e3a03016 mov r3, #22 <== NOT EXECUTED 29a88: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 29a8c: e1a00006 mov r0, r6 <== NOT EXECUTED 29a90: eb0065a3 bl 43124 <== NOT EXECUTED 29a94: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29a98: 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; 29a9c: eb006553 bl 42ff0 <__errno> <== NOT EXECUTED 29aa0: e3a03016 mov r3, #22 <== NOT EXECUTED 29aa4: e5803000 str r3, [r0] <== NOT EXECUTED 29aa8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 29aac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0002968c : return NULL; return p; } struct passwd *getpwent(void) { 2968c: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 29690: e59f4030 ldr r4, [pc, #48] ; 296c8 <== NOT EXECUTED 29694: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 29698: e3500000 cmp r0, #0 <== NOT EXECUTED 2969c: 1a000001 bne 296a8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 296a0: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 296a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 296a8: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 296ac: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 296b0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 296b4: ebffffa9 bl 29560 <== NOT EXECUTED 296b8: e3500000 cmp r0, #0 <== NOT EXECUTED 296bc: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 296c0: 18bd8010 popne {r4, pc} <== NOT EXECUTED 296c4: eafffff5 b 296a0 <== NOT EXECUTED =============================================================================== 00029af4 : struct passwd *getpwuid( uid_t uid ) { 29af4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 29af8: e59f1030 ldr r1, [pc, #48] ; 29b30 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 29afc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29b00: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 29b04: e28dc004 add ip, sp, #4 <== NOT EXECUTED 29b08: e281201c add r2, r1, #28 <== NOT EXECUTED 29b0c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29b10: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 29b14: e58dc000 str ip, [sp] <== NOT EXECUTED 29b18: ebffffe6 bl 29ab8 <== NOT EXECUTED 29b1c: e3500000 cmp r0, #0 <== NOT EXECUTED 29b20: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 29b24: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 29b28: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29b2c: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== 00029ab8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 29ab8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 29abc: e1a0c002 mov ip, r2 <== NOT EXECUTED 29ac0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 29ac4: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 29ac8: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 29acc: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 29ad0: e1a0300c mov r3, ip <== NOT EXECUTED 29ad4: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 29ad8: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 29adc: e1a0200e mov r2, lr <== NOT EXECUTED 29ae0: e3a00000 mov r0, #0 <== NOT EXECUTED 29ae4: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 29ae8: ebffffbb bl 299dc <== NOT EXECUTED } 29aec: e28dd008 add sp, sp, #8 <== NOT EXECUTED 29af0: 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: eb0010df bl 64f0 <_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: eb003047 bl e2c0 <__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: eb003370 bl 125cc <__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: eb00336b bl 125cc <__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 =============================================================================== 0002206c : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 2206c: e3a00000 mov r0, #0 <== NOT EXECUTED 22070: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00029b9c : int link( const char *existing, const char *new ) { 29b9c: e92d4070 push {r4, r5, r6, lr} 29ba0: e24dd034 sub sp, sp, #52 ; 0x34 29ba4: e1a05001 mov r5, r1 29ba8: e1a06000 mov r6, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 29bac: eb00800c bl 49be4 29bb0: e28d4018 add r4, sp, #24 29bb4: e1a01000 mov r1, r0 29bb8: e3a0c001 mov ip, #1 29bbc: e1a00006 mov r0, r6 29bc0: e3a02000 mov r2, #0 29bc4: e1a03004 mov r3, r4 29bc8: e58dc000 str ip, [sp] 29bcc: ebff7845 bl 7ce8 0, &existing_loc, true ); if ( result != 0 ) 29bd0: e3500000 cmp r0, #0 29bd4: 0a000003 beq 29be8 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 ); 29bd8: e3e05000 mvn r5, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 29bdc: e1a00005 mov r0, r5 29be0: e28dd034 add sp, sp, #52 ; 0x34 29be4: e8bd8070 pop {r4, r5, r6, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 29be8: e28d6004 add r6, sp, #4 29bec: e1a00005 mov r0, r5 29bf0: e28d1030 add r1, sp, #48 ; 0x30 29bf4: e1a02006 mov r2, r6 29bf8: ebff7ecb bl 972c if ( !parent_loc.ops->evalformake_h ) { 29bfc: e59d3010 ldr r3, [sp, #16] 29c00: e5933004 ldr r3, [r3, #4] 29c04: e3530000 cmp r3, #0 29c08: 0a000048 beq 29d30 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 ); 29c0c: e59d0030 ldr r0, [sp, #48] ; 0x30 29c10: e1a01006 mov r1, r6 29c14: e0850000 add r0, r5, r0 29c18: e28d202c add r2, sp, #44 ; 0x2c 29c1c: e1a0e00f mov lr, pc 29c20: e12fff13 bx r3 if ( result != 0 ) { 29c24: e2505000 subs r5, r0, #0 29c28: 1a000034 bne 29d00 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 29c2c: e59d3028 ldr r3, [sp, #40] ; 0x28 29c30: e59d2014 ldr r2, [sp, #20] 29c34: e1520003 cmp r2, r3 29c38: 1a00001b bne 29cac rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 29c3c: e59d2010 ldr r2, [sp, #16] 29c40: e5923008 ldr r3, [r2, #8] 29c44: e3530000 cmp r3, #0 29c48: 0a000044 beq 29d60 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 ); 29c4c: e1a00004 mov r0, r4 29c50: e1a01006 mov r1, r6 29c54: e59d202c ldr r2, [sp, #44] ; 0x2c 29c58: e1a0e00f mov lr, pc 29c5c: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 29c60: e59d3024 ldr r3, [sp, #36] ; 0x24 29c64: 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 ); 29c68: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 29c6c: 0a000004 beq 29c84 29c70: e593301c ldr r3, [r3, #28] 29c74: e3530000 cmp r3, #0 29c78: 11a00004 movne r0, r4 29c7c: 11a0e00f movne lr, pc 29c80: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 29c84: e59d3010 ldr r3, [sp, #16] 29c88: e3530000 cmp r3, #0 29c8c: 0affffd2 beq 29bdc 29c90: e593301c ldr r3, [r3, #28] 29c94: e3530000 cmp r3, #0 29c98: 0affffcf beq 29bdc 29c9c: e1a00006 mov r0, r6 29ca0: e1a0e00f mov lr, pc 29ca4: e12fff13 bx r3 29ca8: eaffffcb b 29bdc * 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 ); 29cac: e59d3024 ldr r3, [sp, #36] ; 0x24 29cb0: e3530000 cmp r3, #0 29cb4: 0a000004 beq 29ccc 29cb8: e593301c ldr r3, [r3, #28] 29cbc: e3530000 cmp r3, #0 29cc0: 11a00004 movne r0, r4 29cc4: 11a0e00f movne lr, pc 29cc8: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 29ccc: e59d3010 ldr r3, [sp, #16] 29cd0: e3530000 cmp r3, #0 29cd4: 0a000004 beq 29cec 29cd8: e593301c ldr r3, [r3, #28] 29cdc: e3530000 cmp r3, #0 29ce0: 11a00006 movne r0, r6 29ce4: 11a0e00f movne lr, pc 29ce8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 29cec: eb0064bf bl 42ff0 <__errno> 29cf0: e3a03012 mov r3, #18 29cf4: e5803000 str r3, [r0] 29cf8: e3e05000 mvn r5, #0 29cfc: eaffffb6 b 29bdc 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 ); 29d00: e59d3024 ldr r3, [sp, #36] ; 0x24 29d04: e3530000 cmp r3, #0 29d08: 0a000004 beq 29d20 29d0c: e593301c ldr r3, [r3, #28] 29d10: e3530000 cmp r3, #0 29d14: 11a00004 movne r0, r4 29d18: 11a0e00f movne lr, pc 29d1c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 29d20: eb0064b2 bl 42ff0 <__errno> 29d24: e5805000 str r5, [r0] 29d28: e3e05000 mvn r5, #0 29d2c: eaffffaa b 29bdc */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 29d30: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 29d34: e3530000 cmp r3, #0 <== NOT EXECUTED 29d38: 0a000004 beq 29d50 <== NOT EXECUTED 29d3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 29d40: e3530000 cmp r3, #0 <== NOT EXECUTED 29d44: 11a00004 movne r0, r4 <== NOT EXECUTED 29d48: 11a0e00f movne lr, pc <== NOT EXECUTED 29d4c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 29d50: eb0064a6 bl 42ff0 <__errno> <== NOT EXECUTED 29d54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 29d58: e5803000 str r3, [r0] <== NOT EXECUTED 29d5c: eaffff9d b 29bd8 <== 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 ); 29d60: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 29d64: e3530000 cmp r3, #0 <== NOT EXECUTED 29d68: 0a000006 beq 29d88 <== NOT EXECUTED 29d6c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 29d70: e3530000 cmp r3, #0 <== NOT EXECUTED 29d74: 0a000003 beq 29d88 <== NOT EXECUTED 29d78: e1a00004 mov r0, r4 <== NOT EXECUTED 29d7c: e1a0e00f mov lr, pc <== NOT EXECUTED 29d80: e12fff13 bx r3 <== NOT EXECUTED 29d84: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 29d88: e3520000 cmp r2, #0 <== NOT EXECUTED 29d8c: 0a000004 beq 29da4 <== NOT EXECUTED 29d90: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 29d94: e3530000 cmp r3, #0 <== NOT EXECUTED 29d98: 11a00006 movne r0, r6 <== NOT EXECUTED 29d9c: 11a0e00f movne lr, pc <== NOT EXECUTED 29da0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 29da4: eb006491 bl 42ff0 <__errno> <== NOT EXECUTED 29da8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 29dac: e5803000 str r3, [r0] <== NOT EXECUTED 29db0: e3e05000 mvn r5, #0 <== NOT EXECUTED 29db4: eaffff88 b 29bdc <== NOT EXECUTED =============================================================================== 00019bb0 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 19bb0: e59fc134 ldr ip, [pc, #308] ; 19cec 19bb4: e59cc000 ldr ip, [ip] 19bb8: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 19bbc: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 19bc0: 2a00003d bcs 19cbc iop = rtems_libio_iop( fd ); 19bc4: e59fc124 ldr ip, [pc, #292] ; 19cf0 19bc8: e59c4000 ldr r4, [ip] 19bcc: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 19bd0: e5940014 ldr r0, [r4, #20] 19bd4: e3100c01 tst r0, #256 ; 0x100 19bd8: 0a000037 beq 19cbc /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 19bdc: e594c03c ldr ip, [r4, #60] ; 0x3c 19be0: e59c0014 ldr r0, [ip, #20] 19be4: e3500000 cmp r0, #0 19be8: 0a000039 beq 19cd4 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 19bec: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 19bf0: e284600c add r6, r4, #12 19bf4: e8960060 ldm r6, {r5, r6} switch ( whence ) { 19bf8: 0a00002a beq 19ca8 19bfc: e3530002 cmp r3, #2 19c00: 0a00000d beq 19c3c 19c04: e3530000 cmp r3, #0 19c08: 1a00001e bne 19c88 case SEEK_SET: iop->offset = offset; 19c0c: e584100c str r1, [r4, #12] 19c10: 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 ); 19c14: e1a00004 mov r0, r4 19c18: e1a0e00f mov lr, pc 19c1c: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 19c20: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 19c24: e1a02000 mov r2, r0 19c28: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 19c2c: 0a00000e beq 19c6c /* * So if the operation failed, we have to restore iop->offset. */ return status; } 19c30: e1a01003 mov r1, r3 19c34: e1a00002 mov r0, r2 19c38: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 19c3c: e9940180 ldmib r4, {r7, r8} 19c40: e0977001 adds r7, r7, r1 19c44: e0a88002 adc r8, r8, r2 19c48: e584700c str r7, [r4, #12] 19c4c: 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 ); 19c50: e1a00004 mov r0, r4 19c54: e1a0e00f mov lr, pc 19c58: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 19c5c: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 19c60: e1a02000 mov r2, r0 19c64: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 19c68: 1afffff0 bne 19c30 19c6c: e3710001 cmn r1, #1 19c70: 1affffee bne 19c30 iop->offset = old_offset; 19c74: e584500c str r5, [r4, #12] 19c78: e5846010 str r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 19c7c: e1a01003 mov r1, r3 19c80: e1a00002 mov r0, r2 19c84: 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 ); 19c88: ebffd18c bl e2c0 <__errno> 19c8c: e3a03016 mov r3, #22 19c90: e5803000 str r3, [r0] 19c94: e3e02000 mvn r2, #0 19c98: e3e03000 mvn r3, #0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 19c9c: e1a01003 mov r1, r3 19ca0: e1a00002 mov r0, r2 19ca4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 19ca8: e0917005 adds r7, r1, r5 19cac: e0a28006 adc r8, r2, r6 19cb0: e584700c str r7, [r4, #12] 19cb4: e5848010 str r8, [r4, #16] break; 19cb8: eaffffd5 b 19c14 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 19cbc: ebffd17f bl e2c0 <__errno> <== NOT EXECUTED 19cc0: e3a03009 mov r3, #9 <== NOT EXECUTED 19cc4: e5803000 str r3, [r0] <== NOT EXECUTED 19cc8: e3e02000 mvn r2, #0 <== NOT EXECUTED 19ccc: e3e03000 mvn r3, #0 <== NOT EXECUTED 19cd0: eaffffd6 b 19c30 <== 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 ); 19cd4: ebffd179 bl e2c0 <__errno> <== NOT EXECUTED 19cd8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 19cdc: e5803000 str r3, [r0] <== NOT EXECUTED 19ce0: e3e02000 mvn r2, #0 <== NOT EXECUTED 19ce4: e3e03000 mvn r3, #0 <== NOT EXECUTED 19ce8: eaffffd0 b 19c30 <== NOT EXECUTED =============================================================================== 00029f1c : int _STAT_NAME( const char *path, struct stat *buf ) { 29f1c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 29f20: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 29f24: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 29f28: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 29f2c: 0a00002f beq 29ff0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 29f30: eb007f2b bl 49be4 <== NOT EXECUTED 29f34: e28d4004 add r4, sp, #4 <== NOT EXECUTED 29f38: e3a0c000 mov ip, #0 <== NOT EXECUTED 29f3c: e1a01000 mov r1, r0 <== NOT EXECUTED 29f40: e1a0200c mov r2, ip <== NOT EXECUTED 29f44: e1a00006 mov r0, r6 <== NOT EXECUTED 29f48: e1a03004 mov r3, r4 <== NOT EXECUTED 29f4c: e58dc000 str ip, [sp] <== NOT EXECUTED 29f50: ebff7764 bl 7ce8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 29f54: e2501000 subs r1, r0, #0 <== NOT EXECUTED 29f58: 1a000022 bne 29fe8 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 29f5c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 29f60: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 29f64: e3530000 cmp r3, #0 <== NOT EXECUTED 29f68: 0a000013 beq 29fbc <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 29f6c: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 29f70: e1a00005 mov r0, r5 <== NOT EXECUTED 29f74: eb007154 bl 464cc <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 29f78: e1a01005 mov r1, r5 <== NOT EXECUTED 29f7c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 29f80: e1a00004 mov r0, r4 <== NOT EXECUTED 29f84: e1a0e00f mov lr, pc <== NOT EXECUTED 29f88: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 29f8c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 29f90: 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 ); 29f94: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 29f98: 0a000004 beq 29fb0 <== NOT EXECUTED 29f9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 29fa0: e3530000 cmp r3, #0 <== NOT EXECUTED 29fa4: 11a00004 movne r0, r4 <== NOT EXECUTED 29fa8: 11a0e00f movne lr, pc <== NOT EXECUTED 29fac: 112fff13 bxne r3 <== NOT EXECUTED return status; } 29fb0: e1a00005 mov r0, r5 <== NOT EXECUTED 29fb4: e28dd018 add sp, sp, #24 <== NOT EXECUTED 29fb8: 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 ); 29fbc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 29fc0: e3530000 cmp r3, #0 <== NOT EXECUTED 29fc4: 0a000004 beq 29fdc <== NOT EXECUTED 29fc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 29fcc: e3530000 cmp r3, #0 <== NOT EXECUTED 29fd0: 11a00004 movne r0, r4 <== NOT EXECUTED 29fd4: 11a0e00f movne lr, pc <== NOT EXECUTED 29fd8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 29fdc: eb006403 bl 42ff0 <__errno> <== NOT EXECUTED 29fe0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 29fe4: e5803000 str r3, [r0] <== NOT EXECUTED 29fe8: e3e05000 mvn r5, #0 <== NOT EXECUTED 29fec: eaffffef b 29fb0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 29ff0: eb0063fe bl 42ff0 <__errno> <== NOT EXECUTED 29ff4: e3a0300e mov r3, #14 <== NOT EXECUTED 29ff8: e5803000 str r3, [r0] <== NOT EXECUTED 29ffc: e3e05000 mvn r5, #0 <== NOT EXECUTED 2a000: eaffffea b 29fb0 <== 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: eb00135a bl 71c4 <_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: eb002f76 bl e2c0 <__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: ea000f71 b 60bc <_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: eb000f7f bl 610c <_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) =============================================================================== 0000c638 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { c638: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); c63c: e2504000 subs r4, r0, #0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { c640: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( block_table ); c644: 0a000014 beq c69c * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i c654: e3a05000 mov r5, #0 c658: e1a06005 mov r6, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; c65c: e1a0a005 mov sl, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); c66c: ebffff50 bl c3b4 b[i] = 0; c670: 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 c684: 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 ); c688: e1a00007 mov r0, r7 c68c: ebffff48 bl c3b4 *block_table = 0; c690: e3a03000 mov r3, #0 c694: e5843000 str r3, [r4] } c698: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); c69c: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED c6a0: e2811003 add r1, r1, #3 <== NOT EXECUTED c6a4: e59f0008 ldr r0, [pc, #8] ; c6b4 <== NOT EXECUTED c6a8: e59f2008 ldr r2, [pc, #8] ; c6b8 <== NOT EXECUTED c6ac: e59f3008 ldr r3, [pc, #8] ; c6bc <== NOT EXECUTED c6b0: ebfff927 bl ab54 <__assert_func> <== NOT EXECUTED =============================================================================== 0000cb90 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { cb90: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; cb94: 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 ) cb98: e5943054 ldr r3, [r4, #84] ; 0x54 cb9c: e1530002 cmp r3, r2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { cba0: 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 ) cba4: ba00000e blt cbe4 cba8: 0a00000a beq cbd8 * 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; cbac: e5841050 str r1, [r4, #80] ; 0x50 cbb0: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; cbb4: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); cbb8: e3a01000 mov r1, #0 cbbc: e1a0000d mov r0, sp cbc0: ebffd561 bl 214c cbc4: e59d3000 ldr r3, [sp] cbc8: e5843040 str r3, [r4, #64] ; 0x40 cbcc: e3a00000 mov r0, #0 return 0; } cbd0: e28dd008 add sp, sp, #8 cbd4: 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 ) cbd8: e5943050 ldr r3, [r4, #80] ; 0x50 cbdc: e1530001 cmp r3, r1 cbe0: 2afffff1 bcs cbac return IMFS_memfile_extend( the_jnode, length ); cbe4: e1a00004 mov r0, r4 <== NOT EXECUTED cbe8: ebffff87 bl ca0c <== NOT EXECUTED cbec: eafffff7 b cbd0 <== NOT EXECUTED =============================================================================== 0000cbf0 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { cbf0: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; cbf4: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { cbf8: e595304c ldr r3, [r5, #76] ; 0x4c cbfc: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { cc00: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { cc04: 0a00000d beq cc40 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 )) cc08: e1a00005 mov r0, r5 cc0c: e284200c add r2, r4, #12 cc10: e8920006 ldm r2, {r1, r2} cc14: ebffff7c bl ca0c cc18: e3500000 cmp r0, #0 cc1c: 1a00001a bne cc8c rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; cc20: e2853050 add r3, r5, #80 ; 0x50 cc24: e893000c ldm r3, {r2, r3} cc28: e984000c stmib r4, {r2, r3} cc2c: e284300c add r3, r4, #12 cc30: e893000c ldm r3, {r2, r3} } return iop->offset; } cc34: e1a01003 mov r1, r3 cc38: e1a00002 mov r0, r2 cc3c: 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) cc40: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED cc44: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED cc48: e893000c ldm r3, {r2, r3} <== NOT EXECUTED cc4c: e1510003 cmp r1, r3 <== NOT EXECUTED cc50: e590000c ldr r0, [r0, #12] <== NOT EXECUTED cc54: ca000007 bgt cc78 <== NOT EXECUTED cc58: 0a000004 beq cc70 <== NOT EXECUTED cc5c: e1a02000 mov r2, r0 <== NOT EXECUTED cc60: e1a03001 mov r3, r1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } cc64: e1a01003 mov r1, r3 <== NOT EXECUTED cc68: e1a00002 mov r0, r2 <== NOT EXECUTED cc6c: 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) cc70: e1500002 cmp r0, r2 <== NOT EXECUTED cc74: 9afffff8 bls cc5c <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; cc78: e584200c str r2, [r4, #12] <== NOT EXECUTED cc7c: 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; } cc80: e1a01003 mov r1, r3 <== NOT EXECUTED cc84: e1a00002 mov r0, r2 <== NOT EXECUTED cc88: 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 ); cc8c: eb00058b bl e2c0 <__errno> <== NOT EXECUTED cc90: e3a0301c mov r3, #28 <== NOT EXECUTED cc94: e5803000 str r3, [r0] <== NOT EXECUTED cc98: e3e02000 mvn r2, #0 <== NOT EXECUTED cc9c: e3e03000 mvn r3, #0 <== NOT EXECUTED cca0: eaffffe3 b cc34 <== NOT EXECUTED =============================================================================== 0000cf68 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { cf68: 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)) cf6c: e5903014 ldr r3, [r0, #20] cf70: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { cf74: e24dd004 sub sp, sp, #4 cf78: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; cf7c: e5905038 ldr r5, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) cf80: 0a000002 beq cf90 && (the_jnode->type == IMFS_LINEAR_FILE)) { cf84: e595204c ldr r2, [r5, #76] ; 0x4c cf88: e3520006 cmp r2, #6 cf8c: 0a00000b beq cfc0 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) cf90: e5952050 ldr r2, [r5, #80] ; 0x50 cf94: e5951054 ldr r1, [r5, #84] ; 0x54 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) cf98: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; cf9c: 1584200c strne r2, [r4, #12] cfa0: 15841010 strne r1, [r4, #16] cfa4: 15951054 ldrne r1, [r5, #84] ; 0x54 cfa8: 15952050 ldrne r2, [r5, #80] ; 0x50 iop->size = the_jnode->info.file.size; cfac: e5841008 str r1, [r4, #8] cfb0: e5842004 str r2, [r4, #4] cfb4: e3a00000 mov r0, #0 return 0; } cfb8: e28dd004 add sp, sp, #4 cfbc: 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; cfc0: 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; cfc4: 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; cfc8: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; cfcc: e3a01000 mov r1, #0 <== NOT EXECUTED cfd0: 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) cfd4: 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; cfd8: 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; cfdc: 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; cfe0: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; cfe4: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED cfe8: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; cfec: 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; cff0: 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) cff4: 1a000004 bne d00c <== NOT EXECUTED cff8: e1a0b001 mov fp, r1 <== NOT EXECUTED cffc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED d000: e1a01002 mov r1, r2 <== NOT EXECUTED d004: e1a0200b mov r2, fp <== NOT EXECUTED d008: eaffffe2 b cf98 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) d00c: e1a00005 mov r0, r5 <== NOT EXECUTED d010: e58dc000 str ip, [sp] <== NOT EXECUTED d014: ebffff22 bl cca4 <== 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) d018: e3700001 cmn r0, #1 <== NOT EXECUTED d01c: 0affffe5 beq cfb8 <== NOT EXECUTED d020: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED d024: eaffffd9 b cf90 <== 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: eb002f5a bl e2c0 <__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: eb002f24 bl e2c0 <__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: eb0022ad bl b1a8 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: eb0032ee bl f2d4 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: eb0032eb bl f2d4 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: eb0032e5 bl f2d4 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: eb003288 bl f194 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: eb003281 bl f194 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: eb00327c bl f194 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: eb000e23 bl 60bc <_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: eb002e5f bl e2c0 <__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: eb002e55 bl e2c0 <__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: eb002e44 bl e2c0 <__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: eb002e3d bl e2c0 <__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: eb002e39 bl e2c0 <__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: eb002e35 bl e2c0 <__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 =============================================================================== 00035ecc : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 35ecc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 35ed0: e24dd0ac sub sp, sp, #172 ; 0xac <== NOT EXECUTED 35ed4: 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); 35ed8: 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; 35edc: 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; 35ee0: 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); 35ee4: 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; 35ee8: 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); 35eec: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 35ef0: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 35ef4: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 35ef8: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 35efc: e48c4004 str r4, [ip], #4 <== NOT EXECUTED 35f00: e58d4074 str r4, [sp, #116] ; 0x74 <== NOT EXECUTED 35f04: e58c4000 str r4, [ip] <== NOT EXECUTED 35f08: 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) { 35f0c: 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; 35f10: e3e03000 mvn r3, #0 <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 35f14: 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; 35f18: 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); 35f1c: 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; 35f20: 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; 35f24: 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) { 35f28: e1a07002 mov r7, r2 <== NOT EXECUTED 35f2c: 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); 35f30: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED 35f34: e1a01004 mov r1, r4 <== NOT EXECUTED 35f38: 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; 35f3c: e58d300c str r3, [sp, #12] <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 35f40: e58d40a4 str r4, [sp, #164] ; 0xa4 <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 35f44: e1cd4aba strh r4, [sp, #170] ; 0xaa <== NOT EXECUTED uint16_t date = 0; 35f48: 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; 35f4c: e58d4094 str r4, [sp, #148] ; 0x94 <== NOT EXECUTED dir_pos->sname.ofs = 0; 35f50: 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); 35f54: eb00415c bl 464cc <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 35f58: e1a01008 mov r1, r8 <== NOT EXECUTED 35f5c: e1a02005 mov r2, r5 <== NOT EXECUTED 35f60: e3a0300b mov r3, #11 <== NOT EXECUTED 35f64: e1a00007 mov r0, r7 <== NOT EXECUTED 35f68: eb000811 bl 37fb4 <== NOT EXECUTED 35f6c: 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); 35f70: 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; 35f74: e5cd4080 strb r4, [sp, #128] ; 0x80 <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 35f78: eb00638e bl 4edb8