00007f48 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 7f48: e5903000 ldr r3, [r0] 7f4c: 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; 7f50: e5902010 ldr r2, [r0, #16] switch( node->type ) { 7f54: 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; 7f58: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 7f5c: e3530006 cmp r3, #6 7f60: 979ff103 ldrls pc, [pc, r3, lsl #2] 7f64: ea000008 b 7f8c <== NOT EXECUTED 7f68: 00007fb4 .word 0x00007fb4 <== NOT EXECUTED 7f6c: 00007fc4 .word 0x00007fc4 <== NOT EXECUTED 7f70: 00007fa4 .word 0x00007fa4 <== NOT EXECUTED 7f74: 00007fa4 .word 0x00007fa4 <== NOT EXECUTED 7f78: 00007f94 .word 0x00007f94 <== NOT EXECUTED 7f7c: 00007f94 .word 0x00007f94 <== NOT EXECUTED 7f80: 00007f84 .word 0x00007f84 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 7f84: e59f3048 ldr r3, [pc, #72] ; 7fd4 7f88: e5803008 str r3, [r0, #8] break; } return 0; } 7f8c: e3a00000 mov r0, #0 7f90: 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; 7f94: e5923004 ldr r3, [r2, #4] 7f98: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 7f9c: e3a00000 mov r0, #0 7fa0: 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; 7fa4: e59f302c ldr r3, [pc, #44] ; 7fd8 7fa8: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 7fac: e3a00000 mov r0, #0 7fb0: 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; 7fb4: e5923008 ldr r3, [r2, #8] 7fb8: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 7fbc: e3a00000 mov r0, #0 7fc0: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 7fc4: e59f3010 ldr r3, [pc, #16] ; 7fdc 7fc8: e5803008 str r3, [r0, #8] loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 7fcc: e3a00000 mov r0, #0 7fd0: e12fff1e bx lr 7fd4: 00018448 .word 0x00018448 7fd8: 000184d8 .word 0x000184d8 7fdc: 000184a0 .word 0x000184a0 0000b394 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b394: 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 ) b398: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b39c: e1a05001 mov r5, r1 b3a0: e59d6014 ldr r6, [sp, #20] b3a4: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) b3a8: 01a07004 moveq r7, r4 b3ac: 1a000001 bne b3b8 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } b3b0: e1a00007 mov r0, r7 <== NOT EXECUTED b3b4: 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 ); b3b8: e59f210c ldr r2, [pc, #268] ; b4cc b3bc: e5922000 ldr r2, [r2] b3c0: e592202c ldr r2, [r2, #44] ; 0x2c b3c4: e1a00005 mov r0, r5 b3c8: e1c32002 bic r2, r3, r2 b3cc: ebffffc1 bl b2d8 if ( !node ) b3d0: e2507000 subs r7, r0, #0 b3d4: 0afffff5 beq b3b0 return NULL; /* * Set the type specific information */ switch (type) { b3d8: e2455001 sub r5, r5, #1 b3dc: e3550006 cmp r5, #6 b3e0: 979ff105 ldrls pc, [pc, r5, lsl #2] b3e4: ea000033 b b4b8 <== NOT EXECUTED b3e8: 0000b49c .word 0x0000b49c <== NOT EXECUTED b3ec: 0000b488 .word 0x0000b488 <== NOT EXECUTED b3f0: 0000b404 .word 0x0000b404 <== NOT EXECUTED b3f4: 0000b404 .word 0x0000b404 <== NOT EXECUTED b3f8: 0000b458 .word 0x0000b458 <== NOT EXECUTED b3fc: 0000b440 .word 0x0000b440 <== NOT EXECUTED b400: 0000b47c .word 0x0000b47c <== 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; b404: e5963000 ldr r3, [r6] b408: 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; b40c: e5943010 ldr r3, [r4, #16] b410: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; b414: e5923000 ldr r3, [r2] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; b418: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; b41c: e2833001 add r3, r3, #1 b420: e5823000 str r3, [r2] * 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; b424: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; b428: e5873038 str r3, [r7, #56] ; 0x38 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); b42c: e2800050 add r0, r0, #80 ; 0x50 b430: e1a01007 mov r1, r7 b434: ebffe722 bl 50c4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } b438: e1a00007 mov r0, r7 b43c: 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; b440: e3a03000 mov r3, #0 <== NOT EXECUTED b444: e3a02000 mov r2, #0 <== NOT EXECUTED b448: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED b44c: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; b450: e3a03000 mov r3, #0 <== NOT EXECUTED b454: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; b458: 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; b45c: e3a01000 mov r1, #0 b460: e3a02000 mov r2, #0 b464: e5871050 str r1, [r7, #80] ; 0x50 b468: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; b46c: 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; b470: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; b474: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; b478: eaffffe3 b b40c case IMFS_FIFO: node->info.fifo.pipe = NULL; b47c: e3a03000 mov r3, #0 b480: e5873050 str r3, [r7, #80] ; 0x50 break; b484: eaffffe0 b b40c 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; b488: 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; b48c: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; b490: 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; b494: e5873050 str r3, [r7, #80] ; 0x50 node->info.device.minor = info->device.minor; break; b498: eaffffdb b b40c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b49c: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); b4a0: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b4a4: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; b4a8: e3a02000 mov r2, #0 b4ac: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); b4b0: e5873058 str r3, [r7, #88] ; 0x58 b4b4: eaffffd4 b b40c case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); b4b8: e59f0010 ldr r0, [pc, #16] ; b4d0 <== NOT EXECUTED b4bc: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED b4c0: e59f200c ldr r2, [pc, #12] ; b4d4 <== NOT EXECUTED b4c4: e59f300c ldr r3, [pc, #12] ; b4d8 <== NOT EXECUTED b4c8: ebfff67a bl 8eb8 <__assert_func> <== NOT EXECUTED b4cc: 00017ce8 .word 0x00017ce8 b4d0: 00018cf8 .word 0x00018cf8 b4d4: 000185e8 .word 0x000185e8 b4d8: 00018a90 .word 0x00018a90 00002e2c : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2e2c: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2e30: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2e34: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2e38: 0a000021 beq 2ec4 assert( level >= 0 ); 2e3c: e3510000 cmp r1, #0 2e40: ba000029 blt 2eec assert( the_directory->type == IMFS_DIRECTORY ); 2e44: e590304c ldr r3, [r0, #76] ; 0x4c 2e48: e3530001 cmp r3, #1 2e4c: 1a000021 bne 2ed8 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2e50: e5907050 ldr r7, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2e54: e2808054 add r8, r0, #84 ; 0x54 2e58: e1570008 cmp r7, r8 2e5c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} 2e60: e59f6098 ldr r6, [pc, #152] ; 2f00 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 ); 2e64: 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; 2e68: e3a04000 mov r4, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2e6c: 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++ ) 2e70: e2844001 add r4, r4, #1 fprintf(stdout, "...." ); 2e74: e5933008 ldr r3, [r3, #8] 2e78: e59f0084 ldr r0, [pc, #132] ; 2f04 2e7c: e3a01001 mov r1, #1 2e80: e3a02004 mov r2, #4 2e84: eb003ba8 bl 11d2c !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++ ) 2e88: e1550004 cmp r5, r4 2e8c: aafffff6 bge 2e6c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2e90: e1a00007 mov r0, r7 2e94: ebffff7a bl 2c84 if ( the_jnode->type == IMFS_DIRECTORY ) 2e98: e597304c ldr r3, [r7, #76] ; 0x4c 2e9c: e3530001 cmp r3, #1 2ea0: 0a000003 beq 2eb4 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 ) { 2ea4: e5977000 ldr r7, [r7] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2ea8: e1570008 cmp r7, r8 2eac: 1affffed bne 2e68 2eb0: 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 ); 2eb4: e1a00007 mov r0, r7 2eb8: e1a0100a mov r1, sl 2ebc: ebffffda bl 2e2c 2ec0: eafffff7 b 2ea4 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2ec4: e59f003c ldr r0, [pc, #60] ; 2f08 <== NOT EXECUTED 2ec8: e3a01084 mov r1, #132 ; 0x84 <== NOT EXECUTED 2ecc: e59f2038 ldr r2, [pc, #56] ; 2f0c <== NOT EXECUTED 2ed0: e59f3038 ldr r3, [pc, #56] ; 2f10 <== NOT EXECUTED 2ed4: eb0001e5 bl 3670 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 2ed8: e59f0028 ldr r0, [pc, #40] ; 2f08 <== NOT EXECUTED 2edc: e3a01088 mov r1, #136 ; 0x88 <== NOT EXECUTED 2ee0: e59f2024 ldr r2, [pc, #36] ; 2f0c <== NOT EXECUTED 2ee4: e59f3028 ldr r3, [pc, #40] ; 2f14 <== NOT EXECUTED 2ee8: eb0001e0 bl 3670 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 2eec: e59f0014 ldr r0, [pc, #20] ; 2f08 <== NOT EXECUTED 2ef0: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 2ef4: e59f2010 ldr r2, [pc, #16] ; 2f0c <== NOT EXECUTED 2ef8: e59f3018 ldr r3, [pc, #24] ; 2f18 <== NOT EXECUTED 2efc: eb0001db bl 3670 <__assert_func> <== NOT EXECUTED 2f00: 00020c00 .word 0x00020c00 2f04: 00022624 .word 0x00022624 2f08: 00022520 .word 0x00022520 2f0c: 0002116c .word 0x0002116c 2f10: 000225e0 .word 0x000225e0 2f14: 000225fc .word 0x000225fc 2f18: 000225f0 .word 0x000225f0 0000815c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 815c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8160: e24dd044 sub sp, sp, #68 ; 0x44 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8164: e5936000 ldr r6, [r3] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8168: e59fb29c ldr fp, [pc, #668] ; 840c const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 816c: e58d2004 str r2, [sp, #4] 8170: e1a07003 mov r7, r3 8174: e1a0a000 mov sl, r0 8178: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 817c: e3a05000 mov r5, #0 8180: e28d8008 add r8, sp, #8 8184: e28d9040 add r9, sp, #64 ; 0x40 * 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 ); 8188: e1a02008 mov r2, r8 818c: e1a03009 mov r3, r9 8190: e08a0005 add r0, sl, r5 8194: e1a01004 mov r1, r4 8198: eb00023c bl 8a90 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 819c: e5972000 ldr r2, [r7] 81a0: e3520000 cmp r2, #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 ); 81a4: e1a03000 mov r3, r0 pathnamelen -= len; 81a8: e59dc040 ldr ip, [sp, #64] ; 0x40 i += len; if ( !pathloc->node_access ) 81ac: 0a00004e beq 82ec rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 81b0: 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; 81b4: e06c4004 rsb r4, ip, r4 i += len; 81b8: e085500c add r5, r5, ip rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 81bc: 1a00000c bne 81f4 * 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 ) { 81c0: e592304c ldr r3, [r2, #76] ; 0x4c 81c4: e3530001 cmp r3, #1 81c8: 0a000054 beq 8320 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 81cc: e1a00007 mov r0, r7 81d0: ebffff5c bl 7f48 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 81d4: e5973000 ldr r3, [r7] /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 81d8: e59d1004 ldr r1, [sp, #4] if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 81dc: e5932030 ldr r2, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 81e0: e1a03301 lsl r3, r1, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 81e4: e0032002 and r2, r3, r2 81e8: e1530002 cmp r3, r2 81ec: 1a000039 bne 82d8 81f0: ea000032 b 82c0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 81f4: e596104c ldr r1, [r6, #76] ; 0x4c 81f8: e3510001 cmp r1, #1 81fc: 11a06002 movne r6, r2 8200: 0a000030 beq 82c8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8204: e3530003 cmp r3, #3 8208: 0a000006 beq 8228 820c: e3530004 cmp r3, #4 8210: 0a000026 beq 82b0 8214: e3530002 cmp r3, #2 8218: 0a000013 beq 826c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 821c: e3530004 cmp r3, #4 8220: 1affffd8 bne 8188 8224: eaffffe5 b 81c0 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8228: e592304c ldr r3, [r2, #76] ; 0x4c 822c: e3530003 cmp r3, #3 8230: 0a000032 beq 8300 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8234: e3530004 cmp r3, #4 8238: 0a000069 beq 83e4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 823c: e3530001 cmp r3, #1 8240: 1a00004d bne 837c /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 8244: e596305c ldr r3, [r6, #92] ; 0x5c 8248: e3530000 cmp r3, #0 824c: 1a00004f bne 8390 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8250: e1a00006 mov r0, r6 8254: e1a01008 mov r1, r8 8258: eb0001dd bl 89d4 if ( !node ) 825c: e2506000 subs r6, r0, #0 8260: 0a000021 beq 82ec /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8264: e5876000 str r6, [r7] break; 8268: eaffffc6 b 8188 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 826c: e59b1000 ldr r1, [fp] 8270: e5911018 ldr r1, [r1, #24] 8274: e1520001 cmp r2, r1 8278: 0affffc2 beq 8188 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 827c: e5971010 ldr r1, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8280: e591001c ldr r0, [r1, #28] 8284: e1520000 cmp r2, r0 8288: 0a00005d beq 8404 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 828c: e5926008 ldr r6, [r2, #8] 8290: e3560000 cmp r6, #0 8294: 1afffff2 bne 8264 rtems_set_errno_and_return_minus_one( ENOENT ); 8298: e58d3000 str r3, [sp] 829c: eb000ff8 bl c284 <__errno> 82a0: e59d3000 ldr r3, [sp] 82a4: e5803000 str r3, [r0] 82a8: e3e00000 mvn r0, #0 82ac: ea000003 b 82c0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 82b0: eb000ff3 bl c284 <__errno> 82b4: e3a0305b mov r3, #91 ; 0x5b 82b8: e5803000 str r3, [r0] 82bc: e3e00000 mvn r0, #0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 82c0: e28dd044 add sp, sp, #68 ; 0x44 82c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 82c8: e5921030 ldr r1, [r2, #48] ; 0x30 82cc: e3110040 tst r1, #64 ; 0x40 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 82d0: e1a06002 mov r6, r2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 82d4: 1affffca bne 8204 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 82d8: eb000fe9 bl c284 <__errno> 82dc: e3a0300d mov r3, #13 82e0: e5803000 str r3, [r0] 82e4: e3e00000 mvn r0, #0 82e8: eafffff4 b 82c0 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 82ec: eb000fe4 bl c284 <__errno> 82f0: e3a03002 mov r3, #2 82f4: e5803000 str r3, [r0] 82f8: e3e00000 mvn r0, #0 82fc: eaffffef b 82c0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 8300: e1a00007 mov r0, r7 8304: e3a01000 mov r1, #0 8308: ebffff3c bl 8000 node = pathloc->node_access; 830c: e5976000 ldr r6, [r7] if ( !node ) 8310: e3560000 cmp r6, #0 8314: 0a000018 beq 837c } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8318: e596304c ldr r3, [r6, #76] ; 0x4c 831c: eaffffc6 b 823c * * 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 ) { 8320: e592805c ldr r8, [r2, #92] ; 0x5c 8324: e3580000 cmp r8, #0 8328: 0affffa7 beq 81cc newloc = node->info.directory.mt_fs->mt_fs_root; 832c: e288801c add r8, r8, #28 8330: e8b8000f ldm r8!, {r0, r1, r2, r3} 8334: e28d602c add r6, sp, #44 ; 0x2c 8338: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; 833c: e28de02c add lr, sp, #44 ; 0x2c 8340: e8be000f ldm lr!, {r0, r1, r2, r3} * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8344: e598e000 ldr lr, [r8] *pathloc = newloc; 8348: e1a08007 mov r8, r7 834c: e8a8000f stmia r8!, {r0, r1, r2, r3} 8350: e588e000 str lr, [r8] * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8354: e586e000 str lr, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8358: e06c0005 rsb r0, ip, r5 835c: e084100c add r1, r4, ip 8360: e08a0000 add r0, sl, r0 8364: e59d2004 ldr r2, [sp, #4] 8368: e1a03007 mov r3, r7 836c: e597c00c ldr ip, [r7, #12] 8370: e1a0e00f mov lr, pc 8374: e59cf000 ldr pc, [ip] 8378: eaffffd0 b 82c0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 837c: eb000fc0 bl c284 <__errno> 8380: e3a03014 mov r3, #20 8384: e5803000 str r3, [r0] 8388: e3e00000 mvn r0, #0 838c: eaffffcb b 82c0 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8390: e283601c add r6, r3, #28 8394: e8b6000f ldm r6!, {r0, r1, r2, r3} 8398: e28de02c add lr, sp, #44 ; 0x2c 839c: e8ae000f stmia lr!, {r0, r1, r2, r3} *pathloc = newloc; 83a0: e28dc02c add ip, sp, #44 ; 0x2c 83a4: e8bc000f ldm ip!, {r0, r1, r2, r3} * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 83a8: e596c000 ldr ip, [r6] *pathloc = newloc; 83ac: e1a06007 mov r6, r7 83b0: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 83b4: e59d1040 ldr r1, [sp, #64] ; 0x40 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 83b8: e586c000 str ip, [r6] * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 83bc: e58ec000 str ip, [lr] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 83c0: e0610005 rsb r0, r1, r5 83c4: e08a0000 add r0, sl, r0 83c8: e0841001 add r1, r4, r1 83cc: e59d2004 ldr r2, [sp, #4] 83d0: e1a03007 mov r3, r7 83d4: e597c00c ldr ip, [r7, #12] 83d8: e1a0e00f mov lr, pc 83dc: e59cf000 ldr pc, [ip] 83e0: eaffffb6 b 82c0 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 83e4: e1a00007 mov r0, r7 83e8: e3a01000 mov r1, #0 83ec: ebffff1d bl 8068 node = pathloc->node_access; if ( result == -1 ) 83f0: e3700001 cmn r0, #1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 83f4: e5976000 ldr r6, [r7] if ( result == -1 ) 83f8: 0affffb0 beq 82c0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 83fc: e596304c ldr r3, [r6, #76] ; 0x4c 8400: eaffff8d b 823c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8404: e2818008 add r8, r1, #8 8408: eaffffc8 b 8330 840c: 00017ce8 .word 0x00017ce8 000084e4 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 84e4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 84e8: e24dd040 sub sp, sp, #64 ; 0x40 84ec: e1a07001 mov r7, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 84f0: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 84f4: e58d2000 str r2, [sp] 84f8: e1a0a000 mov sl, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 84fc: eb001351 bl d248 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8500: e59fb290 ldr fp, [pc, #656] ; 8798 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8504: e3a06000 mov r6, #0 8508: e28d8004 add r8, sp, #4 850c: e28d903c add r9, sp, #60 ; 0x3c 8510: 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 ); 8514: e1a01004 mov r1, r4 8518: e1a03009 mov r3, r9 851c: e08a0006 add r0, sl, r6 8520: e1a02008 mov r2, r8 8524: eb000159 bl 8a90 pathlen -= len; i += len; if ( !pathloc->node_access ) 8528: e5973000 ldr r3, [r7] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 852c: e59dc03c ldr ip, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8530: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8534: e06c4004 rsb r4, ip, r4 i += len; if ( !pathloc->node_access ) 8538: 0a000038 beq 8620 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 853c: e3500000 cmp r0, #0 8540: 1a000005 bne 855c pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8544: eb000f4e bl c284 <__errno> 8548: e3a03011 mov r3, #17 854c: e5803000 str r3, [r0] 8550: e3e00000 mvn r0, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8554: e28dd040 add sp, sp, #64 ; 0x40 8558: 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 ) 855c: e595204c ldr r2, [r5, #76] ; 0x4c 8560: e3520001 cmp r2, #1 8564: 11a05003 movne r5, r3 8568: 0a000031 beq 8634 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 856c: e086600c add r6, r6, ip if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8570: e3500004 cmp r0, #4 8574: 979ff100 ldrls pc, [pc, r0, lsl #2] 8578: eaffffe5 b 8514 <== NOT EXECUTED 857c: 00008544 .word 0x00008544 <== NOT EXECUTED 8580: 00008514 .word 0x00008514 <== NOT EXECUTED 8584: 000085f4 .word 0x000085f4 <== NOT EXECUTED 8588: 000085a4 .word 0x000085a4 <== NOT EXECUTED 858c: 00008590 .word 0x00008590 <== 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 ); 8590: eb000f3b bl c284 <__errno> 8594: e3a0305b mov r3, #91 ; 0x5b 8598: e5803000 str r3, [r0] 859c: e3e00000 mvn r0, #0 85a0: eaffffeb b 8554 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 85a4: e593304c ldr r3, [r3, #76] ; 0x4c 85a8: e3530003 cmp r3, #3 85ac: 0a000065 beq 8748 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 85b0: e3530004 cmp r3, #4 85b4: 0a000063 beq 8748 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 85b8: e3550000 cmp r5, #0 85bc: 0a000048 beq 86e4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 85c0: e595304c ldr r3, [r5, #76] ; 0x4c 85c4: e3530001 cmp r3, #1 85c8: 1a000045 bne 86e4 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 85cc: e595305c ldr r3, [r5, #92] ; 0x5c 85d0: e3530000 cmp r3, #0 85d4: 1a000047 bne 86f8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 85d8: e1a00005 mov r0, r5 85dc: e1a01008 mov r1, r8 85e0: eb0000fb bl 89d4 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 85e4: e2505000 subs r5, r0, #0 85e8: 0a00001a beq 8658 done = true; else pathloc->node_access = node; 85ec: e5875000 str r5, [r7] 85f0: eaffffc7 b 8514 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 85f4: e59b2000 ldr r2, [fp] 85f8: e5922018 ldr r2, [r2, #24] 85fc: e1530002 cmp r3, r2 8600: 0affffc3 beq 8514 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8604: e5975010 ldr r5, [r7, #16] 8608: e595201c ldr r2, [r5, #28] 860c: e1530002 cmp r3, r2 8610: 0a000053 beq 8764 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8614: e5935008 ldr r5, [r3, #8] 8618: e3550000 cmp r5, #0 861c: 1afffff2 bne 85ec * 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 ); 8620: eb000f17 bl c284 <__errno> 8624: e3a03002 mov r3, #2 8628: e5803000 str r3, [r0] 862c: e3e00000 mvn r0, #0 8630: eaffffc7 b 8554 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8634: e5932030 ldr r2, [r3, #48] ; 0x30 8638: e3120040 tst r2, #64 ; 0x40 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 863c: e1a05003 mov r5, r3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8640: 1affffc9 bne 856c /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8644: eb000f0e bl c284 <__errno> 8648: e3a0300d mov r3, #13 864c: e5803000 str r3, [r0] 8650: e3e00000 mvn r0, #0 8654: eaffffbe b 8554 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8658: e59d303c ldr r3, [sp, #60] ; 0x3c 865c: e59d5000 ldr r5, [sp] 8660: e0633006 rsb r3, r3, r6 8664: e08a3003 add r3, sl, r3 8668: e5853000 str r3, [r5] /* * 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++) { 866c: e7da3006 ldrb r3, [sl, r6] 8670: e3530000 cmp r3, #0 8674: 0a00000f beq 86b8 if ( !IMFS_is_separator( path[ i ] ) ) 8678: e353002f cmp r3, #47 ; 0x2f 867c: 1353005c cmpne r3, #92 ; 0x5c 8680: 1affffe6 bne 8620 rtems_set_errno_and_return_minus_one( ENOENT ); 8684: e08a6006 add r6, sl, r6 /* * 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++) { 8688: e5d63001 ldrb r3, [r6, #1] 868c: e3530000 cmp r3, #0 8690: 0a000008 beq 86b8 if ( !IMFS_is_separator( path[ i ] ) ) 8694: e353005c cmp r3, #92 ; 0x5c 8698: 1353002f cmpne r3, #47 ; 0x2f 869c: e2866001 add r6, r6, #1 86a0: 0afffff8 beq 8688 rtems_set_errno_and_return_minus_one( ENOENT ); 86a4: eb000ef6 bl c284 <__errno> 86a8: e3a03002 mov r3, #2 86ac: e5803000 str r3, [r0] 86b0: e3e00000 mvn r0, #0 86b4: eaffffa6 b 8554 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 86b8: e1a00007 mov r0, r7 86bc: ebfffe21 bl 7f48 /* * The returned node must be a directory */ node = pathloc->node_access; 86c0: e5973000 ldr r3, [r7] if ( node->type != IMFS_DIRECTORY ) 86c4: e593204c ldr r2, [r3, #76] ; 0x4c 86c8: e3520001 cmp r2, #1 86cc: 1a000004 bne 86e4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 86d0: e5933030 ldr r3, [r3, #48] ; 0x30 86d4: e20330c0 and r3, r3, #192 ; 0xc0 86d8: e35300c0 cmp r3, #192 ; 0xc0 86dc: 1affffd8 bne 8644 86e0: eaffff9b b 8554 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 86e4: eb000ee6 bl c284 <__errno> 86e8: e3a03014 mov r3, #20 86ec: e5803000 str r3, [r0] 86f0: e3e00000 mvn r0, #0 86f4: eaffff96 b 8554 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 86f8: e283401c add r4, r3, #28 86fc: e8b4000f ldm r4!, {r0, r1, r2, r3} 8700: e28dc028 add ip, sp, #40 ; 0x28 8704: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 8708: e28de028 add lr, sp, #40 ; 0x28 870c: e8be000f ldm lr!, {r0, r1, r2, r3} * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8710: e594e000 ldr lr, [r4] *pathloc = newloc; 8714: e1a04007 mov r4, r7 8718: e8a4000f stmia r4!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 871c: e59d003c ldr r0, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8720: e584e000 str lr, [r4] * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8724: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8728: e0600006 rsb r0, r0, r6 872c: e08a0000 add r0, sl, r0 8730: e1a01007 mov r1, r7 8734: e59d2000 ldr r2, [sp] 8738: e597300c ldr r3, [r7, #12] 873c: e1a0e00f mov lr, pc 8740: e593f004 ldr pc, [r3, #4] 8744: eaffff82 b 8554 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8748: e1a00007 mov r0, r7 874c: e3a01000 mov r1, #0 8750: ebffff2e bl 8410 if ( result == -1 ) 8754: e3700001 cmn r0, #1 8758: 0affff7d beq 8554 875c: e5975000 ldr r5, [r7] 8760: eaffff94 b 85b8 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8764: e2855008 add r5, r5, #8 8768: e8b5000f ldm r5!, {r0, r1, r2, r3} 876c: e28d4028 add r4, sp, #40 ; 0x28 8770: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; 8774: e28de028 add lr, sp, #40 ; 0x28 8778: e8be000f ldm lr!, {r0, r1, r2, r3} if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 877c: e595e000 ldr lr, [r5] *pathloc = newloc; 8780: e1a05007 mov r5, r7 8784: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8788: e06c0006 rsb r0, ip, r6 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 878c: e585e000 str lr, [r5] if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8790: e584e000 str lr, [r4] 8794: eaffffe4 b 872c 8798: 00017ce8 .word 0x00017ce8 00008000 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 8000: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8004: e593204c ldr r2, [r3, #76] ; 0x4c 8008: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 800c: e92d4030 push {r4, r5, lr} 8010: e1a04000 mov r4, r0 8014: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8018: 1a00000f bne 805c /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 801c: e5933050 ldr r3, [r3, #80] ; 0x50 8020: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 8024: ebffffc7 bl 7f48 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8028: e5943000 ldr r3, [r4] 802c: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8030: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8034: e0053003 and r3, r5, r3 8038: e1550003 cmp r5, r3 803c: 0a000004 beq 8054 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8040: eb00108f bl c284 <__errno> <== NOT EXECUTED 8044: e3a0300d mov r3, #13 <== NOT EXECUTED 8048: e5803000 str r3, [r0] <== NOT EXECUTED 804c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8050: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8054: e3a00000 mov r0, #0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8058: e8bd8030 pop {r4, r5, pc} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 805c: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8060: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8064: ebfff35f bl 4de8 <== NOT EXECUTED 00007fe0 : /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7fe0: e5903000 ldr r3, [r0] <== NOT EXECUTED 7fe4: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED 7fe8: e1a01301 lsl r1, r1, #6 <== NOT EXECUTED 7fec: e0013003 and r3, r1, r3 <== NOT EXECUTED return 1; return 0; } 7ff0: e1510003 cmp r1, r3 <== NOT EXECUTED 7ff4: 13a00000 movne r0, #0 <== NOT EXECUTED 7ff8: 03a00001 moveq r0, #1 <== NOT EXECUTED 7ffc: e12fff1e bx lr <== NOT EXECUTED 00008068 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8068: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 806c: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8070: e59e304c ldr r3, [lr, #76] ; 0x4c 8074: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8078: e1a04000 mov r4, r0 807c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8080: 1a000031 bne 814c rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 8084: e59e3008 ldr r3, [lr, #8] 8088: e3530000 cmp r3, #0 808c: 0a00002b beq 8140 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8090: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 8094: e59e2050 ldr r2, [lr, #80] ; 0x50 8098: e5d23000 ldrb r3, [r2] 809c: e353002f cmp r3, #47 ; 0x2f 80a0: 1353005c cmpne r3, #92 ; 0x5c 80a4: 13a06000 movne r6, #0 80a8: 03a06001 moveq r6, #1 80ac: 1a000020 bne 8134 80b0: e59f30a0 ldr r3, [pc, #160] ; 8158 80b4: e593c000 ldr ip, [r3] 80b8: e28cc018 add ip, ip, #24 80bc: e8bc000f ldm ip!, {r0, r1, r2, r3} 80c0: e1a06004 mov r6, r4 80c4: e8a6000f stmia r6!, {r0, r1, r2, r3} 80c8: e59c2000 ldr r2, [ip] 80cc: e5862000 str r2, [r6] 80d0: e59e2050 ldr r2, [lr, #80] ; 0x50 80d4: e3a06001 mov r6, #1 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 80d8: e0826006 add r6, r2, r6 80dc: e1a00006 mov r0, r6 80e0: eb001458 bl d248 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 80e4: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 80e8: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 80ec: e1a03004 mov r3, r4 80f0: e1a00006 mov r0, r6 80f4: eb000018 bl 815c 80f8: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 80fc: e1a00004 mov r0, r4 8100: ebffff90 bl 7f48 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8104: e5943000 ldr r3, [r4] 8108: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 810c: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8110: e0053003 and r3, r5, r3 8114: e1550003 cmp r5, r3 8118: 0a000003 beq 812c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 811c: eb001058 bl c284 <__errno> <== NOT EXECUTED 8120: e3a0300d mov r3, #13 <== NOT EXECUTED 8124: e5803000 str r3, [r0] <== NOT EXECUTED 8128: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 812c: e1a00006 mov r0, r6 8130: e8bd8070 pop {r4, r5, r6, pc} * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8134: e3530000 cmp r3, #0 8138: 1affffe6 bne 80d8 813c: eaffffdb b 80b0 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 8140: e3a004ba mov r0, #-1174405120 ; 0xba000000 <== NOT EXECUTED 8144: e280060d add r0, r0, #13631488 ; 0xd00000 <== NOT EXECUTED 8148: ebfff326 bl 4de8 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 814c: e3a0032b mov r0, #-1409286144 ; 0xac000000 <== NOT EXECUTED 8150: e2400833 sub r0, r0, #3342336 ; 0x330000 <== NOT EXECUTED 8154: ebfff323 bl 4de8 <== NOT EXECUTED 8158: 00017ce8 .word 0x00017ce8 00008928 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8928: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 892c: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8930: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8934: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8938: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 893c: eb000929 bl ade8 <== NOT EXECUTED if (! err) { 8940: e2506000 subs r6, r0, #0 <== NOT EXECUTED 8944: 0a000002 beq 8954 <== 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); 8948: ba00000e blt 8988 <== NOT EXECUTED } 894c: e1a00006 mov r0, r6 <== NOT EXECUTED 8950: 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; 8954: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 8958: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 895c: 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) 8960: e1a00005 mov r0, r5 <== NOT EXECUTED 8964: eb00023a bl 9254 <== NOT EXECUTED 8968: e3500000 cmp r0, #0 <== NOT EXECUTED 896c: 1afffff6 bne 894c <== NOT EXECUTED 8970: e1d533b4 ldrh r3, [r5, #52] ; 0x34 <== NOT EXECUTED 8974: e3530000 cmp r3, #0 <== NOT EXECUTED 8978: 1afffff3 bne 894c <== NOT EXECUTED free(jnode); 897c: e1a00005 mov r0, r5 <== NOT EXECUTED 8980: eb00019a bl 8ff0 <== NOT EXECUTED 8984: eafffff0 b 894c <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 8988: eb000e3d bl c284 <__errno> <== NOT EXECUTED 898c: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 8990: e5806000 str r6, [r0] <== NOT EXECUTED 8994: e3e06000 mvn r6, #0 <== NOT EXECUTED 8998: eaffffeb b 894c <== NOT EXECUTED 000087f4 : void *buffer ) { int err; if (command == FIONBIO) { 87f4: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED 87f8: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED 87fc: e283313a add r3, r3, #-2147483634 ; 0x8000000e <== NOT EXECUTED 8800: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8804: e92d4010 push {r4, lr} <== NOT EXECUTED 8808: e1a03002 mov r3, r2 <== NOT EXECUTED int err; if (command == FIONBIO) { 880c: 0a00000a beq 883c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8810: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED 8814: e1a03000 mov r3, r0 <== NOT EXECUTED 8818: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 881c: eb00086a bl a9cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8820: e3500000 cmp r0, #0 <== NOT EXECUTED 8824: a8bd8010 popge {r4, pc} <== NOT EXECUTED 8828: e2604000 rsb r4, r0, #0 <== NOT EXECUTED 882c: eb000e94 bl c284 <__errno> <== NOT EXECUTED 8830: e5804000 str r4, [r0] <== NOT EXECUTED 8834: e3e00000 mvn r0, #0 <== NOT EXECUTED } 8838: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 883c: e3520000 cmp r2, #0 <== NOT EXECUTED 8840: 03a0400e moveq r4, #14 <== NOT EXECUTED 8844: 0afffff8 beq 882c <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8848: e5924000 ldr r4, [r2] <== NOT EXECUTED 884c: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8850: 15903014 ldrne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8854: 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; 8858: 13833001 orrne r3, r3, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 885c: 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; 8860: 15803014 strne r3, [r0, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8864: 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; 8868: 13a00000 movne r0, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 886c: 01a00004 moveq r0, r4 <== NOT EXECUTED 8870: e8bd8010 pop {r4, pc} <== NOT EXECUTED 0000879c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 879c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 87a0: e1a0c000 mov ip, r0 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 87a4: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 87a8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 87ac: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 87b0: e58dc000 str ip, [sp] <== NOT EXECUTED 87b4: eb000866 bl a954 <== NOT EXECUTED 87b8: e1a03000 mov r3, r0 <== NOT EXECUTED 87bc: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 87c0: 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); 87c4: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 87c8: ba000003 blt 87dc <== NOT EXECUTED } 87cc: e1a01004 mov r1, r4 <== NOT EXECUTED 87d0: e1a00003 mov r0, r3 <== NOT EXECUTED 87d4: e28dd004 add sp, sp, #4 <== NOT EXECUTED 87d8: 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); 87dc: eb000ea8 bl c284 <__errno> <== NOT EXECUTED 87e0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 87e4: e5805000 str r5, [r0] <== NOT EXECUTED 87e8: e3e03000 mvn r3, #0 <== NOT EXECUTED 87ec: e3e04000 mvn r4, #0 <== NOT EXECUTED 87f0: eafffff5 b 87cc <== NOT EXECUTED 000088d0 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 88d0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 88d4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 88d8: e1a03000 mov r3, r0 <== NOT EXECUTED 88dc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 88e0: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 88e4: eb0008d1 bl ac30 <== NOT EXECUTED if (err > 0) 88e8: e2505000 subs r5, r0, #0 <== NOT EXECUTED 88ec: da000007 ble 8910 <== NOT EXECUTED IMFS_update_atime(jnode); 88f0: e1a0000d mov r0, sp <== NOT EXECUTED 88f4: e3a01000 mov r1, #0 <== NOT EXECUTED 88f8: eb000227 bl 919c <== NOT EXECUTED 88fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8900: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 8904: e1a00005 mov r0, r5 <== NOT EXECUTED 8908: e28dd008 add sp, sp, #8 <== NOT EXECUTED 890c: 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); 8910: 0afffffb beq 8904 <== NOT EXECUTED 8914: eb000e5a bl c284 <__errno> <== NOT EXECUTED 8918: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 891c: e5805000 str r5, [r0] <== NOT EXECUTED 8920: e3e05000 mvn r5, #0 <== NOT EXECUTED 8924: eafffff6 b 8904 <== NOT EXECUTED 00008874 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8874: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8878: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 887c: e1a03000 mov r3, r0 <== NOT EXECUTED 8880: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8884: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8888: eb000868 bl aa30 <== NOT EXECUTED if (err > 0) { 888c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8890: da000008 ble 88b8 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8894: e1a0000d mov r0, sp <== NOT EXECUTED 8898: e3a01000 mov r1, #0 <== NOT EXECUTED 889c: eb00023e bl 919c <== NOT EXECUTED 88a0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 88a4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 88a8: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 88ac: e1a00005 mov r0, r5 <== NOT EXECUTED 88b0: e28dd008 add sp, sp, #8 <== NOT EXECUTED 88b4: 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); 88b8: 0afffffb beq 88ac <== NOT EXECUTED 88bc: eb000e70 bl c284 <__errno> <== NOT EXECUTED 88c0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 88c4: e5805000 str r5, [r0] <== NOT EXECUTED 88c8: e3e05000 mvn r5, #0 <== NOT EXECUTED 88cc: eafffff6 b 88ac <== NOT EXECUTED 000089d4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 89d4: e92d4070 push {r4, r5, r6, lr} /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 89d8: e2505000 subs r5, r0, #0 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 89dc: e1a04001 mov r4, r1 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 89e0: 0a000020 beq 8a68 if ( !name ) 89e4: e3510000 cmp r1, #0 89e8: 0a00000c beq 8a20 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 89ec: e1a00001 mov r0, r1 89f0: e59f1084 ldr r1, [pc, #132] ; 8a7c 89f4: eb00114b bl cf28 89f8: e3500000 cmp r0, #0 89fc: 0a000005 beq 8a18 return directory; if ( !strcmp( name, dotdotname ) ) 8a00: e1a00004 mov r0, r4 8a04: e59f1074 ldr r1, [pc, #116] ; 8a80 8a08: eb001146 bl cf28 8a0c: e3500000 cmp r0, #0 return directory->Parent; 8a10: 05955008 ldreq r5, [r5, #8] */ if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) 8a14: 1a000004 bne 8a2c if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8a18: e1a00005 mov r0, r5 8a1c: 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; 8a20: e3a05000 mov r5, #0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8a24: e1a00005 mov r0, r5 8a28: 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; 8a2c: e5956050 ldr r6, [r5, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8a30: e2855054 add r5, r5, #84 ; 0x54 8a34: e1560005 cmp r6, r5 8a38: 1a000003 bne 8a4c 8a3c: eafffff7 b 8a20 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 8a40: e5966000 ldr r6, [r6] if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8a44: e1560005 cmp r6, r5 8a48: 0afffff4 beq 8a20 !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 ) ) 8a4c: e1a00004 mov r0, r4 8a50: e286100c add r1, r6, #12 8a54: eb001133 bl cf28 8a58: e3500000 cmp r0, #0 8a5c: 1afffff7 bne 8a40 8a60: e1a05006 mov r5, r6 8a64: eaffffeb b 8a18 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8a68: e59f0014 ldr r0, [pc, #20] ; 8a84 <== NOT EXECUTED 8a6c: e3a0102a mov r1, #42 ; 0x2a <== NOT EXECUTED 8a70: e59f2010 ldr r2, [pc, #16] ; 8a88 <== NOT EXECUTED 8a74: e59f3010 ldr r3, [pc, #16] ; 8a8c <== NOT EXECUTED 8a78: eb00010e bl 8eb8 <__assert_func> <== NOT EXECUTED 8a7c: 00018498 .word 0x00018498 8a80: 0001849c .word 0x0001849c 8a84: 00018be8 .word 0x00018be8 8a88: 00018480 .word 0x00018480 8a8c: 00018c34 .word 0x00018c34 0000ddcc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ddcc: 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; ddd0: e1a0c000 mov ip, r0 ddd4: 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 ) { ddd8: e24dd014 sub sp, sp, #20 dddc: 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; dde0: e8bc000f ldm ip!, {r0, r1, r2, r3} dde4: e1a0600d mov r6, sp dde8: e8a6000f stmia r6!, {r0, r1, r2, r3} ddec: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ddf0: 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; ddf4: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ddf8: 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; ddfc: 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 ); de00: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; de04: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; de08: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); de0c: ebfffd49 bl d338 if ( jnode->type != IMFS_DIRECTORY ) { de10: e594304c ldr r3, [r4, #76] ; 0x4c de14: e3530001 cmp r3, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; de18: e2842054 add r2, r4, #84 ; 0x54 de1c: 1a000010 bne de64 de20: e5943050 ldr r3, [r4, #80] ; 0x50 de24: e1530002 cmp r3, r2 de28: 0a00000d beq de64 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { de2c: e3540000 cmp r4, #0 de30: 0a000008 beq de58 if ( jnode->type == IMFS_DIRECTORY ) { de34: e594304c ldr r3, [r4, #76] ; 0x4c de38: e3530001 cmp r3, #1 de3c: 1affffef bne de00 de40: e5943050 ldr r3, [r4, #80] ; 0x50 de44: e2842054 add r2, r4, #84 ; 0x54 de48: e1530002 cmp r3, r2 de4c: 0affffeb beq de00 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); de50: e2534000 subs r4, r3, #0 de54: 1affffe9 bne de00 de58: e3a00000 mov r0, #0 return 0; } de5c: e28dd014 add sp, sp, #20 de60: 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 ); de64: e3a00000 mov r0, #0 de68: e1a0100d mov r1, sp de6c: ebffd113 bl 22c0 if (result != 0) de70: e3500000 cmp r0, #0 de74: 01a04006 moveq r4, r6 de78: 0affffeb beq de2c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); de7c: e3e00000 mvn r0, #0 <== NOT EXECUTED de80: eafffff5 b de5c <== NOT EXECUTED 00008b7c : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8b7c: e59fc0d0 ldr ip, [pc, #208] ; 8c54 8b80: 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) { 8b84: 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 ) { 8b88: e92d40f0 push {r4, r5, r6, r7, lr} 8b8c: e1a04000 mov r4, r0 8b90: e1a06001 mov r6, r1 8b94: e1a07002 mov r7, r2 8b98: e1a05003 mov r5, r3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8b9c: 0a000008 beq 8bc4 8ba0: e3a03000 mov r3, #0 8ba4: e3a02020 mov r2, #32 8ba8: e15c0002 cmp ip, r2 8bac: e2833001 add r3, r3, #1 8bb0: 0a000003 beq 8bc4 8bb4: e3530005 cmp r3, #5 8bb8: e1a02082 lsl r2, r2, #1 8bbc: 1afffff9 bne 8ba8 8bc0: e3a0c080 mov ip, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8bc4: e59f308c ldr r3, [pc, #140] ; 8c58 8bc8: e583c000 str ip, [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(); 8bcc: eb0009e0 bl b354 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; 8bd0: e59fe084 ldr lr, [pc, #132] ; 8c5c /* * 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(); 8bd4: 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; 8bd8: e8be000f ldm lr!, {r0, r1, r2, r3} 8bdc: e284c038 add ip, r4, #56 ; 0x38 8be0: e8ac000f stmia ip!, {r0, r1, r2, r3} 8be4: e8be000f ldm lr!, {r0, r1, r2, r3} 8be8: e8ac000f stmia ip!, {r0, r1, r2, r3} 8bec: 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; 8bf0: e5846028 str r6, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8bf4: 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; 8bf8: e5845024 str r5, [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 ) ); 8bfc: e3a00001 mov r0, #1 8c00: e3a0100c mov r1, #12 8c04: eb0000be bl 8f04 if ( !fs_info ) { 8c08: e3500000 cmp r0, #0 8c0c: 0a000009 beq 8c38 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; 8c10: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8c14: e3a03001 mov r3, #1 8c18: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8c1c: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8c20: e5807004 str r7, [r0, #4] 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; 8c24: 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; 8c28: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 8c2c: eb00074a bl a95c 8c30: e3a00000 mov r0, #0 return 0; } 8c34: e8bd80f0 pop {r4, r5, r6, r7, 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); 8c38: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 8c3c: eb0000eb bl 8ff0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8c40: eb000d8f bl c284 <__errno> <== NOT EXECUTED 8c44: e3a0300c mov r3, #12 <== NOT EXECUTED 8c48: e5803000 str r3, [r0] <== NOT EXECUTED 8c4c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8c50: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 8c54: 00017b54 .word 0x00017b54 8c58: 000190e0 .word 0x000190e0 8c5c: 000185b8 .word 0x000185b8 00001f78 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1f78: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1f7c: 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 */ ) { 1f80: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1f84: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1f88: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1f8c: 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 */ ) { 1f90: e1a05001 mov r5, r1 1f94: 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 ) 1f98: 8a00001e bhi 2018 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 ); 1f9c: e1a00002 mov r0, r2 1fa0: eb00420d bl 127dc 1fa4: e28d4004 add r4, sp, #4 1fa8: e1a01000 mov r1, r0 1fac: e1a02004 mov r2, r4 1fb0: e28d3044 add r3, sp, #68 ; 0x44 1fb4: e1a00006 mov r0, r6 1fb8: eb002fe0 bl df40 * 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( 1fbc: e3a03ca2 mov r3, #41472 ; 0xa200 1fc0: e28dc028 add ip, sp, #40 ; 0x28 1fc4: e1a00005 mov r0, r5 1fc8: e1a02004 mov r2, r4 1fcc: e2433001 sub r3, r3, #1 1fd0: e3a01003 mov r1, #3 1fd4: e58dc000 str ip, [sp] 1fd8: eb002c84 bl d1f0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1fdc: e3500000 cmp r0, #0 1fe0: 0a000011 beq 202c 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++; 1fe4: e59d3028 ldr r3, [sp, #40] ; 0x28 1fe8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1fec: e2822001 add r2, r2, #1 1ff0: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 1ff4: e28d003c add r0, sp, #60 ; 0x3c 1ff8: e3a01000 mov r1, #0 1ffc: eb00027e bl 29fc 2000: e59d203c ldr r2, [sp, #60] ; 0x3c 2004: e59d3028 ldr r3, [sp, #40] ; 0x28 2008: e5832048 str r2, [r3, #72] ; 0x48 200c: e3a00000 mov r0, #0 return 0; } 2010: e28dd048 add sp, sp, #72 ; 0x48 2014: 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 ); 2018: eb003e16 bl 11878 <__errno> 201c: e3a0301f mov r3, #31 2020: e5803000 str r3, [r0] 2024: e3e00000 mvn r0, #0 2028: eafffff8 b 2010 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 202c: eb003e11 bl 11878 <__errno> <== NOT EXECUTED 2030: e3a0300c mov r3, #12 <== NOT EXECUTED 2034: e5803000 str r3, [r0] <== NOT EXECUTED 2038: e3e00000 mvn r0, #0 <== NOT EXECUTED 203c: eafffff3 b 2010 <== NOT EXECUTED 00010350 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 10350: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 10354: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 10358: 0a00000f beq 1039c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1035c: e593304c ldr r3, [r3, #76] ; 0x4c 10360: e3530005 cmp r3, #5 10364: 1a000012 bne 103b4 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 ); 10368: e3a02001 mov r2, #1 1036c: ebfffe94 bl fdc4 if ( *block_entry_ptr ) 10370: e5904000 ldr r4, [r0] 10374: 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 ); 10378: e1a05000 mov r5, r0 if ( *block_entry_ptr ) 1037c: 13a00000 movne r0, #0 10380: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 10384: ebfffe81 bl fd90 if ( !memory ) 10388: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; 1038c: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 10390: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; 10394: 11a00004 movne r0, r4 return 0; } 10398: e8bd8030 pop {r4, r5, pc} ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 1039c: e3a01f5a mov r1, #360 ; 0x168 <== NOT EXECUTED 103a0: e2811001 add r1, r1, #1 <== NOT EXECUTED 103a4: e59f0020 ldr r0, [pc, #32] ; 103cc <== NOT EXECUTED 103a8: e59f2020 ldr r2, [pc, #32] ; 103d0 <== NOT EXECUTED 103ac: e59f3020 ldr r3, [pc, #32] ; 103d4 <== NOT EXECUTED 103b0: ebfff77d bl e1ac <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 103b4: e3a01f5b mov r1, #364 ; 0x16c <== NOT EXECUTED 103b8: e2811001 add r1, r1, #1 <== NOT EXECUTED 103bc: e59f0008 ldr r0, [pc, #8] ; 103cc <== NOT EXECUTED 103c0: e59f2008 ldr r2, [pc, #8] ; 103d0 <== NOT EXECUTED 103c4: e59f300c ldr r3, [pc, #12] ; 103d8 <== NOT EXECUTED 103c8: ebfff777 bl e1ac <__assert_func> <== NOT EXECUTED 103cc: 0001ea4c .word 0x0001ea4c 103d0: 0001e1b8 .word 0x0001e1b8 103d4: 0001ea94 .word 0x0001ea94 103d8: 0001eaa0 .word 0x0001eaa0 000103dc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 103dc: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 103e0: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 103e4: e24dd004 sub sp, sp, #4 103e8: e1a08001 mov r8, r1 103ec: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 103f0: 0a00004f beq 10534 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 103f4: e594304c ldr r3, [r4, #76] ; 0x4c 103f8: e3530005 cmp r3, #5 103fc: 1a000046 bne 1051c if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 10400: e59f3144 ldr r3, [pc, #324] ; 1054c 10404: e593b000 ldr fp, [r3] 10408: e1a0312b lsr r3, fp, #2 1040c: e0213393 mla r1, r3, r3, r3 10410: e0223391 mla r2, r1, r3, r3 10414: e3a03000 mov r3, #0 10418: e1530006 cmp r3, r6 1041c: e2423001 sub r3, r2, #1 10420: e002039b mul r2, fp, r3 10424: ca000007 bgt 10448 10428: 0a000004 beq 10440 rtems_set_errno_and_return_minus_one( EINVAL ); 1042c: eb000511 bl 11878 <__errno> <== NOT EXECUTED 10430: e3a03016 mov r3, #22 <== NOT EXECUTED 10434: e5803000 str r3, [r0] <== NOT EXECUTED 10438: e3e00000 mvn r0, #0 <== NOT EXECUTED 1043c: ea00002e b 104fc <== NOT EXECUTED 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 ) 10440: e1520008 cmp r2, r8 10444: 9afffff8 bls 1042c rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 10448: e5947054 ldr r7, [r4, #84] ; 0x54 1044c: e1560007 cmp r6, r7 10450: e594a050 ldr sl, [r4, #80] ; 0x50 10454: da000026 ble 104f4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10458: e1a0cfcb asr ip, fp, #31 1045c: e1a0300c mov r3, ip 10460: e1a0200b mov r2, fp 10464: e1a00008 mov r0, r8 10468: e1a01006 mov r1, r6 1046c: e58dc000 str ip, [sp] 10470: eb002d13 bl 1b8c4 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10474: e59dc000 ldr ip, [sp] /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10478: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 1047c: e1a01007 mov r1, r7 10480: e1a0000a mov r0, sl 10484: e1a0200b mov r2, fp 10488: e1a0300c mov r3, ip 1048c: eb002d0c bl 1b8c4 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10490: 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; 10494: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10498: 3a000019 bcc 10504 1049c: e1a07000 mov r7, r0 104a0: ea000002 b 104b0 104a4: e2877001 add r7, r7, #1 104a8: e1550007 cmp r5, r7 104ac: 3a000014 bcc 10504 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 104b0: e1a00004 mov r0, r4 104b4: e1a01007 mov r1, r7 104b8: ebffffa4 bl 10350 104bc: e3500000 cmp r0, #0 104c0: 0afffff7 beq 104a4 104c4: ea000003 b 104d8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 104c8: e1a01007 mov r1, r7 <== NOT EXECUTED 104cc: 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-- ) { 104d0: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 104d4: ebfffeed bl 10090 <== 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-- ) { 104d8: e15a0007 cmp sl, r7 <== NOT EXECUTED 104dc: 9afffff9 bls 104c8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 104e0: eb0004e4 bl 11878 <__errno> <== NOT EXECUTED 104e4: e3a0301c mov r3, #28 <== NOT EXECUTED 104e8: e5803000 str r3, [r0] <== NOT EXECUTED 104ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 104f0: ea000001 b 104fc <== NOT EXECUTED 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 ) 104f4: 0a000005 beq 10510 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 104f8: e3a00000 mov r0, #0 return 0; } 104fc: e28dd004 add sp, sp, #4 10500: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 10504: e5846054 str r6, [r4, #84] ; 0x54 10508: e5848050 str r8, [r4, #80] ; 0x50 1050c: eafffff9 b 104f8 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 ) 10510: e158000a cmp r8, sl 10514: 8affffcf bhi 10458 10518: eafffff6 b 104f8 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1051c: e3a01f4d mov r1, #308 ; 0x134 <== NOT EXECUTED 10520: e2811001 add r1, r1, #1 <== NOT EXECUTED 10524: e59f0024 ldr r0, [pc, #36] ; 10550 <== NOT EXECUTED 10528: e59f2024 ldr r2, [pc, #36] ; 10554 <== NOT EXECUTED 1052c: e59f3024 ldr r3, [pc, #36] ; 10558 <== NOT EXECUTED 10530: ebfff71d bl e1ac <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 10534: e3a01e13 mov r1, #304 ; 0x130 <== NOT EXECUTED 10538: e2811001 add r1, r1, #1 <== NOT EXECUTED 1053c: e59f000c ldr r0, [pc, #12] ; 10550 <== NOT EXECUTED 10540: e59f200c ldr r2, [pc, #12] ; 10554 <== NOT EXECUTED 10544: e59f3010 ldr r3, [pc, #16] ; 1055c <== NOT EXECUTED 10548: ebfff717 bl e1ac <__assert_func> <== NOT EXECUTED 1054c: 0001edc8 .word 0x0001edc8 10550: 0001ea4c .word 0x0001ea4c 10554: 0001e1d0 .word 0x0001e1d0 10558: 0001eaa0 .word 0x0001eaa0 1055c: 0001ea94 .word 0x0001ea94 0000fdc4 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { fdc4: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fdc8: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { fdcc: e24dd004 sub sp, sp, #4 /* * Perform internal consistency checks */ assert( the_jnode ); fdd0: 0a000078 beq ffb8 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); fdd4: e594304c ldr r3, [r4, #76] ; 0x4c fdd8: e3530005 cmp r3, #5 fddc: 1a000070 bne ffa4 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { fde0: e59f320c ldr r3, [pc, #524] ; fff4 fde4: e5935000 ldr r5, [r3] fde8: e1a05125 lsr r5, r5, #2 fdec: e2453001 sub r3, r5, #1 fdf0: e1510003 cmp r1, r3 fdf4: 9a000019 bls fe60 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { fdf8: e0265595 mla r6, r5, r5, r5 <== NOT EXECUTED fdfc: e2463001 sub r3, r6, #1 <== NOT EXECUTED fe00: e1510003 cmp r1, r3 <== NOT EXECUTED fe04: 8a000025 bhi fea0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; fe08: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fe0c: e1a00006 mov r0, r6 <== NOT EXECUTED fe10: e1a01005 mov r1, r5 <== NOT EXECUTED fe14: e58d2000 str r2, [sp] <== NOT EXECUTED fe18: eb002bf7 bl 1adfc <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fe1c: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fe20: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fe24: e1a00006 mov r0, r6 <== NOT EXECUTED fe28: eb002baf bl 1acec <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { fe2c: e59d2000 ldr r2, [sp] <== NOT EXECUTED fe30: 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; fe34: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; fe38: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { fe3c: 0a000044 beq ff54 <== NOT EXECUTED if ( !p ) { fe40: e3530000 cmp r3, #0 <== NOT EXECUTED fe44: 0a000049 beq ff70 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; fe48: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p1 ) { fe4c: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; fe50: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { fe54: 0a000034 beq ff2c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; fe58: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED fe5c: ea000005 b fe78 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { fe60: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; fe64: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { fe68: 0a000035 beq ff44 if ( !p ) { fe6c: e3500000 cmp r0, #0 fe70: 0a000002 beq fe80 } if ( !p ) return 0; return &info->indirect[ my_block ]; fe74: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } fe78: e28dd004 add sp, sp, #4 fe7c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); fe80: e58d1000 str r1, [sp] fe84: ebffffc1 bl fd90 if ( !p ) fe88: e3500000 cmp r0, #0 fe8c: e59d1000 ldr r1, [sp] return 0; info->indirect = p; fe90: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) fe94: 1afffff6 bne fe74 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; fe98: e3a00000 mov r0, #0 <== NOT EXECUTED fe9c: eafffff5 b fe78 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { fea0: e0235596 mla r3, r6, r5, r5 <== NOT EXECUTED fea4: e2433001 sub r3, r3, #1 <== NOT EXECUTED fea8: e1510003 cmp r1, r3 <== NOT EXECUTED feac: 8afffff9 bhi fe98 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; feb0: e0666001 rsb r6, r6, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; feb4: e1a00006 mov r0, r6 <== NOT EXECUTED feb8: e1a01005 mov r1, r5 <== NOT EXECUTED febc: e58d2000 str r2, [sp] <== NOT EXECUTED fec0: eb002bcd bl 1adfc <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fec4: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fec8: e1a07000 mov r7, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fecc: e1a00006 mov r0, r6 <== NOT EXECUTED fed0: eb002b85 bl 1acec <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; fed4: 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; fed8: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; fedc: eb002b82 bl 1acec <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; fee0: 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; fee4: e1a06000 mov r6, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; fee8: e1a00008 mov r0, r8 <== NOT EXECUTED feec: eb002bc2 bl 1adfc <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { fef0: e59d2000 ldr r2, [sp] <== NOT EXECUTED fef4: 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; fef8: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; fefc: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { ff00: 0a00001f beq ff84 <== NOT EXECUTED if ( !p ) { ff04: e3530000 cmp r3, #0 <== NOT EXECUTED ff08: 0a000034 beq ffe0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ff0c: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) { ff10: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ff14: e0836106 add r6, r3, r6, lsl #2 <== NOT EXECUTED if ( !p1 ) { ff18: 0a00002b beq ffcc <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ff1c: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { ff20: e3500000 cmp r0, #0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ff24: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { ff28: 1affffca bne fe58 <== NOT EXECUTED p2 = memfile_alloc_block(); ff2c: ebffff97 bl fd90 <== NOT EXECUTED if ( !p2 ) ff30: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; ff34: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ff38: 0affffd6 beq fe98 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ff3c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED ff40: eaffffcc b fe78 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ff44: e3500000 cmp r0, #0 ff48: 1affffc9 bne fe74 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ff4c: e3a00000 mov r0, #0 <== NOT EXECUTED ff50: eaffffc8 b fe78 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) ff54: e3530000 cmp r3, #0 <== NOT EXECUTED ff58: 0affffce beq fe98 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; ff5c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) ff60: e3500000 cmp r0, #0 <== NOT EXECUTED ff64: 0affffcb beq fe98 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ff68: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED ff6c: eaffffc1 b fe78 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ff70: ebffff86 bl fd90 <== NOT EXECUTED if ( !p ) ff74: e2503000 subs r3, r0, #0 <== NOT EXECUTED ff78: 0affffc6 beq fe98 <== NOT EXECUTED return 0; info->doubly_indirect = p; ff7c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED ff80: eaffffb0 b fe48 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ff84: e3530000 cmp r3, #0 <== NOT EXECUTED ff88: 0affffc2 beq fe98 <== 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 ]; ff8c: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p1 ) ff90: e3530000 cmp r3, #0 <== NOT EXECUTED ff94: 0affffbf beq fe98 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ff98: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED ff9c: e0800107 add r0, r0, r7, lsl #2 <== NOT EXECUTED ffa0: eaffffb4 b fe78 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ffa4: e59f004c ldr r0, [pc, #76] ; fff8 <== NOT EXECUTED ffa8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED ffac: e59f2048 ldr r2, [pc, #72] ; fffc <== NOT EXECUTED ffb0: e59f3048 ldr r3, [pc, #72] ; 10000 <== NOT EXECUTED ffb4: ebfff87c bl e1ac <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ffb8: e59f0038 ldr r0, [pc, #56] ; fff8 <== NOT EXECUTED ffbc: e3a01fe2 mov r1, #904 ; 0x388 <== NOT EXECUTED ffc0: e59f2034 ldr r2, [pc, #52] ; fffc <== NOT EXECUTED ffc4: e59f3038 ldr r3, [pc, #56] ; 10004 <== NOT EXECUTED ffc8: ebfff877 bl e1ac <__assert_func> <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffcc: ebffff6f bl fd90 <== NOT EXECUTED if ( !p1 ) ffd0: e2502000 subs r2, r0, #0 <== NOT EXECUTED ffd4: 0affffaf beq fe98 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; ffd8: e5862000 str r2, [r6] <== NOT EXECUTED ffdc: eaffffce b ff1c <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffe0: ebffff6a bl fd90 <== NOT EXECUTED if ( !p ) ffe4: e2503000 subs r3, r0, #0 <== NOT EXECUTED ffe8: 0affffaa beq fe98 <== NOT EXECUTED return 0; info->triply_indirect = p; ffec: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED fff0: eaffffc5 b ff0c <== NOT EXECUTED fff4: 0001edc8 .word 0x0001edc8 fff8: 0001ea4c .word 0x0001ea4c fffc: 0001e148 .word 0x0001e148 10000: 0001eaa0 .word 0x0001eaa0 10004: 0001ea94 .word 0x0001ea94 000109f8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 109f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 109fc: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 10a00: e24dd014 sub sp, sp, #20 10a04: e1a08003 mov r8, r3 10a08: e1a0a001 mov sl, r1 10a0c: e1a0b002 mov fp, r2 10a10: e59d5038 ldr r5, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); 10a14: 0a000095 beq 10c70 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 10a18: e599304c ldr r3, [r9, #76] ; 0x4c 10a1c: e2432005 sub r2, r3, #5 10a20: e3520001 cmp r2, #1 10a24: 8a00008b bhi 10c58 /* * Error checks on arguments */ assert( dest ); 10a28: e3580000 cmp r8, #0 10a2c: 0a00009a beq 10c9c /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 10a30: e3550000 cmp r5, #0 10a34: 0a000076 beq 10c14 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 10a38: e3530006 cmp r3, #6 10a3c: 0a00005a beq 10bac * 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 ) 10a40: e5993054 ldr r3, [r9, #84] ; 0x54 10a44: e3a02000 mov r2, #0 10a48: 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; 10a4c: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 10a50: e5992050 ldr r2, [r9, #80] ; 0x50 10a54: e0851001 add r1, r5, r1 10a58: ca000051 bgt 10ba4 10a5c: 0a00004e beq 10b9c /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10a60: e59f624c ldr r6, [pc, #588] ; 10cb4 10a64: e5964000 ldr r4, [r6] 10a68: e1a0000a mov r0, sl 10a6c: e1a02004 mov r2, r4 10a70: e1a03fc2 asr r3, r2, #31 10a74: e1a0100b mov r1, fp 10a78: e98d000c stmib sp, {r2, r3} 10a7c: eb002cba bl 1bd6c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10a80: e1a0100b mov r1, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10a84: e1a0c000 mov ip, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10a88: e99d000c ldmib sp, {r2, r3} 10a8c: e1a0000a mov r0, sl 10a90: e58dc000 str ip, [sp] 10a94: eb002b8a bl 1b8c4 <__divdi3> if ( start_offset ) { 10a98: e59dc000 ldr ip, [sp] 10a9c: 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; 10aa0: e1a07000 mov r7, r0 if ( start_offset ) { 10aa4: 01a0a00c moveq sl, ip 10aa8: 0a000013 beq 10afc 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 ); 10aac: e1a00009 mov r0, r9 10ab0: e1a01007 mov r1, r7 10ab4: e3a02000 mov r2, #0 10ab8: e58dc000 str ip, [sp] 10abc: ebfffcc0 bl fdc4 assert( block_ptr ); 10ac0: e3500000 cmp r0, #0 10ac4: e59dc000 ldr ip, [sp] 10ac8: 0a00006d beq 10c84 */ 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; 10acc: 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 ); 10ad0: 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; 10ad4: e155000a cmp r5, sl 10ad8: 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 ); 10adc: e1a00008 mov r0, r8 10ae0: e081100c add r1, r1, ip 10ae4: e1a0200a mov r2, sl 10ae8: eb000570 bl 120b0 dest += to_copy; block++; my_length -= to_copy; 10aec: 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; 10af0: e088800a add r8, r8, sl block++; 10af4: e2877001 add r7, r7, #1 my_length -= to_copy; 10af8: 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 ) { 10afc: e1550004 cmp r5, r4 10b00: 3a000010 bcc 10b48 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10b04: e1a00009 mov r0, r9 10b08: e1a01007 mov r1, r7 10b0c: e3a02000 mov r2, #0 10b10: ebfffcab bl fdc4 assert( block_ptr ); 10b14: e3500000 cmp r0, #0 10b18: 0a000042 beq 10c28 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 10b1c: e5901000 ldr r1, [r0] 10b20: e1a02004 mov r2, r4 10b24: e1a00008 mov r0, r8 10b28: eb000560 bl 120b0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10b2c: e5963000 ldr r3, [r6] if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 10b30: 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 ) { 10b34: 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; 10b38: e0888004 add r8, r8, r4 block++; 10b3c: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; 10b40: 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 ) { 10b44: 9affffee bls 10b04 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 10b48: e3550000 cmp r5, #0 10b4c: 0a00000a beq 10b7c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10b50: e1a01007 mov r1, r7 10b54: e1a00009 mov r0, r9 10b58: e3a02000 mov r2, #0 10b5c: ebfffc98 bl fdc4 assert( block_ptr ); 10b60: e2503000 subs r3, r0, #0 10b64: 0a000035 beq 10c40 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 10b68: e1a00008 mov r0, r8 10b6c: e5931000 ldr r1, [r3] 10b70: e1a02005 mov r2, r5 10b74: eb00054d bl 120b0 copied += my_length; 10b78: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); 10b7c: e28d000c add r0, sp, #12 10b80: e3a01000 mov r1, #0 10b84: ebffc79c bl 29fc 10b88: e59d300c ldr r3, [sp, #12] 10b8c: e5893040 str r3, [r9, #64] ; 0x40 return copied; 10b90: e1a0000a mov r0, sl } 10b94: e28dd014 add sp, sp, #20 10b98: 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 ) 10b9c: e1510002 cmp r1, r2 10ba0: 9affffae bls 10a60 my_length = the_jnode->info.file.size - start; 10ba4: e0635002 rsb r5, r3, r2 10ba8: eaffffac b 10a60 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)) 10bac: e2894050 add r4, r9, #80 ; 0x50 <== NOT EXECUTED 10bb0: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED 10bb4: e1a00003 mov r0, r3 <== NOT EXECUTED 10bb8: e1a01004 mov r1, r4 <== NOT EXECUTED 10bbc: e3a02000 mov r2, #0 <== NOT EXECUTED 10bc0: e050000a subs r0, r0, sl <== NOT EXECUTED 10bc4: e0c1100b sbc r1, r1, fp <== NOT EXECUTED 10bc8: 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; 10bcc: e5992058 ldr r2, [r9, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 10bd0: da00000b ble 10c04 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 10bd4: e06a5003 rsb r5, sl, r3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 10bd8: e082100a add r1, r2, sl <== NOT EXECUTED 10bdc: e1a00008 mov r0, r8 <== NOT EXECUTED 10be0: e1a02005 mov r2, r5 <== NOT EXECUTED 10be4: eb000531 bl 120b0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 10be8: e28d000c add r0, sp, #12 <== NOT EXECUTED 10bec: e3a01000 mov r1, #0 <== NOT EXECUTED 10bf0: ebffc781 bl 29fc <== NOT EXECUTED 10bf4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED return my_length; 10bf8: 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 ); 10bfc: e5893040 str r3, [r9, #64] ; 0x40 <== NOT EXECUTED return my_length; 10c00: eaffffe3 b 10b94 <== 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)) 10c04: 1afffff3 bne 10bd8 <== NOT EXECUTED 10c08: e1550000 cmp r5, r0 <== NOT EXECUTED 10c0c: 9afffff1 bls 10bd8 <== NOT EXECUTED 10c10: eaffffef b 10bd4 <== 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 ); 10c14: eb000317 bl 11878 <__errno> <== NOT EXECUTED 10c18: e3a03016 mov r3, #22 <== NOT EXECUTED 10c1c: e5803000 str r3, [r0] <== NOT EXECUTED 10c20: e3e00000 mvn r0, #0 <== NOT EXECUTED 10c24: eaffffda b 10b94 <== 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 ); 10c28: e3a01fa9 mov r1, #676 ; 0x2a4 <== NOT EXECUTED 10c2c: e2811003 add r1, r1, #3 <== NOT EXECUTED 10c30: e59f0080 ldr r0, [pc, #128] ; 10cb8 <== NOT EXECUTED 10c34: e59f2080 ldr r2, [pc, #128] ; 10cbc <== NOT EXECUTED 10c38: e59f3080 ldr r3, [pc, #128] ; 10cc0 <== NOT EXECUTED 10c3c: ebfff55a bl e1ac <__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 ); 10c40: e3a01fae mov r1, #696 ; 0x2b8 <== NOT EXECUTED 10c44: e2811001 add r1, r1, #1 <== NOT EXECUTED 10c48: e59f0068 ldr r0, [pc, #104] ; 10cb8 <== NOT EXECUTED 10c4c: e59f2068 ldr r2, [pc, #104] ; 10cbc <== NOT EXECUTED 10c50: e59f3068 ldr r3, [pc, #104] ; 10cc0 <== NOT EXECUTED 10c54: ebfff554 bl e1ac <__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 || 10c58: e3a01e25 mov r1, #592 ; 0x250 <== NOT EXECUTED 10c5c: e2811001 add r1, r1, #1 <== NOT EXECUTED 10c60: e59f0050 ldr r0, [pc, #80] ; 10cb8 <== NOT EXECUTED 10c64: e59f2050 ldr r2, [pc, #80] ; 10cbc <== NOT EXECUTED 10c68: e59f3054 ldr r3, [pc, #84] ; 10cc4 <== NOT EXECUTED 10c6c: ebfff54e bl e1ac <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 10c70: e59f0040 ldr r0, [pc, #64] ; 10cb8 <== NOT EXECUTED 10c74: e3a01f93 mov r1, #588 ; 0x24c <== NOT EXECUTED 10c78: e59f203c ldr r2, [pc, #60] ; 10cbc <== NOT EXECUTED 10c7c: e59f3044 ldr r3, [pc, #68] ; 10cc8 <== NOT EXECUTED 10c80: ebfff549 bl e1ac <__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 ); 10c84: e3a01fa5 mov r1, #660 ; 0x294 <== NOT EXECUTED 10c88: e2811002 add r1, r1, #2 <== NOT EXECUTED 10c8c: e59f0024 ldr r0, [pc, #36] ; 10cb8 <== NOT EXECUTED 10c90: e59f2024 ldr r2, [pc, #36] ; 10cbc <== NOT EXECUTED 10c94: e59f3024 ldr r3, [pc, #36] ; 10cc0 <== NOT EXECUTED 10c98: ebfff543 bl e1ac <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 10c9c: e3a01f96 mov r1, #600 ; 0x258 <== NOT EXECUTED 10ca0: e2811002 add r1, r1, #2 <== NOT EXECUTED 10ca4: e59f000c ldr r0, [pc, #12] ; 10cb8 <== NOT EXECUTED 10ca8: e59f200c ldr r2, [pc, #12] ; 10cbc <== NOT EXECUTED 10cac: e59f3018 ldr r3, [pc, #24] ; 10ccc <== NOT EXECUTED 10cb0: ebfff53d bl e1ac <__assert_func> <== NOT EXECUTED 10cb4: 0001edc8 .word 0x0001edc8 10cb8: 0001ea4c .word 0x0001ea4c 10cbc: 0001e1f8 .word 0x0001e1f8 10cc0: 0001ead0 .word 0x0001ead0 10cc4: 0001eae4 .word 0x0001eae4 10cc8: 0001ea94 .word 0x0001ea94 10ccc: 0001eb30 .word 0x0001eb30 000100e0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 100e0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 100e4: e250a000 subs sl, r0, #0 100e8: 0a00004f beq 1022c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 100ec: e59a304c ldr r3, [sl, #76] ; 0x4c 100f0: e3530005 cmp r3, #5 100f4: 1a000052 bne 10244 /* * 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; 100f8: e59f615c ldr r6, [pc, #348] ; 1025c * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 100fc: 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; 10100: e5967000 ldr r7, [r6] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 10104: 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; 10108: e1a07127 lsr r7, r7, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 1010c: 128a0058 addne r0, sl, #88 ; 0x58 10110: 11a01007 movne r1, r7 10114: 1bffffbb blne 10008 } if ( info->doubly_indirect ) { 10118: e59a305c ldr r3, [sl, #92] ; 0x5c 1011c: e3530000 cmp r3, #0 10120: 0a000014 beq 10178 for ( i=0 ; i <== NOT EXECUTED 10130: e3a02000 mov r2, #0 <== NOT EXECUTED 10134: e1a04002 mov r4, r2 <== NOT EXECUTED 10138: ea000000 b 10140 <== NOT EXECUTED 1013c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 10140: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 10144: e3510000 cmp r1, #0 <== NOT EXECUTED 10148: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED memfile_free_blocks_in_table( 1014c: 10830002 addne r0, r3, r2 <== NOT EXECUTED 10150: 11a01007 movne r1, r7 <== NOT EXECUTED 10154: 1bffffab blne 10008 <== 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 ); 1016c: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 10170: e1a01007 mov r1, r7 <== NOT EXECUTED 10174: ebffffa3 bl 10008 <== NOT EXECUTED } if ( info->triply_indirect ) { 10178: e59a0060 ldr r0, [sl, #96] ; 0x60 1017c: e3500000 cmp r0, #0 10180: 0a000027 beq 10224 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 10190: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 10194: e3550000 cmp r5, #0 <== NOT EXECUTED 10198: 13a09000 movne r9, #0 <== NOT EXECUTED 1019c: 11a08009 movne r8, r9 <== NOT EXECUTED 101a0: 0a00001c beq 10218 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 101ac: e3a00000 mov r0, #0 <== NOT EXECUTED 101b0: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { 101b4: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 101b8: e3530000 cmp r3, #0 <== NOT EXECUTED 101bc: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 101c0: 10850000 addne r0, r5, r0 <== NOT EXECUTED 101c4: 11a01007 movne r1, r7 <== NOT EXECUTED 101c8: 1bffff8e blne 10008 <== 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 101e0: 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( 101e4: e0800009 add r0, r0, r9 <== NOT EXECUTED 101e8: e1a01007 mov r1, r7 <== NOT EXECUTED 101ec: ebffff85 bl 10008 <== 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]; 10204: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED 10208: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 1020c: e3550000 cmp r5, #0 <== NOT EXECUTED 10210: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED 10214: 1affffe2 bne 101a4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 10218: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 1021c: e1a01007 mov r1, r7 <== NOT EXECUTED 10220: ebffff78 bl 10008 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 10224: e3a00000 mov r0, #0 10228: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Perform internal consistency checks */ assert( the_jnode ); 1022c: e3a01f7b mov r1, #492 ; 0x1ec <== NOT EXECUTED 10230: e2811002 add r1, r1, #2 <== NOT EXECUTED 10234: e59f0024 ldr r0, [pc, #36] ; 10260 <== NOT EXECUTED 10238: e59f2024 ldr r2, [pc, #36] ; 10264 <== NOT EXECUTED 1023c: e59f3024 ldr r3, [pc, #36] ; 10268 <== NOT EXECUTED 10240: ebfff7d9 bl e1ac <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10244: e3a01e1f mov r1, #496 ; 0x1f0 <== NOT EXECUTED 10248: e2811002 add r1, r1, #2 <== NOT EXECUTED 1024c: e59f000c ldr r0, [pc, #12] ; 10260 <== NOT EXECUTED 10250: e59f200c ldr r2, [pc, #12] ; 10264 <== NOT EXECUTED 10254: e59f3010 ldr r3, [pc, #16] ; 1026c <== NOT EXECUTED 10258: ebfff7d3 bl e1ac <__assert_func> <== NOT EXECUTED 1025c: 0001edc8 .word 0x0001edc8 10260: 0001ea4c .word 0x0001ea4c 10264: 0001e1a4 .word 0x0001e1a4 10268: 0001ea94 .word 0x0001ea94 1026c: 0001eaa0 .word 0x0001eaa0 00010090 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 10090: 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 ); 10094: e3a02000 mov r2, #0 <== NOT EXECUTED 10098: ebffff49 bl fdc4 <== NOT EXECUTED assert( block_ptr ); 1009c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 100a0: 0a000005 beq 100bc <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; 100a4: 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; 100a8: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; 100ac: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 100b0: ebffff2e bl fd70 <== NOT EXECUTED } return 1; } 100b4: e3a00001 mov r0, #1 <== NOT EXECUTED 100b8: 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 ); 100bc: e3a01f65 mov r1, #404 ; 0x194 <== NOT EXECUTED 100c0: e2811002 add r1, r1, #2 <== NOT EXECUTED 100c4: e59f0008 ldr r0, [pc, #8] ; 100d4 <== NOT EXECUTED 100c8: e59f2008 ldr r2, [pc, #8] ; 100d8 <== NOT EXECUTED 100cc: e59f3008 ldr r3, [pc, #8] ; 100dc <== NOT EXECUTED 100d0: ebfff835 bl e1ac <__assert_func> <== NOT EXECUTED 100d4: 0001ea4c .word 0x0001ea4c 100d8: 0001e188 .word 0x0001e188 100dc: 0001ead0 .word 0x0001ead0 00010678 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10678: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 1067c: e2509000 subs r9, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10680: e24dd014 sub sp, sp, #20 10684: e1a06001 mov r6, r1 10688: e1a07002 mov r7, r2 1068c: e1a08003 mov r8, r3 10690: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); 10694: 0a000084 beq 108ac if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10698: e599304c ldr r3, [r9, #76] ; 0x4c 1069c: e3530005 cmp r3, #5 106a0: 1a000075 bne 1087c /* * Error check arguments */ assert( source ); 106a4: e3580000 cmp r8, #0 106a8: 0a00006d beq 10864 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 106ac: e35a0000 cmp sl, #0 106b0: 0a000061 beq 1083c * 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 ) { 106b4: e5993054 ldr r3, [r9, #84] ; 0x54 106b8: e3530000 cmp r3, #0 106bc: e08a1001 add r1, sl, r1 106c0: ba000053 blt 10814 106c4: 0a00004f beq 10808 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 106c8: e59f5208 ldr r5, [pc, #520] ; 108d8 106cc: e5954000 ldr r4, [r5] 106d0: e1a00006 mov r0, r6 106d4: e1a02004 mov r2, r4 106d8: e1a03fc2 asr r3, r2, #31 106dc: e1a01007 mov r1, r7 106e0: e98d000c stmib sp, {r2, r3} 106e4: eb002da0 bl 1bd6c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 106e8: e1a01007 mov r1, r7 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 106ec: e1a0b000 mov fp, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 106f0: e99d000c ldmib sp, {r2, r3} 106f4: e1a00006 mov r0, r6 106f8: eb002c71 bl 1b8c4 <__divdi3> if ( start_offset ) { 106fc: e35b0000 cmp fp, #0 10700: 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; 10704: e1a06000 mov r6, r0 if ( start_offset ) { 10708: 01a0a00b moveq sl, fp 1070c: 0a000014 beq 10764 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 ); 10710: e1a00009 mov r0, r9 10714: e1a01006 mov r1, r6 10718: e3a02000 mov r2, #0 1071c: ebfffda8 bl fdc4 assert( block_ptr ); 10720: e3500000 cmp r0, #0 10724: 0a000066 beq 108c4 */ 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; 10728: 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 ); 1072c: 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; 10730: e153000a cmp r3, sl 10734: 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 ); 10738: e1a01008 mov r1, r8 1073c: e1a02003 mov r2, r3 10740: e080000b add r0, r0, fp 10744: e58d3000 str r3, [sp] 10748: eb000658 bl 120b0 src += to_copy; 1074c: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; copied += to_copy; 10750: 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; 10754: 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; 10758: e0888003 add r8, r8, r3 block++; 1075c: e2866001 add r6, r6, #1 my_length -= to_copy; copied += to_copy; 10760: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10764: e1570004 cmp r7, r4 10768: 3a000010 bcc 107b0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1076c: e1a00009 mov r0, r9 10770: e1a01006 mov r1, r6 10774: e3a02000 mov r2, #0 10778: ebfffd91 bl fdc4 assert( block_ptr ); 1077c: e3500000 cmp r0, #0 10780: 0a000032 beq 10850 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 ); 10784: e1a01008 mov r1, r8 10788: e5900000 ldr r0, [r0] 1078c: e1a02004 mov r2, r4 10790: eb000646 bl 120b0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10794: 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; 10798: 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 ) { 1079c: 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; 107a0: e0888004 add r8, r8, r4 block++; 107a4: 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( 107a8: 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 ) { 107ac: 9affffee bls 1076c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 107b0: e3570000 cmp r7, #0 107b4: 0a00000a beq 107e4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 107b8: e1a01006 mov r1, r6 107bc: e1a00009 mov r0, r9 107c0: e3a02000 mov r2, #0 107c4: ebfffd7e bl fdc4 assert( block_ptr ); 107c8: e3500000 cmp r0, #0 107cc: 0a000030 beq 10894 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 ); 107d0: e5900000 ldr r0, [r0] 107d4: e1a01008 mov r1, r8 107d8: e1a02007 mov r2, r7 107dc: eb000633 bl 120b0 my_length = 0; copied += to_copy; 107e0: e08aa007 add sl, sl, r7 } IMFS_mtime_ctime_update( the_jnode ); 107e4: e28d000c add r0, sp, #12 107e8: e3a01000 mov r1, #0 107ec: ebffc882 bl 29fc 107f0: e59d300c ldr r3, [sp, #12] 107f4: e5893048 str r3, [r9, #72] ; 0x48 107f8: e5893044 str r3, [r9, #68] ; 0x44 return copied; } 107fc: e1a0000a mov r0, sl 10800: e28dd014 add sp, sp, #20 10804: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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 ) { 10808: e5993050 ldr r3, [r9, #80] ; 0x50 1080c: e1530001 cmp r3, r1 10810: 2affffac bcs 106c8 status = IMFS_memfile_extend( the_jnode, last_byte ); 10814: e1a00009 mov r0, r9 10818: e3a02000 mov r2, #0 1081c: ebfffeee bl 103dc if ( status ) 10820: e3500000 cmp r0, #0 10824: 0affffa7 beq 106c8 rtems_set_errno_and_return_minus_one( ENOSPC ); 10828: eb000412 bl 11878 <__errno> <== NOT EXECUTED 1082c: e3a0301c mov r3, #28 <== NOT EXECUTED 10830: e5803000 str r3, [r0] <== NOT EXECUTED 10834: e3e0a000 mvn sl, #0 <== NOT EXECUTED 10838: eaffffef b 107fc <== 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 ); 1083c: eb00040d bl 11878 <__errno> <== NOT EXECUTED 10840: e3a03016 mov r3, #22 <== NOT EXECUTED 10844: e5803000 str r3, [r0] <== NOT EXECUTED 10848: e3e0a000 mvn sl, #0 <== NOT EXECUTED 1084c: eaffffea b 107fc <== 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 ); 10850: e59f0084 ldr r0, [pc, #132] ; 108dc <== NOT EXECUTED 10854: e3a01e33 mov r1, #816 ; 0x330 <== NOT EXECUTED 10858: e59f2080 ldr r2, [pc, #128] ; 108e0 <== NOT EXECUTED 1085c: e59f3080 ldr r3, [pc, #128] ; 108e4 <== NOT EXECUTED 10860: ebfff651 bl e1ac <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 10864: e3a01fbb mov r1, #748 ; 0x2ec <== NOT EXECUTED 10868: e2811003 add r1, r1, #3 <== NOT EXECUTED 1086c: e59f0068 ldr r0, [pc, #104] ; 108dc <== NOT EXECUTED 10870: e59f2068 ldr r2, [pc, #104] ; 108e0 <== NOT EXECUTED 10874: e59f306c ldr r3, [pc, #108] ; 108e8 <== NOT EXECUTED 10878: ebfff64b bl e1ac <__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 ); 1087c: e3a01fb9 mov r1, #740 ; 0x2e4 <== NOT EXECUTED 10880: e2811003 add r1, r1, #3 <== NOT EXECUTED 10884: e59f0050 ldr r0, [pc, #80] ; 108dc <== NOT EXECUTED 10888: e59f2050 ldr r2, [pc, #80] ; 108e0 <== NOT EXECUTED 1088c: e59f3058 ldr r3, [pc, #88] ; 108ec <== NOT EXECUTED 10890: ebfff645 bl e1ac <__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 ); 10894: e3a01fd1 mov r1, #836 ; 0x344 <== NOT EXECUTED 10898: e2811002 add r1, r1, #2 <== NOT EXECUTED 1089c: e59f0038 ldr r0, [pc, #56] ; 108dc <== NOT EXECUTED 108a0: e59f2038 ldr r2, [pc, #56] ; 108e0 <== NOT EXECUTED 108a4: e59f3038 ldr r3, [pc, #56] ; 108e4 <== NOT EXECUTED 108a8: ebfff63f bl e1ac <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 108ac: e3a01e2e mov r1, #736 ; 0x2e0 <== NOT EXECUTED 108b0: e2811003 add r1, r1, #3 <== NOT EXECUTED 108b4: e59f0020 ldr r0, [pc, #32] ; 108dc <== NOT EXECUTED 108b8: e59f2020 ldr r2, [pc, #32] ; 108e0 <== NOT EXECUTED 108bc: e59f302c ldr r3, [pc, #44] ; 108f0 <== NOT EXECUTED 108c0: ebfff639 bl e1ac <__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 ); 108c4: e59f0010 ldr r0, [pc, #16] ; 108dc <== NOT EXECUTED 108c8: e3a01fc7 mov r1, #796 ; 0x31c <== NOT EXECUTED 108cc: e59f200c ldr r2, [pc, #12] ; 108e0 <== NOT EXECUTED 108d0: e59f300c ldr r3, [pc, #12] ; 108e4 <== NOT EXECUTED 108d4: ebfff634 bl e1ac <__assert_func> <== NOT EXECUTED 108d8: 0001edc8 .word 0x0001edc8 108dc: 0001ea4c .word 0x0001ea4c 108e0: 0001e1e4 .word 0x0001e1e4 108e4: 0001ead0 .word 0x0001ead0 108e8: 0001eadc .word 0x0001eadc 108ec: 0001eaa0 .word 0x0001eaa0 108f0: 0001ea94 .word 0x0001ea94 00008c60 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8c60: e92d41f0 push {r4, r5, r6, r7, r8, lr} 8c64: e24dd040 sub sp, sp, #64 ; 0x40 8c68: e1a04001 mov r4, r1 8c6c: e1a07002 mov r7, r2 8c70: e1a06003 mov r6, r3 8c74: 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 ); 8c78: eb001172 bl d248 8c7c: e28d5004 add r5, sp, #4 8c80: e1a01000 mov r1, r0 8c84: e28d303c add r3, sp, #60 ; 0x3c 8c88: e1a00008 mov r0, r8 8c8c: e1a02005 mov r2, r5 8c90: ebffff7e bl 8a90 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8c94: e2043a0f and r3, r4, #61440 ; 0xf000 8c98: e3530901 cmp r3, #16384 ; 0x4000 8c9c: 0a00001b beq 8d10 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8ca0: e3530902 cmp r3, #32768 ; 0x8000 8ca4: 03a01005 moveq r1, #5 8ca8: 0a000005 beq 8cc4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8cac: e3530a06 cmp r3, #24576 ; 0x6000 8cb0: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8cb4: 058d7028 streq r7, [sp, #40] ; 0x28 8cb8: 058d602c streq r6, [sp, #44] ; 0x2c 8cbc: 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) ) { 8cc0: 1a00000a bne 8cf0 * 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( 8cc4: e28dc028 add ip, sp, #40 ; 0x28 8cc8: e59d0058 ldr r0, [sp, #88] ; 0x58 8ccc: e1a02005 mov r2, r5 8cd0: e1a03004 mov r3, r4 8cd4: e58dc000 str ip, [sp] 8cd8: eb0009ad bl b394 new_name, mode, &info ); if ( !new_node ) 8cdc: e3500000 cmp r0, #0 8ce0: 13a00000 movne r0, #0 8ce4: 0a00000b beq 8d18 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8ce8: e28dd040 add sp, sp, #64 ; 0x40 8cec: 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)) 8cf0: e3530a01 cmp r3, #4096 ; 0x1000 8cf4: 03a01007 moveq r1, #7 8cf8: 0afffff1 beq 8cc4 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8cfc: eb000d60 bl c284 <__errno> <== NOT EXECUTED 8d00: e3a03016 mov r3, #22 <== NOT EXECUTED 8d04: e5803000 str r3, [r0] <== NOT EXECUTED 8d08: e3e00000 mvn r0, #0 <== NOT EXECUTED 8d0c: eafffff5 b 8ce8 <== NOT EXECUTED 8d10: e3a01001 mov r1, #1 8d14: eaffffea b 8cc4 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8d18: eb000d59 bl c284 <__errno> <== NOT EXECUTED 8d1c: e3a0300c mov r3, #12 <== NOT EXECUTED 8d20: e5803000 str r3, [r0] <== NOT EXECUTED 8d24: e3e00000 mvn r0, #0 <== NOT EXECUTED 8d28: eaffffee b 8ce8 <== NOT EXECUTED 0000210c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 210c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2110: e593204c ldr r2, [r3, #76] ; 0x4c 2114: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2118: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 211c: 1a000002 bne 212c /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 2120: e583005c str r0, [r3, #92] ; 0x5c 2124: e3a00000 mov r0, #0 return 0; } 2128: 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 ); 212c: eb003dd1 bl 11878 <__errno> <== NOT EXECUTED 2130: e3a03014 mov r3, #20 <== NOT EXECUTED 2134: e5803000 str r3, [r0] <== NOT EXECUTED 2138: e3e00000 mvn r0, #0 <== NOT EXECUTED 213c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00002c84 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2c84: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2c88: e2504000 subs r4, r0, #0 2c8c: 0a000055 beq 2de8 fprintf(stdout, "%s", the_jnode->name ); 2c90: e59f5164 ldr r5, [pc, #356] ; 2dfc 2c94: e5953000 ldr r3, [r5] 2c98: e284000c add r0, r4, #12 2c9c: e5931008 ldr r1, [r3, #8] 2ca0: eb00390c bl 110d8 switch( the_jnode->type ) { 2ca4: e594204c ldr r2, [r4, #76] ; 0x4c 2ca8: e2423001 sub r3, r2, #1 2cac: e3530006 cmp r3, #6 2cb0: 979ff103 ldrls pc, [pc, r3, lsl #2] 2cb4: ea000011 b 2d00 <== NOT EXECUTED 2cb8: 00002d24 .word 0x00002d24 <== NOT EXECUTED 2cbc: 00002d40 .word 0x00002d40 <== NOT EXECUTED 2cc0: 00002d5c .word 0x00002d5c <== NOT EXECUTED 2cc4: 00002d88 .word 0x00002d88 <== NOT EXECUTED 2cc8: 00002db4 .word 0x00002db4 <== NOT EXECUTED 2ccc: 00002dcc .word 0x00002dcc <== NOT EXECUTED 2cd0: 00002cd4 .word 0x00002cd4 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2cd4: e5953000 ldr r3, [r5] <== NOT EXECUTED 2cd8: e3a01001 mov r1, #1 <== NOT EXECUTED 2cdc: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2ce0: e3a02012 mov r2, #18 <== NOT EXECUTED 2ce4: e59f0114 ldr r0, [pc, #276] ; 2e00 <== NOT EXECUTED 2ce8: eb003c0f bl 11d2c <== NOT EXECUTED assert(0); 2cec: e59f0110 ldr r0, [pc, #272] ; 2e04 <== NOT EXECUTED 2cf0: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2cf4: e59f210c ldr r2, [pc, #268] ; 2e08 <== NOT EXECUTED 2cf8: e59f310c ldr r3, [pc, #268] ; 2e0c <== NOT EXECUTED 2cfc: eb00025b bl 3670 <__assert_func> <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2d00: e5953000 ldr r3, [r5] <== NOT EXECUTED 2d04: e59f1104 ldr r1, [pc, #260] ; 2e10 <== NOT EXECUTED 2d08: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2d0c: eb003890 bl 10f54 <== NOT EXECUTED assert(0); 2d10: e59f00ec ldr r0, [pc, #236] ; 2e04 <== NOT EXECUTED 2d14: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 2d18: e59f20e8 ldr r2, [pc, #232] ; 2e08 <== NOT EXECUTED 2d1c: e59f30e8 ldr r3, [pc, #232] ; 2e0c <== NOT EXECUTED 2d20: eb000252 bl 3670 <__assert_func> <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2d24: e5953000 ldr r3, [r5] 2d28: e3a0002f mov r0, #47 ; 0x2f 2d2c: e5931008 ldr r1, [r3, #8] 2d30: eb0038a3 bl 10fc4 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2d34: e59f00d8 ldr r0, [pc, #216] ; 2e14 } 2d38: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2d3c: ea003fea b 12cec case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2d40: e5952000 ldr r2, [r5] 2d44: e5943054 ldr r3, [r4, #84] ; 0x54 2d48: e5920008 ldr r0, [r2, #8] 2d4c: e59f10c4 ldr r1, [pc, #196] ; 2e18 2d50: e5942050 ldr r2, [r4, #80] ; 0x50 2d54: eb00387e bl 10f54 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 2d58: eafffff5 b 2d34 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2d5c: e5953000 ldr r3, [r5] <== NOT EXECUTED 2d60: e3a01001 mov r1, #1 <== NOT EXECUTED 2d64: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2d68: e3a02013 mov r2, #19 <== NOT EXECUTED 2d6c: e59f00a8 ldr r0, [pc, #168] ; 2e1c <== NOT EXECUTED 2d70: eb003bed bl 11d2c <== NOT EXECUTED assert(0); 2d74: e59f0088 ldr r0, [pc, #136] ; 2e04 <== NOT EXECUTED 2d78: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2d7c: e59f2084 ldr r2, [pc, #132] ; 2e08 <== NOT EXECUTED 2d80: e59f3084 ldr r3, [pc, #132] ; 2e0c <== NOT EXECUTED 2d84: eb000239 bl 3670 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2d88: e5953000 ldr r3, [r5] <== NOT EXECUTED 2d8c: e3a01001 mov r1, #1 <== NOT EXECUTED 2d90: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2d94: e3a02013 mov r2, #19 <== NOT EXECUTED 2d98: e59f007c ldr r0, [pc, #124] ; 2e1c <== NOT EXECUTED 2d9c: eb003be2 bl 11d2c <== NOT EXECUTED assert(0); 2da0: e59f005c ldr r0, [pc, #92] ; 2e04 <== NOT EXECUTED 2da4: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2da8: e59f2058 ldr r2, [pc, #88] ; 2e08 <== NOT EXECUTED 2dac: e59f3058 ldr r3, [pc, #88] ; 2e0c <== NOT EXECUTED 2db0: eb00022e bl 3670 <__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 ")", 2db4: e5953000 ldr r3, [r5] 2db8: e5942050 ldr r2, [r4, #80] ; 0x50 2dbc: e5930008 ldr r0, [r3, #8] 2dc0: e59f1058 ldr r1, [pc, #88] ; 2e20 2dc4: eb003862 bl 10f54 (uint32_t)the_jnode->info.file.size ); #endif break; 2dc8: eaffffd9 b 2d34 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)", 2dcc: e5952000 ldr r2, [r5] <== NOT EXECUTED 2dd0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2dd4: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2dd8: e59f1044 ldr r1, [pc, #68] ; 2e24 <== NOT EXECUTED 2ddc: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 2de0: eb00385b bl 10f54 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2de4: eaffffd2 b 2d34 <== NOT EXECUTED void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 2de8: e59f0014 ldr r0, [pc, #20] ; 2e04 <== NOT EXECUTED 2dec: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED 2df0: e59f2010 ldr r2, [pc, #16] ; 2e08 <== NOT EXECUTED 2df4: e59f302c ldr r3, [pc, #44] ; 2e28 <== NOT EXECUTED 2df8: eb00021c bl 3670 <__assert_func> <== NOT EXECUTED 2dfc: 00020c00 .word 0x00020c00 2e00: 000225bc .word 0x000225bc 2e04: 00022520 .word 0x00022520 2e08: 00021158 .word 0x00021158 2e0c: 0002251c .word 0x0002251c 2e10: 000225d0 .word 0x000225d0 2e14: 00022510 .word 0x00022510 2e18: 00022578 .word 0x00022578 2e1c: 000225a8 .word 0x000225a8 2e20: 0002259c .word 0x0002259c 2e24: 0002258c .word 0x0002258c 2e28: 0002256c .word 0x0002256c 0000214c : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 214c: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 2150: e593004c ldr r0, [r3, #76] ; 0x4c 2154: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 2158: e92d4010 push {r4, lr} IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 215c: 1a000013 bne 21b0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2160: e3520000 cmp r2, #0 2164: 0a00000f beq 21a8 2168: e5930050 ldr r0, [r3, #80] ; 0x50 216c: e5d0c000 ldrb ip, [r0] 2170: e35c0000 cmp ip, #0 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 2174: 13a04000 movne r4, #0 2178: 11a00004 movne r0, r4 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 217c: 0a000009 beq 21a8 2180: e2800001 add r0, r0, #1 2184: e1520000 cmp r2, r0 buf[i] = node->info.sym_link.name[i]; 2188: 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++ ) 218c: e1a04000 mov r4, r0 2190: 98bd8010 popls {r4, pc} 2194: e593c050 ldr ip, [r3, #80] ; 0x50 2198: e7dcc000 ldrb ip, [ip, r0] 219c: e35c0000 cmp ip, #0 21a0: 1afffff6 bne 2180 21a4: e8bd8010 pop {r4, pc} 21a8: e3a00000 mov r0, #0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 21ac: 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 ); 21b0: eb003db0 bl 11878 <__errno> <== NOT EXECUTED 21b4: e3a03016 mov r3, #22 <== NOT EXECUTED 21b8: e5803000 str r3, [r0] <== NOT EXECUTED 21bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 21c0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 000021c4 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 21c4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 21c8: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 21cc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 21d0: e1a01003 mov r1, r3 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 21d4: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 21d8: e284000c add r0, r4, #12 <== NOT EXECUTED 21dc: e3a02020 mov r2, #32 <== NOT EXECUTED 21e0: eb004195 bl 1283c <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 21e4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 21e8: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 21ec: 11a00004 movne r0, r4 <== NOT EXECUTED 21f0: 1b0012e2 blne 6d80 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 21f4: e5953000 ldr r3, [r5] <== 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 ); 21f8: e1a01004 mov r1, r4 <== NOT EXECUTED 21fc: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 2200: e5843008 str r3, [r4, #8] <== NOT EXECUTED 2204: eb0012d2 bl 6d54 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 2208: e1a0000d mov r0, sp <== NOT EXECUTED 220c: e3a01000 mov r1, #0 <== NOT EXECUTED 2210: eb0001f9 bl 29fc <== NOT EXECUTED 2214: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 2218: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 221c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 2220: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2224: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00008df0 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8df0: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 8df4: e593204c ldr r2, [r3, #76] ; 0x4c 8df8: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8dfc: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8e00: e3520005 cmp r2, #5 8e04: 979ff102 ldrls pc, [pc, r2, lsl #2] 8e08: ea000020 b 8e90 <== NOT EXECUTED 8e0c: 00008e7c .word 0x00008e7c <== NOT EXECUTED 8e10: 00008e90 .word 0x00008e90 <== NOT EXECUTED 8e14: 00008e24 .word 0x00008e24 <== NOT EXECUTED 8e18: 00008ea4 .word 0x00008ea4 <== NOT EXECUTED 8e1c: 00008ea4 .word 0x00008ea4 <== NOT EXECUTED 8e20: 00008e24 .word 0x00008e24 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8e24: e3a0b000 mov fp, #0 <== NOT EXECUTED 8e28: e3a0c000 mov ip, #0 <== NOT EXECUTED 8e2c: e581b020 str fp, [r1, #32] <== NOT EXECUTED 8e30: e581c024 str ip, [r1, #36] ; 0x24 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8e34: e5932038 ldr r2, [r3, #56] ; 0x38 8e38: 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; 8e3c: e5932040 ldr r2, [r3, #64] ; 0x40 8e40: e5812028 str r2, [r1, #40] ; 0x28 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8e44: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34 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; 8e48: e5932044 ldr r2, [r3, #68] ; 0x44 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8e4c: e1c1c1b0 strh ip, [r1, #16] 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; 8e50: e5812030 str r2, [r1, #48] ; 0x30 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8e54: e5932030 ldr r2, [r3, #48] ; 0x30 8e58: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8e5c: e1d323bc ldrh r2, [r3, #60] ; 0x3c 8e60: 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; 8e64: 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; 8e68: 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; 8e6c: e5810038 str r0, [r1, #56] ; 0x38 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; 8e70: 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; 8e74: e3a00000 mov r0, #0 return 0; } 8e78: e8bd8800 pop {fp, 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 ); 8e7c: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 8e80: e5932050 ldr r2, [r3, #80] ; 0x50 8e84: e581001c str r0, [r1, #28] 8e88: e5812018 str r2, [r1, #24] break; 8e8c: eaffffe8 b 8e34 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8e90: eb000cfb bl c284 <__errno> <== NOT EXECUTED 8e94: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8e98: e5803000 str r3, [r0] <== NOT EXECUTED 8e9c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8ea0: e8bd8800 pop {fp, 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; 8ea4: e283c050 add ip, r3, #80 ; 0x50 8ea8: e89c1800 ldm ip, {fp, ip} 8eac: e581b020 str fp, [r1, #32] 8eb0: e581c024 str ip, [r1, #36] ; 0x24 break; 8eb4: eaffffde b 8e34 00002228 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 2228: e92d40f0 push {r4, r5, r6, r7, lr} 222c: e1a06000 mov r6, r0 2230: 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 ); 2234: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 2238: e1a07002 mov r7, r2 223c: 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 ); 2240: eb004165 bl 127dc 2244: e28d4004 add r4, sp, #4 2248: e1a01000 mov r1, r0 224c: e1a02004 mov r2, r4 2250: e28d303c add r3, sp, #60 ; 0x3c 2254: e1a00007 mov r0, r7 2258: eb002f38 bl df40 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 225c: e1a00005 mov r0, r5 2260: eb004149 bl 1278c if (info.sym_link.name == NULL) { 2264: 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); 2268: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 226c: 0a00000e beq 22ac * 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( 2270: e3a03ca2 mov r3, #41472 ; 0xa200 2274: e28dc028 add ip, sp, #40 ; 0x28 2278: e1a00006 mov r0, r6 227c: e1a02004 mov r2, r4 2280: e2433001 sub r3, r3, #1 2284: e3a01004 mov r1, #4 2288: e58dc000 str ip, [sp] 228c: eb002bd7 bl d1f0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2290: e3500000 cmp r0, #0 2294: 13a00000 movne r0, #0 2298: 0a000001 beq 22a4 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 229c: e28dd040 add sp, sp, #64 ; 0x40 22a0: 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); 22a4: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 22a8: eb0001aa bl 2958 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 22ac: eb003d71 bl 11878 <__errno> <== NOT EXECUTED 22b0: e3a0300c mov r3, #12 <== NOT EXECUTED 22b4: e5803000 str r3, [r0] <== NOT EXECUTED 22b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 22bc: eafffff6 b 229c <== NOT EXECUTED 000022c0 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 22c0: 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; 22c4: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 22c8: e595304c ldr r3, [r5, #76] ; 0x4c 22cc: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 22d0: e24dd01c sub sp, sp, #28 22d4: e1a04001 mov r4, r1 22d8: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 22dc: 0a000006 beq 22fc /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 22e0: e1a00006 mov r0, r6 22e4: e1a01004 mov r1, r4 22e8: e5943008 ldr r3, [r4, #8] 22ec: e1a0e00f mov lr, pc 22f0: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 22f4: e28dd01c add sp, sp, #28 22f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 22fc: e595e050 ldr lr, [r5, #80] ; 0x50 2300: e35e0000 cmp lr, #0 2304: 0a00001f beq 2388 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2308: e1a07001 mov r7, r1 230c: e8b7000f ldm r7!, {r0, r1, r2, r3} 2310: e1a0c00d mov ip, sp 2314: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 2318: e28d801c add r8, sp, #28 231c: 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; 2320: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2324: 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; 2328: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 232c: eb002c01 bl d338 /* * 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) 2330: e5953050 ldr r3, [r5, #80] ; 0x50 2334: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2338: e3520001 cmp r2, #1 233c: 0a000008 beq 2364 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2340: e2422001 sub r2, r2, #1 2344: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2348: e28d0014 add r0, sp, #20 234c: e3a01000 mov r1, #0 2350: eb0001a9 bl 29fc 2354: e5953050 ldr r3, [r5, #80] ; 0x50 2358: e59d2014 ldr r2, [sp, #20] 235c: e5832048 str r2, [r3, #72] ; 0x48 2360: eaffffde b 22e0 * 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 ); 2364: e1a0100d mov r1, sp 2368: e1a00006 mov r0, r6 236c: e59d3008 ldr r3, [sp, #8] 2370: e1a0e00f mov lr, pc 2374: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 2378: e3500000 cmp r0, #0 237c: 13e00000 mvnne r0, #0 2380: 0affffd6 beq 22e0 2384: eaffffda b 22f4 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 2388: eb003d3a bl 11878 <__errno> <== NOT EXECUTED 238c: e3a03016 mov r3, #22 <== NOT EXECUTED 2390: e5803000 str r3, [r0] <== NOT EXECUTED 2394: e3e00000 mvn r0, #0 <== NOT EXECUTED 2398: eaffffd5 b 22f4 <== NOT EXECUTED 0000239c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 239c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 23a0: e593204c ldr r2, [r3, #76] ; 0x4c 23a4: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 23a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 23ac: 1a000005 bne 23c8 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 23b0: e593205c ldr r2, [r3, #92] ; 0x5c 23b4: e3520000 cmp r2, #0 23b8: 0a000007 beq 23dc /* * 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; 23bc: e3a00000 mov r0, #0 23c0: e583005c str r0, [r3, #92] ; 0x5c return 0; } 23c4: 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 ); 23c8: eb003d2a bl 11878 <__errno> <== NOT EXECUTED 23cc: e3a03014 mov r3, #20 <== NOT EXECUTED 23d0: e5803000 str r3, [r0] <== NOT EXECUTED 23d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 23d8: 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 */ 23dc: eb003d25 bl 11878 <__errno> <== NOT EXECUTED 23e0: e3a03016 mov r3, #22 <== NOT EXECUTED 23e4: e5803000 str r3, [r0] <== NOT EXECUTED 23e8: e3e00000 mvn r0, #0 <== NOT EXECUTED 23ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001524 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1524: e59f30d0 ldr r3, [pc, #208] ; 15fc 1528: e5933000 ldr r3, [r3] 152c: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1530: e92d4070 push {r4, r5, r6, lr} 1534: e1a05000 mov r5, r0 1538: e1a06001 mov r6, r1 153c: e1a04002 mov r4, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 1540: 11a0e00f movne lr, pc 1544: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1548: eb001fea bl 94f8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 154c: e59f30ac ldr r3, [pc, #172] ; 1600 1550: e5933000 ldr r3, [r3] 1554: e3530000 cmp r3, #0 1558: 0a000006 beq 1578 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 155c: e1a00005 mov r0, r5 <== NOT EXECUTED 1560: e1a01004 mov r1, r4 <== NOT EXECUTED 1564: e1a0e00f mov lr, pc <== NOT EXECUTED 1568: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 156c: e0856006 add r6, r5, r6 <== NOT EXECUTED 1570: e0606006 rsb r6, r0, r6 <== NOT EXECUTED 1574: 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 ( 1578: e59f4084 ldr r4, [pc, #132] ; 1604 157c: e5d41000 ldrb r1, [r4] 1580: e3510000 cmp r1, #0 1584: 1a000018 bne 15ec !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1588: e59f3078 ldr r3, [pc, #120] ; 1608 158c: e5d33028 ldrb r3, [r3, #40] ; 0x28 1590: e3530000 cmp r3, #0 1594: 1a00000e bne 15d4 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1598: e59f406c ldr r4, [pc, #108] ; 160c 159c: e1a01005 mov r1, r5 15a0: e1a02006 mov r2, r6 15a4: e5940000 ldr r0, [r4] 15a8: e3a03004 mov r3, #4 15ac: eb000fed bl 5568 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 15b0: e3500000 cmp r0, #0 15b4: 0a00000e beq 15f4 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 15b8: e59f5050 ldr r5, [pc, #80] ; 1610 15bc: e5940000 ldr r0, [r4] 15c0: e5954000 ldr r4, [r5] 15c4: eb0012cd bl 6100 <_Protected_heap_Get_size> 15c8: e0800004 add r0, r0, r4 15cc: e5850000 str r0, [r5] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 15d0: e8bd8070 pop {r4, r5, r6, pc} if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 15d4: e1a00005 mov r0, r5 15d8: e1a02006 mov r2, r6 15dc: eb002d72 bl cbac * 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 ) { 15e0: e5d43000 ldrb r3, [r4] 15e4: e3530000 cmp r3, #0 15e8: 0affffea beq 1598 15ec: e59f4018 ldr r4, [pc, #24] ; 160c 15f0: eafffff0 b 15b8 heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 15f4: e280001a add r0, r0, #26 <== NOT EXECUTED 15f8: eb000dfa bl 4de8 <== NOT EXECUTED 15fc: 00018fc8 .word 0x00018fc8 1600: 00018fcc .word 0x00018fcc 1604: 00018fc5 .word 0x00018fc5 1608: 00017c04 .word 0x00017c04 160c: 00017b5c .word 0x00017b5c 1610: 00019174 .word 0x00019174 000039e4 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 39e4: 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 ) 39e8: e250a000 subs sl, r0, #0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 39ec: e24dd010 sub sp, sp, #16 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 39f0: 0a000031 beq 3abc <== NOT EXECUTED return; if ( !print_handler ) 39f4: e59f4110 ldr r4, [pc, #272] ; 3b0c <== NOT EXECUTED 39f8: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED 39fc: e3570000 cmp r7, #0 <== NOT EXECUTED 3a00: 0a00002d beq 3abc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 3a04: e37a0001 cmn sl, #1 <== NOT EXECUTED 3a08: 0a000032 beq 3ad8 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 3a0c: e59a80f0 ldr r8, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 3a10: e28a50c0 add r5, sl, #192 ; 0xc0 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 3a14: e8950240 ldm r5, {r6, r9} <== NOT EXECUTED 3a18: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 3a1c: e2466010 sub r6, r6, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 3a20: e1a00009 mov r0, r9 <== NOT EXECUTED 3a24: e1a01006 mov r1, r6 <== NOT EXECUTED 3a28: ebffffd7 bl 398c <== NOT EXECUTED if ( high_water_mark ) 3a2c: e250b000 subs fp, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 3a30: 10899006 addne r9, r9, r6 <== NOT EXECUTED 3a34: 106bb009 rsbne fp, fp, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 3a38: e35a0000 cmp sl, #0 <== NOT EXECUTED 3a3c: 0a00002c beq 3af4 <== NOT EXECUTED (*print_handler)( 3a40: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 3a44: e28d2008 add r2, sp, #8 <== NOT EXECUTED 3a48: e3a01005 mov r1, #5 <== NOT EXECUTED 3a4c: e1a0000a mov r0, sl <== NOT EXECUTED 3a50: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED 3a54: eb001857 bl 9bb8 <== NOT EXECUTED 3a58: e1a0200a mov r2, sl <== NOT EXECUTED 3a5c: e1a03000 mov r3, r0 <== NOT EXECUTED 3a60: e59f10a8 ldr r1, [pc, #168] ; 3b10 <== NOT EXECUTED 3a64: e1a00009 mov r0, r9 <== NOT EXECUTED 3a68: e1a0e00f mov lr, pc <== NOT EXECUTED 3a6c: e12fff17 bx r7 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 3a70: e5953000 ldr r3, [r5] <== NOT EXECUTED 3a74: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 3a78: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3a7c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3a80: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3a84: e58d8000 str r8, [sp] <== NOT EXECUTED 3a88: e58d6004 str r6, [sp, #4] <== NOT EXECUTED 3a8c: e59f1080 ldr r1, [pc, #128] ; 3b14 <== NOT EXECUTED 3a90: e1a0e00f mov lr, pc <== NOT EXECUTED 3a94: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 3a98: e5943000 ldr r3, [r4] <== NOT EXECUTED 3a9c: e3530000 cmp r3, #0 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 3aa0: e59f3064 ldr r3, [pc, #100] ; 3b0c <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 3aa4: 0a000006 beq 3ac4 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 3aa8: e1a0200b mov r2, fp <== NOT EXECUTED 3aac: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3ab0: e59f1060 ldr r1, [pc, #96] ; 3b18 <== NOT EXECUTED 3ab4: e1a0e00f mov lr, pc <== NOT EXECUTED 3ab8: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED } } 3abc: e28dd010 add sp, sp, #16 <== NOT EXECUTED 3ac0: 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" ); 3ac4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3ac8: e59f104c ldr r1, [pc, #76] ; 3b1c <== NOT EXECUTED 3acc: e1a0e00f mov lr, pc <== NOT EXECUTED 3ad0: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED 3ad4: eafffff8 b 3abc <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 3ad8: e59f5040 ldr r5, [pc, #64] ; 3b20 <== NOT EXECUTED 3adc: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 3ae0: e3530000 cmp r3, #0 <== NOT EXECUTED 3ae4: 13a08000 movne r8, #0 <== NOT EXECUTED 3ae8: 11a0a008 movne sl, r8 <== NOT EXECUTED 3aec: 1affffc8 bne 3a14 <== NOT EXECUTED 3af0: eafffff1 b 3abc <== 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 ); 3af4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3af8: e59f1024 ldr r1, [pc, #36] ; 3b24 <== NOT EXECUTED 3afc: e3e02000 mvn r2, #0 <== NOT EXECUTED 3b00: e1a0e00f mov lr, pc <== NOT EXECUTED 3b04: e12fff17 bx r7 <== NOT EXECUTED 3b08: eaffffd8 b 3a70 <== NOT EXECUTED 3b0c: 00062934 .word 0x00062934 3b10: 0005bcc0 .word 0x0005bcc0 3b14: 0005bce0 .word 0x0005bce0 3b18: 0005bd10 .word 0x0005bd10 3b1c: 0005bd00 .word 0x0005bd00 3b20: 00065420 .word 0x00065420 3b24: 0005bcd0 .word 0x0005bcd0 0000398c : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 398c: e2803010 add r3, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 3990: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 3994: e0831001 add r1, r3, r1 <== NOT EXECUTED 3998: e1530001 cmp r3, r1 <== NOT EXECUTED 399c: 2a00000c bcs 39d4 <== NOT EXECUTED if (*base != U32_PATTERN) 39a0: e3a02ca6 mov r2, #42496 ; 0xa600 <== NOT EXECUTED 39a4: e242205b sub r2, r2, #91 ; 0x5b <== NOT EXECUTED 39a8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 39ac: e1822802 orr r2, r2, r2, lsl #16 <== NOT EXECUTED 39b0: e1500002 cmp r0, r2 <== NOT EXECUTED 39b4: 0a000003 beq 39c8 <== NOT EXECUTED 39b8: ea000007 b 39dc <== NOT EXECUTED 39bc: e5932000 ldr r2, [r3] <== NOT EXECUTED 39c0: e1520000 cmp r2, r0 <== NOT EXECUTED 39c4: 1a000004 bne 39dc <== 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++) 39c8: e2833004 add r3, r3, #4 <== NOT EXECUTED 39cc: e1510003 cmp r1, r3 <== NOT EXECUTED 39d0: 8afffff9 bhi 39bc <== NOT EXECUTED 39d4: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 39d8: e12fff1e bx lr <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 39dc: e1a00003 mov r0, r3 <== NOT EXECUTED 39e0: e12fff1e bx lr <== NOT EXECUTED 00009c78 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9c78: e59f3154 ldr r3, [pc, #340] ; 9dd4 <_CORE_mutex_Seize_interrupt_trylock+0x15c> 9c7c: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9c80: e3a02000 mov r2, #0 9c84: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9c88: e590c050 ldr ip, [r0, #80] ; 0x50 9c8c: 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 ) { 9c90: e92d4070 push {r4, r5, r6, lr} 9c94: 0a00000e beq 9cd4 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; 9c98: 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; 9c9c: 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; 9ca0: e5935008 ldr r5, [r3, #8] the_mutex->nest_count = 1; 9ca4: e3a04001 mov r4, #1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ca8: 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; 9cac: 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; 9cb0: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 9cb4: e5804054 str r4, [r0, #84] ; 0x54 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9cb8: 0a00000a beq 9ce8 <_CORE_mutex_Seize_interrupt_trylock+0x70> 9cbc: e35c0003 cmp ip, #3 9cc0: 0a000019 beq 9d2c <_CORE_mutex_Seize_interrupt_trylock+0xb4> 9cc4: e5913000 ldr r3, [r1] 9cc8: e129f003 msr CPSR_fc, r3 9ccc: e3a00000 mov r0, #0 9cd0: 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 ) ) { 9cd4: e590205c ldr r2, [r0, #92] ; 0x5c 9cd8: e1530002 cmp r3, r2 9cdc: 0a000008 beq 9d04 <_CORE_mutex_Seize_interrupt_trylock+0x8c> 9ce0: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9ce4: 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++; 9ce8: e593201c ldr r2, [r3, #28] 9cec: e2822001 add r2, r2, #1 9cf0: e583201c str r2, [r3, #28] 9cf4: e5913000 ldr r3, [r1] 9cf8: e129f003 msr CPSR_fc, r3 9cfc: e3a00000 mov r0, #0 9d00: 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 ) { 9d04: e5902040 ldr r2, [r0, #64] ; 0x40 9d08: e3520000 cmp r2, #0 9d0c: 1a000017 bne 9d70 <_CORE_mutex_Seize_interrupt_trylock+0xf8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9d10: e5903054 ldr r3, [r0, #84] ; 0x54 9d14: e2833001 add r3, r3, #1 9d18: e5803054 str r3, [r0, #84] ; 0x54 9d1c: e5913000 ldr r3, [r1] 9d20: e129f003 msr CPSR_fc, r3 9d24: e3a00000 mov r0, #0 9d28: 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++; 9d2c: e593c01c ldr ip, [r3, #28] 9d30: e08c5004 add r5, ip, r4 9d34: e583501c str r5, [r3, #28] { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 9d38: e5935014 ldr r5, [r3, #20] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9d3c: e590604c ldr r6, [r0, #76] ; 0x4c current = executing->current_priority; if ( current == ceiling ) { 9d40: e1560005 cmp r6, r5 9d44: 0a00001e beq 9dc4 <_CORE_mutex_Seize_interrupt_trylock+0x14c> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 9d48: 3a000010 bcc 9d90 <_CORE_mutex_Seize_interrupt_trylock+0x118> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9d4c: e3a05006 mov r5, #6 9d50: e5835034 str r5, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9d54: 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; 9d58: e5804050 str r4, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9d5c: e583c01c str ip, [r3, #28] 9d60: e5913000 ldr r3, [r1] 9d64: e129f003 msr CPSR_fc, r3 9d68: e3a00000 mov r0, #0 9d6c: 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 ) { 9d70: e3520001 cmp r2, #1 9d74: 1affffd9 bne 9ce0 <_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; 9d78: e3a02002 mov r2, #2 <== NOT EXECUTED 9d7c: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED 9d80: e5913000 ldr r3, [r1] <== NOT EXECUTED 9d84: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 9d88: e3a00000 mov r0, #0 <== NOT EXECUTED 9d8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9d90: e59f3040 ldr r3, [pc, #64] ; 9dd8 <_CORE_mutex_Seize_interrupt_trylock+0x160> 9d94: e5932000 ldr r2, [r3] 9d98: e2822001 add r2, r2, #1 9d9c: e5832000 str r2, [r3] 9da0: e5913000 ldr r3, [r1] 9da4: e129f003 msr CPSR_fc, r3 } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9da8: e3a02000 mov r2, #0 9dac: e590104c ldr r1, [r0, #76] ; 0x4c 9db0: e590005c ldr r0, [r0, #92] ; 0x5c 9db4: ebfff0e7 bl 6158 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9db8: ebfff251 bl 6704 <_Thread_Enable_dispatch> 9dbc: e3a00000 mov r0, #0 9dc0: e8bd8070 pop {r4, r5, r6, pc} 9dc4: e5913000 ldr r3, [r1] 9dc8: e129f003 msr CPSR_fc, r3 9dcc: e3a00000 mov r0, #0 9dd0: e8bd8070 pop {r4, r5, r6, pc} 9dd4: 00019380 .word 0x00019380 9dd8: 000192cc .word 0x000192cc 0000431c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 431c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 4320: e5901100 ldr r1, [r0, #256] ; 0x100 option_set = (rtems_option) the_thread->Wait.option; 4324: e5905030 ldr r5, [r0, #48] ; 0x30 */ void _Event_Surrender( Thread_Control *the_thread ) { 4328: e1a04000 mov r4, r0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 432c: e10f0000 mrs r0, CPSR 4330: e3803080 orr r3, r0, #128 ; 0x80 4334: e129f003 msr CPSR_fc, r3 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 4338: e5912000 ldr r2, [r1] event_condition = (rtems_event_set) the_thread->Wait.count; 433c: e5943024 ldr r3, [r4, #36] ; 0x24 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4340: e013c002 ands ip, r3, r2 4344: 0a000023 beq 43d8 <_Event_Surrender+0xbc> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4348: e59f6110 ldr r6, [pc, #272] ; 4460 <_Event_Surrender+0x144> 434c: e5966000 ldr r6, [r6] 4350: e3560000 cmp r6, #0 4354: 0a000003 beq 4368 <_Event_Surrender+0x4c> 4358: e59f6104 ldr r6, [pc, #260] ; 4464 <_Event_Surrender+0x148> 435c: e5966000 ldr r6, [r6] 4360: e1540006 cmp r4, r6 4364: 0a000028 beq 440c <_Event_Surrender+0xf0> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4368: e5946010 ldr r6, [r4, #16] 436c: e3160c01 tst r6, #256 ; 0x100 4370: 0a000016 beq 43d0 <_Event_Surrender+0xb4> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 4374: e153000c cmp r3, ip 4378: 0a000001 beq 4384 <_Event_Surrender+0x68> 437c: e3150002 tst r5, #2 4380: 0a000012 beq 43d0 <_Event_Surrender+0xb4> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4384: e5943028 ldr r3, [r4, #40] ; 0x28 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 4388: e1c2200c bic r2, r2, ip 438c: e5812000 str r2, [r1] the_thread->Wait.count = 0; 4390: e3a02000 mov r2, #0 4394: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4398: e583c000 str ip, [r3] static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 439c: e10f3000 mrs r3, CPSR 43a0: e129f000 msr CPSR_fc, r0 43a4: e129f003 msr CPSR_fc, r3 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 43a8: e5943050 ldr r3, [r4, #80] ; 0x50 43ac: e3530002 cmp r3, #2 43b0: 0a00000a beq 43e0 <_Event_Surrender+0xc4> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 43b4: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 43b8: e3a01201 mov r1, #268435456 ; 0x10000000 43bc: e2811bff add r1, r1, #261120 ; 0x3fc00 43c0: e1a00004 mov r0, r4 43c4: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 43c8: e8bd40f0 pop {r4, r5, r6, r7, lr} 43cc: ea0007ca b 62fc <_Thread_Clear_state> 43d0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 43d4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 43d8: e129f000 msr CPSR_fc, r0 43dc: e8bd80f0 pop {r4, r5, r6, r7, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 43e0: e3a03003 mov r3, #3 43e4: e5843050 str r3, [r4, #80] ; 0x50 43e8: e129f000 msr CPSR_fc, r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); 43ec: e2840048 add r0, r4, #72 ; 0x48 43f0: eb000d55 bl 794c <_Watchdog_Remove> 43f4: e3a01201 mov r1, #268435456 ; 0x10000000 43f8: e2811bff add r1, r1, #261120 ; 0x3fc00 43fc: e1a00004 mov r0, r4 4400: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 4404: e8bd40f0 pop {r4, r5, r6, r7, lr} 4408: ea0007bb b 62fc <_Thread_Clear_state> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 440c: e59f6054 ldr r6, [pc, #84] ; 4468 <_Event_Surrender+0x14c> 4410: e5967000 ldr r7, [r6] /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4414: e3570002 cmp r7, #2 4418: 0a000002 beq 4428 <_Event_Surrender+0x10c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 441c: e5967000 ldr r7, [r6] /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4420: e3570001 cmp r7, #1 4424: 1affffcf bne 4368 <_Event_Surrender+0x4c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4428: e153000c cmp r3, ip 442c: 0a000001 beq 4438 <_Event_Surrender+0x11c> 4430: e3150002 tst r5, #2 4434: 0a000007 beq 4458 <_Event_Surrender+0x13c> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4438: e1c2200c bic r2, r2, ip 443c: e5812000 str r2, [r1] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4440: e5943028 ldr r3, [r4, #40] ; 0x28 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4444: e3a02003 mov r2, #3 4448: e5862000 str r2, [r6] _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 444c: e3a02000 mov r2, #0 4450: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4454: e583c000 str ip, [r3] 4458: e129f000 msr CPSR_fc, r0 445c: e8bd80f0 pop {r4, r5, r6, r7, pc} 4460: 0001935c .word 0x0001935c 4464: 00019380 .word 0x00019380 4468: 000194cc .word 0x000194cc 00009ec4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 9ec4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 9ec8: 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; 9ecc: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 9ed0: e24dd01c sub sp, sp, #28 9ed4: 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 ) { 9ed8: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 9edc: 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 ) { 9ee0: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 9ee4: 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; 9ee8: 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; 9eec: e58d200c str r2, [sp, #12] uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 9ef0: 2a000076 bcs a0d0 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 9ef4: e3530000 cmp r3, #0 9ef8: 1a000072 bne a0c8 <_Heap_Allocate_aligned_with_boundary+0x204> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 9efc: e157000a cmp r7, sl 9f00: 03a06000 moveq r6, #0 9f04: 0a000074 beq a0dc <_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; 9f08: e59d300c ldr r3, [sp, #12] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 9f0c: 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; 9f10: e2833007 add r3, r3, #7 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 9f14: 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; 9f18: e58d3010 str r3, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 9f1c: e58d1014 str r1, [sp, #20] 9f20: ea000004 b 9f38 <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { 9f24: e3540000 cmp r4, #0 9f28: 1a000059 bne a094 <_Heap_Allocate_aligned_with_boundary+0x1d0> break; } block = block->next; 9f2c: e59aa008 ldr sl, [sl, #8] if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 9f30: e157000a cmp r7, sl 9f34: 0a000068 beq a0dc <_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 ) { 9f38: e59a9004 ldr r9, [sl, #4] 9f3c: e59d2000 ldr r2, [sp] 9f40: e1520009 cmp r2, r9 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 9f44: 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 ) { 9f48: 2afffff7 bcs 9f2c <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { 9f4c: 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; 9f50: 028a4008 addeq r4, sl, #8 9f54: 0afffff2 beq 9f24 <_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; 9f58: 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; 9f5c: e3c99001 bic r9, r9, #1 9f60: 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; 9f64: 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; 9f68: e59d2010 ldr r2, [sp, #16] uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 9f6c: 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; 9f70: e58d3004 str r3, [sp, #4] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 9f74: 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; 9f78: e0633002 rsb r3, r3, r2 9f7c: e1a01008 mov r1, r8 9f80: e0839009 add r9, r3, r9 9f84: eb002e75 bl 15960 <__umodsi3> 9f88: 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; 9f8c: 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 ) { 9f90: e1590004 cmp r9, r4 9f94: e58d3008 str r3, [sp, #8] 9f98: 2a000003 bcs 9fac <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 9f9c: e1a00009 mov r0, r9 9fa0: e1a01008 mov r1, r8 9fa4: eb002e6d bl 15960 <__umodsi3> 9fa8: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 9fac: e35b0000 cmp fp, #0 9fb0: 0a000025 beq a04c <_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; 9fb4: e0849005 add r9, r4, r5 9fb8: e1a00009 mov r0, r9 9fbc: e1a0100b mov r1, fp 9fc0: eb002e66 bl 15960 <__umodsi3> 9fc4: 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 ) { 9fc8: e1590000 cmp r9, r0 9fcc: 93a03000 movls r3, #0 9fd0: 83a03001 movhi r3, #1 9fd4: e1540000 cmp r4, r0 9fd8: 23a03000 movcs r3, #0 9fdc: e3530000 cmp r3, #0 9fe0: 0a000019 beq a04c <_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; 9fe4: e59d1008 ldr r1, [sp, #8] 9fe8: 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 ) { 9fec: e1590000 cmp r9, r0 9ff0: 958d6018 strls r6, [sp, #24] 9ff4: 9a000002 bls a004 <_Heap_Allocate_aligned_with_boundary+0x140> 9ff8: eaffffcb b 9f2c <_Heap_Allocate_aligned_with_boundary+0x68> 9ffc: e1590000 cmp r9, r0 a000: 8a000037 bhi a0e4 <_Heap_Allocate_aligned_with_boundary+0x220> return 0; } alloc_begin = boundary_line - alloc_size; a004: e0654000 rsb r4, r5, r0 a008: e1a01008 mov r1, r8 a00c: e1a00004 mov r0, r4 a010: eb002e52 bl 15960 <__umodsi3> a014: e0604004 rsb r4, r0, r4 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a018: e0846005 add r6, r4, r5 a01c: e1a00006 mov r0, r6 a020: e1a0100b mov r1, fp a024: eb002e4d bl 15960 <__umodsi3> a028: 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 ) { a02c: e1560000 cmp r6, r0 a030: 93a03000 movls r3, #0 a034: 83a03001 movhi r3, #1 a038: e1540000 cmp r4, r0 a03c: 23a03000 movcs r3, #0 a040: e3530000 cmp r3, #0 a044: 1affffec bne 9ffc <_Heap_Allocate_aligned_with_boundary+0x138> a048: 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 ) { a04c: e59d2008 ldr r2, [sp, #8] a050: e1520004 cmp r2, r4 a054: 8affffb4 bhi 9f2c <_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; a058: e59d100c ldr r1, [sp, #12] a05c: e1a00004 mov r0, r4 a060: eb002e3e bl 15960 <__umodsi3> a064: e26a94ff rsb r9, sl, #-16777216 ; 0xff000000 a068: e28998ff add r9, r9, #16711680 ; 0xff0000 a06c: e2899cff add r9, r9, #65280 ; 0xff00 a070: e28990f8 add r9, r9, #248 ; 0xf8 a074: e0899004 add r9, r9, r4 if ( free_size >= min_block_size || free_size == 0 ) { a078: e59d1004 ldr r1, [sp, #4] a07c: e0603009 rsb r3, r0, r9 a080: e1590000 cmp r9, r0 a084: 11510003 cmpne r1, r3 a088: 8affffa7 bhi 9f2c <_Heap_Allocate_aligned_with_boundary+0x68> boundary ); } } if ( alloc_begin != 0 ) { a08c: e3540000 cmp r4, #0 a090: 0affffa5 beq 9f2c <_Heap_Allocate_aligned_with_boundary+0x68> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; a094: e597304c ldr r3, [r7, #76] ; 0x4c a098: e0833006 add r3, r3, r6 a09c: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a0a0: e1a0100a mov r1, sl a0a4: e1a03005 mov r3, r5 a0a8: e1a00007 mov r0, r7 a0ac: e1a02004 mov r2, r4 a0b0: ebffedc4 bl 57c8 <_Heap_Block_allocate> a0b4: e1a00004 mov r0, r4 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; a0b8: e5973044 ldr r3, [r7, #68] ; 0x44 a0bc: e1530006 cmp r3, r6 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a0c0: 35876044 strcc r6, [r7, #68] ; 0x44 a0c4: ea000002 b a0d4 <_Heap_Allocate_aligned_with_boundary+0x210> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a0c8: e1550003 cmp r5, r3 a0cc: 9a000006 bls a0ec <_Heap_Allocate_aligned_with_boundary+0x228> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; a0d0: e3a00000 mov r0, #0 } return (void *) alloc_begin; } a0d4: e28dd01c add sp, sp, #28 a0d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { a0dc: e3a00000 mov r0, #0 a0e0: eafffff4 b a0b8 <_Heap_Allocate_aligned_with_boundary+0x1f4> a0e4: e59d6018 ldr r6, [sp, #24] <== NOT EXECUTED a0e8: eaffff8f b 9f2c <_Heap_Allocate_aligned_with_boundary+0x68> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { a0ec: e3580000 cmp r8, #0 a0f0: 01a08002 moveq r8, r2 a0f4: eaffff80 b 9efc <_Heap_Allocate_aligned_with_boundary+0x38> 00006558 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6558: 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() ) ) { 655c: e59f35d0 ldr r3, [pc, #1488] ; 6b34 <_Heap_Walk+0x5dc> 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; 6560: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { 6564: 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; 6568: e59f25c8 ldr r2, [pc, #1480] ; 6b38 <_Heap_Walk+0x5e0> 656c: e59fa5c8 ldr sl, [pc, #1480] ; 6b3c <_Heap_Walk+0x5e4> 6570: 01a0a002 moveq sl, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6574: e3530003 cmp r3, #3 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 6578: e5902010 ldr r2, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; 657c: e5903024 ldr r3, [r0, #36] ; 0x24 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6580: e24dd038 sub sp, sp, #56 ; 0x38 6584: e1a04000 mov r4, r0 6588: e1a08001 mov r8, r1 uintptr_t const page_size = heap->page_size; 658c: e58d2020 str r2, [sp, #32] uintptr_t const min_block_size = heap->min_block_size; 6590: e590b014 ldr fp, [r0, #20] Heap_Block *const last_block = heap->last_block; 6594: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *block = heap->first_block; 6598: 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() ) ) { 659c: 0a000002 beq 65ac <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 65a0: e3a00001 mov r0, #1 block = next_block; } return true; } 65a4: e28dd038 add sp, sp, #56 ; 0x38 65a8: 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)( 65ac: e5900018 ldr r0, [r0, #24] 65b0: e594101c ldr r1, [r4, #28] 65b4: e2842008 add r2, r4, #8 65b8: e892000c ldm r2, {r2, r3} 65bc: e59dc024 ldr ip, [sp, #36] ; 0x24 65c0: e98d0003 stmib sp, {r0, r1} 65c4: e58d2014 str r2, [sp, #20] 65c8: e58d3018 str r3, [sp, #24] 65cc: e59f256c ldr r2, [pc, #1388] ; 6b40 <_Heap_Walk+0x5e8> 65d0: e58db000 str fp, [sp] 65d4: e58d500c str r5, [sp, #12] 65d8: e58dc010 str ip, [sp, #16] 65dc: e1a00008 mov r0, r8 65e0: e3a01000 mov r1, #0 65e4: e59d3020 ldr r3, [sp, #32] 65e8: e1a0e00f mov lr, pc 65ec: e12fff1a bx sl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 65f0: e59d2020 ldr r2, [sp, #32] 65f4: e3520000 cmp r2, #0 65f8: 0a000032 beq 66c8 <_Heap_Walk+0x170> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 65fc: e59d3020 ldr r3, [sp, #32] 6600: e2139003 ands r9, r3, #3 6604: 1a000036 bne 66e4 <_Heap_Walk+0x18c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6608: e1a0000b mov r0, fp 660c: e59d1020 ldr r1, [sp, #32] 6610: ebffe97f bl c14 <__umodsi3> 6614: e2506000 subs r6, r0, #0 6618: 1a000038 bne 6700 <_Heap_Walk+0x1a8> ); return false; } if ( 661c: e2850008 add r0, r5, #8 6620: e59d1020 ldr r1, [sp, #32] 6624: ebffe97a bl c14 <__umodsi3> 6628: e2509000 subs r9, r0, #0 662c: 1a00003b bne 6720 <_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; 6630: e5957004 ldr r7, [r5, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6634: e2176001 ands r6, r7, #1 6638: 0a000040 beq 6740 <_Heap_Walk+0x1e8> ); return false; } if ( first_block->prev_size != page_size ) { 663c: e5953000 ldr r3, [r5] 6640: e59dc020 ldr ip, [sp, #32] 6644: e15c0003 cmp ip, r3 6648: 1a000016 bne 66a8 <_Heap_Walk+0x150> ); return false; } if ( _Heap_Is_free( last_block ) ) { 664c: e59d2024 ldr r2, [sp, #36] ; 0x24 6650: e5923004 ldr r3, [r2, #4] 6654: e3c33001 bic r3, r3, #1 6658: e0823003 add r3, r2, r3 665c: e5939004 ldr r9, [r3, #4] 6660: e2199001 ands r9, r9, #1 6664: 0a000112 beq 6ab4 <_Heap_Walk+0x55c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 6668: e5949008 ldr r9, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 666c: 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 ) { 6670: e1540009 cmp r4, r9 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6674: 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 ) { 6678: 0a00006c beq 6830 <_Heap_Walk+0x2d8> 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; 667c: e594c020 ldr ip, [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 6680: e15c0009 cmp ip, r9 6684: 9a000034 bls 675c <_Heap_Walk+0x204> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 6688: e1a00008 mov r0, r8 668c: e1a03009 mov r3, r9 6690: e3a01001 mov r1, #1 6694: e59f24a8 ldr r2, [pc, #1192] ; 6b44 <_Heap_Walk+0x5ec> 6698: e1a0e00f mov lr, pc 669c: e12fff1a bx sl 66a0: e3a00000 mov r0, #0 66a4: eaffffbe b 65a4 <_Heap_Walk+0x4c> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 66a8: e1a00008 mov r0, r8 66ac: e58dc000 str ip, [sp] 66b0: e3a01001 mov r1, #1 66b4: e59f248c ldr r2, [pc, #1164] ; 6b48 <_Heap_Walk+0x5f0> 66b8: e1a0e00f mov lr, pc 66bc: e12fff1a bx sl 66c0: e1a00009 mov r0, r9 66c4: eaffffb6 b 65a4 <_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" ); 66c8: e1a00008 mov r0, r8 66cc: e3a01001 mov r1, #1 66d0: e59f2474 ldr r2, [pc, #1140] ; 6b4c <_Heap_Walk+0x5f4> 66d4: e1a0e00f mov lr, pc 66d8: e12fff1a bx sl 66dc: e59d0020 ldr r0, [sp, #32] 66e0: eaffffaf b 65a4 <_Heap_Walk+0x4c> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 66e4: e1a00008 mov r0, r8 66e8: e3a01001 mov r1, #1 66ec: e59f245c ldr r2, [pc, #1116] ; 6b50 <_Heap_Walk+0x5f8> 66f0: e1a0e00f mov lr, pc 66f4: e12fff1a bx sl 66f8: e3a00000 mov r0, #0 66fc: eaffffa8 b 65a4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 6700: e1a00008 mov r0, r8 6704: e1a0300b mov r3, fp 6708: e3a01001 mov r1, #1 670c: e59f2440 ldr r2, [pc, #1088] ; 6b54 <_Heap_Walk+0x5fc> 6710: e1a0e00f mov lr, pc 6714: e12fff1a bx sl 6718: e1a00009 mov r0, r9 671c: eaffffa0 b 65a4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6720: e1a00008 mov r0, r8 6724: e1a03005 mov r3, r5 6728: e3a01001 mov r1, #1 672c: e59f2424 ldr r2, [pc, #1060] ; 6b58 <_Heap_Walk+0x600> 6730: e1a0e00f mov lr, pc 6734: e12fff1a bx sl 6738: e1a00006 mov r0, r6 673c: eaffff98 b 65a4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 6740: e1a00008 mov r0, r8 6744: e3a01001 mov r1, #1 6748: e59f240c ldr r2, [pc, #1036] ; 6b5c <_Heap_Walk+0x604> 674c: e1a0e00f mov lr, pc 6750: e12fff1a bx sl 6754: e1a00006 mov r0, r6 6758: eaffff91 b 65a4 <_Heap_Walk+0x4c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 675c: e5942024 ldr r2, [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 6760: e1520009 cmp r2, r9 && (uintptr_t) block <= (uintptr_t) heap->last_block; 6764: e58d202c str r2, [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 6768: 3affffc6 bcc 6688 <_Heap_Walk+0x130> ); return false; } if ( 676c: e2890008 add r0, r9, #8 6770: e1a01003 mov r1, r3 6774: e58dc01c str ip, [sp, #28] 6778: ebffe925 bl c14 <__umodsi3> 677c: e3500000 cmp r0, #0 6780: e59dc01c ldr ip, [sp, #28] 6784: 1a0000d1 bne 6ad0 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 6788: e5993004 ldr r3, [r9, #4] 678c: e3c33001 bic r3, r3, #1 6790: e0893003 add r3, r9, r3 6794: e5933004 ldr r3, [r3, #4] 6798: e3130001 tst r3, #1 679c: 1a0000dc bne 6b14 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 67a0: e599200c ldr r2, [r9, #12] 67a4: e1540002 cmp r4, r2 67a8: 1a0000d0 bne 6af0 <_Heap_Walk+0x598> 67ac: e58d7030 str r7, [sp, #48] ; 0x30 67b0: e58db034 str fp, [sp, #52] ; 0x34 67b4: e59d702c ldr r7, [sp, #44] ; 0x2c 67b8: e59db028 ldr fp, [sp, #40] ; 0x28 67bc: e58d502c str r5, [sp, #44] ; 0x2c 67c0: e58d6028 str r6, [sp, #40] ; 0x28 67c4: e1a0600c mov r6, ip 67c8: ea000011 b 6814 <_Heap_Walk+0x2bc> 67cc: e1590006 cmp r9, r6 67d0: 3affffac bcc 6688 <_Heap_Walk+0x130> 67d4: e1570009 cmp r7, r9 ); return false; } if ( 67d8: e2890008 add r0, r9, #8 67dc: e1a0100b mov r1, fp 67e0: 3affffa8 bcc 6688 <_Heap_Walk+0x130> 67e4: ebffe90a bl c14 <__umodsi3> 67e8: e3500000 cmp r0, #0 67ec: 1a0000b7 bne 6ad0 <_Heap_Walk+0x578> ); return false; } if ( _Heap_Is_used( free_block ) ) { 67f0: e5993004 ldr r3, [r9, #4] 67f4: e3c33001 bic r3, r3, #1 67f8: e0833009 add r3, r3, r9 67fc: e5933004 ldr r3, [r3, #4] 6800: e3130001 tst r3, #1 6804: 1a0000c2 bne 6b14 <_Heap_Walk+0x5bc> ); return false; } if ( free_block->prev != prev_block ) { 6808: e599200c ldr r2, [r9, #12] 680c: e1520005 cmp r2, r5 6810: 1a0000b6 bne 6af0 <_Heap_Walk+0x598> (*printer)( 6814: e1a05009 mov r5, r9 return false; } prev_block = free_block; free_block = free_block->next; 6818: 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 ) { 681c: e1540009 cmp r4, r9 6820: 1affffe9 bne 67cc <_Heap_Walk+0x274> 6824: e28d502c add r5, sp, #44 ; 0x2c 6828: e89508a0 ldm r5, {r5, r7, fp} 682c: e59d6028 ldr r6, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 6830: e59d3024 ldr r3, [sp, #36] ; 0x24 6834: 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)" : ""), 6838: 158db028 strne fp, [sp, #40] ; 0x28 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 683c: 0affff57 beq 65a0 <_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; 6840: 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 ) { 6844: 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); 6848: e0876005 add r6, r7, r5 684c: 0a000012 beq 689c <_Heap_Walk+0x344> (*printer)( 6850: e1a03005 mov r3, r5 6854: e58d7000 str r7, [sp] 6858: e1a00008 mov r0, r8 685c: e3a01000 mov r1, #0 6860: e59f22f8 ldr r2, [pc, #760] ; 6b60 <_Heap_Walk+0x608> 6864: e1a0e00f mov lr, pc 6868: 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 686c: e5943020 ldr r3, [r4, #32] 6870: e1530006 cmp r3, r6 6874: 9a000013 bls 68c8 <_Heap_Walk+0x370> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 6878: e1a00008 mov r0, r8 687c: e58d6000 str r6, [sp] 6880: e1a03005 mov r3, r5 6884: e3a01001 mov r1, #1 6888: e59f22d4 ldr r2, [pc, #724] ; 6b64 <_Heap_Walk+0x60c> 688c: e1a0e00f mov lr, pc 6890: e12fff1a bx sl 6894: e3a00000 mov r0, #0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 6898: eaffff41 b 65a4 <_Heap_Walk+0x4c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 689c: e58d7000 str r7, [sp] 68a0: e5953000 ldr r3, [r5] 68a4: e1a00008 mov r0, r8 68a8: e58d3004 str r3, [sp, #4] 68ac: e59f22b4 ldr r2, [pc, #692] ; 6b68 <_Heap_Walk+0x610> 68b0: e1a03005 mov r3, r5 68b4: e1a0e00f mov lr, pc 68b8: e12fff1a bx sl 68bc: e5943020 ldr r3, [r4, #32] 68c0: e1530006 cmp r3, r6 68c4: 8affffeb bhi 6878 <_Heap_Walk+0x320> 68c8: e5943024 ldr r3, [r4, #36] ; 0x24 68cc: e1530006 cmp r3, r6 68d0: 3affffe8 bcc 6878 <_Heap_Walk+0x320> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 68d4: e1a00007 mov r0, r7 68d8: e59d1020 ldr r1, [sp, #32] 68dc: ebffe8cc bl c14 <__umodsi3> 68e0: e2509000 subs r9, r0, #0 68e4: 1a000055 bne 6a40 <_Heap_Walk+0x4e8> ); return false; } if ( block_size < min_block_size ) { 68e8: e59d3028 ldr r3, [sp, #40] ; 0x28 68ec: e1530007 cmp r3, r7 68f0: 8a00005b bhi 6a64 <_Heap_Walk+0x50c> ); return false; } if ( next_block_begin <= block_begin ) { 68f4: e1550006 cmp r5, r6 68f8: 2a000064 bcs 6a90 <_Heap_Walk+0x538> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 68fc: e5963004 ldr r3, [r6, #4] 6900: e3130001 tst r3, #1 6904: 1a000036 bne 69e4 <_Heap_Walk+0x48c> 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; 6908: 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)( 690c: 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; 6910: 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; 6914: 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; 6918: e1530002 cmp r3, r2 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 691c: 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); 6920: 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; 6924: 059f0240 ldreq r0, [pc, #576] ; 6b6c <_Heap_Walk+0x614> 6928: 0a000003 beq 693c <_Heap_Walk+0x3e4> "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)" : ""), 692c: e59fc23c ldr ip, [pc, #572] ; 6b70 <_Heap_Walk+0x618> 6930: e1520004 cmp r2, r4 6934: e59f0238 ldr r0, [pc, #568] ; 6b74 <_Heap_Walk+0x61c> 6938: 11a0000c movne r0, 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)( 693c: e5953008 ldr r3, [r5, #8] 6940: e1510003 cmp r1, r3 6944: 059f122c ldreq r1, [pc, #556] ; 6b78 <_Heap_Walk+0x620> 6948: 0a000003 beq 695c <_Heap_Walk+0x404> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 694c: e59fc21c ldr ip, [pc, #540] ; 6b70 <_Heap_Walk+0x618> 6950: e1530004 cmp r3, r4 6954: e59f1220 ldr r1, [pc, #544] ; 6b7c <_Heap_Walk+0x624> 6958: 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)( 695c: e58d2000 str r2, [sp] 6960: e98d0009 stmib sp, {r0, r3} 6964: e58d100c str r1, [sp, #12] 6968: e1a03005 mov r3, r5 696c: e1a00008 mov r0, r8 6970: e3a01000 mov r1, #0 6974: e59f2204 ldr r2, [pc, #516] ; 6b80 <_Heap_Walk+0x628> 6978: e1a0e00f mov lr, pc 697c: e12fff1a bx sl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 6980: e5993000 ldr r3, [r9] 6984: e1570003 cmp r7, r3 6988: 0a00000a beq 69b8 <_Heap_Walk+0x460> (*printer)( 698c: e58d3004 str r3, [sp, #4] 6990: e1a00008 mov r0, r8 6994: e58d7000 str r7, [sp] 6998: e58d9008 str r9, [sp, #8] 699c: e1a03005 mov r3, r5 69a0: e3a01001 mov r1, #1 69a4: e59f21d8 ldr r2, [pc, #472] ; 6b84 <_Heap_Walk+0x62c> 69a8: e1a0e00f mov lr, pc 69ac: e12fff1a bx sl 69b0: e3a00000 mov r0, #0 69b4: eafffefa b 65a4 <_Heap_Walk+0x4c> ); return false; } if ( !prev_used ) { 69b8: e21b9001 ands r9, fp, #1 69bc: 0a000017 beq 6a20 <_Heap_Walk+0x4c8> 69c0: 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 ) { 69c4: e1530004 cmp r3, r4 69c8: 1a000003 bne 69dc <_Heap_Walk+0x484> 69cc: ea00000b b 6a00 <_Heap_Walk+0x4a8> <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 69d0: 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 ) { 69d4: e1530004 cmp r3, r4 69d8: 0a000008 beq 6a00 <_Heap_Walk+0x4a8> if ( free_block == block ) { 69dc: e1530005 cmp r3, r5 69e0: 1afffffa bne 69d0 <_Heap_Walk+0x478> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 69e4: e59d2024 ldr r2, [sp, #36] ; 0x24 69e8: e1520006 cmp r2, r6 69ec: 0afffeeb beq 65a0 <_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 ) { 69f0: e5967004 ldr r7, [r6, #4] 69f4: e1a05006 mov r5, r6 69f8: e2076001 and r6, r7, #1 69fc: eaffff8f b 6840 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 6a00: e1a00008 mov r0, r8 6a04: e1a03005 mov r3, r5 6a08: e3a01001 mov r1, #1 6a0c: e59f2174 ldr r2, [pc, #372] ; 6b88 <_Heap_Walk+0x630> 6a10: e1a0e00f mov lr, pc 6a14: e12fff1a bx sl 6a18: e3a00000 mov r0, #0 6a1c: eafffee0 b 65a4 <_Heap_Walk+0x4c> return false; } if ( !prev_used ) { (*printer)( 6a20: e1a00008 mov r0, r8 6a24: e1a03005 mov r3, r5 6a28: e3a01001 mov r1, #1 6a2c: e59f2158 ldr r2, [pc, #344] ; 6b8c <_Heap_Walk+0x634> 6a30: e1a0e00f mov lr, pc 6a34: e12fff1a bx sl 6a38: e1a00009 mov r0, r9 6a3c: eafffed8 b 65a4 <_Heap_Walk+0x4c> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 6a40: e1a00008 mov r0, r8 6a44: e58d7000 str r7, [sp] 6a48: e1a03005 mov r3, r5 6a4c: e3a01001 mov r1, #1 6a50: e59f2138 ldr r2, [pc, #312] ; 6b90 <_Heap_Walk+0x638> 6a54: e1a0e00f mov lr, pc 6a58: e12fff1a bx sl 6a5c: e3a00000 mov r0, #0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 6a60: eafffecf b 65a4 <_Heap_Walk+0x4c> } if ( block_size < min_block_size ) { (*printer)( 6a64: e58d3004 str r3, [sp, #4] 6a68: e1a00008 mov r0, r8 6a6c: e1a0b003 mov fp, r3 6a70: e58d7000 str r7, [sp] 6a74: e1a03005 mov r3, r5 6a78: e3a01001 mov r1, #1 6a7c: e59f2110 ldr r2, [pc, #272] ; 6b94 <_Heap_Walk+0x63c> 6a80: e1a0e00f mov lr, pc 6a84: e12fff1a bx sl 6a88: e1a00009 mov r0, r9 block, block_size, min_block_size ); return false; 6a8c: eafffec4 b 65a4 <_Heap_Walk+0x4c> } if ( next_block_begin <= block_begin ) { (*printer)( 6a90: e1a00008 mov r0, r8 6a94: e58d6000 str r6, [sp] 6a98: e1a03005 mov r3, r5 6a9c: e3a01001 mov r1, #1 6aa0: e59f20f0 ldr r2, [pc, #240] ; 6b98 <_Heap_Walk+0x640> 6aa4: e1a0e00f mov lr, pc 6aa8: e12fff1a bx sl 6aac: e1a00009 mov r0, r9 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 6ab0: eafffebb b 65a4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 6ab4: e1a00008 mov r0, r8 6ab8: e3a01001 mov r1, #1 6abc: e59f20d8 ldr r2, [pc, #216] ; 6b9c <_Heap_Walk+0x644> 6ac0: e1a0e00f mov lr, pc 6ac4: e12fff1a bx sl 6ac8: e1a00009 mov r0, r9 6acc: eafffeb4 b 65a4 <_Heap_Walk+0x4c> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6ad0: e1a00008 mov r0, r8 6ad4: e1a03009 mov r3, r9 6ad8: e3a01001 mov r1, #1 6adc: e59f20bc ldr r2, [pc, #188] ; 6ba0 <_Heap_Walk+0x648> 6ae0: e1a0e00f mov lr, pc 6ae4: e12fff1a bx sl 6ae8: e3a00000 mov r0, #0 6aec: eafffeac b 65a4 <_Heap_Walk+0x4c> return false; } if ( free_block->prev != prev_block ) { (*printer)( 6af0: e58d2000 str r2, [sp] 6af4: e1a00008 mov r0, r8 6af8: e1a03009 mov r3, r9 6afc: e3a01001 mov r1, #1 6b00: e59f209c ldr r2, [pc, #156] ; 6ba4 <_Heap_Walk+0x64c> 6b04: e1a0e00f mov lr, pc 6b08: e12fff1a bx sl 6b0c: e3a00000 mov r0, #0 6b10: eafffea3 b 65a4 <_Heap_Walk+0x4c> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 6b14: e1a00008 mov r0, r8 6b18: e1a03009 mov r3, r9 6b1c: e3a01001 mov r1, #1 6b20: e59f2080 ldr r2, [pc, #128] ; 6ba8 <_Heap_Walk+0x650> 6b24: e1a0e00f mov lr, pc 6b28: e12fff1a bx sl 6b2c: e3a00000 mov r0, #0 6b30: eafffe9b b 65a4 <_Heap_Walk+0x4c> 6b34: 0001bc10 .word 0x0001bc10 6b38: 0000654c .word 0x0000654c 6b3c: 00006bac .word 0x00006bac 6b40: 00019d9c .word 0x00019d9c 6b44: 00019f30 .word 0x00019f30 6b48: 00019eec .word 0x00019eec 6b4c: 00019e30 .word 0x00019e30 6b50: 00019e44 .word 0x00019e44 6b54: 00019e64 .word 0x00019e64 6b58: 00019e88 .word 0x00019e88 6b5c: 00019ebc .word 0x00019ebc 6b60: 00019fd0 .word 0x00019fd0 6b64: 0001a010 .word 0x0001a010 6b68: 00019fe8 .word 0x00019fe8 6b6c: 0001a0d0 .word 0x0001a0d0 6b70: 00019d54 .word 0x00019d54 6b74: 0001a0dc .word 0x0001a0dc 6b78: 0001a0e8 .word 0x0001a0e8 6b7c: 0001a0f4 .word 0x0001a0f4 6b80: 0001a100 .word 0x0001a100 6b84: 0001a12c .word 0x0001a12c 6b88: 0001a198 .word 0x0001a198 6b8c: 0001a168 .word 0x0001a168 6b90: 0001a040 .word 0x0001a040 6b94: 0001a070 .word 0x0001a070 6b98: 0001a09c .word 0x0001a09c 6b9c: 00019f18 .word 0x00019f18 6ba0: 00019f50 .word 0x00019f50 6ba4: 00019f9c .word 0x00019f9c 6ba8: 00019f80 .word 0x00019f80 00005a38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5a38: 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 ) 5a3c: e5908034 ldr r8, [r0, #52] ; 0x34 5a40: e3580000 cmp r8, #0 */ void _Objects_Extend_information( Objects_Information *information ) { 5a44: e24dd014 sub sp, sp, #20 5a48: 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 ); 5a4c: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 5a50: 0a00009c beq 5cc8 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 5a54: e1d091b4 ldrh r9, [r0, #20] 5a58: e1d0a1b0 ldrh sl, [r0, #16] 5a5c: e1a01009 mov r1, r9 5a60: e1a0000a mov r0, sl 5a64: eb003f79 bl 15850 <__aeabi_uidiv> 5a68: e1a03800 lsl r3, r0, #16 for ( ; block < block_count; block++ ) { 5a6c: e1b03823 lsrs r3, r3, #16 5a70: 01a01009 moveq r1, r9 5a74: 01a06007 moveq r6, r7 5a78: 01a04003 moveq r4, r3 5a7c: 0a00000f beq 5ac0 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 5a80: e5984000 ldr r4, [r8] 5a84: e3540000 cmp r4, #0 5a88: 11a01009 movne r1, r9 5a8c: 11a06007 movne r6, r7 5a90: 13a04000 movne r4, #0 5a94: 01a01009 moveq r1, r9 5a98: 01a06007 moveq r6, r7 5a9c: 1a000003 bne 5ab0 <_Objects_Extend_information+0x78> 5aa0: ea000006 b 5ac0 <_Objects_Extend_information+0x88> <== NOT EXECUTED 5aa4: e7982104 ldr r2, [r8, r4, lsl #2] 5aa8: e3520000 cmp r2, #0 5aac: 0a000003 beq 5ac0 <_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++ ) { 5ab0: e2844001 add r4, r4, #1 5ab4: e1530004 cmp r3, r4 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 5ab8: 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++ ) { 5abc: 8afffff8 bhi 5aa4 <_Objects_Extend_information+0x6c> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 5ac0: 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 ) { 5ac4: e35a0801 cmp sl, #65536 ; 0x10000 5ac8: 2a000064 bcs 5c60 <_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 ) { 5acc: 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; 5ad0: e5952018 ldr r2, [r5, #24] if ( information->auto_extend ) { 5ad4: 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; 5ad8: e0000192 mul r0, r2, r1 if ( information->auto_extend ) { 5adc: 1a000061 bne 5c68 <_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 ); 5ae0: e58d3000 str r3, [sp] 5ae4: eb0007e9 bl 7a90 <_Workspace_Allocate_or_fatal_error> 5ae8: e59d3000 ldr r3, [sp] 5aec: e1a09000 mov r9, r0 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5af0: e1d521b0 ldrh r2, [r5, #16] 5af4: e1560002 cmp r6, r2 5af8: 3a000038 bcc 5be0 <_Objects_Extend_information+0x1a8> */ /* * Up the block count and maximum */ block_count++; 5afc: 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 ); 5b00: e08c008c add r0, ip, ip, lsl #1 5b04: e08a0000 add r0, sl, r0 5b08: e0800007 add r0, r0, r7 5b0c: e1a00100 lsl r0, r0, #2 5b10: e88d1008 stm sp, {r3, ip} 5b14: eb0007e9 bl 7ac0 <_Workspace_Allocate> if ( !object_blocks ) { 5b18: e250b000 subs fp, r0, #0 5b1c: e89d1008 ldm sp, {r3, ip} 5b20: 0a00006e beq 5ce0 <_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 ) { 5b24: e1d521b0 ldrh r2, [r5, #16] 5b28: e1570002 cmp r7, r2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 5b2c: e08b818c add r8, fp, ip, lsl #3 5b30: e08bc10c add ip, fp, ip, lsl #2 5b34: 3a000051 bcc 5c80 <_Objects_Extend_information+0x248> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b38: 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, 5b3c: 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; 5b40: 11a01002 movne r1, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b44: 0a000003 beq 5b58 <_Objects_Extend_information+0x120> local_table[ index ] = NULL; 5b48: 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++ ) { 5b4c: e2822001 add r2, r2, #1 5b50: e1570002 cmp r7, r2 5b54: 8afffffb bhi 5b48 <_Objects_Extend_information+0x110> 5b58: 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 ); 5b5c: e1d511b4 ldrh r1, [r5, #20] 5b60: e0861001 add r1, r6, r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b64: e3a00000 mov r0, #0 inactive_per_block[block_count] = 0; for ( index=index_base ; 5b68: e1560001 cmp r6, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 5b6c: e78c0003 str r0, [ip, r3] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b70: e78b0003 str r0, [fp, r3] inactive_per_block[block_count] = 0; for ( index=index_base ; 5b74: 2a000005 bcs 5b90 <_Objects_Extend_information+0x158> 5b78: e0882106 add r2, r8, r6, lsl #2 5b7c: e1a03006 mov r3, r6 index < ( information->allocation_size + index_base ); index++ ) { 5b80: 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 ; 5b84: e1530001 cmp r3, r1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 5b88: 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 ; 5b8c: 3afffffb bcc 5b80 <_Objects_Extend_information+0x148> 5b90: e10f3000 mrs r3, CPSR 5b94: e3832080 orr r2, r3, #128 ; 0x80 5b98: 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( 5b9c: e5952000 ldr r2, [r5] 5ba0: e1d510b4 ldrh r1, [r5, #4] 5ba4: 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; 5ba8: e1a0a80a lsl sl, sl, #16 information->maximum_id = _Objects_Build_id( 5bac: 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; 5bb0: e1a0a82a lsr sl, sl, #16 information->maximum_id = _Objects_Build_id( 5bb4: e1822d81 orr r2, r2, r1, lsl #27 5bb8: e182200a orr r2, r2, sl local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 5bbc: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 5bc0: e585c030 str ip, [r5, #48] ; 0x30 information->local_table = local_table; 5bc4: e585801c str r8, [r5, #28] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 5bc8: 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; 5bcc: e1c5a1b0 strh sl, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5bd0: e585b034 str fp, [r5, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 5bd4: e129f003 msr CPSR_fc, r3 information->maximum ); _ISR_Enable( level ); if ( old_tables ) 5bd8: e3500000 cmp r0, #0 _Workspace_Free( old_tables ); 5bdc: 1b0007bd blne 7ad8 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 5be0: e5953034 ldr r3, [r5, #52] ; 0x34 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5be4: e28d7008 add r7, sp, #8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 5be8: e7839104 str r9, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5bec: e1a01009 mov r1, r9 5bf0: e1a00007 mov r0, r7 5bf4: e1d521b4 ldrh r2, [r5, #20] 5bf8: e5953018 ldr r3, [r5, #24] 5bfc: eb00100e bl 9c3c <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 5c00: e1a04104 lsl r4, r4, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c04: 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 ) { 5c08: ea000008 b 5c30 <_Objects_Extend_information+0x1f8> the_object->id = _Objects_Build_id( 5c0c: e5952000 ldr r2, [r5] 5c10: e1d5c0b4 ldrh ip, [r5, #4] 5c14: e1a02c02 lsl r2, r2, #24 5c18: e3822801 orr r2, r2, #65536 ; 0x10000 5c1c: e1822d8c orr r2, r2, ip, lsl #27 5c20: e1822006 orr r2, r2, r6 5c24: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c28: ebfffd25 bl 50c4 <_Chain_Append> index++; 5c2c: 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 ) { 5c30: e1a00007 mov r0, r7 5c34: eb000ff3 bl 9c08 <_Chain_Get> 5c38: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c3c: e1a01003 mov r1, r3 5c40: 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 ) { 5c44: 1afffff0 bne 5c0c <_Objects_Extend_information+0x1d4> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5c48: e1d531b4 ldrh r3, [r5, #20] information->inactive = 5c4c: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5c50: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = 5c54: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5c58: e7813004 str r3, [r1, r4] information->inactive = 5c5c: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } 5c60: e28dd014 add sp, sp, #20 5c64: 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 ); 5c68: e58d3000 str r3, [sp] 5c6c: eb000793 bl 7ac0 <_Workspace_Allocate> if ( !new_object_block ) 5c70: e2509000 subs r9, r0, #0 5c74: e59d3000 ldr r3, [sp] 5c78: 1affff9c bne 5af0 <_Objects_Extend_information+0xb8> 5c7c: eafffff7 b 5c60 <_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, 5c80: e1a03103 lsl r3, r3, #2 5c84: e1a02003 mov r2, r3 5c88: e5951034 ldr r1, [r5, #52] ; 0x34 5c8c: e88d1008 stm sp, {r3, ip} 5c90: eb001b89 bl cabc information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5c94: e89d1008 ldm sp, {r3, ip} 5c98: e1a0000c mov r0, ip 5c9c: e1a02003 mov r2, r3 5ca0: e5951030 ldr r1, [r5, #48] ; 0x30 5ca4: eb001b84 bl cabc information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5ca8: e1d521b0 ldrh r2, [r5, #16] 5cac: e0872002 add r2, r7, r2 5cb0: e1a02102 lsl r2, r2, #2 5cb4: e1a00008 mov r0, r8 5cb8: e595101c ldr r1, [r5, #28] 5cbc: eb001b7e bl cabc 5cc0: e89d1008 ldm sp, {r3, ip} 5cc4: eaffffa4 b 5b5c <_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 ) 5cc8: e1a04008 mov r4, r8 5ccc: e1d0a1b0 ldrh sl, [r0, #16] 5cd0: e1d011b4 ldrh r1, [r0, #20] 5cd4: e1a06007 mov r6, r7 5cd8: e1a03008 mov r3, r8 5cdc: eaffff77 b 5ac0 <_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 ); 5ce0: e1a00009 mov r0, r9 5ce4: eb00077b bl 7ad8 <_Workspace_Free> return; 5ce8: eaffffdc b 5c60 <_Objects_Extend_information+0x228> 00006c88 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 6c88: 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 ) { 6c8c: 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 ]; 6c90: e1a0c323 lsr ip, r3, #6 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6c94: e281503c add r5, r1, #60 ; 0x3c 6c98: e08cc08c add ip, ip, ip, lsl #1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 6c9c: e3130020 tst r3, #32 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6ca0: e2814038 add r4, r1, #56 ; 0x38 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6ca4: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 6ca8: e3a05000 mov r5, #0 6cac: e581503c str r5, [r1, #60] ; 0x3c the_chain->last = _Chain_Head(the_chain); 6cb0: 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 ]; 6cb4: e080c10c add ip, r0, ip, lsl #2 block_state = the_thread_queue->state; 6cb8: e5906038 ldr r6, [r0, #56] ; 0x38 6cbc: 159fa178 ldrne sl, [pc, #376] ; 6e3c <_Thread_queue_Enqueue_priority+0x1b4> if ( _Thread_queue_Is_reverse_search( priority ) ) 6cc0: 1a00001c bne 6d38 <_Thread_queue_Enqueue_priority+0xb0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6cc4: e28ca004 add sl, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6cc8: e10f8000 mrs r8, CPSR 6ccc: e3884080 orr r4, r8, #128 ; 0x80 6cd0: 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; 6cd4: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6cd8: e154000a cmp r4, sl 6cdc: 1a000009 bne 6d08 <_Thread_queue_Enqueue_priority+0x80> 6ce0: ea000052 b 6e30 <_Thread_queue_Enqueue_priority+0x1a8> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6ce4: e10f7000 mrs r7, CPSR 6ce8: e129f008 msr CPSR_fc, r8 6cec: 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) ) { 6cf0: e5947010 ldr r7, [r4, #16] 6cf4: e1160007 tst r6, r7 6cf8: 0a000033 beq 6dcc <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 6cfc: 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 ) ) { 6d00: e154000a cmp r4, sl 6d04: 0a000002 beq 6d14 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; 6d08: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) 6d0c: e1530005 cmp r3, r5 6d10: 8afffff3 bhi 6ce4 <_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 ) ) { 6d14: e1a06008 mov r6, r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6d18: e590c030 ldr ip, [r0, #48] ; 0x30 6d1c: e35c0001 cmp ip, #1 6d20: 0a00002b beq 6dd4 <_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; 6d24: e5826000 str r6, [r2] return the_thread_queue->sync_state; 6d28: e1a0000c mov r0, ip } 6d2c: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} 6d30: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6d34: e129f008 msr CPSR_fc, r8 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6d38: e5da5000 ldrb r5, [sl] 6d3c: e2855001 add r5, r5, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6d40: e10f8000 mrs r8, CPSR 6d44: e3884080 orr r4, r8, #128 ; 0x80 6d48: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6d4c: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6d50: e154000c cmp r4, ip 6d54: 1a000009 bne 6d80 <_Thread_queue_Enqueue_priority+0xf8> 6d58: ea00000b b 6d8c <_Thread_queue_Enqueue_priority+0x104> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6d5c: e10f7000 mrs r7, CPSR 6d60: e129f008 msr CPSR_fc, r8 6d64: 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) ) { 6d68: e5947010 ldr r7, [r4, #16] 6d6c: e1160007 tst r6, r7 6d70: 0affffef beq 6d34 <_Thread_queue_Enqueue_priority+0xac> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6d74: 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 ) ) { 6d78: e154000c cmp r4, ip 6d7c: 0a000002 beq 6d8c <_Thread_queue_Enqueue_priority+0x104> search_priority = search_thread->current_priority; 6d80: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) 6d84: e1530005 cmp r3, r5 6d88: 3afffff3 bcc 6d5c <_Thread_queue_Enqueue_priority+0xd4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6d8c: e590c030 ldr ip, [r0, #48] ; 0x30 6d90: 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 ) ) { 6d94: e1a06008 mov r6, r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6d98: 1affffe1 bne 6d24 <_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 ) 6d9c: 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; 6da0: e3a03000 mov r3, #0 6da4: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6da8: 0a000016 beq 6e08 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6dac: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6db0: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6db4: 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; 6db8: e5841000 str r1, [r4] next_node->previous = the_node; 6dbc: e5831004 str r1, [r3, #4] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6dc0: e129f008 msr CPSR_fc, r8 6dc4: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6dc8: eaffffd7 b 6d2c <_Thread_queue_Enqueue_priority+0xa4> 6dcc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 6dd0: eaffffbc b 6cc8 <_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 ) 6dd4: 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; 6dd8: e3a03000 mov r3, #0 6ddc: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6de0: 0a000008 beq 6e08 <_Thread_queue_Enqueue_priority+0x180> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6de4: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6de8: e5814000 str r4, [r1] the_node->previous = previous_node; 6dec: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6df0: 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; 6df4: e5831000 str r1, [r3] search_node->previous = the_node; 6df8: e5841004 str r1, [r4, #4] 6dfc: e129f008 msr CPSR_fc, r8 6e00: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6e04: eaffffc8 b 6d2c <_Thread_queue_Enqueue_priority+0xa4> 6e08: 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; 6e0c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6e10: e5814000 str r4, [r1] the_node->previous = previous_node; 6e14: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6e18: 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; 6e1c: e5831000 str r1, [r3] search_node->previous = the_node; 6e20: e5841004 str r1, [r4, #4] 6e24: e129f006 msr CPSR_fc, r6 6e28: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6e2c: eaffffbe b 6d2c <_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 ) ) { 6e30: e1a06008 mov r6, r8 6e34: e3e05000 mvn r5, #0 6e38: eaffffb6 b 6d18 <_Thread_queue_Enqueue_priority+0x90> 6e3c: 00017c00 .word 0x00017c00 000154d4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 154d4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 154d8: e24dd024 sub sp, sp, #36 ; 0x24 154dc: e28d700c add r7, sp, #12 154e0: e28d2018 add r2, sp, #24 154e4: 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; 154e8: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 154ec: e282a004 add sl, r2, #4 154f0: e2872004 add r2, r7, #4 154f4: 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; 154f8: e58d301c str r3, [sp, #28] the_chain->last = _Chain_Head(the_chain); 154fc: e28d0018 add r0, sp, #24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 15500: e58d200c str r2, [sp, #12] the_chain->permanent_null = NULL; 15504: e58d3010 str r3, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 15508: e2842008 add r2, r4, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1550c: e2843040 add r3, r4, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 15510: e58da018 str sl, [sp, #24] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 15514: e58d0020 str r0, [sp, #32] 15518: e58d7014 str r7, [sp, #20] 1551c: e59f91a0 ldr r9, [pc, #416] ; 156c4 <_Timer_server_Body+0x1f0> 15520: e59fb1a0 ldr fp, [pc, #416] ; 156c8 <_Timer_server_Body+0x1f4> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 15524: e58d2008 str r2, [sp, #8] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 15528: 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 ); 1552c: 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 ); 15530: 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; 15534: e28d0018 add r0, sp, #24 15538: 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; 1553c: e5993000 ldr r3, [r9] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 15540: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 15544: e1a00006 mov r0, r6 15548: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 1554c: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 15550: e1a02007 mov r2, r7 15554: eb001086 bl 19774 <_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(); 15558: e59b5000 ldr r5, [fp] Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1555c: 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 ) { 15560: e1550001 cmp r5, r1 15564: 8a000022 bhi 155f4 <_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 ) { 15568: 3a000018 bcc 155d0 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1556c: 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 ); 15570: e5940078 ldr r0, [r4, #120] ; 0x78 15574: eb000249 bl 15ea0 <_Chain_Get> if ( timer == NULL ) { 15578: e3500000 cmp r0, #0 1557c: 0a00000b beq 155b0 <_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 ) { 15580: e5903038 ldr r3, [r0, #56] ; 0x38 15584: e3530001 cmp r3, #1 15588: 0a000015 beq 155e4 <_Timer_server_Body+0x110> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1558c: e3530003 cmp r3, #3 15590: 1afffff6 bne 15570 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 15594: e2801010 add r1, r0, #16 15598: e1a00008 mov r0, r8 1559c: eb0010a3 bl 19830 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 155a0: e5940078 ldr r0, [r4, #120] ; 0x78 155a4: eb00023d bl 15ea0 <_Chain_Get> if ( timer == NULL ) { 155a8: e3500000 cmp r0, #0 155ac: 1afffff3 bne 15580 <_Timer_server_Body+0xac> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 155b0: e10f2000 mrs r2, CPSR 155b4: e3823080 orr r3, r2, #128 ; 0x80 155b8: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 155bc: e59d3018 ldr r3, [sp, #24] 155c0: e15a0003 cmp sl, r3 155c4: 0a00000f beq 15608 <_Timer_server_Body+0x134> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 155c8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 155cc: eaffffda b 1553c <_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 ); 155d0: e0652001 rsb r2, r5, r1 155d4: e1a00008 mov r0, r8 155d8: e3a01001 mov r1, #1 155dc: eb001035 bl 196b8 <_Watchdog_Adjust> 155e0: eaffffe1 b 1556c <_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 ); 155e4: e2801010 add r1, r0, #16 155e8: e1a00006 mov r0, r6 155ec: eb00108f bl 19830 <_Watchdog_Insert> 155f0: eaffffde b 15570 <_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 ); 155f4: e0611005 rsb r1, r1, r5 155f8: e1a00008 mov r0, r8 155fc: e1a02007 mov r2, r7 15600: eb00105b bl 19774 <_Watchdog_Adjust_to_chain> 15604: eaffffd8 b 1556c <_Timer_server_Body+0x98> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 15608: e5840078 str r0, [r4, #120] ; 0x78 1560c: 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 ) ) { 15610: e59d300c ldr r3, [sp, #12] 15614: e59d2000 ldr r2, [sp] 15618: e1520003 cmp r2, r3 1561c: 159d5000 ldrne r5, [sp] 15620: 1a00000a bne 15650 <_Timer_server_Body+0x17c> 15624: ea000011 b 15670 <_Timer_server_Body+0x19c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 15628: 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; 1562c: e3a00000 mov r0, #0 the_chain->first = new_first; 15630: e58d200c str r2, [sp, #12] 15634: e5830008 str r0, [r3, #8] new_first->previous = _Chain_Head(the_chain); 15638: e5827004 str r7, [r2, #4] 1563c: 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 ); 15640: e2830020 add r0, r3, #32 15644: e8900003 ldm r0, {r0, r1} 15648: e1a0e00f mov lr, pc 1564c: e593f01c ldr pc, [r3, #28] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 15650: e10f1000 mrs r1, CPSR 15654: e3813080 orr r3, r1, #128 ; 0x80 15658: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1565c: e59d300c ldr r3, [sp, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 15660: e1550003 cmp r5, r3 15664: 1affffef bne 15628 <_Timer_server_Body+0x154> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 15668: e129f001 msr CPSR_fc, r1 1566c: eaffffb0 b 15534 <_Timer_server_Body+0x60> } } else { ts->active = false; 15670: e3a02000 mov r2, #0 15674: e5c4207c strb r2, [r4, #124] ; 0x7c 15678: e59f004c ldr r0, [pc, #76] ; 156cc <_Timer_server_Body+0x1f8> 1567c: e5903000 ldr r3, [r0] 15680: e2833001 add r3, r3, #1 15684: e5803000 str r3, [r0] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 15688: e3a01008 mov r1, #8 1568c: e5940000 ldr r0, [r4] 15690: eb000d9c bl 18d08 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 15694: e1a00004 mov r0, r4 15698: ebffff61 bl 15424 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1569c: e1a00004 mov r0, r4 156a0: ebffff75 bl 1547c <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 156a4: eb000ae9 bl 18250 <_Thread_Enable_dispatch> ts->active = true; 156a8: e3a02001 mov r2, #1 156ac: 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 ); 156b0: e59d0008 ldr r0, [sp, #8] 156b4: eb0010c0 bl 199bc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 156b8: e59d0004 ldr r0, [sp, #4] 156bc: eb0010be bl 199bc <_Watchdog_Remove> 156c0: eaffff9b b 15534 <_Timer_server_Body+0x60> 156c4: 00039fe4 .word 0x00039fe4 156c8: 00039f14 .word 0x00039f14 156cc: 00039e8c .word 0x00039e8c 000096f0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 96f0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 96f4: e1a04000 mov r4, r0 96f8: e1a05002 mov r5, r2 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 96fc: e10f3000 mrs r3, CPSR 9700: e3832080 orr r2, r3, #128 ; 0x80 9704: e129f002 msr CPSR_fc, r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 9708: e1a07000 mov r7, r0 970c: 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 ) ) { 9710: e1520007 cmp r2, r7 9714: 0a000018 beq 977c <_Watchdog_Adjust+0x8c> switch ( direction ) { 9718: e3510000 cmp r1, #0 971c: 1a000018 bne 9784 <_Watchdog_Adjust+0x94> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 9720: e3550000 cmp r5, #0 9724: 0a000014 beq 977c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 9728: e5926010 ldr r6, [r2, #16] 972c: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9730: 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 ) { 9734: 2a000005 bcs 9750 <_Watchdog_Adjust+0x60> 9738: ea000018 b 97a0 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 973c: e0555006 subs r5, r5, r6 9740: 0a00000d beq 977c <_Watchdog_Adjust+0x8c> if ( units < _Watchdog_First( header )->delta_interval ) { 9744: e5926010 ldr r6, [r2, #16] 9748: e1560005 cmp r6, r5 974c: 8a000013 bhi 97a0 <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9750: e5828010 str r8, [r2, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 9754: e129f003 msr CPSR_fc, r3 _ISR_Enable( level ); _Watchdog_Tickle( header ); 9758: e1a00004 mov r0, r4 975c: eb0000a0 bl 99e4 <_Watchdog_Tickle> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 9760: e10f3000 mrs r3, CPSR 9764: e3832080 orr r2, r3, #128 ; 0x80 9768: e129f002 msr CPSR_fc, r2 976c: e5941000 ldr r1, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 9770: e1570001 cmp r7, r1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 9774: e1a02001 mov r2, r1 9778: 1affffef bne 973c <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 977c: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 9780: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 9784: e3510001 cmp r1, #1 9788: 1afffffb bne 977c <_Watchdog_Adjust+0x8c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 978c: e5921010 ldr r1, [r2, #16] 9790: e0815005 add r5, r1, r5 9794: e5825010 str r5, [r2, #16] 9798: e129f003 msr CPSR_fc, r3 } } _ISR_Enable( level ); } 979c: 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; 97a0: e0655006 rsb r5, r5, r6 97a4: e5825010 str r5, [r2, #16] break; 97a8: eafffff3 b 977c <_Watchdog_Adjust+0x8c> 0002179c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2179c: e3a00000 mov r0, #0 <== NOT EXECUTED 217a0: e12fff1e bx lr <== NOT EXECUTED 00017350 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 17350: e24dd004 sub sp, sp, #4 17354: e58d0000 str r0, [sp] 17358: eb0001f0 bl 17b20 <___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(); 1735c: ebffffe1 bl 172e8 rtems_shutdown_executive(status); 17360: e59d0000 ldr r0, [sp] 17364: eb00003e bl 17464 17368: eafffffe b 17368 <_exit+0x18> <== NOT EXECUTED 00037eac <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 37eac: e1a00001 mov r0, r1 <== NOT EXECUTED 37eb0: e1a01002 mov r1, r2 <== NOT EXECUTED 37eb4: e1a02003 mov r2, r3 <== NOT EXECUTED 37eb8: eaffff81 b 37cc4 <== NOT EXECUTED 0002177c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 2177c: e3a00001 mov r0, #1 <== NOT EXECUTED 21780: e12fff1e bx lr <== NOT EXECUTED 00009204 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 9204: eaffffe4 b 919c <== NOT EXECUTED 00021794 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 21794: e3a00000 mov r0, #0 <== NOT EXECUTED 21798: e12fff1e bx lr <== NOT EXECUTED 00026570 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 26570: e1a00001 mov r0, r1 <== NOT EXECUTED 26574: e1a01002 mov r1, r2 <== NOT EXECUTED 26578: eaffff60 b 26300 <== NOT EXECUTED 000267bc <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 267bc: e1a00001 mov r0, r1 <== NOT EXECUTED 267c0: e1a01002 mov r1, r2 <== NOT EXECUTED 267c4: eaffffc2 b 266d4 <== NOT EXECUTED 00017448 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 17448: e1a00001 mov r0, r1 <== NOT EXECUTED 1744c: e1a01002 mov r1, r2 <== NOT EXECUTED 17450: ea00000e b 17490 <== NOT EXECUTED 00057024 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 57024: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 57028: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5702c: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 57030: e1a05001 mov r5, r1 <== NOT EXECUTED 57034: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 57038: ebfeb90d bl 5474 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 5703c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 57040: 1a0000f1 bne 5740c <_rename_r+0x3e8> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 57044: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 57048: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 5704c: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 57050: 1a000063 bne 571e4 <_rename_r+0x1c0> <== NOT EXECUTED 57054: e59f33e4 ldr r3, [pc, #996] ; 57440 <_rename_r+0x41c> <== NOT EXECUTED 57058: e593c000 ldr ip, [r3] <== NOT EXECUTED 5705c: e28cc018 add ip, ip, #24 <== NOT EXECUTED 57060: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 57064: e28d4018 add r4, sp, #24 <== NOT EXECUTED 57068: e1a0a004 mov sl, r4 <== NOT EXECUTED 5706c: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 57070: e59c2000 ldr r2, [ip] <== NOT EXECUTED 57074: e58a2000 str r2, [sl] <== NOT EXECUTED 57078: e3a08000 mov r8, #0 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5707c: e1a0e004 mov lr, r4 <== NOT EXECUTED 57080: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 57084: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 57088: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5708c: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 57090: e0855007 add r5, r5, r7 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 57094: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 57098: e1a00005 mov r0, r5 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 5709c: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 570a0: ebffb357 bl 43e04 <== NOT EXECUTED 570a4: e1a01000 mov r1, r0 <== NOT EXECUTED 570a8: e1a00005 mov r0, r5 <== NOT EXECUTED 570ac: ebfeb8dc bl 5424 <== NOT EXECUTED 570b0: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 570b4: e1a00005 mov r0, r5 <== NOT EXECUTED * 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 ) ); 570b8: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 570bc: ebffb350 bl 43e04 <== NOT EXECUTED 570c0: e28d702c add r7, sp, #44 ; 0x2c <== NOT EXECUTED 570c4: e3a0c000 mov ip, #0 <== NOT EXECUTED 570c8: e1a01000 mov r1, r0 <== NOT EXECUTED 570cc: e1a0200c mov r2, ip <== NOT EXECUTED 570d0: e1a00005 mov r0, r5 <== NOT EXECUTED 570d4: e1a03007 mov r3, r7 <== NOT EXECUTED 570d8: e58dc000 str ip, [sp] <== NOT EXECUTED 570dc: ebfeb8fe bl 54dc <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 570e0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 570e4: 1a000080 bne 572ec <_rename_r+0x2c8> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 570e8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 570ec: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 570f0: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 570f4: 13a0c000 movne ip, #0 <== NOT EXECUTED 570f8: 03a0c001 moveq ip, #1 <== NOT EXECUTED 570fc: 1a000045 bne 57218 <_rename_r+0x1f4> <== NOT EXECUTED 57100: e59f3338 ldr r3, [pc, #824] ; 57440 <_rename_r+0x41c> <== NOT EXECUTED 57104: e593c000 ldr ip, [r3] <== NOT EXECUTED 57108: e28cc018 add ip, ip, #24 <== NOT EXECUTED 5710c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 57110: e28d5004 add r5, sp, #4 <== NOT EXECUTED 57114: e1a0a005 mov sl, r5 <== NOT EXECUTED 57118: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 5711c: e59c2000 ldr r2, [ip] <== NOT EXECUTED 57120: e58a2000 str r2, [sl] <== NOT EXECUTED 57124: e3a0c001 mov ip, #1 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 57128: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5712c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 57130: e3530000 cmp r3, #0 <== NOT EXECUTED 57134: 0a00009d beq 573b0 <_rename_r+0x38c> <== NOT EXECUTED 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 ); 57138: e086000c add r0, r6, ip <== NOT EXECUTED 5713c: e1a01005 mov r1, r5 <== NOT EXECUTED 57140: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 57144: e1a0e00f mov lr, pc <== NOT EXECUTED 57148: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 5714c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 57150: 1a000073 bne 57324 <_rename_r+0x300> <== NOT EXECUTED /* * 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 ) { 57154: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 57158: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 5715c: e1520003 cmp r2, r3 <== NOT EXECUTED 57160: 1a000042 bne 57270 <_rename_r+0x24c> <== NOT EXECUTED 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 ) { 57164: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 57168: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 5716c: e35c0000 cmp ip, #0 <== NOT EXECUTED 57170: 0a000089 beq 5739c <_rename_r+0x378> <== NOT EXECUTED 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 ); 57174: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 57178: e1a00004 mov r0, r4 <== NOT EXECUTED 5717c: e1a01007 mov r1, r7 <== NOT EXECUTED 57180: e1a02005 mov r2, r5 <== NOT EXECUTED 57184: e1a0e00f mov lr, pc <== NOT EXECUTED 57188: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 5718c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 57190: e3530000 cmp r3, #0 <== NOT EXECUTED 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 ); 57194: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 57198: 0a000004 beq 571b0 <_rename_r+0x18c> <== NOT EXECUTED 5719c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 571a0: e3530000 cmp r3, #0 <== NOT EXECUTED 571a4: 11a00005 movne r0, r5 <== NOT EXECUTED 571a8: 11a0e00f movne lr, pc <== NOT EXECUTED 571ac: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 571b0: e3580000 cmp r8, #0 <== NOT EXECUTED 571b4: 1a000023 bne 57248 <_rename_r+0x224> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 571b8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 571bc: e3530000 cmp r3, #0 <== NOT EXECUTED 571c0: 0a000004 beq 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 571c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 571c8: e3530000 cmp r3, #0 <== NOT EXECUTED 571cc: 11a00007 movne r0, r7 <== NOT EXECUTED 571d0: 11a0e00f movne lr, pc <== NOT EXECUTED 571d4: 112fff13 bxne r3 <== NOT EXECUTED return result; } 571d8: e1a00006 mov r0, r6 <== NOT EXECUTED 571dc: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 571e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 571e4: e3530000 cmp r3, #0 <== NOT EXECUTED 571e8: 0affff99 beq 57054 <_rename_r+0x30> <== NOT EXECUTED 571ec: e59f324c ldr r3, [pc, #588] ; 57440 <_rename_r+0x41c> <== NOT EXECUTED 571f0: e593c000 ldr ip, [r3] <== NOT EXECUTED 571f4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 571f8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 571fc: e28d4018 add r4, sp, #24 <== NOT EXECUTED 57200: e1a0e004 mov lr, r4 <== NOT EXECUTED 57204: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 57208: e59c2000 ldr r2, [ip] <== NOT EXECUTED 5720c: e1a08007 mov r8, r7 <== NOT EXECUTED 57210: e58e2000 str r2, [lr] <== NOT EXECUTED 57214: eaffff98 b 5707c <_rename_r+0x58> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 57218: e3530000 cmp r3, #0 <== NOT EXECUTED 5721c: 0affffb7 beq 57100 <_rename_r+0xdc> <== NOT EXECUTED 57220: e59f3218 ldr r3, [pc, #536] ; 57440 <_rename_r+0x41c> <== NOT EXECUTED 57224: e593e000 ldr lr, [r3] <== NOT EXECUTED 57228: e28ee004 add lr, lr, #4 <== NOT EXECUTED 5722c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 57230: e28d5004 add r5, sp, #4 <== NOT EXECUTED 57234: e1a0a005 mov sl, r5 <== NOT EXECUTED 57238: e8aa000f stmia sl!, {r0, r1, r2, r3} <== NOT EXECUTED 5723c: e59e2000 ldr r2, [lr] <== NOT EXECUTED 57240: e58a2000 str r2, [sl] <== NOT EXECUTED 57244: eaffffb7 b 57128 <_rename_r+0x104> <== NOT EXECUTED 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 ); 57248: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 5724c: e3530000 cmp r3, #0 <== NOT EXECUTED 57250: 0affffd8 beq 571b8 <_rename_r+0x194> <== NOT EXECUTED 57254: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 57258: e3530000 cmp r3, #0 <== NOT EXECUTED 5725c: 0affffd5 beq 571b8 <_rename_r+0x194> <== NOT EXECUTED 57260: e1a00004 mov r0, r4 <== NOT EXECUTED 57264: e1a0e00f mov lr, pc <== NOT EXECUTED 57268: e12fff13 bx r3 <== NOT EXECUTED 5726c: eaffffd1 b 571b8 <_rename_r+0x194> <== NOT EXECUTED * 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 ); 57270: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 57274: e3530000 cmp r3, #0 <== NOT EXECUTED 57278: 0a000004 beq 57290 <_rename_r+0x26c> <== NOT EXECUTED 5727c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 57280: e3530000 cmp r3, #0 <== NOT EXECUTED 57284: 11a00005 movne r0, r5 <== NOT EXECUTED 57288: 11a0e00f movne lr, pc <== NOT EXECUTED 5728c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 57290: e3580000 cmp r8, #0 <== NOT EXECUTED 57294: 0a000007 beq 572b8 <_rename_r+0x294> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 57298: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 5729c: e3530000 cmp r3, #0 <== NOT EXECUTED 572a0: 0a000004 beq 572b8 <_rename_r+0x294> <== NOT EXECUTED 572a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 572a8: e3530000 cmp r3, #0 <== NOT EXECUTED 572ac: 11a00004 movne r0, r4 <== NOT EXECUTED 572b0: 11a0e00f movne lr, pc <== NOT EXECUTED 572b4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 572b8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 572bc: e3530000 cmp r3, #0 <== NOT EXECUTED 572c0: 0a000004 beq 572d8 <_rename_r+0x2b4> <== NOT EXECUTED 572c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 572c8: e3530000 cmp r3, #0 <== NOT EXECUTED 572cc: 11a00007 movne r0, r7 <== NOT EXECUTED 572d0: 11a0e00f movne lr, pc <== NOT EXECUTED 572d4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 572d8: ebff984f bl 3d41c <__errno> <== NOT EXECUTED 572dc: e3a03012 mov r3, #18 <== NOT EXECUTED 572e0: e5803000 str r3, [r0] <== NOT EXECUTED 572e4: e3e06000 mvn r6, #0 <== NOT EXECUTED 572e8: eaffffba b 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 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 ) 572ec: e3580000 cmp r8, #0 <== NOT EXECUTED 572f0: 0a000007 beq 57314 <_rename_r+0x2f0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 572f4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 572f8: e3530000 cmp r3, #0 <== NOT EXECUTED 572fc: 0a000004 beq 57314 <_rename_r+0x2f0> <== NOT EXECUTED 57300: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 57304: e3530000 cmp r3, #0 <== NOT EXECUTED 57308: 11a00004 movne r0, r4 <== NOT EXECUTED 5730c: 11a0e00f movne lr, pc <== NOT EXECUTED 57310: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 57314: ebff9840 bl 3d41c <__errno> <== NOT EXECUTED 57318: e3e06000 mvn r6, #0 <== NOT EXECUTED 5731c: e5805000 str r5, [r0] <== NOT EXECUTED 57320: eaffffac b 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 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 ); 57324: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 57328: e3530000 cmp r3, #0 <== NOT EXECUTED 5732c: 0a000004 beq 57344 <_rename_r+0x320> <== NOT EXECUTED 57330: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 57334: e3530000 cmp r3, #0 <== NOT EXECUTED 57338: 11a00005 movne r0, r5 <== NOT EXECUTED 5733c: 11a0e00f movne lr, pc <== NOT EXECUTED 57340: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 57344: e3580000 cmp r8, #0 <== NOT EXECUTED 57348: 0a000007 beq 5736c <_rename_r+0x348> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5734c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 57350: e3530000 cmp r3, #0 <== NOT EXECUTED 57354: 0a000004 beq 5736c <_rename_r+0x348> <== NOT EXECUTED 57358: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5735c: e3530000 cmp r3, #0 <== NOT EXECUTED 57360: 11a00004 movne r0, r4 <== NOT EXECUTED 57364: 11a0e00f movne lr, pc <== NOT EXECUTED 57368: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 5736c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 57370: e3530000 cmp r3, #0 <== NOT EXECUTED 57374: 0a000004 beq 5738c <_rename_r+0x368> <== NOT EXECUTED 57378: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5737c: e3530000 cmp r3, #0 <== NOT EXECUTED 57380: 11a00007 movne r0, r7 <== NOT EXECUTED 57384: 11a0e00f movne lr, pc <== NOT EXECUTED 57388: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 5738c: ebff9822 bl 3d41c <__errno> <== NOT EXECUTED 57390: e5806000 str r6, [r0] <== NOT EXECUTED 57394: e3e06000 mvn r6, #0 <== NOT EXECUTED 57398: eaffff8e b 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 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 ); 5739c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 573a0: e3530000 cmp r3, #0 <== NOT EXECUTED 573a4: 11a00005 movne r0, r5 <== NOT EXECUTED 573a8: 11a0e00f movne lr, pc <== NOT EXECUTED 573ac: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 573b0: e3580000 cmp r8, #0 <== NOT EXECUTED 573b4: 0a000007 beq 573d8 <_rename_r+0x3b4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 573b8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 573bc: e3530000 cmp r3, #0 <== NOT EXECUTED 573c0: 0a000004 beq 573d8 <_rename_r+0x3b4> <== NOT EXECUTED 573c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 573c8: e3530000 cmp r3, #0 <== NOT EXECUTED 573cc: 11a00004 movne r0, r4 <== NOT EXECUTED 573d0: 11a0e00f movne lr, pc <== NOT EXECUTED 573d4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 573d8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 573dc: e3530000 cmp r3, #0 <== NOT EXECUTED 573e0: 0a000004 beq 573f8 <_rename_r+0x3d4> <== NOT EXECUTED 573e4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 573e8: e3530000 cmp r3, #0 <== NOT EXECUTED 573ec: 11a00007 movne r0, r7 <== NOT EXECUTED 573f0: 11a0e00f movne lr, pc <== NOT EXECUTED 573f4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 573f8: ebff9807 bl 3d41c <__errno> <== NOT EXECUTED 573fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 57400: e5803000 str r3, [r0] <== NOT EXECUTED 57404: e3e06000 mvn r6, #0 <== NOT EXECUTED 57408: eaffff72 b 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 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, 5740c: e28d4018 add r4, sp, #24 <== NOT EXECUTED 57410: e3a0c000 mov ip, #0 <== NOT EXECUTED 57414: e1a00005 mov r0, r5 <== NOT EXECUTED 57418: e1a01007 mov r1, r7 <== NOT EXECUTED 5741c: e3a02002 mov r2, #2 <== NOT EXECUTED 57420: e1a03004 mov r3, r4 <== NOT EXECUTED 57424: e58dc000 str ip, [sp] <== NOT EXECUTED 57428: ebfeb867 bl 55cc <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 5742c: e3500000 cmp r0, #0 <== NOT EXECUTED 57430: 03a08001 moveq r8, #1 <== NOT EXECUTED 57434: 0affff10 beq 5707c <_rename_r+0x58> <== 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 ); rtems_set_errno_and_return_minus_one( result ); 57438: e3e06000 mvn r6, #0 <== NOT EXECUTED 5743c: eaffff65 b 571d8 <_rename_r+0x1b4> <== NOT EXECUTED 57440: 00057858 .word 0x00057858 00006ee0 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 6ee0: e1a00001 mov r0, r1 <== NOT EXECUTED 6ee4: e1a01002 mov r1, r2 <== NOT EXECUTED 6ee8: eaffffc2 b 6df8 <== NOT EXECUTED 0000c1d4 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); c1d4: e1a00001 mov r0, r1 <== NOT EXECUTED c1d8: eaffff55 b bf34 <== NOT EXECUTED 00024f9c : #include int chdir( const char *pathname ) { 24f9c: e92d4030 push {r4, r5, lr} 24fa0: e24dd018 sub sp, sp, #24 24fa4: e1a05000 mov r5, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 24fa8: eb007b95 bl 43e04 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 24fac: e28d4004 add r4, sp, #4 24fb0: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 24fb4: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 24fb8: e1a0200c mov r2, ip 24fbc: e1a00005 mov r0, r5 24fc0: e1a03004 mov r3, r4 24fc4: e58dc000 str ip, [sp] 24fc8: ebff817f bl 55cc pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 24fcc: e3500000 cmp r0, #0 24fd0: 1a000024 bne 25068 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 24fd4: e59d2010 ldr r2, [sp, #16] 24fd8: e5923010 ldr r3, [r2, #16] 24fdc: e3530000 cmp r3, #0 24fe0: 0a000018 beq 25048 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 24fe4: e1a00004 mov r0, r4 24fe8: e1a0e00f mov lr, pc 24fec: e12fff13 bx r3 24ff0: e3500001 cmp r0, #1 24ff4: 1a00001d bne 25070 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 24ff8: e59f50a4 ldr r5, [pc, #164] ; 250a4 24ffc: e595c000 ldr ip, [r5] 25000: e59c3010 ldr r3, [ip, #16] 25004: e3530000 cmp r3, #0 25008: 0a000006 beq 25028 2500c: e593301c ldr r3, [r3, #28] 25010: e3530000 cmp r3, #0 25014: 0a000003 beq 25028 25018: e28c0004 add r0, ip, #4 2501c: e1a0e00f mov lr, pc 25020: e12fff13 bx r3 25024: e595c000 ldr ip, [r5] rtems_filesystem_current = loc; 25028: e8b4000f ldm r4!, {r0, r1, r2, r3} 2502c: e28cc004 add ip, ip, #4 25030: e8ac000f stmia ip!, {r0, r1, r2, r3} 25034: e5943000 ldr r3, [r4] 25038: e58c3000 str r3, [ip] 2503c: e3a00000 mov r0, #0 return 0; } 25040: e28dd018 add sp, sp, #24 25044: e8bd8030 pop {r4, r5, pc} /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 25048: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2504c: e3530000 cmp r3, #0 <== NOT EXECUTED 25050: 11a00004 movne r0, r4 <== NOT EXECUTED 25054: 11a0e00f movne lr, pc <== NOT EXECUTED 25058: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2505c: eb0060ee bl 3d41c <__errno> <== NOT EXECUTED 25060: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25064: e5803000 str r3, [r0] <== NOT EXECUTED 25068: e3e00000 mvn r0, #0 2506c: eafffff3 b 25040 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 25070: e59d3010 ldr r3, [sp, #16] 25074: e3530000 cmp r3, #0 25078: 0a000004 beq 25090 2507c: e593301c ldr r3, [r3, #28] 25080: e3530000 cmp r3, #0 25084: 11a00004 movne r0, r4 25088: 11a0e00f movne lr, pc 2508c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 25090: eb0060e1 bl 3d41c <__errno> 25094: e3a03014 mov r3, #20 25098: e5803000 str r3, [r0] 2509c: e3e00000 mvn r0, #0 250a0: eaffffe6 b 25040 250a4: 00057858 .word 0x00057858 00005284 : int chmod( const char *path, mode_t mode ) { 5284: e92d4070 push {r4, r5, r6, lr} 5288: e24dd018 sub sp, sp, #24 528c: e1a05001 mov r5, r1 5290: 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 ); 5294: eb00fada bl 43e04 5298: e28d4004 add r4, sp, #4 529c: e1a01000 mov r1, r0 52a0: e3a0c001 mov ip, #1 52a4: e1a00006 mov r0, r6 52a8: e3a02000 mov r2, #0 52ac: e1a03004 mov r3, r4 52b0: e58dc000 str ip, [sp] 52b4: eb0000c4 bl 55cc if ( status != 0 ) 52b8: e3500000 cmp r0, #0 52bc: 1a000020 bne 5344 return -1; if ( !loc.handlers ){ 52c0: e59d300c ldr r3, [sp, #12] 52c4: e3530000 cmp r3, #0 52c8: 0a000012 beq 5318 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 52cc: e593301c ldr r3, [r3, #28] 52d0: e3530000 cmp r3, #0 52d4: 0a00001c beq 534c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 52d8: e1a01005 mov r1, r5 52dc: e1a00004 mov r0, r4 52e0: e1a0e00f mov lr, pc 52e4: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 52e8: e59d3010 ldr r3, [sp, #16] 52ec: 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 ); 52f0: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 52f4: 0a000004 beq 530c 52f8: e593301c ldr r3, [r3, #28] 52fc: e3530000 cmp r3, #0 5300: 11a00004 movne r0, r4 5304: 11a0e00f movne lr, pc 5308: 112fff13 bxne r3 return result; } 530c: e1a00005 mov r0, r5 5310: e28dd018 add sp, sp, #24 5314: 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 ); 5318: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 531c: e3530000 cmp r3, #0 <== NOT EXECUTED 5320: 0a000004 beq 5338 <== NOT EXECUTED 5324: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5328: e3530000 cmp r3, #0 <== NOT EXECUTED 532c: 11a00004 movne r0, r4 <== NOT EXECUTED 5330: 11a0e00f movne lr, pc <== NOT EXECUTED 5334: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 5338: eb00e037 bl 3d41c <__errno> <== NOT EXECUTED 533c: e3a03009 mov r3, #9 <== NOT EXECUTED 5340: e5803000 str r3, [r0] <== NOT EXECUTED 5344: e3e05000 mvn r5, #0 5348: eaffffef b 530c } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 534c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5350: e3530000 cmp r3, #0 <== NOT EXECUTED 5354: 0a000004 beq 536c <== NOT EXECUTED 5358: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 535c: e3530000 cmp r3, #0 <== NOT EXECUTED 5360: 11a00004 movne r0, r4 <== NOT EXECUTED 5364: 11a0e00f movne lr, pc <== NOT EXECUTED 5368: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 536c: eb00e02a bl 3d41c <__errno> <== NOT EXECUTED 5370: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5374: e5803000 str r3, [r0] <== NOT EXECUTED 5378: e3e05000 mvn r5, #0 <== NOT EXECUTED 537c: eaffffe2 b 530c <== NOT EXECUTED 000250a8 : int chown( const char *path, uid_t owner, gid_t group ) { 250a8: e92d40f0 push {r4, r5, r6, r7, lr} 250ac: e1a01801 lsl r1, r1, #16 250b0: e24dd018 sub sp, sp, #24 250b4: e1a02802 lsl r2, r2, #16 250b8: e1a06821 lsr r6, r1, #16 250bc: e1a05822 lsr r5, r2, #16 250c0: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 250c4: eb007b4e bl 43e04 250c8: e28d4004 add r4, sp, #4 250cc: e1a01000 mov r1, r0 250d0: e3a0c001 mov ip, #1 250d4: e1a00007 mov r0, r7 250d8: e3a02000 mov r2, #0 250dc: e1a03004 mov r3, r4 250e0: e58dc000 str ip, [sp] 250e4: ebff8138 bl 55cc 250e8: e3500000 cmp r0, #0 250ec: 1a00001c bne 25164 return -1; if ( !loc.ops->chown_h ) { 250f0: e59d2010 ldr r2, [sp, #16] 250f4: e5923018 ldr r3, [r2, #24] 250f8: e3530000 cmp r3, #0 250fc: 0a000010 beq 25144 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 25100: e1a02005 mov r2, r5 25104: e1a01006 mov r1, r6 25108: e1a00004 mov r0, r4 2510c: e1a0e00f mov lr, pc 25110: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 25114: e59d3010 ldr r3, [sp, #16] 25118: 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 ); 2511c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 25120: 0a000004 beq 25138 25124: e593301c ldr r3, [r3, #28] 25128: e3530000 cmp r3, #0 2512c: 11a00004 movne r0, r4 25130: 11a0e00f movne lr, pc 25134: 112fff13 bxne r3 return result; } 25138: e1a00005 mov r0, r5 2513c: e28dd018 add sp, sp, #24 25140: 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 ); 25144: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 25148: e3530000 cmp r3, #0 <== NOT EXECUTED 2514c: 11a00004 movne r0, r4 <== NOT EXECUTED 25150: 11a0e00f movne lr, pc <== NOT EXECUTED 25154: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 25158: eb0060af bl 3d41c <__errno> <== NOT EXECUTED 2515c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25160: e5803000 str r3, [r0] <== NOT EXECUTED 25164: e3e05000 mvn r5, #0 25168: eafffff2 b 25138 0002516c : #include int chroot( const char *pathname ) { 2516c: 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) { 25170: e59f50d8 ldr r5, [pc, #216] ; 25250 25174: e59f30d8 ldr r3, [pc, #216] ; 25254 25178: e5954000 ldr r4, [r5] 2517c: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 25180: e24dd018 sub sp, sp, #24 25184: 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) { 25188: 0a000020 beq 25210 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); 2518c: e1a00006 mov r0, r6 25190: ebffff81 bl 24f9c if (result) { 25194: e250c000 subs ip, r0, #0 25198: 1a000025 bne 25234 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2519c: e28d4004 add r4, sp, #4 251a0: e1a0200c mov r2, ip 251a4: e59f00ac ldr r0, [pc, #172] ; 25258 251a8: e3a01001 mov r1, #1 251ac: e1a03004 mov r3, r4 251b0: e58dc000 str ip, [sp] 251b4: ebff8104 bl 55cc 251b8: e3500000 cmp r0, #0 251bc: 1a00001c bne 25234 /* 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); 251c0: e595c000 ldr ip, [r5] 251c4: e59c3024 ldr r3, [ip, #36] ; 0x24 251c8: e3530000 cmp r3, #0 251cc: 0a000007 beq 251f0 251d0: e593301c ldr r3, [r3, #28] 251d4: e3530000 cmp r3, #0 251d8: 0a000004 beq 251f0 251dc: e28c0018 add r0, ip, #24 251e0: e1a0e00f mov lr, pc 251e4: e12fff13 bx r3 251e8: e59f3060 ldr r3, [pc, #96] ; 25250 251ec: e593c000 ldr ip, [r3] rtems_filesystem_root = loc; 251f0: e8b4000f ldm r4!, {r0, r1, r2, r3} 251f4: e28cc018 add ip, ip, #24 251f8: e8ac000f stmia ip!, {r0, r1, r2, r3} 251fc: e5943000 ldr r3, [r4] 25200: e58c3000 str r3, [ip] 25204: e3a00000 mov r0, #0 return 0; } 25208: e28dd018 add sp, sp, #24 2520c: 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*/ 25210: eb00061d bl 26a8c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 25214: e5953000 ldr r3, [r5] 25218: e1530004 cmp r3, r4 2521c: 1affffda bne 2518c rtems_set_errno_and_return_minus_one( ENOTSUP ); 25220: eb00607d bl 3d41c <__errno> <== NOT EXECUTED 25224: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25228: e5803000 str r3, [r0] <== NOT EXECUTED 2522c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25230: eafffff4 b 25208 <== 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 ); 25234: eb006078 bl 3d41c <__errno> <== NOT EXECUTED 25238: e1a04000 mov r4, r0 <== NOT EXECUTED 2523c: eb006076 bl 3d41c <__errno> <== NOT EXECUTED 25240: e5903000 ldr r3, [r0] <== NOT EXECUTED 25244: e3e00000 mvn r0, #0 <== NOT EXECUTED 25248: e5843000 str r3, [r4] <== NOT EXECUTED 2524c: eaffffed b 25208 <== NOT EXECUTED 25250: 00057858 .word 0x00057858 25254: 00065484 .word 0x00065484 25258: 0005c60c .word 0x0005c60c 00007dc8 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 7dc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 7dcc: e5936000 ldr r6, [r3] if (!device_name_table) 7dd0: e3560000 cmp r6, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 7dd4: e1a0b003 mov fp, r3 7dd8: e1a0a000 mov sl, r0 7ddc: e1a07001 mov r7, r1 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 7de0: 0a000026 beq 7e80 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 7de4: e59f30a8 ldr r3, [pc, #168] ; 7e94 7de8: e5938000 ldr r8, [r3] 7dec: e3580000 cmp r8, #0 } /* 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 ); 7df0: 13a09000 movne r9, #0 7df4: 11a04009 movne r4, r9 for (i = 0; i < rtems_device_table_size; i++) { 7df8: 0a000011 beq 7e44 if (!device_name_table[i].device_name) 7dfc: e0899109 add r9, r9, r9, lsl #2 7e00: e7965109 ldr r5, [r6, r9, lsl #2] 7e04: e3550000 cmp r5, #0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7e08: e1a0000a mov r0, sl 7e0c: e1a02007 mov r2, r7 7e10: e1a01005 mov r1, r5 /* 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++) { 7e14: e2844001 add r4, r4, #1 if (!device_name_table[i].device_name) 7e18: e0869109 add r9, r6, r9, lsl #2 7e1c: 0a000005 beq 7e38 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7e20: eb000ada bl a990 7e24: e3500000 cmp r0, #0 7e28: 1a000002 bne 7e38 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 7e2c: e7d50007 ldrb r0, [r5, r7] 7e30: e3500000 cmp r0, #0 7e34: 0a000007 beq 7e58 /* 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++) { 7e38: e1580004 cmp r8, r4 7e3c: e1a09004 mov r9, r4 7e40: 8affffed bhi 7dfc pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 7e44: eb00071b bl 9ab8 <__errno> 7e48: e3a03002 mov r3, #2 7e4c: e5803000 str r3, [r0] 7e50: e3e00000 mvn r0, #0 } 7e54: 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; 7e58: e59f3038 ldr r3, [pc, #56] ; 7e98 7e5c: e5933000 ldr r3, [r3] 7e60: e5933028 ldr r3, [r3, #40] ; 0x28 7e64: 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; 7e68: e59f302c ldr r3, [pc, #44] ; 7e9c 7e6c: e58b3008 str r3, [fp, #8] pathloc->ops = &devFS_ops; 7e70: e59f3028 ldr r3, [pc, #40] ; 7ea0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 7e74: e58b9000 str r9, [fp] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 7e78: e58b300c str r3, [fp, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 7e7c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } /* 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 ); 7e80: eb00070c bl 9ab8 <__errno> <== NOT EXECUTED 7e84: e3a0300e mov r3, #14 <== NOT EXECUTED 7e88: e5803000 str r3, [r0] <== NOT EXECUTED 7e8c: e3e00000 mvn r0, #0 <== NOT EXECUTED 7e90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 7e94: 0000c5c4 .word 0x0000c5c4 7e98: 0000c7ac .word 0x0000c7ac 7e9c: 0000c718 .word 0x0000c718 7ea0: 0000c750 .word 0x0000c750 00000ba8 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ba8: 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( bac: e59f605c ldr r6, [pc, #92] ; c10 bb0: e5963000 ldr r3, [r6] bb4: e0833103 add r3, r3, r3, lsl #2 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { bb8: 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( bbc: e1a00103 lsl r0, r3, #2 bc0: eb001b50 bl 7908 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) bc4: e2505000 subs r5, r0, #0 bc8: 0a00000b beq bfc rtems_set_errno_and_return_minus_one( ENOMEM ); memset( bcc: e5962000 ldr r2, [r6] bd0: e0822102 add r2, r2, r2, lsl #2 bd4: e1a02102 lsl r2, r2, #2 bd8: e3a01000 mov r1, #0 bdc: eb0025e3 bl a370 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; be0: e59f302c ldr r3, [pc, #44] ; c14 temp_mt_entry->mt_fs_root.ops = &devFS_ops; be4: 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; be8: 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; bec: 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; bf0: 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; bf4: e3a00000 mov r0, #0 return 0; } bf8: 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 ); bfc: eb0023ad bl 9ab8 <__errno> <== NOT EXECUTED c00: e3a0300c mov r3, #12 <== NOT EXECUTED c04: e5803000 str r3, [r0] <== NOT EXECUTED c08: e3e00000 mvn r0, #0 <== NOT EXECUTED c0c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED c10: 0000c5c4 .word 0x0000c5c4 c14: 0000c718 .word 0x0000c718 00000d80 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { d80: e52de004 push {lr} ; (str lr, [sp, #-4]!) d84: e24dd010 sub sp, sp, #16 d88: e1a03000 mov r3, r0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; d8c: 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; d90: e5900038 ldr r0, [r0, #56] ; 0x38 args.iop = iop; args.command = command; args.buffer = buffer; d94: e58d2008 str r2, [sp, #8] status = rtems_io_control( d98: e590100c ldr r1, [r0, #12] d9c: e1a0200d mov r2, sp da0: 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; da4: e58d3000 str r3, [sp] args.command = command; args.buffer = buffer; status = rtems_io_control( da8: eb000fd6 bl 4d08 np->major, np->minor, (void *) &args ); if ( status ) dac: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; db0: 059d000c ldreq r0, [sp, #12] np->major, np->minor, (void *) &args ); if ( status ) db4: 1a000001 bne dc0 return rtems_deviceio_errno(status); return args.ioctl_return; } db8: e28dd010 add sp, sp, #16 dbc: e8bd8000 pop {pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dc0: eb001c37 bl 7ea4 <== NOT EXECUTED dc4: eafffffb b db8 <== NOT EXECUTED 00000c18 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { c18: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} c1c: 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') && c20: e5d00000 ldrb r0, [r0] c24: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { c28: e1a05001 mov r5, r1 c2c: e1a06002 mov r6, r2 c30: 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') && c34: 0a000035 beq d10 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) c38: e2053a0f and r3, r5, #61440 ; 0xf000 c3c: e3530a02 cmp r3, #8192 ; 0x2000 c40: 13530a06 cmpne r3, #24576 ; 0x6000 c44: 03a03000 moveq r3, #0 c48: 13a03001 movne r3, #1 c4c: 1a000039 bne d38 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; c50: e59d2024 ldr r2, [sp, #36] ; 0x24 c54: e5928000 ldr r8, [r2] if (!device_name_table) c58: e3580000 cmp r8, #0 c5c: 0a00003f beq d60 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c60: e59f210c ldr r2, [pc, #268] ; d74 c64: e592a000 ldr sl, [r2] c68: 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 ); c6c: 13e09000 mvnne r9, #0 c70: 11a07003 movne r7, r3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c74: 1a000007 bne c98 c78: ea000033 b d4c <== NOT EXECUTED if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) c7c: eb002663 bl a610 <== NOT EXECUTED c80: e3500000 cmp r0, #0 <== NOT EXECUTED c84: 0a00001c beq cfc <== 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++){ c88: e2877001 add r7, r7, #1 <== NOT EXECUTED c8c: e157000a cmp r7, sl <== NOT EXECUTED c90: e1a03007 mov r3, r7 <== NOT EXECUTED c94: 2a000009 bcs cc0 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) c98: e0833103 add r3, r3, r3, lsl #2 c9c: e7983103 ldr r3, [r8, r3, lsl #2] ca0: e2531000 subs r1, r3, #0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ca4: 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) ca8: 1afffff3 bne c7c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); cac: 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++){ cb0: e2877001 add r7, r7, #1 cb4: e157000a cmp r7, sl cb8: e1a03007 mov r3, r7 cbc: 3afffff5 bcc c98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) cc0: e3790001 cmn r9, #1 cc4: 0a000020 beq d4c static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( cc8: e10f7000 mrs r7, CPSR ccc: e3873080 orr r3, r7, #128 ; 0x80 cd0: e129f003 msr CPSR_fc, r3 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; cd4: e0899109 add r9, r9, r9, lsl #2 cd8: e7884109 str r4, [r8, r9, lsl #2] device_name_table[slot].device_name_length = strlen(path); cdc: e1a00004 mov r0, r4 ce0: eb002712 bl a930 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ce4: e0888109 add r8, r8, r9, lsl #2 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; ce8: 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); cec: e9880841 stmib r8, {r0, r6, fp} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( cf0: e129f007 msr CPSR_fc, r7 cf4: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } cf8: 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 ); cfc: eb00236d bl 9ab8 <__errno> <== NOT EXECUTED d00: e3a03011 mov r3, #17 <== NOT EXECUTED d04: e5803000 str r3, [r0] <== NOT EXECUTED d08: e3e00000 mvn r0, #0 <== NOT EXECUTED d0c: 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') && d10: e5d43001 ldrb r3, [r4, #1] d14: e3530065 cmp r3, #101 ; 0x65 d18: 1affffc6 bne c38 (path[2] == 'v') && (path[3] == '\0')) d1c: e5d43002 ldrb r3, [r4, #2] d20: e3530076 cmp r3, #118 ; 0x76 d24: 1affffc3 bne c38 d28: e5d40003 ldrb r0, [r4, #3] d2c: e3500000 cmp r0, #0 d30: 1affffc0 bne c38 d34: 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 ); d38: eb00235e bl 9ab8 <__errno> <== NOT EXECUTED d3c: e3a03016 mov r3, #22 <== NOT EXECUTED d40: e5803000 str r3, [r0] <== NOT EXECUTED d44: e3e00000 mvn r0, #0 <== NOT EXECUTED d48: 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 ); d4c: eb002359 bl 9ab8 <__errno> <== NOT EXECUTED d50: e3a0300c mov r3, #12 <== NOT EXECUTED d54: e5803000 str r3, [r0] <== NOT EXECUTED d58: e3e00000 mvn r0, #0 <== NOT EXECUTED d5c: 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 ); d60: eb002354 bl 9ab8 <__errno> <== NOT EXECUTED d64: e3a0300e mov r3, #14 <== NOT EXECUTED d68: e5803000 str r3, [r0] <== NOT EXECUTED d6c: e3e00000 mvn r0, #0 <== NOT EXECUTED d70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED d74: 0000c5c4 .word 0x0000c5c4 00000e08 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { e08: e92d4800 push {fp, lr} <== NOT EXECUTED e0c: e1a03000 mov r3, r0 <== NOT EXECUTED e10: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; e14: 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; e18: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; e1c: e3a02000 mov r2, #0 <== NOT EXECUTED e20: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; e24: 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; e28: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; e2c: e283c00c add ip, r3, #12 <== NOT EXECUTED e30: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; e34: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( e38: e2820008 add r0, r2, #8 <== NOT EXECUTED e3c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED e40: 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; e44: 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; e48: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( e4c: eb00100f bl 4e90 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) e50: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; e54: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) e58: 1a000001 bne e64 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } e5c: e28dd01c add sp, sp, #28 <== NOT EXECUTED e60: e8bd8800 pop {fp, pc} <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); e64: eb001c0e bl 7ea4 <== NOT EXECUTED e68: eafffffb b e5c <== NOT EXECUTED 00000e6c : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; e6c: e5903000 ldr r3, [r0] if (!the_dev) e70: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { e74: 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) e78: 0a000007 beq e9c 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; e7c: 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 ); e80: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; e84: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; e88: 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 ); e8c: e5813018 str r3, [r1, #24] e90: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; e94: e3a00000 mov r0, #0 return 0; } e98: 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 ); e9c: eb002305 bl 9ab8 <__errno> <== NOT EXECUTED ea0: e3a0300e mov r3, #14 <== NOT EXECUTED ea4: e5803000 str r3, [r0] <== NOT EXECUTED ea8: e3e00000 mvn r0, #0 <== NOT EXECUTED eac: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00000eb0 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { eb0: e92d4800 push {fp, lr} eb4: e1a03000 mov r3, r0 eb8: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ebc: 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; ec0: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; ec4: e3a02000 mov r2, #0 ec8: e58d2018 str r2, [sp, #24] args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ecc: 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; ed0: e5932038 ldr r2, [r3, #56] ; 0x38 args.iop = iop; args.offset = iop->offset; ed4: e283c00c add ip, r3, #12 ed8: e89c1800 ldm ip, {fp, ip} args.buffer = (void *) buffer; edc: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ee0: e2820008 add r0, r2, #8 ee4: e8900003 ldm r0, {r0, r1} ee8: e1a0200d mov r2, sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; eec: 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; ef0: e58d3000 str r3, [sp] args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ef4: eb000ff9 bl 4ee0 np->major, np->minor, (void *) &args ); if ( status ) ef8: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; efc: 059d0018 ldreq r0, [sp, #24] np->major, np->minor, (void *) &args ); if ( status ) f00: 1a000001 bne f0c return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } f04: e28dd01c add sp, sp, #28 f08: e8bd8800 pop {fp, pc} np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); f0c: eb001be4 bl 7ea4 <== NOT EXECUTED f10: eafffffb b f04 <== NOT EXECUTED 0000a7e0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a7e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) a7e4: e24dd010 sub sp, sp, #16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; a7e8: e88d0007 stm sp, {r0, r1, r2} the_jnode = iop->file_info; a7ec: e5903038 ldr r3, [r0, #56] ; 0x38 status = rtems_io_control( a7f0: e1a0200d mov r2, sp a7f4: e2830050 add r0, r3, #80 ; 0x50 a7f8: e8900003 ldm r0, {r0, r1} a7fc: eb000472 bl b9cc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a800: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; a804: 059d000c ldreq r0, [sp, #12] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a808: 1a000001 bne a814 return rtems_deviceio_errno(status); return args.ioctl_return; } a80c: e28dd010 add sp, sp, #16 a810: e8bd8000 pop {pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a814: eb0005b2 bl bee4 <== NOT EXECUTED a818: eafffffb b a80c <== NOT EXECUTED 0000a87c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a87c: e92d4800 push {fp, lr} <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; a880: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a884: e280c00c add ip, r0, #12 <== NOT EXECUTED a888: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a88c: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; a890: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a894: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a898: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; a89c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; a8a0: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a8a4: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; a8a8: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; a8ac: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( a8b0: e1a0200d mov r2, sp <== NOT EXECUTED a8b4: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a8b8: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a8bc: eb00046a bl ba6c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a8c0: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a8c4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a8c8: 1a000001 bne a8d4 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } a8cc: e28dd01c add sp, sp, #28 <== NOT EXECUTED a8d0: e8bd8800 pop {fp, pc} <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a8d4: eb000582 bl bee4 <== NOT EXECUTED a8d8: eafffffb b a8cc <== NOT EXECUTED 0000a81c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a81c: e92d4800 push {fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; a820: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a824: e280c00c add ip, r0, #12 a828: e89c1800 ldm ip, {fp, ip} ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a82c: e24dd01c sub sp, sp, #28 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; a830: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a834: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a838: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; a83c: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; a840: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; a844: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; a848: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; a84c: 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( a850: e1a0200d mov r2, sp a854: e2830050 add r0, r3, #80 ; 0x50 a858: e8900003 ldm r0, {r0, r1} a85c: eb000496 bl babc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a860: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a864: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a868: 1a000001 bne a874 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } a86c: e28dd01c add sp, sp, #28 a870: e8bd8800 pop {fp, pc} the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a874: eb00059a bl bee4 <== NOT EXECUTED a878: eafffffb b a86c <== NOT EXECUTED 00002df4 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2df4: e59030b4 ldr r3, [r0, #180] ; 0xb4 2df8: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2dfc: e92d4030 push {r4, r5, lr} 2e00: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2e04: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2e08: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2e0c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2e10: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2e14: e5901084 ldr r1, [r0, #132] ; 0x84 <== NOT EXECUTED 2e18: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2e1c: e1510002 cmp r1, r2 <== NOT EXECUTED 2e20: 0a00000f beq 2e64 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2e24: e3a05002 mov r5, #2 <== NOT EXECUTED 2e28: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2e2c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2e30: e3a01000 mov r1, #0 <== NOT EXECUTED 2e34: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2e38: e1a02001 mov r2, r1 <== NOT EXECUTED 2e3c: eb00064a bl 476c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2e40: e3500000 cmp r0, #0 <== NOT EXECUTED 2e44: 1a000008 bne 2e6c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2e48: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2e4c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2e50: 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) { 2e54: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 2e58: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 2e5c: e1510002 cmp r1, r2 <== NOT EXECUTED 2e60: 1afffff0 bne 2e28 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2e64: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2e68: 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); 2e6c: eb0007dd bl 4de8 <== NOT EXECUTED 000020cc : int dup2( int fildes, int fildes2 ) { 20cc: e92d4070 push {r4, r5, r6, lr} 20d0: e24dd048 sub sp, sp, #72 ; 0x48 20d4: e1a05001 mov r5, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 20d8: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 20dc: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 20e0: eb0001c4 bl 27f8 if ( status == -1 ) 20e4: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 20e8: e1a0400d mov r4, sp if ( status == -1 ) 20ec: 1a000002 bne 20fc /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 20f0: e3e00000 mvn r0, #0 } 20f4: e28dd048 add sp, sp, #72 ; 0x48 20f8: e8bd8070 pop {r4, r5, r6, pc} /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 20fc: e1a0100d mov r1, sp 2100: e1a00005 mov r0, r5 2104: eb0001bb bl 27f8 if ( status == -1 ) 2108: e3700001 cmn r0, #1 210c: 0afffff7 beq 20f0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2110: e1a00006 mov r0, r6 <== NOT EXECUTED 2114: e1a02005 mov r2, r5 <== NOT EXECUTED 2118: e3a01000 mov r1, #0 <== NOT EXECUTED 211c: eb0000a3 bl 23b0 <== NOT EXECUTED 2120: eafffff3 b 20f4 <== NOT EXECUTED 00002864 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2864: e92d4010 push {r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2868: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 286c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2870: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 2874: e1a04001 mov r4, r1 <== NOT EXECUTED 2878: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 287c: 0a000007 beq 28a0 <== NOT EXECUTED 2880: e59f3060 ldr r3, [pc, #96] ; 28e8 <== NOT EXECUTED 2884: e5933000 ldr r3, [r3] <== NOT EXECUTED 2888: e0833000 add r3, r3, r0 <== NOT EXECUTED 288c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2890: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2894: 13a03001 movne r3, #1 <== NOT EXECUTED 2898: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 289c: 1a000003 bne 28b0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 28a0: e1a01004 mov r1, r4 <== NOT EXECUTED 28a4: ebffff92 bl 26f4 <== NOT EXECUTED } } 28a8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 28ac: 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')) { 28b0: e350000a cmp r0, #10 <== NOT EXECUTED 28b4: 0afffff9 beq 28a0 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 28b8: 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] = '^'; 28bc: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 28c0: e1a0000d mov r0, sp <== NOT EXECUTED 28c4: e3a01002 mov r1, #2 <== NOT EXECUTED 28c8: 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; 28cc: 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] = '^'; 28d0: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 28d4: ebffff3e bl 25d4 <== NOT EXECUTED tty->column += 2; 28d8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 28dc: e2833002 add r3, r3, #2 <== NOT EXECUTED 28e0: 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')) { 28e4: eaffffef b 28a8 <== NOT EXECUTED 28e8: 00017d4c .word 0x00017d4c 00025874 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 25874: e59f300c ldr r3, [pc, #12] ; 25888 <== NOT EXECUTED 25878: e5930000 ldr r0, [r3] <== NOT EXECUTED 2587c: e3500000 cmp r0, #0 <== NOT EXECUTED 25880: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 25884: ea005f31 b 3d550 <== NOT EXECUTED 25888: 0006513c .word 0x0006513c 0002588c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 2588c: e59f300c ldr r3, [pc, #12] ; 258a0 <== NOT EXECUTED 25890: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 25894: e3500000 cmp r0, #0 <== NOT EXECUTED 25898: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 2589c: ea005f2b b 3d550 <== NOT EXECUTED 258a0: 0006513c .word 0x0006513c 000028ec : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 28ec: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 28f0: 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) { 28f4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 28f8: e1a04000 mov r4, r0 <== NOT EXECUTED 28fc: e1a06001 mov r6, r1 <== NOT EXECUTED if (tty->ccount == 0) 2900: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return; if (lineFlag) { 2904: e3510000 cmp r1, #0 <== NOT EXECUTED 2908: 0590203c ldreq r2, [r0, #60] ; 0x3c <== NOT EXECUTED 290c: 1a000025 bne 29a8 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2910: e59f71d4 ldr r7, [pc, #468] ; 2aec <== NOT EXECUTED 2914: ea000007 b 2938 <== NOT EXECUTED 2918: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 291c: 1a00005a bne 2a8c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2920: e3560000 cmp r6, #0 <== NOT EXECUTED 2924: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2928: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 292c: e3530000 cmp r3, #0 <== NOT EXECUTED 2930: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 2934: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 2938: e2433001 sub r3, r3, #1 <== NOT EXECUTED 293c: e5843020 str r3, [r4, #32] <== NOT EXECUTED 2940: e594001c ldr r0, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2944: e3120008 tst r2, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2948: e7d05003 ldrb r5, [r0, r3] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 294c: 0afffff3 beq 2920 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2950: e3560000 cmp r6, #0 <== NOT EXECUTED 2954: 1a000001 bne 2960 <== NOT EXECUTED 2958: e3120010 tst r2, #16 <== NOT EXECUTED 295c: 0a000046 beq 2a7c <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2960: e3550009 cmp r5, #9 <== NOT EXECUTED 2964: 0a000020 beq 29ec <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2968: e5973000 ldr r3, [r7] <== NOT EXECUTED 296c: e2855001 add r5, r5, #1 <== NOT EXECUTED 2970: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2974: e3130020 tst r3, #32 <== NOT EXECUTED 2978: 1affffe6 bne 2918 <== 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); 297c: e59f016c ldr r0, [pc, #364] ; 2af0 <== NOT EXECUTED 2980: e3a01003 mov r1, #3 <== NOT EXECUTED 2984: e1a02004 mov r2, r4 <== NOT EXECUTED 2988: ebffff11 bl 25d4 <== NOT EXECUTED if (tty->column) 298c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2990: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2994: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2998: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 299c: e3560000 cmp r6, #0 <== NOT EXECUTED 29a0: 1affffe0 bne 2928 <== NOT EXECUTED 29a4: 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)) { 29a8: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED 29ac: e2121008 ands r1, r2, #8 <== NOT EXECUTED tty->ccount = 0; 29b0: 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)) { 29b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 29b8: e2121010 ands r1, r2, #16 <== NOT EXECUTED 29bc: 1affffd3 bne 2910 <== NOT EXECUTED tty->ccount = 0; 29c0: e5801020 str r1, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 29c4: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 29c8: e1a01004 mov r1, r4 <== NOT EXECUTED 29cc: ebffffa4 bl 2864 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 29d0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 29d4: e3130020 tst r3, #32 <== NOT EXECUTED 29d8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED echo ('\n', tty); 29dc: e1a01004 mov r1, r4 <== NOT EXECUTED 29e0: e3a0000a mov r0, #10 <== NOT EXECUTED } } if (!lineFlag) break; } } 29e4: 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); 29e8: eaffff9d b 2864 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 29ec: 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; 29f0: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 29f4: 0a000011 beq 2a40 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 29f8: e5978000 ldr r8, [r7] <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 29fc: 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)) { 2a00: e3a02000 mov r2, #0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2a04: e7d01002 ldrb r1, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2a08: e3510009 cmp r1, #9 <== NOT EXECUTED col = (col | 7) + 1; 2a0c: 03855007 orreq r5, r5, #7 <== NOT EXECUTED } else if (iscntrl (c)) { 2a10: e088c001 add ip, r8, r1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2a14: e2822001 add r2, r2, #1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; 2a18: 02855001 addeq r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 2a1c: 0a000005 beq 2a38 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2a20: e5dc1001 ldrb r1, [ip, #1] <== NOT EXECUTED 2a24: e3110020 tst r1, #32 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2a28: 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)) { 2a2c: 0a000001 beq 2a38 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2a30: e35a0000 cmp sl, #0 <== NOT EXECUTED col += 2; 2a34: 12855002 addne r5, r5, #2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2a38: e1530002 cmp r3, r2 <== NOT EXECUTED 2a3c: 1afffff0 bne 2a04 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2a40: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2a44: e1550003 cmp r5, r3 <== NOT EXECUTED 2a48: aaffffb4 bge 2920 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2a4c: e59f00a0 ldr r0, [pc, #160] ; 2af4 <== NOT EXECUTED 2a50: e3a01001 mov r1, #1 <== NOT EXECUTED 2a54: e1a02004 mov r2, r4 <== NOT EXECUTED 2a58: ebfffedd bl 25d4 <== NOT EXECUTED tty->column--; 2a5c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2a60: e2433001 sub r3, r3, #1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2a64: e1550003 cmp r5, r3 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 2a68: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2a6c: bafffff6 blt 2a4c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2a70: e3560000 cmp r6, #0 <== NOT EXECUTED 2a74: 1affffab bne 2928 <== NOT EXECUTED 2a78: 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); 2a7c: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2a80: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2a84: 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); 2a88: eaffff75 b 2864 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2a8c: e59f005c ldr r0, [pc, #92] ; 2af0 <== NOT EXECUTED 2a90: e3a01003 mov r1, #3 <== NOT EXECUTED 2a94: e1a02004 mov r2, r4 <== NOT EXECUTED 2a98: ebfffecd bl 25d4 <== NOT EXECUTED if (tty->column) 2a9c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2aa0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2aa4: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2aa8: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2aac: e5973000 ldr r3, [r7] <== NOT EXECUTED 2ab0: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2ab4: e3130020 tst r3, #32 <== NOT EXECUTED 2ab8: 0affffaf beq 297c <== NOT EXECUTED 2abc: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 2ac0: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED 2ac4: 0affff95 beq 2920 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2ac8: e59f0020 ldr r0, [pc, #32] ; 2af0 <== NOT EXECUTED 2acc: e3a01003 mov r1, #3 <== NOT EXECUTED 2ad0: e1a02004 mov r2, r4 <== NOT EXECUTED 2ad4: ebfffebe bl 25d4 <== NOT EXECUTED if (tty->column) 2ad8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2adc: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2ae0: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2ae4: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ae8: eaffffab b 299c <== NOT EXECUTED 2aec: 00017d4c .word 0x00017d4c 2af0: 00018ab4 .word 0x00018ab4 2af4: 00018ab0 .word 0x00018ab0 00037b34 : #include int fchdir( int fd ) { 37b34: 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 ); 37b38: e59f3174 ldr r3, [pc, #372] ; 37cb4 <== NOT EXECUTED 37b3c: e5933000 ldr r3, [r3] <== NOT EXECUTED 37b40: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 37b44: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 37b48: 2a000042 bcs 37c58 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 37b4c: e59f3164 ldr r3, [pc, #356] ; 37cb8 <== NOT EXECUTED 37b50: e5934000 ldr r4, [r3] <== NOT EXECUTED 37b54: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 37b58: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 37b5c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 37b60: 0a00003c beq 37c58 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 37b64: e3130002 tst r3, #2 <== NOT EXECUTED 37b68: 0a000047 beq 37c8c <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 37b6c: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 37b70: e3530000 cmp r3, #0 <== NOT EXECUTED 37b74: 0a000049 beq 37ca0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 37b78: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 37b7c: e3530000 cmp r3, #0 <== NOT EXECUTED 37b80: 0a000046 beq 37ca0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 37b84: e2844018 add r4, r4, #24 <== NOT EXECUTED 37b88: e1a00004 mov r0, r4 <== NOT EXECUTED 37b8c: e1a0e00f mov lr, pc <== NOT EXECUTED 37b90: e12fff13 bx r3 <== NOT EXECUTED 37b94: e3500001 cmp r0, #1 <== NOT EXECUTED 37b98: e1a0e000 mov lr, r0 <== NOT EXECUTED 37b9c: 1a000028 bne 37c44 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 37ba0: e59f6114 ldr r6, [pc, #276] ; 37cbc <== NOT EXECUTED 37ba4: e5967000 ldr r7, [r6] <== NOT EXECUTED 37ba8: e287c004 add ip, r7, #4 <== NOT EXECUTED 37bac: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 37bb0: e28d5004 add r5, sp, #4 <== NOT EXECUTED 37bb4: e1a08005 mov r8, r5 <== NOT EXECUTED 37bb8: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED 37bbc: e59c3000 ldr r3, [ip] <== NOT EXECUTED 37bc0: e5883000 str r3, [r8] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 37bc4: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 37bc8: e2877004 add r7, r7, #4 <== NOT EXECUTED 37bcc: e8a7000f stmia r7!, {r0, r1, r2, r3} <== NOT EXECUTED 37bd0: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 37bd4: e3a07000 mov r7, #0 <== NOT EXECUTED 37bd8: e28d4018 add r4, sp, #24 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 37bdc: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 37be0: e1a0100e mov r1, lr <== NOT EXECUTED 37be4: e1a02007 mov r2, r7 <== NOT EXECUTED 37be8: e59f00d0 ldr r0, [pc, #208] ; 37cc0 <== NOT EXECUTED 37bec: e1a03004 mov r3, r4 <== NOT EXECUTED 37bf0: e58d7000 str r7, [sp] <== NOT EXECUTED 37bf4: ebff3674 bl 55cc <== NOT EXECUTED 37bf8: e1500007 cmp r0, r7 <== NOT EXECUTED 37bfc: 1a00001a bne 37c6c <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 37c00: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 37c04: e3530000 cmp r3, #0 <== NOT EXECUTED 37c08: 0a000004 beq 37c20 <== NOT EXECUTED 37c0c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 37c10: e3530000 cmp r3, #0 <== NOT EXECUTED 37c14: 11a00005 movne r0, r5 <== NOT EXECUTED 37c18: 11a0e00f movne lr, pc <== NOT EXECUTED 37c1c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 37c20: e596c000 ldr ip, [r6] <== NOT EXECUTED 37c24: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 37c28: e28cc004 add ip, ip, #4 <== NOT EXECUTED 37c2c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 37c30: e5943000 ldr r3, [r4] <== NOT EXECUTED 37c34: e58c3000 str r3, [ip] <== NOT EXECUTED 37c38: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 37c3c: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 37c40: 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 ); 37c44: eb0015f4 bl 3d41c <__errno> <== NOT EXECUTED 37c48: e3a03014 mov r3, #20 <== NOT EXECUTED 37c4c: e5803000 str r3, [r0] <== NOT EXECUTED 37c50: e3e00000 mvn r0, #0 <== NOT EXECUTED 37c54: eafffff8 b 37c3c <== 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); 37c58: eb0015ef bl 3d41c <__errno> <== NOT EXECUTED 37c5c: e3a03009 mov r3, #9 <== NOT EXECUTED 37c60: e5803000 str r3, [r0] <== NOT EXECUTED 37c64: e3e00000 mvn r0, #0 <== NOT EXECUTED 37c68: eafffff3 b 37c3c <== 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; 37c6c: e596c000 ldr ip, [r6] <== NOT EXECUTED 37c70: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED 37c74: e28cc004 add ip, ip, #4 <== NOT EXECUTED 37c78: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 37c7c: e5983000 ldr r3, [r8] <== NOT EXECUTED 37c80: e3e00000 mvn r0, #0 <== NOT EXECUTED 37c84: e58c3000 str r3, [ip] <== NOT EXECUTED return -1; 37c88: eaffffeb b 37c3c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 37c8c: eb0015e2 bl 3d41c <__errno> <== NOT EXECUTED 37c90: e3a03016 mov r3, #22 <== NOT EXECUTED 37c94: e5803000 str r3, [r0] <== NOT EXECUTED 37c98: e3e00000 mvn r0, #0 <== NOT EXECUTED 37c9c: eaffffe6 b 37c3c <== 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 ); 37ca0: eb0015dd bl 3d41c <__errno> <== NOT EXECUTED 37ca4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 37ca8: e5803000 str r3, [r0] <== NOT EXECUTED 37cac: e3e00000 mvn r0, #0 <== NOT EXECUTED 37cb0: eaffffe1 b 37c3c <== NOT EXECUTED 37cb4: 00057580 .word 0x00057580 37cb8: 00065428 .word 0x00065428 37cbc: 00057858 .word 0x00057858 37cc0: 0005c60c .word 0x0005c60c 00025474 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25474: e59f308c ldr r3, [pc, #140] ; 25508 <== NOT EXECUTED 25478: e5932000 ldr r2, [r3] <== NOT EXECUTED 2547c: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 25480: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25484: 2a000010 bcs 254cc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 25488: e59f307c ldr r3, [pc, #124] ; 2550c <== NOT EXECUTED 2548c: e5933000 ldr r3, [r3] <== NOT EXECUTED 25490: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 25494: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 25498: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 2549c: 0a00000a beq 254cc <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 254a0: e3120004 tst r2, #4 <== NOT EXECUTED 254a4: 0a00000d beq 254e0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 254a8: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 254ac: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 254b0: e3520000 cmp r2, #0 <== NOT EXECUTED 254b4: 0a00000e beq 254f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 254b8: e2830018 add r0, r3, #24 <== NOT EXECUTED 254bc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 254c0: e1a0e00f mov lr, pc <== NOT EXECUTED 254c4: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 254c8: 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); 254cc: eb005fd2 bl 3d41c <__errno> <== NOT EXECUTED 254d0: e3a03009 mov r3, #9 <== NOT EXECUTED 254d4: e5803000 str r3, [r0] <== NOT EXECUTED 254d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 254dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 254e0: eb005fcd bl 3d41c <__errno> <== NOT EXECUTED 254e4: e3a03016 mov r3, #22 <== NOT EXECUTED 254e8: e5803000 str r3, [r0] <== NOT EXECUTED 254ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 254f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 254f4: eb005fc8 bl 3d41c <__errno> <== NOT EXECUTED 254f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 254fc: e5803000 str r3, [r0] <== NOT EXECUTED 25500: e3e00000 mvn r0, #0 <== NOT EXECUTED 25504: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 25508: 00057580 .word 0x00057580 2550c: 00065428 .word 0x00065428 00025510 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25510: e59f3098 ldr r3, [pc, #152] ; 255b0 <== NOT EXECUTED 25514: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 25518: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 2551c: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25520: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 25524: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 25528: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2552c: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25530: 2a00000f bcs 25574 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 25534: e59f3078 ldr r3, [pc, #120] ; 255b4 <== NOT EXECUTED 25538: e5933000 ldr r3, [r3] <== NOT EXECUTED 2553c: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 25540: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 25544: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 25548: 0a000009 beq 25574 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2554c: e3130004 tst r3, #4 <== NOT EXECUTED 25550: 0a00000c beq 25588 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 25554: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 25558: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2555c: e3530000 cmp r3, #0 <== NOT EXECUTED 25560: 0a00000d beq 2559c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 25564: e2800018 add r0, r0, #24 <== NOT EXECUTED 25568: e1a0e00f mov lr, pc <== NOT EXECUTED 2556c: e12fff13 bx r3 <== NOT EXECUTED } 25570: 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); 25574: eb005fa8 bl 3d41c <__errno> <== NOT EXECUTED 25578: e3a03009 mov r3, #9 <== NOT EXECUTED 2557c: e5803000 str r3, [r0] <== NOT EXECUTED 25580: e3e00000 mvn r0, #0 <== NOT EXECUTED 25584: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 25588: eb005fa3 bl 3d41c <__errno> <== NOT EXECUTED 2558c: e3a03016 mov r3, #22 <== NOT EXECUTED 25590: e5803000 str r3, [r0] <== NOT EXECUTED 25594: e3e00000 mvn r0, #0 <== NOT EXECUTED 25598: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2559c: eb005f9e bl 3d41c <__errno> <== NOT EXECUTED 255a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 255a4: e5803000 str r3, [r0] <== NOT EXECUTED 255a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 255ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 255b0: 00057580 .word 0x00057580 255b4: 00065428 .word 0x00065428 00037cc4 : int fcntl( int fd, int cmd, ... ) { 37cc4: e92d000e push {r1, r2, r3} 37cc8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 37ccc: e59f31d0 ldr r3, [pc, #464] ; 37ea4 37cd0: e5933000 ldr r3, [r3] int fcntl( int fd, int cmd, ... ) { 37cd4: e24dd004 sub sp, sp, #4 int ret; va_list ap; va_start( ap, cmd ); 37cd8: e28d2028 add r2, sp, #40 ; 0x28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 37cdc: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 37ce0: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 37ce4: e59d4024 ldr r4, [sp, #36] ; 0x24 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 37ce8: 2a000061 bcs 37e74 iop = rtems_libio_iop( fd ); 37cec: e59f81b4 ldr r8, [pc, #436] ; 37ea8 37cf0: e5986000 ldr r6, [r8] 37cf4: e0865300 add r5, r6, r0, lsl #6 rtems_libio_check_is_open(iop); 37cf8: e595c014 ldr ip, [r5, #20] 37cfc: e31c0c01 tst ip, #256 ; 0x100 37d00: 0a00005b beq 37e74 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 37d04: e3540009 cmp r4, #9 37d08: 979ff104 ldrls pc, [pc, r4, lsl #2] 37d0c: ea00002c b 37dc4 37d10: 00037dd8 .word 0x00037dd8 <== NOT EXECUTED 37d14: 00037e38 .word 0x00037e38 <== NOT EXECUTED 37d18: 00037e44 .word 0x00037e44 <== NOT EXECUTED 37d1c: 00037e64 .word 0x00037e64 <== NOT EXECUTED 37d20: 00037d5c .word 0x00037d5c <== NOT EXECUTED 37d24: 00037d38 .word 0x00037d38 <== NOT EXECUTED 37d28: 00037d38 .word 0x00037d38 <== NOT EXECUTED 37d2c: 00037d38 .word 0x00037d38 <== NOT EXECUTED 37d30: 00037d38 .word 0x00037d38 <== NOT EXECUTED 37d34: 00037d38 .word 0x00037d38 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 37d38: eb0015b7 bl 3d41c <__errno> 37d3c: e3a03086 mov r3, #134 ; 0x86 37d40: e5803000 str r3, [r0] 37d44: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 37d48: e1a00006 mov r0, r6 37d4c: e28dd004 add sp, sp, #4 37d50: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 37d54: e28dd00c add sp, sp, #12 37d58: 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 ) ); 37d5c: e5920000 ldr r0, [r2] 37d60: ebff3777 bl 5b44 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 37d64: e5953014 ldr r3, [r5, #20] 37d68: e3c00f7f bic r0, r0, #508 ; 0x1fc 37d6c: e3c00002 bic r0, r0, #2 37d70: e1a00b00 lsl r0, r0, #22 37d74: e3c33c02 bic r3, r3, #512 ; 0x200 37d78: e1a00b20 lsr r0, r0, #22 37d7c: e3c33001 bic r3, r3, #1 37d80: e1800003 orr r0, r0, r3 37d84: e5850014 str r0, [r5, #20] 37d88: 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) { 37d8c: e595303c ldr r3, [r5, #60] ; 0x3c 37d90: e5933030 ldr r3, [r3, #48] ; 0x30 37d94: e3530000 cmp r3, #0 37d98: 0affffea beq 37d48 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 37d9c: e1a00004 mov r0, r4 37da0: e1a01005 mov r1, r5 37da4: e1a0e00f mov lr, pc 37da8: e12fff13 bx r3 if (err) { 37dac: e2504000 subs r4, r0, #0 37db0: 0affffe4 beq 37d48 errno = err; 37db4: eb001598 bl 3d41c <__errno> <== NOT EXECUTED 37db8: e5804000 str r4, [r0] <== NOT EXECUTED 37dbc: e3e06000 mvn r6, #0 <== NOT EXECUTED 37dc0: eaffffe0 b 37d48 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 37dc4: eb001594 bl 3d41c <__errno> 37dc8: e3a03016 mov r3, #22 37dcc: e5803000 str r3, [r0] 37dd0: e3e06000 mvn r6, #0 37dd4: eaffffdb b 37d48 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 37dd8: e5927000 ldr r7, [r2] if ( fd2 ) 37ddc: e3570000 cmp r7, #0 37de0: 0a000028 beq 37e88 diop = rtems_libio_iop( fd2 ); 37de4: e1530007 cmp r3, r7 <== NOT EXECUTED 37de8: 93a09000 movls r9, #0 <== NOT EXECUTED 37dec: 80867307 addhi r7, r6, r7, lsl #6 <== NOT EXECUTED 37df0: 91a07009 movls r7, r9 <== NOT EXECUTED 37df4: 81a09007 movhi r9, r7 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 37df8: e2858018 add r8, r5, #24 37dfc: e8b8000f ldm r8!, {r0, r1, r2, r3} 37e00: e287a018 add sl, r7, #24 37e04: e8aa000f stmia sl!, {r0, r1, r2, r3} ret = -1; break; } } diop->handlers = iop->handlers; 37e08: e595203c ldr r2, [r5, #60] ; 0x3c diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 37e0c: e5981000 ldr r1, [r8] break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 37e10: e5953038 ldr r3, [r5, #56] ; 0x38 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 37e14: e0666009 rsb r6, r6, r9 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 37e18: e58a1000 str r1, [sl] ret = -1; break; } } diop->handlers = iop->handlers; 37e1c: e587203c str r2, [r7, #60] ; 0x3c diop->file_info = iop->file_info; 37e20: e5873038 str r3, [r7, #56] ; 0x38 diop->flags = iop->flags; 37e24: e587c014 str ip, [r7, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 37e28: 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) { 37e2c: e3560000 cmp r6, #0 37e30: aaffffd5 bge 37d8c 37e34: eaffffc3 b 37d48 <== 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); 37e38: e1a0c5ac lsr ip, ip, #11 37e3c: e20c6001 and r6, ip, #1 37e40: eaffffd1 b 37d8c * 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 ) ) 37e44: e5926000 ldr r6, [r2] 37e48: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 37e4c: 138ccb02 orrne ip, ip, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 37e50: 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; 37e54: 1585c014 strne ip, [r5, #20] 37e58: 13a06000 movne r6, #0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 37e5c: 0585c014 streq ip, [r5, #20] 37e60: eaffffc9 b 37d8c break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 37e64: e1a0000c mov r0, ip 37e68: ebff3695 bl 58c4 37e6c: e1a06000 mov r6, r0 37e70: eaffffed b 37e2c int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 37e74: eb001568 bl 3d41c <__errno> <== NOT EXECUTED 37e78: e3a03009 mov r3, #9 <== NOT EXECUTED 37e7c: e5803000 str r3, [r0] <== NOT EXECUTED 37e80: e3e06000 mvn r6, #0 <== NOT EXECUTED 37e84: eaffffaf b 37d48 <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 37e88: ebff36ff bl 5a8c if ( diop == 0 ) { 37e8c: e2507000 subs r7, r0, #0 37e90: 0affffc9 beq 37dbc 37e94: e5986000 ldr r6, [r8] 37e98: e595c014 ldr ip, [r5, #20] 37e9c: e1a09007 mov r9, r7 37ea0: eaffffd4 b 37df8 37ea4: 00057580 .word 0x00057580 37ea8: 00065428 .word 0x00065428 0000af00 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { af00: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, af04: e59f53c4 ldr r5, [pc, #964] ; b2d0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { af08: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, af0c: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { af10: e24dd008 sub sp, sp, #8 af14: e1a04000 mov r4, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, af18: e1a02001 mov r2, r1 af1c: e5950000 ldr r0, [r5] af20: ebffe611 bl 476c af24: e2509000 subs r9, r0, #0 af28: 13e0a003 mvnne sl, #3 af2c: 1a00001c bne afa4 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; af30: e5946000 ldr r6, [r4] <== NOT EXECUTED if (pipe == NULL) { af34: e3560000 cmp r6, #0 <== NOT EXECUTED af38: 0a00007d beq b134 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) af3c: e3a01000 mov r1, #0 <== NOT EXECUTED af40: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED af44: e1a02001 mov r2, r1 <== NOT EXECUTED af48: ebffe607 bl 476c <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { af4c: e5943000 ldr r3, [r4] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) af50: e3500000 cmp r0, #0 <== NOT EXECUTED af54: 01a0a000 moveq sl, r0 <== NOT EXECUTED af58: 13e0a003 mvnne sl, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { af5c: e3530000 cmp r3, #0 <== NOT EXECUTED af60: 0a000038 beq b048 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); af64: e5950000 ldr r0, [r5] <== NOT EXECUTED af68: ebffe647 bl 488c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) af6c: e35a0000 cmp sl, #0 <== NOT EXECUTED af70: 1a00000b bne afa4 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { af74: e5972014 ldr r2, [r7, #20] <== NOT EXECUTED af78: e2023006 and r3, r2, #6 <== NOT EXECUTED af7c: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; af80: e5945000 ldr r5, [r4] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { af84: 0a000009 beq afb0 <== NOT EXECUTED af88: e3530006 cmp r3, #6 <== NOT EXECUTED af8c: 0a000054 beq b0e4 <== NOT EXECUTED af90: e3530002 cmp r3, #2 <== NOT EXECUTED af94: 0a000031 beq b060 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); af98: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED af9c: ebffe63a bl 488c <== NOT EXECUTED afa0: e3a0a000 mov sl, #0 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } afa4: e1a0000a mov r0, sl afa8: e28dd008 add sp, sp, #8 afac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { afb0: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED afb4: e3530000 cmp r3, #0 <== NOT EXECUTED afb8: 1a000002 bne afc8 <== NOT EXECUTED afbc: e3120001 tst r2, #1 <== NOT EXECUTED afc0: 13e0a005 mvnne sl, #5 <== NOT EXECUTED afc4: 1a00001b bne b038 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) afc8: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; afcc: e5951024 ldr r1, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) afd0: e3520000 cmp r2, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; afd4: e2811001 add r1, r1, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) afd8: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; afdc: e5851024 str r1, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) afe0: e5852014 str r2, [r5, #20] <== NOT EXECUTED afe4: 0a0000a7 beq b288 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { afe8: e3530000 cmp r3, #0 <== NOT EXECUTED afec: 1affffe9 bne af98 <== NOT EXECUTED prevCounter = pipe->readerCounter; aff0: e5956020 ldr r6, [r5, #32] <== NOT EXECUTED aff4: ea000006 b b014 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) aff8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED affc: ebffe5da bl 476c <== NOT EXECUTED b000: e3500000 cmp r0, #0 <== NOT EXECUTED b004: 1a00000a bne b034 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); b008: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED b00c: e1530006 cmp r3, r6 <== NOT EXECUTED b010: 1affffe0 bne af98 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); b014: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b018: ebffe61b bl 488c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b01c: e3a01000 mov r1, #0 <== NOT EXECUTED b020: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b024: eb0001e0 bl b7ac <== NOT EXECUTED b028: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b02c: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b030: 0afffff0 beq aff8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; b034: e3e0a003 mvn sl, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); b038: e1a00004 mov r0, r4 <== NOT EXECUTED b03c: e1a01007 mov r1, r7 <== NOT EXECUTED b040: ebffff68 bl ade8 <== NOT EXECUTED return err; b044: eaffffd6 b afa4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) b048: e35a0000 cmp sl, #0 <== NOT EXECUTED b04c: 1a000092 bne b29c <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; b050: e5846000 str r6, [r4] <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); b054: e5950000 ldr r0, [r5] <== NOT EXECUTED b058: ebffe60b bl 488c <== NOT EXECUTED b05c: eaffffc4 b af74 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b060: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b064: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b068: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b06c: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b070: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b074: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b078: e5853010 str r3, [r5, #16] <== NOT EXECUTED b07c: 0a00007d beq b278 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { b080: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED b084: e3530000 cmp r3, #0 <== NOT EXECUTED b088: 1affffc2 bne af98 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) b08c: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED b090: e3130001 tst r3, #1 <== NOT EXECUTED b094: 1affffbf bne af98 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; b098: e5956024 ldr r6, [r5, #36] ; 0x24 <== NOT EXECUTED b09c: ea000006 b b0bc <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) b0a0: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b0a4: ebffe5b0 bl 476c <== NOT EXECUTED b0a8: e3500000 cmp r0, #0 <== NOT EXECUTED b0ac: 1affffe0 bne b034 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); b0b0: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED b0b4: e1530006 cmp r3, r6 <== NOT EXECUTED b0b8: 1affffb6 bne af98 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b0bc: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED b0c0: ebffe5f1 bl 488c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) b0c4: e3a01000 mov r1, #0 <== NOT EXECUTED b0c8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b0cc: eb0001b6 bl b7ac <== NOT EXECUTED b0d0: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b0d4: 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)) b0d8: 0afffff0 beq b0a0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; b0dc: e3e0a003 mvn sl, #3 <== NOT EXECUTED b0e0: eaffffd4 b b038 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b0e4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b0e8: e5952020 ldr r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b0ec: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b0f0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b0f4: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b0f8: e5852020 str r2, [r5, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b0fc: e5853010 str r3, [r5, #16] <== NOT EXECUTED b100: 0a000058 beq b268 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) b104: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b108: e5952024 ldr r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b10c: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b110: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b114: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b118: e5852024 str r2, [r5, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b11c: e5853014 str r3, [r5, #20] <== NOT EXECUTED b120: 1affff9c bne af98 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b124: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b128: e28d1004 add r1, sp, #4 <== NOT EXECUTED b12c: eb000185 bl b748 <== NOT EXECUTED b130: eaffff98 b af98 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b134: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED b138: ebfff902 bl 9548 <== NOT EXECUTED if (pipe == NULL) b13c: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b140: e1a08000 mov r8, r0 <== NOT EXECUTED b144: e1a06000 mov r6, r0 <== NOT EXECUTED if (pipe == NULL) b148: 03e0a00b mvneq sl, #11 <== NOT EXECUTED b14c: 0affff84 beq af64 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); b150: e1a03000 mov r3, r0 <== NOT EXECUTED b154: e4839004 str r9, [r3], #4 <== NOT EXECUTED b158: e2833004 add r3, r3, #4 <== NOT EXECUTED b15c: e4839004 str r9, [r3], #4 <== NOT EXECUTED b160: e4839004 str r9, [r3], #4 <== NOT EXECUTED b164: e4839004 str r9, [r3], #4 <== NOT EXECUTED b168: e4839004 str r9, [r3], #4 <== NOT EXECUTED b16c: e4839004 str r9, [r3], #4 <== NOT EXECUTED b170: e4839004 str r9, [r3], #4 <== NOT EXECUTED b174: e4839004 str r9, [r3], #4 <== NOT EXECUTED b178: e4839004 str r9, [r3], #4 <== NOT EXECUTED b17c: e4839004 str r9, [r3], #4 <== NOT EXECUTED b180: e4839004 str r9, [r3], #4 <== NOT EXECUTED pipe->Size = PIPE_BUF; b184: e3a02c02 mov r2, #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)); b188: e5839000 str r9, [r3] <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); b18c: e1a00002 mov r0, r2 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; b190: e5882004 str r2, [r8, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); b194: ebfff8eb bl 9548 <== NOT EXECUTED if (! pipe->Buffer) b198: 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); b19c: e5880000 str r0, [r8] <== NOT EXECUTED if (! pipe->Buffer) b1a0: 03e0a00b mvneq sl, #11 <== NOT EXECUTED b1a4: 0a00002c beq b25c <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( b1a8: e59fa124 ldr sl, [pc, #292] ; b2d4 <== NOT EXECUTED b1ac: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b1b0: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b1b4: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b1b8: e1a01009 mov r1, r9 <== NOT EXECUTED b1bc: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED b1c0: e1a02009 mov r2, r9 <== NOT EXECUTED b1c4: e288302c add r3, r8, #44 ; 0x2c <== NOT EXECUTED b1c8: eb000113 bl b61c <== NOT EXECUTED b1cc: e2501000 subs r1, r0, #0 <== NOT EXECUTED b1d0: 1a00001e bne b250 <== 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( b1d4: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b1d8: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b1dc: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b1e0: e2883030 add r3, r8, #48 ; 0x30 <== NOT EXECUTED b1e4: e3800c77 orr r0, r0, #30464 ; 0x7700 <== NOT EXECUTED b1e8: e1a02001 mov r2, r1 <== NOT EXECUTED b1ec: eb00010a bl b61c <== NOT EXECUTED b1f0: e2503000 subs r3, r0, #0 <== NOT EXECUTED b1f4: 1a000013 bne b248 <== 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( b1f8: e5da0000 ldrb r0, [sl] <== NOT EXECUTED b1fc: e3800205 orr r0, r0, #1342177280 ; 0x50000000 <== NOT EXECUTED b200: e3800849 orr r0, r0, #4784128 ; 0x490000 <== NOT EXECUTED b204: e288c028 add ip, r8, #40 ; 0x28 <== NOT EXECUTED b208: e3800c73 orr r0, r0, #29440 ; 0x7300 <== NOT EXECUTED b20c: e3a01001 mov r1, #1 <== NOT EXECUTED b210: e3a02010 mov r2, #16 <== NOT EXECUTED b214: e58dc000 str ip, [sp] <== NOT EXECUTED b218: ebffe4b8 bl 4500 <== NOT EXECUTED b21c: e3500000 cmp r0, #0 <== NOT EXECUTED b220: 1a000006 bne b240 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b224: e5da3000 ldrb r3, [sl] <== NOT EXECUTED b228: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED b22c: e2833001 add r3, r3, #1 <== NOT EXECUTED b230: e5ca3000 strb r3, [sl] <== NOT EXECUTED c = 'a'; b234: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED b238: 05ca3000 strbeq r3, [sl] <== NOT EXECUTED b23c: eaffff3e b af3c <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b240: e5980030 ldr r0, [r8, #48] ; 0x30 <== NOT EXECUTED b244: eb000125 bl b6e0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); b248: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED b24c: eb000123 bl b6e0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); b250: e5980000 ldr r0, [r8] <== NOT EXECUTED b254: ebfff765 bl 8ff0 <== NOT EXECUTED b258: e3e0a003 mvn sl, #3 <== NOT EXECUTED err_buf: free(pipe); b25c: e1a00008 mov r0, r8 <== NOT EXECUTED b260: ebfff762 bl 8ff0 <== NOT EXECUTED b264: eaffff3e b af64 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); b268: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b26c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b270: eb000134 bl b748 <== NOT EXECUTED b274: eaffffa2 b b104 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); b278: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b27c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b280: eb000130 bl b748 <== NOT EXECUTED b284: eaffff7d b b080 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); b288: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b28c: e28d1004 add r1, sp, #4 <== NOT EXECUTED b290: eb00012c bl b748 <== NOT EXECUTED b294: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED b298: eaffff52 b afe8 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); b29c: e596002c ldr r0, [r6, #44] ; 0x2c <== NOT EXECUTED b2a0: eb00010e bl b6e0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); b2a4: e5960030 ldr r0, [r6, #48] ; 0x30 <== NOT EXECUTED b2a8: eb00010c bl b6e0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); b2ac: e5960028 ldr r0, [r6, #40] ; 0x28 <== NOT EXECUTED b2b0: ebffe504 bl 46c8 <== NOT EXECUTED free(pipe->Buffer); b2b4: e5960000 ldr r0, [r6] <== NOT EXECUTED b2b8: ebfff74c bl 8ff0 <== NOT EXECUTED free(pipe); b2bc: e1a00006 mov r0, r6 <== NOT EXECUTED b2c0: ebfff74a bl 8ff0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); b2c4: e5950000 ldr r0, [r5] <== NOT EXECUTED b2c8: ebffe56f bl 488c <== NOT EXECUTED b2cc: eaffff34 b afa4 <== NOT EXECUTED b2d0: 000190e4 .word 0x000190e4 b2d4: 00017d38 .word 0x00017d38 00008f24 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8f24: e59f2044 ldr r2, [pc, #68] ; 8f70 <== NOT EXECUTED 8f28: e4923004 ldr r3, [r2], #4 <== NOT EXECUTED 8f2c: e1530002 cmp r3, r2 <== NOT EXECUTED 8f30: 0a00000a beq 8f60 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 8f34: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8f38: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 8f3c: e1510000 cmp r1, r0 <== NOT EXECUTED 8f40: 1a000003 bne 8f54 <== NOT EXECUTED 8f44: ea000007 b 8f68 <== NOT EXECUTED 8f48: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED 8f4c: e1510000 cmp r1, r0 <== NOT EXECUTED 8f50: 0a000004 beq 8f68 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 8f54: e5933000 ldr r3, [r3] <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8f58: e1530002 cmp r3, r2 <== NOT EXECUTED 8f5c: 1afffff9 bne 8f48 <== NOT EXECUTED 8f60: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 8f64: e12fff1e bx lr <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8f68: e3a00001 mov r0, #1 <== NOT EXECUTED 8f6c: e12fff1e bx lr <== NOT EXECUTED 8f70: 0006546c .word 0x0006546c 0000263c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 263c: e59f3108 ldr r3, [pc, #264] ; 274c 2640: e5933000 ldr r3, [r3] 2644: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2648: 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); 264c: 2a000034 bcs 2724 iop = rtems_libio_iop(fd); 2650: e59f30f8 ldr r3, [pc, #248] ; 2750 2654: e5933000 ldr r3, [r3] 2658: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 265c: e5903014 ldr r3, [r0, #20] 2660: e3130c01 tst r3, #256 ; 0x100 2664: 0a00002e beq 2724 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2668: e3130002 tst r3, #2 266c: 0a000031 beq 2738 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2670: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2674: e351000b cmp r1, #11 2678: 979ff101 ldrls pc, [pc, r1, lsl #2] 267c: ea00000d b 26b8 2680: 000026cc .word 0x000026cc <== NOT EXECUTED 2684: 000026d4 .word 0x000026d4 <== NOT EXECUTED 2688: 000026dc .word 0x000026dc <== NOT EXECUTED 268c: 000026e4 .word 0x000026e4 <== NOT EXECUTED 2690: 000026ec .word 0x000026ec <== NOT EXECUTED 2694: 000026f4 .word 0x000026f4 <== NOT EXECUTED 2698: 000026fc .word 0x000026fc <== NOT EXECUTED 269c: 00002704 .word 0x00002704 <== NOT EXECUTED 26a0: 0000270c .word 0x0000270c <== NOT EXECUTED 26a4: 00002714 .word 0x00002714 <== NOT EXECUTED 26a8: 0000271c .word 0x0000271c <== NOT EXECUTED 26ac: 000026b0 .word 0x000026b0 <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 26b0: e5930060 ldr r0, [r3, #96] ; 0x60 break; 26b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 26b8: eb00314d bl ebf4 <__errno> 26bc: e3a03016 mov r3, #22 26c0: e5803000 str r3, [r0] 26c4: e3e00000 mvn r0, #0 break; } return return_value; } 26c8: 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; 26cc: e5930038 ldr r0, [r3, #56] ; 0x38 break; 26d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 26d4: e593003c ldr r0, [r3, #60] ; 0x3c break; 26d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 26dc: e5930040 ldr r0, [r3, #64] ; 0x40 break; 26e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 26e4: e5930044 ldr r0, [r3, #68] ; 0x44 break; 26e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 26ec: e5930048 ldr r0, [r3, #72] ; 0x48 break; 26f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 26f4: e593004c ldr r0, [r3, #76] ; 0x4c break; 26f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 26fc: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2700: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2704: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2708: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 270c: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2710: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2714: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2718: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 271c: e593005c ldr r0, [r3, #92] ; 0x5c break; 2720: 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); 2724: eb003132 bl ebf4 <__errno> 2728: e3a03009 mov r3, #9 272c: e5803000 str r3, [r0] 2730: e3e00000 mvn r0, #0 2734: e49df004 pop {pc} ; (ldr pc, [sp], #4) rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2738: eb00312d bl ebf4 <__errno> <== NOT EXECUTED 273c: e3a03016 mov r3, #22 <== NOT EXECUTED 2740: e5803000 str r3, [r0] <== NOT EXECUTED 2744: e3e00000 mvn r0, #0 <== NOT EXECUTED 2748: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 274c: 0001b830 .word 0x0001b830 2750: 0001d1d0 .word 0x0001d1d0 00008ff0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8ff0: e59f3088 ldr r3, [pc, #136] ; 9080 8ff4: e593200c ldr r2, [r3, #12] 8ff8: e92d4030 push {r4, r5, lr} 8ffc: e2822001 add r2, r2, #1 if ( !ptr ) 9000: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 9004: e583200c str r2, [r3, #12] if ( !ptr ) 9008: 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()) && 900c: e59f3070 ldr r3, [pc, #112] ; 9084 9010: e5933000 ldr r3, [r3] 9014: e3530003 cmp r3, #3 9018: 0a000012 beq 9068 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 901c: e59f3064 ldr r3, [pc, #100] ; 9088 9020: e5933000 ldr r3, [r3] 9024: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 9028: 11a00004 movne r0, r4 902c: 11a0e00f movne lr, pc 9030: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 9034: e59f5050 ldr r5, [pc, #80] ; 908c 9038: e1a01004 mov r1, r4 903c: e5950000 ldr r0, [r5] 9040: eb0004b2 bl a310 <_Protected_heap_Free> 9044: e3500000 cmp r0, #0 9048: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 904c: 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", 9050: e59f0038 ldr r0, [pc, #56] ; 9090 <== NOT EXECUTED 9054: e2822018 add r2, r2, #24 <== NOT EXECUTED 9058: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 905c: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 9060: 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", 9064: eaffe3d5 b 1fc0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 9068: eb000116 bl 94c8 906c: e3500000 cmp r0, #0 9070: 1affffe9 bne 901c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 9074: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 9078: 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); 907c: ea000124 b 9514 <== NOT EXECUTED 9080: 00019174 .word 0x00019174 9084: 00019470 .word 0x00019470 9088: 00018fc8 .word 0x00018fc8 908c: 00017b5c .word 0x00017b5c 9090: 00018c88 .word 0x00018c88 00026978 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 26978: e59f3058 ldr r3, [pc, #88] ; 269d8 <== NOT EXECUTED 2697c: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 26980: e92d4010 push {r4, lr} <== NOT EXECUTED 26984: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 26988: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2698c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 26990: e3530000 cmp r3, #0 <== NOT EXECUTED 26994: 0a000004 beq 269ac <== NOT EXECUTED 26998: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2699c: e3530000 cmp r3, #0 <== NOT EXECUTED 269a0: 12800004 addne r0, r0, #4 <== NOT EXECUTED 269a4: 11a0e00f movne lr, pc <== NOT EXECUTED 269a8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 269ac: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 269b0: e3530000 cmp r3, #0 <== NOT EXECUTED 269b4: 0a000004 beq 269cc <== NOT EXECUTED 269b8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 269bc: e3530000 cmp r3, #0 <== NOT EXECUTED 269c0: 12840018 addne r0, r4, #24 <== NOT EXECUTED 269c4: 11a0e00f movne lr, pc <== NOT EXECUTED 269c8: 112fff13 bxne r3 <== NOT EXECUTED free(env); 269cc: e1a00004 mov r0, r4 <== NOT EXECUTED } } 269d0: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 269d4: eaff7b32 b 56a4 <== NOT EXECUTED 269d8: 00065484 .word 0x00065484 000170bc : int fstat( int fd, struct stat *sbuf ) { 170bc: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 170c0: e2515000 subs r5, r1, #0 170c4: 0a000023 beq 17158 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 170c8: e59f309c ldr r3, [pc, #156] ; 1716c 170cc: e5933000 ldr r3, [r3] 170d0: e1500003 cmp r0, r3 170d4: 2a000015 bcs 17130 170d8: e59f3090 ldr r3, [pc, #144] ; 17170 170dc: e5934000 ldr r4, [r3] 170e0: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 170e4: e5943014 ldr r3, [r4, #20] 170e8: e3130c01 tst r3, #256 ; 0x100 170ec: 0a00000f beq 17130 if ( !iop->handlers ) 170f0: e594303c ldr r3, [r4, #60] ; 0x3c 170f4: e3530000 cmp r3, #0 170f8: 0a00000c beq 17130 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 170fc: e5933018 ldr r3, [r3, #24] 17100: e3530000 cmp r3, #0 17104: 0a00000e beq 17144 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 17108: e3a01000 mov r1, #0 1710c: e3a02048 mov r2, #72 ; 0x48 17110: e1a00005 mov r0, r5 17114: ebffd6a4 bl cbac return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 17118: e2840018 add r0, r4, #24 1711c: e1a01005 mov r1, r5 17120: e594303c ldr r3, [r4, #60] ; 0x3c 17124: e1a0e00f mov lr, pc 17128: e593f018 ldr pc, [r3, #24] } 1712c: 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 ); 17130: ebffd453 bl c284 <__errno> 17134: e3a03009 mov r3, #9 17138: e5803000 str r3, [r0] 1713c: e3e00000 mvn r0, #0 17140: e8bd8030 pop {r4, r5, pc} if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17144: ebffd44e bl c284 <__errno> <== NOT EXECUTED 17148: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1714c: e5803000 str r3, [r0] <== NOT EXECUTED 17150: e3e00000 mvn r0, #0 <== NOT EXECUTED 17154: 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 ); 17158: ebffd449 bl c284 <__errno> 1715c: e3a0300e mov r3, #14 17160: e5803000 str r3, [r0] 17164: e3e00000 mvn r0, #0 17168: e8bd8030 pop {r4, r5, pc} 1716c: 00017b50 .word 0x00017b50 17170: 00019168 .word 0x00019168 0002567c : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2567c: e59f308c ldr r3, [pc, #140] ; 25710 25680: e5933000 ldr r3, [r3] 25684: e1500003 cmp r0, r3 #include int fsync( int fd ) { 25688: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2568c: 2a000010 bcs 256d4 iop = rtems_libio_iop( fd ); 25690: e59f307c ldr r3, [pc, #124] ; 25714 25694: e5933000 ldr r3, [r3] 25698: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2569c: e5903014 ldr r3, [r0, #20] 256a0: e3130c01 tst r3, #256 ; 0x100 256a4: 0a00000a beq 256d4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 256a8: e3130004 tst r3, #4 256ac: 0a00000d beq 256e8 /* * Now process the fsync(). */ if ( !iop->handlers ) 256b0: e590303c ldr r3, [r0, #60] ; 0x3c 256b4: e3530000 cmp r3, #0 256b8: 0a000005 beq 256d4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 256bc: e5933028 ldr r3, [r3, #40] ; 0x28 256c0: e3530000 cmp r3, #0 256c4: 0a00000c beq 256fc rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 256c8: e1a0e00f mov lr, pc 256cc: e12fff13 bx r3 } 256d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 256d4: eb005f50 bl 3d41c <__errno> <== NOT EXECUTED 256d8: e3a03009 mov r3, #9 <== NOT EXECUTED 256dc: e5803000 str r3, [r0] <== NOT EXECUTED 256e0: e3e00000 mvn r0, #0 <== NOT EXECUTED 256e4: 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( iop, LIBIO_FLAGS_WRITE ); 256e8: eb005f4b bl 3d41c <__errno> 256ec: e3a03016 mov r3, #22 256f0: e5803000 str r3, [r0] 256f4: e3e00000 mvn r0, #0 256f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 256fc: eb005f46 bl 3d41c <__errno> 25700: e3a03086 mov r3, #134 ; 0x86 25704: e5803000 str r3, [r0] 25708: e3e00000 mvn r0, #0 2570c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 25710: 00057580 .word 0x00057580 25714: 00065428 .word 0x00065428 00009094 : int ftruncate( int fd, off_t length ) { 9094: e92d40f0 push {r4, r5, r6, r7, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 9098: e59f30f4 ldr r3, [pc, #244] ; 9194 909c: e5933000 ldr r3, [r3] 90a0: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 90a4: e24dd014 sub sp, sp, #20 90a8: e1a05001 mov r5, r1 90ac: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 90b0: 2a000023 bcs 9144 iop = rtems_libio_iop( fd ); 90b4: e59f30dc ldr r3, [pc, #220] ; 9198 90b8: e5934000 ldr r4, [r3] 90bc: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 90c0: e5943014 ldr r3, [r4, #20] 90c4: e3130c01 tst r3, #256 ; 0x100 90c8: 0a00001d beq 9144 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90cc: e284c018 add ip, r4, #24 90d0: e8bc000f ldm ip!, {r0, r1, r2, r3} 90d4: e1a0700d mov r7, sp 90d8: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 90dc: e59d200c ldr r2, [sp, #12] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90e0: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 90e4: e5927010 ldr r7, [r2, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90e8: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 90ec: e3570000 cmp r7, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90f0: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 90f4: 0a00001c beq 916c rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 90f8: e1a0000d mov r0, sp 90fc: e1a0e00f mov lr, pc 9100: e12fff17 bx r7 9104: e3500001 cmp r0, #1 9108: 0a00001c beq 9180 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 910c: e5943014 ldr r3, [r4, #20] 9110: e3130004 tst r3, #4 9114: 0a00000f beq 9158 if ( !iop->handlers->ftruncate_h ) 9118: e594303c ldr r3, [r4, #60] ; 0x3c 911c: e5933020 ldr r3, [r3, #32] 9120: e3530000 cmp r3, #0 9124: 0a000010 beq 916c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 9128: e1a00004 mov r0, r4 912c: e1a01005 mov r1, r5 9130: e1a02006 mov r2, r6 9134: e1a0e00f mov lr, pc 9138: e12fff13 bx r3 } 913c: e28dd014 add sp, sp, #20 9140: 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); 9144: eb000c4e bl c284 <__errno> <== NOT EXECUTED 9148: e3a03009 mov r3, #9 <== NOT EXECUTED 914c: e5803000 str r3, [r0] <== NOT EXECUTED 9150: e3e00000 mvn r0, #0 <== NOT EXECUTED 9154: eafffff8 b 913c <== 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 ); 9158: eb000c49 bl c284 <__errno> <== NOT EXECUTED 915c: e3a03016 mov r3, #22 <== NOT EXECUTED 9160: e5803000 str r3, [r0] <== NOT EXECUTED 9164: e3e00000 mvn r0, #0 <== NOT EXECUTED 9168: eafffff3 b 913c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 916c: eb000c44 bl c284 <__errno> <== NOT EXECUTED 9170: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9174: e5803000 str r3, [r0] <== NOT EXECUTED 9178: e3e00000 mvn r0, #0 <== NOT EXECUTED 917c: eaffffee b 913c <== 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 ); 9180: eb000c3f bl c284 <__errno> 9184: e3a03015 mov r3, #21 9188: e5803000 str r3, [r0] 918c: e3e00000 mvn r0, #0 9190: eaffffe9 b 913c 9194: 00017b50 .word 0x00017b50 9198: 00019168 .word 0x00019168 00056f18 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 56f18: e59f30b8 ldr r3, [pc, #184] ; 56fd8 56f1c: e5933000 ldr r3, [r3] 56f20: e1500003 cmp r0, r3 56f24: 359f30b0 ldrcc r3, [pc, #176] ; 56fdc int getdents( int dd_fd, char *dd_buf, int dd_len ) { 56f28: e92d40f0 push {r4, r5, r6, r7, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 56f2c: 35934000 ldrcc r4, [r3] 56f30: 23a04000 movcs r4, #0 56f34: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56f38: e284c018 add ip, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 56f3c: e24dd014 sub sp, sp, #20 56f40: e1a06001 mov r6, r1 56f44: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56f48: e8bc000f ldm ip!, {r0, r1, r2, r3} 56f4c: e1a0700d mov r7, sp 56f50: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 56f54: e59d200c ldr r2, [sp, #12] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56f58: e1a03007 mov r3, r7 if ( !loc.ops->node_type_h ) 56f5c: e5927010 ldr r7, [r2, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56f60: e59c2000 ldr r2, [ip] if ( !loc.ops->node_type_h ) 56f64: e3570000 cmp r7, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56f68: e5832000 str r2, [r3] if ( !loc.ops->node_type_h ) 56f6c: 0a000014 beq 56fc4 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 56f70: e1a0000d mov r0, sp 56f74: e1a0e00f mov lr, pc 56f78: e12fff17 bx r7 56f7c: e3500001 cmp r0, #1 56f80: 1a00000a bne 56fb0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 56f84: e594303c ldr r3, [r4, #60] ; 0x3c 56f88: e5933008 ldr r3, [r3, #8] 56f8c: e3530000 cmp r3, #0 56f90: 0a00000b beq 56fc4 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 56f94: e1a00004 mov r0, r4 56f98: e1a01006 mov r1, r6 56f9c: e1a02005 mov r2, r5 56fa0: e1a0e00f mov lr, pc 56fa4: e12fff13 bx r3 } 56fa8: e28dd014 add sp, sp, #20 56fac: 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 ); 56fb0: ebff9919 bl 3d41c <__errno> 56fb4: e3a03014 mov r3, #20 56fb8: e5803000 str r3, [r0] 56fbc: e3e00000 mvn r0, #0 56fc0: eafffff8 b 56fa8 * 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 ); 56fc4: ebff9914 bl 3d41c <__errno> <== NOT EXECUTED 56fc8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 56fcc: e5803000 str r3, [r0] <== NOT EXECUTED 56fd0: e3e00000 mvn r0, #0 <== NOT EXECUTED 56fd4: eafffff3 b 56fa8 <== NOT EXECUTED 56fd8: 00057580 .word 0x00057580 56fdc: 00065428 .word 0x00065428 00025848 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 25848: e59f3008 ldr r3, [pc, #8] ; 25858 <== NOT EXECUTED 2584c: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 25850: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 25854: e12fff1e bx lr <== NOT EXECUTED 25858: 00057858 .word 0x00057858 00025ea4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25ea4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 25ea8: e59d801c ldr r8, [sp, #28] 25eac: e1a05000 mov r5, r0 25eb0: e1a0a001 mov sl, r1 25eb4: e1a04002 mov r4, r2 25eb8: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 25ebc: ebffffb2 bl 25d8c if ((fp = fopen("/etc/group", "r")) == NULL) { 25ec0: e59f00b0 ldr r0, [pc, #176] ; 25f78 25ec4: e59f10b0 ldr r1, [pc, #176] ; 25f7c 25ec8: eb005fc3 bl 3dddc 25ecc: e2506000 subs r6, r0, #0 25ed0: 1a000006 bne 25ef0 25ed4: ea000022 b 25f64 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 25ed8: e5940000 ldr r0, [r4] 25edc: eb007560 bl 43464 25ee0: e2700001 rsbs r0, r0, #1 25ee4: 33a00000 movcc r0, #0 } else { match = (grp->gr_gid == gid); } if (match) { 25ee8: e3500000 cmp r0, #0 25eec: 1a00000f bne 25f30 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25ef0: e1a01004 mov r1, r4 25ef4: e1a02007 mov r2, r7 25ef8: e1a03008 mov r3, r8 25efc: e1a00006 mov r0, r6 25f00: ebfffee1 bl 25a8c 25f04: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 25f08: e1a01005 mov r1, r5 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25f0c: 0a00000d beq 25f48 errno = EINVAL; fclose(fp); return -1; } if (name) { 25f10: e3550000 cmp r5, #0 25f14: 1affffef bne 25ed8 match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 25f18: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 25f1c: e150000a cmp r0, sl <== NOT EXECUTED 25f20: 13a00000 movne r0, #0 <== NOT EXECUTED 25f24: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 25f28: e3500000 cmp r0, #0 <== NOT EXECUTED 25f2c: 0affffef beq 25ef0 <== NOT EXECUTED fclose(fp); 25f30: e1a00006 mov r0, r6 25f34: eb005d85 bl 3d550 *result = grp; 25f38: e59d3020 ldr r3, [sp, #32] 25f3c: e3a00000 mov r0, #0 25f40: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 25f44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 25f48: eb005d33 bl 3d41c <__errno> <== NOT EXECUTED 25f4c: e3a03016 mov r3, #22 <== NOT EXECUTED 25f50: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 25f54: e1a00006 mov r0, r6 <== NOT EXECUTED 25f58: eb005d7c bl 3d550 <== NOT EXECUTED 25f5c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25f60: 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; 25f64: eb005d2c bl 3d41c <__errno> <== NOT EXECUTED 25f68: e3a03016 mov r3, #22 <== NOT EXECUTED 25f6c: e5803000 str r3, [r0] <== NOT EXECUTED 25f70: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25f74: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 25f78: 0005b838 .word 0x0005b838 25f7c: 00060fd8 .word 0x00060fd8 00025be0 : return NULL; return p; } struct group *getgrent(void) { 25be0: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 25be4: e59f4030 ldr r4, [pc, #48] ; 25c1c <== NOT EXECUTED 25be8: e5940000 ldr r0, [r4] <== NOT EXECUTED 25bec: e3500000 cmp r0, #0 <== NOT EXECUTED 25bf0: 1a000001 bne 25bfc <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 25bf4: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 25bf8: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 25bfc: e2841008 add r1, r4, #8 <== NOT EXECUTED 25c00: e2842018 add r2, r4, #24 <== NOT EXECUTED 25c04: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25c08: ebffff9f bl 25a8c <== NOT EXECUTED 25c0c: e3500000 cmp r0, #0 <== NOT EXECUTED 25c10: 12840008 addne r0, r4, #8 <== NOT EXECUTED 25c14: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25c18: eafffff5 b 25bf4 <== NOT EXECUTED 25c1c: 0006513c .word 0x0006513c 00025fbc : struct group *getgrgid( gid_t gid ) { 25fbc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25fc0: e59f1030 ldr r1, [pc, #48] ; 25ff8 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 25fc4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 25fc8: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25fcc: e28dc004 add ip, sp, #4 <== NOT EXECUTED 25fd0: e2812010 add r2, r1, #16 <== NOT EXECUTED 25fd4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25fd8: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 25fdc: e58dc000 str ip, [sp] <== NOT EXECUTED 25fe0: ebffffe6 bl 25f80 <== NOT EXECUTED 25fe4: e3500000 cmp r0, #0 <== NOT EXECUTED 25fe8: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 25fec: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 25ff0: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25ff4: e8bd8000 pop {pc} <== NOT EXECUTED 25ff8: 00065144 .word 0x00065144 00025f80 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25f80: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 25f84: e1a0c002 mov ip, r2 <== NOT EXECUTED 25f88: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 25f8c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25f90: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25f94: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25f98: e1a0300c mov r3, ip <== NOT EXECUTED 25f9c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 25fa0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25fa4: e1a0200e mov r2, lr <== NOT EXECUTED 25fa8: e3a00000 mov r0, #0 <== NOT EXECUTED 25fac: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 25fb0: ebffffbb bl 25ea4 <== NOT EXECUTED } 25fb4: e28dd008 add sp, sp, #8 <== NOT EXECUTED 25fb8: e8bd8000 pop {pc} <== NOT EXECUTED 00021774 : */ pid_t getpid( void ) { return _Objects_Local_node; } 21774: e3a00001 mov r0, #1 <== NOT EXECUTED 21778: e12fff1e bx lr <== NOT EXECUTED 0002609c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2609c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 260a0: e59d801c ldr r8, [sp, #28] 260a4: e1a05000 mov r5, r0 260a8: e1a0a001 mov sl, r1 260ac: e1a04002 mov r4, r2 260b0: e1a07003 mov r7, r3 FILE *fp; int match; init_etc_passwd_group(); 260b4: ebffff34 bl 25d8c if ((fp = fopen("/etc/passwd", "r")) == NULL) { 260b8: e59f00b0 ldr r0, [pc, #176] ; 26170 260bc: e59f10b0 ldr r1, [pc, #176] ; 26174 260c0: eb005f45 bl 3dddc 260c4: e2506000 subs r6, r0, #0 260c8: 1a000006 bne 260e8 260cc: ea000022 b 2615c <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 260d0: e5940000 ldr r0, [r4] 260d4: eb0074e2 bl 43464 260d8: e2700001 rsbs r0, r0, #1 260dc: 33a00000 movcc r0, #0 } else { match = (pwd->pw_uid == uid); } if (match) { 260e0: e3500000 cmp r0, #0 260e4: 1a00000f bne 26128 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 260e8: e1a01004 mov r1, r4 260ec: e1a02007 mov r2, r7 260f0: e1a03008 mov r3, r8 260f4: e1a00006 mov r0, r6 260f8: ebfffec8 bl 25c20 260fc: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 26100: e1a01005 mov r1, r5 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 26104: 0a00000d beq 26140 errno = EINVAL; fclose(fp); return -1; } if (name) { 26108: e3550000 cmp r5, #0 2610c: 1affffef bne 260d0 match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 26110: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 26114: e150000a cmp r0, sl <== NOT EXECUTED 26118: 13a00000 movne r0, #0 <== NOT EXECUTED 2611c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 26120: e3500000 cmp r0, #0 <== NOT EXECUTED 26124: 0affffef beq 260e8 <== NOT EXECUTED fclose(fp); 26128: e1a00006 mov r0, r6 2612c: eb005d07 bl 3d550 *result = pwd; 26130: e59d3020 ldr r3, [sp, #32] 26134: e3a00000 mov r0, #0 26138: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 2613c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 26140: eb005cb5 bl 3d41c <__errno> <== NOT EXECUTED 26144: e3a03016 mov r3, #22 <== NOT EXECUTED 26148: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 2614c: e1a00006 mov r0, r6 <== NOT EXECUTED 26150: eb005cfe bl 3d550 <== NOT EXECUTED 26154: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 26158: 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; 2615c: eb005cae bl 3d41c <__errno> <== NOT EXECUTED 26160: e3a03016 mov r3, #22 <== NOT EXECUTED 26164: e5803000 str r3, [r0] <== NOT EXECUTED 26168: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 2616c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 26170: 0005b788 .word 0x0005b788 26174: 00060fd8 .word 0x00060fd8 00025d4c : return NULL; return p; } struct passwd *getpwent(void) { 25d4c: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 25d50: e59f4030 ldr r4, [pc, #48] ; 25d88 <== NOT EXECUTED 25d54: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 25d58: e3500000 cmp r0, #0 <== NOT EXECUTED 25d5c: 1a000001 bne 25d68 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 25d60: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 25d64: e8bd8010 pop {r4, pc} <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 25d68: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 25d6c: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 25d70: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25d74: ebffffa9 bl 25c20 <== NOT EXECUTED 25d78: e3500000 cmp r0, #0 <== NOT EXECUTED 25d7c: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 25d80: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25d84: eafffff5 b 25d60 <== NOT EXECUTED 25d88: 0006513c .word 0x0006513c 000261b4 : struct passwd *getpwuid( uid_t uid ) { 261b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 261b8: e59f1030 ldr r1, [pc, #48] ; 261f0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 261bc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 261c0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 261c4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 261c8: e281201c add r2, r1, #28 <== NOT EXECUTED 261cc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 261d0: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 261d4: e58dc000 str ip, [sp] <== NOT EXECUTED 261d8: ebffffe6 bl 26178 <== NOT EXECUTED 261dc: e3500000 cmp r0, #0 <== NOT EXECUTED 261e0: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 261e4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 261e8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 261ec: e8bd8000 pop {pc} <== NOT EXECUTED 261f0: 0006521c .word 0x0006521c 00026178 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 26178: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 2617c: e1a0c002 mov ip, r2 <== NOT EXECUTED 26180: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 26184: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 26188: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2618c: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 26190: e1a0300c mov r3, ip <== NOT EXECUTED 26194: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 26198: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2619c: e1a0200e mov r2, lr <== NOT EXECUTED 261a0: e3a00000 mov r0, #0 <== NOT EXECUTED 261a4: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 261a8: ebffffbb bl 2609c <== NOT EXECUTED } 261ac: e28dd008 add sp, sp, #8 <== NOT EXECUTED 261b0: e8bd8000 pop {pc} <== NOT EXECUTED 0000919c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 919c: e92d4030 push {r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 91a0: e2504000 subs r4, r0, #0 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 91a4: e24dd008 sub sp, sp, #8 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 91a8: 0a00000f beq 91ec static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 91ac: e10f5000 mrs r5, CPSR 91b0: e3853080 orr r3, r5, #128 ; 0x80 91b4: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 91b8: e1a0000d mov r0, sp 91bc: eb000306 bl 9ddc <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 91c0: 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; 91c4: e59f2034 ldr r2, [pc, #52] ; 9200 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 91c8: e59d3004 ldr r3, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 91cc: 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; 91d0: e59d2000 ldr r2, [sp] time->tv_usec = useconds; 91d4: e1a03fc3 asr r3, r3, #31 91d8: e0633341 rsb r3, r3, r1, asr #6 91dc: e884000c stm r4, {r2, r3} 91e0: 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; } 91e4: e28dd008 add sp, sp, #8 91e8: e8bd8030 pop {r4, r5, pc} void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 91ec: eb000c24 bl c284 <__errno> <== NOT EXECUTED 91f0: e3a0300e mov r3, #14 <== NOT EXECUTED 91f4: e5803000 str r3, [r0] <== NOT EXECUTED 91f8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 91fc: eafffff8 b 91e4 <== NOT EXECUTED 9200: 10624dd3 .word 0x10624dd3 000057c0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 57c0: e59f3008 ldr r3, [pc, #8] ; 57d0 <== NOT EXECUTED 57c4: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 57c8: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 57cc: e12fff1e bx lr <== NOT EXECUTED 57d0: 00057858 .word 0x00057858 00004f6c : int ioctl( int fd, ioctl_command_t command, ... ) { 4f6c: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4f70: e59f3090 ldr r3, [pc, #144] ; 5008 int ioctl( int fd, ioctl_command_t command, ... ) { 4f74: 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 ); 4f78: e5933000 ldr r3, [r3] 4f7c: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 4f80: e24dd004 sub sp, sp, #4 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4f84: 2a000015 bcs 4fe0 iop = rtems_libio_iop( fd ); 4f88: e59f307c ldr r3, [pc, #124] ; 500c 4f8c: e5933000 ldr r3, [r3] 4f90: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 4f94: e5903014 ldr r3, [r0, #20] 4f98: e3130c01 tst r3, #256 ; 0x100 4f9c: 0a00000f beq 4fe0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4fa0: 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 *); 4fa4: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4fa8: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4fac: e58d2000 str r2, [sp] 4fb0: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4fb4: 0a000009 beq 4fe0 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 4fb8: e5933010 ldr r3, [r3, #16] 4fbc: e3530000 cmp r3, #0 4fc0: 0a00000b beq 4ff4 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4fc4: e59d1008 ldr r1, [sp, #8] 4fc8: e1a0e00f mov lr, pc 4fcc: e12fff13 bx r3 return rc; } 4fd0: e28dd004 add sp, sp, #4 4fd4: e49de004 pop {lr} ; (ldr lr, [sp], #4) 4fd8: e28dd00c add sp, sp, #12 4fdc: e12fff1e bx lr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 4fe0: eb00331c bl 11c58 <__errno> 4fe4: e3a03009 mov r3, #9 4fe8: e5803000 str r3, [r0] 4fec: e3e00000 mvn r0, #0 4ff0: eafffff6 b 4fd0 if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ff4: eb003317 bl 11c58 <__errno> <== NOT EXECUTED 4ff8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4ffc: e5803000 str r3, [r0] <== NOT EXECUTED 5000: e3e00000 mvn r0, #0 <== NOT EXECUTED 5004: eafffff1 b 4fd0 <== NOT EXECUTED 5008: 0001da00 .word 0x0001da00 500c: 0001f438 .word 0x0001f438 00002af8 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 2af8: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 2afc: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2b00: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2b04: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 2b08: 1200407f andne r4, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2b0c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2b10: e1a05001 mov r5, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 2b14: 0a000007 beq 2b38 <== NOT EXECUTED c = tolower (c); 2b18: e59f2198 ldr r2, [pc, #408] ; 2cb8 <== NOT EXECUTED 2b1c: e5922000 ldr r2, [r2] <== NOT EXECUTED 2b20: e0822004 add r2, r2, r4 <== NOT EXECUTED 2b24: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 2b28: e2022003 and r2, r2, #3 <== NOT EXECUTED 2b2c: e3520001 cmp r2, #1 <== NOT EXECUTED 2b30: 02844020 addeq r4, r4, #32 <== NOT EXECUTED 2b34: e20440ff and r4, r4, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 2b38: e354000d cmp r4, #13 <== NOT EXECUTED 2b3c: 0a000012 beq 2b8c <== 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)) { 2b40: e354000a cmp r4, #10 <== NOT EXECUTED 2b44: 0a000034 beq 2c1c <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2b48: e3540000 cmp r4, #0 <== NOT EXECUTED 2b4c: 1a000015 bne 2ba8 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2b50: e59f3164 ldr r3, [pc, #356] ; 2cbc <== NOT EXECUTED 2b54: e5932000 ldr r2, [r3] <== NOT EXECUTED 2b58: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED 2b5c: e2422001 sub r2, r2, #1 <== NOT EXECUTED 2b60: e1530002 cmp r3, r2 <== NOT EXECUTED 2b64: aa00000a bge 2b94 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2b68: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED 2b6c: e3120008 tst r2, #8 <== NOT EXECUTED 2b70: 1a00002c bne 2c28 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2b74: e595101c ldr r1, [r5, #28] <== NOT EXECUTED 2b78: e2832001 add r2, r3, #1 <== NOT EXECUTED 2b7c: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 2b80: e3a00000 mov r0, #0 <== NOT EXECUTED 2b84: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2b88: 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) 2b8c: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 2b90: 0a000001 beq 2b9c <== 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; 2b94: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 2b98: 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) 2b9c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2ba0: 03a0400d moveq r4, #13 <== NOT EXECUTED 2ba4: 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)) { 2ba8: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED 2bac: e3130002 tst r3, #2 <== NOT EXECUTED 2bb0: 0affffe6 beq 2b50 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2bb4: e5d52043 ldrb r2, [r5, #67] ; 0x43 <== NOT EXECUTED 2bb8: e1520004 cmp r2, r4 <== NOT EXECUTED 2bbc: 0a000038 beq 2ca4 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2bc0: e5d52044 ldrb r2, [r5, #68] ; 0x44 <== NOT EXECUTED 2bc4: e1520004 cmp r2, r4 <== NOT EXECUTED 2bc8: 0a000030 beq 2c90 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2bcc: e5d52045 ldrb r2, [r5, #69] ; 0x45 <== NOT EXECUTED 2bd0: e1520004 cmp r2, r4 <== NOT EXECUTED 2bd4: 0a000027 beq 2c78 <== NOT EXECUTED return 1; } else if (c == '\n') { 2bd8: e354000a cmp r4, #10 <== NOT EXECUTED 2bdc: 0a00001b beq 2c50 <== 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]) 2be0: e5d5204c ldrb r2, [r5, #76] ; 0x4c <== NOT EXECUTED 2be4: e1520004 cmp r2, r4 <== NOT EXECUTED 2be8: 0a000002 beq 2bf8 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 2bec: e5d52051 ldrb r2, [r5, #81] ; 0x51 <== NOT EXECUTED 2bf0: e1520004 cmp r2, r4 <== NOT EXECUTED 2bf4: 1affffd5 bne 2b50 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2bf8: e3130008 tst r3, #8 <== NOT EXECUTED 2bfc: 1a00001f bne 2c80 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2c00: e285101c add r1, r5, #28 <== NOT EXECUTED 2c04: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2c08: e2832001 add r2, r3, #1 <== NOT EXECUTED 2c0c: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 2c10: e3a00001 mov r0, #1 <== NOT EXECUTED 2c14: e5852020 str r2, [r5, #32] <== NOT EXECUTED return 1; 2c18: 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)) { 2c1c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 2c20: 13a0400d movne r4, #13 <== NOT EXECUTED 2c24: eaffffdf b 2ba8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2c28: e1a00004 mov r0, r4 <== NOT EXECUTED 2c2c: e1a01005 mov r1, r5 <== NOT EXECUTED 2c30: ebffff0b bl 2864 <== NOT EXECUTED 2c34: e285101c add r1, r5, #28 <== NOT EXECUTED 2c38: e891000a ldm r1, {r1, r3} <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2c3c: e2832001 add r2, r3, #1 <== NOT EXECUTED 2c40: e7c14003 strb r4, [r1, r3] <== NOT EXECUTED 2c44: e3a00000 mov r0, #0 <== NOT EXECUTED 2c48: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2c4c: 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)) 2c50: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2c54: 11a00004 movne r0, r4 <== NOT EXECUTED 2c58: 11a01005 movne r1, r5 <== NOT EXECUTED 2c5c: 1bffff00 blne 2864 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2c60: e285101c add r1, r5, #28 <== NOT EXECUTED 2c64: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2c68: e2832001 add r2, r3, #1 <== NOT EXECUTED 2c6c: e3a0000a mov r0, #10 <== NOT EXECUTED 2c70: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 2c74: e5852020 str r2, [r5, #32] <== NOT EXECUTED 2c78: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 2c7c: 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); 2c80: e1a00004 mov r0, r4 <== NOT EXECUTED 2c84: e1a01005 mov r1, r5 <== NOT EXECUTED 2c88: ebfffef5 bl 2864 <== NOT EXECUTED 2c8c: eaffffdb b 2c00 <== 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); 2c90: e1a00005 mov r0, r5 <== NOT EXECUTED 2c94: e3a01001 mov r1, #1 <== NOT EXECUTED 2c98: ebffff13 bl 28ec <== NOT EXECUTED 2c9c: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 2ca0: 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); 2ca4: e1a00005 mov r0, r5 <== NOT EXECUTED 2ca8: e3a01000 mov r1, #0 <== NOT EXECUTED 2cac: ebffff0e bl 28ec <== NOT EXECUTED 2cb0: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; 2cb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2cb8: 00017d4c .word 0x00017d4c 2cbc: 00017cd4 .word 0x00017cd4 0002178c : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 2178c: e3a00000 mov r0, #0 <== NOT EXECUTED 21790: e12fff1e bx lr <== NOT EXECUTED 00026300 : int link( const char *existing, const char *new ) { 26300: e92d40f0 push {r4, r5, r6, r7, lr} 26304: e24dd030 sub sp, sp, #48 ; 0x30 26308: e1a06001 mov r6, r1 2630c: e1a04000 mov r4, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 26310: eb0076bb bl 43e04 26314: e28d5018 add r5, sp, #24 26318: e1a01000 mov r1, r0 2631c: e3a0c001 mov ip, #1 26320: e1a00004 mov r0, r4 26324: e3a02000 mov r2, #0 26328: e1a03005 mov r3, r5 2632c: e58dc000 str ip, [sp] 26330: ebff7ca5 bl 55cc 0, &existing_loc, true ); if ( result != 0 ) 26334: e3500000 cmp r0, #0 26338: 1a000052 bne 26488 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 2633c: e5d63000 ldrb r3, [r6] 26340: e353002f cmp r3, #47 ; 0x2f 26344: 1353005c cmpne r3, #92 ; 0x5c 26348: 13a0e000 movne lr, #0 2634c: 03a0e001 moveq lr, #1 26350: 1a000035 bne 2642c 26354: e59f3210 ldr r3, [pc, #528] ; 2656c 26358: e593c000 ldr ip, [r3] 2635c: e28cc018 add ip, ip, #24 26360: e8bc000f ldm ip!, {r0, r1, r2, r3} 26364: e28d4004 add r4, sp, #4 26368: e1a07004 mov r7, r4 2636c: e8a7000f stmia r7!, {r0, r1, r2, r3} 26370: e59c2000 ldr r2, [ip] 26374: e5872000 str r2, [r7] 26378: e3a0e001 mov lr, #1 if ( !parent_loc.ops->evalformake_h ) { 2637c: e59d3010 ldr r3, [sp, #16] 26380: e5933004 ldr r3, [r3, #4] 26384: e3530000 cmp r3, #0 26388: 0a000033 beq 2645c 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 ); 2638c: e086000e add r0, r6, lr 26390: e1a01004 mov r1, r4 26394: e28d202c add r2, sp, #44 ; 0x2c 26398: e1a0e00f mov lr, pc 2639c: e12fff13 bx r3 if ( result != 0 ) { 263a0: e2506000 subs r6, r0, #0 263a4: 1a00004e bne 264e4 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 263a8: e59d3028 ldr r3, [sp, #40] ; 0x28 263ac: e59d2014 ldr r2, [sp, #20] 263b0: e1520003 cmp r2, r3 263b4: 1a000035 bne 26490 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 263b8: e59d2010 ldr r2, [sp, #16] 263bc: e5923008 ldr r3, [r2, #8] 263c0: e3530000 cmp r3, #0 263c4: 0a000052 beq 26514 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 ); 263c8: e1a00005 mov r0, r5 263cc: e1a01004 mov r1, r4 263d0: e59d202c ldr r2, [sp, #44] ; 0x2c 263d4: e1a0e00f mov lr, pc 263d8: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 263dc: e59d3024 ldr r3, [sp, #36] ; 0x24 263e0: 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 ); 263e4: e1a06000 mov r6, r0 rtems_filesystem_freenode( &existing_loc ); 263e8: 0a000004 beq 26400 263ec: e593301c ldr r3, [r3, #28] 263f0: e3530000 cmp r3, #0 263f4: 11a00005 movne r0, r5 263f8: 11a0e00f movne lr, pc 263fc: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 26400: e59d3010 ldr r3, [sp, #16] 26404: e3530000 cmp r3, #0 26408: 0a000004 beq 26420 2640c: e593301c ldr r3, [r3, #28] 26410: e3530000 cmp r3, #0 26414: 11a00004 movne r0, r4 26418: 11a0e00f movne lr, pc 2641c: 112fff13 bxne r3 return result; } 26420: e1a00006 mov r0, r6 26424: e28dd030 add sp, sp, #48 ; 0x30 26428: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 2642c: e3530000 cmp r3, #0 26430: 0affffc7 beq 26354 26434: e59f3130 ldr r3, [pc, #304] ; 2656c 26438: e593c000 ldr ip, [r3] 2643c: e28cc004 add ip, ip, #4 26440: e8bc000f ldm ip!, {r0, r1, r2, r3} 26444: e28d4004 add r4, sp, #4 26448: e1a07004 mov r7, r4 2644c: e8a7000f stmia r7!, {r0, r1, r2, r3} 26450: e59c2000 ldr r2, [ip] 26454: e5872000 str r2, [r7] 26458: eaffffc7 b 2637c if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 2645c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 26460: e3530000 cmp r3, #0 <== NOT EXECUTED 26464: 0a000004 beq 2647c <== NOT EXECUTED 26468: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2646c: e3530000 cmp r3, #0 <== NOT EXECUTED 26470: 11a00005 movne r0, r5 <== NOT EXECUTED 26474: 11a0e00f movne lr, pc <== NOT EXECUTED 26478: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2647c: eb005be6 bl 3d41c <__errno> <== NOT EXECUTED 26480: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26484: e5803000 str r3, [r0] <== NOT EXECUTED 26488: e3e06000 mvn r6, #0 2648c: eaffffe3 b 26420 * 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 ); 26490: e59d3024 ldr r3, [sp, #36] ; 0x24 26494: e3530000 cmp r3, #0 26498: 0a000004 beq 264b0 2649c: e593301c ldr r3, [r3, #28] 264a0: e3530000 cmp r3, #0 264a4: 11a00005 movne r0, r5 264a8: 11a0e00f movne lr, pc 264ac: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 264b0: e59d3010 ldr r3, [sp, #16] 264b4: e3530000 cmp r3, #0 264b8: 0a000004 beq 264d0 264bc: e593301c ldr r3, [r3, #28] 264c0: e3530000 cmp r3, #0 264c4: 11a00004 movne r0, r4 264c8: 11a0e00f movne lr, pc 264cc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 264d0: eb005bd1 bl 3d41c <__errno> 264d4: e3a03012 mov r3, #18 264d8: e5803000 str r3, [r0] 264dc: e3e06000 mvn r6, #0 264e0: eaffffce b 26420 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 ); 264e4: e59d3024 ldr r3, [sp, #36] ; 0x24 264e8: e3530000 cmp r3, #0 264ec: 0a000004 beq 26504 264f0: e593301c ldr r3, [r3, #28] 264f4: e3530000 cmp r3, #0 264f8: 11a00005 movne r0, r5 264fc: 11a0e00f movne lr, pc 26500: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 26504: eb005bc4 bl 3d41c <__errno> 26508: e5806000 str r6, [r0] 2650c: e3e06000 mvn r6, #0 26510: eaffffc2 b 26420 rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 26514: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 26518: e3530000 cmp r3, #0 <== NOT EXECUTED 2651c: 0a000006 beq 2653c <== NOT EXECUTED 26520: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26524: e3530000 cmp r3, #0 <== NOT EXECUTED 26528: 0a000003 beq 2653c <== NOT EXECUTED 2652c: e1a00005 mov r0, r5 <== NOT EXECUTED 26530: e1a0e00f mov lr, pc <== NOT EXECUTED 26534: e12fff13 bx r3 <== NOT EXECUTED 26538: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 2653c: e3520000 cmp r2, #0 <== NOT EXECUTED 26540: 0a000004 beq 26558 <== NOT EXECUTED 26544: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26548: e3530000 cmp r3, #0 <== NOT EXECUTED 2654c: 11a00004 movne r0, r4 <== NOT EXECUTED 26550: 11a0e00f movne lr, pc <== NOT EXECUTED 26554: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26558: eb005baf bl 3d41c <__errno> <== NOT EXECUTED 2655c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26560: e5803000 str r3, [r0] <== NOT EXECUTED 26564: e3e06000 mvn r6, #0 <== NOT EXECUTED 26568: eaffffac b 26420 <== NOT EXECUTED 2656c: 00057858 .word 0x00057858 00017188 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17188: e59fc134 ldr ip, [pc, #308] ; 172c4 1718c: e59cc000 ldr ip, [ip] 17190: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 17194: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17198: 2a00003d bcs 17294 iop = rtems_libio_iop( fd ); 1719c: e59fc124 ldr ip, [pc, #292] ; 172c8 171a0: e59c4000 ldr r4, [ip] 171a4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 171a8: e5940014 ldr r0, [r4, #20] 171ac: e3100c01 tst r0, #256 ; 0x100 171b0: 0a000037 beq 17294 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 171b4: e594c03c ldr ip, [r4, #60] ; 0x3c 171b8: e59c0014 ldr r0, [ip, #20] 171bc: e3500000 cmp r0, #0 171c0: 0a000039 beq 172ac /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 171c4: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 171c8: e284600c add r6, r4, #12 171cc: e8960060 ldm r6, {r5, r6} switch ( whence ) { 171d0: 0a000022 beq 17260 171d4: e3530002 cmp r3, #2 171d8: 0a00000d beq 17214 171dc: e3530000 cmp r3, #0 171e0: 1a000023 bne 17274 case SEEK_SET: iop->offset = offset; 171e4: e584100c str r1, [r4, #12] 171e8: 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 ); 171ec: e1a00004 mov r0, r4 171f0: e1a0e00f mov lr, pc 171f4: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 171f8: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 171fc: e1a02000 mov r2, r0 17200: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 17204: 0a00000e beq 17244 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17208: e1a01003 mov r1, r3 1720c: e1a00002 mov r0, r2 17210: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 17214: e9940180 ldmib r4, {r7, r8} 17218: e0977001 adds r7, r7, r1 1721c: e0a88002 adc r8, r8, r2 17220: e584700c str r7, [r4, #12] 17224: 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 ); 17228: e1a00004 mov r0, r4 1722c: e1a0e00f mov lr, pc 17230: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 17234: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17238: e1a02000 mov r2, r0 1723c: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 17240: 1afffff0 bne 17208 17244: e3710001 cmn r1, #1 17248: 1affffee bne 17208 iop->offset = old_offset; 1724c: e584500c str r5, [r4, #12] 17250: e5846010 str r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17254: e1a01003 mov r1, r3 17258: e1a00002 mov r0, r2 1725c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 17260: e0917005 adds r7, r1, r5 17264: e0a28006 adc r8, r2, r6 17268: e584700c str r7, [r4, #12] 1726c: e5848010 str r8, [r4, #16] break; 17270: eaffffdd b 171ec case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 17274: ebffd402 bl c284 <__errno> 17278: e3a03016 mov r3, #22 1727c: e5803000 str r3, [r0] 17280: e3e02000 mvn r2, #0 17284: e3e03000 mvn r3, #0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17288: e1a01003 mov r1, r3 1728c: e1a00002 mov r0, r2 17290: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 17294: ebffd3fa bl c284 <__errno> 17298: e3a03009 mov r3, #9 1729c: e5803000 str r3, [r0] 172a0: e3e02000 mvn r2, #0 172a4: e3e03000 mvn r3, #0 172a8: eaffffd6 b 17208 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 172ac: ebffd3f4 bl c284 <__errno> <== NOT EXECUTED 172b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 172b4: e5803000 str r3, [r0] <== NOT EXECUTED 172b8: e3e02000 mvn r2, #0 <== NOT EXECUTED 172bc: e3e03000 mvn r3, #0 <== NOT EXECUTED 172c0: eaffffd0 b 17208 <== NOT EXECUTED 172c4: 00017b50 .word 0x00017b50 172c8: 00019168 .word 0x00019168 000266d4 : int _STAT_NAME( const char *path, struct stat *buf ) { 266d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 266d8: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 266dc: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 266e0: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 266e4: 0a00002f beq 267a8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 266e8: eb0075c5 bl 43e04 <== NOT EXECUTED 266ec: e28d4004 add r4, sp, #4 <== NOT EXECUTED 266f0: e3a0c000 mov ip, #0 <== NOT EXECUTED 266f4: e1a01000 mov r1, r0 <== NOT EXECUTED 266f8: e1a0200c mov r2, ip <== NOT EXECUTED 266fc: e1a00006 mov r0, r6 <== NOT EXECUTED 26700: e1a03004 mov r3, r4 <== NOT EXECUTED 26704: e58dc000 str ip, [sp] <== NOT EXECUTED 26708: ebff7baf bl 55cc <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2670c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 26710: 1a000022 bne 267a0 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 26714: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 26718: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2671c: e3530000 cmp r3, #0 <== NOT EXECUTED 26720: 0a000013 beq 26774 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 26724: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 26728: e1a00005 mov r0, r5 <== NOT EXECUTED 2672c: eb0067f2 bl 406fc <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 26730: e1a01005 mov r1, r5 <== NOT EXECUTED 26734: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 26738: e1a00004 mov r0, r4 <== NOT EXECUTED 2673c: e1a0e00f mov lr, pc <== NOT EXECUTED 26740: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26744: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26748: 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 ); 2674c: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26750: 0a000004 beq 26768 <== NOT EXECUTED 26754: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26758: e3530000 cmp r3, #0 <== NOT EXECUTED 2675c: 11a00004 movne r0, r4 <== NOT EXECUTED 26760: 11a0e00f movne lr, pc <== NOT EXECUTED 26764: 112fff13 bxne r3 <== NOT EXECUTED return status; } 26768: e1a00005 mov r0, r5 <== NOT EXECUTED 2676c: e28dd018 add sp, sp, #24 <== NOT EXECUTED 26770: 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 ); 26774: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26778: e3530000 cmp r3, #0 <== NOT EXECUTED 2677c: 0a000004 beq 26794 <== NOT EXECUTED 26780: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26784: e3530000 cmp r3, #0 <== NOT EXECUTED 26788: 11a00004 movne r0, r4 <== NOT EXECUTED 2678c: 11a0e00f movne lr, pc <== NOT EXECUTED 26790: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26794: eb005b20 bl 3d41c <__errno> <== NOT EXECUTED 26798: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2679c: e5803000 str r3, [r0] <== NOT EXECUTED 267a0: e3e05000 mvn r5, #0 <== NOT EXECUTED 267a4: eaffffef b 26768 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 267a8: eb005b1b bl 3d41c <__errno> <== NOT EXECUTED 267ac: e3a0300e mov r3, #14 <== NOT EXECUTED 267b0: e5803000 str r3, [r0] <== NOT EXECUTED 267b4: e3e05000 mvn r5, #0 <== NOT EXECUTED 267b8: eaffffea b 26768 <== NOT EXECUTED 00009548 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 9548: e59f30dc ldr r3, [pc, #220] ; 962c 954c: e5932004 ldr r2, [r3, #4] 9550: e2822001 add r2, r2, #1 9554: e92d4070 push {r4, r5, r6, lr} 9558: e5832004 str r2, [r3, #4] 955c: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 9560: ebffffef bl 9524 /* * Validate the parameters */ if ( !size ) 9564: e3540000 cmp r4, #0 9568: 0a00001f beq 95ec return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 956c: e59f30bc ldr r3, [pc, #188] ; 9630 9570: e5933000 ldr r3, [r3] 9574: e3530003 cmp r3, #3 9578: 0a000018 beq 95e0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 957c: e59f30b0 ldr r3, [pc, #176] ; 9634 9580: e3a02000 mov r2, #0 9584: e5930000 ldr r0, [r3] 9588: e1a01004 mov r1, r4 958c: e1a03002 mov r3, r2 9590: eb00034b bl a2c4 <_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 ) { 9594: 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; 9598: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 959c: 0a000015 beq 95f8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 95a0: e59f3090 ldr r3, [pc, #144] ; 9638 95a4: e5933000 ldr r3, [r3] 95a8: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 95ac: 11a01004 movne r1, r4 95b0: 11a00005 movne r0, r5 95b4: 11a0e00f movne lr, pc 95b8: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 95bc: e59f3078 ldr r3, [pc, #120] ; 963c 95c0: e5933000 ldr r3, [r3] 95c4: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 95c8: 11a00005 movne r0, r5 95cc: 11a0e00f movne lr, pc 95d0: 1593f004 ldrne pc, [r3, #4] 95d4: e1a06005 mov r6, r5 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 95d8: e1a00006 mov r0, r6 95dc: 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()) && 95e0: ebffffb8 bl 94c8 95e4: e3500000 cmp r0, #0 95e8: 1affffe3 bne 957c /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 95ec: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 95f0: e1a00006 mov r0, r6 <== NOT EXECUTED 95f4: 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) 95f8: e59f3040 ldr r3, [pc, #64] ; 9640 95fc: e5933000 ldr r3, [r3] 9600: e3530000 cmp r3, #0 9604: 0a000004 beq 961c return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 9608: e1a00004 mov r0, r4 <== NOT EXECUTED 960c: e1a0e00f mov lr, pc <== NOT EXECUTED 9610: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 9614: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9618: 1affffe0 bne 95a0 <== NOT EXECUTED errno = ENOMEM; 961c: eb000b18 bl c284 <__errno> 9620: e3a0300c mov r3, #12 9624: e5803000 str r3, [r0] return (void *) 0; 9628: eaffffea b 95d8 962c: 00019174 .word 0x00019174 9630: 00019470 .word 0x00019470 9634: 00017b5c .word 0x00017b5c 9638: 00018fd0 .word 0x00018fd0 963c: 00018fc8 .word 0x00018fc8 9640: 00018fcc .word 0x00018fcc 00009514 : } void malloc_deferred_free( void *pointer ) { 9514: e1a01000 mov r1, r0 <== NOT EXECUTED 9518: e59f0000 ldr r0, [pc, #0] ; 9520 <== NOT EXECUTED 951c: eaffeee8 b 50c4 <_Chain_Append> <== NOT EXECUTED 9520: 000194c0 .word 0x000194c0 00009524 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 9524: 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) 9528: ea000000 b 9530 free(to_be_freed); 952c: ebfffeaf bl 8ff0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 9530: e59f000c ldr r0, [pc, #12] ; 9544 9534: eb0001b3 bl 9c08 <_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) 9538: e3500000 cmp r0, #0 953c: 1afffffa bne 952c free(to_be_freed); } 9540: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9544: 000194c0 .word 0x000194c0 00010008 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 10008: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( block_table ); 1000c: e2504000 subs r4, r0, #0 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 10010: e1a08001 mov r8, r1 /* * Perform internal consistency checks */ assert( block_table ); 10014: 0a000014 beq 1006c * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 10024: e3a05000 mov r5, #0 10028: e1a06005 mov r6, r5 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; 1002c: e1a0a005 mov sl, r5 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 1003c: ebffff4b bl fd70 b[i] = 0; 10040: 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 10054: 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 ); 10058: e1a00007 mov r0, r7 1005c: ebffff43 bl fd70 *block_table = 0; 10060: e3a03000 mov r3, #0 10064: e5843000 str r3, [r4] } 10068: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Perform internal consistency checks */ assert( block_table ); 1006c: e3a01e1b mov r1, #432 ; 0x1b0 <== NOT EXECUTED 10070: e2811003 add r1, r1, #3 <== NOT EXECUTED 10074: e59f0008 ldr r0, [pc, #8] ; 10084 <== NOT EXECUTED 10078: e59f2008 ldr r2, [pc, #8] ; 10088 <== NOT EXECUTED 1007c: e59f3008 ldr r3, [pc, #8] ; 1008c <== NOT EXECUTED 10080: ebfff849 bl e1ac <__assert_func> <== NOT EXECUTED 10084: 0001ea4c .word 0x0001ea4c 10088: 0001e168 .word 0x0001e168 1008c: 0001eac4 .word 0x0001eac4 00010560 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10560: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10564: 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 ) 10568: e5943054 ldr r3, [r4, #84] ; 0x54 1056c: e1530002 cmp r3, r2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10570: 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 ) 10574: aa000003 bge 10588 return IMFS_memfile_extend( the_jnode, length ); 10578: e1a00004 mov r0, r4 <== NOT EXECUTED 1057c: ebffff96 bl 103dc <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 10580: e28dd008 add sp, sp, #8 10584: 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 ) 10588: 0a000009 beq 105b4 * 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; 1058c: e5841050 str r1, [r4, #80] ; 0x50 10590: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; 10594: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); 10598: e3a01000 mov r1, #0 1059c: e1a0000d mov r0, sp 105a0: ebffc915 bl 29fc 105a4: e59d3000 ldr r3, [sp] 105a8: e3a00000 mov r0, #0 105ac: e5843040 str r3, [r4, #64] ; 0x40 return 0; 105b0: eafffff2 b 10580 * 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 ) 105b4: e5943050 ldr r3, [r4, #80] ; 0x50 105b8: e1530001 cmp r3, r1 105bc: 2afffff2 bcs 1058c 105c0: eaffffec b 10578 <== NOT EXECUTED 000105c4 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 105c4: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 105c8: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { 105cc: e595304c ldr r3, [r5, #76] ; 0x4c 105d0: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 105d4: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 105d8: 0a00000d beq 10614 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 )) 105dc: e1a00005 mov r0, r5 105e0: e284200c add r2, r4, #12 105e4: e8920006 ldm r2, {r1, r2} 105e8: ebffff7b bl 103dc 105ec: e3500000 cmp r0, #0 105f0: 1a00001a bne 10660 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 105f4: e2853050 add r3, r5, #80 ; 0x50 105f8: e893000c ldm r3, {r2, r3} 105fc: e984000c stmib r4, {r2, r3} 10600: e284300c add r3, r4, #12 10604: e893000c ldm r3, {r2, r3} } return iop->offset; } 10608: e1a01003 mov r1, r3 1060c: e1a00002 mov r0, r2 10610: 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) 10614: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 10618: e2853050 add r3, r5, #80 ; 0x50 <== NOT EXECUTED 1061c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED 10620: e1510003 cmp r1, r3 <== NOT EXECUTED 10624: e590000c ldr r0, [r0, #12] <== NOT EXECUTED 10628: ca000007 bgt 1064c <== NOT EXECUTED 1062c: 0a000004 beq 10644 <== NOT EXECUTED 10630: e1a02000 mov r2, r0 <== NOT EXECUTED 10634: e1a03001 mov r3, r1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 10638: e1a01003 mov r1, r3 <== NOT EXECUTED 1063c: e1a00002 mov r0, r2 <== NOT EXECUTED 10640: 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) 10644: e1500002 cmp r0, r2 <== NOT EXECUTED 10648: 9afffff8 bls 10630 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1064c: e584200c str r2, [r4, #12] <== NOT EXECUTED 10650: 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; } 10654: e1a01003 mov r1, r3 <== NOT EXECUTED 10658: e1a00002 mov r0, r2 <== NOT EXECUTED 1065c: 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 ); 10660: eb000484 bl 11878 <__errno> <== NOT EXECUTED 10664: e3a0301c mov r3, #28 <== NOT EXECUTED 10668: e5803000 str r3, [r0] <== NOT EXECUTED 1066c: e3e02000 mvn r2, #0 <== NOT EXECUTED 10670: e3e03000 mvn r3, #0 <== NOT EXECUTED 10674: eaffffe3 b 10608 <== NOT EXECUTED 00010938 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10938: 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)) 1093c: e5903014 ldr r3, [r0, #20] 10940: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10944: e24dd004 sub sp, sp, #4 10948: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1094c: e5905038 ldr r5, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10950: 0a000002 beq 10960 && (the_jnode->type == IMFS_LINEAR_FILE)) { 10954: e595204c ldr r2, [r5, #76] ; 0x4c 10958: e3520006 cmp r2, #6 1095c: 0a00000b beq 10990 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) 10960: e5952050 ldr r2, [r5, #80] ; 0x50 10964: e5951054 ldr r1, [r5, #84] ; 0x54 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 10968: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 1096c: 1584200c strne r2, [r4, #12] 10970: 15841010 strne r1, [r4, #16] 10974: 15951054 ldrne r1, [r5, #84] ; 0x54 10978: 15952050 ldrne r2, [r5, #80] ; 0x50 iop->size = the_jnode->info.file.size; 1097c: e5841008 str r1, [r4, #8] 10980: e5842004 str r2, [r4, #4] 10984: e3a00000 mov r0, #0 return 0; } 10988: e28dd004 add sp, sp, #4 1098c: 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; 10990: 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; 10994: 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; 10998: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 1099c: e3a01000 mov r1, #0 <== NOT EXECUTED 109a0: 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) 109a4: 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; 109a8: 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; 109ac: 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; 109b0: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 109b4: e5851050 str r1, [r5, #80] ; 0x50 <== NOT EXECUTED 109b8: e5852054 str r2, [r5, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 109bc: 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; 109c0: 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) 109c4: 1a000004 bne 109dc <== NOT EXECUTED 109c8: e1a0b001 mov fp, r1 <== NOT EXECUTED 109cc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 109d0: e1a01002 mov r1, r2 <== NOT EXECUTED 109d4: e1a0200b mov r2, fp <== NOT EXECUTED 109d8: eaffffe2 b 10968 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 109dc: e1a00005 mov r0, r5 <== NOT EXECUTED 109e0: e58dc000 str ip, [sp] <== NOT EXECUTED 109e4: ebffff23 bl 10678 <== 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) 109e8: e3700001 cmn r0, #1 <== NOT EXECUTED 109ec: 0affffe5 beq 10988 <== NOT EXECUTED 109f0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 109f4: eaffffd9 b 10960 <== NOT EXECUTED 00001624 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1624: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1628: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 162c: e24dd01c sub sp, sp, #28 1630: e1a05001 mov r5, r1 1634: e1a0c000 mov ip, r0 1638: e1a07002 mov r7, r2 163c: e1a08003 mov r8, r3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1640: 0a000045 beq 175c rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1644: e5d03000 ldrb r3, [r0] 1648: e353002f cmp r3, #47 ; 0x2f 164c: 1353005c cmpne r3, #92 ; 0x5c 1650: 13a06000 movne r6, #0 1654: 03a06001 moveq r6, #1 1658: 1a00002b bne 170c 165c: e59f3128 ldr r3, [pc, #296] ; 178c 1660: e593e000 ldr lr, [r3] 1664: e28ee018 add lr, lr, #24 1668: e8be000f ldm lr!, {r0, r1, r2, r3} 166c: e28d4004 add r4, sp, #4 1670: e1a06004 mov r6, r4 1674: e8a6000f stmia r6!, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 1678: e59d3010 ldr r3, [sp, #16] 167c: e5933004 ldr r3, [r3, #4] int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1680: e59e2000 ldr r2, [lr] if ( !temp_loc.ops->evalformake_h ) { 1684: e3530000 cmp r3, #0 int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1688: e5862000 str r2, [r6] 168c: e3a06001 mov r6, #1 if ( !temp_loc.ops->evalformake_h ) { 1690: 0a00002c beq 1748 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 1694: e08c0006 add r0, ip, r6 1698: e1a01004 mov r1, r4 169c: e28d2018 add r2, sp, #24 16a0: e1a0e00f mov lr, pc 16a4: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 16a8: e3500000 cmp r0, #0 16ac: 1a000028 bne 1754 return -1; if ( !temp_loc.ops->mknod_h ) { 16b0: e59d3010 ldr r3, [sp, #16] 16b4: e593c014 ldr ip, [r3, #20] 16b8: e35c0000 cmp ip, #0 16bc: 0a00002b beq 1770 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 ); 16c0: e1a01005 mov r1, r5 16c4: e1a03008 mov r3, r8 16c8: e58d4000 str r4, [sp] 16cc: e59d0018 ldr r0, [sp, #24] 16d0: e1a02007 mov r2, r7 16d4: e1a0e00f mov lr, pc 16d8: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 16dc: e59d3010 ldr r3, [sp, #16] 16e0: 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 ); 16e4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 16e8: 0a000004 beq 1700 16ec: e593301c ldr r3, [r3, #28] 16f0: e3530000 cmp r3, #0 16f4: 11a00004 movne r0, r4 16f8: 11a0e00f movne lr, pc 16fc: 112fff13 bxne r3 return result; } 1700: e1a00005 mov r0, r5 1704: e28dd01c add sp, sp, #28 1708: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 170c: e3530000 cmp r3, #0 1710: 0affffd1 beq 165c 1714: e59f3070 ldr r3, [pc, #112] ; 178c 1718: e593e000 ldr lr, [r3] 171c: e28ee004 add lr, lr, #4 1720: e8be000f ldm lr!, {r0, r1, r2, r3} 1724: e28d4004 add r4, sp, #4 1728: e1a0a004 mov sl, r4 172c: e8aa000f stmia sl!, {r0, r1, r2, r3} if ( !temp_loc.ops->evalformake_h ) { 1730: e59d3010 ldr r3, [sp, #16] 1734: e5933004 ldr r3, [r3, #4] int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1738: e59e2000 ldr r2, [lr] if ( !temp_loc.ops->evalformake_h ) { 173c: e3530000 cmp r3, #0 int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1740: e58a2000 str r2, [sl] if ( !temp_loc.ops->evalformake_h ) { 1744: 1affffd2 bne 1694 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 1748: eb002acd bl c284 <__errno> <== NOT EXECUTED 174c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1750: e5803000 str r3, [r0] <== NOT EXECUTED 1754: e3e05000 mvn r5, #0 1758: eaffffe8 b 1700 int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 175c: eb002ac8 bl c284 <__errno> <== NOT EXECUTED 1760: e3a03016 mov r3, #22 <== NOT EXECUTED 1764: e5803000 str r3, [r0] <== NOT EXECUTED 1768: e3e05000 mvn r5, #0 <== NOT EXECUTED 176c: eaffffe3 b 1700 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 1770: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1774: e3530000 cmp r3, #0 <== NOT EXECUTED 1778: 0afffff2 beq 1748 <== NOT EXECUTED 177c: e1a00004 mov r0, r4 <== NOT EXECUTED 1780: e1a0e00f mov lr, pc <== NOT EXECUTED 1784: e12fff13 bx r3 <== NOT EXECUTED 1788: eaffffee b 1748 <== NOT EXECUTED 178c: 00017ce8 .word 0x00017ce8 000017ac : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 17ac: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 17b0: e2516000 subs r6, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 17b4: e24dd018 sub sp, sp, #24 17b8: e1a07000 mov r7, r0 17bc: e1a05002 mov r5, r2 17c0: e1a09003 mov r9, r3 17c4: e59da038 ldr sl, [sp, #56] ; 0x38 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 17c8: 0a000083 beq 19dc /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 17cc: e3520001 cmp r2, #1 17d0: 8a000081 bhi 19dc errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 17d4: e5968024 ldr r8, [r6, #36] ; 0x24 17d8: e3580000 cmp r8, #0 17dc: 0a000089 beq 1a08 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 17e0: e3530000 cmp r3, #0 17e4: 03a0006c moveq r0, #108 ; 0x6c 17e8: 0a000002 beq 17f8 size += strlen( device ) + 1; 17ec: e1a00003 mov r0, r3 <== NOT EXECUTED 17f0: eb002e94 bl d248 <== NOT EXECUTED 17f4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 17f8: eb001f52 bl 9548 if ( !temp_mt_entry ) { 17fc: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 1800: e1a04000 mov r4, r0 1804: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 1808: 0a000089 beq 1a34 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 180c: e3590000 cmp r9, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 1810: e5805030 str r5, [r0, #48] ; 0x30 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 1814: e584002c str r0, [r4, #44] ; 0x2c if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 1818: 05809068 streq r9, [r0, #104] ; 0x68 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 181c: 0a000004 beq 1834 temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 1820: e280306c add r3, r0, #108 ; 0x6c <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 1824: e1a00003 mov r0, r3 <== NOT EXECUTED 1828: e1a01009 mov r1, r9 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 182c: e5843068 str r3, [r4, #104] ; 0x68 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 1830: eb002e48 bl d158 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1834: e35a0000 cmp sl, #0 1838: 0a00004a beq 1968 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 183c: e1a0000a mov r0, sl 1840: eb002e80 bl d248 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1844: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1848: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 184c: e3a0c001 mov ip, #1 1850: e1a0000a mov r0, sl 1854: e3a02007 mov r2, #7 1858: e1a03005 mov r3, r5 185c: e58dc000 str ip, [sp] 1860: ebfffec3 bl 1374 1864: e3700001 cmn r0, #1 1868: 0a000069 beq 1a14 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 186c: e59d3010 ldr r3, [sp, #16] 1870: e5933010 ldr r3, [r3, #16] 1874: e3530000 cmp r3, #0 1878: 0a000069 beq 1a24 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 187c: e1a00005 mov r0, r5 1880: e1a0e00f mov lr, pc 1884: e12fff13 bx r3 1888: e3500001 cmp r0, #1 188c: 1a000059 bne 19f8 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 1890: e59f11b0 ldr r1, [pc, #432] ; 1a48 1894: e4913004 ldr r3, [r1], #4 1898: e1530001 cmp r3, r1 189c: 0a000053 beq 19f0 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 18a0: e59d0004 ldr r0, [sp, #4] 18a4: e593201c ldr r2, [r3, #28] 18a8: e1520000 cmp r2, r0 18ac: 1a000003 bne 18c0 18b0: ea000022 b 1940 <== NOT EXECUTED 18b4: e593201c ldr r2, [r3, #28] 18b8: e1520000 cmp r2, r0 18bc: 0a00001f beq 1940 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 18c0: e5933000 ldr r3, [r3] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 18c4: e1530001 cmp r3, r1 18c8: 1afffff9 bne 18b4 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 18cc: e28d100c add r1, sp, #12 18d0: e8910006 ldm r1, {r1, r2} /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 18d4: e5923020 ldr r3, [r2, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 18d8: e5841010 str r1, [r4, #16] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 18dc: e59d1014 ldr r1, [sp, #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 ){ 18e0: e3530000 cmp r3, #0 * 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 18e4: e5840008 str r0, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 18e8: e5841018 str r1, [r4, #24] * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 18ec: 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 ){ 18f0: 0a00004b beq 1a24 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 18f4: e1a00004 mov r0, r4 18f8: e1a0e00f mov lr, pc 18fc: e12fff13 bx r3 1900: e3500000 cmp r0, #0 1904: 1a000010 bne 194c temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 1908: e1a00004 mov r0, r4 190c: e1a0e00f mov lr, pc 1910: e596f024 ldr pc, [r6, #36] ; 0x24 1914: e2506000 subs r6, r0, #0 1918: 1a00001b bne 198c RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 191c: e59f0124 ldr r0, [pc, #292] ; 1a48 1920: e1a01004 mov r1, r4 1924: eb000de6 bl 50c4 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1928: e3570000 cmp r7, #0 *mt_entry = temp_mt_entry; 192c: 15874000 strne r4, [r7] */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1930: 01a00007 moveq r0, r7 *mt_entry = temp_mt_entry; 1934: 11a00006 movne r0, r6 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1938: e28dd018 add sp, sp, #24 193c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 1940: eb002a4f bl c284 <__errno> 1944: e3a03010 mov r3, #16 1948: e5803000 str r3, [r0] return 0; cleanup_and_bail: free( temp_mt_entry ); 194c: e1a00004 mov r0, r4 1950: eb001da6 bl 8ff0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 1954: e595300c ldr r3, [r5, #12] 1958: e3530000 cmp r3, #0 195c: 1a000016 bne 19bc 1960: e3e00000 mvn r0, #0 <== NOT EXECUTED 1964: eafffff3 b 1938 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 1968: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 196c: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 1970: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 1974: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 1978: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 197c: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 1980: e584a018 str sl, [r4, #24] 1984: e1a0500a mov r5, sl 1988: eaffffde b 1908 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 198c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1990: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 1994: e3530000 cmp r3, #0 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1998: 11a00004 movne r0, r4 <== NOT EXECUTED 199c: 11a0e00f movne lr, pc <== NOT EXECUTED 19a0: 112fff13 bxne r3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 19a4: e1a00004 mov r0, r4 <== NOT EXECUTED 19a8: eb001d90 bl 8ff0 <== NOT EXECUTED if ( loc_to_free ) 19ac: e3550000 cmp r5, #0 <== NOT EXECUTED 19b0: 1affffe7 bne 1954 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 19b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 19b8: eaffffde b 1938 <== NOT EXECUTED 19bc: e593301c ldr r3, [r3, #28] 19c0: e3530000 cmp r3, #0 19c4: 0affffe5 beq 1960 19c8: e1a00005 mov r0, r5 19cc: e1a0e00f mov lr, pc 19d0: e12fff13 bx r3 19d4: e3e00000 mvn r0, #0 19d8: eaffffd6 b 1938 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 19dc: eb002a28 bl c284 <__errno> 19e0: e3a03016 mov r3, #22 19e4: e5803000 str r3, [r0] 19e8: e3e00000 mvn r0, #0 return -1; 19ec: eaffffd1 b 1938 cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 19f0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 19f4: eaffffb4 b 18cc <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 19f8: eb002a21 bl c284 <__errno> 19fc: e3a03014 mov r3, #20 1a00: e5803000 str r3, [r0] goto cleanup_and_bail; 1a04: eaffffd0 b 194c return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 1a08: eb002a1d bl c284 <__errno> <== NOT EXECUTED 1a0c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1a10: e5803000 str r3, [r0] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1a14: e1a00008 mov r0, r8 <== NOT EXECUTED 1a18: eb001d74 bl 8ff0 <== NOT EXECUTED 1a1c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a20: eaffffc4 b 1938 <== NOT EXECUTED * 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; 1a24: eb002a16 bl c284 <__errno> <== NOT EXECUTED 1a28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1a2c: e5803000 str r3, [r0] <== NOT EXECUTED goto cleanup_and_bail; 1a30: eaffffc5 b 194c <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 1a34: eb002a12 bl c284 <__errno> <== NOT EXECUTED 1a38: e3a0300c mov r3, #12 <== NOT EXECUTED 1a3c: e5803000 str r3, [r0] <== NOT EXECUTED 1a40: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 1a44: eaffffbb b 1938 <== NOT EXECUTED 1a48: 000191a0 .word 0x000191a0 00001abc : */ int newlib_free_buffers( FILE *fp ) { 1abc: e92d4010 push {r4, lr} 1ac0: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1ac4: eb002aed bl c680 1ac8: e3500002 cmp r0, #2 1acc: 9a000003 bls 1ae0 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 1ad0: e1a00004 mov r0, r4 <== NOT EXECUTED 1ad4: eb002a37 bl c3b8 <== NOT EXECUTED } return 0; } 1ad8: e3a00000 mov r0, #0 1adc: e8bd8010 pop {r4, pc} { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1ae0: e1d430bc ldrh r3, [r4, #12] 1ae4: e3130080 tst r3, #128 ; 0x80 1ae8: 0afffffa beq 1ad8 free( fp->_bf._base ); 1aec: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 1af0: eb001d3e bl 8ff0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 1af4: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1af8: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1afc: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1b00: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1b04: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1b08: e5843000 str r3, [r4] <== NOT EXECUTED break; default: fclose(fp); } return 0; } 1b0c: e3a00000 mov r0, #0 <== NOT EXECUTED 1b10: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001df0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1df0: e92d4010 push {r4, lr} rtems_device_driver status; if ( !initialized ) { 1df4: e59f3044 ldr r3, [pc, #68] ; 1e40 1df8: e5d32000 ldrb r2, [r3] 1dfc: e3520000 cmp r2, #0 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1e00: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { 1e04: 0a000001 beq 1e10 NULL_major = major; } return RTEMS_SUCCESSFUL; } 1e08: e3a00000 mov r0, #0 1e0c: e8bd8010 pop {r4, pc} ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 1e10: e3a0c001 mov ip, #1 status = rtems_io_register_name( 1e14: e59f0028 ldr r0, [pc, #40] ; 1e44 1e18: e1a01004 mov r1, r4 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 1e1c: e5c3c000 strb ip, [r3] status = rtems_io_register_name( 1e20: eb000051 bl 1f6c "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1e24: e3500000 cmp r0, #0 1e28: 1a000003 bne 1e3c rtems_fatal_error_occurred(status); NULL_major = major; 1e2c: e59f3014 ldr r3, [pc, #20] ; 1e48 } return RTEMS_SUCCESSFUL; } 1e30: e3a00000 mov r0, #0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; 1e34: e5834000 str r4, [r3] } return RTEMS_SUCCESSFUL; } 1e38: e8bd8010 pop {r4, pc} major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1e3c: eb001049 bl 5f68 <== NOT EXECUTED 1e40: 0001e0f0 .word 0x0001e0f0 1e44: 0001d228 .word 0x0001d228 1e48: 0001e2a4 .word 0x0001e2a4 00001d54 : int open( const char *pathname, int flags, ... ) { 1d54: e92d000e push {r1, r2, r3} 1d58: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1d5c: e24dd01c sub sp, sp, #28 1d60: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1d64: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 1d68: e2138001 ands r8, r3, #1 1d6c: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1d70: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1d74: e28d3044 add r3, sp, #68 ; 0x44 int open( const char *pathname, int flags, ... ) { 1d78: e1a06000 mov r6, r0 eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 1d7c: 13888002 orrne r8, r8, #2 va_start(ap, flags); mode = va_arg( ap, int ); 1d80: e58d3018 str r3, [sp, #24] 1d84: e59da040 ldr sl, [sp, #64] ; 0x40 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 1d88: eb001d93 bl 93dc if ( iop == 0 ) { 1d8c: e2504000 subs r4, r0, #0 1d90: 03a06017 moveq r6, #23 1d94: 0a00005d beq 1f10 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 1d98: e1a00006 mov r0, r6 1d9c: eb002d29 bl d248 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1da0: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 1da4: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1da8: e1a02008 mov r2, r8 1dac: e1a00006 mov r0, r6 1db0: e3a08001 mov r8, #1 1db4: e1a03007 mov r3, r7 1db8: e58d8000 str r8, [sp] 1dbc: ebfffd6c bl 1374 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1dc0: e3700001 cmn r0, #1 1dc4: 0a000055 beq 1f20 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1dc8: e2053c0a and r3, r5, #2560 ; 0xa00 1dcc: e3530c0a cmp r3, #2560 ; 0xa00 1dd0: 03a06011 moveq r6, #17 1dd4: 0a000040 beq 1edc /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1dd8: e59d300c ldr r3, [sp, #12] 1ddc: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; 1de0: e59d3004 ldr r3, [sp, #4] iop->flags |= rtems_libio_fcntl_flags( flags ); 1de4: e1a00005 mov r0, r5 * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; 1de8: e5843038 str r3, [r4, #56] ; 0x38 iop->flags |= rtems_libio_fcntl_flags( flags ); 1dec: e5948014 ldr r8, [r4, #20] 1df0: eb001da7 bl 9494 iop->pathinfo = loc; 1df4: e1a0e007 mov lr, r7 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1df8: e1808008 orr r8, r0, r8 iop->pathinfo = loc; 1dfc: e8be000f ldm lr!, {r0, r1, r2, r3} 1e00: e284c018 add ip, r4, #24 1e04: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 1e08: e594303c ldr r3, [r4, #60] ; 0x3c */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1e0c: e59e2000 ldr r2, [lr] if ( !iop->handlers || !iop->handlers->open_h ) { 1e10: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1e14: e58c2000 str r2, [ip] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1e18: e5848014 str r8, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 1e1c: 0a00002d beq 1ed8 1e20: e593c000 ldr ip, [r3] 1e24: e35c0000 cmp ip, #0 1e28: 0a00002a beq 1ed8 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1e2c: e1a01006 mov r1, r6 1e30: e1a0300a mov r3, sl 1e34: e1a00004 mov r0, r4 1e38: e1a02005 mov r2, r5 1e3c: e1a0e00f mov lr, pc 1e40: e12fff1c bx ip if ( rc ) { 1e44: e3500000 cmp r0, #0 1e48: 1a000009 bne 1e74 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1e4c: e3150b01 tst r5, #1024 ; 0x400 1e50: 1a00000c bne 1e88 1e54: e59f5150 ldr r5, [pc, #336] ; 1fac if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1e58: e5950000 ldr r0, [r5] 1e5c: e0604004 rsb r4, r0, r4 1e60: e1a00344 asr r0, r4, #6 } 1e64: e28dd01c add sp, sp, #28 1e68: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1e6c: e28dd00c add sp, sp, #12 1e70: e12fff1e bx lr goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 1e74: eb002902 bl c284 <__errno> 1e78: e5906000 ldr r6, [r0] */ done: va_end(ap); if ( rc ) { 1e7c: e3560000 cmp r6, #0 1e80: 0afffff3 beq 1e54 1e84: ea000014 b 1edc /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 1e88: e59f511c ldr r5, [pc, #284] ; 1fac 1e8c: e5950000 ldr r0, [r5] 1e90: e0600004 rsb r0, r0, r4 1e94: e1a00340 asr r0, r0, #6 1e98: e3a01000 mov r1, #0 1e9c: e3a02000 mov r2, #0 1ea0: eb001c7b bl 9094 if ( rc ) { 1ea4: e2506000 subs r6, r0, #0 1ea8: 0affffea beq 1e58 if(errno) rc = errno; 1eac: eb0028f4 bl c284 <__errno> <== NOT EXECUTED 1eb0: e5903000 ldr r3, [r0] <== NOT EXECUTED 1eb4: e3530000 cmp r3, #0 <== NOT EXECUTED 1eb8: 1a000038 bne 1fa0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 1ebc: e5950000 ldr r0, [r5] <== NOT EXECUTED 1ec0: e0600004 rsb r0, r0, r4 <== NOT EXECUTED 1ec4: e1a00340 asr r0, r0, #6 <== NOT EXECUTED 1ec8: e3a04000 mov r4, #0 <== NOT EXECUTED 1ecc: eb001c1e bl 8f4c <== NOT EXECUTED 1ed0: e1a07004 mov r7, r4 <== NOT EXECUTED 1ed4: eaffffe8 b 1e7c <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1ed8: e3a06086 mov r6, #134 ; 0x86 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 1edc: e3540000 cmp r4, #0 rtems_libio_free( iop ); 1ee0: 11a00004 movne r0, r4 1ee4: 1b001d26 blne 9384 if ( loc_to_free ) 1ee8: e3570000 cmp r7, #0 1eec: 0a000007 beq 1f10 rtems_filesystem_freenode( loc_to_free ); 1ef0: e597300c ldr r3, [r7, #12] 1ef4: e3530000 cmp r3, #0 1ef8: 0a000004 beq 1f10 1efc: e593301c ldr r3, [r3, #28] 1f00: e3530000 cmp r3, #0 1f04: 11a00007 movne r0, r7 1f08: 11a0e00f movne lr, pc 1f0c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1f10: eb0028db bl c284 <__errno> 1f14: e5806000 str r6, [r0] 1f18: e3e00000 mvn r0, #0 1f1c: eaffffd0 b 1e64 status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1f20: eb0028d7 bl c284 <__errno> 1f24: e5903000 ldr r3, [r0] 1f28: e3530002 cmp r3, #2 1f2c: 0a000003 beq 1f40 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 1f30: eb0028d3 bl c284 <__errno> 1f34: e3a07000 mov r7, #0 1f38: e5906000 ldr r6, [r0] goto done; 1f3c: eaffffce b 1e7c rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1f40: e2159c02 ands r9, r5, #512 ; 0x200 1f44: 01a07009 moveq r7, r9 1f48: 01a06003 moveq r6, r3 1f4c: 0affffe2 beq 1edc rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1f50: e1a00006 mov r0, r6 1f54: e38a1902 orr r1, sl, #32768 ; 0x8000 1f58: e3a02000 mov r2, #0 1f5c: e3a03000 mov r3, #0 1f60: ebfffdaf bl 1624 if ( rc ) { 1f64: e2509000 subs r9, r0, #0 1f68: 1afffff0 bne 1f30 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1f6c: e1a00006 mov r0, r6 1f70: eb002cb4 bl d248 1f74: e1a03007 mov r3, r7 1f78: e1a01000 mov r1, r0 1f7c: e1a02009 mov r2, r9 1f80: e1a00006 mov r0, r6 1f84: e58d8000 str r8, [sp] 1f88: ebfffcf9 bl 1374 if ( status != 0 ) { /* The file did not exist */ 1f8c: e3500000 cmp r0, #0 1f90: 11a07009 movne r7, r9 1f94: 13a0600d movne r6, #13 1f98: 1affffcf bne 1edc 1f9c: eaffff8d b 1dd8 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 1fa0: eb0028b7 bl c284 <__errno> <== NOT EXECUTED 1fa4: e5906000 ldr r6, [r0] <== NOT EXECUTED 1fa8: eaffffc3 b 1ebc <== NOT EXECUTED 1fac: 00019168 .word 0x00019168 00001cec : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1cec: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1cf0: e52de004 push {lr} ; (str lr, [sp, #-4]!) int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1cf4: e59f004c ldr r0, [pc, #76] ; 1d48 1cf8: e1a02001 mov r2, r1 1cfc: eb000014 bl 1d54 1d00: e3700001 cmn r0, #1 1d04: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1d08: e59f0038 ldr r0, [pc, #56] ; 1d48 1d0c: e3a01001 mov r1, #1 1d10: e3a02000 mov r2, #0 1d14: eb00000e bl 1d54 1d18: e3700001 cmn r0, #1 1d1c: 0a000007 beq 1d40 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1d20: e59f0020 ldr r0, [pc, #32] ; 1d48 1d24: e3a01001 mov r1, #1 1d28: e3a02000 mov r2, #0 1d2c: eb000008 bl 1d54 1d30: e3700001 cmn r0, #1 1d34: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 1d38: e59f000c ldr r0, [pc, #12] ; 1d4c <== NOT EXECUTED 1d3c: eb000c29 bl 4de8 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 1d40: e59f0008 ldr r0, [pc, #8] ; 1d50 <== NOT EXECUTED 1d44: eb000c27 bl 4de8 <== NOT EXECUTED 1d48: 00018a54 .word 0x00018a54 1d4c: 55544432 .word 0x55544432 1d50: 55544431 .word 0x55544431 000026f4 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 26f4: e92d4010 push {r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 26f8: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 26fc: e24dd004 sub sp, sp, #4 int i; if (tty->termios.c_oflag & OPOST) { 2700: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2704: e1a04001 mov r4, r1 2708: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 270c: 0a000014 beq 2764 switch (c) { 2710: e5dd1000 ldrb r1, [sp] 2714: e2412008 sub r2, r1, #8 2718: e3520005 cmp r2, #5 271c: 979ff102 ldrls pc, [pc, r2, lsl #2] 2720: ea000005 b 273c 2724: 000027d4 .word 0x000027d4 <== NOT EXECUTED 2728: 000027b0 .word 0x000027b0 <== NOT EXECUTED 272c: 000027e8 .word 0x000027e8 <== NOT EXECUTED 2730: 0000273c .word 0x0000273c <== NOT EXECUTED 2734: 0000273c .word 0x0000273c <== NOT EXECUTED 2738: 0000277c .word 0x0000277c <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 273c: e3130002 tst r3, #2 2740: 1a000034 bne 2818 2744: e59f310c ldr r3, [pc, #268] ; 2858 2748: e5933000 ldr r3, [r3] c = toupper(c); if (!iscntrl(c)) 274c: e0831001 add r1, r3, r1 2750: e5d13001 ldrb r3, [r1, #1] 2754: e3130020 tst r3, #32 tty->column++; 2758: 05943028 ldreq r3, [r4, #40] ; 0x28 275c: 02833001 addeq r3, r3, #1 2760: 05843028 streq r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2764: e1a02004 mov r2, r4 2768: e1a0000d mov r0, sp 276c: e3a01001 mov r1, #1 2770: ebffff97 bl 25d4 } 2774: e28dd004 add sp, sp, #4 2778: e8bd8010 pop {r4, pc} tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 277c: e3130010 tst r3, #16 <== NOT EXECUTED 2780: 0a000002 beq 2790 <== NOT EXECUTED 2784: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2788: e3520000 cmp r2, #0 <== NOT EXECUTED 278c: 0afffff8 beq 2774 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2790: e2132008 ands r2, r3, #8 <== NOT EXECUTED 2794: 0a00000c beq 27cc <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 2798: e3130020 tst r3, #32 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; 279c: e3a0300a mov r3, #10 <== NOT EXECUTED 27a0: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) tty->column = 0; 27a4: 13a03000 movne r3, #0 <== NOT EXECUTED 27a8: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27ac: eaffffec b 2764 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 27b0: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 27b4: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 27b8: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 27bc: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 27c0: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 27c4: 10812002 addne r2, r1, r2 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 27c8: 0a00001c beq 2840 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 27cc: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED break; 27d0: eaffffe3 b 2764 <== NOT EXECUTED case '\b': if (tty->column > 0) 27d4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27d8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 27dc: c2433001 subgt r3, r3, #1 <== NOT EXECUTED 27e0: c5843028 strgt r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27e4: eaffffde b 2764 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 27e8: e3130020 tst r3, #32 tty->column = 0; 27ec: 13a02000 movne r2, #0 27f0: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 27f4: e3130004 tst r3, #4 27f8: 0affffd9 beq 2764 rtems_termios_puts ("\r", 1, tty); 27fc: e59f0058 ldr r0, [pc, #88] ; 285c 2800: e3a01001 mov r1, #1 2804: e1a02004 mov r2, r4 2808: ebffff71 bl 25d4 tty->column = 0; 280c: e3a03000 mov r3, #0 2810: e5843028 str r3, [r4, #40] ; 0x28 2814: eaffffd2 b 2764 tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 2818: e59f3038 ldr r3, [pc, #56] ; 2858 <== NOT EXECUTED 281c: e5933000 ldr r3, [r3] <== NOT EXECUTED 2820: e0832001 add r2, r3, r1 <== NOT EXECUTED 2824: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 2828: e2022003 and r2, r2, #3 <== NOT EXECUTED 282c: e3520002 cmp r2, #2 <== NOT EXECUTED 2830: 02411020 subeq r1, r1, #32 <== NOT EXECUTED 2834: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED 2838: e5cd1000 strb r1, [sp] <== NOT EXECUTED 283c: eaffffc2 b 274c <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 2840: e0812002 add r2, r1, r2 2844: e5842028 str r2, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 2848: e59f0010 ldr r0, [pc, #16] ; 2860 284c: e1a02004 mov r2, r4 2850: ebffff5f bl 25d4 return; 2854: eaffffc6 b 2774 2858: 00017d4c .word 0x00017d4c 285c: 00018b74 .word 0x00018b74 2860: 00018aa4 .word 0x00018aa4 0000bd58 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bd58: e92d4070 push {r4, r5, r6, lr} bd5c: e24dd028 sub sp, sp, #40 ; 0x28 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) bd60: e28d4004 add r4, sp, #4 bd64: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bd68: e1a05000 mov r5, r0 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) bd6c: e3a01003 mov r1, #3 bd70: e59f0154 ldr r0, [pc, #340] ; becc bd74: e3a02007 mov r2, #7 bd78: e1a03004 mov r3, r4 bd7c: e58dc000 str ip, [sp] bd80: ebffd57b bl 1374 bd84: e3500000 cmp r0, #0 bd88: 1a00003a bne be78 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); bd8c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED bd90: e3530000 cmp r3, #0 <== NOT EXECUTED bd94: 0a000004 beq bdac <== NOT EXECUTED bd98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED bd9c: e3530000 cmp r3, #0 <== NOT EXECUTED bda0: 11a00004 movne r0, r4 <== NOT EXECUTED bda4: 11a0e00f movne lr, pc <== NOT EXECUTED bda8: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); bdac: e59f311c ldr r3, [pc, #284] ; bed0 bdb0: e28d4018 add r4, sp, #24 bdb4: e8930007 ldm r3, {r0, r1, r2} bdb8: e1a0c004 mov ip, r4 bdbc: e8ac0003 stmia ip!, {r0, r1} sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); bdc0: e59f310c ldr r3, [pc, #268] ; bed4 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); bdc4: e1a0100c mov r1, ip sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); bdc8: e1d3c0b0 ldrh ip, [r3] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); bdcc: e1c120b0 strh r2, [r1] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); bdd0: e1a0200c mov r2, ip bdd4: e28cc001 add ip, ip, #1 bdd8: e59f10f8 ldr r1, [pc, #248] ; bed8 bddc: e1c3c0b0 strh ip, [r3] bde0: e284000a add r0, r4, #10 bde4: eb0003da bl cd54 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { bde8: e1a00004 mov r0, r4 bdec: e3a01d06 mov r1, #384 ; 0x180 bdf0: eb00004b bl bf24 bdf4: e2506000 subs r6, r0, #0 bdf8: 1a00001c bne be70 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); bdfc: e1a00004 mov r0, r4 be00: e3a01901 mov r1, #16384 ; 0x4000 be04: ebffd7d2 bl 1d54 if (filsdes[0] < 0) { be08: e3500000 cmp r0, #0 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); be0c: e5850000 str r0, [r5] if (filsdes[0] < 0) { be10: ba000023 blt bea4 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); be14: e59f30c0 ldr r3, [pc, #192] ; bedc <== NOT EXECUTED be18: e5933000 ldr r3, [r3] <== NOT EXECUTED be1c: e1500003 cmp r0, r3 <== NOT EXECUTED be20: 359f30b8 ldrcc r3, [pc, #184] ; bee0 <== NOT EXECUTED be24: 35936000 ldrcc r6, [r3] <== NOT EXECUTED be28: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; be2c: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED be30: e3c33001 bic r3, r3, #1 <== NOT EXECUTED be34: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); be38: e1a00004 mov r0, r4 <== NOT EXECUTED be3c: e3a01001 mov r1, #1 <== NOT EXECUTED be40: ebffd7c3 bl 1d54 <== NOT EXECUTED if (filsdes[1] < 0) { be44: e3500000 cmp r0, #0 <== NOT EXECUTED else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); be48: e5850004 str r0, [r5, #4] <== NOT EXECUTED if (filsdes[1] < 0) { be4c: a3a06000 movge r6, #0 <== NOT EXECUTED be50: ba000018 blt beb8 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); be54: e1a00004 mov r0, r4 <== NOT EXECUTED be58: eb000035 bl bf34 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); be5c: eb000108 bl c284 <__errno> be60: e5806000 str r6, [r0] } be64: e3e00000 mvn r0, #0 be68: e28dd028 add sp, sp, #40 ; 0x28 be6c: e8bd8070 pop {r4, r5, r6, pc} memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ be70: eb000103 bl c284 <__errno> <== NOT EXECUTED be74: eafffffa b be64 <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) be78: eb000101 bl c284 <__errno> be7c: e5903000 ldr r3, [r0] be80: e3530002 cmp r3, #2 be84: 1afffff6 bne be64 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) be88: e3a01fff mov r1, #1020 ; 0x3fc be8c: e2811003 add r1, r1, #3 be90: e59f0034 ldr r0, [pc, #52] ; becc be94: ebffd5de bl 1614 be98: e3500000 cmp r0, #0 be9c: 0affffc2 beq bdac bea0: eaffffef b be64 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; bea4: eb0000f6 bl c284 <__errno> bea8: e5906000 ldr r6, [r0] /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); beac: e1a00004 mov r0, r4 beb0: eb00001f bl bf34 beb4: eaffffe8 b be5c iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; beb8: eb0000f1 bl c284 <__errno> <== NOT EXECUTED bebc: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); bec0: e5950000 ldr r0, [r5] <== NOT EXECUTED bec4: ebfff420 bl 8f4c <== NOT EXECUTED bec8: eaffffe1 b be54 <== NOT EXECUTED becc: 00018d50 .word 0x00018d50 bed0: 00018d58 .word 0x00018d58 bed4: 000190ea .word 0x000190ea bed8: 00018d64 .word 0x00018d64 bedc: 00017b50 .word 0x00017b50 bee0: 00019168 .word 0x00019168 0000a9cc : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a9cc: e3a03a46 mov r3, #286720 ; 0x46000 <== NOT EXECUTED a9d0: e2833e67 add r3, r3, #1648 ; 0x670 <== NOT EXECUTED a9d4: e283313d add r3, r3, #1073741839 ; 0x4000000f <== NOT EXECUTED a9d8: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a9dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a9e0: e1a05000 mov r5, r0 <== NOT EXECUTED a9e4: e1a04002 mov r4, r2 <== NOT EXECUTED if (cmd == FIONREAD) { a9e8: 13e00015 mvnne r0, #21 <== NOT EXECUTED a9ec: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) a9f0: e3520000 cmp r2, #0 <== NOT EXECUTED a9f4: 03e0000d mvneq r0, #13 <== NOT EXECUTED a9f8: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) a9fc: e3a01000 mov r1, #0 <== NOT EXECUTED aa00: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED aa04: e1a02001 mov r2, r1 <== NOT EXECUTED aa08: ebffe757 bl 476c <== NOT EXECUTED aa0c: e2506000 subs r6, r0, #0 <== NOT EXECUTED aa10: 13e00003 mvnne r0, #3 <== NOT EXECUTED aa14: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; aa18: e595300c ldr r3, [r5, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); aa1c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; aa20: e5843000 str r3, [r4] <== NOT EXECUTED PIPE_UNLOCK(pipe); aa24: ebffe798 bl 488c <== NOT EXECUTED aa28: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } aa2c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000a954 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } a954: e3e0001c mvn r0, #28 <== NOT EXECUTED a958: e12fff1e bx lr <== NOT EXECUTED 0000ac30 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ac30: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED ac34: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ac38: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ac3c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED ac40: e1a04000 mov r4, r0 <== NOT EXECUTED ac44: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ac48: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED ac4c: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ac50: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ac54: ebffe6c4 bl 476c <== NOT EXECUTED ac58: e250a000 subs sl, r0, #0 <== NOT EXECUTED ac5c: 13e07003 mvnne r7, #3 <== NOT EXECUTED ac60: 1a000027 bne ad04 <== NOT EXECUTED return -EINTR; while (read < count) { ac64: e3550000 cmp r5, #0 <== NOT EXECUTED ac68: 01a07005 moveq r7, r5 <== NOT EXECUTED ac6c: 01a06007 moveq r6, r7 <== NOT EXECUTED ac70: 0a00001f beq acf4 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ac74: e1a0700a mov r7, sl <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ac78: e28db004 add fp, sp, #4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ac7c: e594200c ldr r2, [r4, #12] <== NOT EXECUTED ac80: e3520000 cmp r2, #0 <== NOT EXECUTED ac84: 1a000021 bne ad10 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) ac88: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED ac8c: e3530000 cmp r3, #0 <== NOT EXECUTED ac90: 0a00003d beq ad8c <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ac94: e5986014 ldr r6, [r8, #20] <== NOT EXECUTED ac98: e2166001 ands r6, r6, #1 <== NOT EXECUTED ac9c: 1a00003c bne ad94 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; aca0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED aca4: e2833001 add r3, r3, #1 <== NOT EXECUTED aca8: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); acac: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED acb0: ebffe6f5 bl 488c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) acb4: e1a01006 mov r1, r6 <== NOT EXECUTED acb8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED acbc: eb0002ba bl b7ac <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { acc0: e1a01006 mov r1, r6 <== NOT EXECUTED acc4: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) acc8: e2506000 subs r6, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { accc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) acd0: 13e06003 mvnne r6, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { acd4: ebffe6a4 bl 476c <== NOT EXECUTED acd8: e3500000 cmp r0, #0 <== NOT EXECUTED acdc: 1a00002e bne ad9c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ace0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) ace4: e3560000 cmp r6, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ace8: e2433001 sub r3, r3, #1 <== NOT EXECUTED acec: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) acf0: 0affffe1 beq ac7c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); acf4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED acf8: ebffe6e3 bl 488c <== NOT EXECUTED out_nolock: if (read > 0) acfc: e3570000 cmp r7, #0 <== NOT EXECUTED ad00: d1a07006 movle r7, r6 <== NOT EXECUTED return read; return ret; } ad04: e1a00007 mov r0, r7 <== NOT EXECUTED ad08: e28dd008 add sp, sp, #8 <== NOT EXECUTED ad0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; ad10: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED ad14: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ad18: e06a6005 rsb r6, sl, r5 <== NOT EXECUTED ad1c: e1520006 cmp r2, r6 <== NOT EXECUTED ad20: 31a06002 movcc r6, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; ad24: e0613003 rsb r3, r1, r3 <== NOT EXECUTED if (chunk > chunk1) { ad28: e1560003 cmp r6, r3 <== NOT EXECUTED ad2c: ca00001c bgt ada4 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); ad30: e5943000 ldr r3, [r4] <== NOT EXECUTED ad34: e089000a add r0, r9, sl <== NOT EXECUTED ad38: e0831001 add r1, r3, r1 <== NOT EXECUTED ad3c: e1a02006 mov r2, r6 <== NOT EXECUTED ad40: eb00075d bl cabc <== NOT EXECUTED pipe->Start += chunk; ad44: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED ad48: e0860000 add r0, r6, r0 <== NOT EXECUTED ad4c: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; ad50: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED ad54: eb002b01 bl 15960 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; ad58: e594300c ldr r3, [r4, #12] <== NOT EXECUTED ad5c: e0663003 rsb r3, r6, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ad60: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ad64: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; ad68: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; ad6c: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) ad70: e594301c ldr r3, [r4, #28] <== NOT EXECUTED ad74: e3530000 cmp r3, #0 <== NOT EXECUTED ad78: 1a000016 bne add8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; ad7c: e0877006 add r7, r7, r6 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ad80: e1570005 cmp r7, r5 <== NOT EXECUTED ad84: e1a0a007 mov sl, r7 <== NOT EXECUTED ad88: 3affffbb bcc ac7c <== NOT EXECUTED ad8c: e3a06000 mov r6, #0 <== NOT EXECUTED ad90: eaffffd7 b acf4 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ad94: e3e0600a mvn r6, #10 <== NOT EXECUTED ad98: eaffffd5 b acf4 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { ad9c: e3e06003 mvn r6, #3 <== NOT EXECUTED ada0: eaffffd5 b acfc <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ada4: e5942000 ldr r2, [r4] <== NOT EXECUTED ada8: e089000a add r0, r9, sl <== NOT EXECUTED adac: e0821001 add r1, r2, r1 <== NOT EXECUTED adb0: e1a02003 mov r2, r3 <== NOT EXECUTED adb4: e58d3000 str r3, [sp] <== NOT EXECUTED adb8: eb00073f bl cabc <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); adbc: e59d3000 ldr r3, [sp] <== NOT EXECUTED adc0: e08a0003 add r0, sl, r3 <== NOT EXECUTED adc4: e0890000 add r0, r9, r0 <== NOT EXECUTED adc8: e0632006 rsb r2, r3, r6 <== NOT EXECUTED adcc: e5941000 ldr r1, [r4] <== NOT EXECUTED add0: eb000739 bl cabc <== NOT EXECUTED add4: eaffffda b ad44 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); add8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED addc: e1a0100b mov r1, fp <== NOT EXECUTED ade0: eb000258 bl b748 <== NOT EXECUTED ade4: eaffffe4 b ad7c <== NOT EXECUTED 0000ade8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ade8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; adec: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { adf0: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, adf4: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { adf8: e24dd004 sub sp, sp, #4 <== NOT EXECUTED adfc: e1a07000 mov r7, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ae00: e1a02001 mov r2, r1 <== NOT EXECUTED ae04: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ae08: ebffe657 bl 476c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) ae0c: e3500000 cmp r0, #0 <== NOT EXECUTED ae10: 1a000038 bne aef8 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ae14: e5956014 ldr r6, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) ae18: e3160002 tst r6, #2 <== NOT EXECUTED pipe->Readers --; ae1c: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ae20: e2066006 and r6, r6, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; ae24: 12433001 subne r3, r3, #1 <== NOT EXECUTED ae28: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) ae2c: e3160004 tst r6, #4 <== NOT EXECUTED pipe->Writers --; ae30: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, ae34: e59f50c0 ldr r5, [pc, #192] ; aefc <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; ae38: 12433001 subne r3, r3, #1 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, ae3c: e3a01000 mov r1, #0 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; ae40: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, ae44: e5950000 ldr r0, [r5] <== NOT EXECUTED ae48: e1a02001 mov r2, r1 <== NOT EXECUTED ae4c: ebffe646 bl 476c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) ae50: e3500000 cmp r0, #0 <== NOT EXECUTED ae54: 1a000027 bne aef8 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); ae58: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ae5c: ebffe68a bl 488c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { ae60: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED ae64: e3530000 cmp r3, #0 <== NOT EXECUTED ae68: 0a00000d beq aea4 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ae6c: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED ae70: e2723001 rsbs r3, r2, #1 <== NOT EXECUTED ae74: 33a03000 movcc r3, #0 <== NOT EXECUTED ae78: e3560002 cmp r6, #2 <== NOT EXECUTED ae7c: 03a03000 moveq r3, #0 <== NOT EXECUTED ae80: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ae84: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED ae88: 11a0100d movne r1, sp <== NOT EXECUTED ae8c: 1b00022d blne b748 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); ae90: e5950000 ldr r0, [r5] <== NOT EXECUTED ae94: ebffe67c bl 488c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ae98: e3a00000 mov r0, #0 <== NOT EXECUTED ae9c: e28dd004 add sp, sp, #4 <== NOT EXECUTED aea0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { aea4: e5948014 ldr r8, [r4, #20] <== NOT EXECUTED aea8: e3580000 cmp r8, #0 <== NOT EXECUTED aeac: 0a000005 beq aec8 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) aeb0: e3560004 cmp r6, #4 <== NOT EXECUTED aeb4: 0afffff5 beq ae90 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); aeb8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED aebc: e1a0100d mov r1, sp <== NOT EXECUTED aec0: eb000220 bl b748 <== NOT EXECUTED aec4: eafffff1 b ae90 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); aec8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED aecc: eb000203 bl b6e0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); aed0: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED aed4: eb000201 bl b6e0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); aed8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED aedc: ebffe5f9 bl 46c8 <== NOT EXECUTED free(pipe->Buffer); aee0: e5940000 ldr r0, [r4] <== NOT EXECUTED aee4: ebfff841 bl 8ff0 <== NOT EXECUTED free(pipe); aee8: e1a00004 mov r0, r4 <== NOT EXECUTED aeec: ebfff83f bl 8ff0 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; aef0: e5878000 str r8, [r7] <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { aef4: eaffffe5 b ae90 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); aef8: ebffe7ba bl 4de8 <== NOT EXECUTED aefc: 000190e4 .word 0x000190e4 0000aa30 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aa30: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) aa34: e2524000 subs r4, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aa38: e24dd008 sub sp, sp, #8 <== NOT EXECUTED aa3c: e1a05000 mov r5, r0 <== NOT EXECUTED aa40: e1a06001 mov r6, r1 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) aa44: 01a07004 moveq r7, r4 <== NOT EXECUTED aa48: 1a000002 bne aa58 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } aa4c: e1a00007 mov r0, r7 <== NOT EXECUTED aa50: e28dd008 add sp, sp, #8 <== NOT EXECUTED aa54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) aa58: e3a01000 mov r1, #0 <== NOT EXECUTED aa5c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED aa60: e1a02001 mov r2, r1 <== NOT EXECUTED aa64: e58d3000 str r3, [sp] <== NOT EXECUTED aa68: ebffe73f bl 476c <== NOT EXECUTED aa6c: e2509000 subs r9, r0, #0 <== NOT EXECUTED aa70: e59d3000 ldr r3, [sp] <== NOT EXECUTED aa74: 13e07003 mvnne r7, #3 <== NOT EXECUTED aa78: 1afffff3 bne aa4c <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { aa7c: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED aa80: e3570000 cmp r7, #0 <== NOT EXECUTED aa84: 0a00004f beq abc8 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; aa88: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED aa8c: e1540008 cmp r4, r8 <== NOT EXECUTED aa90: 91a0a004 movls sl, r4 <== NOT EXECUTED aa94: 83a0a001 movhi sl, #1 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { aa98: e1a07009 mov r7, r9 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); aa9c: e28db004 add fp, sp, #4 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { aaa0: e595100c ldr r1, [r5, #12] <== NOT EXECUTED aaa4: e0612008 rsb r2, r1, r8 <== NOT EXECUTED aaa8: e152000a cmp r2, sl <== NOT EXECUTED aaac: 2a000021 bcs ab38 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { aab0: e5938014 ldr r8, [r3, #20] <== NOT EXECUTED aab4: e2188001 ands r8, r8, #1 <== NOT EXECUTED aab8: 1a00004a bne abe8 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; aabc: e595201c ldr r2, [r5, #28] <== NOT EXECUTED aac0: e2822001 add r2, r2, #1 <== NOT EXECUTED aac4: e585201c str r2, [r5, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); aac8: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED aacc: e58d3000 str r3, [sp] <== NOT EXECUTED aad0: ebffe76d bl 488c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) aad4: e1a01008 mov r1, r8 <== NOT EXECUTED aad8: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED aadc: eb000332 bl b7ac <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { aae0: e1a01008 mov r1, r8 <== NOT EXECUTED aae4: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) aae8: e2508000 subs r8, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { aaec: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) aaf0: 13e08003 mvnne r8, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { aaf4: ebffe71c bl 476c <== NOT EXECUTED aaf8: e3500000 cmp r0, #0 <== NOT EXECUTED aafc: e59d3000 ldr r3, [sp] <== NOT EXECUTED ab00: 1a000036 bne abe0 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab04: e595201c ldr r2, [r5, #28] <== NOT EXECUTED if (ret != 0) ab08: e3580000 cmp r8, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab0c: e2422001 sub r2, r2, #1 <== NOT EXECUTED ab10: e585201c str r2, [r5, #28] <== NOT EXECUTED if (ret != 0) ab14: 1a00002c bne abcc <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { ab18: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED ab1c: e3520000 cmp r2, #0 <== NOT EXECUTED ab20: 0a000028 beq abc8 <== NOT EXECUTED ab24: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { ab28: e595100c ldr r1, [r5, #12] <== NOT EXECUTED ab2c: e0612008 rsb r2, r1, r8 <== NOT EXECUTED ab30: e152000a cmp r2, sl <== NOT EXECUTED ab34: 3affffdd bcc aab0 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ab38: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ab3c: e069a004 rsb sl, r9, r4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); ab40: e0810000 add r0, r1, r0 <== NOT EXECUTED ab44: e1a01008 mov r1, r8 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ab48: e152000a cmp r2, sl <== NOT EXECUTED ab4c: 31a0a002 movcc sl, r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); ab50: e58d3000 str r3, [sp] <== NOT EXECUTED ab54: eb002b81 bl 15960 <__umodsi3> <== NOT EXECUTED ab58: e0608008 rsb r8, r0, r8 <== NOT EXECUTED if (chunk > chunk1) { ab5c: e15a0008 cmp sl, r8 <== NOT EXECUTED ab60: e59d3000 ldr r3, [sp] <== NOT EXECUTED ab64: da000021 ble abf0 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ab68: e5952000 ldr r2, [r5] <== NOT EXECUTED ab6c: e0861009 add r1, r6, r9 <== NOT EXECUTED ab70: e0820000 add r0, r2, r0 <== NOT EXECUTED ab74: e1a02008 mov r2, r8 <== NOT EXECUTED ab78: eb0007cf bl cabc <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ab7c: e0881009 add r1, r8, r9 <== NOT EXECUTED ab80: e0861001 add r1, r6, r1 <== NOT EXECUTED ab84: e068200a rsb r2, r8, sl <== NOT EXECUTED ab88: e5950000 ldr r0, [r5] <== NOT EXECUTED ab8c: eb0007ca bl cabc <== NOT EXECUTED ab90: e59d3000 ldr r3, [sp] <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ab94: e595200c ldr r2, [r5, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) ab98: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ab9c: e082200a add r2, r2, sl <== NOT EXECUTED if (pipe->waitingReaders > 0) aba0: e3510000 cmp r1, #0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; aba4: e585200c str r2, [r5, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) aba8: 1a000018 bne ac10 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; abac: e087700a add r7, r7, sl <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { abb0: e1540007 cmp r4, r7 <== NOT EXECUTED abb4: e1a09007 mov r9, r7 <== NOT EXECUTED abb8: 9a00001a bls ac28 <== NOT EXECUTED abbc: e5958004 ldr r8, [r5, #4] <== NOT EXECUTED abc0: e3a0a001 mov sl, #1 <== NOT EXECUTED abc4: eaffffb5 b aaa0 <== NOT EXECUTED abc8: e3e0801f mvn r8, #31 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); abcc: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED abd0: ebffe72d bl 488c <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) abd4: e3570000 cmp r7, #0 <== NOT EXECUTED abd8: d1a07008 movle r7, r8 <== NOT EXECUTED abdc: eaffff9a b aa4c <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { abe0: e3e08003 mvn r8, #3 <== NOT EXECUTED abe4: eafffffa b abd4 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { abe8: e3e0800a mvn r8, #10 <== NOT EXECUTED abec: eafffff6 b abcc <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); abf0: e5952000 ldr r2, [r5] <== NOT EXECUTED abf4: e0861009 add r1, r6, r9 <== NOT EXECUTED abf8: e0820000 add r0, r2, r0 <== NOT EXECUTED abfc: e1a0200a mov r2, sl <== NOT EXECUTED ac00: e58d3000 str r3, [sp] <== NOT EXECUTED ac04: eb0007ac bl cabc <== NOT EXECUTED ac08: e59d3000 ldr r3, [sp] <== NOT EXECUTED ac0c: eaffffe0 b ab94 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ac10: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED ac14: e1a0100b mov r1, fp <== NOT EXECUTED ac18: e58d3000 str r3, [sp] <== NOT EXECUTED ac1c: eb0002c9 bl b748 <== NOT EXECUTED ac20: e59d3000 ldr r3, [sp] <== NOT EXECUTED ac24: eaffffe0 b abac <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ac28: e3a08000 mov r8, #0 <== NOT EXECUTED ac2c: eaffffe6 b abcc <== NOT EXECUTED 0001736c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1736c: e59f30bc ldr r3, [pc, #188] ; 17430 17370: e5933000 ldr r3, [r3] 17374: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 17378: e92d4810 push {r4, fp, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1737c: 2a00001c bcs 173f4 iop = rtems_libio_iop( fd ); 17380: e59f40ac ldr r4, [pc, #172] ; 17434 17384: e5944000 ldr r4, [r4] 17388: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 1738c: e5940014 ldr r0, [r4, #20] 17390: e3100c01 tst r0, #256 ; 0x100 17394: 0a000016 beq 173f4 rtems_libio_check_buffer( buffer ); 17398: e3510000 cmp r1, #0 1739c: 0a000019 beq 17408 rtems_libio_check_count( count ); 173a0: e3520000 cmp r2, #0 173a4: 01a00002 moveq r0, r2 173a8: 08bd8810 popeq {r4, fp, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 173ac: e3100002 tst r0, #2 173b0: 0a000014 beq 17408 /* * Now process the read(). */ if ( !iop->handlers->read_h ) 173b4: e594303c ldr r3, [r4, #60] ; 0x3c 173b8: e5933008 ldr r3, [r3, #8] 173bc: e3530000 cmp r3, #0 173c0: 0a000015 beq 1741c rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 173c4: e1a00004 mov r0, r4 173c8: e1a0e00f mov lr, pc 173cc: e12fff13 bx r3 if ( rc > 0 ) 173d0: e3500000 cmp r0, #0 173d4: d8bd8810 pople {r4, fp, pc} iop->offset += rc; 173d8: e284c00c add ip, r4, #12 173dc: e89c1800 ldm ip, {fp, ip} 173e0: e09b2000 adds r2, fp, r0 173e4: e0ac3fc0 adc r3, ip, r0, asr #31 173e8: e584200c str r2, [r4, #12] 173ec: e5843010 str r3, [r4, #16] return rc; } 173f0: e8bd8810 pop {r4, fp, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 173f4: ebffd3a2 bl c284 <__errno> 173f8: e3a03009 mov r3, #9 173fc: e5803000 str r3, [r0] 17400: e3e00000 mvn r0, #0 17404: e8bd8810 pop {r4, fp, pc} rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17408: ebffd39d bl c284 <__errno> <== NOT EXECUTED 1740c: e3a03016 mov r3, #22 <== NOT EXECUTED 17410: e5803000 str r3, [r0] <== NOT EXECUTED 17414: e3e00000 mvn r0, #0 <== NOT EXECUTED 17418: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1741c: ebffd398 bl c284 <__errno> <== NOT EXECUTED 17420: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17424: e5803000 str r3, [r0] <== NOT EXECUTED 17428: e3e00000 mvn r0, #0 <== NOT EXECUTED 1742c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 17430: 00017b50 .word 0x00017b50 17434: 00019168 .word 0x00019168 00026bc0 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 26bc0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 26bc4: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 26bc8: e24dd018 sub sp, sp, #24 26bcc: e1a05002 mov r5, r2 26bd0: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 26bd4: 0a000032 beq 26ca4 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 26bd8: eb007489 bl 43e04 26bdc: e28d4004 add r4, sp, #4 26be0: e3a0c000 mov ip, #0 26be4: e1a01000 mov r1, r0 26be8: e1a0200c mov r2, ip 26bec: e1a00007 mov r0, r7 26bf0: e1a03004 mov r3, r4 26bf4: e58dc000 str ip, [sp] 26bf8: ebff7a73 bl 55cc 0, &loc, false ); if ( result != 0 ) 26bfc: e3500000 cmp r0, #0 26c00: 1a000025 bne 26c9c return -1; if ( !loc.ops->node_type_h ){ 26c04: e59d2010 ldr r2, [sp, #16] 26c08: e5923010 ldr r3, [r2, #16] 26c0c: e3530000 cmp r3, #0 26c10: 0a000019 beq 26c7c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 26c14: e1a00004 mov r0, r4 26c18: e1a0e00f mov lr, pc 26c1c: e12fff13 bx r3 26c20: e3500004 cmp r0, #4 26c24: 1a000023 bne 26cb8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 26c28: e59d2010 ldr r2, [sp, #16] 26c2c: e592303c ldr r3, [r2, #60] ; 0x3c 26c30: e3530000 cmp r3, #0 26c34: 0a00002c beq 26cec rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 26c38: e1a02005 mov r2, r5 26c3c: e1a01006 mov r1, r6 26c40: e1a00004 mov r0, r4 26c44: e1a0e00f mov lr, pc 26c48: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 26c4c: e59d3010 ldr r3, [sp, #16] 26c50: e3530000 cmp r3, #0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 26c54: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 26c58: 0a000004 beq 26c70 26c5c: e593301c ldr r3, [r3, #28] 26c60: e3530000 cmp r3, #0 26c64: 11a00004 movne r0, r4 26c68: 11a0e00f movne lr, pc 26c6c: 112fff13 bxne r3 return result; } 26c70: e1a00005 mov r0, r5 26c74: e28dd018 add sp, sp, #24 26c78: e8bd80f0 pop {r4, r5, r6, r7, pc} 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 26c7c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26c80: e3530000 cmp r3, #0 <== NOT EXECUTED 26c84: 11a00004 movne r0, r4 <== NOT EXECUTED 26c88: 11a0e00f movne lr, pc <== NOT EXECUTED 26c8c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26c90: eb0059e1 bl 3d41c <__errno> <== NOT EXECUTED 26c94: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26c98: e5803000 str r3, [r0] <== NOT EXECUTED 26c9c: e3e05000 mvn r5, #0 <== NOT EXECUTED 26ca0: eafffff2 b 26c70 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 26ca4: eb0059dc bl 3d41c <__errno> <== NOT EXECUTED 26ca8: e3a0300e mov r3, #14 <== NOT EXECUTED 26cac: e5803000 str r3, [r0] <== NOT EXECUTED 26cb0: e3e05000 mvn r5, #0 <== NOT EXECUTED 26cb4: eaffffed b 26c70 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 26cb8: e59d3010 ldr r3, [sp, #16] 26cbc: e3530000 cmp r3, #0 26cc0: 0a000004 beq 26cd8 26cc4: e593301c ldr r3, [r3, #28] 26cc8: e3530000 cmp r3, #0 26ccc: 11a00004 movne r0, r4 26cd0: 11a0e00f movne lr, pc 26cd4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 26cd8: eb0059cf bl 3d41c <__errno> 26cdc: e3a03016 mov r3, #22 26ce0: e5803000 str r3, [r0] 26ce4: e3e05000 mvn r5, #0 26ce8: eaffffe0 b 26c70 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 26cec: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26cf0: e3530000 cmp r3, #0 <== NOT EXECUTED 26cf4: 11a00004 movne r0, r4 <== NOT EXECUTED 26cf8: 11a0e00f movne lr, pc <== NOT EXECUTED 26cfc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26d00: eb0059c5 bl 3d41c <__errno> <== NOT EXECUTED 26d04: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26d08: e5803000 str r3, [r0] <== NOT EXECUTED 26d0c: e3e05000 mvn r5, #0 <== NOT EXECUTED 26d10: eaffffd6 b 26c70 <== NOT EXECUTED 000035d4 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 35d4: e59f3154 ldr r3, [pc, #340] ; 3730 35d8: e5933000 ldr r3, [r3] 35dc: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 35e0: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 35e4: e1a04002 mov r4, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 35e8: 2a000046 bcs 3708 iop = rtems_libio_iop( fd ); 35ec: e59f3140 ldr r3, [pc, #320] ; 3734 35f0: e5936000 ldr r6, [r3] 35f4: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 35f8: e5963014 ldr r3, [r6, #20] 35fc: e3130c01 tst r3, #256 ; 0x100 3600: 0a000040 beq 3708 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3604: e3130002 tst r3, #2 3608: 0a000038 beq 36f0 /* * Argument validation on IO vector */ if ( !iov ) 360c: e3510000 cmp r1, #0 3610: 0a000036 beq 36f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3614: e3520000 cmp r2, #0 3618: da000034 ble 36f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 361c: e3520b01 cmp r2, #1024 ; 0x400 3620: ca000032 bgt 36f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 3624: e596303c ldr r3, [r6, #60] ; 0x3c 3628: e5933008 ldr r3, [r3, #8] 362c: e3530000 cmp r3, #0 3630: 0a000039 beq 371c rtems_set_errno_and_return_minus_one( ENOTSUP ); 3634: e1a05001 mov r5, r1 3638: e3a01000 mov r1, #0 363c: e1a02005 mov r2, r5 3640: e1a00001 mov r0, r1 3644: ea000000 b 364c * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3648: e1a0000e mov r0, lr ssize_t old; if ( !iov[v].iov_base ) 364c: e592c000 ldr ip, [r2] 3650: e35c0000 cmp ip, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3654: e2811001 add r1, r1, #1 ssize_t old; if ( !iov[v].iov_base ) 3658: 0a000024 beq 36f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 365c: e592c004 ldr ip, [r2, #4] 3660: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 3664: e080e00c add lr, r0, ip ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 3668: 0a000020 beq 36f0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 366c: e150000e cmp r0, lr 3670: ca00001e bgt 36f0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3674: e1540001 cmp r4, r1 3678: e2822008 add r2, r2, #8 367c: cafffff1 bgt 3648 3680: e3a07000 mov r7, #0 3684: e1a08007 mov r8, r7 3688: ea00000f b 36cc bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 368c: 0a000006 beq 36ac iop->offset += bytes; 3690: e286c00c add ip, r6, #12 <== NOT EXECUTED 3694: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 3698: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 369c: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 36a0: e586200c str r2, [r6, #12] <== NOT EXECUTED 36a4: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 36a8: e0888000 add r8, r8, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 36ac: e5953004 ldr r3, [r5, #4] 36b0: e1500003 cmp r0, r3 36b4: 1a000011 bne 3700 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 36b8: e1540007 cmp r4, r7 <== NOT EXECUTED 36bc: e2855008 add r5, r5, #8 <== NOT EXECUTED 36c0: da00000e ble 3700 <== NOT EXECUTED 36c4: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 36c8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 36cc: e8950006 ldm r5, {r1, r2} 36d0: e1a00006 mov r0, r6 36d4: e1a0e00f mov lr, pc 36d8: e12fff13 bx r3 if ( bytes < 0 ) 36dc: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 36e0: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 36e4: aaffffe8 bge 368c } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 36e8: e3e08000 mvn r8, #0 <== NOT EXECUTED 36ec: ea000003 b 3700 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 36f0: eb002cbd bl e9ec <__errno> 36f4: e3a03016 mov r3, #22 36f8: e5803000 str r3, [r0] 36fc: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 3700: e1a00008 mov r0, r8 3704: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 3708: eb002cb7 bl e9ec <__errno> <== NOT EXECUTED 370c: e3a03009 mov r3, #9 <== NOT EXECUTED 3710: e5803000 str r3, [r0] <== NOT EXECUTED 3714: e3e08000 mvn r8, #0 <== NOT EXECUTED 3718: eafffff8 b 3700 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 371c: eb002cb2 bl e9ec <__errno> <== NOT EXECUTED 3720: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3724: e5803000 str r3, [r0] <== NOT EXECUTED 3728: e3e08000 mvn r8, #0 <== NOT EXECUTED 372c: eafffff3 b 3700 <== NOT EXECUTED 3730: 0001bb10 .word 0x0001bb10 3734: 0001e57c .word 0x0001e57c 00017490 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17490: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17494: e59f3118 ldr r3, [pc, #280] ; 175b4 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17498: e59f5118 ldr r5, [pc, #280] ; 175b8 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 1749c: e5932000 ldr r2, [r3] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 174a0: e5953010 ldr r3, [r5, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 174a4: e3520003 cmp r2, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 174a8: e2833001 add r3, r3, #1 174ac: e24dd004 sub sp, sp, #4 174b0: e5853010 str r3, [r5, #16] 174b4: e1a04000 mov r4, r0 174b8: e1a06001 mov r6, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 174bc: 0a000020 beq 17544 } /* * Continue with realloc(). */ if ( !ptr ) 174c0: e3540000 cmp r4, #0 174c4: 0a00001a beq 17534 return malloc( size ); if ( !size ) { 174c8: e3560000 cmp r6, #0 174cc: 0a00000f beq 17510 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 174d0: e59f70e4 ldr r7, [pc, #228] ; 175bc 174d4: e1a01004 mov r1, r4 174d8: e5970000 ldr r0, [r7] 174dc: e1a0200d mov r2, sp 174e0: eb00006b bl 17694 <_Protected_heap_Get_block_size> 174e4: e2508000 subs r8, r0, #0 174e8: 0a00000c beq 17520 #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 174ec: e5970000 ldr r0, [r7] 174f0: e1a01004 mov r1, r4 174f4: e1a02006 mov r2, r6 174f8: eb000076 bl 176d8 <_Protected_heap_Resize_block> 174fc: e3500000 cmp r0, #0 17500: 0a00001b beq 17574 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 17504: e1a00004 mov r0, r4 17508: e28dd004 add sp, sp, #4 1750c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 17510: e1a00004 mov r0, r4 <== NOT EXECUTED 17514: ebffc6b5 bl 8ff0 <== NOT EXECUTED 17518: e1a04006 mov r4, r6 <== NOT EXECUTED return (void *) 0; 1751c: eafffff8 b 17504 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 17520: ebffd357 bl c284 <__errno> 17524: e3a03016 mov r3, #22 17528: e5803000 str r3, [r0] 1752c: e1a04008 mov r4, r8 return (void *) 0; 17530: eafffff3 b 17504 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 17534: e1a00006 mov r0, r6 17538: ebffc802 bl 9548 1753c: e1a04000 mov r4, r0 17540: eaffffef b 17504 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 17544: e59f3074 ldr r3, [pc, #116] ; 175c0 17548: e5933000 ldr r3, [r3] 1754c: e3530000 cmp r3, #0 17550: 0a000001 beq 1755c } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 17554: e3a04000 mov r4, #0 17558: eaffffe9 b 17504 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 1755c: e59f3060 ldr r3, [pc, #96] ; 175c4 17560: e5933000 ldr r3, [r3] 17564: e3530000 cmp r3, #0 17568: 0affffd4 beq 174c0 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 1756c: e3a04000 mov r4, #0 <== NOT EXECUTED 17570: eaffffe3 b 17504 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 17574: e1a00006 mov r0, r6 17578: ebffc7f2 bl 9548 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1757c: e5953004 ldr r3, [r5, #4] if ( !new_area ) { 17580: e2507000 subs r7, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17584: e2433001 sub r3, r3, #1 17588: e5853004 str r3, [r5, #4] if ( !new_area ) { 1758c: 0afffff0 beq 17554 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 17590: e59d2000 ldr r2, [sp] 17594: e1a01004 mov r1, r4 17598: e1560002 cmp r6, r2 1759c: 31a02006 movcc r2, r6 175a0: ebffd545 bl cabc free( ptr ); 175a4: e1a00004 mov r0, r4 175a8: ebffc690 bl 8ff0 175ac: e1a04007 mov r4, r7 return new_area; 175b0: eaffffd3 b 17504 175b4: 00019470 .word 0x00019470 175b8: 00019174 .word 0x00019174 175bc: 00017b5c .word 0x00017b5c 175c0: 000192cc .word 0x000192cc 175c4: 0001935c .word 0x0001935c 00006b38 : #include int rmdir( const char *pathname ) { 6b38: e92d40f0 push {r4, r5, r6, r7, lr} 6b3c: e24dd02c sub sp, sp, #44 ; 0x2c 6b40: e1a05000 mov r5, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 6b44: ebfffa4a bl 5474 if ( parentpathlen == 0 ) 6b48: e2507000 subs r7, r0, #0 6b4c: 1a000080 bne 6d54 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6b50: e5d53000 ldrb r3, [r5] 6b54: e353002f cmp r3, #47 ; 0x2f 6b58: 1353005c cmpne r3, #92 ; 0x5c 6b5c: 1a000049 bne 6c88 6b60: e59f328c ldr r3, [pc, #652] ; 6df4 6b64: e593c000 ldr ip, [r3] 6b68: e28cc018 add ip, ip, #24 6b6c: e8bc000f ldm ip!, {r0, r1, r2, r3} 6b70: e28d4018 add r4, sp, #24 6b74: e1a0e004 mov lr, r4 6b78: e8ae000f stmia lr!, {r0, r1, r2, r3} 6b7c: e59c2000 ldr r2, [ip] 6b80: e58e2000 str r2, [lr] 6b84: e3a06000 mov r6, #0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6b88: e1a0e004 mov lr, r4 6b8c: e8be000f ldm lr!, {r0, r1, r2, r3} 6b90: e28dc004 add ip, sp, #4 6b94: e8ac000f stmia ip!, {r0, r1, r2, r3} 6b98: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 6b9c: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6ba0: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6ba4: e1a00005 mov r0, r5 6ba8: eb00f495 bl 43e04 6bac: e1a01000 mov r1, r0 6bb0: e1a00005 mov r0, r5 6bb4: ebfffa1a bl 5424 6bb8: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6bbc: e1a00007 mov r0, r7 6bc0: eb00f48f bl 43e04 6bc4: e28d5004 add r5, sp, #4 6bc8: e3a0c000 mov ip, #0 6bcc: e1a01000 mov r1, r0 6bd0: e1a0200c mov r2, ip 6bd4: e1a00007 mov r0, r7 6bd8: e1a03005 mov r3, r5 6bdc: e58dc000 str ip, [sp] 6be0: ebfffa3d bl 54dc 0, &loc, false ); if ( result != 0 ) { 6be4: e3500000 cmp r0, #0 6be8: 1a00004a bne 6d18 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 6bec: e59d2010 ldr r2, [sp, #16] 6bf0: e5923010 ldr r3, [r2, #16] 6bf4: e3530000 cmp r3, #0 6bf8: 0a000079 beq 6de4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 6bfc: e1a00005 mov r0, r5 6c00: e1a0e00f mov lr, pc 6c04: e12fff13 bx r3 6c08: e3500001 cmp r0, #1 6c0c: 1a00002a bne 6cbc /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6c10: e59d300c ldr r3, [sp, #12] 6c14: e5933034 ldr r3, [r3, #52] ; 0x34 6c18: e3530000 cmp r3, #0 6c1c: 0a000058 beq 6d84 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6c20: e1a00004 mov r0, r4 6c24: e1a01005 mov r1, r5 6c28: e1a0e00f mov lr, pc 6c2c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 6c30: e59d3010 ldr r3, [sp, #16] 6c34: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6c38: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 6c3c: 0a000004 beq 6c54 6c40: e593301c ldr r3, [r3, #28] 6c44: e3530000 cmp r3, #0 6c48: 11a00005 movne r0, r5 6c4c: 11a0e00f movne lr, pc 6c50: 112fff13 bxne r3 if ( free_parentloc ) 6c54: e3560000 cmp r6, #0 6c58: 0a000007 beq 6c7c rtems_filesystem_freenode( &parentloc ); 6c5c: e59d3024 ldr r3, [sp, #36] ; 0x24 6c60: e3530000 cmp r3, #0 6c64: 0a000004 beq 6c7c 6c68: e593301c ldr r3, [r3, #28] 6c6c: e3530000 cmp r3, #0 6c70: 11a00004 movne r0, r4 6c74: 11a0e00f movne lr, pc 6c78: 112fff13 bxne r3 return result; } 6c7c: e1a00007 mov r0, r7 6c80: e28dd02c add sp, sp, #44 ; 0x2c 6c84: e8bd80f0 pop {r4, r5, r6, r7, pc} */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6c88: e3530000 cmp r3, #0 <== NOT EXECUTED 6c8c: 0affffb3 beq 6b60 <== NOT EXECUTED 6c90: e59f315c ldr r3, [pc, #348] ; 6df4 <== NOT EXECUTED 6c94: e593c000 ldr ip, [r3] <== NOT EXECUTED 6c98: e28cc004 add ip, ip, #4 <== NOT EXECUTED 6c9c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 6ca0: e28d4018 add r4, sp, #24 <== NOT EXECUTED 6ca4: e1a0e004 mov lr, r4 <== NOT EXECUTED 6ca8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 6cac: e59c2000 ldr r2, [ip] <== NOT EXECUTED 6cb0: e1a06007 mov r6, r7 <== NOT EXECUTED 6cb4: e58e2000 str r2, [lr] <== NOT EXECUTED 6cb8: eaffffb2 b 6b88 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 6cbc: e59d3010 ldr r3, [sp, #16] 6cc0: e3530000 cmp r3, #0 6cc4: 0a000004 beq 6cdc 6cc8: e593301c ldr r3, [r3, #28] 6ccc: e3530000 cmp r3, #0 6cd0: 11a00005 movne r0, r5 6cd4: 11a0e00f movne lr, pc 6cd8: 112fff13 bxne r3 if ( free_parentloc ) 6cdc: e3560000 cmp r6, #0 6ce0: 0a000007 beq 6d04 rtems_filesystem_freenode( &parentloc ); 6ce4: e59d3024 ldr r3, [sp, #36] ; 0x24 6ce8: e3530000 cmp r3, #0 6cec: 0a000004 beq 6d04 6cf0: e593301c ldr r3, [r3, #28] 6cf4: e3530000 cmp r3, #0 6cf8: 11a00004 movne r0, r4 6cfc: 11a0e00f movne lr, pc 6d00: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 6d04: eb00d9c4 bl 3d41c <__errno> 6d08: e3a03014 mov r3, #20 6d0c: e5803000 str r3, [r0] 6d10: e3e07000 mvn r7, #0 6d14: eaffffd8 b 6c7c name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 6d18: e3560000 cmp r6, #0 6d1c: 1a000001 bne 6d28 result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 6d20: e3e07000 mvn r7, #0 6d24: eaffffd4 b 6c7c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 6d28: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6d2c: e3530000 cmp r3, #0 <== NOT EXECUTED 6d30: 0afffffa beq 6d20 <== NOT EXECUTED 6d34: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6d38: e3530000 cmp r3, #0 <== NOT EXECUTED 6d3c: 0afffff7 beq 6d20 <== NOT EXECUTED 6d40: e1a00004 mov r0, r4 <== NOT EXECUTED 6d44: e1a0e00f mov lr, pc <== NOT EXECUTED 6d48: e12fff13 bx r3 <== NOT EXECUTED 6d4c: e3e07000 mvn r7, #0 <== NOT EXECUTED 6d50: eaffffc9 b 6c7c <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 6d54: e28d4018 add r4, sp, #24 6d58: e3a0c000 mov ip, #0 6d5c: e1a00005 mov r0, r5 6d60: e1a01007 mov r1, r7 6d64: e3a02002 mov r2, #2 6d68: e1a03004 mov r3, r4 6d6c: e58dc000 str ip, [sp] 6d70: ebfffa15 bl 55cc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 6d74: e3500000 cmp r0, #0 6d78: 1affffe8 bne 6d20 6d7c: e3a06001 mov r6, #1 6d80: eaffff80 b 6b88 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 6d84: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6d88: e3530000 cmp r3, #0 <== NOT EXECUTED 6d8c: 0a000005 beq 6da8 <== NOT EXECUTED 6d90: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6d94: e3530000 cmp r3, #0 <== NOT EXECUTED 6d98: 0a000002 beq 6da8 <== NOT EXECUTED 6d9c: e1a00005 mov r0, r5 <== NOT EXECUTED 6da0: e1a0e00f mov lr, pc <== NOT EXECUTED 6da4: e12fff13 bx r3 <== NOT EXECUTED if ( free_parentloc ) 6da8: e3560000 cmp r6, #0 <== NOT EXECUTED 6dac: 0a000007 beq 6dd0 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 6db0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6db4: e3530000 cmp r3, #0 <== NOT EXECUTED 6db8: 0a000004 beq 6dd0 <== NOT EXECUTED 6dbc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 6dc4: 11a00004 movne r0, r4 <== NOT EXECUTED 6dc8: 11a0e00f movne lr, pc <== NOT EXECUTED 6dcc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6dd0: eb00d991 bl 3d41c <__errno> <== NOT EXECUTED 6dd4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6dd8: e5803000 str r3, [r0] <== NOT EXECUTED 6ddc: e3e07000 mvn r7, #0 <== NOT EXECUTED 6de0: eaffffa5 b 6c7c <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 6de4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 6de8: e3530000 cmp r3, #0 <== NOT EXECUTED 6dec: 1affffea bne 6d9c <== NOT EXECUTED 6df0: eaffffec b 6da8 <== NOT EXECUTED 6df4: 00057858 .word 0x00057858 00012c0c : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 12c0c: e59f0000 ldr r0, [pc, #0] ; 12c14 <== NOT EXECUTED 12c10: e12fff1e bx lr <== NOT EXECUTED 12c14: 00021de8 .word 0x00021de8 0000fb48 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { fb48: e92d4010 push {r4, lr} fb4c: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); fb50: eb000006 bl fb70 if (nap) fb54: e3500000 cmp r0, #0 fb58: 0a000001 beq fb64 return nap->name; return rtems_assoc_name_bad(local_value); } fb5c: e5900000 ldr r0, [r0] fb60: e8bd8010 pop {r4, pc} nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); fb64: e1a00004 mov r0, r4 <== NOT EXECUTED } fb68: e8bd4010 pop {r4, lr} <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); fb6c: ea000c26 b 12c0c <== NOT EXECUTED 0000c1ec : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c1ec: e92d4030 push {r4, r5, lr} c1f0: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) c1f4: e5900000 ldr r0, [r0] c1f8: e3500000 cmp r0, #0 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c1fc: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) c200: 01a04000 moveq r4, r0 c204: 0a000013 beq c258 c208: e59f105c ldr r1, [pc, #92] ; c26c c20c: eb000345 bl cf28 c210: e3500000 cmp r0, #0 c214: 13a02000 movne r2, #0 c218: 1a00000b bne c24c default_ap = ap++; for ( ; ap->name; ap++) c21c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED c220: e3530000 cmp r3, #0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; c224: e284300c add r3, r4, #12 <== NOT EXECUTED for ( ; ap->name; ap++) c228: 0a00000a beq c258 <== NOT EXECUTED c22c: e1a02004 mov r2, r4 <== NOT EXECUTED c230: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->local_value == local_value) c234: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED c238: e1530005 cmp r3, r5 <== NOT EXECUTED c23c: 0a000005 beq c258 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) c240: e5b4300c ldr r3, [r4, #12]! c244: e3530000 cmp r3, #0 c248: 0a000004 beq c260 if (ap->local_value == local_value) c24c: e5943004 ldr r3, [r4, #4] c250: e1530005 cmp r3, r5 c254: 1afffff9 bne c240 return ap; return default_ap; } c258: e1a00004 mov r0, r4 c25c: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) c260: e1a04002 mov r4, r2 if (ap->local_value == local_value) return ap; return default_ap; } c264: e1a00004 mov r0, r4 c268: e8bd8030 pop {r4, r5, pc} c26c: 00018d44 .word 0x00018d44 0000b598 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { b598: e92d4030 push {r4, r5, lr} b59c: e1a04000 mov r4, r0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b5a0: e5900000 ldr r0, [r0] b5a4: e3500000 cmp r0, #0 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { b5a8: e1a05001 mov r5, r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) b5ac: 01a04000 moveq r4, r0 b5b0: 0a000013 beq b604 b5b4: e59f105c ldr r1, [pc, #92] ; b618 b5b8: eb00065a bl cf28 b5bc: e3500000 cmp r0, #0 b5c0: 13a02000 movne r2, #0 b5c4: 1a00000b bne b5f8 default_ap = ap++; for ( ; ap->name; ap++) b5c8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED b5cc: e3530000 cmp r3, #0 <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; b5d0: e284300c add r3, r4, #12 <== NOT EXECUTED for ( ; ap->name; ap++) b5d4: 0a00000a beq b604 <== NOT EXECUTED b5d8: e1a02004 mov r2, r4 <== NOT EXECUTED b5dc: e1a04003 mov r4, r3 <== NOT EXECUTED if (ap->remote_value == remote_value) b5e0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED b5e4: e1530005 cmp r3, r5 <== NOT EXECUTED b5e8: 0a000005 beq b604 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) b5ec: e5b4300c ldr r3, [r4, #12]! b5f0: e3530000 cmp r3, #0 b5f4: 0a000004 beq b60c if (ap->remote_value == remote_value) b5f8: e5943008 ldr r3, [r4, #8] b5fc: e1530005 cmp r3, r5 b600: 1afffff9 bne b5ec return ap; return default_ap; } b604: e1a00004 mov r0, r4 b608: e8bd8030 pop {r4, r5, pc} const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) b60c: e1a04002 mov r4, r2 if (ap->remote_value == remote_value) return ap; return default_ap; } b610: e1a00004 mov r0, r4 b614: e8bd8030 pop {r4, r5, pc} b618: 00018d44 .word 0x00018d44 0000bf10 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { bf10: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); bf14: eb0000b4 bl c1ec <== NOT EXECUTED if (nap) bf18: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; bf1c: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } bf20: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 000012c4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 12c4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 12c8: e1a05000 mov r5, r0 <== NOT EXECUTED 12cc: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 12d0: ebffffc2 bl 11e0 <== NOT EXECUTED if ( !p ) 12d4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 12d8: 1a000002 bne 12e8 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 12dc: e3a04000 mov r4, #0 <== NOT EXECUTED } 12e0: e1a00004 mov r0, r4 <== NOT EXECUTED 12e4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 12e8: e1a00005 mov r0, r5 <== NOT EXECUTED 12ec: eb002fcd bl d228 <== NOT EXECUTED if ( *rhs != '=' ) 12f0: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED 12f4: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 12f8: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 12fc: 1afffff6 bne 12dc <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 1300: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 1304: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 1308: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 130c: 05f63001 ldrbeq r3, [r6, #1]! <== NOT EXECUTED for ( d=value ; *rhs ; ) 1310: e3530000 cmp r3, #0 <== NOT EXECUTED 1314: 01a02004 moveq r2, r4 <== NOT EXECUTED 1318: 0a000004 beq 1330 <== NOT EXECUTED 131c: e1a02004 mov r2, r4 <== NOT EXECUTED *d++ = *rhs++; 1320: e4c23001 strb r3, [r2], #1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1324: e5f63001 ldrb r3, [r6, #1]! <== NOT EXECUTED 1328: e3530000 cmp r3, #0 <== NOT EXECUTED 132c: 1afffffb bne 1320 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 1330: e5523001 ldrb r3, [r2, #-1] <== NOT EXECUTED 1334: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 1338: 02422001 subeq r2, r2, #1 <== NOT EXECUTED d--; *d = '\0'; 133c: e3a03000 mov r3, #0 <== NOT EXECUTED 1340: e5c23000 strb r3, [r2] <== NOT EXECUTED return value; } 1344: e1a00004 mov r0, r4 <== NOT EXECUTED 1348: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000bee4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { bee4: e92d4010 push {r4, lr} <== NOT EXECUTED bee8: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) beec: e59f0018 ldr r0, [pc, #24] ; bf0c <== NOT EXECUTED bef0: eb000006 bl bf10 <== NOT EXECUTED bef4: e2504000 subs r4, r0, #0 <== NOT EXECUTED bef8: 0a000001 beq bf04 <== NOT EXECUTED { errno = rc; befc: eb0000e0 bl c284 <__errno> <== NOT EXECUTED bf00: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } bf04: e3e00000 mvn r0, #0 <== NOT EXECUTED bf08: e8bd8010 pop {r4, pc} <== NOT EXECUTED bf0c: 000185fc .word 0x000185fc 000065f8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 65f8: e92d000e push {r1, r2, r3} <== NOT EXECUTED 65fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 6600: e24dd004 sub sp, sp, #4 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 6604: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6608: e1a02003 mov r2, r3 <== NOT EXECUTED 660c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 6610: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6614: ebffff81 bl 6420 <== NOT EXECUTED va_end(arglist); return chars_written; } 6618: e28dd004 add sp, sp, #4 <== NOT EXECUTED 661c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 6620: e28dd00c add sp, sp, #12 <== NOT EXECUTED 6624: e12fff1e bx lr <== NOT EXECUTED 0000121c : } int rtems_filesystem_dirname( const char *pathname ) { 121c: e92d4010 push {r4, lr} 1220: e1a04000 mov r4, r0 int len = strlen( pathname ); 1224: eb003007 bl d248 while ( len ) { 1228: e3500000 cmp r0, #0 int rtems_filesystem_dirname( const char *pathname ) { int len = strlen( pathname ); 122c: e1a02000 mov r2, r0 while ( len ) { 1230: 08bd8010 popeq {r4, pc} len--; 1234: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 1238: e7d43000 ldrb r3, [r4, r0] 123c: e353002f cmp r3, #47 ; 0x2f 1240: 1353005c cmpne r3, #92 ; 0x5c 1244: 08bd8010 popeq {r4, pc} 1248: e3530000 cmp r3, #0 124c: 10844002 addne r4, r4, r2 1250: 1a000008 bne 1278 1254: e8bd8010 pop {r4, pc} <== NOT EXECUTED 1258: e5543002 ldrb r3, [r4, #-2] 125c: e353002f cmp r3, #47 ; 0x2f 1260: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 1264: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 1268: 08bd8010 popeq {r4, pc} 126c: e3530000 cmp r3, #0 1270: e2444001 sub r4, r4, #1 1274: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 1278: e3500000 cmp r0, #0 127c: 1afffff5 bne 1258 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 1280: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001374 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1374: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 1378: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 137c: e1a07001 mov r7, r1 1380: e1a06002 mov r6, r2 1384: e1a0c003 mov ip, r3 1388: e59d8020 ldr r8, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 138c: 0a000029 beq 1438 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 1390: e3530000 cmp r3, #0 1394: 0a000022 beq 1424 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1398: e5d53000 ldrb r3, [r5] 139c: e353002f cmp r3, #47 ; 0x2f 13a0: 1353005c cmpne r3, #92 ; 0x5c 13a4: 13a04000 movne r4, #0 13a8: 03a04001 moveq r4, #1 13ac: 1a000010 bne 13f4 13b0: e59f3090 ldr r3, [pc, #144] ; 1448 13b4: e5934000 ldr r4, [r3] 13b8: e2844018 add r4, r4, #24 13bc: e8b4000f ldm r4!, {r0, r1, r2, r3} 13c0: e1a0900c mov r9, ip 13c4: e8a9000f stmia r9!, {r0, r1, r2, r3} 13c8: e5942000 ldr r2, [r4] 13cc: e3a04001 mov r4, #1 13d0: e5892000 str r2, [r9] 13d4: e1a01004 mov r1, r4 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 13d8: e0850004 add r0, r5, r4 13dc: e0611007 rsb r1, r1, r7 13e0: e1a02006 mov r2, r6 13e4: e1a0300c mov r3, ip 13e8: e58d8020 str r8, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 13ec: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 13f0: eaffffa3 b 1284 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 13f4: e3530000 cmp r3, #0 13f8: 0affffec beq 13b0 13fc: e59f3044 ldr r3, [pc, #68] ; 1448 1400: e593a000 ldr sl, [r3] 1404: e28aa004 add sl, sl, #4 1408: e8ba000f ldm sl!, {r0, r1, r2, r3} 140c: e1a0900c mov r9, ip 1410: e8a9000f stmia r9!, {r0, r1, r2, r3} 1414: e59a2000 ldr r2, [sl] 1418: e1a01004 mov r1, r4 141c: e5892000 str r2, [r9] 1420: eaffffec b 13d8 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1424: eb002b96 bl c284 <__errno> <== NOT EXECUTED 1428: e3a03005 mov r3, #5 <== NOT EXECUTED 142c: e5803000 str r3, [r0] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 1430: e3e00000 mvn r0, #0 1434: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 1438: eb002b91 bl c284 <__errno> 143c: e3a0300e mov r3, #14 1440: e5803000 str r3, [r0] 1444: eafffff9 b 1430 1448: 00017ce8 .word 0x00017ce8 00001284 : /* * Verify Input parameters. */ if ( !pathname ) 1284: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1288: e92d4030 push {r4, r5, lr} 128c: e1a05002 mov r5, r2 1290: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 1294: 0a00002c beq 134c rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 1298: e3530000 cmp r3, #0 129c: 0a00002f beq 1360 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 12a0: e593c00c ldr ip, [r3, #12] 12a4: e59cc000 ldr ip, [ip] 12a8: e35c0000 cmp ip, #0 12ac: 0a000021 beq 1338 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 12b0: e1a0e00f mov lr, pc 12b4: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 12b8: e59d200c ldr r2, [sp, #12] 12bc: e2703001 rsbs r3, r0, #1 12c0: 33a03000 movcc r3, #0 12c4: e3520000 cmp r2, #0 12c8: 03a03000 moveq r3, #0 12cc: e3530000 cmp r3, #0 12d0: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 12d4: e594200c ldr r2, [r4, #12] 12d8: e5923010 ldr r3, [r2, #16] 12dc: e3530000 cmp r3, #0 12e0: 0a00000f beq 1324 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 12e4: e1a00004 mov r0, r4 12e8: e1a0e00f mov lr, pc 12ec: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 12f0: e2400003 sub r0, r0, #3 12f4: e3500001 cmp r0, #1 12f8: 83a00000 movhi r0, #0 12fc: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1300: e594200c ldr r2, [r4, #12] 1304: e5923034 ldr r3, [r2, #52] ; 0x34 1308: e3530000 cmp r3, #0 130c: 0a000004 beq 1324 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 1310: e1a00004 mov r0, r4 1314: e1a01005 mov r1, r5 1318: e1a0e00f mov lr, pc 131c: e12fff13 bx r3 } } return result; } 1320: e8bd8030 pop {r4, r5, pc} if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 1324: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1328: e3530000 cmp r3, #0 <== NOT EXECUTED 132c: 11a00004 movne r0, r4 <== NOT EXECUTED 1330: 11a0e00f movne lr, pc <== NOT EXECUTED 1334: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1338: eb002bd1 bl c284 <__errno> <== NOT EXECUTED 133c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1340: e5803000 str r3, [r0] <== NOT EXECUTED 1344: e3e00000 mvn r0, #0 <== NOT EXECUTED 1348: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 134c: eb002bcc bl c284 <__errno> <== NOT EXECUTED 1350: e3a0300e mov r3, #14 <== NOT EXECUTED 1354: e5803000 str r3, [r0] <== NOT EXECUTED 1358: e3e00000 mvn r0, #0 <== NOT EXECUTED 135c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1360: eb002bc7 bl c284 <__errno> <== NOT EXECUTED 1364: e3a03005 mov r3, #5 <== NOT EXECUTED 1368: e5803000 str r3, [r0] <== NOT EXECUTED 136c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1370: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000108c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 108c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1090: e59f6120 ldr r6, [pc, #288] ; 11b8 1094: e5963000 ldr r3, [r6] 1098: e3a02012 mov r2, #18 109c: e583202c str r2, [r3, #44] ; 0x2c * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 10a0: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 10a4: eb0001b9 bl 1790 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 10a8: e59f310c ldr r3, [pc, #268] ; 11bc 10ac: e5933000 ldr r3, [r3] 10b0: e3530000 cmp r3, #0 10b4: 0a000033 beq 1188 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 10b8: e59f3100 ldr r3, [pc, #256] ; 11c0 10bc: e5930000 ldr r0, [r3] status = mount( 10c0: e890100e ldm r0, {r1, r2, r3, ip} 10c4: e28d0018 add r0, sp, #24 10c8: e58dc000 str ip, [sp] 10cc: eb0001b6 bl 17ac &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 10d0: e3700001 cmn r0, #1 10d4: 0a000033 beq 11a8 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 10d8: e59de018 ldr lr, [sp, #24] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 10dc: e5967000 ldr r7, [r6] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 10e0: e28ee01c add lr, lr, #28 10e4: e8be000f ldm lr!, {r0, r1, r2, r3} 10e8: e287c018 add ip, r7, #24 10ec: e8ac000f stmia ip!, {r0, r1, r2, r3} 10f0: e59e3000 ldr r3, [lr] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 10f4: e3a05000 mov r5, #0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10f8: e28d4004 add r4, sp, #4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 10fc: e58c3000 str r3, [ip] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1100: e1c753b0 strh r5, [r7, #48] ; 0x30 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1104: e1a03004 mov r3, r4 1108: e3a01001 mov r1, #1 110c: e1a02005 mov r2, r5 1110: e59f00ac ldr r0, [pc, #172] ; 11c4 rtems_filesystem_root = loc; 1114: e1a07004 mov r7, r4 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1118: e58d5000 str r5, [sp] 111c: eb000094 bl 1374 rtems_filesystem_root = loc; 1120: e596c000 ldr ip, [r6] 1124: e8b7000f ldm r7!, {r0, r1, r2, r3} 1128: e28cc018 add ip, ip, #24 112c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1130: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1134: e1a02005 mov r2, r5 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 1138: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 113c: e3a01001 mov r1, #1 1140: e1a03004 mov r3, r4 1144: e59f0078 ldr r0, [pc, #120] ; 11c4 1148: e58d5000 str r5, [sp] 114c: eb000088 bl 1374 rtems_filesystem_current = loc; 1150: e596c000 ldr ip, [r6] 1154: e8b4000f ldm r4!, {r0, r1, r2, r3} 1158: e28cc004 add ip, ip, #4 115c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1160: e5973000 ldr r3, [r7] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 1164: e3a01f7f mov r1, #508 ; 0x1fc /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 1168: e58c3000 str r3, [ip] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 116c: e2811003 add r1, r1, #3 1170: e59f0050 ldr r0, [pc, #80] ; 11c8 1174: eb000126 bl 1614 if ( status != 0 ) 1178: e1500005 cmp r0, r5 117c: 1a000005 bne 1198 * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 1180: e28dd01c add sp, sp, #28 1184: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 1188: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 118c: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 1190: e2800001 add r0, r0, #1 <== NOT EXECUTED 1194: eb000f13 bl 4de8 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 1198: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 119c: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 11a0: e2800003 add r0, r0, #3 <== NOT EXECUTED 11a4: eb000f0f bl 4de8 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 11a8: e3a004ab mov r0, #-1426063360 ; 0xab000000 <== NOT EXECUTED 11ac: e28008cd add r0, r0, #13434880 ; 0xcd0000 <== NOT EXECUTED 11b0: e2800002 add r0, r0, #2 <== NOT EXECUTED 11b4: eb000f0b bl 4de8 <== NOT EXECUTED 11b8: 00017ce8 .word 0x00017ce8 11bc: 0001825c .word 0x0001825c 11c0: 00017b58 .word 0x00017b58 11c4: 00018a94 .word 0x00018a94 11c8: 00018a98 .word 0x00018a98 00008f0c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8f0c: e5903000 ldr r3, [r0] <== NOT EXECUTED 8f10: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 8f14: e1530000 cmp r3, r0 <== NOT EXECUTED 8f18: 13a00000 movne r0, #0 <== NOT EXECUTED 8f1c: 03a00001 moveq r0, #1 <== NOT EXECUTED 8f20: e12fff1e bx lr <== NOT EXECUTED 000011cc : { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 11cc: e5d02000 ldrb r2, [r0] 11d0: e3510000 cmp r1, #0 11d4: 13520000 cmpne r2, #0 int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 11d8: e1a03000 mov r3, r0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 11dc: 0a00000c beq 1214 11e0: e352002f cmp r2, #47 ; 0x2f 11e4: 1352005c cmpne r2, #92 ; 0x5c 11e8: 1a000009 bne 1214 11ec: e3a00000 mov r0, #0 { pathname++; pathnamelen--; stripped++; 11f0: e2800001 add r0, r0, #1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 11f4: e7d32000 ldrb r2, [r3, r0] 11f8: e1510000 cmp r1, r0 11fc: 13520000 cmpne r2, #0 1200: 012fff1e bxeq lr 1204: e352002f cmp r2, #47 ; 0x2f 1208: 1352005c cmpne r2, #92 ; 0x5c 120c: 0afffff7 beq 11f0 1210: e12fff1e bx lr 1214: e3a00000 mov r0, #0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 1218: e12fff1e bx lr <== NOT EXECUTED 00000f40 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { f40: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED f44: e24dd018 sub sp, sp, #24 <== NOT EXECUTED f48: e1a06001 mov r6, r1 <== NOT EXECUTED f4c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); f50: eb0030bc bl d248 <== NOT EXECUTED f54: e28d4004 add r4, sp, #4 <== NOT EXECUTED f58: e1a01000 mov r1, r0 <== NOT EXECUTED f5c: e3a02000 mov r2, #0 <== NOT EXECUTED f60: e1a03004 mov r3, r4 <== NOT EXECUTED f64: e3a0c001 mov ip, #1 <== NOT EXECUTED f68: e1a00005 mov r0, r5 <== NOT EXECUTED f6c: e58dc000 str ip, [sp] <== NOT EXECUTED f70: eb0000ff bl 1374 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { f74: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED f78: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED f7c: e3530000 cmp r3, #0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); f80: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; f84: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { f88: 0a000013 beq fdc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); f8c: e1a00004 mov r0, r4 <== NOT EXECUTED f90: e1a0e00f mov lr, pc <== NOT EXECUTED f94: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { f98: e3570000 cmp r7, #0 <== NOT EXECUTED f9c: 03500002 cmpeq r0, #2 <== NOT EXECUTED fa0: 03a07000 moveq r7, #0 <== NOT EXECUTED fa4: 13a07001 movne r7, #1 <== NOT EXECUTED fa8: 0a000015 beq 1004 <_irq_stack_size+0x4> <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fac: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED fb0: e3530000 cmp r3, #0 <== NOT EXECUTED fb4: 0a000025 beq 1050 <_irq_stack_size+0x50> <== NOT EXECUTED fb8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED fbc: e3530000 cmp r3, #0 <== NOT EXECUTED fc0: 0a000022 beq 1050 <_irq_stack_size+0x50> <== NOT EXECUTED fc4: e1a00004 mov r0, r4 <== NOT EXECUTED fc8: e1a0e00f mov lr, pc <== NOT EXECUTED fcc: e12fff13 bx r3 <== NOT EXECUTED fd0: e3a0000d mov r0, #13 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } fd4: e28dd018 add sp, sp, #24 <== NOT EXECUTED fd8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); fdc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED fe0: e3530000 cmp r3, #0 <== NOT EXECUTED fe4: 11a00004 movne r0, r4 <== NOT EXECUTED fe8: 11a0e00f movne lr, pc <== NOT EXECUTED fec: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ff0: eb002ca3 bl c284 <__errno> <== NOT EXECUTED ff4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED ff8: e5803000 str r3, [r0] <== NOT EXECUTED ffc: e3e00000 mvn r0, #0 <== NOT EXECUTED 1000: eafffff3 b fd4 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1004: e5865000 str r5, [r6] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 1008: e1a00005 mov r0, r5 <== NOT EXECUTED 100c: eb00308d bl d248 <== NOT EXECUTED 1010: e5860004 str r0, [r6, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1014: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 1018: e5863008 str r3, [r6, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 101c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 1020: e5982054 ldr r2, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1024: e3530000 cmp r3, #0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 1028: e586200c str r2, [r6, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 102c: 0a000009 beq 1058 <_irq_stack_size+0x58> <== NOT EXECUTED 1030: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1034: e3530000 cmp r3, #0 <== NOT EXECUTED 1038: 0a000006 beq 1058 <_irq_stack_size+0x58> <== NOT EXECUTED 103c: e1a00004 mov r0, r4 <== NOT EXECUTED 1040: e1a0e00f mov lr, pc <== NOT EXECUTED 1044: e12fff13 bx r3 <== NOT EXECUTED 1048: e1a00007 mov r0, r7 <== NOT EXECUTED 104c: eaffffe0 b fd4 <== NOT EXECUTED 1050: e3a0000d mov r0, #13 <== NOT EXECUTED 1054: eaffffde b fd4 <== NOT EXECUTED 1058: e3a00000 mov r0, #0 <== NOT EXECUTED 105c: eaffffdc b fd4 <== NOT EXECUTED 000069a0 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 69a0: e59f3144 ldr r3, [pc, #324] ; 6aec 69a4: e593c000 ldr ip, [r3] rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 69a8: e59f3140 ldr r3, [pc, #320] ; 6af0 if ( rtems_interrupt_is_in_progress() ) 69ac: e35c0000 cmp ip, #0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 69b0: e92d4010 push {r4, lr} 69b4: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; 69b8: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) 69bc: 13a00012 movne r0, #18 69c0: 18bd8010 popne {r4, pc} return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 69c4: e3520000 cmp r2, #0 69c8: 0a00003c beq 6ac0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) 69cc: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 69d0: e5820000 str r0, [r2] if ( driver_table == NULL ) 69d4: 0a000039 beq 6ac0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 69d8: e591c000 ldr ip, [r1] 69dc: e35c0000 cmp ip, #0 69e0: 0a000033 beq 6ab4 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 69e4: e1500004 cmp r0, r4 69e8: 93a0000a movls r0, #10 69ec: 98bd8010 popls {r4, pc} rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 69f0: e59f00fc ldr r0, [pc, #252] ; 6af4 69f4: e590c000 ldr ip, [r0] 69f8: e28cc001 add ip, ip, #1 69fc: e580c000 str ip, [r0] return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 6a00: e3540000 cmp r4, #0 6a04: 1a000020 bne 6a8c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 6a08: e593e000 ldr lr, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 6a0c: e35e0000 cmp lr, #0 6a10: 0a00002c beq 6ac8 6a14: e59f30dc ldr r3, [pc, #220] ; 6af8 6a18: e593c000 ldr ip, [r3] 6a1c: e1a0300c mov r3, ip 6a20: ea000003 b 6a34 6a24: e2844001 add r4, r4, #1 6a28: e15e0004 cmp lr, r4 6a2c: e2833018 add r3, r3, #24 6a30: 9a000005 bls 6a4c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6a34: e5930000 ldr r0, [r3] 6a38: e3500000 cmp r0, #0 6a3c: 1afffff8 bne 6a24 6a40: e5930004 ldr r0, [r3, #4] 6a44: e3500000 cmp r0, #0 6a48: 1afffff5 bne 6a24 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 6a4c: e15e0004 cmp lr, r4 6a50: 10843084 addne r3, r4, r4, lsl #1 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 6a54: e5824000 str r4, [r2] if ( m != n ) 6a58: 108cc183 addne ip, ip, r3, lsl #3 6a5c: 0a00001a beq 6acc } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 6a60: e1a0e001 mov lr, r1 6a64: e8be000f ldm lr!, {r0, r1, r2, r3} 6a68: e8ac000f stmia ip!, {r0, r1, r2, r3} 6a6c: e89e0003 ldm lr, {r0, r1} 6a70: e88c0003 stm ip, {r0, r1} _Thread_Enable_dispatch(); 6a74: eb00067f bl 8478 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 6a78: e3a01000 mov r1, #0 6a7c: e1a00004 mov r0, r4 6a80: e1a02001 mov r2, r1 } 6a84: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 6a88: ea002164 b f020 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 6a8c: e59f3064 ldr r3, [pc, #100] ; 6af8 6a90: e5933000 ldr r3, [r3] 6a94: e084c084 add ip, r4, r4, lsl #1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6a98: e793018c ldr r0, [r3, ip, lsl #3] 6a9c: e3500000 cmp r0, #0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 6aa0: e083c18c add ip, r3, ip, lsl #3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6aa4: 0a00000b beq 6ad8 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 6aa8: eb000672 bl 8478 <_Thread_Enable_dispatch> 6aac: e3a0000c mov r0, #12 return RTEMS_RESOURCE_IN_USE; 6ab0: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6ab4: e591c004 ldr ip, [r1, #4] 6ab8: e35c0000 cmp ip, #0 6abc: 1affffc8 bne 69e4 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 6ac0: e3a00009 mov r0, #9 } 6ac4: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 6ac8: e5824000 str r4, [r2] <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 6acc: eb000669 bl 8478 <_Thread_Enable_dispatch> 6ad0: e3a00005 mov r0, #5 return sc; 6ad4: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 6ad8: e59c3004 ldr r3, [ip, #4] 6adc: e3530000 cmp r3, #0 6ae0: 1afffff0 bne 6aa8 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 6ae4: e5824000 str r4, [r2] 6ae8: eaffffdc b 6a60 6aec: 0001f1fc .word 0x0001f1fc 6af0: 0001f3e4 .word 0x0001f3e4 6af4: 0001f16c .word 0x0001f16c 6af8: 0001f3e8 .word 0x0001f3e8 0000144c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 144c: e92d4010 push {r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1450: e59f40b4 ldr r4, [pc, #180] ; 150c 1454: e5940000 ldr r0, [r4] 1458: e3500000 cmp r0, #0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 145c: e24dd004 sub sp, sp, #4 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1460: 0a000016 beq 14c0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1464: e3a01040 mov r1, #64 ; 0x40 1468: eb001ea5 bl 8f04 146c: e59f309c ldr r3, [pc, #156] ; 1510 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1470: e3500000 cmp r0, #0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1474: e5830000 str r0, [r3] 1478: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 147c: 0a000020 beq 1504 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1480: e5941000 ldr r1, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1484: e59f3088 ldr r3, [pc, #136] ; 1514 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1488: e3510001 cmp r1, #1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 148c: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1490: 9a000008 bls 14b8 1494: e2803040 add r3, r0, #64 ; 0x40 1498: e3a02001 mov r2, #1 iop->data1 = iop + 1; 149c: e2822001 add r2, r2, #1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 14a0: e1520001 cmp r2, r1 iop->data1 = iop + 1; 14a4: e503300c str r3, [r3, #-12] 14a8: e2833040 add r3, r3, #64 ; 0x40 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 14ac: 1afffffa bne 149c 14b0: e2422001 sub r2, r2, #1 14b4: e0802302 add r2, r0, r2, lsl #6 iop->data1 = iop + 1; iop->data1 = NULL; 14b8: e3a03000 mov r3, #0 14bc: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 14c0: e59fc050 ldr ip, [pc, #80] ; 1518 14c4: e59f0050 ldr r0, [pc, #80] ; 151c 14c8: e3a01001 mov r1, #1 14cc: e3a02054 mov r2, #84 ; 0x54 14d0: e3a03000 mov r3, #0 14d4: e58dc000 str ip, [sp] 14d8: eb000c08 bl 4500 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 14dc: e3500000 cmp r0, #0 14e0: 1a000006 bne 1500 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 14e4: e59f3034 ldr r3, [pc, #52] ; 1520 14e8: e5933000 ldr r3, [r3] 14ec: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 14f0: 11a0e00f movne lr, pc 14f4: 112fff13 bxne r3 } 14f8: e28dd004 add sp, sp, #4 14fc: e8bd8010 pop {r4, pc} RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 1500: eb000e38 bl 4de8 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1504: e280001a add r0, r0, #26 <== NOT EXECUTED 1508: eb000e36 bl 4de8 <== NOT EXECUTED 150c: 00017b50 .word 0x00017b50 1510: 00019168 .word 0x00019168 1514: 0001916c .word 0x0001916c 1518: 00019170 .word 0x00019170 151c: 4c42494f .word 0x4c42494f 1520: 00017b4c .word 0x00017b4c 00026a8c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 26a8c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 26a90: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 26a94: e24dd01c sub sp, sp, #28 rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 26a98: e1a01000 mov r1, r0 26a9c: e28d2018 add r2, sp, #24 26aa0: eb000489 bl 27ccc if (sc != RTEMS_SUCCESSFUL) return sc; 26aa4: e2505000 subs r5, r0, #0 26aa8: 1a00002d bne 26b64 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 26aac: e59f70f8 ldr r7, [pc, #248] ; 26bac 26ab0: e59f30f8 ldr r3, [pc, #248] ; 26bb0 26ab4: e5974000 ldr r4, [r7] 26ab8: e1540003 cmp r4, r3 26abc: 0a00002b beq 26b70 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 26ac0: e59f10e8 ldr r1, [pc, #232] ; 26bb0 26ac4: e3a02048 mov r2, #72 ; 0x48 26ac8: e1a00004 mov r0, r4 26acc: eb006683 bl 404e0 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 26ad0: e59f30dc ldr r3, [pc, #220] ; 26bb4 26ad4: e593e000 ldr lr, [r3] } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 26ad8: e59d3018 ldr r3, [sp, #24] 26adc: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 26ae0: e28ee01c add lr, lr, #28 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 26ae4: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 26ae8: e8be000f ldm lr!, {r0, r1, r2, r3} 26aec: e8ac000f stmia ip!, {r0, r1, r2, r3} 26af0: e59e3000 ldr r3, [lr] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 26af4: e3a05000 mov r5, #0 26af8: e28d4004 add r4, sp, #4 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 26afc: e58c3000 str r3, [ip] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 26b00: e3a01001 mov r1, #1 26b04: e1a03004 mov r3, r4 26b08: e1a02005 mov r2, r5 26b0c: e59f00a4 ldr r0, [pc, #164] ; 26bb8 rtems_filesystem_root = loc; 26b10: e1a06004 mov r6, r4 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 26b14: e58d5000 str r5, [sp] 26b18: ebff7aab bl 55cc rtems_filesystem_root = loc; 26b1c: e597c000 ldr ip, [r7] 26b20: e8b6000f ldm r6!, {r0, r1, r2, r3} 26b24: e28cc018 add ip, ip, #24 26b28: e8ac000f stmia ip!, {r0, r1, r2, r3} 26b2c: e5963000 ldr r3, [r6] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 26b30: e3a01001 mov r1, #1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 26b34: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 26b38: e1a02005 mov r2, r5 26b3c: e1a03004 mov r3, r4 26b40: e59f0070 ldr r0, [pc, #112] ; 26bb8 26b44: e58d5000 str r5, [sp] 26b48: ebff7a9f bl 55cc rtems_filesystem_current = loc; 26b4c: e597c000 ldr ip, [r7] 26b50: e8b4000f ldm r4!, {r0, r1, r2, r3} 26b54: e28cc004 add ip, ip, #4 26b58: e8ac000f stmia ip!, {r0, r1, r2, r3} 26b5c: e5963000 ldr r3, [r6] 26b60: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 26b64: e1a00005 mov r0, r5 26b68: e28dd01c add sp, sp, #28 26b6c: e8bd80f0 pop {r4, r5, r6, r7, pc} sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 26b70: e3a00048 mov r0, #72 ; 0x48 26b74: ebff7c65 bl 5d10 if (!tmp) 26b78: e2504000 subs r4, r0, #0 26b7c: 03a0501a moveq r5, #26 26b80: 0afffff7 beq 26b64 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 26b84: e1a00005 mov r0, r5 26b88: e1a01007 mov r1, r7 26b8c: e59f2028 ldr r2, [pc, #40] ; 26bbc 26b90: eb000553 bl 280e4 if (sc != RTEMS_SUCCESSFUL) { 26b94: e2505000 subs r5, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 26b98: 05874000 streq r4, [r7] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 26b9c: 0affffc7 beq 26ac0 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 26ba0: e1a00004 mov r0, r4 <== NOT EXECUTED 26ba4: ebff7abe bl 56a4 <== NOT EXECUTED return sc; 26ba8: eaffffed b 26b64 <== NOT EXECUTED 26bac: 00057858 .word 0x00057858 26bb0: 00065484 .word 0x00065484 26bb4: 0006546c .word 0x0006546c 26bb8: 000626f8 .word 0x000626f8 26bbc: 00026978 .word 0x00026978 000269dc : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 269dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 269e0: e1a05000 mov r5, r0 <== NOT EXECUTED 269e4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 269e8: e3a00000 mov r0, #0 <== NOT EXECUTED 269ec: e1a01000 mov r1, r0 <== NOT EXECUTED 269f0: e1a0200d mov r2, sp <== NOT EXECUTED 269f4: eb0004b4 bl 27ccc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 269f8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 269fc: 1a00000d bne 26a38 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 26a00: e59f4078 ldr r4, [pc, #120] ; 26a80 <== NOT EXECUTED 26a04: e5946000 ldr r6, [r4] <== NOT EXECUTED 26a08: e59d3000 ldr r3, [sp] <== NOT EXECUTED 26a0c: e5962000 ldr r2, [r6] <== NOT EXECUTED 26a10: e1520003 cmp r2, r3 <== NOT EXECUTED 26a14: 0a00000a beq 26a44 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 26a18: e1a00005 mov r0, r5 <== NOT EXECUTED 26a1c: e59f105c ldr r1, [pc, #92] ; 26a80 <== NOT EXECUTED 26a20: e28d2004 add r2, sp, #4 <== NOT EXECUTED 26a24: eb000601 bl 28230 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 26a28: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26a2c: 0a00000b beq 26a60 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 26a30: e59f204c ldr r2, [pc, #76] ; 26a84 <== NOT EXECUTED 26a34: e5842000 str r2, [r4] <== NOT EXECUTED return sc; } 26a38: e1a00003 mov r0, r3 <== NOT EXECUTED 26a3c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 26a40: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 26a44: e1a01004 mov r1, r4 <== NOT EXECUTED 26a48: eb0005d2 bl 28198 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 26a4c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26a50: 1afffff8 bne 26a38 <== NOT EXECUTED free_user_env(tmp); 26a54: e1a00006 mov r0, r6 <== NOT EXECUTED 26a58: ebffffc6 bl 26978 <== NOT EXECUTED 26a5c: eaffffed b 26a18 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 26a60: e59f1018 ldr r1, [pc, #24] ; 26a80 <== NOT EXECUTED 26a64: e59f201c ldr r2, [pc, #28] ; 26a88 <== NOT EXECUTED 26a68: eb00059d bl 280e4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 26a6c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 26a70: 1affffee bne 26a30 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 26a74: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 26a78: e5842000 str r2, [r4] <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 26a7c: eaffffed b 26a38 <== NOT EXECUTED 26a80: 00057858 .word 0x00057858 26a84: 00065484 .word 0x00065484 26a88: 00026978 .word 0x00026978 00005e0c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5e0c: e92d4800 push {fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5e10: e59f3040 ldr r3, [pc, #64] ; 5e58 <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5e14: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 5e18: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5e1c: e1a0200d mov r2, sp <== NOT EXECUTED 5e20: e5930000 ldr r0, [r3] <== NOT EXECUTED 5e24: eb0016df bl b9a8 <_Protected_heap_Get_block_size> <== NOT EXECUTED 5e28: e3500000 cmp r0, #0 <== NOT EXECUTED 5e2c: 0a000007 beq 5e50 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 5e30: e59f3024 ldr r3, [pc, #36] ; 5e5c <== NOT EXECUTED 5e34: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5e38: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 5e3c: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5e40: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 5e44: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5e48: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 5e4c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 5e50: e28dd004 add sp, sp, #4 <== NOT EXECUTED 5e54: e8bd8800 pop {fp, pc} <== NOT EXECUTED 5e58: 0005758c .word 0x0005758c 5e5c: 00065440 .word 0x00065440 00005e60 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5e60: e92d4810 push {r4, fp, lr} <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 5e64: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5e68: e24dd004 sub sp, sp, #4 <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 5e6c: 0a000013 beq 5ec0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 5e70: e28d2004 add r2, sp, #4 <== NOT EXECUTED 5e74: e3a03000 mov r3, #0 <== NOT EXECUTED 5e78: e5223004 str r3, [r2, #-4]! <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 5e7c: e59f3044 ldr r3, [pc, #68] ; 5ec8 <== NOT EXECUTED 5e80: e1a0200d mov r2, sp <== NOT EXECUTED 5e84: e5930000 ldr r0, [r3] <== NOT EXECUTED 5e88: eb0016c6 bl b9a8 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 5e8c: e59f3038 ldr r3, [pc, #56] ; 5ecc <== NOT EXECUTED 5e90: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5e94: e283c01c add ip, r3, #28 <== NOT EXECUTED 5e98: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 5e9c: e5930024 ldr r0, [r3, #36] ; 0x24 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 5ea0: e09b1004 adds r1, fp, r4 <== NOT EXECUTED 5ea4: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 5ea8: e593c018 ldr ip, [r3, #24] <== NOT EXECUTED _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 5eac: e0600001 rsb r0, r0, r1 <== NOT EXECUTED if (current_depth > s->max_depth) 5eb0: e150000c cmp r0, ip <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 5eb4: e583101c str r1, [r3, #28] <== NOT EXECUTED 5eb8: e5832020 str r2, [r3, #32] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) s->max_depth = current_depth; 5ebc: 85830018 strhi r0, [r3, #24] <== NOT EXECUTED } 5ec0: e28dd004 add sp, sp, #4 <== NOT EXECUTED 5ec4: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 5ec8: 0005758c .word 0x0005758c 5ecc: 00065440 .word 0x00065440 00005ed0 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 5ed0: e59f1038 ldr r1, [pc, #56] ; 5f10 <== NOT EXECUTED 5ed4: e3a02000 mov r2, #0 <== NOT EXECUTED 5ed8: e1a03001 mov r3, r1 <== NOT EXECUTED 5edc: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5ee0: e2833004 add r3, r3, #4 <== NOT EXECUTED 5ee4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5ee8: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5eec: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5ef0: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5ef4: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5ef8: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5efc: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5f00: e4832004 str r2, [r3], #4 <== NOT EXECUTED 5f04: e5812004 str r2, [r1, #4] <== NOT EXECUTED 5f08: e5832000 str r2, [r3] <== NOT EXECUTED } 5f0c: e12fff1e bx lr <== NOT EXECUTED 5f10: 00065440 .word 0x00065440 000065c4 : void rtems_panic( const char *printf_format, ... ) { 65c4: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 65c8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 65cc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 65d0: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 65d4: e1a02003 mov r2, r3 <== NOT EXECUTED 65d8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 65dc: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 65e0: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 65e4: ebffff8d bl 6420 <== NOT EXECUTED va_end(arglist); } 65e8: e28dd004 add sp, sp, #4 <== NOT EXECUTED 65ec: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED 65f0: e28dd010 add sp, sp, #16 <== NOT EXECUTED 65f4: e12fff1e bx lr <== NOT EXECUTED 0000a95c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { a95c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if (!rtems_pipe_configured) a960: e59f3054 ldr r3, [pc, #84] ; a9bc a964: e5d33000 ldrb r3, [r3] a968: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { a96c: e24dd004 sub sp, sp, #4 if (!rtems_pipe_configured) a970: 0a000003 beq a984 return; if (rtems_pipe_semaphore) a974: e59fc044 ldr ip, [pc, #68] ; a9c0 <== NOT EXECUTED a978: e59c3000 ldr r3, [ip] <== NOT EXECUTED a97c: e3530000 cmp r3, #0 <== NOT EXECUTED a980: 0a000001 beq a98c <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } a984: e28dd004 add sp, sp, #4 a988: e8bd8000 pop {pc} if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( a98c: e59f0030 ldr r0, [pc, #48] ; a9c4 <== NOT EXECUTED a990: e3a01001 mov r1, #1 <== NOT EXECUTED a994: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED a998: e58dc000 str ip, [sp] <== NOT EXECUTED a99c: ebffe6d7 bl 4500 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) a9a0: e3500000 cmp r0, #0 <== NOT EXECUTED a9a4: 1a000003 bne a9b8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); a9a8: ebffe5c7 bl 40cc <== NOT EXECUTED rtems_pipe_no = now; a9ac: e59f3014 ldr r3, [pc, #20] ; a9c8 <== NOT EXECUTED a9b0: e1c300b0 strh r0, [r3] <== NOT EXECUTED a9b4: eafffff2 b a984 <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); a9b8: ebffe90a bl 4de8 <== NOT EXECUTED a9bc: 00018fc4 .word 0x00018fc4 a9c0: 000190e4 .word 0x000190e4 a9c4: 50495045 .word 0x50495045 a9c8: 000190ea .word 0x000190ea 00003c50 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 3c50: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 3c54: e59f4078 ldr r4, [pc, #120] ; 3cd4 3c58: e5943000 ldr r3, [r4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3c5c: e59300c4 ldr r0, [r3, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 3c60: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3c64: e15b0000 cmp fp, r0 3c68: 33a05000 movcc r5, #0 3c6c: 3a000004 bcc 3c84 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 3c70: e59350c0 ldr r5, [r3, #192] ; 0xc0 3c74: e0805005 add r5, r0, r5 3c78: e15b0005 cmp fp, r5 3c7c: 83a05000 movhi r5, #0 3c80: 93a05001 movls r5, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3c84: e59f304c ldr r3, [pc, #76] ; 3cd8 3c88: e5933000 ldr r3, [r3] 3c8c: e3530000 cmp r3, #0 3c90: 03a01001 moveq r1, #1 3c94: 0a000005 beq 3cb0 pattern_ok = (!memcmp( 3c98: e59f103c ldr r1, [pc, #60] ; 3cdc 3c9c: e2800008 add r0, r0, #8 3ca0: e3a02010 mov r2, #16 3ca4: eb00f1e3 bl 40438 3ca8: e2701001 rsbs r1, r0, #1 3cac: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3cb0: e3550000 cmp r5, #0 3cb4: 0a000002 beq 3cc4 3cb8: e3510000 cmp r1, #0 3cbc: 13a00000 movne r0, #0 3cc0: 18bd8830 popne {r4, r5, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3cc4: e5940000 ldr r0, [r4] <== NOT EXECUTED 3cc8: ebffffb3 bl 3b9c <== NOT EXECUTED 3ccc: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3cd0: e8bd8830 pop {r4, r5, fp, pc} <== NOT EXECUTED 3cd4: 00065660 .word 0x00065660 3cd8: 00062934 .word 0x00062934 3cdc: 00065410 .word 0x00065410 00003b8c : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 3b8c: e59f1004 ldr r1, [pc, #4] ; 3b98 <== NOT EXECUTED 3b90: e3a00000 mov r0, #0 <== NOT EXECUTED 3b94: eaffffe3 b 3b28 <== NOT EXECUTED 3b98: 000068f0 .word 0x000068f0 00003b28 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 3b28: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 3b2c: e59f4048 ldr r4, [pc, #72] ; 3b7c <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 3b30: e1a05001 mov r5, r1 <== NOT EXECUTED 3b34: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 3b38: e5841004 str r1, [r4, #4] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 3b3c: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 3b40: e59f1038 ldr r1, [pc, #56] ; 3b80 <== NOT EXECUTED 3b44: e1a0e00f mov lr, pc <== NOT EXECUTED 3b48: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 3b4c: e59f1030 ldr r1, [pc, #48] ; 3b84 <== NOT EXECUTED 3b50: e1a00006 mov r0, r6 <== NOT EXECUTED 3b54: e1a0e00f mov lr, pc <== NOT EXECUTED 3b58: e12fff15 bx r5 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 3b5c: e59f0024 ldr r0, [pc, #36] ; 3b88 <== NOT EXECUTED 3b60: eb001d57 bl b0c4 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 3b64: e3e00000 mvn r0, #0 <== NOT EXECUTED 3b68: ebffff9d bl 39e4 <== NOT EXECUTED print_context = NULL; 3b6c: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 3b70: e5843004 str r3, [r4, #4] <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 3b74: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 3b78: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3b7c: 00062934 .word 0x00062934 3b80: 0005bd18 .word 0x0005bd18 3b84: 0005bd30 .word 0x0005bd30 3b88: 000039e4 .word 0x000039e4 00003ce0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 3ce0: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 3ce4: e59030c4 ldr r3, [r0, #196] ; 0xc4 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 3ce8: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3cec: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 3cf0: e1a04000 mov r4, r0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 3cf4: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3cf8: 3a000003 bcc 3d0c void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 3cfc: e59420c0 ldr r2, [r4, #192] ; 0xc0 3d00: e0833002 add r3, r3, r2 3d04: e15b0003 cmp fp, r3 3d08: 9a000007 bls 3d2c /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 3d0c: e59f1034 ldr r1, [pc, #52] ; 3d48 <== NOT EXECUTED 3d10: e3a02010 mov r2, #16 <== NOT EXECUTED 3d14: eb00f1c7 bl 40438 <== NOT EXECUTED 3d18: e2701001 rsbs r1, r0, #1 <== NOT EXECUTED 3d1c: 33a01000 movcc r1, #0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 3d20: e1a00004 mov r0, r4 } } 3d24: e8bd4810 pop {r4, fp, lr} pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 3d28: eaffff9b b 3b9c /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 3d2c: e59f1014 ldr r1, [pc, #20] ; 3d48 3d30: e3a02010 mov r2, #16 3d34: eb00f1bf bl 40438 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 3d38: e3500000 cmp r0, #0 3d3c: 13a01000 movne r1, #0 3d40: 1afffff6 bne 3d20 3d44: e8bd8810 pop {r4, fp, pc} 3d48: 00065410 .word 0x00065410 0000ad60 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ad60: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ad64: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ad68: e1a07000 mov r7, r0 <== NOT EXECUTED ad6c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED ad70: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ad74: 03a00009 moveq r0, #9 <== NOT EXECUTED ad78: 0a00001a beq ade8 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; ad7c: eb0008cf bl d0c0 <__errno> <== NOT EXECUTED ad80: e3a03000 mov r3, #0 <== NOT EXECUTED ad84: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; ad88: e3a02000 mov r2, #0 <== NOT EXECUTED ad8c: e3a03000 mov r3, #0 <== NOT EXECUTED ad90: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ad94: e1a00007 mov r0, r7 <== NOT EXECUTED ad98: e1a0100d mov r1, sp <== NOT EXECUTED ad9c: eb00143e bl fe9c <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ada0: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; ada4: 159d3000 ldrne r3, [sp] <== NOT EXECUTED ada8: 059d3000 ldreq r3, [sp] <== NOT EXECUTED adac: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) adb0: e1530007 cmp r3, r7 <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); adb4: e1a05000 mov r5, r0 <== NOT EXECUTED adb8: e1a06001 mov r6, r1 <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) adbc: 03a0000b moveq r0, #11 <== NOT EXECUTED adc0: 0a000008 beq ade8 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) adc4: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED adc8: e1a00005 mov r0, r5 <== NOT EXECUTED adcc: e2422601 sub r2, r2, #1048576 ; 0x100000 <== NOT EXECUTED add0: e3e03000 mvn r3, #0 <== NOT EXECUTED add4: ebffe036 bl 2eb4 <__gedf2> <== NOT EXECUTED add8: e3500000 cmp r0, #0 <== NOT EXECUTED addc: ca000003 bgt adf0 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; ade0: e8840060 stm r4, {r5, r6} <== NOT EXECUTED ade4: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } ade8: e28dd004 add sp, sp, #4 <== NOT EXECUTED adec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) adf0: eb0008b2 bl d0c0 <__errno> <== NOT EXECUTED adf4: e5903000 ldr r3, [r0] <== NOT EXECUTED adf8: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED adfc: 03a0000a moveq r0, #10 <== NOT EXECUTED ae00: 1afffff6 bne ade0 <== NOT EXECUTED ae04: eafffff7 b ade8 <== NOT EXECUTED 0000ae08 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ae08: e92d40f0 push {r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ae0c: e2515000 subs r5, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ae10: e1a04000 mov r4, r0 ae14: e24dd004 sub sp, sp, #4 ae18: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ae1c: 03a00009 moveq r0, #9 ae20: 0a000017 beq ae84 return RTEMS_INVALID_ADDRESS; errno = 0; ae24: eb0008a5 bl d0c0 <__errno> ae28: e3a03000 mov r3, #0 ae2c: e5803000 str r3, [r0] *n = 0; ae30: e3a03000 mov r3, #0 ae34: e5853000 str r3, [r5] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ae38: e1a00004 mov r0, r4 ae3c: e1a0100d mov r1, sp ae40: eb001402 bl fe50 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ae44: e3560000 cmp r6, #0 *endptr = end; ae48: 159d3000 ldrne r3, [sp] ae4c: 059d3000 ldreq r3, [sp] ae50: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) ae54: e1530004 cmp r3, r4 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ae58: e1a07000 mov r7, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ae5c: 03a0000b moveq r0, #11 ae60: 0a000007 beq ae84 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ae64: e3e01102 mvn r1, #-2147483648 ; 0x80000000 ae68: e1a00007 mov r0, r7 ae6c: e2411502 sub r1, r1, #8388608 ; 0x800000 ae70: ebffe05a bl 2fe0 <__gesf2> ae74: e3500000 cmp r0, #0 ae78: ca000003 bgt ae8c /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; ae7c: e5857000 str r7, [r5] ae80: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } ae84: e28dd004 add sp, sp, #4 ae88: e8bd80f0 pop {r4, r5, r6, r7, pc} return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ae8c: eb00088b bl d0c0 <__errno> <== NOT EXECUTED ae90: e5903000 ldr r3, [r0] <== NOT EXECUTED ae94: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED ae98: 03a0000a moveq r0, #10 <== NOT EXECUTED ae9c: 1afffff6 bne ae7c <== NOT EXECUTED aea0: eafffff7 b ae84 <== NOT EXECUTED 0001c764 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1c764: e92d40f0 push {r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1c768: e2515000 subs r5, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1c76c: e1a04000 mov r4, r0 1c770: e24dd004 sub sp, sp, #4 1c774: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1c778: 03a00009 moveq r0, #9 1c77c: 0a000013 beq 1c7d0 return RTEMS_INVALID_ADDRESS; errno = 0; 1c780: eb008325 bl 3d41c <__errno> 1c784: e3a03000 mov r3, #0 1c788: e5803000 str r3, [r0] *n = 0; 1c78c: e5853000 str r3, [r5] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 1c790: e1a00004 mov r0, r4 1c794: e1a0100d mov r1, sp 1c798: e3a02010 mov r2, #16 1c79c: eb00a2b4 bl 45274 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1c7a0: e3560000 cmp r6, #0 *endptr = end; 1c7a4: 159d3000 ldrne r3, [sp] 1c7a8: 059d3000 ldreq r3, [sp] 1c7ac: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 1c7b0: e1530004 cmp r3, r4 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 1c7b4: e1a07000 mov r7, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 1c7b8: 03a0000b moveq r0, #11 1c7bc: 0a000003 beq 1c7d0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1c7c0: e3770001 cmn r7, #1 1c7c4: 0a000003 beq 1c7d8 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 1c7c8: e5857000 str r7, [r5] 1c7cc: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 1c7d0: e28dd004 add sp, sp, #4 1c7d4: e8bd80f0 pop {r4, r5, r6, r7, pc} return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1c7d8: eb00830f bl 3d41c <__errno> <== NOT EXECUTED 1c7dc: e5903000 ldr r3, [r0] <== NOT EXECUTED 1c7e0: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 1c7e4: 03a0000a moveq r0, #10 <== NOT EXECUTED 1c7e8: 1afffff6 bne 1c7c8 <== NOT EXECUTED 1c7ec: eafffff7 b 1c7d0 <== NOT EXECUTED 00003614 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3614: e3500009 cmp r0, #9 3618: 012fff1e bxeq lr 361c: da000013 ble 3670 3620: e350000e cmp r0, #14 <== NOT EXECUTED 3624: 012fff1e bxeq lr <== NOT EXECUTED 3628: da00001b ble 369c <== NOT EXECUTED 362c: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3630: e2833002 add r3, r3, #2 <== NOT EXECUTED 3634: e1500003 cmp r0, r3 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 3638: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 363c: 012fff1e bxeq lr <== NOT EXECUTED 3640: da000028 ble 36e8 <== NOT EXECUTED 3644: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 3648: e2833003 add r3, r3, #3 <== NOT EXECUTED 364c: e1500003 cmp r0, r3 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 3650: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3654: 012fff1e bxeq lr <== NOT EXECUTED 3658: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 365c: e2833004 add r3, r3, #4 <== NOT EXECUTED 3660: e1500003 cmp r0, r3 <== NOT EXECUTED 3664: 1a00001d bne 36e0 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 3668: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 366c: e12fff1e bx lr <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3670: e3500004 cmp r0, #4 3674: 012fff1e bxeq lr 3678: ca000010 bgt 36c0 367c: e3500001 cmp r0, #1 3680: 012fff1e bxeq lr 3684: da00001f ble 3708 3688: e3500002 cmp r0, #2 <== NOT EXECUTED 368c: 012fff1e bxeq lr <== NOT EXECUTED 3690: e3500003 cmp r0, #3 <== NOT EXECUTED 3694: 1a000011 bne 36e0 <== NOT EXECUTED 3698: e12fff1e bx lr <== NOT EXECUTED 369c: e350000b cmp r0, #11 <== NOT EXECUTED 36a0: 012fff1e bxeq lr <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 36a4: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 36a8: b12fff1e bxlt lr <== NOT EXECUTED 36ac: e350000c cmp r0, #12 <== NOT EXECUTED 36b0: 012fff1e bxeq lr <== NOT EXECUTED 36b4: e350000d cmp r0, #13 <== NOT EXECUTED 36b8: 1a000008 bne 36e0 <== NOT EXECUTED 36bc: e12fff1e bx lr <== NOT EXECUTED 36c0: e3500006 cmp r0, #6 <== NOT EXECUTED 36c4: 012fff1e bxeq lr <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 36c8: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 36cc: b12fff1e bxlt lr <== NOT EXECUTED 36d0: e3500007 cmp r0, #7 <== NOT EXECUTED 36d4: 012fff1e bxeq lr <== NOT EXECUTED 36d8: e3500008 cmp r0, #8 <== NOT EXECUTED 36dc: 012fff1e bxeq lr <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 36e0: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 36e4: e12fff1e bx lr rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 36e8: e350000f cmp r0, #15 <== NOT EXECUTED 36ec: 012fff1e bxeq lr <== NOT EXECUTED 36f0: e3a03a01 mov r3, #4096 ; 0x1000 <== NOT EXECUTED 36f4: e2833001 add r3, r3, #1 <== NOT EXECUTED 36f8: e1500003 cmp r0, r3 <== NOT EXECUTED 36fc: 1afffff7 bne 36e0 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 3700: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 3704: e12fff1e bx lr <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3708: e3500000 cmp r0, #0 370c: 012fff1e bxeq lr 3710: eafffff2 b 36e0 00002038 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 2038: e59f3008 ldr r3, [pc, #8] ; 2048 <== NOT EXECUTED 203c: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 2040: e3a00000 mov r0, #0 <== NOT EXECUTED 2044: e12fff1e bx lr <== NOT EXECUTED 2048: 00017cd4 .word 0x00017cd4 000035e8 : } } rtems_status_code rtems_termios_close (void *arg) { 35e8: e92d4070 push {r4, r5, r6, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35ec: e59f51b0 ldr r5, [pc, #432] ; 37a4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 35f0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35f4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 35f8: e1a06000 mov r6, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 35fc: e1a02001 mov r2, r1 3600: e5950000 ldr r0, [r5] rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3604: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3608: eb000457 bl 476c if (sc != RTEMS_SUCCESSFUL) 360c: e3500000 cmp r0, #0 3610: 1a00005f bne 3794 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3614: e5943008 ldr r3, [r4, #8] 3618: e2433001 sub r3, r3, #1 361c: e3530000 cmp r3, #0 3620: e5843008 str r3, [r4, #8] 3624: 1a00002f bne 36e8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3628: e59420cc ldr r2, [r4, #204] ; 0xcc 362c: e59f3174 ldr r3, [pc, #372] ; 37a8 3630: e0833282 add r3, r3, r2, lsl #5 3634: e5931004 ldr r1, [r3, #4] 3638: e3510000 cmp r1, #0 363c: 0a000040 beq 3744 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3640: e1a00004 mov r0, r4 <== NOT EXECUTED 3644: e1a0e00f mov lr, pc <== NOT EXECUTED 3648: e12fff11 bx r1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 364c: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3650: e3530002 cmp r3, #2 <== NOT EXECUTED 3654: 0a000044 beq 376c <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 3658: e594309c ldr r3, [r4, #156] ; 0x9c 365c: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3660: 11a02006 movne r2, r6 3664: 1284000c addne r0, r4, #12 3668: 18900003 ldmne r0, {r0, r1} 366c: 11a0e00f movne lr, pc 3670: 112fff13 bxne r3 if (tty->forw == NULL) { 3674: e5943000 ldr r3, [r4] 3678: e3530000 cmp r3, #0 367c: 0a000020 beq 3704 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3680: e5942004 ldr r2, [r4, #4] 3684: e5832004 str r2, [r3, #4] } if (tty->back == NULL) { 3688: e5942004 ldr r2, [r4, #4] 368c: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3690: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3694: 0a000025 beq 3730 } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 3698: e5940014 ldr r0, [r4, #20] 369c: eb000409 bl 46c8 rtems_semaphore_delete (tty->osem); 36a0: e5940018 ldr r0, [r4, #24] 36a4: eb000407 bl 46c8 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 36a8: e594008c ldr r0, [r4, #140] ; 0x8c 36ac: eb000405 bl 46c8 if ((tty->device.pollRead == NULL) || 36b0: e59430a0 ldr r3, [r4, #160] ; 0xa0 36b4: e3530000 cmp r3, #0 36b8: 0a00000e beq 36f8 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 36bc: e59430b4 ldr r3, [r4, #180] ; 0xb4 36c0: e3530002 cmp r3, #2 36c4: 0a00000b beq 36f8 rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 36c8: e5940058 ldr r0, [r4, #88] ; 0x58 36cc: eb001647 bl 8ff0 free (tty->rawOutBuf.theBuf); 36d0: e594007c ldr r0, [r4, #124] ; 0x7c 36d4: eb001645 bl 8ff0 free (tty->cbuf); 36d8: e594001c ldr r0, [r4, #28] 36dc: eb001643 bl 8ff0 free (tty); 36e0: e1a00004 mov r0, r4 36e4: eb001641 bl 8ff0 } rtems_semaphore_release (rtems_termios_ttyMutex); 36e8: e5950000 ldr r0, [r5] 36ec: eb000466 bl 488c return RTEMS_SUCCESSFUL; } 36f0: e3a00000 mov r0, #0 36f4: e8bd8070 pop {r4, r5, r6, pc} rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 36f8: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 36fc: eb0003f1 bl 46c8 <== NOT EXECUTED 3700: eafffff0 b 36c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 3704: e5942004 ldr r2, [r4, #4] 3708: e59f109c ldr r1, [pc, #156] ; 37ac if ( rtems_termios_ttyTail != NULL ) { 370c: e3520000 cmp r2, #0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 3710: e5812000 str r2, [r1] if ( rtems_termios_ttyTail != NULL ) { 3714: 0a00001f beq 3798 rtems_termios_ttyTail->forw = NULL; 3718: e5823000 str r3, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 371c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3720: e5943000 ldr r3, [r4] <== NOT EXECUTED 3724: e3520000 cmp r2, #0 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3728: 15823000 strne r3, [r2] <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 372c: 1affffd9 bne 3698 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 3730: e59f1078 ldr r1, [pc, #120] ; 37b0 if ( rtems_termios_ttyHead != NULL ) { 3734: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3738: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 373c: 15832004 strne r2, [r3, #4] 3740: eaffffd4 b 3698 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3744: e5940018 ldr r0, [r4, #24] 3748: e1a02001 mov r2, r1 374c: eb000406 bl 476c if (sc != RTEMS_SUCCESSFUL) { 3750: e3500000 cmp r0, #0 3754: 1a00000e bne 3794 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3758: e1a00004 mov r0, r4 375c: ebfffda4 bl 2df4 } if (tty->device.outputUsesInterrupts 3760: e59430b4 ldr r3, [r4, #180] ; 0xb4 3764: e3530002 cmp r3, #2 3768: 1affffba bne 3658 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 376c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3770: e3a01001 mov r1, #1 <== NOT EXECUTED 3774: eb0002d2 bl 42c4 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3778: e3500000 cmp r0, #0 <== NOT EXECUTED 377c: 1a000004 bne 3794 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3780: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3784: e3a01001 mov r1, #1 <== NOT EXECUTED 3788: eb0002cd bl 42c4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 378c: e3500000 cmp r0, #0 <== NOT EXECUTED 3790: 0affffb0 beq 3658 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3794: eb000593 bl 4de8 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3798: e59f3010 ldr r3, [pc, #16] ; 37b0 379c: e5832000 str r2, [r3] 37a0: eaffffbc b 3698 37a4: 000191ac .word 0x000191ac 37a8: 00018fd8 .word 0x00018fd8 37ac: 000191b0 .word 0x000191b0 37b0: 000191b4 .word 0x000191b4 00002268 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2268: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 226c: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2270: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2274: e3520002 cmp r2, #2 <== NOT EXECUTED * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2278: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 227c: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2280: 0a00000b beq 22b4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 2284: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 2288: e3530005 cmp r3, #5 <== NOT EXECUTED 228c: 0a000001 beq 2298 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2290: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 2294: eaffff6f b 2058 <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2298: e59f302c ldr r3, [pc, #44] ; 22cc <== NOT EXECUTED 229c: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 22a0: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 22a4: 11a0e00f movne lr, pc <== NOT EXECUTED 22a8: 112fff13 bxne r3 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 22ac: e3a00000 mov r0, #0 <== NOT EXECUTED 22b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 22b4: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 22b8: e1a01002 mov r1, r2 <== NOT EXECUTED 22bc: eb000800 bl 42c4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 22c0: e3500000 cmp r0, #0 <== NOT EXECUTED 22c4: 0afffff8 beq 22ac <== NOT EXECUTED rtems_fatal_error_occurred (sc); 22c8: eb000ac6 bl 4de8 <== NOT EXECUTED 22cc: 00018fd8 .word 0x00018fd8 000022d0 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 22d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 22d4: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 22d8: e59f82f0 ldr r8, [pc, #752] ; 25d0 <== NOT EXECUTED 22dc: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 22e0: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED 22e4: e3560000 cmp r6, #0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 22e8: e24dd00c sub sp, sp, #12 <== NOT EXECUTED 22ec: e1a04000 mov r4, r0 <== NOT EXECUTED 22f0: e1a05001 mov r5, r1 <== NOT EXECUTED 22f4: e1a07002 mov r7, r2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 22f8: 0a00001e beq 2378 <== NOT EXECUTED while (len--) { 22fc: e3520000 cmp r2, #0 <== NOT EXECUTED 2300: 0a00000b beq 2334 <== NOT EXECUTED 2304: e3a0a000 mov sl, #0 <== NOT EXECUTED 2308: ea000002 b 2318 <== NOT EXECUTED 230c: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2310: e0883283 add r3, r8, r3, lsl #5 <== NOT EXECUTED 2314: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2318: e7d5000a ldrb r0, [r5, sl] <== NOT EXECUTED 231c: e1a01004 mov r1, r4 <== NOT EXECUTED 2320: e28aa001 add sl, sl, #1 <== NOT EXECUTED 2324: e1a0e00f mov lr, pc <== NOT EXECUTED 2328: e12fff16 bx r6 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 232c: e157000a cmp r7, sl <== NOT EXECUTED 2330: 1afffff5 bne 230c <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2334: e59490e4 ldr r9, [r4, #228] ; 0xe4 <== NOT EXECUTED 2338: e3590000 cmp r9, #0 <== NOT EXECUTED 233c: 1a00000b bne 2370 <== NOT EXECUTED 2340: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2344: e3530000 cmp r3, #0 <== NOT EXECUTED 2348: 0a000008 beq 2370 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 234c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2350: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2354: e1a0e00f mov lr, pc <== NOT EXECUTED 2358: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 235c: e3a03001 mov r3, #1 <== NOT EXECUTED 2360: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 2364: e1a00009 mov r0, r9 <== NOT EXECUTED 2368: e28dd00c add sp, sp, #12 <== NOT EXECUTED 236c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2370: e3a09000 mov r9, #0 <== NOT EXECUTED 2374: eafffffa b 2364 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 2378: e280304a add r3, r0, #74 ; 0x4a <== NOT EXECUTED 237c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2380: e2803030 add r3, r0, #48 ; 0x30 <== NOT EXECUTED 2384: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2388: e1a0b006 mov fp, r6 <== NOT EXECUTED 238c: e58d6000 str r6, [sp] <== NOT EXECUTED 2390: ea000036 b 2470 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2394: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2398: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 239c: e2800001 add r0, r0, #1 <== NOT EXECUTED 23a0: eb004d6e bl 15960 <__umodsi3> <== NOT EXECUTED 23a4: e1a08000 mov r8, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 23a8: e10f9000 mrs r9, CPSR <== NOT EXECUTED 23ac: e3893080 orr r3, r9, #128 ; 0x80 <== NOT EXECUTED 23b0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 23b4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 23b8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 23bc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 23c0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 23c4: e0800008 add r0, r0, r8 <== NOT EXECUTED 23c8: eb004d64 bl 15960 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 23cc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 23d0: e1500003 cmp r0, r3 <== NOT EXECUTED 23d4: 9a000010 bls 241c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 23d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 23dc: e3130001 tst r3, #1 <== NOT EXECUTED 23e0: 1a00000d bne 241c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 23e4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 23e8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 23ec: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 23f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 23f4: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 23f8: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 23fc: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2400: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 2404: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2408: 0a000057 beq 256c <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 240c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2410: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2414: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2418: 0a000062 beq 25a8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 241c: e129f009 msr CPSR_fc, r9 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2420: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2424: e1530008 cmp r3, r8 <== NOT EXECUTED 2428: 0a00002d beq 24e4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 242c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2430: e7c3a008 strb sl, [r3, r8] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2434: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2438: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 243c: e5848060 str r8, [r4, #96] ; 0x60 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2440: 1a000008 bne 2468 <== NOT EXECUTED 2444: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2448: e3530000 cmp r3, #0 <== NOT EXECUTED 244c: 0a000005 beq 2468 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2450: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2454: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2458: e1a0e00f mov lr, pc <== NOT EXECUTED 245c: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2460: e3a03001 mov r3, #1 <== NOT EXECUTED 2464: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2468: e2866001 add r6, r6, #1 <== NOT EXECUTED 246c: e2477001 sub r7, r7, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2470: e3570000 cmp r7, #0 <== NOT EXECUTED 2474: 0a00002d beq 2530 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2478: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 247c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2480: e7d5a006 ldrb sl, [r5, r6] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 2484: 0a000005 beq 24a0 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 2488: e5d4304a ldrb r3, [r4, #74] ; 0x4a <== NOT EXECUTED 248c: e153000a cmp r3, sl <== NOT EXECUTED 2490: 0a000017 beq 24f4 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2494: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 2498: e153000a cmp r3, sl <== NOT EXECUTED 249c: 0a00001e beq 251c <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 24a0: e35b0000 cmp fp, #0 <== NOT EXECUTED 24a4: 0affffba beq 2394 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 24a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24ac: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 24b0: e3530020 cmp r3, #32 <== NOT EXECUTED 24b4: 1affffeb bne 2468 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 24b8: e10f8000 mrs r8, CPSR <== NOT EXECUTED 24bc: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 24c0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 24c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 24c8: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 24cc: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 24d0: e3520000 cmp r2, #0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 24d4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 24d8: 1a00001b bne 254c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 24dc: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED 24e0: eaffffe0 b 2468 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 24e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 24e8: e2833001 add r3, r3, #1 <== NOT EXECUTED 24ec: e58d3000 str r3, [sp] <== NOT EXECUTED 24f0: eaffffdc b 2468 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 24f4: e5d42049 ldrb r2, [r4, #73] ; 0x49 <== NOT EXECUTED 24f8: e1520003 cmp r2, r3 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 24fc: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2500: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 2504: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2508: 13833010 orrne r3, r3, #16 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 250c: 058430b8 streq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2510: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2514: e3a0b001 mov fp, #1 <== NOT EXECUTED 2518: eaffffe2 b 24a8 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 251c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2520: e3c33010 bic r3, r3, #16 <== NOT EXECUTED 2524: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2528: e3a0b001 mov fp, #1 <== NOT EXECUTED 252c: eaffffdd b 24a8 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2530: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2534: e59d9000 ldr r9, [sp] <== NOT EXECUTED 2538: e0833009 add r3, r3, r9 <== NOT EXECUTED 253c: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2540: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2544: eb0008d0 bl 488c <== NOT EXECUTED return dropped; 2548: eaffff85 b 2364 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 254c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2550: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2554: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2558: e0811003 add r1, r1, r3 <== NOT EXECUTED 255c: e3a02001 mov r2, #1 <== NOT EXECUTED 2560: e1a0e00f mov lr, pc <== NOT EXECUTED 2564: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2568: eaffffdb b 24dc <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 256c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2570: e3130020 tst r3, #32 <== NOT EXECUTED 2574: 1a000002 bne 2584 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2578: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 257c: e3530000 cmp r3, #0 <== NOT EXECUTED 2580: 1affffa5 bne 241c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2584: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2588: e3833002 orr r3, r3, #2 <== NOT EXECUTED 258c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2590: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2594: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2598: e3a02001 mov r2, #1 <== NOT EXECUTED 259c: e1a0e00f mov lr, pc <== NOT EXECUTED 25a0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 25a4: eaffff9c b 241c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 25a8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 25ac: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 25b0: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 25b4: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 25b8: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 25bc: 0affff96 beq 241c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 25c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 25c4: e1a0e00f mov lr, pc <== NOT EXECUTED 25c8: e12fff13 bx r3 <== NOT EXECUTED 25cc: eaffff92 b 241c <== NOT EXECUTED 25d0: 00018fd8 .word 0x00018fd8 00001ff0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 1ff0: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 1ff4: e59fc034 ldr ip, [pc, #52] ; 2030 1ff8: e59c3000 ldr r3, [ip] 1ffc: e3530000 cmp r3, #0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2000: e24dd004 sub sp, sp, #4 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2004: 0a000001 beq 2010 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 2008: e28dd004 add sp, sp, #4 200c: e8bd8000 pop {pc} /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 2010: e59f001c ldr r0, [pc, #28] ; 2034 2014: e3a01001 mov r1, #1 2018: e3a02054 mov r2, #84 ; 0x54 201c: e58dc000 str ip, [sp] 2020: eb000936 bl 4500 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 2024: e3500000 cmp r0, #0 2028: 0afffff6 beq 2008 rtems_fatal_error_occurred (sc); 202c: eb000b6d bl 4de8 <== NOT EXECUTED 2030: 000191ac .word 0x000191ac 2034: 54526d69 .word 0x54526d69 00003208 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3208: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 320c: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 3210: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3214: e580100c str r1, [r0, #12] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3218: e5935034 ldr r5, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 321c: e1a04000 mov r4, r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3220: e1a02001 mov r2, r1 3224: e5950018 ldr r0, [r5, #24] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 3228: e5947008 ldr r7, [r4, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 322c: eb00054e bl 476c if (sc != RTEMS_SUCCESSFUL) { 3230: e2506000 subs r6, r0, #0 3234: 1a00000e bne 3274 args->ioctl_return = sc; return sc; } switch (args->command) { 3238: e5943004 ldr r3, [r4, #4] 323c: e3530004 cmp r3, #4 3240: 0a000006 beq 3260 3244: 8a00000d bhi 3280 3248: e3530002 cmp r3, #2 324c: 0a000020 beq 32d4 3250: 9a000087 bls 3474 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3254: e1a00005 mov r0, r5 3258: ebfffee5 bl 2df4 break; 325c: ea000002 b 326c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3260: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3264: e58520dc str r2, [r5, #220] ; 0xdc <== NOT EXECUTED 3268: e58530e0 str r3, [r5, #224] ; 0xe0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 326c: e5950018 ldr r0, [r5, #24] 3270: eb000585 bl 488c args->ioctl_return = sc; 3274: e584600c str r6, [r4, #12] return sc; } 3278: e1a00006 mov r0, r6 327c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3280: e3a02a46 mov r2, #286720 ; 0x46000 <== NOT EXECUTED 3284: e2822e67 add r2, r2, #1648 ; 0x670 <== NOT EXECUTED 3288: e282213d add r2, r2, #1073741839 ; 0x4000000f <== NOT EXECUTED 328c: e1530002 cmp r3, r2 <== NOT EXECUTED 3290: 0a00006b beq 3444 <== NOT EXECUTED 3294: 8a000082 bhi 34a4 <== NOT EXECUTED 3298: e3530005 cmp r3, #5 <== NOT EXECUTED 329c: 0a0000a5 beq 3538 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 32a0: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 32a4: e59f3334 ldr r3, [pc, #820] ; 35e0 <== NOT EXECUTED 32a8: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 32ac: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 32b0: e3530000 cmp r3, #0 <== NOT EXECUTED 32b4: 03a0600a moveq r6, #10 <== NOT EXECUTED 32b8: 0affffeb beq 326c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 32bc: e1a00005 mov r0, r5 <== NOT EXECUTED 32c0: e1a01004 mov r1, r4 <== NOT EXECUTED 32c4: e1a0e00f mov lr, pc <== NOT EXECUTED 32c8: e12fff13 bx r3 <== NOT EXECUTED 32cc: e1a06000 mov r6, r0 <== NOT EXECUTED 32d0: eaffffe5 b 326c <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 32d4: e594e008 ldr lr, [r4, #8] 32d8: e2857030 add r7, r5, #48 ; 0x30 32dc: e8be000f ldm lr!, {r0, r1, r2, r3} 32e0: e1a0c007 mov ip, r7 32e4: e8ac000f stmia ip!, {r0, r1, r2, r3} 32e8: e8be000f ldm lr!, {r0, r1, r2, r3} 32ec: e8ac000f stmia ip!, {r0, r1, r2, r3} /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 32f0: e59520b8 ldr r2, [r5, #184] ; 0xb8 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 32f4: e59e3000 ldr r3, [lr] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 32f8: e3120c02 tst r2, #512 ; 0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 32fc: e58c3000 str r3, [ip] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3300: 0a000012 beq 3350 3304: e5953030 ldr r3, [r5, #48] ; 0x30 3308: e3130b01 tst r3, #1024 ; 0x400 330c: 1a00000f bne 3350 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3310: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3314: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3318: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 331c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3320: e3130020 tst r3, #32 <== NOT EXECUTED 3324: 0a000009 beq 3350 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3328: e10f8000 mrs r8, CPSR <== NOT EXECUTED 332c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 3330: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3334: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3338: e5952094 ldr r2, [r5, #148] ; 0x94 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 333c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3340: e3520000 cmp r2, #0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3344: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3348: 1a00009c bne 35c0 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 334c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 3350: e59530b8 ldr r3, [r5, #184] ; 0xb8 3354: e3130b01 tst r3, #1024 ; 0x400 3358: 0a000008 beq 3380 335c: e5953030 ldr r3, [r5, #48] ; 0x30 <== NOT EXECUTED 3360: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3364: 1a000005 bne 3380 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3368: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 336c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3370: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3374: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3378: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 337c: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 3380: e59530b8 ldr r3, [r5, #184] ; 0xb8 3384: e3130c01 tst r3, #256 ; 0x100 3388: 05952038 ldreq r2, [r5, #56] ; 0x38 338c: 0a000012 beq 33dc 3390: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED 3394: e3520000 cmp r2, #0 <== NOT EXECUTED 3398: ba00007c blt 3590 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 339c: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 33a0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 33a4: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 33a8: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 33ac: e3130004 tst r3, #4 <== NOT EXECUTED 33b0: 0a000006 beq 33d0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 33b4: e59530b0 ldr r3, [r5, #176] ; 0xb0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 33b8: e3530000 cmp r3, #0 <== NOT EXECUTED 33bc: 0a000003 beq 33d0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 33c0: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 33c4: e1a0e00f mov lr, pc <== NOT EXECUTED 33c8: e12fff13 bx r3 <== NOT EXECUTED 33cc: e5952038 ldr r2, [r5, #56] ; 0x38 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 33d0: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 33d4: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 33d8: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 33dc: e3520000 cmp r2, #0 33e0: ba00006a blt 3590 tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 33e4: e5953030 ldr r3, [r5, #48] ; 0x30 33e8: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 33ec: 159520b8 ldrne r2, [r5, #184] ; 0xb8 33f0: 13822b01 orrne r2, r2, #1024 ; 0x400 33f4: 158520b8 strne r2, [r5, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 33f8: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 33fc: 159530b8 ldrne r3, [r5, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3400: e595803c ldr r8, [r5, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 3404: 13833c02 orrne r3, r3, #512 ; 0x200 3408: 158530b8 strne r3, [r5, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 340c: e2188002 ands r8, r8, #2 3410: 0a00004c beq 3548 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3414: e3a03000 mov r3, #0 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3418: e5853074 str r3, [r5, #116] ; 0x74 /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 341c: e585306c str r3, [r5, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3420: e5853070 str r3, [r5, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3424: e59530a8 ldr r3, [r5, #168] ; 0xa8 3428: e3530000 cmp r3, #0 342c: 0affff8e beq 326c (*tty->device.setAttributes)(tty->minor, &tty->termios); 3430: e1a01007 mov r1, r7 3434: e5950010 ldr r0, [r5, #16] 3438: e1a0e00f mov lr, pc 343c: e12fff13 bx r3 3440: eaffff89 b 326c *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3444: e5952060 ldr r2, [r5, #96] ; 0x60 <== NOT EXECUTED 3448: e595305c ldr r3, [r5, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 344c: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3450: 45952064 ldrmi r2, [r5, #100] ; 0x64 <== NOT EXECUTED 3454: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3458: e2851020 add r1, r5, #32 <== NOT EXECUTED 345c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 3460: e0412002 sub r2, r1, r2 <== NOT EXECUTED 3464: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED 3468: e0823003 add r3, r2, r3 <== NOT EXECUTED 346c: e5813000 str r3, [r1] <== NOT EXECUTED 3470: eaffff7d b 326c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3474: e3530001 cmp r3, #1 3478: 1affff88 bne 32a0 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 347c: e5947008 ldr r7, [r4, #8] 3480: e285c030 add ip, r5, #48 ; 0x30 3484: e8bc000f ldm ip!, {r0, r1, r2, r3} 3488: e1a0e007 mov lr, r7 348c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3490: e8bc000f ldm ip!, {r0, r1, r2, r3} 3494: e8ae000f stmia lr!, {r0, r1, r2, r3} 3498: e59c3000 ldr r3, [ip] 349c: e58e3000 str r3, [lr] break; 34a0: eaffff71 b 326c sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 34a4: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 34a8: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 34ac: e2822129 add r2, r2, #1073741834 ; 0x4000000a <== NOT EXECUTED 34b0: e1530002 cmp r3, r2 <== NOT EXECUTED 34b4: 0a00001b beq 3528 <== NOT EXECUTED 34b8: e3a02a47 mov r2, #290816 ; 0x47000 <== NOT EXECUTED 34bc: e2822e41 add r2, r2, #1040 ; 0x410 <== NOT EXECUTED 34c0: e282212e add r2, r2, #-2147483637 ; 0x8000000b <== NOT EXECUTED 34c4: e1530002 cmp r3, r2 <== NOT EXECUTED 34c8: 1affff74 bne 32a0 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 34cc: e59f710c ldr r7, [pc, #268] ; 35e0 <== NOT EXECUTED 34d0: e59530cc ldr r3, [r5, #204] ; 0xcc <== NOT EXECUTED 34d4: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 34d8: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 34dc: e3530000 cmp r3, #0 <== NOT EXECUTED 34e0: 0a000003 beq 34f4 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 34e4: e1a00005 mov r0, r5 <== NOT EXECUTED 34e8: e1a0e00f mov lr, pc <== NOT EXECUTED 34ec: e12fff13 bx r3 <== NOT EXECUTED 34f0: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 34f4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 34f8: e5932000 ldr r2, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 34fc: e7973282 ldr r3, [r7, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3500: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3504: e3530000 cmp r3, #0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3508: e58510d0 str r1, [r5, #208] ; 0xd0 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 350c: e58520cc str r2, [r5, #204] ; 0xcc <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3510: 0affff55 beq 326c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3514: e1a00005 mov r0, r5 <== NOT EXECUTED 3518: e1a0e00f mov lr, pc <== NOT EXECUTED 351c: e12fff13 bx r3 <== NOT EXECUTED 3520: e1a06000 mov r6, r0 <== NOT EXECUTED 3524: eaffff50 b 326c <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 3528: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 352c: e59520cc ldr r2, [r5, #204] ; 0xcc <== NOT EXECUTED 3530: e5832000 str r2, [r3] <== NOT EXECUTED break; 3534: eaffff4c b 326c <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3538: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 353c: e58520d4 str r2, [r5, #212] ; 0xd4 <== NOT EXECUTED 3540: e58530d8 str r3, [r5, #216] ; 0xd8 <== NOT EXECUTED break; 3544: eaffff48 b 326c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 3548: e5d5a046 ldrb sl, [r5, #70] ; 0x46 <== NOT EXECUTED 354c: eb0002d6 bl 40ac <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3550: e000009a mul r0, sl, r0 <== NOT EXECUTED 3554: e59f2088 ldr r2, [pc, #136] ; 35e4 <== NOT EXECUTED 3558: e0831092 umull r1, r3, r2, r0 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 355c: e5d52046 ldrb r2, [r5, #70] ; 0x46 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3560: e1a031a3 lsr r3, r3, #3 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3564: e3520000 cmp r2, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3568: e5853054 str r3, [r5, #84] ; 0x54 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 356c: 0a00000b beq 35a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 3570: e5d52047 ldrb r2, [r5, #71] ; 0x47 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3574: e3520000 cmp r2, #0 <== NOT EXECUTED 3578: 01a02003 moveq r2, r3 <== NOT EXECUTED 357c: 13a02000 movne r2, #0 <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3580: e585806c str r8, [r5, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3584: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 3588: e5853070 str r3, [r5, #112] ; 0x70 <== NOT EXECUTED 358c: eaffffa4 b 3424 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 3590: e59530b8 ldr r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 3594: e3833c01 orr r3, r3, #256 ; 0x100 <== NOT EXECUTED 3598: e58530b8 str r3, [r5, #184] ; 0xb8 <== NOT EXECUTED 359c: eaffff90 b 33e4 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 35a0: e5d53047 ldrb r3, [r5, #71] ; 0x47 <== NOT EXECUTED 35a4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 35a8: 03a03001 moveq r3, #1 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 35ac: 15852074 strne r2, [r5, #116] ; 0x74 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 35b0: 1585206c strne r2, [r5, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 35b4: 15852070 strne r2, [r5, #112] ; 0x70 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 35b8: 0585306c streq r3, [r5, #108] ; 0x6c <== NOT EXECUTED 35bc: eaffff98 b 3424 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 35c0: e5953084 ldr r3, [r5, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 35c4: e595107c ldr r1, [r5, #124] ; 0x7c <== NOT EXECUTED 35c8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED 35cc: e0811003 add r1, r1, r3 <== NOT EXECUTED 35d0: e3a02001 mov r2, #1 <== NOT EXECUTED 35d4: e1a0e00f mov lr, pc <== NOT EXECUTED 35d8: e595f0a4 ldr pc, [r5, #164] ; 0xa4 <== NOT EXECUTED 35dc: eaffff5a b 334c <== NOT EXECUTED 35e0: 00018fd8 .word 0x00018fd8 35e4: cccccccd .word 0xcccccccd 000037b4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 37b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 37b8: e59f7490 ldr r7, [pc, #1168] ; 3c50 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 37bc: e1a06001 mov r6, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 37c0: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 37c4: e24dd014 sub sp, sp, #20 37c8: e1a05000 mov r5, r0 37cc: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 37d0: e5970000 ldr r0, [r7] 37d4: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 37d8: e1a09003 mov r9, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 37dc: eb0003e2 bl 476c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 37e0: e250a000 subs sl, r0, #0 37e4: 1a000020 bne 386c return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 37e8: e59fb464 ldr fp, [pc, #1124] ; 3c54 37ec: e59b4000 ldr r4, [fp] 37f0: e3540000 cmp r4, #0 37f4: 1a000003 bne 3808 37f8: ea00002b b 38ac 37fc: e5944000 ldr r4, [r4] 3800: e3540000 cmp r4, #0 3804: 0a000028 beq 38ac if ((tty->major == major) && (tty->minor == minor)) 3808: e594300c ldr r3, [r4, #12] 380c: e1530005 cmp r3, r5 3810: 1afffff9 bne 37fc 3814: e5943010 ldr r3, [r4, #16] 3818: e1530006 cmp r3, r6 381c: 1afffff6 bne 37fc if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 3820: e5943008 ldr r3, [r4, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3824: e5982000 ldr r2, [r8] if (!tty->refcount++) { 3828: e3530000 cmp r3, #0 382c: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3830: e5824034 str r4, [r2, #52] ; 0x34 if (!tty->refcount++) { 3834: e5843008 str r3, [r4, #8] 3838: 1a000009 bne 3864 if (tty->device.firstOpen) 383c: e5943098 ldr r3, [r4, #152] ; 0x98 3840: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 3844: 11a00005 movne r0, r5 3848: 11a01006 movne r1, r6 384c: 11a02008 movne r2, r8 3850: 11a0e00f movne lr, pc 3854: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3858: e59430b4 ldr r3, [r4, #180] ; 0xb4 385c: e3530002 cmp r3, #2 3860: 0a000004 beq 3878 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 3864: e5970000 ldr r0, [r7] 3868: eb000407 bl 488c return RTEMS_SUCCESSFUL; } 386c: e1a0000a mov r0, sl 3870: e28dd014 add sp, sp, #20 3874: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 3878: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 387c: e59f13d4 ldr r1, [pc, #980] ; 3c58 <== NOT EXECUTED 3880: e1a02004 mov r2, r4 <== NOT EXECUTED 3884: eb0004d1 bl 4bd0 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3888: e3500000 cmp r0, #0 <== NOT EXECUTED 388c: 1a0000d2 bne 3bdc <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 3890: e1a02004 mov r2, r4 <== NOT EXECUTED 3894: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3898: e59f13bc ldr r1, [pc, #956] ; 3c5c <== NOT EXECUTED 389c: eb0004cb bl 4bd0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 38a0: e3500000 cmp r0, #0 <== NOT EXECUTED 38a4: 0affffee beq 3864 <== NOT EXECUTED 38a8: ea0000cb b 3bdc <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 38ac: e3a00001 mov r0, #1 38b0: e3a010e8 mov r1, #232 ; 0xe8 38b4: eb001592 bl 8f04 if (tty == NULL) { 38b8: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 38bc: e58d0010 str r0, [sp, #16] 38c0: e1a04000 mov r4, r0 if (tty == NULL) { 38c4: 0a0000af beq 3b88 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 38c8: e59f0390 ldr r0, [pc, #912] ; 3c60 38cc: e59d1010 ldr r1, [sp, #16] 38d0: e5903004 ldr r3, [r0, #4] 38d4: e5813064 str r3, [r1, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 38d8: e5910064 ldr r0, [r1, #100] ; 0x64 38dc: eb001719 bl 9548 38e0: e59d2010 ldr r2, [sp, #16] if (tty->rawInBuf.theBuf == NULL) { 38e4: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 38e8: e5820058 str r0, [r2, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 38ec: 0a0000a9 beq 3b98 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 38f0: e59fc368 ldr ip, [pc, #872] ; 3c60 38f4: e59de010 ldr lr, [sp, #16] 38f8: e59c3008 ldr r3, [ip, #8] 38fc: e58e3088 str r3, [lr, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3900: e59e0088 ldr r0, [lr, #136] ; 0x88 3904: eb00170f bl 9548 3908: e59d1010 ldr r1, [sp, #16] if (tty->rawOutBuf.theBuf == NULL) { 390c: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3910: e581007c str r0, [r1, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 3914: 05910058 ldreq r0, [r1, #88] ; 0x58 /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { 3918: 0a000097 beq 3b7c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 391c: e59f233c ldr r2, [pc, #828] ; 3c60 3920: e5920000 ldr r0, [r2] 3924: eb001707 bl 9548 3928: e59d3010 ldr r3, [sp, #16] if (tty->cbuf == NULL) { 392c: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3930: e583001c str r0, [r3, #28] if (tty->cbuf == NULL) { 3934: 0a00008c beq 3b6c tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3938: e59b2000 ldr r2, [fp] tty->back = NULL; 393c: e59dc010 ldr ip, [sp, #16] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3940: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3944: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3948: e88c000c stm ip, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 394c: 1582c004 strne ip, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3950: e58c30d4 str r3, [ip, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3954: e58c30d8 str r3, [ip, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3958: e58c30dc str r3, [ip, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 395c: e58c30e0 str r3, [ip, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 3960: e58c30e4 str r3, [ip, #228] ; 0xe4 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3964: e59f32f8 ldr r3, [pc, #760] ; 3c64 3968: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 396c: e59f12ec ldr r1, [pc, #748] ; 3c60 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3970: e3520000 cmp r2, #0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3974: e59d2010 ldr r2, [sp, #16] 3978: e5d1000c ldrb r0, [r1, #12] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 397c: e59de010 ldr lr, [sp, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3980: e282c014 add ip, r2, #20 tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 3984: 0583e000 streq lr, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3988: e58be000 str lr, [fp] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 398c: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3990: e58dc000 str ip, [sp] rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 3994: e59dc010 ldr ip, [sp, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3998: e3800852 orr r0, r0, #5373952 ; 0x520000 399c: e3a03000 mov r3, #0 39a0: e3800c69 orr r0, r0, #26880 ; 0x6900 39a4: e3a01001 mov r1, #1 39a8: e3a02054 mov r2, #84 ; 0x54 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 39ac: e58c6010 str r6, [ip, #16] tty->major = major; 39b0: e58c500c str r5, [ip, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 39b4: eb0002d1 bl 4500 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 39b8: e2503000 subs r3, r0, #0 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 39bc: e59fb29c ldr fp, [pc, #668] ; 3c60 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 39c0: 1a000085 bne 3bdc rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 39c4: e5db000c ldrb r0, [fp, #12] 39c8: e59de010 ldr lr, [sp, #16] 39cc: e3800315 orr r0, r0, #1409286144 ; 0x54000000 39d0: e3800852 orr r0, r0, #5373952 ; 0x520000 39d4: e28ec018 add ip, lr, #24 39d8: e3a01001 mov r1, #1 39dc: e3800c6f orr r0, r0, #28416 ; 0x6f00 39e0: e3a02054 mov r2, #84 ; 0x54 39e4: e58dc000 str ip, [sp] 39e8: eb0002c4 bl 4500 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 39ec: e2501000 subs r1, r0, #0 39f0: 1a000079 bne 3bdc rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 39f4: e5db000c ldrb r0, [fp, #12] 39f8: e59d2010 ldr r2, [sp, #16] 39fc: e3800315 orr r0, r0, #1409286144 ; 0x54000000 3a00: e3800852 orr r0, r0, #5373952 ; 0x520000 3a04: e282c08c add ip, r2, #140 ; 0x8c 3a08: e3800b1e orr r0, r0, #30720 ; 0x7800 3a0c: e3a02020 mov r2, #32 3a10: e1a03001 mov r3, r1 3a14: e58dc000 str ip, [sp] 3a18: eb0002b8 bl 4500 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3a1c: e250e000 subs lr, r0, #0 3a20: 1a00006d bne 3bdc tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3a24: e8b9000f ldm r9!, {r0, r1, r2, r3} 3a28: e58d900c str r9, [sp, #12] 3a2c: e59d9010 ldr r9, [sp, #16] 3a30: e289c098 add ip, r9, #152 ; 0x98 3a34: e8ac000f stmia ip!, {r0, r1, r2, r3} 3a38: e59d900c ldr r9, [sp, #12] 3a3c: e899000f ldm r9, {r0, r1, r2, r3} 3a40: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3a44: e59dc010 ldr ip, [sp, #16] 3a48: e59c30b4 ldr r3, [ip, #180] ; 0xb4 3a4c: e3530002 cmp r3, #2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 3a50: e58ce094 str lr, [ip, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3a54: 0a000061 beq 3be0 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3a58: e59d9010 ldr r9, [sp, #16] 3a5c: e59930a0 ldr r3, [r9, #160] ; 0xa0 3a60: e3530000 cmp r3, #0 3a64: 0a00004e beq 3ba4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3a68: e59930b4 ldr r3, [r9, #180] ; 0xb4 3a6c: e3530002 cmp r3, #2 3a70: 0a00004b beq 3ba4 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 3a74: e59d0010 ldr r0, [sp, #16] tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3a78: e3a03000 mov r3, #0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 3a7c: e58030b8 str r3, [r0, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3a80: e5909064 ldr r9, [r0, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 3a84: e590b064 ldr fp, [r0, #100] ; 0x64 /* * Bump name characer */ if (c++ == 'z') 3a88: e59f11d0 ldr r1, [pc, #464] ; 3c60 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3a8c: e1a090a9 lsr r9, r9, #1 3a90: e58d9008 str r9, [sp, #8] tty->highwater = tty->rawInBuf.Size * 3/4; 3a94: e08bb08b add fp, fp, fp, lsl #1 3a98: e59d9010 ldr r9, [sp, #16] /* * Bump name characer */ if (c++ == 'z') 3a9c: e5d1e00c ldrb lr, [r1, #12] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 3aa0: e1a0b12b lsr fp, fp, #2 3aa4: e589b0c0 str fp, [r9, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 3aa8: e59f91b0 ldr r9, [pc, #432] ; 3c60 3aac: e35e007a cmp lr, #122 ; 0x7a 3ab0: e28ee001 add lr, lr, #1 3ab4: e5c9e00c strb lr, [r9, #12] * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3ab8: e3a02c82 mov r2, #33280 ; 0x8200 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3abc: e59de010 ldr lr, [sp, #16] tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3ac0: e282203b add r2, r2, #59 ; 0x3b 3ac4: e58e203c str r2, [lr, #60] ; 0x3c tty->termios.c_cc[VINTR] = '\003'; 3ac8: e3a02003 mov r2, #3 3acc: e5ce2041 strb r2, [lr, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 3ad0: e3a0201c mov r2, #28 3ad4: e5ce2042 strb r2, [lr, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 3ad8: e3a0207f mov r2, #127 ; 0x7f 3adc: e5ce2043 strb r2, [lr, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 3ae0: e3a02015 mov r2, #21 3ae4: e5ce2044 strb r2, [lr, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 3ae8: e3a02004 mov r2, #4 3aec: e5ce2045 strb r2, [lr, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3af0: e3a02011 mov r2, #17 3af4: e5ce2049 strb r2, [lr, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 3af8: e3a02013 mov r2, #19 3afc: e5ce204a strb r2, [lr, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3b00: e3a0201a mov r2, #26 3b04: e5ce204b strb r2, [lr, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 3b08: e3a02012 mov r2, #18 3b0c: e5ce204d strb r2, [lr, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3b10: e3a0200f mov r2, #15 3b14: e5ce204e strb r2, [lr, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 3b18: e3a02017 mov r2, #23 3b1c: e5ce204f strb r2, [lr, #79] ; 0x4f /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3b20: e3a00b06 mov r0, #6144 ; 0x1800 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 3b24: e3a02016 mov r2, #22 3b28: e5ce2050 strb r2, [lr, #80] ; 0x50 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3b2c: e2800005 add r0, r0, #5 3b30: e58e0034 str r0, [lr, #52] ; 0x34 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3b34: e3a0cc25 mov ip, #9472 ; 0x2500 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3b38: e59d0008 ldr r0, [sp, #8] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3b3c: e3a01e8b mov r1, #2224 ; 0x8b0 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 3b40: e5ce304c strb r3, [lr, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3b44: e5ce3051 strb r3, [lr, #81] ; 0x51 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3b48: e28cc002 add ip, ip, #2 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3b4c: e281100d add r1, r1, #13 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3b50: 0282204b addeq r2, r2, #75 ; 0x4b 3b54: 01a03009 moveq r3, r9 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3b58: e58ec030 str ip, [lr, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3b5c: e58e1038 str r1, [lr, #56] ; 0x38 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3b60: e58e00bc str r0, [lr, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') c = 'a'; 3b64: 05c3200c strbeq r2, [r3, #12] 3b68: eaffff2c b 3820 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 3b6c: e593007c ldr r0, [r3, #124] ; 0x7c <== NOT EXECUTED 3b70: eb00151e bl 8ff0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3b74: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED 3b78: e5990058 ldr r0, [r9, #88] ; 0x58 <== NOT EXECUTED 3b7c: eb00151b bl 8ff0 <== NOT EXECUTED free(tty); 3b80: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3b84: eb001519 bl 8ff0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 3b88: e5970000 ldr r0, [r7] <== NOT EXECUTED 3b8c: eb00033e bl 488c <== NOT EXECUTED 3b90: e3a0a01a mov sl, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 3b94: eaffff34 b 386c <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 3b98: e1a00002 mov r0, r2 <== NOT EXECUTED 3b9c: eb001513 bl 8ff0 <== NOT EXECUTED 3ba0: eafffff8 b 3b88 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 3ba4: e59fc0b4 ldr ip, [pc, #180] ; 3c60 <== NOT EXECUTED 3ba8: e5dc000c ldrb r0, [ip, #12] <== NOT EXECUTED 3bac: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED 3bb0: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3bb4: e3a01000 mov r1, #0 <== NOT EXECUTED 3bb8: e3800852 orr r0, r0, #5373952 ; 0x520000 <== NOT EXECUTED 3bbc: e28ec068 add ip, lr, #104 ; 0x68 <== NOT EXECUTED 3bc0: e3800c72 orr r0, r0, #29184 ; 0x7200 <== NOT EXECUTED 3bc4: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3bc8: e1a03001 mov r3, r1 <== NOT EXECUTED 3bcc: e58dc000 str ip, [sp] <== NOT EXECUTED 3bd0: eb00024a bl 4500 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3bd4: e3500000 cmp r0, #0 <== NOT EXECUTED 3bd8: 0affffa5 beq 3a74 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 3bdc: eb000481 bl 4de8 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 3be0: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 3be4: e3800315 orr r0, r0, #1409286144 ; 0x54000000 <== NOT EXECUTED 3be8: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3bec: e28cc0c8 add ip, ip, #200 ; 0xc8 <== NOT EXECUTED 3bf0: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3bf4: e3a0100a mov r1, #10 <== NOT EXECUTED 3bf8: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3bfc: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3c00: e58de000 str lr, [sp] <== NOT EXECUTED 3c04: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3c08: eb000349 bl 4934 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 3c0c: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3c10: 1afffff1 bne 3bdc <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3c14: e5db000c ldrb r0, [fp, #12] <== NOT EXECUTED 3c18: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 3c1c: e3800452 orr r0, r0, #1375731712 ; 0x52000000 <== NOT EXECUTED 3c20: e380071e orr r0, r0, #7864320 ; 0x780000 <== NOT EXECUTED 3c24: e282c0c4 add ip, r2, #196 ; 0xc4 <== NOT EXECUTED 3c28: e3800b15 orr r0, r0, #21504 ; 0x5400 <== NOT EXECUTED 3c2c: e3a01009 mov r1, #9 <== NOT EXECUTED 3c30: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3c34: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3c38: e58de000 str lr, [sp] <== NOT EXECUTED 3c3c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3c40: eb00033b bl 4934 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 3c44: e3500000 cmp r0, #0 <== NOT EXECUTED 3c48: 0affff82 beq 3a58 <== NOT EXECUTED 3c4c: eaffffe2 b 3bdc <== NOT EXECUTED 3c50: 000191ac .word 0x000191ac 3c54: 000191b4 .word 0x000191b4 3c58: 00003cd8 .word 0x00003cd8 3c5c: 00003c68 .word 0x00003c68 3c60: 00017cd4 .word 0x00017cd4 3c64: 000191b0 .word 0x000191b0 000025d4 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 25d4: e59230b4 ldr r3, [r2, #180] ; 0xb4 25d8: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 25dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 25e0: e1a04002 mov r4, r2 25e4: e1a0b000 mov fp, r0 25e8: e1a09001 mov r9, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 25ec: 0a000039 beq 26d8 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 25f0: e3510000 cmp r1, #0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 25f4: e5928080 ldr r8, [r2, #128] ; 0x80 <== NOT EXECUTED while (len) { 25f8: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 25fc: e3a0a000 mov sl, #0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 2600: e3a07002 mov r7, #2 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2604: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2608: e2880001 add r0, r8, #1 <== NOT EXECUTED 260c: eb004cd3 bl 15960 <__umodsi3> <== NOT EXECUTED 2610: e1a08000 mov r8, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2614: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2618: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 261c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2620: e5946084 ldr r6, [r4, #132] ; 0x84 <== NOT EXECUTED 2624: e1560000 cmp r6, r0 <== NOT EXECUTED 2628: 1a00000d bne 2664 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 262c: e5847094 str r7, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2630: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2634: e3a01000 mov r1, #0 <== NOT EXECUTED 2638: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 263c: e1a02001 mov r2, r1 <== NOT EXECUTED 2640: eb000849 bl 476c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2644: e3500000 cmp r0, #0 <== NOT EXECUTED 2648: 1a000028 bne 26f0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 264c: e10f5000 mrs r5, CPSR <== NOT EXECUTED 2650: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED 2654: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2658: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 265c: e1530006 cmp r3, r6 <== NOT EXECUTED 2660: 0afffff1 beq 262c <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 2664: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2668: e7db100a ldrb r1, [fp, sl] <== NOT EXECUTED 266c: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2670: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 2674: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2678: e3530000 cmp r3, #0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 267c: e5848080 str r8, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2680: 1a000007 bne 26a4 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2684: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2688: e3130010 tst r3, #16 <== NOT EXECUTED 268c: 0a000009 beq 26b8 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 2690: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2694: e3833020 orr r3, r3, #32 <== NOT EXECUTED 2698: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 269c: e3a03001 mov r3, #1 <== NOT EXECUTED 26a0: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 26a4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 26a8: e2599001 subs r9, r9, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; 26ac: e28aa001 add sl, sl, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 26b0: 1affffd3 bne 2604 <== NOT EXECUTED 26b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 26b8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 26bc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 26c0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 26c4: e0811003 add r1, r1, r3 <== NOT EXECUTED 26c8: e3a02001 mov r2, #1 <== NOT EXECUTED 26cc: e1a0e00f mov lr, pc <== NOT EXECUTED 26d0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 26d4: eafffff0 b 269c <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 26d8: e1a01000 mov r1, r0 26dc: e1a02009 mov r2, r9 26e0: e5940010 ldr r0, [r4, #16] 26e4: e1a0e00f mov lr, pc 26e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 26ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 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); 26f0: eb0009bc bl 4de8 <== NOT EXECUTED 00002e70 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2e70: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2e74: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2e78: e1a0a000 mov sl, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2e7c: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2e80: e3a01000 mov r1, #0 <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 2e84: e59a300c ldr r3, [sl, #12] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2e88: e24dd008 sub sp, sp, #8 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2e8c: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2e90: e1a02001 mov r2, r1 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 2e94: e59a7010 ldr r7, [sl, #16] <== NOT EXECUTED char *buffer = args->buffer; 2e98: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2e9c: eb000632 bl 476c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2ea0: e250b000 subs fp, r0, #0 <== NOT EXECUTED 2ea4: 1a00000e bne 2ee4 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2ea8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2eac: e59f334c ldr r3, [pc, #844] ; 3200 <== NOT EXECUTED 2eb0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2eb4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2eb8: e3530000 cmp r3, #0 <== NOT EXECUTED 2ebc: 0a00000b beq 2ef0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2ec0: e1a0100a mov r1, sl <== NOT EXECUTED 2ec4: e1a00004 mov r0, r4 <== NOT EXECUTED 2ec8: e1a0e00f mov lr, pc <== NOT EXECUTED 2ecc: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2ed0: e3a03000 mov r3, #0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2ed4: e1a0b000 mov fp, r0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2ed8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2edc: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2ee0: eb000669 bl 488c <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 2ee4: e1a0000b mov r0, fp <== NOT EXECUTED 2ee8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 2eec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2ef0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 2ef4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2ef8: e1520003 cmp r2, r3 <== NOT EXECUTED 2efc: 0a00001a beq 2f6c <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2f00: e3570000 cmp r7, #0 <== NOT EXECUTED 2f04: 0a000010 beq 2f4c <== NOT EXECUTED 2f08: e2842020 add r2, r4, #32 <== NOT EXECUTED 2f0c: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 2f10: e1530002 cmp r3, r2 <== NOT EXECUTED 2f14: aa00000c bge 2f4c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2f18: e59d2000 ldr r2, [sp] <== NOT EXECUTED 2f1c: e0631002 rsb r1, r3, r2 <== NOT EXECUTED 2f20: ea000002 b 2f30 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2f24: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2f28: e1520003 cmp r2, r3 <== NOT EXECUTED 2f2c: da000006 ble 2f4c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2f30: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 2f34: e7d22003 ldrb r2, [r2, r3] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2f38: e2577001 subs r7, r7, #1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2f3c: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED 2f40: e2833001 add r3, r3, #1 <== NOT EXECUTED 2f44: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2f48: 1afffff5 bne 2f24 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2f4c: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED 2f50: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 2f54: e58a7018 str r7, [sl, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2f58: e3a03000 mov r3, #0 <== NOT EXECUTED 2f5c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2f60: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2f64: eb000648 bl 488c <== NOT EXECUTED return sc; 2f68: eaffffdd b 2ee4 <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2f6c: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2f70: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 2f74: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2f78: e584202c str r2, [r4, #44] ; 0x2c <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 2f7c: e584b020 str fp, [r4, #32] <== NOT EXECUTED 2f80: e584b024 str fp, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2f84: 0a000002 beq 2f94 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2f88: e59420b4 ldr r2, [r4, #180] ; 0xb4 <== NOT EXECUTED 2f8c: e3520000 cmp r2, #0 <== NOT EXECUTED 2f90: 0a00005e beq 3110 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 2f94: e2842049 add r2, r4, #73 ; 0x49 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2f98: e3a09c02 mov r9, #512 ; 0x200 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 2f9c: e5945074 ldr r5, [r4, #116] ; 0x74 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 2fa0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2fa4: e59f6258 ldr r6, [pc, #600] ; 3204 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2fa8: e2899002 add r9, r9, #2 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 2fac: e3a08001 mov r8, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2fb0: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 2fb4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2fb8: e1520003 cmp r2, r3 <== NOT EXECUTED 2fbc: 0a000036 beq 309c <== NOT EXECUTED 2fc0: e5963000 ldr r3, [r6] <== NOT EXECUTED 2fc4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2fc8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2fcc: e1520003 cmp r2, r3 <== NOT EXECUTED 2fd0: aa000031 bge 309c <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 2fd4: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2fd8: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2fdc: e2800001 add r0, r0, #1 <== NOT EXECUTED 2fe0: eb004a5e bl 15960 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2fe4: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2fe8: e7d35000 ldrb r5, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2fec: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2ff0: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2ff4: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 2ff8: e0823003 add r3, r2, r3 <== NOT EXECUTED 2ffc: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 3000: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3004: eb004a55 bl 15960 <__umodsi3> <== NOT EXECUTED 3008: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 300c: e1500003 cmp r0, r3 <== NOT EXECUTED 3010: 2a000014 bcs 3068 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 3014: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3018: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 301c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3020: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3024: e3c33f7f bic r3, r3, #508 ; 0x1fc <== NOT EXECUTED 3028: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 302c: e1a03b03 lsl r3, r3, #22 <== NOT EXECUTED 3030: e1a03b23 lsr r3, r3, #22 <== NOT EXECUTED 3034: e1530009 cmp r3, r9 <== NOT EXECUTED 3038: 0a000028 beq 30e0 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 303c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3040: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3044: 0a000007 beq 3068 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 3048: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 304c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 3050: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3054: e3530000 cmp r3, #0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 3058: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 305c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3060: 11a0e00f movne lr, pc <== NOT EXECUTED 3064: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3068: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 306c: e3130002 tst r3, #2 <== NOT EXECUTED 3070: 0a000012 beq 30c0 <== NOT EXECUTED if (siproc (c, tty)) 3074: e1a00005 mov r0, r5 <== NOT EXECUTED 3078: e1a01004 mov r1, r4 <== NOT EXECUTED 307c: ebffff0f bl 2cc0 <== NOT EXECUTED 3080: e3500000 cmp r0, #0 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 3084: 13a08000 movne r8, #0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3088: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 308c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3090: e1520003 cmp r2, r3 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 3094: e5945070 ldr r5, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3098: 1affffc8 bne 2fc0 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 309c: e3580000 cmp r8, #0 <== NOT EXECUTED 30a0: 0affff96 beq 2f00 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 30a4: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 30a8: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 30ac: e1a02005 mov r2, r5 <== NOT EXECUTED 30b0: eb0005ad bl 476c <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 30b4: e3500000 cmp r0, #0 <== NOT EXECUTED 30b8: 0affffbc beq 2fb0 <== NOT EXECUTED 30bc: eaffff8f b 2f00 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 30c0: e1a00005 mov r0, r5 <== NOT EXECUTED 30c4: e1a01004 mov r1, r4 <== NOT EXECUTED 30c8: ebfffefc bl 2cc0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30cc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 30d0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30d4: e1520003 cmp r2, r3 <== NOT EXECUTED 30d8: a3a08000 movge r8, #0 <== NOT EXECUTED 30dc: eaffffe9 b 3088 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30e0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30e4: e3530000 cmp r3, #0 <== NOT EXECUTED 30e8: 0a000002 beq 30f8 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 30ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30f0: e3130020 tst r3, #32 <== NOT EXECUTED 30f4: 0affffd0 beq 303c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 30f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30fc: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 3100: e3a02001 mov r2, #1 <== NOT EXECUTED 3104: e1a0e00f mov lr, pc <== NOT EXECUTED 3108: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 310c: eaffffd5 b 3068 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3110: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 3114: e3120002 tst r2, #2 <== NOT EXECUTED 3118: 0a00000b beq 314c <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 311c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3120: e1a0e00f mov lr, pc <== NOT EXECUTED 3124: e12fff13 bx r3 <== NOT EXECUTED if (n < 0) { 3128: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 312c: e1a01004 mov r1, r4 <== NOT EXECUTED 3130: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 3134: ba00002d blt 31f0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 3138: ebfffee0 bl 2cc0 <== NOT EXECUTED 313c: e3500000 cmp r0, #0 <== NOT EXECUTED 3140: 1affff6e bne 2f00 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3144: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 3148: eafffff3 b 311c <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 314c: eb0003de bl 40cc <== NOT EXECUTED 3150: e1a05000 mov r5, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 3154: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3158: e1a0e00f mov lr, pc <== NOT EXECUTED 315c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 3160: e3500000 cmp r0, #0 <== NOT EXECUTED 3164: ba00000c blt 319c <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 3168: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 316c: e1a01004 mov r1, r4 <== NOT EXECUTED 3170: ebfffed2 bl 2cc0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3174: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3178: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 317c: e1520003 cmp r2, r3 <== NOT EXECUTED 3180: aaffff5e bge 2f00 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3184: e3530000 cmp r3, #0 <== NOT EXECUTED 3188: 0afffff1 beq 3154 <== NOT EXECUTED 318c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3190: e3530000 cmp r3, #0 <== NOT EXECUTED 3194: 0affffee beq 3154 <== NOT EXECUTED 3198: eaffffeb b 314c <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 319c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 31a0: e3530000 cmp r3, #0 <== NOT EXECUTED 31a4: 0a000008 beq 31cc <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 31a8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 31ac: e3530000 cmp r3, #0 <== NOT EXECUTED 31b0: 0a000002 beq 31c0 <== NOT EXECUTED 31b4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 31b8: e3530000 cmp r3, #0 <== NOT EXECUTED 31bc: 1a000005 bne 31d8 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 31c0: e3a00001 mov r0, #1 <== NOT EXECUTED 31c4: eb00069b bl 4c38 <== NOT EXECUTED 31c8: eaffffe1 b 3154 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 31cc: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 31d0: e3530000 cmp r3, #0 <== NOT EXECUTED 31d4: 0affff49 beq 2f00 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 31d8: eb0003bb bl 40cc <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 31dc: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 31e0: e0650000 rsb r0, r5, r0 <== NOT EXECUTED 31e4: e1500003 cmp r0, r3 <== NOT EXECUTED 31e8: 9afffff4 bls 31c0 <== NOT EXECUTED 31ec: eaffff43 b 2f00 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 31f0: e3a00001 mov r0, #1 <== NOT EXECUTED 31f4: eb00068f bl 4c38 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 31f8: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED 31fc: eaffffc6 b 311c <== NOT EXECUTED 3200: 00018fd8 .word 0x00018fd8 3204: 00017cd4 .word 0x00017cd4 00002058 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 2058: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 205c: e3c33fff bic r3, r3, #1020 ; 0x3fc <== NOT EXECUTED 2060: e1a03a83 lsl r3, r3, #21 <== NOT EXECUTED 2064: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 2068: e1a03aa3 lsr r3, r3, #21 <== NOT EXECUTED 206c: e2822001 add r2, r2, #1 <== NOT EXECUTED 2070: e1530002 cmp r3, r2 <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 2074: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2078: e1a04000 mov r4, r0 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 207c: 0a000046 beq 219c <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 2080: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2084: e2033003 and r3, r3, #3 <== NOT EXECUTED 2088: e3530002 cmp r3, #2 <== NOT EXECUTED 208c: 0a000054 beq 21e4 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2090: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2094: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 2098: e1520003 cmp r2, r3 <== NOT EXECUTED 209c: 0a00002a beq 214c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 20a0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 20a4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 20a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 20ac: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 20b0: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 20b4: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 20b8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 20bc: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 20c0: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 20c4: e0800003 add r0, r0, r3 <== NOT EXECUTED 20c8: eb004e24 bl 15960 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 20cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 20d0: e3530002 cmp r3, #2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 20d4: e1a05000 mov r5, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 20d8: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 20dc: 0a00002b beq 2190 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 20e0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 20e4: e1530005 cmp r3, r5 <== NOT EXECUTED 20e8: 0a00001d beq 2164 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 20ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 20f0: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 20f4: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 20f8: 0a00004b beq 222c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 20fc: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2100: e1550003 cmp r5, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2104: 85946088 ldrhi r6, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 2108: 95946080 ldrls r6, [r4, #128] ; 0x80 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 210c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 2110: 80656006 rsbhi r6, r5, r6 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 2114: 90656006 rsbls r6, r5, r6 <== NOT EXECUTED /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 2118: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 211c: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 2120: 13a06001 movne r6, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2124: e3a03001 mov r3, #1 <== NOT EXECUTED 2128: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 212c: e0811005 add r1, r1, r5 <== NOT EXECUTED 2130: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2134: e1a02006 mov r2, r6 <== NOT EXECUTED 2138: e1a0e00f mov lr, pc <== NOT EXECUTED 213c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 2140: e5845084 str r5, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 2144: e1a00006 mov r0, r6 <== NOT EXECUTED 2148: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 214c: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 2150: e3530002 cmp r3, #2 <== NOT EXECUTED 2154: 0a00003f beq 2258 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2158: e3a06000 mov r6, #0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 215c: e1a00006 mov r0, r6 <== NOT EXECUTED 2160: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2164: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2168: e3a06000 mov r6, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 216c: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2170: e5846094 str r6, [r4, #148] ; 0x94 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2174: 01a06003 moveq r6, r3 <== NOT EXECUTED 2178: 0afffff0 beq 2140 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 217c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2180: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2184: e1a0e00f mov lr, pc <== NOT EXECUTED 2188: e12fff13 bx r3 <== NOT EXECUTED 218c: eaffffeb b 2140 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2190: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2194: eb0009bc bl 488c <== NOT EXECUTED 2198: eaffffd0 b 20e0 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 219c: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 21a0: e3a02001 mov r2, #1 <== NOT EXECUTED 21a4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 21a8: e1a0e00f mov lr, pc <== NOT EXECUTED 21ac: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 21b0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 21b4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 21b8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 21bc: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 21c0: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 21c4: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 21c8: e3811002 orr r1, r1, #2 <== NOT EXECUTED 21cc: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 21d0: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 21d4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 21d8: e3a06001 mov r6, #1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 21dc: e1a00006 mov r0, r6 <== NOT EXECUTED 21e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 21e4: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 21e8: e3a02001 mov r2, #1 <== NOT EXECUTED 21ec: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 21f0: e1a0e00f mov lr, pc <== NOT EXECUTED 21f4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 21f8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 21fc: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2200: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2204: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2208: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 220c: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2210: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 2214: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2218: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 221c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2220: e3a06001 mov r6, #1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2224: e1a00006 mov r0, r6 <== NOT EXECUTED 2228: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 222c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2230: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2234: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 2238: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 223c: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2240: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2244: e3a02001 mov r2, #1 <== NOT EXECUTED 2248: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 224c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2250: e3a06000 mov r6, #0 <== NOT EXECUTED 2254: eaffffb9 b 2140 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 2258: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 225c: eb00098a bl 488c <== NOT EXECUTED 2260: e3a06000 mov r6, #0 <== NOT EXECUTED 2264: eaffffbc b 215c <== NOT EXECUTED 00003cd8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 3cd8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3cdc: e24dd008 sub sp, sp, #8 <== NOT EXECUTED 3ce0: e1a04000 mov r4, r0 <== NOT EXECUTED 3ce4: e28d7007 add r7, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3ce8: e3a06000 mov r6, #0 <== NOT EXECUTED 3cec: e1a0300d mov r3, sp <== NOT EXECUTED 3cf0: e3a01002 mov r1, #2 <== NOT EXECUTED 3cf4: e3a02000 mov r2, #0 <== NOT EXECUTED 3cf8: e3a00003 mov r0, #3 <== NOT EXECUTED 3cfc: eb000112 bl 414c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3d00: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3d04: e3130001 tst r3, #1 <== NOT EXECUTED 3d08: 1a000012 bne 3d58 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3d0c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3d10: e1a0e00f mov lr, pc <== NOT EXECUTED 3d14: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 3d18: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3d1c: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3d20: 0afffff1 beq 3cec <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3d24: e1a01007 mov r1, r7 <== NOT EXECUTED 3d28: e3a02001 mov r2, #1 <== NOT EXECUTED 3d2c: e1a00004 mov r0, r4 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 3d30: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3d34: ebfff965 bl 22d0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3d38: e1a0300d mov r3, sp <== NOT EXECUTED 3d3c: e3a01002 mov r1, #2 <== NOT EXECUTED 3d40: e3a02000 mov r2, #0 <== NOT EXECUTED 3d44: e3a00003 mov r0, #3 <== NOT EXECUTED 3d48: eb0000ff bl 414c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3d4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3d50: e3130001 tst r3, #1 <== NOT EXECUTED 3d54: 0affffec beq 3d0c <== NOT EXECUTED tty->rxTaskId = 0; 3d58: e58460c4 str r6, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3d5c: e1a00006 mov r0, r6 <== NOT EXECUTED 3d60: eb000341 bl 4a6c <== NOT EXECUTED 3d64: eaffffe0 b 3cec <== NOT EXECUTED 0000204c : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 204c: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 2050: e3a01002 mov r1, #2 <== NOT EXECUTED 2054: ea00089a b 42c4 <== NOT EXECUTED 00003c68 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3c68: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3c6c: e59f6060 ldr r6, [pc, #96] ; 3cd4 <== NOT EXECUTED 3c70: e24dd004 sub sp, sp, #4 <== NOT EXECUTED 3c74: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3c78: e3a07000 mov r7, #0 <== NOT EXECUTED 3c7c: e1a0300d mov r3, sp <== NOT EXECUTED 3c80: e3a01002 mov r1, #2 <== NOT EXECUTED 3c84: e3a02000 mov r2, #0 <== NOT EXECUTED 3c88: e3a00003 mov r0, #3 <== NOT EXECUTED 3c8c: eb00012e bl 414c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 3c90: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3c94: e3130001 tst r3, #1 <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 3c98: e1a00004 mov r0, r4 <== NOT EXECUTED rtems_event_receive((TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 3c9c: 1a000008 bne 3cc4 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 3ca0: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 3ca4: e0863283 add r3, r6, r3, lsl #5 <== NOT EXECUTED 3ca8: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 3cac: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 3cb0: 11a0e00f movne lr, pc <== NOT EXECUTED 3cb4: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 3cb8: e1a00004 mov r0, r4 <== NOT EXECUTED 3cbc: ebfff8e5 bl 2058 <== NOT EXECUTED 3cc0: eaffffed b 3c7c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 3cc4: e58470c8 str r7, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3cc8: e1a00007 mov r0, r7 <== NOT EXECUTED 3ccc: eb000366 bl 4a6c <== NOT EXECUTED 3cd0: eaffffe9 b 3c7c <== NOT EXECUTED 3cd4: 00018fd8 .word 0x00018fd8 00002d24 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2d24: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2d28: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2d2c: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2d30: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2d34: e1a05000 mov r5, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2d38: e1a02001 mov r2, r1 2d3c: e5940018 ldr r0, [r4, #24] 2d40: eb000689 bl 476c if (sc != RTEMS_SUCCESSFUL) 2d44: e2506000 subs r6, r0, #0 2d48: 1a00000c bne 2d80 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2d4c: e59420cc ldr r2, [r4, #204] ; 0xcc 2d50: e59f3098 ldr r3, [pc, #152] ; 2df0 2d54: e0833282 add r3, r3, r2, lsl #5 2d58: e593300c ldr r3, [r3, #12] 2d5c: e3530000 cmp r3, #0 2d60: 0a000008 beq 2d88 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2d64: e1a01005 mov r1, r5 <== NOT EXECUTED 2d68: e1a00004 mov r0, r4 <== NOT EXECUTED 2d6c: e1a0e00f mov lr, pc <== NOT EXECUTED 2d70: e12fff13 bx r3 <== NOT EXECUTED 2d74: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2d78: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2d7c: eb0006c2 bl 488c <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 2d80: e1a00006 mov r0, r6 <== NOT EXECUTED 2d84: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2d88: e5943034 ldr r3, [r4, #52] ; 0x34 2d8c: e3130001 tst r3, #1 2d90: 0a000011 beq 2ddc uint32_t count = args->count; 2d94: e5958010 ldr r8, [r5, #16] char *buffer = args->buffer; while (count--) 2d98: e3580000 cmp r8, #0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 2d9c: e595a00c ldr sl, [r5, #12] while (count--) 2da0: 01a03006 moveq r3, r6 2da4: 0a000007 beq 2dc8 2da8: e1a07006 mov r7, r6 oproc (*buffer++, tty); 2dac: e7da0007 ldrb r0, [sl, r7] 2db0: e1a01004 mov r1, r4 2db4: e2877001 add r7, r7, #1 2db8: ebfffe4d bl 26f4 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2dbc: e1580007 cmp r8, r7 2dc0: 1afffff9 bne 2dac oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 2dc4: e5953010 ldr r3, [r5, #16] 2dc8: e5853018 str r3, [r5, #24] } rtems_semaphore_release (tty->osem); 2dcc: e5940018 ldr r0, [r4, #24] 2dd0: eb0006ad bl 488c return sc; } 2dd4: e1a00006 mov r0, r6 2dd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2ddc: e285000c add r0, r5, #12 <== NOT EXECUTED 2de0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2de4: e1a02004 mov r2, r4 <== NOT EXECUTED 2de8: ebfffdf9 bl 25d4 <== NOT EXECUTED 2dec: eafffff4 b 2dc4 <== NOT EXECUTED 2df0: 00018fd8 .word 0x00018fd8 00006420 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6420: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 6424: e2108202 ands r8, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6428: e1a04000 mov r4, r0 <== NOT EXECUTED 642c: e1a09001 mov r9, r1 <== NOT EXECUTED 6430: e1a07002 mov r7, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 6434: 0a00000c beq 646c <== NOT EXECUTED { if (rtems_panic_in_progress++) 6438: e59f2160 ldr r2, [pc, #352] ; 65a0 <== NOT EXECUTED 643c: e5923000 ldr r3, [r2] <== NOT EXECUTED 6440: e3530000 cmp r3, #0 <== NOT EXECUTED 6444: e2833001 add r3, r3, #1 <== NOT EXECUTED 6448: e5823000 str r3, [r2] <== NOT EXECUTED 644c: 0a000004 beq 6464 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6450: e59f314c ldr r3, [pc, #332] ; 65a4 <== NOT EXECUTED 6454: e5931000 ldr r1, [r3] <== NOT EXECUTED 6458: e2811001 add r1, r1, #1 <== NOT EXECUTED 645c: e5831000 str r1, [r3] <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 6460: e5923000 ldr r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6464: e3530002 cmp r3, #2 <== NOT EXECUTED 6468: ca00002e bgt 6528 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 646c: e59f5134 ldr r5, [pc, #308] ; 65a8 <== NOT EXECUTED 6470: e5953000 ldr r3, [r5] <== NOT EXECUTED 6474: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 6478: eb0033c5 bl 13394 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 647c: e2146101 ands r6, r4, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 6480: e3c4a207 bic sl, r4, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6484: 1a000038 bne 656c <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6488: e5953000 ldr r3, [r5] <== NOT EXECUTED 648c: e1a02007 mov r2, r7 <== NOT EXECUTED 6490: e1a01009 mov r1, r9 <== NOT EXECUTED 6494: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6498: eb004bde bl 19418 <== NOT EXECUTED if (status) 649c: e35a0000 cmp sl, #0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 64a0: e1a07000 mov r7, r0 <== NOT EXECUTED if (status) 64a4: 1a000025 bne 6540 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 64a8: e3560000 cmp r6, #0 <== NOT EXECUTED 64ac: 0a00000b beq 64e0 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 64b0: da000004 ble 64c8 <== NOT EXECUTED 64b4: e1a00006 mov r0, r6 <== NOT EXECUTED 64b8: eb003786 bl 142d8 <== NOT EXECUTED 64bc: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 64c0: e3530000 cmp r3, #0 <== NOT EXECUTED 64c4: 1a00002b bne 6578 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 64c8: e5953000 ldr r3, [r5] <== NOT EXECUTED 64cc: e59f10d8 ldr r1, [pc, #216] ; 65ac <== NOT EXECUTED 64d0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64d4: e1a02006 mov r2, r6 <== NOT EXECUTED 64d8: eb00346b bl 1368c <== NOT EXECUTED 64dc: e0877000 add r7, r7, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 64e0: e5953000 ldr r3, [r5] <== NOT EXECUTED 64e4: e59f10c4 ldr r1, [pc, #196] ; 65b0 <== NOT EXECUTED 64e8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64ec: eb003466 bl 1368c <== NOT EXECUTED (void) fflush(stderr); 64f0: e5953000 ldr r3, [r5] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 64f4: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 64f8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64fc: eb0033a4 bl 13394 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 6500: e3140203 tst r4, #805306368 ; 0x30000000 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 6504: 008a0007 addeq r0, sl, r7 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 6508: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 650c: e3580000 cmp r8, #0 <== NOT EXECUTED 6510: 0a000006 beq 6530 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 6514: e3a00000 mov r0, #0 <== NOT EXECUTED 6518: e59f1094 ldr r1, [pc, #148] ; 65b4 <== NOT EXECUTED 651c: eb000035 bl 65f8 <== NOT EXECUTED _exit(local_errno); 6520: e1a00006 mov r0, r6 <== NOT EXECUTED 6524: eb00031f bl 71a8 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 6528: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 652c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 6530: e59f1080 ldr r1, [pc, #128] ; 65b8 <== NOT EXECUTED 6534: e1a00008 mov r0, r8 <== NOT EXECUTED 6538: eb00002e bl 65f8 <== NOT EXECUTED abort(); 653c: eb003298 bl 12fa4 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6540: e59f3060 ldr r3, [pc, #96] ; 65a8 <== NOT EXECUTED 6544: e5933000 ldr r3, [r3] <== NOT EXECUTED 6548: e1a0000a mov r0, sl <== NOT EXECUTED 654c: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6550: ebffffae bl 6410 <== NOT EXECUTED 6554: e59f1060 ldr r1, [pc, #96] ; 65bc <== NOT EXECUTED 6558: e1a02000 mov r2, r0 <== NOT EXECUTED 655c: e1a0000a mov r0, sl <== NOT EXECUTED 6560: eb003449 bl 1368c <== NOT EXECUTED 6564: e0877000 add r7, r7, r0 <== NOT EXECUTED 6568: eaffffce b 64a8 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 656c: eb003295 bl 12fc8 <__errno> <== NOT EXECUTED 6570: e5906000 ldr r6, [r0] <== NOT EXECUTED 6574: eaffffc3 b 6488 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6578: e5953000 ldr r3, [r5] <== NOT EXECUTED 657c: e1a00006 mov r0, r6 <== NOT EXECUTED 6580: e593a00c ldr sl, [r3, #12] <== NOT EXECUTED 6584: eb003753 bl 142d8 <== NOT EXECUTED 6588: e59f1030 ldr r1, [pc, #48] ; 65c0 <== NOT EXECUTED 658c: e1a02000 mov r2, r0 <== NOT EXECUTED 6590: e1a0000a mov r0, sl <== NOT EXECUTED 6594: eb00343c bl 1368c <== NOT EXECUTED 6598: e0877000 add r7, r7, r0 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 659c: eaffffcf b 64e0 <== NOT EXECUTED 65a0: 00024840 .word 0x00024840 65a4: 000249cc .word 0x000249cc 65a8: 00021e24 .word 0x00021e24 65ac: 00023650 .word 0x00023650 65b0: 00023164 .word 0x00023164 65b4: 00023664 .word 0x00023664 65b8: 0002367c .word 0x0002367c 65bc: 00023630 .word 0x00023630 65c0: 00023640 .word 0x00023640 000258a4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 258a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 258a8: e3a06000 mov r6, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 258ac: e59f90e8 ldr r9, [pc, #232] ; 2599c limit++; continue; } sign = 1; } if (!isdigit(c)) 258b0: e59f80e8 ldr r8, [pc, #232] ; 259a0 return 0; d = c - '0'; if ((i > (limit / 10)) 258b4: e59fa0e8 ldr sl, [pc, #232] ; 259a4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 258b8: e1a04000 mov r4, r0 258bc: e1a0b001 mov fp, r1 258c0: e3e07102 mvn r7, #-2147483648 ; 0x80000000 258c4: e1a05006 mov r5, r6 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 258c8: e5943004 ldr r3, [r4, #4] 258cc: e2433001 sub r3, r3, #1 258d0: e3530000 cmp r3, #0 258d4: e5843004 str r3, [r4, #4] 258d8: ba00001d blt 25954 258dc: e5943000 ldr r3, [r4] 258e0: e4d30001 ldrb r0, [r3], #1 if (c == ':') 258e4: e350003a cmp r0, #58 ; 0x3a unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 258e8: e5843000 str r3, [r4] if (c == ':') 258ec: 0a00001d beq 25968 break; if (sign == 0) { 258f0: e3560000 cmp r6, #0 258f4: 1a000004 bne 2590c if (c == '-') { 258f8: e350002d cmp r0, #45 ; 0x2d sign = -1; limit++; 258fc: 02877001 addeq r7, r7, #1 25900: 03e06000 mvneq r6, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 25904: 0affffef beq 258c8 sign = -1; limit++; continue; 25908: e3a06001 mov r6, #1 } sign = 1; } if (!isdigit(c)) 2590c: e5983000 ldr r3, [r8] 25910: e0833000 add r3, r3, r0 25914: e5d33001 ldrb r3, [r3, #1] 25918: e3130004 tst r3, #4 2591c: 0a00001c beq 25994 return 0; d = c - '0'; if ((i > (limit / 10)) 25920: e083279a umull r2, r3, sl, r7 25924: e15501a3 cmp r5, r3, lsr #3 25928: 8a000019 bhi 25994 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 2592c: e2400030 sub r0, r0, #48 ; 0x30 25930: 11a03105 lslne r3, r5, #2 if ((i > (limit / 10)) 25934: 0a000011 beq 25980 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 25938: e0835005 add r5, r3, r5 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2593c: e5943004 ldr r3, [r4, #4] 25940: e2433001 sub r3, r3, #1 25944: e3530000 cmp r3, #0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 25948: e0805085 add r5, r0, r5, lsl #1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2594c: e5843004 str r3, [r4, #4] 25950: aaffffe1 bge 258dc 25954: e5990000 ldr r0, [r9] <== NOT EXECUTED 25958: e1a01004 mov r1, r4 <== NOT EXECUTED 2595c: eb0073ad bl 42818 <__srget_r> <== NOT EXECUTED if (c == ':') 25960: e350003a cmp r0, #58 ; 0x3a <== NOT EXECUTED 25964: 1affffe1 bne 258f0 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 25968: e3560000 cmp r6, #0 2596c: 0a000008 beq 25994 return 0; *val = i * sign; 25970: e0030695 mul r3, r5, r6 25974: e3a00001 mov r0, #1 25978: e58b3000 str r3, [fp] return 1; 2597c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 25980: e1a03105 lsl r3, r5, #2 <== NOT EXECUTED 25984: e0832005 add r2, r3, r5 <== NOT EXECUTED 25988: e0472082 sub r2, r7, r2, lsl #1 <== NOT EXECUTED 2598c: e1500002 cmp r0, r2 <== NOT EXECUTED 25990: 9affffe8 bls 25938 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 25994: e3a00000 mov r0, #0 <== NOT EXECUTED } 25998: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2599c: 0005802c .word 0x0005802c 259a0: 00058020 .word 0x00058020 259a4: cccccccd .word 0xcccccccd 000259a8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 259a8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 259ac: e1a05002 mov r5, r2 int c; *name = *bufp; 259b0: e5922000 ldr r2, [r2] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 259b4: e59d7018 ldr r7, [sp, #24] int c; *name = *bufp; 259b8: e5812000 str r2, [r1] for (;;) { c = getc(fp); 259bc: e59f60c4 ldr r6, [pc, #196] ; 25a88 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 259c0: e1a04000 mov r4, r0 259c4: e1a08003 mov r8, r3 259c8: ea000013 b 25a1c int c; *name = *bufp; for (;;) { c = getc(fp); 259cc: e5943000 ldr r3, [r4] 259d0: e4d30001 ldrb r0, [r3], #1 if (c == ':') { 259d4: e350003a cmp r0, #58 ; 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 259d8: e5843000 str r3, [r4] if (c == ':') { 259dc: 0a000018 beq 25a44 if (nlFlag) return 0; break; } if (c == '\n') { 259e0: e350000a cmp r0, #10 259e4: 0a000023 beq 25a78 if (!nlFlag) return 0; break; } if (c == EOF) 259e8: e3700001 cmn r0, #1 259ec: 0a000023 beq 25a80 return 0; if (*nleft < 2) 259f0: e5983000 ldr r3, [r8] 259f4: e3530001 cmp r3, #1 259f8: 9a000020 bls 25a80 return 0; **bufp = c; 259fc: e5953000 ldr r3, [r5] 25a00: e5c30000 strb r0, [r3] ++(*bufp); 25a04: e5952000 ldr r2, [r5] --(*nleft); 25a08: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 25a0c: e2822001 add r2, r2, #1 --(*nleft); 25a10: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 25a14: e5852000 str r2, [r5] --(*nleft); 25a18: e5883000 str r3, [r8] { int c; *name = *bufp; for (;;) { c = getc(fp); 25a1c: e5943004 ldr r3, [r4, #4] 25a20: e2433001 sub r3, r3, #1 25a24: e3530000 cmp r3, #0 25a28: e5843004 str r3, [r4, #4] 25a2c: aaffffe6 bge 259cc 25a30: e5960000 ldr r0, [r6] 25a34: e1a01004 mov r1, r4 25a38: eb007376 bl 42818 <__srget_r> if (c == ':') { 25a3c: e350003a cmp r0, #58 ; 0x3a 25a40: 1affffe6 bne 259e0 if (nlFlag) 25a44: e3570000 cmp r7, #0 25a48: 1a00000c bne 25a80 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 25a4c: e5953000 ldr r3, [r5] 25a50: e3a02000 mov r2, #0 25a54: e5c32000 strb r2, [r3] ++(*bufp); 25a58: e5952000 ldr r2, [r5] --(*nleft); 25a5c: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 25a60: e2822001 add r2, r2, #1 --(*nleft); 25a64: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 25a68: e5852000 str r2, [r5] --(*nleft); 25a6c: e5883000 str r3, [r8] 25a70: e3a00001 mov r0, #1 return 1; 25a74: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 25a78: e3570000 cmp r7, #0 25a7c: 1afffff2 bne 25a4c --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 25a80: e3a00000 mov r0, #0 <== NOT EXECUTED } 25a84: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 25a88: 0005802c .word 0x0005802c 00025a8c : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 25a8c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 25a90: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25a94: e28d5008 add r5, sp, #8 25a98: e28d4004 add r4, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 25a9c: e58d2008 str r2, [sp, #8] 25aa0: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25aa4: e3a06000 mov r6, #0 25aa8: e1a02005 mov r2, r5 25aac: e1a03004 mov r3, r4 25ab0: e58d6000 str r6, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 25ab4: e1a07000 mov r7, r0 25ab8: e1a08001 mov r8, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25abc: ebffffb9 bl 259a8 25ac0: e1500006 cmp r0, r6 25ac4: 1a000002 bne 25ad4 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 25ac8: e3a00000 mov r0, #0 <== NOT EXECUTED } 25acc: e28dd014 add sp, sp, #20 25ad0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 25ad4: e1a00007 mov r0, r7 25ad8: e2881004 add r1, r8, #4 25adc: e1a02005 mov r2, r5 25ae0: e1a03004 mov r3, r4 25ae4: e58d6000 str r6, [sp] 25ae8: ebffffae bl 259a8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25aec: e1500006 cmp r0, r6 25af0: 0afffff4 beq 25ac8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 25af4: e1a00007 mov r0, r7 25af8: e28d1010 add r1, sp, #16 25afc: ebffff68 bl 258a4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25b00: e1500006 cmp r0, r6 25b04: 0affffef beq 25ac8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 25b08: e1a03004 mov r3, r4 25b0c: e1a00007 mov r0, r7 25b10: e1a02005 mov r2, r5 25b14: e3a04001 mov r4, #1 25b18: e28d100c add r1, sp, #12 25b1c: e58d4000 str r4, [sp] 25b20: ebffffa0 bl 259a8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 25b24: e1500006 cmp r0, r6 25b28: 0affffe6 beq 25ac8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 25b2c: e1dd31b0 ldrh r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b30: e59d100c ldr r1, [sp, #12] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 25b34: e1c830b8 strh r3, [r8, #8] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b38: e5d13000 ldrb r3, [r1] 25b3c: e1530006 cmp r3, r6 25b40: 03a04017 moveq r4, #23 25b44: 0a000007 beq 25b68 25b48: e1a02001 mov r2, r1 if(*cp == ',') 25b4c: e353002c cmp r3, #44 ; 0x2c grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b50: e5f23001 ldrb r3, [r2, #1]! if(*cp == ',') memcount++; 25b54: 02844001 addeq r4, r4, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b58: e3530000 cmp r3, #0 25b5c: 1afffffa bne 25b4c 25b60: e1a04104 lsl r4, r4, #2 25b64: e2844013 add r4, r4, #19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 25b68: e59d3004 ldr r3, [sp, #4] 25b6c: e1530004 cmp r3, r4 25b70: 3affffd4 bcc 25ac8 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 25b74: e59d3008 ldr r3, [sp, #8] 25b78: e283300f add r3, r3, #15 25b7c: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 25b80: e5831000 str r1, [r3] /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 25b84: e588300c str r3, [r8, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25b88: e59d200c ldr r2, [sp, #12] 25b8c: e5d23000 ldrb r3, [r2] 25b90: e3530000 cmp r3, #0 25b94: 03a01004 moveq r1, #4 25b98: 0a00000b beq 25bcc 25b9c: e2822001 add r2, r2, #1 25ba0: e3a01001 mov r1, #1 if(*cp == ',') { *cp = '\0'; 25ba4: e3a00000 mov r0, #0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 25ba8: e353002c cmp r3, #44 ; 0x2c *cp = '\0'; 25bac: 05420001 strbeq r0, [r2, #-1] grp->gr_mem[memcount++] = cp + 1; 25bb0: 0598300c ldreq r3, [r8, #12] 25bb4: 07832101 streq r2, [r3, r1, lsl #2] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25bb8: e4d23001 ldrb r3, [r2], #1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 25bbc: 02811001 addeq r1, r1, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 25bc0: e3530000 cmp r3, #0 25bc4: 1afffff7 bne 25ba8 25bc8: e1a01101 lsl r1, r1, #2 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 25bcc: e598300c ldr r3, [r8, #12] 25bd0: e3a02000 mov r2, #0 25bd4: e7832001 str r2, [r3, r1] 25bd8: e3a00001 mov r0, #1 return 1; 25bdc: eaffffba b 25acc 00025c20 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 25c20: e92d41f0 push {r4, r5, r6, r7, r8, lr} 25c24: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25c28: e28d5008 add r5, sp, #8 25c2c: e28d4004 add r4, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 25c30: e58d2008 str r2, [sp, #8] 25c34: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25c38: e3a06000 mov r6, #0 25c3c: e1a02005 mov r2, r5 25c40: e1a03004 mov r3, r4 25c44: e58d6000 str r6, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 25c48: e1a07000 mov r7, r0 25c4c: e1a08001 mov r8, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25c50: ebffff54 bl 259a8 25c54: e1500006 cmp r0, r6 25c58: 1a000002 bne 25c68 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 25c5c: e3a00000 mov r0, #0 <== NOT EXECUTED } 25c60: e28dd014 add sp, sp, #20 25c64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 25c68: e1a00007 mov r0, r7 25c6c: e2881004 add r1, r8, #4 25c70: e1a02005 mov r2, r5 25c74: e1a03004 mov r3, r4 25c78: e58d6000 str r6, [sp] 25c7c: ebffff49 bl 259a8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25c80: e1500006 cmp r0, r6 25c84: 0afffff4 beq 25c5c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 25c88: e1a00007 mov r0, r7 25c8c: e28d1010 add r1, sp, #16 25c90: ebffff03 bl 258a4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25c94: e1500006 cmp r0, r6 25c98: 0affffef beq 25c5c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 25c9c: e1a00007 mov r0, r7 25ca0: e28d100c add r1, sp, #12 25ca4: ebfffefe bl 258a4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25ca8: e1500006 cmp r0, r6 25cac: 0affffea beq 25c5c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 25cb0: e1a00007 mov r0, r7 25cb4: e288100c add r1, r8, #12 25cb8: e1a02005 mov r2, r5 25cbc: e1a03004 mov r3, r4 25cc0: e58d6000 str r6, [sp] 25cc4: ebffff37 bl 259a8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25cc8: e1500006 cmp r0, r6 25ccc: 0affffe2 beq 25c5c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 25cd0: e1a00007 mov r0, r7 25cd4: e2881010 add r1, r8, #16 25cd8: e1a02005 mov r2, r5 25cdc: e1a03004 mov r3, r4 25ce0: e58d6000 str r6, [sp] 25ce4: ebffff2f bl 259a8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25ce8: e1500006 cmp r0, r6 25cec: 0affffda beq 25c5c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 25cf0: e1a00007 mov r0, r7 25cf4: e2881014 add r1, r8, #20 25cf8: e1a02005 mov r2, r5 25cfc: e1a03004 mov r3, r4 25d00: e58d6000 str r6, [sp] 25d04: ebffff27 bl 259a8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25d08: e1500006 cmp r0, r6 25d0c: 0affffd2 beq 25c5c || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 25d10: e1a03004 mov r3, r4 25d14: e1a00007 mov r0, r7 25d18: e1a02005 mov r2, r5 25d1c: e3a04001 mov r4, #1 25d20: e2881018 add r1, r8, #24 25d24: e58d4000 str r4, [sp] 25d28: ebffff1e bl 259a8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 25d2c: e1500006 cmp r0, r6 25d30: 0affffc9 beq 25c5c || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 25d34: e1dd30bc ldrh r3, [sp, #12] 25d38: e1c830ba strh r3, [r8, #10] || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 25d3c: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 25d40: e1a00004 mov r0, r4 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 25d44: e1c830b8 strh r3, [r8, #8] pwd->pw_gid = pwgid; return 1; 25d48: eaffffc4 b 25c60 0002585c : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 2585c: e59f300c ldr r3, [pc, #12] ; 25870 <== NOT EXECUTED 25860: e5933000 ldr r3, [r3] <== NOT EXECUTED 25864: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 25868: e3a00000 mov r0, #0 <== NOT EXECUTED 2586c: e12fff1e bx lr <== NOT EXECUTED 25870: 00057858 .word 0x00057858 00025e6c : return NULL; return &grent; } void setgrent(void) { 25e6c: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 25e70: e59f4020 ldr r4, [pc, #32] ; 25e98 <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 25e74: ebffffc4 bl 25d8c <== NOT EXECUTED if (group_fp != NULL) 25e78: e5940000 ldr r0, [r4] <== NOT EXECUTED 25e7c: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 25e80: 1b005db2 blne 3d550 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 25e84: e59f0010 ldr r0, [pc, #16] ; 25e9c <== NOT EXECUTED 25e88: e59f1010 ldr r1, [pc, #16] ; 25ea0 <== NOT EXECUTED 25e8c: eb005fd2 bl 3dddc <== NOT EXECUTED 25e90: e5840000 str r0, [r4] <== NOT EXECUTED } 25e94: e8bd8010 pop {r4, pc} <== NOT EXECUTED 25e98: 0006513c .word 0x0006513c 25e9c: 0005b838 .word 0x0005b838 25ea0: 00060fd8 .word 0x00060fd8 00026064 : return NULL; return &pwent; } void setpwent(void) { 26064: e92d4010 push {r4, lr} <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 26068: e59f4020 ldr r4, [pc, #32] ; 26090 <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 2606c: ebffff46 bl 25d8c <== NOT EXECUTED if (passwd_fp != NULL) 26070: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 26074: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 26078: 1b005d34 blne 3d550 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 2607c: e59f0010 ldr r0, [pc, #16] ; 26094 <== NOT EXECUTED 26080: e59f1010 ldr r1, [pc, #16] ; 26098 <== NOT EXECUTED 26084: eb005f54 bl 3dddc <== NOT EXECUTED 26088: e5840004 str r0, [r4, #4] <== NOT EXECUTED } 2608c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 26090: 0006513c .word 0x0006513c 26094: 0005b788 .word 0x0005b788 26098: 00060fd8 .word 0x00060fd8 000057d4 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 57d4: e59f300c ldr r3, [pc, #12] ; 57e8 <== NOT EXECUTED 57d8: e5933000 ldr r3, [r3] <== NOT EXECUTED 57dc: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 57e0: e3a00000 mov r0, #0 <== NOT EXECUTED 57e4: e12fff1e bx lr <== NOT EXECUTED 57e8: 00057858 .word 0x00057858 00002cc0 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2cc0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2cc4: e3c33f61 bic r3, r3, #388 ; 0x184 <== NOT EXECUTED 2cc8: e3c33003 bic r3, r3, #3 <== NOT EXECUTED 2ccc: e1a03a03 lsl r3, r3, #20 <== NOT EXECUTED 2cd0: e1a03a23 lsr r3, r3, #20 <== NOT EXECUTED 2cd4: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2cd8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2cdc: e1a04001 mov r4, r1 <== NOT EXECUTED 2ce0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2ce4: 1a000002 bne 2cf4 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 2ce8: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 2cec: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 2cf0: eaffff80 b 2af8 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2cf4: e3a01000 mov r1, #0 <== NOT EXECUTED 2cf8: e1a02001 mov r2, r1 <== NOT EXECUTED 2cfc: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2d00: eb000699 bl 476c <== NOT EXECUTED i = iproc (c, tty); 2d04: e1a01004 mov r1, r4 <== NOT EXECUTED 2d08: e1a00005 mov r0, r5 <== NOT EXECUTED 2d0c: ebffff79 bl 2af8 <== NOT EXECUTED 2d10: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2d14: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2d18: eb0006db bl 488c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2d1c: e1a00005 mov r0, r5 <== NOT EXECUTED 2d20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00006df8 : int _STAT_NAME( const char *path, struct stat *buf ) { 6df8: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6dfc: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 6e00: e24dd018 sub sp, sp, #24 6e04: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6e08: 0a00002f beq 6ecc rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 6e0c: eb00f3fc bl 43e04 6e10: e28d4004 add r4, sp, #4 6e14: e1a01000 mov r1, r0 6e18: e3a0c001 mov ip, #1 6e1c: e1a00006 mov r0, r6 6e20: e3a02000 mov r2, #0 6e24: e1a03004 mov r3, r4 6e28: e58dc000 str ip, [sp] 6e2c: ebfff9e6 bl 55cc 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 6e30: e2501000 subs r1, r0, #0 6e34: 1a000022 bne 6ec4 return -1; if ( !loc.handlers->fstat_h ){ 6e38: e59d300c ldr r3, [sp, #12] 6e3c: e5933018 ldr r3, [r3, #24] 6e40: e3530000 cmp r3, #0 6e44: 0a000013 beq 6e98 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6e48: e3a02048 mov r2, #72 ; 0x48 6e4c: e1a00005 mov r0, r5 6e50: eb00e629 bl 406fc status = (*loc.handlers->fstat_h)( &loc, buf ); 6e54: e1a01005 mov r1, r5 6e58: e59d300c ldr r3, [sp, #12] 6e5c: e1a00004 mov r0, r4 6e60: e1a0e00f mov lr, pc 6e64: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 6e68: e59d3010 ldr r3, [sp, #16] 6e6c: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 6e70: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 6e74: 0a000004 beq 6e8c 6e78: e593301c ldr r3, [r3, #28] 6e7c: e3530000 cmp r3, #0 6e80: 11a00004 movne r0, r4 6e84: 11a0e00f movne lr, pc 6e88: 112fff13 bxne r3 return status; } 6e8c: e1a00005 mov r0, r5 6e90: e28dd018 add sp, sp, #24 6e94: e8bd8070 pop {r4, r5, r6, pc} 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 6e98: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6e9c: e3530000 cmp r3, #0 <== NOT EXECUTED 6ea0: 0a000004 beq 6eb8 <== NOT EXECUTED 6ea4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6ea8: e3530000 cmp r3, #0 <== NOT EXECUTED 6eac: 11a00004 movne r0, r4 <== NOT EXECUTED 6eb0: 11a0e00f movne lr, pc <== NOT EXECUTED 6eb4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6eb8: eb00d957 bl 3d41c <__errno> <== NOT EXECUTED 6ebc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6ec0: e5803000 str r3, [r0] <== NOT EXECUTED 6ec4: e3e05000 mvn r5, #0 6ec8: eaffffef b 6e8c /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 6ecc: eb00d952 bl 3d41c <__errno> 6ed0: e3a0300e mov r3, #14 6ed4: e5803000 str r3, [r0] 6ed8: e3e05000 mvn r5, #0 6edc: eaffffea b 6e8c 00026dac : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 26dac: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 26db0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 26db4: e1a04001 mov r4, r1 <== NOT EXECUTED 26db8: e1a06000 mov r6, r0 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 26dbc: eb007410 bl 43e04 <== NOT EXECUTED 26dc0: e28d5004 add r5, sp, #4 <== NOT EXECUTED 26dc4: e1a01000 mov r1, r0 <== NOT EXECUTED 26dc8: e3a0c001 mov ip, #1 <== NOT EXECUTED 26dcc: e1a00006 mov r0, r6 <== NOT EXECUTED 26dd0: e3a02000 mov r2, #0 <== NOT EXECUTED 26dd4: e1a03005 mov r3, r5 <== NOT EXECUTED 26dd8: e58dc000 str ip, [sp] <== NOT EXECUTED 26ddc: ebff79fa bl 55cc <== NOT EXECUTED 26de0: e3500000 cmp r0, #0 <== NOT EXECUTED 26de4: 1a000028 bne 26e8c <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 26de8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 26dec: e5932028 ldr r2, [r3, #40] ; 0x28 <== NOT EXECUTED 26df0: e5922044 ldr r2, [r2, #68] ; 0x44 <== NOT EXECUTED 26df4: e3520000 cmp r2, #0 <== NOT EXECUTED 26df8: 0a000020 beq 26e80 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 26dfc: e1a02004 mov r2, r4 <== NOT EXECUTED 26e00: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e04: e2822004 add r2, r2, #4 <== NOT EXECUTED 26e08: e5840004 str r0, [r4, #4] <== NOT EXECUTED 26e0c: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e10: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e14: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e18: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e1c: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e20: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e24: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e28: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e2c: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e30: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e34: e4820004 str r0, [r2], #4 <== NOT EXECUTED 26e38: e5820000 str r0, [r2] <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 26e3c: e1a01004 mov r1, r4 <== NOT EXECUTED 26e40: e283001c add r0, r3, #28 <== NOT EXECUTED 26e44: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 26e48: e1a0e00f mov lr, pc <== NOT EXECUTED 26e4c: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26e50: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26e54: e3530000 cmp r3, #0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 26e58: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26e5c: 0a000004 beq 26e74 <== NOT EXECUTED 26e60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26e64: e3530000 cmp r3, #0 <== NOT EXECUTED 26e68: 11a00005 movne r0, r5 <== NOT EXECUTED 26e6c: 11a0e00f movne lr, pc <== NOT EXECUTED 26e70: 112fff13 bxne r3 <== NOT EXECUTED return result; } 26e74: e1a00004 mov r0, r4 <== NOT EXECUTED 26e78: e28dd018 add sp, sp, #24 <== NOT EXECUTED 26e7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 26e80: eb005965 bl 3d41c <__errno> <== NOT EXECUTED 26e84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26e88: e5803000 str r3, [r0] <== NOT EXECUTED 26e8c: e3e04000 mvn r4, #0 <== NOT EXECUTED 26e90: eafffff7 b 26e74 <== NOT EXECUTED 00026e94 : int symlink( const char *actualpath, const char *sympath ) { 26e94: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26e98: e5d13000 ldrb r3, [r1] 26e9c: e353002f cmp r3, #47 ; 0x2f 26ea0: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 26ea4: e24dd018 sub sp, sp, #24 26ea8: e1a0e001 mov lr, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26eac: 13a06000 movne r6, #0 26eb0: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 26eb4: e1a05000 mov r5, r0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26eb8: 0a000001 beq 26ec4 26ebc: e3530000 cmp r3, #0 26ec0: 1a000029 bne 26f6c 26ec4: e59f3104 ldr r3, [pc, #260] ; 26fd0 26ec8: e593c000 ldr ip, [r3] 26ecc: e28cc018 add ip, ip, #24 26ed0: e8bc000f ldm ip!, {r0, r1, r2, r3} 26ed4: e1a0600d mov r6, sp 26ed8: e8a6000f stmia r6!, {r0, r1, r2, r3} if ( !loc.ops->evalformake_h ) { 26edc: e59d300c ldr r3, [sp, #12] 26ee0: e5933004 ldr r3, [r3, #4] rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26ee4: e59c2000 ldr r2, [ip] if ( !loc.ops->evalformake_h ) { 26ee8: e3530000 cmp r3, #0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26eec: e5862000 str r2, [r6] 26ef0: e1a0400d mov r4, sp 26ef4: e3a06001 mov r6, #1 if ( !loc.ops->evalformake_h ) { 26ef8: 0a000028 beq 26fa0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 26efc: e08e0006 add r0, lr, r6 26f00: e1a0100d mov r1, sp 26f04: e28d2014 add r2, sp, #20 26f08: e1a0e00f mov lr, pc 26f0c: e12fff13 bx r3 if ( result != 0 ) 26f10: e3500000 cmp r0, #0 26f14: 1a000024 bne 26fac return -1; if ( !loc.ops->symlink_h ) { 26f18: e59d200c ldr r2, [sp, #12] 26f1c: e5923038 ldr r3, [r2, #56] ; 0x38 26f20: e3530000 cmp r3, #0 26f24: 0a000022 beq 26fb4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 26f28: e1a01005 mov r1, r5 26f2c: e1a0000d mov r0, sp 26f30: e59d2014 ldr r2, [sp, #20] 26f34: e1a0e00f mov lr, pc 26f38: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 26f3c: e59d300c ldr r3, [sp, #12] 26f40: e3530000 cmp r3, #0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 26f44: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 26f48: 0a000004 beq 26f60 26f4c: e593301c ldr r3, [r3, #28] 26f50: e3530000 cmp r3, #0 26f54: 11a0000d movne r0, sp 26f58: 11a0e00f movne lr, pc 26f5c: 112fff13 bxne r3 return result; } 26f60: e1a00005 mov r0, r5 26f64: e28dd018 add sp, sp, #24 26f68: e8bd80f0 pop {r4, r5, r6, r7, pc} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26f6c: e59f305c ldr r3, [pc, #92] ; 26fd0 26f70: e593c000 ldr ip, [r3] 26f74: e28cc004 add ip, ip, #4 26f78: e8bc000f ldm ip!, {r0, r1, r2, r3} 26f7c: e1a0700d mov r7, sp 26f80: e8a7000f stmia r7!, {r0, r1, r2, r3} if ( !loc.ops->evalformake_h ) { 26f84: e59d300c ldr r3, [sp, #12] 26f88: e5933004 ldr r3, [r3, #4] rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26f8c: e59c2000 ldr r2, [ip] if ( !loc.ops->evalformake_h ) { 26f90: e3530000 cmp r3, #0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 26f94: e1a0400d mov r4, sp 26f98: e5872000 str r2, [r7] if ( !loc.ops->evalformake_h ) { 26f9c: 1affffd6 bne 26efc if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 26fa0: eb00591d bl 3d41c <__errno> <== NOT EXECUTED 26fa4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26fa8: e5803000 str r3, [r0] <== NOT EXECUTED 26fac: e3e05000 mvn r5, #0 26fb0: eaffffea b 26f60 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 26fb4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 26fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 26fbc: 0afffff7 beq 26fa0 <== NOT EXECUTED 26fc0: e1a0000d mov r0, sp <== NOT EXECUTED 26fc4: e1a0e00f mov lr, pc <== NOT EXECUTED 26fc8: e12fff13 bx r3 <== NOT EXECUTED 26fcc: eafffff3 b 26fa0 <== NOT EXECUTED 26fd0: 00057858 .word 0x00057858 00011864 : int fd, int opt, struct termios *tp ) { switch (opt) { 11864: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { 11868: e92d4030 push {r4, r5, lr} 1186c: e1a04002 mov r4, r2 11870: e1a05000 mov r5, r0 switch (opt) { 11874: 0a00000b beq 118a8 11878: e3510001 cmp r1, #1 <== NOT EXECUTED 1187c: 0a000004 beq 11894 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 11880: eb000fde bl 15800 <__errno> <== NOT EXECUTED 11884: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 11888: e5803000 str r3, [r0] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 1188c: e3e00000 mvn r0, #0 <== NOT EXECUTED 11890: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 11894: e3a01003 mov r1, #3 <== NOT EXECUTED 11898: e3a02000 mov r2, #0 <== NOT EXECUTED 1189c: eb000c7b bl 14a90 <== NOT EXECUTED 118a0: e3500000 cmp r0, #0 <== NOT EXECUTED 118a4: bafffff8 blt 1188c <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 118a8: e1a00005 mov r0, r5 118ac: e1a02004 mov r2, r4 118b0: e3a01002 mov r1, #2 } } 118b4: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 118b8: ea000c74 b 14a90 0000bf34 : #include int unlink( const char *path ) { bf34: e92d40f0 push {r4, r5, r6, r7, lr} bf38: e24dd02c sub sp, sp, #44 ; 0x2c bf3c: e1a05000 mov r5, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); bf40: ebffd4b5 bl 121c if ( parentpathlen == 0 ) bf44: e2507000 subs r7, r0, #0 bf48: 1a00007d bne c144 rtems_filesystem_get_start_loc( path, &i, &parentloc ); bf4c: e5d53000 ldrb r3, [r5] bf50: e353002f cmp r3, #47 ; 0x2f bf54: 1353005c cmpne r3, #92 ; 0x5c bf58: 1a000049 bne c084 bf5c: e59f326c ldr r3, [pc, #620] ; c1d0 bf60: e593c000 ldr ip, [r3] bf64: e28cc018 add ip, ip, #24 bf68: e8bc000f ldm ip!, {r0, r1, r2, r3} bf6c: e28d4018 add r4, sp, #24 bf70: e1a0e004 mov lr, r4 bf74: e8ae000f stmia lr!, {r0, r1, r2, r3} bf78: e59c2000 ldr r2, [ip] bf7c: e58e2000 str r2, [lr] bf80: e3a06000 mov r6, #0 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; bf84: e1a0e004 mov lr, r4 bf88: e8be000f ldm lr!, {r0, r1, r2, r3} bf8c: e28dc004 add ip, sp, #4 bf90: e8ac000f stmia ip!, {r0, r1, r2, r3} bf94: e59e3000 ldr r3, [lr] name = path + parentpathlen; bf98: e0855007 add r5, r5, r7 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; bf9c: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); bfa0: e1a00005 mov r0, r5 bfa4: eb0004a7 bl d248 bfa8: e1a01000 mov r1, r0 bfac: e1a00005 mov r0, r5 bfb0: ebffd485 bl 11cc bfb4: e0857000 add r7, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), bfb8: e1a00007 mov r0, r7 bfbc: eb0004a1 bl d248 bfc0: e28d5004 add r5, sp, #4 bfc4: e3a0c000 mov ip, #0 bfc8: e1a01000 mov r1, r0 bfcc: e1a0200c mov r2, ip bfd0: e1a00007 mov r0, r7 bfd4: e1a03005 mov r3, r5 bfd8: e58dc000 str ip, [sp] bfdc: ebffd4a8 bl 1284 0, &loc, false ); if ( result != 0 ) { bfe0: e3500000 cmp r0, #0 bfe4: 1a000033 bne c0b8 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { bfe8: e59d2010 ldr r2, [sp, #16] bfec: e5923010 ldr r3, [r2, #16] bff0: e3530000 cmp r3, #0 bff4: 0a00003e beq c0f4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { bff8: e1a00005 mov r0, r5 bffc: e1a0e00f mov lr, pc c000: e12fff13 bx r3 c004: e3500001 cmp r0, #1 c008: 0a000059 beq c174 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { c00c: e59d2010 ldr r2, [sp, #16] c010: e592300c ldr r3, [r2, #12] c014: e3530000 cmp r3, #0 c018: 0a000035 beq c0f4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c01c: e1a00004 mov r0, r4 c020: e1a01005 mov r1, r5 c024: e1a0e00f mov lr, pc c028: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); c02c: e59d3010 ldr r3, [sp, #16] c030: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c034: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); c038: 0a000004 beq c050 c03c: e593301c ldr r3, [r3, #28] c040: e3530000 cmp r3, #0 c044: 11a00005 movne r0, r5 c048: 11a0e00f movne lr, pc c04c: 112fff13 bxne r3 if ( free_parentloc ) c050: e3560000 cmp r6, #0 c054: 0a000007 beq c078 rtems_filesystem_freenode( &parentloc ); c058: e59d3024 ldr r3, [sp, #36] ; 0x24 c05c: e3530000 cmp r3, #0 c060: 0a000004 beq c078 c064: e593301c ldr r3, [r3, #28] c068: e3530000 cmp r3, #0 c06c: 11a00004 movne r0, r4 c070: 11a0e00f movne lr, pc c074: 112fff13 bxne r3 return result; } c078: e1a00007 mov r0, r7 c07c: e28dd02c add sp, sp, #44 ; 0x2c c080: e8bd80f0 pop {r4, r5, r6, r7, pc} */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); c084: e3530000 cmp r3, #0 <== NOT EXECUTED c088: 0affffb3 beq bf5c <== NOT EXECUTED c08c: e59f313c ldr r3, [pc, #316] ; c1d0 <== NOT EXECUTED c090: e593c000 ldr ip, [r3] <== NOT EXECUTED c094: e28cc004 add ip, ip, #4 <== NOT EXECUTED c098: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED c09c: e28d4018 add r4, sp, #24 <== NOT EXECUTED c0a0: e1a0e004 mov lr, r4 <== NOT EXECUTED c0a4: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED c0a8: e59c2000 ldr r2, [ip] <== NOT EXECUTED c0ac: e1a06007 mov r6, r7 <== NOT EXECUTED c0b0: e58e2000 str r2, [lr] <== NOT EXECUTED c0b4: eaffffb2 b bf84 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) c0b8: e3560000 cmp r6, #0 c0bc: 1a000001 bne c0c8 result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); c0c0: e3e07000 mvn r7, #0 <== NOT EXECUTED c0c4: eaffffeb b c078 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); c0c8: e59d3024 ldr r3, [sp, #36] ; 0x24 c0cc: e3530000 cmp r3, #0 c0d0: 0afffffa beq c0c0 c0d4: e593301c ldr r3, [r3, #28] c0d8: e3530000 cmp r3, #0 c0dc: 0afffff7 beq c0c0 c0e0: e1a00004 mov r0, r4 c0e4: e1a0e00f mov lr, pc c0e8: e12fff13 bx r3 c0ec: e3e07000 mvn r7, #0 c0f0: eaffffe0 b c078 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); c0f4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c0f8: e3530000 cmp r3, #0 <== NOT EXECUTED c0fc: 11a00005 movne r0, r5 <== NOT EXECUTED c100: 11a0e00f movne lr, pc <== NOT EXECUTED c104: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) c108: e3560000 cmp r6, #0 <== NOT EXECUTED c10c: 0a000007 beq c130 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); c110: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c114: e3530000 cmp r3, #0 <== NOT EXECUTED c118: 0a000004 beq c130 <== NOT EXECUTED c11c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c120: e3530000 cmp r3, #0 <== NOT EXECUTED c124: 11a00004 movne r0, r4 <== NOT EXECUTED c128: 11a0e00f movne lr, pc <== NOT EXECUTED c12c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); c130: eb000053 bl c284 <__errno> <== NOT EXECUTED c134: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED c138: e5803000 str r3, [r0] <== NOT EXECUTED c13c: e3e07000 mvn r7, #0 <== NOT EXECUTED c140: eaffffcc b c078 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, c144: e28d4018 add r4, sp, #24 c148: e3a0c000 mov ip, #0 c14c: e1a00005 mov r0, r5 c150: e1a01007 mov r1, r7 c154: e3a02002 mov r2, #2 c158: e1a03004 mov r3, r4 c15c: e58dc000 str ip, [sp] c160: ebffd483 bl 1374 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) c164: e3500000 cmp r0, #0 c168: 1affffd4 bne c0c0 c16c: e3a06001 mov r6, #1 c170: eaffff83 b bf84 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); c174: e59d3010 ldr r3, [sp, #16] c178: e3530000 cmp r3, #0 c17c: 0a000004 beq c194 c180: e593301c ldr r3, [r3, #28] c184: e3530000 cmp r3, #0 c188: 11a00005 movne r0, r5 c18c: 11a0e00f movne lr, pc c190: 112fff13 bxne r3 if ( free_parentloc ) c194: e3560000 cmp r6, #0 c198: 0a000007 beq c1bc rtems_filesystem_freenode( &parentloc ); c19c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c1a0: e3530000 cmp r3, #0 <== NOT EXECUTED c1a4: 0a000004 beq c1bc <== NOT EXECUTED c1a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c1ac: e3530000 cmp r3, #0 <== NOT EXECUTED c1b0: 11a00004 movne r0, r4 <== NOT EXECUTED c1b4: 11a0e00f movne lr, pc <== NOT EXECUTED c1b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); c1bc: eb000030 bl c284 <__errno> c1c0: e3a03015 mov r3, #21 c1c4: e5803000 str r3, [r0] c1c8: e3e07000 mvn r7, #0 c1cc: eaffffa9 b c078 c1d0: 00017ce8 .word 0x00017ce8 00008f74 : */ int unmount( const char *path ) { 8f74: e92d4030 push {r4, r5, lr} 8f78: e24dd018 sub sp, sp, #24 8f7c: e1a05000 mov r5, r0 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 8f80: eb00eb9f bl 43e04 8f84: e28d4004 add r4, sp, #4 8f88: e1a01000 mov r1, r0 8f8c: e3a0c001 mov ip, #1 8f90: e1a00005 mov r0, r5 8f94: e3a02000 mov r2, #0 8f98: e1a03004 mov r3, r4 8f9c: e58dc000 str ip, [sp] 8fa0: ebfff189 bl 55cc 8fa4: e3500000 cmp r0, #0 8fa8: 1a000032 bne 9078 return -1; mt_entry = loc.mt_entry; 8fac: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 8fb0: e59d3004 ldr r3, [sp, #4] 8fb4: e595201c ldr r2, [r5, #28] 8fb8: e1520003 cmp r2, r3 8fbc: 1a000049 bne 90e8 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8fc0: e59d3010 ldr r3, [sp, #16] 8fc4: e3530000 cmp r3, #0 8fc8: 0a000004 beq 8fe0 8fcc: e593301c ldr r3, [r3, #28] 8fd0: e3530000 cmp r3, #0 8fd4: 11a00004 movne r0, r4 8fd8: 11a0e00f movne lr, pc 8fdc: 112fff13 bxne r3 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 8fe0: e5953014 ldr r3, [r5, #20] 8fe4: e5933028 ldr r3, [r3, #40] ; 0x28 8fe8: e3530000 cmp r3, #0 8fec: 0a000052 beq 913c fs_root_loc = &mt_entry->mt_fs_root; 8ff0: e5953028 ldr r3, [r5, #40] ; 0x28 8ff4: e593302c ldr r3, [r3, #44] ; 0x2c 8ff8: e3530000 cmp r3, #0 8ffc: 0a00004e beq 913c * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 9000: e59f3148 ldr r3, [pc, #328] ; 9150 9004: e5933000 ldr r3, [r3] 9008: e5933014 ldr r3, [r3, #20] 900c: e1530005 cmp r3, r5 9010: 0a00001b beq 9084 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 9014: e59f1138 ldr r1, [pc, #312] ; 9154 9018: e4913004 ldr r3, [r1], #4 901c: e1530001 cmp r3, r1 9020: 0a00000a beq 9050 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 9024: e595002c ldr r0, [r5, #44] ; 0x2c 9028: e5932018 ldr r2, [r3, #24] 902c: e1520000 cmp r2, r0 9030: 1a000003 bne 9044 9034: ea000012 b 9084 <== NOT EXECUTED 9038: e5932018 ldr r2, [r3, #24] 903c: e1500002 cmp r0, r2 9040: 0a00000f beq 9084 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 9044: e5933000 ldr r3, [r3] /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 9048: e1530001 cmp r3, r1 904c: 1afffff9 bne 9038 * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 9050: e1a00005 mov r0, r5 9054: ebfff250 bl 599c 9058: e3500001 cmp r0, #1 905c: 0a000008 beq 9084 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 9060: e5953014 ldr r3, [r5, #20] 9064: e1a00005 mov r0, r5 9068: e1a0e00f mov lr, pc 906c: e593f028 ldr pc, [r3, #40] ; 0x28 9070: e2504000 subs r4, r0, #0 9074: 0a000007 beq 9098 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 9078: e3e00000 mvn r0, #0 } 907c: e28dd018 add sp, sp, #24 9080: e8bd8030 pop {r4, r5, pc} * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 9084: eb00d0e4 bl 3d41c <__errno> 9088: e3a03010 mov r3, #16 908c: e5803000 str r3, [r0] 9090: e3e00000 mvn r0, #0 9094: eafffff8 b 907c * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 9098: e5953028 ldr r3, [r5, #40] ; 0x28 909c: e1a00005 mov r0, r5 90a0: e1a0e00f mov lr, pc 90a4: e593f02c ldr pc, [r3, #44] ; 0x2c 90a8: e3500000 cmp r0, #0 90ac: 1a00001a bne 911c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 90b0: e1a00005 mov r0, r5 90b4: eb0005a7 bl a758 <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 90b8: e5953014 ldr r3, [r5, #20] 90bc: e3530000 cmp r3, #0 90c0: 0a000004 beq 90d8 90c4: e593301c ldr r3, [r3, #28] 90c8: e3530000 cmp r3, #0 90cc: 12850008 addne r0, r5, #8 90d0: 11a0e00f movne lr, pc 90d4: 112fff13 bxne r3 free( mt_entry ); 90d8: e1a00005 mov r0, r5 90dc: ebfff170 bl 56a4 90e0: e3a00000 mov r0, #0 return 0; 90e4: eaffffe4 b 907c /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 90e8: e59d3010 ldr r3, [sp, #16] 90ec: e3530000 cmp r3, #0 90f0: 0a000004 beq 9108 90f4: e593301c ldr r3, [r3, #28] 90f8: e3530000 cmp r3, #0 90fc: 11a00004 movne r0, r4 9100: 11a0e00f movne lr, pc 9104: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 9108: eb00d0c3 bl 3d41c <__errno> 910c: e3a0300d mov r3, #13 9110: e5803000 str r3, [r0] 9114: e3e00000 mvn r0, #0 9118: eaffffd7 b 907c * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 911c: e1a00005 mov r0, r5 <== NOT EXECUTED 9120: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 9124: e1a0e00f mov lr, pc <== NOT EXECUTED 9128: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 912c: e3500000 cmp r0, #0 <== NOT EXECUTED 9130: 0affffd0 beq 9078 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 9134: e1a00004 mov r0, r4 <== NOT EXECUTED 9138: eb0004c4 bl a450 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 913c: eb00d0b6 bl 3d41c <__errno> <== NOT EXECUTED 9140: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9144: e5803000 str r3, [r0] <== NOT EXECUTED 9148: e3e00000 mvn r0, #0 <== NOT EXECUTED 914c: eaffffca b 907c <== NOT EXECUTED 9150: 00057858 .word 0x00057858 9154: 0006546c .word 0x0006546c 00027060 : int utime( const char *path, const struct utimbuf *times ) { 27060: e92d4070 push {r4, r5, r6, lr} 27064: e24dd018 sub sp, sp, #24 27068: e1a05001 mov r5, r1 2706c: e1a06000 mov r6, r0 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 27070: eb007363 bl 43e04 27074: e28d4004 add r4, sp, #4 27078: e1a01000 mov r1, r0 2707c: e3a0c001 mov ip, #1 27080: e1a00006 mov r0, r6 27084: e3a02000 mov r2, #0 27088: e1a03004 mov r3, r4 2708c: e58dc000 str ip, [sp] 27090: ebff794d bl 55cc 27094: e3500000 cmp r0, #0 27098: 1a00001b bne 2710c return -1; if ( !temp_loc.ops->utime_h ){ 2709c: e59d2010 ldr r2, [sp, #16] 270a0: e5923030 ldr r3, [r2, #48] ; 0x30 270a4: e3530000 cmp r3, #0 270a8: 0a00000f beq 270ec rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 270ac: e8950006 ldm r5, {r1, r2} 270b0: e1a00004 mov r0, r4 270b4: e1a0e00f mov lr, pc 270b8: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 270bc: e59d3010 ldr r3, [sp, #16] 270c0: e3530000 cmp r3, #0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 270c4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 270c8: 0a000004 beq 270e0 270cc: e593301c ldr r3, [r3, #28] 270d0: e3530000 cmp r3, #0 270d4: 11a00004 movne r0, r4 270d8: 11a0e00f movne lr, pc 270dc: 112fff13 bxne r3 return result; } 270e0: e1a00005 mov r0, r5 270e4: e28dd018 add sp, sp, #24 270e8: e8bd8070 pop {r4, r5, r6, pc} if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 270ec: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 270f0: e3530000 cmp r3, #0 <== NOT EXECUTED 270f4: 11a00004 movne r0, r4 <== NOT EXECUTED 270f8: 11a0e00f movne lr, pc <== NOT EXECUTED 270fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 27100: eb0058c5 bl 3d41c <__errno> <== NOT EXECUTED 27104: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 27108: e5803000 str r3, [r0] <== NOT EXECUTED 2710c: e3e05000 mvn r5, #0 27110: eafffff2 b 270e0 000175c8 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 175c8: e59f30bc ldr r3, [pc, #188] ; 1768c 175cc: e5933000 ldr r3, [r3] 175d0: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 175d4: e92d4810 push {r4, fp, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 175d8: 2a00001c bcs 17650 iop = rtems_libio_iop( fd ); 175dc: e59f40ac ldr r4, [pc, #172] ; 17690 175e0: e5944000 ldr r4, [r4] 175e4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 175e8: e5940014 ldr r0, [r4, #20] 175ec: e3100c01 tst r0, #256 ; 0x100 175f0: 0a000016 beq 17650 rtems_libio_check_buffer( buffer ); 175f4: e3510000 cmp r1, #0 175f8: 0a000019 beq 17664 rtems_libio_check_count( count ); 175fc: e3520000 cmp r2, #0 17600: 01a00002 moveq r0, r2 17604: 08bd8810 popeq {r4, fp, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17608: e3100004 tst r0, #4 1760c: 0a000014 beq 17664 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 17610: e594303c ldr r3, [r4, #60] ; 0x3c 17614: e593300c ldr r3, [r3, #12] 17618: e3530000 cmp r3, #0 1761c: 0a000015 beq 17678 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 17620: e1a00004 mov r0, r4 17624: e1a0e00f mov lr, pc 17628: e12fff13 bx r3 if ( rc > 0 ) 1762c: e3500000 cmp r0, #0 17630: d8bd8810 pople {r4, fp, pc} iop->offset += rc; 17634: e284c00c add ip, r4, #12 17638: e89c1800 ldm ip, {fp, ip} 1763c: e09b2000 adds r2, fp, r0 17640: e0ac3fc0 adc r3, ip, r0, asr #31 17644: e584200c str r2, [r4, #12] 17648: e5843010 str r3, [r4, #16] return rc; } 1764c: e8bd8810 pop {r4, fp, pc} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 17650: ebffd30b bl c284 <__errno> <== NOT EXECUTED 17654: e3a03009 mov r3, #9 <== NOT EXECUTED 17658: e5803000 str r3, [r0] <== NOT EXECUTED 1765c: e3e00000 mvn r0, #0 <== NOT EXECUTED 17660: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17664: ebffd306 bl c284 <__errno> <== NOT EXECUTED 17668: e3a03016 mov r3, #22 <== NOT EXECUTED 1766c: e5803000 str r3, [r0] <== NOT EXECUTED 17670: e3e00000 mvn r0, #0 <== NOT EXECUTED 17674: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 17678: ebffd301 bl c284 <__errno> <== NOT EXECUTED 1767c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17680: e5803000 str r3, [r0] <== NOT EXECUTED 17684: e3e00000 mvn r0, #0 <== NOT EXECUTED 17688: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 1768c: 00017b50 .word 0x00017b50 17690: 00019168 .word 0x00019168 00005a9c : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5a9c: e59f317c ldr r3, [pc, #380] ; 5c20 5aa0: e5933000 ldr r3, [r3] 5aa4: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 5aa8: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5aac: e1a05002 mov r5, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5ab0: 2a00004e bcs 5bf0 iop = rtems_libio_iop( fd ); 5ab4: e59f3168 ldr r3, [pc, #360] ; 5c24 5ab8: e5937000 ldr r7, [r3] 5abc: e0877300 add r7, r7, r0, lsl #6 rtems_libio_check_is_open( iop ); 5ac0: e5973014 ldr r3, [r7, #20] 5ac4: e3130c01 tst r3, #256 ; 0x100 5ac8: 0a000048 beq 5bf0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5acc: e3130004 tst r3, #4 5ad0: 0a000040 beq 5bd8 /* * Argument validation on IO vector */ if ( !iov ) 5ad4: e3510000 cmp r1, #0 5ad8: 0a00003e beq 5bd8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 5adc: e3520000 cmp r2, #0 5ae0: da00003c ble 5bd8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 5ae4: e3520b01 cmp r2, #1024 ; 0x400 5ae8: ca00003a bgt 5bd8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 5aec: e597303c ldr r3, [r7, #60] ; 0x3c 5af0: e593300c ldr r3, [r3, #12] 5af4: e3530000 cmp r3, #0 5af8: 0a000043 beq 5c0c rtems_set_errno_and_return_minus_one( ENOTSUP ); 5afc: e1a04001 mov r4, r1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5b00: e3a0cc7f mov ip, #32512 ; 0x7f00 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b04: e3a01000 mov r1, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5b08: e28cc0ff add ip, ip, #255 ; 0xff if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b0c: e1a02004 mov r2, r4 5b10: e3a06001 mov r6, #1 5b14: e1a08001 mov r8, r1 5b18: ea000000 b 5b20 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 5b1c: e1a08003 mov r8, r3 if ( !iov[v].iov_base ) 5b20: e5923000 ldr r3, [r2] 5b24: e3530000 cmp r3, #0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 5b28: e2811001 add r1, r1, #1 if ( !iov[v].iov_base ) 5b2c: 0a000029 beq 5bd8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 5b30: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5b34: e0883000 add r3, r8, r0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 5b38: e3500000 cmp r0, #0 5b3c: 13a06000 movne r6, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5b40: e1580003 cmp r8, r3 5b44: d153000c cmple r3, ip 5b48: d3a08000 movle r8, #0 5b4c: c3a08001 movgt r8, #1 5b50: ca000020 bgt 5bd8 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 5b54: e1550001 cmp r5, r1 5b58: e2822008 add r2, r2, #8 5b5c: caffffee bgt 5b1c } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 5b60: e3560000 cmp r6, #0 <== NOT EXECUTED 5b64: 1a00001f bne 5be8 <== NOT EXECUTED 5b68: e1a08006 mov r8, r6 <== NOT EXECUTED 5b6c: ea000002 b 5b7c <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5b70: e1550006 cmp r5, r6 <== NOT EXECUTED 5b74: e2844008 add r4, r4, #8 <== NOT EXECUTED 5b78: da00001a ble 5be8 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b7c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 5b80: e3520000 cmp r2, #0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5b84: e2866001 add r6, r6, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b88: 0afffff8 beq 5b70 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 5b8c: e5941000 ldr r1, [r4] <== NOT EXECUTED 5b90: e597303c ldr r3, [r7, #60] ; 0x3c <== NOT EXECUTED 5b94: e1a00007 mov r0, r7 <== NOT EXECUTED 5b98: e1a0e00f mov lr, pc <== NOT EXECUTED 5b9c: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 5ba0: e3500000 cmp r0, #0 <== NOT EXECUTED 5ba4: ba000016 blt 5c04 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 5ba8: 0a000006 beq 5bc8 <== NOT EXECUTED iop->offset += bytes; 5bac: e287c00c add ip, r7, #12 <== NOT EXECUTED 5bb0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5bb4: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 5bb8: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 5bbc: e587200c str r2, [r7, #12] <== NOT EXECUTED 5bc0: e5873010 str r3, [r7, #16] <== NOT EXECUTED total += bytes; 5bc4: e0888000 add r8, r8, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 5bc8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 5bcc: e1500003 cmp r0, r3 <== NOT EXECUTED 5bd0: 0affffe6 beq 5b70 <== NOT EXECUTED 5bd4: ea000003 b 5be8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 5bd8: eb002383 bl e9ec <__errno> 5bdc: e3a03016 mov r3, #22 5be0: e5803000 str r3, [r0] 5be4: e3e08000 mvn r8, #0 if (bytes != iov[ v ].iov_len) break; } return total; } 5be8: e1a00008 mov r0, r8 5bec: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5bf0: eb00237d bl e9ec <__errno> 5bf4: e3a03009 mov r3, #9 5bf8: e5803000 str r3, [r0] 5bfc: e3e08000 mvn r8, #0 5c00: eafffff8 b 5be8 if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 5c04: e3e08000 mvn r8, #0 <== NOT EXECUTED 5c08: eafffff6 b 5be8 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c0c: eb002376 bl e9ec <__errno> <== NOT EXECUTED 5c10: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5c14: e5803000 str r3, [r0] <== NOT EXECUTED 5c18: e3e08000 mvn r8, #0 <== NOT EXECUTED 5c1c: eafffff1 b 5be8 <== NOT EXECUTED 5c20: 0001bb10 .word 0x0001bb10 5c24: 0001e57c .word 0x0001e57c