30007920 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 30007920: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 30007924: e5903010 ldr r3, [r0, #16] switch( node->type ) { 30007928: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000792c: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 30007930: e2422001 sub r2, r2, #1 30007934: e3520006 cmp r2, #6 30007938: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000793c: ea000010 b 30007984 <== NOT EXECUTED 30007940: 3000795c .word 0x3000795c <== NOT EXECUTED 30007944: 30007964 .word 0x30007964 <== NOT EXECUTED 30007948: 3000796c .word 0x3000796c <== NOT EXECUTED 3000794c: 3000796c .word 0x3000796c <== NOT EXECUTED 30007950: 30007974 .word 0x30007974 <== NOT EXECUTED 30007954: 30007974 .word 0x30007974 <== NOT EXECUTED 30007958: 3000797c .word 0x3000797c <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000795c: e5933008 ldr r3, [r3, #8] 30007960: ea000006 b 30007980 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 30007964: e59f3020 ldr r3, [pc, #32] ; 3000798c 30007968: ea000004 b 30007980 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000796c: e59f301c ldr r3, [pc, #28] ; 30007990 30007970: ea000002 b 30007980 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 30007974: e5933004 ldr r3, [r3, #4] 30007978: ea000000 b 30007980 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 3000797c: e59f3010 ldr r3, [pc, #16] ; 30007994 30007980: e5803008 str r3, [r0, #8] break; } return 0; } 30007984: e3a00000 mov r0, #0 30007988: e12fff1e bx lr 3000798c: 30018564 .word 0x30018564 30007990: 3001859c .word 0x3001859c 30007994: 3001850c .word 0x3001850c 3000c930 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000c930: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 3000c934: e1a02802 lsl r2, r2, #16 3000c938: e1a01801 lsl r1, r1, #16 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3000c93c: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000c940: e1a07821 lsr r7, r1, #16 3000c944: e1a06822 lsr r6, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000c948: eb000443 bl 3000da5c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000c94c: e1d453bc ldrh r5, [r4, #60] ; 0x3c 3000c950: e3500000 cmp r0, #0 3000c954: 11550000 cmpne r5, r0 3000c958: 03a05000 moveq r5, #0 3000c95c: 13a05001 movne r5, #1 3000c960: 0a000004 beq 3000c978 rtems_set_errno_and_return_minus_one( EPERM ); 3000c964: eb00155e bl 30011ee4 <__errno> <== NOT EXECUTED 3000c968: e3a03001 mov r3, #1 <== NOT EXECUTED 3000c96c: e5803000 str r3, [r0] <== NOT EXECUTED 3000c970: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000c974: ea000007 b 3000c998 <== NOT EXECUTED #endif jnode->st_uid = owner; 3000c978: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; 3000c97c: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); 3000c980: e1a0000d mov r0, sp 3000c984: e1a01005 mov r1, r5 3000c988: ebffd84e bl 30002ac8 3000c98c: e59d3000 ldr r3, [sp] 3000c990: e1a00005 mov r0, r5 3000c994: e5843048 str r3, [r4, #72] ; 0x48 return 0; } 3000c998: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} 3000b278 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000b278: 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 ) 3000b27c: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000b280: e1a05001 mov r5, r1 3000b284: e59d6014 ldr r6, [sp, #20] IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 3000b288: 01a07004 moveq r7, r4 3000b28c: 0a000042 beq 3000b39c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 3000b290: e1a01002 mov r1, r2 3000b294: e59f2108 ldr r2, [pc, #264] ; 3000b3a4 3000b298: e1a00005 mov r0, r5 3000b29c: e5922000 ldr r2, [r2] 3000b2a0: e592202c ldr r2, [r2, #44] ; 0x2c 3000b2a4: e1c32002 bic r2, r3, r2 3000b2a8: ebffffc4 bl 3000b1c0 if ( !node ) 3000b2ac: e2507000 subs r7, r0, #0 3000b2b0: 0a000039 beq 3000b39c return NULL; /* * Set the type specific information */ switch (type) { 3000b2b4: e2455001 sub r5, r5, #1 3000b2b8: e3550006 cmp r5, #6 3000b2bc: 979ff105 ldrls pc, [pc, r5, lsl #2] 3000b2c0: ea000025 b 3000b35c <== NOT EXECUTED 3000b2c4: 3000b2e0 .word 0x3000b2e0 <== NOT EXECUTED 3000b2c8: 3000b304 .word 0x3000b304 <== NOT EXECUTED 3000b2cc: 3000b2fc .word 0x3000b2fc <== NOT EXECUTED 3000b2d0: 3000b2fc .word 0x3000b2fc <== NOT EXECUTED 3000b2d4: 3000b32c .word 0x3000b32c <== NOT EXECUTED 3000b2d8: 3000b314 .word 0x3000b314 <== NOT EXECUTED 3000b2dc: 3000b350 .word 0x3000b350 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000b2e0: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 3000b2e4: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000b2e8: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; 3000b2ec: e3a02000 mov r2, #0 3000b2f0: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); 3000b2f4: e5873058 str r3, [r7, #88] ; 0x58 3000b2f8: ea00001c b 3000b370 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; 3000b2fc: e5963000 ldr r3, [r6] 3000b300: ea000013 b 3000b354 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 3000b304: 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; 3000b308: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; 3000b30c: e5872054 str r2, [r7, #84] ; 0x54 3000b310: ea00000f b 3000b354 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 3000b314: e3a03000 mov r3, #0 <== NOT EXECUTED 3000b318: e3a02000 mov r2, #0 <== NOT EXECUTED 3000b31c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 3000b320: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; 3000b324: e3a03000 mov r3, #0 <== NOT EXECUTED 3000b328: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 3000b32c: 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; 3000b330: e3a01000 mov r1, #0 3000b334: e3a02000 mov r2, #0 3000b338: e5871050 str r1, [r7, #80] ; 0x50 3000b33c: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 3000b340: 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; 3000b344: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; 3000b348: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; 3000b34c: ea000007 b 3000b370 case IMFS_FIFO: node->info.fifo.pipe = NULL; 3000b350: e3a03000 mov r3, #0 3000b354: e5873050 str r3, [r7, #80] ; 0x50 break; 3000b358: ea000004 b 3000b370 default: assert(0); 3000b35c: e59f0044 ldr r0, [pc, #68] ; 3000b3a8 <== NOT EXECUTED 3000b360: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 3000b364: e59f2040 ldr r2, [pc, #64] ; 3000b3ac <== NOT EXECUTED 3000b368: e59f3040 ldr r3, [pc, #64] ; 3000b3b0 <== NOT EXECUTED 3000b36c: ebfff4dc bl 300086e4 <__assert_func> <== NOT EXECUTED /* * 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; 3000b370: e5943010 ldr r3, [r4, #16] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 3000b374: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; 3000b378: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; 3000b37c: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; 3000b380: e5923000 ldr r3, [r2] RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 3000b384: e2800050 add r0, r0, #80 ; 0x50 3000b388: e2833001 add r3, r3, #1 3000b38c: e5823000 str r3, [r2] 3000b390: e1a01007 mov r1, r7 3000b394: e5873038 str r3, [r7, #56] ; 0x38 3000b398: ebffe628 bl 30004c40 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 3000b39c: e1a00007 mov r0, r7 3000b3a0: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000b3a4: 300193f0 .word 0x300193f0 3000b3a8: 30018f53 .word 0x30018f53 3000b3ac: 30018868 .word 0x30018868 3000b3b0: 30018d02 .word 0x30018d02 30002dec : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 30002dec: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 30002df0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30002df4: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 30002df8: 059f00a4 ldreq r0, [pc, #164] ; 30002ea4 30002dfc: 03a01084 moveq r1, #132 ; 0x84 30002e00: 059f20a0 ldreq r2, [pc, #160] ; 30002ea8 30002e04: 059f30a0 ldreq r3, [pc, #160] ; 30002eac 30002e08: 0a000005 beq 30002e24 assert( level >= 0 ); 30002e0c: e3510000 cmp r1, #0 30002e10: aa000004 bge 30002e28 30002e14: e59f0088 ldr r0, [pc, #136] ; 30002ea4 <== NOT EXECUTED 30002e18: e59f2088 ldr r2, [pc, #136] ; 30002ea8 <== NOT EXECUTED 30002e1c: e59f308c ldr r3, [pc, #140] ; 30002eb0 <== NOT EXECUTED 30002e20: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 30002e24: eb0001d7 bl 30003588 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 30002e28: e590304c ldr r3, [r0, #76] ; 0x4c 30002e2c: e3530001 cmp r3, #1 30002e30: 159f006c ldrne r0, [pc, #108] ; 30002ea4 30002e34: 13a01088 movne r1, #136 ; 0x88 30002e38: 159f2068 ldrne r2, [pc, #104] ; 30002ea8 30002e3c: 159f3070 ldrne r3, [pc, #112] ; 30002eb4 30002e40: 1afffff7 bne 30002e24 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30002e44: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 30002e48: e5904050 ldr r4, [r0, #80] ; 0x50 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 30002e4c: e59f8064 ldr r8, [pc, #100] ; 30002eb8 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 30002e50: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 30002e54: ea00000f b 30002e98 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 30002e58: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 30002e5c: e5983000 ldr r3, [r8] !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++ ) 30002e60: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 30002e64: e5931008 ldr r1, [r3, #8] 30002e68: e59f004c ldr r0, [pc, #76] ; 30002ebc 30002e6c: eb003988 bl 30011494 !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++ ) 30002e70: e1560005 cmp r6, r5 30002e74: dafffff8 ble 30002e5c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 30002e78: e1a00004 mov r0, r4 30002e7c: ebffff7e bl 30002c7c if ( the_jnode->type == IMFS_DIRECTORY ) 30002e80: e594304c ldr r3, [r4, #76] ; 0x4c 30002e84: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 30002e88: 01a00004 moveq r0, r4 30002e8c: 01a01007 moveq r1, r7 30002e90: 0bffffd5 bleq 30002dec 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 ) { 30002e94: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 30002e98: e154000a cmp r4, sl 30002e9c: 1affffed bne 30002e58 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 30002ea0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30002ea4: 300220c0 .word 0x300220c0 30002ea8: 30020c78 .word 0x30020c78 30002eac: 30022176 .word 0x30022176 30002eb0: 30022184 .word 0x30022184 30002eb4: 3002218f .word 0x3002218f 30002eb8: 30023128 .word 0x30023128 30002ebc: 300221b5 .word 0x300221b5 30007b28 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30007b28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30007b2c: e24dd044 sub sp, sp, #68 ; 0x44 30007b30: e1a04003 mov r4, r3 30007b34: e58d0000 str r0, [sp] 30007b38: e1a06001 mov r6, r1 30007b3c: e58d2004 str r2, [sp, #4] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30007b40: e5935000 ldr r5, [r3] 30007b44: e3a09001 mov r9, #1 30007b48: e3a07000 mov r7, #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 ); 30007b4c: e28d8008 add r8, sp, #8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007b50: e59fa210 ldr sl, [pc, #528] ; 30007d68 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30007b54: ea000054 b 30007cac type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 30007b58: e59d3000 ldr r3, [sp] 30007b5c: e1a01006 mov r1, r6 30007b60: e0830007 add r0, r3, r7 30007b64: e1a02008 mov r2, r8 30007b68: e28d3040 add r3, sp, #64 ; 0x40 30007b6c: eb0001e7 bl 30008310 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 30007b70: e5943000 ldr r3, [r4] * 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 ); 30007b74: e1a09000 mov r9, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 30007b78: e3530000 cmp r3, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 30007b7c: e59db040 ldr fp, [sp, #64] ; 0x40 i += len; if ( !pathloc->node_access ) 30007b80: 0a000041 beq 30007c8c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30007b84: e3500000 cmp r0, #0 30007b88: 0a000006 beq 30007ba8 if ( node->type == IMFS_DIRECTORY ) 30007b8c: e595104c ldr r1, [r5, #76] ; 0x4c 30007b90: e3510001 cmp r1, #1 30007b94: 1a000003 bne 30007ba8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30007b98: e1a00004 mov r0, r4 30007b9c: ebffff7d bl 30007998 30007ba0: e3500000 cmp r0, #0 30007ba4: 0a000068 beq 30007d4c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 30007ba8: e3590003 cmp r9, #3 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 30007bac: e087700b add r7, r7, fp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 30007bb0: e06b6006 rsb r6, fp, r6 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30007bb4: e5945000 ldr r5, [r4] switch( type ) { 30007bb8: 0a000012 beq 30007c08 30007bbc: e3590004 cmp r9, #4 30007bc0: 0a000036 beq 30007ca0 30007bc4: e3590002 cmp r9, #2 30007bc8: 1a000037 bne 30007cac case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007bcc: e59a3000 ldr r3, [sl] 30007bd0: e5933018 ldr r3, [r3, #24] 30007bd4: e1550003 cmp r5, r3 30007bd8: 0a000033 beq 30007cac /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 30007bdc: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 30007be0: e59e301c ldr r3, [lr, #28] 30007be4: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 30007be8: 028ee008 addeq lr, lr, #8 30007bec: 0a000038 beq 30007cd4 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 30007bf0: e5955008 ldr r5, [r5, #8] 30007bf4: e3550000 cmp r5, #0 30007bf8: 1a000026 bne 30007c98 rtems_set_errno_and_return_minus_one( ENOENT ); 30007bfc: eb001384 bl 3000ca14 <__errno> 30007c00: e5809000 str r9, [r0] 30007c04: ea000053 b 30007d58 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 30007c08: e595304c ldr r3, [r5, #76] ; 0x4c 30007c0c: e3530003 cmp r3, #3 30007c10: 1a000006 bne 30007c30 IMFS_evaluate_hard_link( pathloc, 0 ); 30007c14: e1a00004 mov r0, r4 30007c18: e3a01000 mov r1, #0 30007c1c: ebffff70 bl 300079e4 node = pathloc->node_access; 30007c20: e5945000 ldr r5, [r4] if ( !node ) 30007c24: e3550000 cmp r5, #0 30007c28: 1a000009 bne 30007c54 30007c2c: ea00000b b 30007c60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 30007c30: e3530004 cmp r3, #4 30007c34: 1a000006 bne 30007c54 result = IMFS_evaluate_sym_link( pathloc, 0 ); 30007c38: e1a00004 mov r0, r4 30007c3c: e3a01000 mov r1, #0 30007c40: ebffff7e bl 30007a40 node = pathloc->node_access; if ( result == -1 ) 30007c44: e3700001 cmn r0, #1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 30007c48: e1a0b000 mov fp, r0 node = pathloc->node_access; 30007c4c: e5945000 ldr r5, [r4] if ( result == -1 ) 30007c50: 0a000041 beq 30007d5c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30007c54: e595304c ldr r3, [r5, #76] ; 0x4c 30007c58: e3530001 cmp r3, #1 30007c5c: 0a000002 beq 30007c6c rtems_set_errno_and_return_minus_one( ENOTDIR ); 30007c60: eb00136b bl 3000ca14 <__errno> 30007c64: e3a03014 mov r3, #20 30007c68: ea000039 b 30007d54 /* * 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 ) { 30007c6c: e595e05c ldr lr, [r5, #92] ; 0x5c 30007c70: e35e0000 cmp lr, #0 30007c74: 1a000015 bne 30007cd0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30007c78: e1a00005 mov r0, r5 30007c7c: e1a01008 mov r1, r8 30007c80: eb00017a bl 30008270 if ( !node ) 30007c84: e2505000 subs r5, r0, #0 30007c88: 1a000002 bne 30007c98 rtems_set_errno_and_return_minus_one( ENOENT ); 30007c8c: eb001360 bl 3000ca14 <__errno> 30007c90: e3a03002 mov r3, #2 30007c94: ea00002e b 30007d54 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 30007c98: e5845000 str r5, [r4] 30007c9c: ea000002 b 30007cac case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30007ca0: eb00135b bl 3000ca14 <__errno> 30007ca4: e3a0305b mov r3, #91 ; 0x5b 30007ca8: ea000029 b 30007d54 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30007cac: e3590004 cmp r9, #4 30007cb0: 13590000 cmpne r9, #0 30007cb4: 1affffa7 bne 30007b58 * 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 ) { 30007cb8: e595304c ldr r3, [r5, #76] ; 0x4c 30007cbc: e3530001 cmp r3, #1 30007cc0: 1a000019 bne 30007d2c if ( node->info.directory.mt_fs != NULL ) { 30007cc4: e595e05c ldr lr, [r5, #92] ; 0x5c 30007cc8: e35e0000 cmp lr, #0 30007ccc: 0a000016 beq 30007d2c newloc = node->info.directory.mt_fs->mt_fs_root; 30007cd0: e28ee01c add lr, lr, #28 30007cd4: e28dc02c add ip, sp, #44 ; 0x2c 30007cd8: e8be000f ldm lr!, {r0, r1, r2, r3} 30007cdc: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 30007ce0: e28d502c add r5, sp, #44 ; 0x2c 30007ce4: e8b5000f ldm r5!, {r0, r1, r2, r3} 30007ce8: e1a05004 mov r5, r4 * 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; 30007cec: e59ee000 ldr lr, [lr] *pathloc = newloc; 30007cf0: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30007cf4: e59d1040 ldr r1, [sp, #64] ; 0x40 30007cf8: e59d3000 ldr r3, [sp] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 30007cfc: e585e000 str lr, [r5] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30007d00: e0610007 rsb r0, r1, r7 * 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; 30007d04: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30007d08: e0830000 add r0, r3, r0 30007d0c: e0861001 add r1, r6, r1 30007d10: e59d2004 ldr r2, [sp, #4] 30007d14: e1a03004 mov r3, r4 30007d18: e594c00c ldr ip, [r4, #12] 30007d1c: e1a0e00f mov lr, pc 30007d20: e59cf000 ldr pc, [ip] 30007d24: e1a0b000 mov fp, r0 30007d28: ea00000b b 30007d5c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30007d2c: e1a00004 mov r0, r4 30007d30: ebfffefa bl 30007920 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30007d34: e59d1004 ldr r1, [sp, #4] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30007d38: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30007d3c: e1a00004 mov r0, r4 30007d40: ebffff14 bl 30007998 30007d44: e3500000 cmp r0, #0 30007d48: 1a000003 bne 30007d5c rtems_set_errno_and_return_minus_one( EACCES ); 30007d4c: eb001330 bl 3000ca14 <__errno> 30007d50: e3a0300d mov r3, #13 30007d54: e5803000 str r3, [r0] 30007d58: e3e0b000 mvn fp, #0 return result; } 30007d5c: e1a0000b mov r0, fp 30007d60: e28dd044 add sp, sp, #68 ; 0x44 30007d64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30007d68: 300193f0 .word 0x300193f0 30007e20 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30007e20: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30007e24: e24dd040 sub sp, sp, #64 ; 0x40 30007e28: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30007e2c: e5916000 ldr r6, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30007e30: e58d2000 str r2, [sp] 30007e34: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 30007e38: eb0016e6 bl 3000d9d8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007e3c: e59fa224 ldr sl, [pc, #548] ; 30008068 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 30007e40: e3a05000 mov r5, #0 30007e44: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 30007e48: e1a01008 mov r1, r8 30007e4c: e28d303c add r3, sp, #60 ; 0x3c 30007e50: e0870005 add r0, r7, r5 30007e54: e28d2004 add r2, sp, #4 30007e58: eb00012c bl 30008310 pathlen -= len; i += len; if ( !pathloc->node_access ) 30007e5c: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 30007e60: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 30007e64: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 30007e68: e1a09000 mov r9, r0 pathlen -= len; 30007e6c: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 30007e70: 0a00005f beq 30007ff4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30007e74: e3500000 cmp r0, #0 30007e78: 0a000006 beq 30007e98 if ( node->type == IMFS_DIRECTORY ) 30007e7c: e596104c ldr r1, [r6, #76] ; 0x4c 30007e80: e3510001 cmp r1, #1 30007e84: 1a000003 bne 30007e98 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30007e88: e1a00004 mov r0, r4 30007e8c: ebfffec1 bl 30007998 30007e90: e3500000 cmp r0, #0 30007e94: 0a00006c beq 3000804c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30007e98: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 30007e9c: e085500b add r5, r5, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30007ea0: e1a06003 mov r6, r3 switch( type ) { 30007ea4: e3590004 cmp r9, #4 30007ea8: 979ff109 ldrls pc, [pc, r9, lsl #2] 30007eac: eaffffe5 b 30007e48 <== NOT EXECUTED 30007eb0: 30007fb4 .word 0x30007fb4 <== NOT EXECUTED 30007eb4: 30007e48 .word 0x30007e48 <== NOT EXECUTED 30007eb8: 30007ec4 .word 0x30007ec4 <== NOT EXECUTED 30007ebc: 30007ef8 .word 0x30007ef8 <== NOT EXECUTED 30007ec0: 30007fc0 .word 0x30007fc0 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30007ec4: e59a2000 ldr r2, [sl] 30007ec8: e5922018 ldr r2, [r2, #24] 30007ecc: e1530002 cmp r3, r2 30007ed0: 0affffdc beq 30007e48 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 30007ed4: e594e010 ldr lr, [r4, #16] 30007ed8: e59e201c ldr r2, [lr, #28] 30007edc: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 30007ee0: 028ee008 addeq lr, lr, #8 30007ee4: 0a000018 beq 30007f4c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 30007ee8: e5936008 ldr r6, [r3, #8] 30007eec: e3560000 cmp r6, #0 30007ef0: 1a00002d bne 30007fac 30007ef4: ea00003e b 30007ff4 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 30007ef8: e593304c ldr r3, [r3, #76] ; 0x4c 30007efc: e3530003 cmp r3, #3 30007f00: 0a000001 beq 30007f0c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 30007f04: e3530004 cmp r3, #4 30007f08: 1a000005 bne 30007f24 result = IMFS_evaluate_link( pathloc, 0 ); 30007f0c: e1a00004 mov r0, r4 30007f10: e3a01000 mov r1, #0 30007f14: ebffff94 bl 30007d6c if ( result == -1 ) 30007f18: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30007f1c: e1a06000 mov r6, r0 if ( result == -1 ) 30007f20: 0a00004d beq 3000805c return -1; } node = pathloc->node_access; 30007f24: e5940000 ldr r0, [r4] if ( !node ) 30007f28: e3500000 cmp r0, #0 30007f2c: 0a00003e beq 3000802c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30007f30: e590304c ldr r3, [r0, #76] ; 0x4c 30007f34: e3530001 cmp r3, #1 30007f38: 1a00003b bne 3000802c /* * 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 ) { 30007f3c: e590e05c ldr lr, [r0, #92] ; 0x5c 30007f40: e35e0000 cmp lr, #0 30007f44: 0a000014 beq 30007f9c newloc = node->info.directory.mt_fs->mt_fs_root; 30007f48: e28ee01c add lr, lr, #28 30007f4c: e28dc028 add ip, sp, #40 ; 0x28 30007f50: e8be000f ldm lr!, {r0, r1, r2, r3} 30007f54: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 30007f58: e28d6028 add r6, sp, #40 ; 0x28 30007f5c: e8b6000f ldm r6!, {r0, r1, r2, r3} 30007f60: e1a06004 mov r6, 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; 30007f64: e59ee000 ldr lr, [lr] *pathloc = newloc; 30007f68: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30007f6c: e59d303c ldr r3, [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; 30007f70: e586e000 str lr, [r6] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30007f74: e0635005 rsb r5, r3, r5 * 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; 30007f78: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30007f7c: e0870005 add r0, r7, r5 30007f80: e1a01004 mov r1, r4 30007f84: e59d2000 ldr r2, [sp] 30007f88: e594300c ldr r3, [r4, #12] 30007f8c: e1a0e00f mov lr, pc 30007f90: e593f004 ldr pc, [r3, #4] 30007f94: e1a06000 mov r6, r0 30007f98: ea00002f b 3000805c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30007f9c: e28d1004 add r1, sp, #4 30007fa0: eb0000b2 bl 30008270 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 30007fa4: e2506000 subs r6, r0, #0 30007fa8: 0a000007 beq 30007fcc done = true; else pathloc->node_access = node; 30007fac: e5846000 str r6, [r4] 30007fb0: eaffffa4 b 30007e48 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 30007fb4: eb001296 bl 3000ca14 <__errno> 30007fb8: e3a03011 mov r3, #17 30007fbc: ea000024 b 30008054 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30007fc0: eb001293 bl 3000ca14 <__errno> 30007fc4: e3a0305b mov r3, #91 ; 0x5b 30007fc8: ea000021 b 30008054 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 30007fcc: e59d203c ldr r2, [sp, #60] ; 0x3c 30007fd0: e0873005 add r3, r7, r5 30007fd4: e0625005 rsb r5, r2, r5 30007fd8: e59d2000 ldr r2, [sp] 30007fdc: e0877005 add r7, r7, r5 30007fe0: e5827000 str r7, [r2] /* * 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++) { 30007fe4: ea000005 b 30008000 if ( !IMFS_is_separator( path[ i ] ) ) 30007fe8: e352005c cmp r2, #92 ; 0x5c 30007fec: 1352002f cmpne r2, #47 ; 0x2f 30007ff0: 0a000002 beq 30008000 rtems_set_errno_and_return_minus_one( ENOENT ); 30007ff4: eb001286 bl 3000ca14 <__errno> 30007ff8: e3a03002 mov r3, #2 30007ffc: ea000014 b 30008054 /* * 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++) { 30008000: e5d32000 ldrb r2, [r3] 30008004: e2833001 add r3, r3, #1 30008008: e3520000 cmp r2, #0 3000800c: 1afffff5 bne 30007fe8 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 30008010: e1a00004 mov r0, r4 30008014: ebfffe41 bl 30007920 /* * The returned node must be a directory */ node = pathloc->node_access; 30008018: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000801c: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 30008020: e593304c ldr r3, [r3, #76] ; 0x4c 30008024: e3530001 cmp r3, #1 30008028: 0a000002 beq 30008038 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000802c: eb001278 bl 3000ca14 <__errno> 30008030: e3a03014 mov r3, #20 30008034: ea000006 b 30008054 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 30008038: e1a00004 mov r0, r4 3000803c: e3a01003 mov r1, #3 30008040: ebfffe54 bl 30007998 30008044: e3500000 cmp r0, #0 30008048: 1a000003 bne 3000805c rtems_set_errno_and_return_minus_one( EACCES ); 3000804c: eb001270 bl 3000ca14 <__errno> 30008050: e3a0300d mov r3, #13 30008054: e5803000 str r3, [r0] 30008058: e3e06000 mvn r6, #0 return result; } 3000805c: e1a00006 mov r0, r6 30008060: e28dd040 add sp, sp, #64 ; 0x40 30008064: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30008068: 300193f0 .word 0x300193f0 300079e4 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 300079e4: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079e8: e92d4030 push {r4, r5, lr} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300079ec: e593204c ldr r2, [r3, #76] ; 0x4c int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079f0: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 300079f4: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 300079f8: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 300079fc: 159f0038 ldrne r0, [pc, #56] ; 30007a3c 30007a00: 1bfff3d3 blne 30004954 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 30007a04: e5933050 ldr r3, [r3, #80] ; 0x50 30007a08: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 30007a0c: ebffffc3 bl 30007920 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30007a10: e1a00004 mov r0, r4 30007a14: e1a01005 mov r1, r5 30007a18: ebffffde bl 30007998 30007a1c: e3500000 cmp r0, #0 30007a20: 13a00000 movne r0, #0 30007a24: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 30007a28: eb0013f9 bl 3000ca14 <__errno> <== NOT EXECUTED 30007a2c: e3a0300d mov r3, #13 <== NOT EXECUTED 30007a30: e5803000 str r3, [r0] <== NOT EXECUTED 30007a34: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 30007a38: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30007a3c: abcd0000 .word 0xabcd0000 30007a40 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30007a40: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *jnode = node->node_access; 30007a44: e590e000 ldr lr, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30007a48: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30007a4c: e59e304c ldr r3, [lr, #76] ; 0x4c int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30007a50: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30007a54: e3530004 cmp r3, #4 rtems_fatal_error_occurred (0xABCD0000); 30007a58: 159f00bc ldrne r0, [pc, #188] ; 30007b1c /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30007a5c: 1a000003 bne 30007a70 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 30007a60: e59e3008 ldr r3, [lr, #8] 30007a64: e3530000 cmp r3, #0 30007a68: 1a000001 bne 30007a74 rtems_fatal_error_occurred( 0xBAD00000 ); 30007a6c: e59f00ac ldr r0, [pc, #172] ; 30007b20 <== NOT EXECUTED 30007a70: ebfff3b7 bl 30004954 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 30007a74: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 30007a78: e59e3050 ldr r3, [lr, #80] ; 0x50 30007a7c: e5d33000 ldrb r3, [r3] 30007a80: e353002f cmp r3, #47 ; 0x2f 30007a84: 1353005c cmpne r3, #92 ; 0x5c 30007a88: 13a06000 movne r6, #0 30007a8c: 03a06001 moveq r6, #1 30007a90: 0a000001 beq 30007a9c 30007a94: e3530000 cmp r3, #0 30007a98: 1a000008 bne 30007ac0 30007a9c: e59f3080 ldr r3, [pc, #128] ; 30007b24 30007aa0: e1a07004 mov r7, r4 30007aa4: e593c000 ldr ip, [r3] 30007aa8: e3a06001 mov r6, #1 30007aac: e28cc018 add ip, ip, #24 30007ab0: e8bc000f ldm ip!, {r0, r1, r2, r3} 30007ab4: e8a7000f stmia r7!, {r0, r1, r2, r3} 30007ab8: e59c2000 ldr r2, [ip] 30007abc: e5872000 str r2, [r7] * 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] ), 30007ac0: e59e3050 ldr r3, [lr, #80] ; 0x50 30007ac4: e0836006 add r6, r3, r6 30007ac8: e1a00006 mov r0, r6 30007acc: eb0017c1 bl 3000d9d8 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 30007ad0: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 30007ad4: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 30007ad8: e1a03004 mov r3, r4 30007adc: e1a00006 mov r0, r6 30007ae0: eb000010 bl 30007b28 30007ae4: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 30007ae8: e1a00004 mov r0, r4 30007aec: ebffff8b bl 30007920 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30007af0: e1a00004 mov r0, r4 30007af4: e1a01005 mov r1, r5 30007af8: ebffffa6 bl 30007998 30007afc: e3500000 cmp r0, #0 30007b00: 1a000003 bne 30007b14 rtems_set_errno_and_return_minus_one( EACCES ); 30007b04: eb0013c2 bl 3000ca14 <__errno> <== NOT EXECUTED 30007b08: e3a0300d mov r3, #13 <== NOT EXECUTED 30007b0c: e5803000 str r3, [r0] <== NOT EXECUTED 30007b10: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 30007b14: e1a00006 mov r0, r6 30007b18: e8bd80f0 pop {r4, r5, r6, r7, pc} 30007b1c: abcd0000 .word 0xabcd0000 30007b20: bad00000 .word 0xbad00000 30007b24: 300193f0 .word 0x300193f0 3000b3b4 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000b3b4: e92d4073 push {r0, r1, r4, r5, r6, lr} IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 3000b3b8: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000b3bc: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000b3c0: ebfff57c bl 300089b8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000b3c4: e1d453bc ldrh r5, [r4, #60] ; 0x3c 3000b3c8: e3500000 cmp r0, #0 3000b3cc: 11550000 cmpne r5, r0 3000b3d0: 03a05000 moveq r5, #0 3000b3d4: 13a05001 movne r5, #1 3000b3d8: 0a000004 beq 3000b3f0 rtems_set_errno_and_return_minus_one( EPERM ); 3000b3dc: eb00058c bl 3000ca14 <__errno> <== NOT EXECUTED 3000b3e0: e3a03001 mov r3, #1 <== NOT EXECUTED 3000b3e4: e5803000 str r3, [r0] <== NOT EXECUTED 3000b3e8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000b3ec: ea00000c b 3000b424 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000b3f0: e5943030 ldr r3, [r4, #48] ; 0x30 3000b3f4: e1a06a06 lsl r6, r6, #20 3000b3f8: e3c33eff bic r3, r3, #4080 ; 0xff0 3000b3fc: e3c3300f bic r3, r3, #15 3000b400: e1a06a26 lsr r6, r6, #20 3000b404: e1866003 orr r6, r6, r3 3000b408: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); 3000b40c: e1a0000d mov r0, sp 3000b410: e1a01005 mov r1, r5 3000b414: ebfff56c bl 300089cc 3000b418: e59d3000 ldr r3, [sp] 3000b41c: e1a00005 mov r0, r5 3000b420: e5843048 str r3, [r4, #72] ; 0x48 return 0; } 3000b424: e8bd807c pop {r2, r3, r4, r5, r6, pc} 300081cc : } int IMFS_fifo_close( rtems_libio_t *iop ) { 300081cc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 300081d0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 300081d4: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 300081d8: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 300081dc: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 300081e0: eb000ad5 bl 3000ad3c <== NOT EXECUTED if (! err) { 300081e4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 300081e8: 1a00000c bne 30008220 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 300081ec: e5953014 ldr r3, [r5, #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) 300081f0: e1a00004 mov r0, r4 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 300081f4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300081f8: e5853014 str r3, [r5, #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) 300081fc: eb00021c bl 30008a74 <== NOT EXECUTED 30008200: e3500000 cmp r0, #0 <== NOT EXECUTED 30008204: 1a00000a bne 30008234 <== NOT EXECUTED 30008208: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 3000820c: e3530000 cmp r3, #0 <== NOT EXECUTED 30008210: 1a000007 bne 30008234 <== NOT EXECUTED free(jnode); 30008214: e1a00004 mov r0, r4 <== NOT EXECUTED 30008218: eb00017e bl 30008818 <== NOT EXECUTED 3000821c: ea000004 b 30008234 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 30008220: aa000003 bge 30008234 <== NOT EXECUTED 30008224: eb0011fa bl 3000ca14 <__errno> <== NOT EXECUTED 30008228: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 3000822c: e5806000 str r6, [r0] <== NOT EXECUTED 30008230: e3e06000 mvn r6, #0 <== NOT EXECUTED } 30008234: e1a00006 mov r0, r6 <== NOT EXECUTED 30008238: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 300080b4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 300080b4: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 300080b8: e59f0064 ldr r0, [pc, #100] ; 30008124 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 300080bc: e92d4010 push {r4, lr} <== NOT EXECUTED int err; if (command == FIONBIO) { 300080c0: e1510000 cmp r1, r0 <== NOT EXECUTED 300080c4: 1a00000b bne 300080f8 <== NOT EXECUTED if (buffer == NULL) 300080c8: e3520000 cmp r2, #0 <== NOT EXECUTED 300080cc: 03e0400d mvneq r4, #13 <== NOT EXECUTED 300080d0: 0a00000d beq 3000810c <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 300080d4: e5924000 ldr r4, [r2] <== NOT EXECUTED 300080d8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 300080dc: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 300080e0: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300080e4: 03c22001 biceq r2, r2, #1 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 300080e8: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 300080ec: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300080f0: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 300080f4: ea000008 b 3000811c <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 300080f8: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 300080fc: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 30008100: eb000a23 bl 3000a994 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30008104: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30008108: aa000003 bge 3000811c <== NOT EXECUTED 3000810c: eb001240 bl 3000ca14 <__errno> <== NOT EXECUTED 30008110: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30008114: e5804000 str r4, [r0] <== NOT EXECUTED 30008118: e3e04000 mvn r4, #0 <== NOT EXECUTED } 3000811c: e1a00004 mov r0, r4 <== NOT EXECUTED 30008120: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30008124: 8004667e .word 0x8004667e 3000806c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000806c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30008070: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED 30008074: e58d0000 str r0, [sp] <== NOT EXECUTED 30008078: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 3000807c: eb000a2a bl 3000a92c <== NOT EXECUTED 30008080: e1a03000 mov r3, r0 <== NOT EXECUTED 30008084: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30008088: 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); 3000808c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30008090: aa000004 bge 300080a8 <== NOT EXECUTED 30008094: eb00125e bl 3000ca14 <__errno> <== NOT EXECUTED 30008098: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 3000809c: e5805000 str r5, [r0] <== NOT EXECUTED 300080a0: e3e03000 mvn r3, #0 <== NOT EXECUTED 300080a4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 300080a8: e1a01004 mov r1, r4 <== NOT EXECUTED 300080ac: e1a00003 mov r0, r3 <== NOT EXECUTED 300080b0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 3000817c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000817c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 30008180: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30008184: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 30008188: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 3000818c: eb000a18 bl 3000a9f4 <== NOT EXECUTED if (err > 0) 30008190: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30008194: da000005 ble 300081b0 <== NOT EXECUTED IMFS_update_atime(jnode); 30008198: e1a0000d mov r0, sp <== NOT EXECUTED 3000819c: e3a01000 mov r1, #0 <== NOT EXECUTED 300081a0: eb000209 bl 300089cc <== NOT EXECUTED 300081a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300081a8: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 300081ac: ea000004 b 300081c4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 300081b0: 0a000003 beq 300081c4 <== NOT EXECUTED 300081b4: eb001216 bl 3000ca14 <__errno> <== NOT EXECUTED 300081b8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 300081bc: e5805000 str r5, [r0] <== NOT EXECUTED 300081c0: e3e05000 mvn r5, #0 <== NOT EXECUTED } 300081c4: e1a00005 mov r0, r5 <== NOT EXECUTED 300081c8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 30008128 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 30008128: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 3000812c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 30008130: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 30008134: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 30008138: eb000a89 bl 3000ab64 <== NOT EXECUTED if (err > 0) { 3000813c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30008140: da000006 ble 30008160 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 30008144: e1a0000d mov r0, sp <== NOT EXECUTED 30008148: e3a01000 mov r1, #0 <== NOT EXECUTED 3000814c: eb00021e bl 300089cc <== NOT EXECUTED 30008150: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30008154: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 30008158: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 3000815c: ea000004 b 30008174 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 30008160: 0a000003 beq 30008174 <== NOT EXECUTED 30008164: eb00122a bl 3000ca14 <__errno> <== NOT EXECUTED 30008168: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 3000816c: e5805000 str r5, [r0] <== NOT EXECUTED 30008170: e3e05000 mvn r5, #0 <== NOT EXECUTED } 30008174: e1a00005 mov r0, r5 <== NOT EXECUTED 30008178: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 3000d4e8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d4e8: 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; 3000d4ec: e1a0c000 mov ip, r0 3000d4f0: 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 ) { 3000d4f4: e24dd014 sub sp, sp, #20 * 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; 3000d4f8: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d4fc: e1a05000 mov r5, 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; 3000d500: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d504: e8ae000f stmia lr!, {r0, r1, r2, r3} 3000d508: e59c3000 ldr r3, [ip] 3000d50c: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000d510: e3a03000 mov r3, #0 3000d514: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000d518: e1a0500d mov r5, sp 3000d51c: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 3000d520: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000d524: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000d528: ebfffd98 bl 3000cb90 if ( jnode->type != IMFS_DIRECTORY ) { 3000d52c: e594204c ldr r2, [r4, #76] ; 0x4c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000d530: e2843054 add r3, r4, #84 ; 0x54 3000d534: e3520001 cmp r2, #1 3000d538: 1a000002 bne 3000d548 3000d53c: e5942050 ldr r2, [r4, #80] ; 0x50 3000d540: e1520003 cmp r2, r3 3000d544: 1a000005 bne 3000d560 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 3000d548: e3a00000 mov r0, #0 3000d54c: e1a0100d mov r1, sp 3000d550: ebffd3b5 bl 3000242c if (result != 0) 3000d554: e3500000 cmp r0, #0 3000d558: 1a00000c bne 3000d590 3000d55c: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { 3000d560: e3540000 cmp r4, #0 3000d564: 0a00000b beq 3000d598 if ( jnode->type == IMFS_DIRECTORY ) { 3000d568: e594304c ldr r3, [r4, #76] ; 0x4c 3000d56c: e3530001 cmp r3, #1 3000d570: 1affffe9 bne 3000d51c 3000d574: e5943050 ldr r3, [r4, #80] ; 0x50 3000d578: e2842054 add r2, r4, #84 ; 0x54 3000d57c: e1530002 cmp r3, r2 3000d580: 0affffe5 beq 3000d51c if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3000d584: e2534000 subs r4, r3, #0 3000d588: 1affffe3 bne 3000d51c 3000d58c: ea000001 b 3000d598 <== NOT EXECUTED 3000d590: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d594: ea000000 b 3000d59c <== NOT EXECUTED 3000d598: e3a00000 mov r0, #0 return 0; } 3000d59c: e28dd014 add sp, sp, #20 3000d5a0: e8bd8070 pop {r4, r5, r6, pc} 300083d8 : 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 ) { 300083d8: e92d40f0 push {r4, r5, r6, r7, lr} 300083dc: e1a04000 mov r4, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 300083e0: e59f00c0 ldr r0, [pc, #192] ; 300084a8 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 ) { 300083e4: e1a06002 mov r6, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 300083e8: e5900000 ldr r0, [r0] 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 ) { 300083ec: e1a05003 mov r5, r3 300083f0: e1a07001 mov r7, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 300083f4: e3a02000 mov r2, #0 300083f8: e3a03010 mov r3, #16 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 300083fc: e1530000 cmp r3, r0 30008400: e2822001 add r2, r2, #1 30008404: 0a000003 beq 30008418 30008408: e3520006 cmp r2, #6 3000840c: e1a03083 lsl r3, r3, #1 30008410: 1afffff9 bne 300083fc 30008414: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 30008418: e59f208c ldr r2, [pc, #140] ; 300084ac 3000841c: e5823000 str r3, [r2] /* * 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(); 30008420: eb000b84 bl 3000b238 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; 30008424: e59fe084 ldr lr, [pc, #132] ; 300084b0 30008428: e284c038 add ip, r4, #56 ; 0x38 /* * 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(); 3000842c: 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; 30008430: e8be000f ldm lr!, {r0, r1, r2, r3} 30008434: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008438: e8be000f ldm lr!, {r0, r1, r2, r3} 3000843c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008440: 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; 30008444: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30008448: 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; 3000844c: 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 ) ); 30008450: e3a00001 mov r0, #1 30008454: e3a0100c mov r1, #12 30008458: eb0000b2 bl 30008728 if ( !fs_info ) { 3000845c: e3500000 cmp r0, #0 30008460: 1a000006 bne 30008480 free(temp_mt_entry->mt_fs_root.node_access); 30008464: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 30008468: eb0000ea bl 30008818 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 3000846c: eb001168 bl 3000ca14 <__errno> <== NOT EXECUTED 30008470: e3a0300c mov r3, #12 <== NOT EXECUTED 30008474: e5803000 str r3, [r0] <== NOT EXECUTED 30008478: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000847c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 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; 30008480: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 30008484: e3a03001 mov r3, #1 30008488: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 3000848c: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 30008490: e5806004 str r6, [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; 30008494: 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; 30008498: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 3000849c: eb000924 bl 3000a934 300084a0: e3a00000 mov r0, #0 return 0; } 300084a4: e8bd80f0 pop {r4, r5, r6, r7, pc} 300084a8: 300191fc .word 0x300191fc 300084ac: 30019b10 .word 0x30019b10 300084b0: 30018838 .word 0x30018838 30002134 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30002134: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30002138: 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 */ ) { 3000213c: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30002140: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30002144: e1d333b4 ldrh r3, [r3, #52] ; 0x34 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30002148: e1a05001 mov r5, r1 /* * 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 ) 3000214c: 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 */ ) { 30002150: 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 ) 30002154: 9a000002 bls 30002164 rtems_set_errno_and_return_minus_one( EMLINK ); 30002158: eb003f61 bl 30011ee4 <__errno> 3000215c: e3a0301f mov r3, #31 30002160: ea000012 b 300021b0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 30002164: e1a00002 mov r0, r2 30002168: eb004336 bl 30012e48 3000216c: e28d4004 add r4, sp, #4 30002170: e1a01000 mov r1, r0 30002174: e1a02004 mov r2, r4 30002178: e28d3044 add r3, sp, #68 ; 0x44 3000217c: e1a00006 mov r0, r6 30002180: eb002d2f bl 3000d644 * 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( 30002184: e28dc028 add ip, sp, #40 ; 0x28 30002188: e1a00005 mov r0, r5 3000218c: e1a02004 mov r2, r4 30002190: e3a01003 mov r1, #3 30002194: e59f3054 ldr r3, [pc, #84] ; 300021f0 30002198: e58dc000 str ip, [sp] 3000219c: eb002a2c bl 3000ca54 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 300021a0: e3500000 cmp r0, #0 300021a4: 1a000004 bne 300021bc rtems_set_errno_and_return_minus_one( ENOMEM ); 300021a8: eb003f4d bl 30011ee4 <__errno> <== NOT EXECUTED 300021ac: e3a0300c mov r3, #12 <== NOT EXECUTED 300021b0: e5803000 str r3, [r0] 300021b4: e3e00000 mvn r0, #0 300021b8: ea00000a b 300021e8 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 300021bc: e59d3028 ldr r3, [sp, #40] ; 0x28 IMFS_update_ctime( info.hard_link.link_node ); 300021c0: e28d003c add r0, sp, #60 ; 0x3c 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++; 300021c4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 300021c8: e3a01000 mov r1, #0 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++; 300021cc: e2822001 add r2, r2, #1 300021d0: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 300021d4: eb00023b bl 30002ac8 300021d8: e59d203c ldr r2, [sp, #60] ; 0x3c 300021dc: e59d3028 ldr r3, [sp, #40] ; 0x28 300021e0: e3a00000 mov r0, #0 300021e4: e5832048 str r2, [r3, #72] ; 0x48 return 0; } 300021e8: e28dd048 add sp, sp, #72 ; 0x48 300021ec: e8bd8070 pop {r4, r5, r6, pc} 300021f0: 0000a1ff .word 0x0000a1ff 3001021c : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 3001021c: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 30010220: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 30010224: 059f0060 ldreq r0, [pc, #96] ; 3001028c 30010228: 059f1060 ldreq r1, [pc, #96] ; 30010290 3001022c: 059f2060 ldreq r2, [pc, #96] ; 30010294 30010230: 059f3060 ldreq r3, [pc, #96] ; 30010298 30010234: 0a000006 beq 30010254 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30010238: e593304c ldr r3, [r3, #76] ; 0x4c 3001023c: e3530005 cmp r3, #5 30010240: 0a000004 beq 30010258 30010244: e59f0040 ldr r0, [pc, #64] ; 3001028c <== NOT EXECUTED 30010248: e59f104c ldr r1, [pc, #76] ; 3001029c <== NOT EXECUTED 3001024c: e59f2040 ldr r2, [pc, #64] ; 30010294 <== NOT EXECUTED 30010250: e59f3048 ldr r3, [pc, #72] ; 300102a0 <== NOT EXECUTED 30010254: ebfff587 bl 3000d878 <__assert_func> <== NOT EXECUTED 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 ); 30010258: e3a02001 mov r2, #1 3001025c: ebfffeac bl 3000fd14 if ( *block_entry_ptr ) 30010260: e5904000 ldr r4, [r0] 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 ); 30010264: e1a05000 mov r5, r0 if ( *block_entry_ptr ) 30010268: e3540000 cmp r4, #0 3001026c: 13a00000 movne r0, #0 30010270: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 30010274: ebfffe99 bl 3000fce0 if ( !memory ) 30010278: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; 3001027c: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 30010280: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; 30010284: 11a00004 movne r0, r4 return 0; } 30010288: e8bd8030 pop {r4, r5, pc} 3001028c: 3001ec4d .word 0x3001ec4d 30010290: 00000169 .word 0x00000169 30010294: 3001e3f4 .word 0x3001e3f4 30010298: 3001ec93 .word 0x3001ec93 3001029c: 0000016d .word 0x0000016d 300102a0: 3001ec9d .word 0x3001ec9d 300102a4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 300102a4: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 300102a8: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 300102ac: e1a05001 mov r5, r1 300102b0: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 300102b4: 059f0134 ldreq r0, [pc, #308] ; 300103f0 300102b8: 059f1134 ldreq r1, [pc, #308] ; 300103f4 300102bc: 059f2134 ldreq r2, [pc, #308] ; 300103f8 300102c0: 059f3134 ldreq r3, [pc, #308] ; 300103fc 300102c4: 0a000006 beq 300102e4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 300102c8: e594304c ldr r3, [r4, #76] ; 0x4c 300102cc: e3530005 cmp r3, #5 300102d0: 0a000004 beq 300102e8 300102d4: e59f0114 ldr r0, [pc, #276] ; 300103f0 <== NOT EXECUTED 300102d8: e59f1120 ldr r1, [pc, #288] ; 30010400 <== NOT EXECUTED 300102dc: e59f2114 ldr r2, [pc, #276] ; 300103f8 <== NOT EXECUTED 300102e0: e59f311c ldr r3, [pc, #284] ; 30010404 <== NOT EXECUTED 300102e4: ebfff563 bl 3000d878 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 300102e8: e59f3118 ldr r3, [pc, #280] ; 30010408 300102ec: e593b000 ldr fp, [r3] 300102f0: e3a03000 mov r3, #0 300102f4: e1530002 cmp r3, r2 300102f8: e1a0312b lsr r3, fp, #2 300102fc: e2832001 add r2, r3, #1 30010300: e0010293 mul r1, r3, r2 30010304: e2811001 add r1, r1, #1 30010308: e0020193 mul r2, r3, r1 3001030c: e2422001 sub r2, r2, #1 30010310: e003029b mul r3, fp, r2 30010314: ca000005 bgt 30010330 30010318: 1a000001 bne 30010324 3001031c: e1530005 cmp r3, r5 30010320: 8a000002 bhi 30010330 rtems_set_errno_and_return_minus_one( EINVAL ); 30010324: eb0006ee bl 30011ee4 <__errno> <== NOT EXECUTED 30010328: e3a03016 mov r3, #22 <== NOT EXECUTED 3001032c: ea000025 b 300103c8 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 30010330: e5948054 ldr r8, [r4, #84] ; 0x54 30010334: e5947050 ldr r7, [r4, #80] ; 0x50 30010338: e1560008 cmp r6, r8 3001033c: ca000002 bgt 3001034c 30010340: 1a000028 bne 300103e8 30010344: e1550007 cmp r5, r7 30010348: 9a000026 bls 300103e8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3001034c: e1a0cfcb asr ip, fp, #31 30010350: e1a0300c mov r3, ip 30010354: e1a0200b mov r2, fp 30010358: e1a00005 mov r0, r5 3001035c: e1a01006 mov r1, r6 30010360: e58dc000 str ip, [sp] 30010364: eb002f94 bl 3001c1bc <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010368: e59dc000 ldr ip, [sp] 3001036c: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010370: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010374: e1a0200b mov r2, fp 30010378: e1a00007 mov r0, r7 3001037c: e1a0300c mov r3, ip 30010380: eb002f8d bl 3001c1bc <__divdi3> 30010384: e1a08000 mov r8, r0 30010388: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3001038c: ea000011 b 300103d8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 30010390: e1a00004 mov r0, r4 30010394: e1a01007 mov r1, r7 30010398: ebffff9f bl 3001021c 3001039c: e3500000 cmp r0, #0 300103a0: 0a00000b beq 300103d4 300103a4: ea000003 b 300103b8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 300103a8: e1a01007 mov r1, r7 <== NOT EXECUTED 300103ac: e1a00004 mov r0, r4 <== NOT EXECUTED 300103b0: ebfffefa bl 3000ffa0 <== 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-- ) { 300103b4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 300103b8: e1570008 cmp r7, r8 <== NOT EXECUTED 300103bc: 2afffff9 bcs 300103a8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 300103c0: eb0006c7 bl 30011ee4 <__errno> <== NOT EXECUTED 300103c4: e3a0301c mov r3, #28 <== NOT EXECUTED 300103c8: e5803000 str r3, [r0] <== NOT EXECUTED 300103cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 300103d0: ea000005 b 300103ec <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 300103d4: e2877001 add r7, r7, #1 300103d8: e157000a cmp r7, sl 300103dc: 9affffeb bls 30010390 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 300103e0: e5846054 str r6, [r4, #84] ; 0x54 300103e4: e5845050 str r5, [r4, #80] ; 0x50 300103e8: e3a00000 mov r0, #0 return 0; } 300103ec: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} 300103f0: 3001ec4d .word 0x3001ec4d 300103f4: 00000131 .word 0x00000131 300103f8: 3001e40c .word 0x3001e40c 300103fc: 3001ec93 .word 0x3001ec93 30010400: 00000135 .word 0x00000135 30010404: 3001ec9d .word 0x3001ec9d 30010408: 3001f7ec .word 0x3001f7ec 3000fd14 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000fd14: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 3000fd18: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000fd1c: e1a06001 mov r6, r1 3000fd20: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 3000fd24: 059f01e4 ldreq r0, [pc, #484] ; 3000ff10 3000fd28: 03a01fe2 moveq r1, #904 ; 0x388 3000fd2c: 059f21e0 ldreq r2, [pc, #480] ; 3000ff14 3000fd30: 059f31e0 ldreq r3, [pc, #480] ; 3000ff18 3000fd34: 0a000006 beq 3000fd54 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 3000fd38: e594304c ldr r3, [r4, #76] ; 0x4c 3000fd3c: e3530005 cmp r3, #5 3000fd40: 0a000004 beq 3000fd58 3000fd44: e59f01c4 ldr r0, [pc, #452] ; 3000ff10 <== NOT EXECUTED 3000fd48: e59f21c4 ldr r2, [pc, #452] ; 3000ff14 <== NOT EXECUTED 3000fd4c: e59f31c8 ldr r3, [pc, #456] ; 3000ff1c <== NOT EXECUTED 3000fd50: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED 3000fd54: ebfff6c7 bl 3000d878 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000fd58: e59f31c0 ldr r3, [pc, #448] ; 3000ff20 3000fd5c: e5935000 ldr r5, [r3] 3000fd60: e1a05125 lsr r5, r5, #2 3000fd64: e2453001 sub r3, r5, #1 3000fd68: e1510003 cmp r1, r3 3000fd6c: 8a00000e bhi 3000fdac fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 3000fd70: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 3000fd74: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { 3000fd78: 0a000007 beq 3000fd9c if ( !p ) { 3000fd7c: e3500000 cmp r0, #0 3000fd80: 1a000003 bne 3000fd94 p = memfile_alloc_block(); 3000fd84: ebffffd5 bl 3000fce0 if ( !p ) 3000fd88: e3500000 cmp r0, #0 3000fd8c: 0a00005d beq 3000ff08 return 0; info->indirect = p; 3000fd90: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000fd94: e5940058 ldr r0, [r4, #88] ; 0x58 3000fd98: ea000001 b 3000fda4 } if ( !p ) 3000fd9c: e3500000 cmp r0, #0 3000fda0: 0a000058 beq 3000ff08 return 0; return &info->indirect[ my_block ]; 3000fda4: e0800106 add r0, r0, r6, lsl #2 3000fda8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000fdac: e2852001 add r2, r5, #1 <== NOT EXECUTED 3000fdb0: e0030295 mul r3, r5, r2 <== NOT EXECUTED 3000fdb4: e2432001 sub r2, r3, #1 <== NOT EXECUTED 3000fdb8: e1510002 cmp r1, r2 <== NOT EXECUTED 3000fdbc: 8a00001a bhi 3000fe2c <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 3000fdc0: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fdc4: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fdc8: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fdcc: eb002e33 bl 3001b6a0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fdd0: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fdd4: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fdd8: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fddc: eb002d9b bl 3001b450 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 3000fde0: e3580000 cmp r8, #0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fde4: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; 3000fde8: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { 3000fdec: 0a000008 beq 3000fe14 <== NOT EXECUTED if ( !p ) { 3000fdf0: e3530000 cmp r3, #0 <== NOT EXECUTED 3000fdf4: 1a000003 bne 3000fe08 <== NOT EXECUTED p = memfile_alloc_block(); 3000fdf8: ebffffb8 bl 3000fce0 <== NOT EXECUTED if ( !p ) 3000fdfc: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000fe00: 0a000040 beq 3000ff08 <== NOT EXECUTED return 0; info->doubly_indirect = p; 3000fe04: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 3000fe08: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED 3000fe0c: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED 3000fe10: ea00002d b 3000fecc <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000fe14: e3530000 cmp r3, #0 <== NOT EXECUTED 3000fe18: 0a00003a beq 3000ff08 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 3000fe1c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) 3000fe20: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fe24: 1a000035 bne 3000ff00 <== NOT EXECUTED 3000fe28: ea000036 b 3000ff08 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000fe2c: e2831001 add r1, r3, #1 <== NOT EXECUTED 3000fe30: e0020195 mul r2, r5, r1 <== NOT EXECUTED 3000fe34: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3000fe38: e1560002 cmp r6, r2 <== NOT EXECUTED 3000fe3c: 8a000031 bhi 3000ff08 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 3000fe40: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fe44: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fe48: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fe4c: eb002e13 bl 3001b6a0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fe50: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fe54: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fe58: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fe5c: eb002d7b bl 3001b450 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000fe60: 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; 3000fe64: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000fe68: eb002d78 bl 3001b450 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fe6c: 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; 3000fe70: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fe74: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fe78: eb002e08 bl 3001b6a0 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 3000fe7c: e3580000 cmp r8, #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; 3000fe80: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 3000fe84: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 3000fe88: 0a000016 beq 3000fee8 <== NOT EXECUTED if ( !p ) { 3000fe8c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000fe90: 1a000003 bne 3000fea4 <== NOT EXECUTED p = memfile_alloc_block(); 3000fe94: ebffff91 bl 3000fce0 <== NOT EXECUTED if ( !p ) 3000fe98: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000fe9c: 0a000019 beq 3000ff08 <== NOT EXECUTED return 0; info->triply_indirect = p; 3000fea0: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 3000fea4: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED 3000fea8: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { 3000feac: e3520000 cmp r2, #0 <== NOT EXECUTED 3000feb0: 1a000003 bne 3000fec4 <== NOT EXECUTED p1 = memfile_alloc_block(); 3000feb4: ebffff89 bl 3000fce0 <== NOT EXECUTED if ( !p1 ) 3000feb8: e2502000 subs r2, r0, #0 <== NOT EXECUTED 3000febc: 0a000011 beq 3000ff08 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 3000fec0: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 3000fec4: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED 3000fec8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { 3000fecc: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fed0: 1a00000a bne 3000ff00 <== NOT EXECUTED p2 = memfile_alloc_block(); 3000fed4: ebffff81 bl 3000fce0 <== NOT EXECUTED if ( !p2 ) 3000fed8: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 3000fedc: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000fee0: 1a000006 bne 3000ff00 <== NOT EXECUTED 3000fee4: ea000007 b 3000ff08 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000fee8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000feec: 0a000005 beq 3000ff08 <== 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 ]; 3000fef0: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 3000fef4: e3530000 cmp r3, #0 <== NOT EXECUTED 3000fef8: 0a000002 beq 3000ff08 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 3000fefc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED 3000ff00: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 3000ff04: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3000ff08: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 3000ff0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 3000ff10: 3001ec4d .word 0x3001ec4d 3000ff14: 3001e384 .word 0x3001e384 3000ff18: 3001ec93 .word 0x3001ec93 3000ff1c: 3001ec9d .word 0x3001ec9d 3000ff20: 3001f7ec .word 0x3001f7ec 30010824 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 30010824: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30010828: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3001082c: e1a06003 mov r6, r3 30010830: e1a08001 mov r8, r1 30010834: e1a09002 mov r9, r2 30010838: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 3001083c: 059f024c ldreq r0, [pc, #588] ; 30010a90 30010840: 03a01f93 moveq r1, #588 ; 0x24c 30010844: 059f2248 ldreq r2, [pc, #584] ; 30010a94 30010848: 059f3248 ldreq r3, [pc, #584] ; 30010a98 3001084c: 0a000007 beq 30010870 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 30010850: e594304c ldr r3, [r4, #76] ; 0x4c 30010854: e2432005 sub r2, r3, #5 30010858: e3520001 cmp r2, #1 3001085c: 9a000004 bls 30010874 30010860: e59f0228 ldr r0, [pc, #552] ; 30010a90 <== NOT EXECUTED 30010864: e59f1230 ldr r1, [pc, #560] ; 30010a9c <== NOT EXECUTED 30010868: e59f2224 ldr r2, [pc, #548] ; 30010a94 <== NOT EXECUTED 3001086c: e59f322c ldr r3, [pc, #556] ; 30010aa0 <== NOT EXECUTED 30010870: ebfff400 bl 3000d878 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 30010874: e3560000 cmp r6, #0 30010878: 059f0210 ldreq r0, [pc, #528] ; 30010a90 3001087c: 059f1220 ldreq r1, [pc, #544] ; 30010aa4 30010880: 059f220c ldreq r2, [pc, #524] ; 30010a94 30010884: 059f321c ldreq r3, [pc, #540] ; 30010aa8 30010888: 0afffff8 beq 30010870 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 3001088c: e3570000 cmp r7, #0 30010890: 1a000004 bne 300108a8 rtems_set_errno_and_return_minus_one( EINVAL ); 30010894: eb000592 bl 30011ee4 <__errno> <== NOT EXECUTED 30010898: e3a03016 mov r3, #22 <== NOT EXECUTED 3001089c: e5803000 str r3, [r0] <== NOT EXECUTED 300108a0: e3e07000 mvn r7, #0 <== NOT EXECUTED 300108a4: ea000077 b 30010a88 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 300108a8: e3530006 cmp r3, #6 300108ac: 1a000012 bne 300108fc unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 300108b0: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED 300108b4: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED 300108b8: e1a0200a mov r2, sl <== NOT EXECUTED 300108bc: e1a0300b mov r3, fp <== NOT EXECUTED 300108c0: e3a01000 mov r1, #0 <== NOT EXECUTED 300108c4: e0522008 subs r2, r2, r8 <== NOT EXECUTED 300108c8: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED 300108cc: e1510003 cmp r1, r3 <== 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; 300108d0: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 300108d4: ca000002 bgt 300108e4 <== NOT EXECUTED 300108d8: 1a000002 bne 300108e8 <== NOT EXECUTED 300108dc: e1570002 cmp r7, r2 <== NOT EXECUTED 300108e0: 9a000000 bls 300108e8 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 300108e4: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 300108e8: e0811008 add r1, r1, r8 <== NOT EXECUTED 300108ec: e1a00006 mov r0, r6 <== NOT EXECUTED 300108f0: e1a02007 mov r2, r7 <== NOT EXECUTED 300108f4: eb000788 bl 3001271c <== NOT EXECUTED 300108f8: ea00005d b 30010a74 <== NOT EXECUTED * 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 ) 300108fc: e5943054 ldr r3, [r4, #84] ; 0x54 30010900: e3a02000 mov r2, #0 30010904: e1520003 cmp r2, r3 30010908: e5945050 ldr r5, [r4, #80] ; 0x50 /* * 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; 3001090c: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 30010910: e0872001 add r2, r7, r1 30010914: ca000004 bgt 3001092c 30010918: 1a000001 bne 30010924 3001091c: e1520005 cmp r2, r5 30010920: 8a000001 bhi 3001092c 30010924: e1a05007 mov r5, r7 <== NOT EXECUTED 30010928: ea000000 b 30010930 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 3001092c: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010930: e59f3174 ldr r3, [pc, #372] ; 30010aac 30010934: e1a00008 mov r0, r8 30010938: e593a000 ldr sl, [r3] 3001093c: e1a01009 mov r1, r9 30010940: e1a0b00a mov fp, sl 30010944: e1a0cfcb asr ip, fp, #31 30010948: e1a0300c mov r3, ip 3001094c: e1a0200b mov r2, fp 30010950: e58dc000 str ip, [sp] 30010954: eb002f42 bl 3001c664 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010958: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3001095c: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010960: e1a01009 mov r1, r9 30010964: e1a00008 mov r0, r8 30010968: e1a0200b mov r2, fp 3001096c: e1a0300c mov r3, ip 30010970: eb002e11 bl 3001c1bc <__divdi3> if ( start_offset ) { 30010974: e3570000 cmp r7, #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; 30010978: e1a08000 mov r8, r0 if ( start_offset ) { 3001097c: 0a000013 beq 300109d0 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 ); 30010980: e1a00004 mov r0, r4 30010984: e1a01008 mov r1, r8 30010988: e3a02000 mov r2, #0 3001098c: ebfffce0 bl 3000fd14 assert( block_ptr ); 30010990: e3500000 cmp r0, #0 30010994: 059f00f4 ldreq r0, [pc, #244] ; 30010a90 30010998: 059f1110 ldreq r1, [pc, #272] ; 30010ab0 3001099c: 0a00002c beq 30010a54 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 300109a0: 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; 300109a4: e067a00a rsb sl, r7, sl 300109a8: e155000a cmp r5, sl 300109ac: 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 ); 300109b0: e0811007 add r1, r1, r7 300109b4: e1a00006 mov r0, r6 300109b8: e1a0200a mov r2, sl 300109bc: eb000756 bl 3001271c dest += to_copy; 300109c0: e086600a add r6, r6, sl block++; 300109c4: e2888001 add r8, r8, #1 my_length -= to_copy; 300109c8: e06a5005 rsb r5, sl, r5 300109cc: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 300109d0: e59f30d4 ldr r3, [pc, #212] ; 30010aac while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300109d4: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 300109d8: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300109dc: ea00000f b 30010a20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300109e0: e1a00004 mov r0, r4 300109e4: e1a01008 mov r1, r8 300109e8: e3a02000 mov r2, #0 300109ec: ebfffcc8 bl 3000fd14 assert( block_ptr ); 300109f0: e3500000 cmp r0, #0 300109f4: 059f0094 ldreq r0, [pc, #148] ; 30010a90 300109f8: 059f10b4 ldreq r1, [pc, #180] ; 30010ab4 300109fc: 0a000014 beq 30010a54 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 30010a00: e5901000 ldr r1, [r0] 30010a04: e1a0200a mov r2, sl 30010a08: e1a00006 mov r0, r6 30010a0c: eb000742 bl 3001271c dest += to_copy; 30010a10: e086600a add r6, r6, sl block++; 30010a14: e2888001 add r8, r8, #1 my_length -= to_copy; 30010a18: e06a5005 rsb r5, sl, r5 copied += to_copy; 30010a1c: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010a20: e5993000 ldr r3, [r9] 30010a24: e1550003 cmp r5, r3 30010a28: 2affffec bcs 300109e0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 30010a2c: e3550000 cmp r5, #0 30010a30: 0a00000f beq 30010a74 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010a34: e1a01008 mov r1, r8 30010a38: e1a00004 mov r0, r4 30010a3c: e3a02000 mov r2, #0 30010a40: ebfffcb3 bl 3000fd14 assert( block_ptr ); 30010a44: e2503000 subs r3, r0, #0 30010a48: 1a000004 bne 30010a60 30010a4c: e59f003c ldr r0, [pc, #60] ; 30010a90 <== NOT EXECUTED 30010a50: e59f1060 ldr r1, [pc, #96] ; 30010ab8 <== NOT EXECUTED 30010a54: e59f2038 ldr r2, [pc, #56] ; 30010a94 <== NOT EXECUTED 30010a58: e59f305c ldr r3, [pc, #92] ; 30010abc <== NOT EXECUTED 30010a5c: eaffff83 b 30010870 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 30010a60: e1a00006 mov r0, r6 30010a64: e5931000 ldr r1, [r3] 30010a68: e1a02005 mov r2, r5 30010a6c: eb00072a bl 3001271c copied += my_length; 30010a70: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); 30010a74: e28d0004 add r0, sp, #4 30010a78: e3a01000 mov r1, #0 30010a7c: ebffc811 bl 30002ac8 30010a80: e59d3004 ldr r3, [sp, #4] 30010a84: e5843040 str r3, [r4, #64] ; 0x40 return copied; } 30010a88: e1a00007 mov r0, r7 30010a8c: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 30010a90: 3001ec4d .word 0x3001ec4d 30010a94: 3001e434 .word 0x3001e434 30010a98: 3001ec93 .word 0x3001ec93 30010a9c: 00000251 .word 0x00000251 30010aa0: 3001ed07 .word 0x3001ed07 30010aa4: 0000025a .word 0x0000025a 30010aa8: 3001ed52 .word 0x3001ed52 30010aac: 3001f7ec .word 0x3001f7ec 30010ab0: 00000296 .word 0x00000296 30010ab4: 000002a7 .word 0x000002a7 30010ab8: 000002b9 .word 0x000002b9 30010abc: 3001eccd .word 0x3001eccd 3000ffec : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000ffec: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 3000fff0: e2504000 subs r4, r0, #0 3000fff4: 059f012c ldreq r0, [pc, #300] ; 30010128 3000fff8: 059f112c ldreq r1, [pc, #300] ; 3001012c 3000fffc: 059f212c ldreq r2, [pc, #300] ; 30010130 30010000: 059f312c ldreq r3, [pc, #300] ; 30010134 30010004: 0a000006 beq 30010024 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30010008: e594304c ldr r3, [r4, #76] ; 0x4c 3001000c: e3530005 cmp r3, #5 30010010: 0a000004 beq 30010028 30010014: e59f010c ldr r0, [pc, #268] ; 30010128 <== NOT EXECUTED 30010018: e59f1118 ldr r1, [pc, #280] ; 30010138 <== NOT EXECUTED 3001001c: e59f210c ldr r2, [pc, #268] ; 30010130 <== NOT EXECUTED 30010020: e59f3114 ldr r3, [pc, #276] ; 3001013c <== NOT EXECUTED 30010024: ebfff613 bl 3000d878 <__assert_func> <== NOT EXECUTED /* * 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; 30010028: e59f2110 ldr r2, [pc, #272] ; 30010140 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 3001002c: e5943058 ldr r3, [r4, #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; 30010030: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 30010034: 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; 30010038: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 3001003c: 12840058 addne r0, r4, #88 ; 0x58 30010040: 11a01005 movne r1, r5 30010044: 1bffffb6 blne 3000ff24 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 30010048: e594305c ldr r3, [r4, #92] ; 0x5c 3001004c: e3530000 cmp r3, #0 30010050: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 30010058: 1a000008 bne 30010080 3001005c: ea00000d b 30010098 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 30010060: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 30010064: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED 30010068: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 3001006c: e3520000 cmp r2, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 30010070: 10830000 addne r0, r3, r0 <== NOT EXECUTED 30010074: 11a01005 movne r1, r5 <== NOT EXECUTED 30010078: 1bffffa9 blne 3000ff24 <== 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 ); 3001008c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 30010090: e1a01005 mov r1, r5 <== NOT EXECUTED 30010094: ebffffa2 bl 3000ff24 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 30010098: e5943060 ldr r3, [r4, #96] ; 0x60 3001009c: e3530000 cmp r3, #0 300100a0: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 300100a8: 1a000016 bne 30010108 300100ac: ea00001b b 30010120 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 300100b0: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 300100b4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 300100b8: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 300100bc: e3570000 cmp r7, #0 <== NOT EXECUTED 300100c0: 0a000013 beq 30010114 <== NOT EXECUTED 300100c4: e3a08000 mov r8, #0 <== NOT EXECUTED 300100c8: ea000006 b 300100e8 <== NOT EXECUTED break; for ( j=0 ; j <== 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 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 300100f4: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 300100f8: e1a01005 mov r1, r5 <== NOT EXECUTED 300100fc: e0800009 add r0, r0, r9 <== NOT EXECUTED 30010100: ebffff87 bl 3000ff24 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 30010114: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 30010118: e1a01005 mov r1, r5 <== NOT EXECUTED 3001011c: ebffff80 bl 3000ff24 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 30010120: e3a00000 mov r0, #0 30010124: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30010128: 3001ec4d .word 0x3001ec4d 3001012c: 000001ee .word 0x000001ee 30010130: 3001e3e0 .word 0x3001e3e0 30010134: 3001ec93 .word 0x3001ec93 30010138: 000001f2 .word 0x000001f2 3001013c: 3001ec9d .word 0x3001ec9d 30010140: 3001f7ec .word 0x3001f7ec 3000ffa0 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3000ffa0: 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 ); 3000ffa4: e3a02000 mov r2, #0 <== NOT EXECUTED 3000ffa8: ebffff59 bl 3000fd14 <== NOT EXECUTED assert( block_ptr ); 3000ffac: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000ffb0: 059f0024 ldreq r0, [pc, #36] ; 3000ffdc <== NOT EXECUTED 3000ffb4: 059f1024 ldreq r1, [pc, #36] ; 3000ffe0 <== NOT EXECUTED 3000ffb8: 059f2024 ldreq r2, [pc, #36] ; 3000ffe4 <== NOT EXECUTED 3000ffbc: 059f3024 ldreq r3, [pc, #36] ; 3000ffe8 <== NOT EXECUTED 3000ffc0: 0bfff62c bleq 3000d878 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; 3000ffc4: 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; 3000ffc8: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; 3000ffcc: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3000ffd0: ebffff3a bl 3000fcc0 <== NOT EXECUTED } return 1; } 3000ffd4: e3a00001 mov r0, #1 <== NOT EXECUTED 3000ffd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 3000ffdc: 3001ec4d .word 0x3001ec4d 3000ffe0: 00000196 .word 0x00000196 3000ffe4: 3001e3c4 .word 0x3001e3c4 3000ffe8: 3001eccd .word 0x3001eccd 300104fc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 300104fc: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 30010500: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010504: e1a08001 mov r8, r1 30010508: e1a0a002 mov sl, r2 3001050c: e1a06003 mov r6, r3 30010510: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 30010514: 059f0204 ldreq r0, [pc, #516] ; 30010720 30010518: 059f1204 ldreq r1, [pc, #516] ; 30010724 3001051c: 059f2204 ldreq r2, [pc, #516] ; 30010728 30010520: 059f3204 ldreq r3, [pc, #516] ; 3001072c 30010524: 0a000006 beq 30010544 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 30010528: e594304c ldr r3, [r4, #76] ; 0x4c 3001052c: e3530005 cmp r3, #5 30010530: 0a000004 beq 30010548 30010534: e59f01e4 ldr r0, [pc, #484] ; 30010720 <== NOT EXECUTED 30010538: e59f11f0 ldr r1, [pc, #496] ; 30010730 <== NOT EXECUTED 3001053c: e59f21e4 ldr r2, [pc, #484] ; 30010728 <== NOT EXECUTED 30010540: e59f31ec ldr r3, [pc, #492] ; 30010734 <== NOT EXECUTED 30010544: ebfff4cb bl 3000d878 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 30010548: e3560000 cmp r6, #0 3001054c: 059f01cc ldreq r0, [pc, #460] ; 30010720 30010550: 059f11e0 ldreq r1, [pc, #480] ; 30010738 30010554: 059f21cc ldreq r2, [pc, #460] ; 30010728 30010558: 059f31dc ldreq r3, [pc, #476] ; 3001073c 3001055c: 0afffff8 beq 30010544 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 30010560: e3550000 cmp r5, #0 30010564: 1a000002 bne 30010574 rtems_set_errno_and_return_minus_one( EINVAL ); 30010568: eb00065d bl 30011ee4 <__errno> <== NOT EXECUTED 3001056c: e3a03016 mov r3, #22 <== NOT EXECUTED 30010570: ea00000e b 300105b0 <== NOT EXECUTED * 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 ) { 30010574: e5943054 ldr r3, [r4, #84] ; 0x54 30010578: e0851001 add r1, r5, r1 3001057c: e3530000 cmp r3, #0 30010580: ba000003 blt 30010594 30010584: 1a00000c bne 300105bc 30010588: e5943050 ldr r3, [r4, #80] ; 0x50 3001058c: e1530001 cmp r3, r1 30010590: 2a000009 bcs 300105bc status = IMFS_memfile_extend( the_jnode, last_byte ); 30010594: e1a00004 mov r0, r4 30010598: e3a02000 mov r2, #0 3001059c: ebffff40 bl 300102a4 if ( status ) 300105a0: e3500000 cmp r0, #0 300105a4: 0a000004 beq 300105bc rtems_set_errno_and_return_minus_one( ENOSPC ); 300105a8: eb00064d bl 30011ee4 <__errno> <== NOT EXECUTED 300105ac: e3a0301c mov r3, #28 <== NOT EXECUTED 300105b0: e5803000 str r3, [r0] <== NOT EXECUTED 300105b4: e3e07000 mvn r7, #0 <== NOT EXECUTED 300105b8: ea000056 b 30010718 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300105bc: e59f317c ldr r3, [pc, #380] ; 30010740 300105c0: e1a00008 mov r0, r8 300105c4: e5939000 ldr r9, [r3] 300105c8: e1a0100a mov r1, sl 300105cc: e1a0b009 mov fp, r9 300105d0: e1a0cfcb asr ip, fp, #31 300105d4: e1a0300c mov r3, ip 300105d8: e1a0200b mov r2, fp 300105dc: e58dc000 str ip, [sp] 300105e0: eb00301f bl 3001c664 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300105e4: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300105e8: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300105ec: e1a0100a mov r1, sl 300105f0: e1a00008 mov r0, r8 300105f4: e1a0200b mov r2, fp 300105f8: e1a0300c mov r3, ip 300105fc: eb002eee bl 3001c1bc <__divdi3> if ( start_offset ) { 30010600: e3570000 cmp r7, #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; 30010604: e1a08000 mov r8, r0 if ( start_offset ) { 30010608: 0a000013 beq 3001065c 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 ); 3001060c: e1a01008 mov r1, r8 30010610: e1a00004 mov r0, r4 30010614: e3a02000 mov r2, #0 30010618: ebfffdbd bl 3000fd14 assert( block_ptr ); 3001061c: e3500000 cmp r0, #0 30010620: 059f00f8 ldreq r0, [pc, #248] ; 30010720 30010624: 03a01fc7 moveq r1, #796 ; 0x31c 30010628: 0a00002c beq 300106e0 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 ); 3001062c: 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; 30010630: e067a009 rsb sl, r7, r9 30010634: e15a0005 cmp sl, r5 30010638: 21a0a005 movcs sl, r5 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 ); 3001063c: e0800007 add r0, r0, r7 30010640: e1a01006 mov r1, r6 30010644: e1a0200a mov r2, sl 30010648: eb000833 bl 3001271c src += to_copy; 3001064c: e086600a add r6, r6, sl block++; 30010650: e2888001 add r8, r8, #1 my_length -= to_copy; 30010654: e06a5005 rsb r5, sl, r5 copied += to_copy; 30010658: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3001065c: e59f30dc ldr r3, [pc, #220] ; 30010740 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010660: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 30010664: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010668: ea00000f b 300106ac block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3001066c: e1a00004 mov r0, r4 30010670: e1a01008 mov r1, r8 30010674: e3a02000 mov r2, #0 30010678: ebfffda5 bl 3000fd14 assert( block_ptr ); 3001067c: e3500000 cmp r0, #0 30010680: 059f0098 ldreq r0, [pc, #152] ; 30010720 30010684: 03a01e33 moveq r1, #816 ; 0x330 30010688: 0a000014 beq 300106e0 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 ); 3001068c: e1a01006 mov r1, r6 30010690: e5900000 ldr r0, [r0] 30010694: e1a0200a mov r2, sl 30010698: eb00081f bl 3001271c src += to_copy; 3001069c: e086600a add r6, r6, sl block++; 300106a0: e2888001 add r8, r8, #1 my_length -= to_copy; 300106a4: e06a5005 rsb r5, sl, r5 * * 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( 300106a8: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300106ac: e5993000 ldr r3, [r9] 300106b0: e1550003 cmp r5, r3 300106b4: 2affffec bcs 3001066c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 300106b8: e3550000 cmp r5, #0 300106bc: 0a00000f beq 30010700 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300106c0: e1a01008 mov r1, r8 300106c4: e1a00004 mov r0, r4 300106c8: e3a02000 mov r2, #0 300106cc: ebfffd90 bl 3000fd14 assert( block_ptr ); 300106d0: e3500000 cmp r0, #0 300106d4: 1a000004 bne 300106ec 300106d8: e59f0040 ldr r0, [pc, #64] ; 30010720 <== NOT EXECUTED 300106dc: e59f1060 ldr r1, [pc, #96] ; 30010744 <== NOT EXECUTED 300106e0: e59f2040 ldr r2, [pc, #64] ; 30010728 <== NOT EXECUTED 300106e4: e59f305c ldr r3, [pc, #92] ; 30010748 <== NOT EXECUTED 300106e8: eaffff95 b 30010544 <== NOT EXECUTED 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 ); 300106ec: e5900000 ldr r0, [r0] 300106f0: e1a01006 mov r1, r6 300106f4: e1a02005 mov r2, r5 300106f8: eb000807 bl 3001271c my_length = 0; copied += to_copy; 300106fc: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); 30010700: e28d0004 add r0, sp, #4 30010704: e3a01000 mov r1, #0 30010708: ebffc8ee bl 30002ac8 3001070c: e59d3004 ldr r3, [sp, #4] 30010710: e5843048 str r3, [r4, #72] ; 0x48 30010714: e5843044 str r3, [r4, #68] ; 0x44 return copied; } 30010718: e1a00007 mov r0, r7 3001071c: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 30010720: 3001ec4d .word 0x3001ec4d 30010724: 000002e3 .word 0x000002e3 30010728: 3001e420 .word 0x3001e420 3001072c: 3001ec93 .word 0x3001ec93 30010730: 000002e7 .word 0x000002e7 30010734: 3001ec9d .word 0x3001ec9d 30010738: 000002ef .word 0x000002ef 3001073c: 3001ecd7 .word 0x3001ecd7 30010740: 3001f7ec .word 0x3001f7ec 30010744: 00000346 .word 0x00000346 30010748: 3001eccd .word 0x3001eccd 300084b4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 300084b4: e92d40f0 push {r4, r5, r6, r7, lr} 300084b8: e24dd040 sub sp, sp, #64 ; 0x40 300084bc: e1a04001 mov r4, r1 300084c0: e1a07000 mov r7, r0 300084c4: e1a06002 mov r6, r2 300084c8: e1a05003 mov r5, r3 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 ); 300084cc: eb001541 bl 3000d9d8 300084d0: e28d303c add r3, sp, #60 ; 0x3c 300084d4: e1a01000 mov r1, r0 300084d8: e28d2004 add r2, sp, #4 300084dc: e1a00007 mov r0, r7 300084e0: ebffff8a bl 30008310 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 300084e4: e2043a0f and r3, r4, #61440 ; 0xf000 300084e8: e3530901 cmp r3, #16384 ; 0x4000 300084ec: 0a00000e beq 3000852c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 300084f0: e3530902 cmp r3, #32768 ; 0x8000 300084f4: 03a01005 moveq r1, #5 300084f8: 0a00000c beq 30008530 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 300084fc: e3530a06 cmp r3, #24576 ; 0x6000 30008500: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 30008504: 058d6028 streq r6, [sp, #40] ; 0x28 30008508: 058d502c streq r5, [sp, #44] ; 0x2c 3000850c: 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) ) { 30008510: 0a000006 beq 30008530 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 30008514: e3530a01 cmp r3, #4096 ; 0x1000 30008518: 03a01007 moveq r1, #7 3000851c: 0a000003 beq 30008530 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 30008520: eb00113b bl 3000ca14 <__errno> <== NOT EXECUTED 30008524: e3a03016 mov r3, #22 <== NOT EXECUTED 30008528: ea00000b b 3000855c <== NOT EXECUTED 3000852c: e3a01001 mov r1, #1 * 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( 30008530: e28dc028 add ip, sp, #40 ; 0x28 30008534: e59d0054 ldr r0, [sp, #84] ; 0x54 30008538: e1a03004 mov r3, r4 3000853c: e28d2004 add r2, sp, #4 30008540: e58dc000 str ip, [sp] 30008544: eb000b4b bl 3000b278 new_name, mode, &info ); if ( !new_node ) 30008548: e3500000 cmp r0, #0 3000854c: 13a00000 movne r0, #0 30008550: 1a000003 bne 30008564 rtems_set_errno_and_return_minus_one( ENOMEM ); 30008554: eb00112e bl 3000ca14 <__errno> <== NOT EXECUTED 30008558: e3a0300c mov r3, #12 <== NOT EXECUTED 3000855c: e5803000 str r3, [r0] <== NOT EXECUTED 30008560: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 30008564: e28dd040 add sp, sp, #64 ; 0x40 30008568: e8bd80f0 pop {r4, r5, r6, r7, pc} 300022ac : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300022ac: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300022b0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 300022b4: e593204c ldr r2, [r3, #76] ; 0x4c 300022b8: e3520001 cmp r2, #1 300022bc: 0a000004 beq 300022d4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 300022c0: eb003f07 bl 30011ee4 <__errno> <== NOT EXECUTED 300022c4: e3a03014 mov r3, #20 <== NOT EXECUTED 300022c8: e5803000 str r3, [r0] <== NOT EXECUTED 300022cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 300022d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 300022d4: e583005c str r0, [r3, #92] ; 0x5c 300022d8: e3a00000 mov r0, #0 return 0; } 300022dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30002c7c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30002c7c: e92d4030 push {r4, r5, lr} assert( the_jnode ); 30002c80: e2504000 subs r4, r0, #0 30002c84: 059f0130 ldreq r0, [pc, #304] ; 30002dbc 30002c88: 03a01038 moveq r1, #56 ; 0x38 30002c8c: 059f212c ldreq r2, [pc, #300] ; 30002dc0 30002c90: 059f312c ldreq r3, [pc, #300] ; 30002dc4 30002c94: 0a00002f beq 30002d58 fprintf(stdout, "%s", the_jnode->name ); 30002c98: e59f5128 ldr r5, [pc, #296] ; 30002dc8 30002c9c: e284000c add r0, r4, #12 30002ca0: e5953000 ldr r3, [r5] 30002ca4: e5931008 ldr r1, [r3, #8] 30002ca8: eb0039f9 bl 30011494 switch( the_jnode->type ) { 30002cac: e594204c ldr r2, [r4, #76] ; 0x4c 30002cb0: e2423001 sub r3, r2, #1 30002cb4: e3530006 cmp r3, #6 30002cb8: 979ff103 ldrls pc, [pc, r3, lsl #2] 30002cbc: ea000034 b 30002d94 <== NOT EXECUTED 30002cc0: 30002cdc .word 0x30002cdc <== NOT EXECUTED 30002cc4: 30002cf0 .word 0x30002cf0 <== NOT EXECUTED 30002cc8: 30002d38 .word 0x30002d38 <== NOT EXECUTED 30002ccc: 30002d5c .word 0x30002d5c <== NOT EXECUTED 30002cd0: 30002d20 .word 0x30002d20 <== NOT EXECUTED 30002cd4: 30002d04 .word 0x30002d04 <== NOT EXECUTED 30002cd8: 30002d78 .word 0x30002d78 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 30002cdc: e5953000 ldr r3, [r5] 30002ce0: e3a0002f mov r0, #47 ; 0x2f 30002ce4: e5931008 ldr r1, [r3, #8] 30002ce8: eb0039a4 bl 30011380 break; 30002cec: ea00002f b 30002db0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30002cf0: e5952000 ldr r2, [r5] 30002cf4: e5943054 ldr r3, [r4, #84] ; 0x54 30002cf8: e5920008 ldr r0, [r2, #8] 30002cfc: e59f10c8 ldr r1, [pc, #200] ; 30002dcc 30002d00: ea000003 b 30002d14 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 30002d04: e5952000 ldr r2, [r5] <== NOT EXECUTED 30002d08: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30002d0c: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 30002d10: e59f10b8 ldr r1, [pc, #184] ; 30002dd0 <== NOT EXECUTED 30002d14: e5942050 ldr r2, [r4, #80] ; 0x50 30002d18: eb00397c bl 30011310 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 30002d1c: ea000023 b 30002db0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30002d20: e5953000 ldr r3, [r5] 30002d24: e5942050 ldr r2, [r4, #80] ; 0x50 30002d28: e5930008 ldr r0, [r3, #8] 30002d2c: e59f10a0 ldr r1, [pc, #160] ; 30002dd4 30002d30: eb003976 bl 30011310 (uint32_t)the_jnode->info.file.size ); #endif break; 30002d34: ea00001d b 30002db0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 30002d38: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002d3c: e59f0094 ldr r0, [pc, #148] ; 30002dd8 <== NOT EXECUTED 30002d40: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30002d44: eb0039d2 bl 30011494 <== NOT EXECUTED assert(0); 30002d48: e59f006c ldr r0, [pc, #108] ; 30002dbc <== NOT EXECUTED 30002d4c: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 30002d50: e59f2068 ldr r2, [pc, #104] ; 30002dc0 <== NOT EXECUTED 30002d54: e59f3080 ldr r3, [pc, #128] ; 30002ddc <== NOT EXECUTED 30002d58: eb00020a bl 30003588 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 30002d5c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002d60: e59f0070 ldr r0, [pc, #112] ; 30002dd8 <== NOT EXECUTED 30002d64: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30002d68: eb0039c9 bl 30011494 <== NOT EXECUTED assert(0); 30002d6c: e59f0048 ldr r0, [pc, #72] ; 30002dbc <== NOT EXECUTED 30002d70: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 30002d74: eafffff5 b 30002d50 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 30002d78: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002d7c: e59f005c ldr r0, [pc, #92] ; 30002de0 <== NOT EXECUTED 30002d80: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30002d84: eb0039c2 bl 30011494 <== NOT EXECUTED assert(0); 30002d88: e59f002c ldr r0, [pc, #44] ; 30002dbc <== NOT EXECUTED 30002d8c: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 30002d90: eaffffee b 30002d50 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 30002d94: e5953000 ldr r3, [r5] <== NOT EXECUTED 30002d98: e59f1044 ldr r1, [pc, #68] ; 30002de4 <== NOT EXECUTED 30002d9c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30002da0: eb00395a bl 30011310 <== NOT EXECUTED assert(0); 30002da4: e59f0010 ldr r0, [pc, #16] ; 30002dbc <== NOT EXECUTED 30002da8: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 30002dac: eaffffe7 b 30002d50 <== NOT EXECUTED break; } puts(""); 30002db0: e59f0030 ldr r0, [pc, #48] ; 30002de8 } 30002db4: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 30002db8: ea004081 b 30012fc4 30002dbc: 300220c0 .word 0x300220c0 30002dc0: 30020c64 .word 0x30020c64 30002dc4: 30022109 .word 0x30022109 30002dc8: 30023128 .word 0x30023128 30002dcc: 30022113 .word 0x30022113 30002dd0: 30022126 .word 0x30022126 30002dd4: 30022135 .word 0x30022135 30002dd8: 30022141 .word 0x30022141 30002ddc: 30021a85 .word 0x30021a85 30002de0: 30022155 .word 0x30022155 30002de4: 30022168 .word 0x30022168 30002de8: 300222f9 .word 0x300222f9 300022ec : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 300022ec: e5903000 ldr r3, [r0] int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 300022f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 300022f4: e593004c ldr r0, [r3, #76] ; 0x4c 300022f8: e3500004 cmp r0, #4 300022fc: 03a00000 moveq r0, #0 30002300: 0a000006 beq 30002320 rtems_set_errno_and_return_minus_one( EINVAL ); 30002304: eb003ef6 bl 30011ee4 <__errno> <== NOT EXECUTED 30002308: e3a03016 mov r3, #22 <== NOT EXECUTED 3000230c: e5803000 str r3, [r0] <== NOT EXECUTED 30002310: e3e00000 mvn r0, #0 <== NOT EXECUTED 30002314: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 30002318: e7c1c000 strb ip, [r1, r0] 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++ ) 3000231c: e2800001 add r0, r0, #1 30002320: e1500002 cmp r0, r2 30002324: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 30002328: e593c050 ldr ip, [r3, #80] ; 0x50 3000232c: e7dcc000 ldrb ip, [ip, r0] 30002330: e35c0000 cmp ip, #0 30002334: 1afffff7 bne 30002318 buf[i] = node->info.sym_link.name[i]; return i; } 30002338: e49df004 pop {pc} ; (ldr pc, [sp], #4) 3000233c : 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 */ ) { 3000233c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 30002340: 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 */ ) { 30002344: 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 ); 30002348: e1a01003 mov r1, r3 <== NOT EXECUTED 3000234c: e284000c add r0, r4, #12 <== NOT EXECUTED 30002350: e3a02020 mov r2, #32 <== NOT EXECUTED 30002354: eb0042d3 bl 30012ea8 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 30002358: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3000235c: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30002360: 11a00004 movne r0, r4 <== NOT EXECUTED 30002364: 1b0011b0 blne 30006a2c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 30002368: 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 ); 3000236c: e1a01004 mov r1, r4 <== NOT EXECUTED 30002370: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 30002374: e5843008 str r3, [r4, #8] <== NOT EXECUTED 30002378: eb0011a0 bl 30006a00 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 3000237c: e1a0000d mov r0, sp <== NOT EXECUTED 30002380: e3a01000 mov r1, #0 <== NOT EXECUTED 30002384: eb0001cf bl 30002ac8 <== NOT EXECUTED 30002388: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000238c: 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 ); 30002390: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30002394: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 30008620 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 30008620: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 30008624: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 30008628: e593204c ldr r2, [r3, #76] ; 0x4c 3000862c: e2422002 sub r2, r2, #2 30008630: e3520005 cmp r2, #5 30008634: 979ff102 ldrls pc, [pc, r2, lsl #2] 30008638: ea000012 b 30008688 <== NOT EXECUTED 3000863c: 30008654 .word 0x30008654 <== NOT EXECUTED 30008640: 30008688 .word 0x30008688 <== NOT EXECUTED 30008644: 30008674 .word 0x30008674 <== NOT EXECUTED 30008648: 30008668 .word 0x30008668 <== NOT EXECUTED 3000864c: 30008668 .word 0x30008668 <== NOT EXECUTED 30008650: 30008674 .word 0x30008674 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 30008654: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 30008658: e5932050 ldr r2, [r3, #80] ; 0x50 3000865c: e581001c str r0, [r1, #28] 30008660: e5812018 str r2, [r1, #24] break; 30008664: ea00000c b 3000869c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 30008668: e283c050 add ip, r3, #80 ; 0x50 3000866c: e89c1800 ldm ip, {fp, ip} 30008670: ea000001 b 3000867c case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 30008674: e3a0b000 mov fp, #0 <== NOT EXECUTED 30008678: e3a0c000 mov ip, #0 <== NOT EXECUTED 3000867c: e581b020 str fp, [r1, #32] 30008680: e581c024 str ip, [r1, #36] ; 0x24 break; 30008684: ea000004 b 3000869c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 30008688: eb0010e1 bl 3000ca14 <__errno> <== NOT EXECUTED 3000868c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008690: e5803000 str r3, [r0] <== NOT EXECUTED 30008694: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008698: e8bd8800 pop {fp, pc} <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000869c: e5932038 ldr r2, [r3, #56] ; 0x38 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 300086a0: e1d303b4 ldrh r0, [r3, #52] ; 0x34 buf->st_ino = the_jnode->st_ino; 300086a4: 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; 300086a8: e5932040 ldr r2, [r3, #64] ; 0x40 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 300086ac: e1c101b0 strh r0, [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; 300086b0: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 300086b4: e5932044 ldr r2, [r3, #68] ; 0x44 } 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; 300086b8: e1d3c3bc ldrh ip, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 300086bc: e5812030 str r2, [r1, #48] ; 0x30 } 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; 300086c0: e1c1c1b2 strh ip, [r1, #18] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 300086c4: e5930030 ldr r0, [r3, #48] ; 0x30 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; buf->st_ctime = the_jnode->stat_ctime; 300086c8: e5932048 ldr r2, [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; 300086cc: e1d333be ldrh r3, [r3, #62] ; 0x3e default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 300086d0: e581000c str r0, [r1, #12] 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; buf->st_ctime = the_jnode->stat_ctime; 300086d4: e5812038 str r2, [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; 300086d8: 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; 300086dc: e3a00000 mov r0, #0 return 0; } 300086e0: e8bd8800 pop {fp, pc} 30002398 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30002398: e92d40f0 push {r4, r5, r6, r7, lr} 3000239c: e1a05000 mov r5, r0 300023a0: 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 ); 300023a4: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 300023a8: e1a07002 mov r7, r2 300023ac: e1a06001 mov r6, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 300023b0: eb0042a4 bl 30012e48 300023b4: e28d4004 add r4, sp, #4 300023b8: e1a01000 mov r1, r0 300023bc: e1a02004 mov r2, r4 300023c0: e28d303c add r3, sp, #60 ; 0x3c 300023c4: e1a00007 mov r0, r7 300023c8: eb002c9d bl 3000d644 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 300023cc: e1a00006 mov r0, r6 300023d0: eb004288 bl 30012df8 if (info.sym_link.name == NULL) { 300023d4: 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); 300023d8: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 300023dc: 0a00000b beq 30002410 * 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( 300023e0: e28dc028 add ip, sp, #40 ; 0x28 300023e4: e1a00005 mov r0, r5 300023e8: e1a02004 mov r2, r4 300023ec: e3a01004 mov r1, #4 300023f0: e59f3030 ldr r3, [pc, #48] ; 30002428 300023f4: e58dc000 str ip, [sp] 300023f8: eb002995 bl 3000ca54 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 300023fc: e3500000 cmp r0, #0 30002400: 13a00000 movne r0, #0 30002404: 1a000005 bne 30002420 free(info.sym_link.name); 30002408: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 3000240c: eb000184 bl 30002a24 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30002410: eb003eb3 bl 30011ee4 <__errno> <== NOT EXECUTED 30002414: e3a0300c mov r3, #12 <== NOT EXECUTED 30002418: e5803000 str r3, [r0] <== NOT EXECUTED 3000241c: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 30002420: e28dd040 add sp, sp, #64 ; 0x40 30002424: e8bd80f0 pop {r4, r5, r6, r7, pc} 30002428: 0000a1ff .word 0x0000a1ff 3000242c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 3000242c: 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; 30002430: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30002434: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30002438: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 3000243c: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30002440: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30002444: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30002448: 1a000025 bne 300024e4 if ( !node->info.hard_link.link_node ) 3000244c: e595e050 ldr lr, [r5, #80] ; 0x50 30002450: e35e0000 cmp lr, #0 30002454: 1a000003 bne 30002468 rtems_set_errno_and_return_minus_one( EINVAL ); 30002458: eb003ea1 bl 30011ee4 <__errno> <== NOT EXECUTED 3000245c: e3a03016 mov r3, #22 <== NOT EXECUTED 30002460: e5803000 str r3, [r0] <== NOT EXECUTED 30002464: ea000014 b 300024bc <== NOT EXECUTED the_link = *loc; 30002468: e1a0c00d mov ip, sp 3000246c: e1a07001 mov r7, r1 30002470: e8b7000f ldm r7!, {r0, r1, r2, r3} 30002474: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 30002478: e28d801c add r8, sp, #28 3000247c: 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; 30002480: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 30002484: 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; 30002488: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 3000248c: eb0029bf bl 3000cb90 /* * 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) 30002490: e5953050 ldr r3, [r5, #80] ; 0x50 30002494: e1d323b4 ldrh r2, [r3, #52] ; 0x34 30002498: e3520001 cmp r2, #1 3000249c: 1a000008 bne 300024c4 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 300024a0: e1a0100d mov r1, sp 300024a4: e1a00006 mov r0, r6 300024a8: e59d3008 ldr r3, [sp, #8] 300024ac: e1a0e00f mov lr, pc 300024b0: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 300024b4: e3500000 cmp r0, #0 300024b8: 0a000009 beq 300024e4 300024bc: e3e00000 mvn r0, #0 300024c0: ea00000c b 300024f8 return -1; } else { node->info.hard_link.link_node->st_nlink --; 300024c4: e2422001 sub r2, r2, #1 300024c8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 300024cc: e28d0014 add r0, sp, #20 300024d0: e3a01000 mov r1, #0 300024d4: eb00017b bl 30002ac8 300024d8: e5953050 ldr r3, [r5, #80] ; 0x50 300024dc: e59d2014 ldr r2, [sp, #20] 300024e0: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 300024e4: e1a00006 mov r0, r6 300024e8: e1a01004 mov r1, r4 300024ec: e5943008 ldr r3, [r4, #8] 300024f0: e1a0e00f mov lr, pc 300024f4: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 300024f8: e28dd01c add sp, sp, #28 300024fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30002500 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30002500: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30002504: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30002508: e593204c ldr r2, [r3, #76] ; 0x4c 3000250c: e3520001 cmp r2, #1 30002510: 0a000002 beq 30002520 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30002514: eb003e72 bl 30011ee4 <__errno> <== NOT EXECUTED 30002518: e3a03014 mov r3, #20 <== NOT EXECUTED 3000251c: ea000004 b 30002534 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30002520: e593205c ldr r2, [r3, #92] ; 0x5c 30002524: e3520000 cmp r2, #0 30002528: 1a000004 bne 30002540 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 3000252c: eb003e6c bl 30011ee4 <__errno> <== NOT EXECUTED 30002530: e3a03016 mov r3, #22 <== NOT EXECUTED 30002534: e5803000 str r3, [r0] <== NOT EXECUTED 30002538: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000253c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * 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; 30002540: e3a00000 mov r0, #0 30002544: e583005c str r0, [r3, #92] ; 0x5c return 0; } 30002548: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300014dc : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 300014dc: e59f30c8 ldr r3, [pc, #200] ; 300015ac void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 300014e0: e92d4070 push {r4, r5, r6, lr} #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 300014e4: e5933000 ldr r3, [r3] void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 300014e8: e1a04000 mov r4, r0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 300014ec: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 300014f0: e1a05001 mov r5, r1 300014f4: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 300014f8: 11a0e00f movne lr, pc 300014fc: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 30001500: eb001dfa bl 30008cf0 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 30001504: e59f30a4 ldr r3, [pc, #164] ; 300015b0 30001508: e5933000 ldr r3, [r3] 3000150c: e3530000 cmp r3, #0 30001510: 0a000006 beq 30001530 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 30001514: e1a00004 mov r0, r4 <== NOT EXECUTED 30001518: e1a01006 mov r1, r6 <== NOT EXECUTED 3000151c: e1a0e00f mov lr, pc <== NOT EXECUTED 30001520: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 30001524: e0845005 add r5, r4, r5 <== NOT EXECUTED 30001528: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 3000152c: e1a04000 mov r4, 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 ( 30001530: e59f307c ldr r3, [pc, #124] ; 300015b4 30001534: e5d31000 ldrb r1, [r3] 30001538: e3510000 cmp r1, #0 3000153c: 1a000005 bne 30001558 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 30001540: e59f3070 ldr r3, [pc, #112] ; 300015b8 30001544: e5d33028 ldrb r3, [r3, #40] ; 0x28 30001548: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 3000154c: 11a00004 movne r0, r4 30001550: 11a02005 movne r2, r5 30001554: 1b002f78 blne 3000d33c * 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 ) { 30001558: e59f3054 ldr r3, [pc, #84] ; 300015b4 3000155c: e5d33000 ldrb r3, [r3] 30001560: e3530000 cmp r3, #0 30001564: 1a000008 bne 3000158c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 30001568: e59f304c ldr r3, [pc, #76] ; 300015bc 3000156c: e1a01004 mov r1, r4 30001570: e5930000 ldr r0, [r3] 30001574: e1a02005 mov r2, r5 30001578: e3a03004 mov r3, #4 3000157c: eb000ece bl 300050bc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 30001580: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 30001584: 0280001a addeq r0, r0, #26 30001588: 0b000cf1 bleq 30004954 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 3000158c: e59f3028 ldr r3, [pc, #40] ; 300015bc 30001590: e59f4028 ldr r4, [pc, #40] ; 300015c0 30001594: e5930000 ldr r0, [r3] 30001598: e5945000 ldr r5, [r4] 3000159c: eb001184 bl 30005bb4 <_Protected_heap_Get_size> 300015a0: e0800005 add r0, r0, r5 300015a4: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 300015a8: e8bd8070 pop {r4, r5, r6, pc} 300015ac: 300199b8 .word 0x300199b8 300015b0: 300199bc .word 0x300199bc 300015b4: 300199b5 .word 0x300199b5 300015b8: 300192ac .word 0x300192ac 300015bc: 30019204 .word 0x30019204 300015c0: 30019ba4 .word 0x30019ba4 30003868 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30003868: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 3000386c: e250a000 subs sl, r0, #0 <== NOT EXECUTED 30003870: 0a000043 beq 30003984 <== NOT EXECUTED return; if ( !print_handler ) 30003874: e59f310c ldr r3, [pc, #268] ; 30003988 <== NOT EXECUTED 30003878: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 3000387c: e3570000 cmp r7, #0 <== NOT EXECUTED 30003880: 0a00003f beq 30003984 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30003884: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 30003888: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 3000388c: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 30003890: 1a000005 bne 300038ac <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 30003894: e59f40f0 ldr r4, [pc, #240] ; 3000398c <== NOT EXECUTED 30003898: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 3000389c: e3530000 cmp r3, #0 <== NOT EXECUTED 300038a0: 13a06000 movne r6, #0 <== NOT EXECUTED 300038a4: 11a0a006 movne sl, r6 <== NOT EXECUTED 300038a8: 0a000035 beq 30003984 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 300038ac: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 300038b0: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 300038b4: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 300038b8: e1a00009 mov r0, r9 <== NOT EXECUTED 300038bc: e1a01005 mov r1, r5 <== NOT EXECUTED 300038c0: ebffffda bl 30003830 <== NOT EXECUTED if ( high_water_mark ) 300038c4: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 300038c8: 10899005 addne r9, r9, r5 <== NOT EXECUTED 300038cc: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 300038d0: e35a0000 cmp sl, #0 <== NOT EXECUTED 300038d4: e59f30ac ldr r3, [pc, #172] ; 30003988 <== NOT EXECUTED 300038d8: 0a00000c beq 30003910 <== NOT EXECUTED (*print_handler)( 300038dc: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 300038e0: e28d2008 add r2, sp, #8 <== NOT EXECUTED 300038e4: e1a0000a mov r0, sl <== NOT EXECUTED 300038e8: e3a01005 mov r1, #5 <== NOT EXECUTED 300038ec: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 300038f0: eb001656 bl 30009250 <== NOT EXECUTED 300038f4: e1a0200a mov r2, sl <== NOT EXECUTED 300038f8: e1a03000 mov r3, r0 <== NOT EXECUTED 300038fc: e59f108c ldr r1, [pc, #140] ; 30003990 <== NOT EXECUTED 30003900: e1a00009 mov r0, r9 <== NOT EXECUTED 30003904: e1a0e00f mov lr, pc <== NOT EXECUTED 30003908: e12fff17 bx r7 <== NOT EXECUTED 3000390c: ea000004 b 30003924 <== 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 ); 30003910: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30003914: e59f1078 ldr r1, [pc, #120] ; 30003994 <== NOT EXECUTED 30003918: e3e02000 mvn r2, #0 <== NOT EXECUTED 3000391c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003920: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 30003924: e5943000 ldr r3, [r4] <== NOT EXECUTED 30003928: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3000392c: e59f4054 ldr r4, [pc, #84] ; 30003988 <== NOT EXECUTED 30003930: e58d6000 str r6, [sp] <== NOT EXECUTED 30003934: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 30003938: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000393c: e0823003 add r3, r2, r3 <== NOT EXECUTED 30003940: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 30003944: e59f104c ldr r1, [pc, #76] ; 30003998 <== NOT EXECUTED 30003948: e1a0e00f mov lr, pc <== NOT EXECUTED 3000394c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 30003950: e5943000 ldr r3, [r4] <== NOT EXECUTED 30003954: e3530000 cmp r3, #0 <== NOT EXECUTED 30003958: 1a000004 bne 30003970 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 3000395c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 30003960: e59f1034 ldr r1, [pc, #52] ; 3000399c <== NOT EXECUTED 30003964: e1a0e00f mov lr, pc <== NOT EXECUTED 30003968: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 3000396c: ea000004 b 30003984 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 30003970: e1a02008 mov r2, r8 <== NOT EXECUTED 30003974: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 30003978: e59f1020 ldr r1, [pc, #32] ; 300039a0 <== NOT EXECUTED 3000397c: e1a0e00f mov lr, pc <== NOT EXECUTED 30003980: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 30003984: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30003988: 3005e0c0 .word 0x3005e0c0 3000398c: 30060bac .word 0x30060bac 30003990: 3005639b .word 0x3005639b 30003994: 300563a8 .word 0x300563a8 30003998: 300563b6 .word 0x300563b6 3000399c: 300563d4 .word 0x300563d4 300039a0: 300563e1 .word 0x300563e1 30003830 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 30003830: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 30003834: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 30003838: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 3000383c: e59f3020 ldr r3, [pc, #32] ; 30003864 <== 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++) 30003840: ea000003 b 30003854 <== NOT EXECUTED if (*base != U32_PATTERN) 30003844: e5902000 ldr r2, [r0] <== NOT EXECUTED 30003848: e1520003 cmp r2, r3 <== NOT EXECUTED 3000384c: 112fff1e bxne lr <== 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++) 30003850: e2800004 add r0, r0, #4 <== NOT EXECUTED 30003854: e1500001 cmp r0, r1 <== NOT EXECUTED 30003858: 3afffff9 bcc 30003844 <== NOT EXECUTED 3000385c: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 30003860: e12fff1e bx lr <== NOT EXECUTED 30003864: a5a5a5a5 .word 0xa5a5a5a5 30003a18 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 30003a18: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 30003a1c: e1a06000 mov r6, r0 <== NOT EXECUTED 30003a20: e24dd020 sub sp, sp, #32 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 30003a24: e59f007c ldr r0, [pc, #124] ; 30003aa8 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 30003a28: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 30003a2c: e59640c8 ldr r4, [r6, #200] ; 0xc8 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 30003a30: eb000a68 bl 300063d8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 30003a34: e59f0070 ldr r0, [pc, #112] ; 30003aac <== NOT EXECUTED 30003a38: e1a01006 mov r1, r6 <== NOT EXECUTED 30003a3c: eb000a65 bl 300063d8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 30003a40: e59f0068 ldr r0, [pc, #104] ; 30003ab0 <== NOT EXECUTED 30003a44: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED 30003a48: eb000a62 bl 300063d8 <== NOT EXECUTED printk( 30003a4c: e59f0060 ldr r0, [pc, #96] ; 30003ab4 <== NOT EXECUTED 30003a50: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 30003a54: eb000a5f bl 300063d8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 30003a58: e1a0200d mov r2, sp <== NOT EXECUTED 30003a5c: e3a01020 mov r1, #32 <== NOT EXECUTED 30003a60: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 30003a64: eb0015f9 bl 30009250 <== NOT EXECUTED 30003a68: e1a01000 mov r1, r0 <== NOT EXECUTED 30003a6c: e59f0044 ldr r0, [pc, #68] ; 30003ab8 <== NOT EXECUTED 30003a70: eb000a58 bl 300063d8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 30003a74: e59610c4 ldr r1, [r6, #196] ; 0xc4 <== NOT EXECUTED 30003a78: e59620c8 ldr r2, [r6, #200] ; 0xc8 <== NOT EXECUTED 30003a7c: e59f0038 ldr r0, [pc, #56] ; 30003abc <== NOT EXECUTED 30003a80: e0823001 add r3, r2, r1 <== NOT EXECUTED 30003a84: eb000a53 bl 300063d8 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 30003a88: e3550000 cmp r5, #0 <== NOT EXECUTED printk( 30003a8c: 02843018 addeq r3, r4, #24 <== NOT EXECUTED 30003a90: 059f0028 ldreq r0, [pc, #40] ; 30003ac0 <== NOT EXECUTED 30003a94: 03a01010 moveq r1, #16 <== NOT EXECUTED 30003a98: 02842008 addeq r2, r4, #8 <== NOT EXECUTED 30003a9c: 0b000a4d bleq 300063d8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 30003aa0: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 30003aa4: eb0017fb bl 30009a98 <== NOT EXECUTED 30003aa8: 30056448 .word 0x30056448 30003aac: 30056458 .word 0x30056458 30003ab0: 30056475 .word 0x30056475 30003ab4: 30056487 .word 0x30056487 30003ab8: 3005649b .word 0x3005649b 30003abc: 300564b1 .word 0x300564b1 30003ac0: 300564e2 .word 0x300564e2 30005338 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30005338: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 3000533c: e1a04001 mov r4, r1 30005340: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30005344: e1a0100d mov r1, sp 30005348: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 3000534c: e1a08002 mov r8, r2 30005350: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 30005354: eb00006f bl 30005518 <_POSIX_Mutex_Get> 30005358: e3500000 cmp r0, #0 3000535c: 0a000032 beq 3000542c <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005360: e59f30d0 ldr r3, [pc, #208] ; 30005438 <_POSIX_Condition_variables_Wait_support+0x100> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005364: e1a0100d mov r1, sp 30005368: e5932000 ldr r2, [r3] 3000536c: e1a00006 mov r0, r6 30005370: e2422001 sub r2, r2, #1 30005374: e5832000 str r2, [r3] 30005378: ebffff7d bl 30005174 <_POSIX_Condition_variables_Get> switch ( location ) { 3000537c: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 30005380: e1a0a000 mov sl, r0 switch ( location ) { 30005384: e3530000 cmp r3, #0 30005388: 1a000027 bne 3000542c <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 3000538c: e5903014 ldr r3, [r0, #20] 30005390: e3530000 cmp r3, #0 30005394: 0a000004 beq 300053ac <_POSIX_Condition_variables_Wait_support+0x74> 30005398: e5942000 ldr r2, [r4] 3000539c: e1530002 cmp r3, r2 300053a0: 0a000001 beq 300053ac <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); 300053a4: eb000bab bl 30008258 <_Thread_Enable_dispatch> 300053a8: ea00001f b 3000542c <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 300053ac: e1a00004 mov r0, r4 300053b0: eb0000de bl 30005730 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 300053b4: e3570000 cmp r7, #0 300053b8: 1a000015 bne 30005414 <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 300053bc: e59f5078 ldr r5, [pc, #120] ; 3000543c <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 300053c0: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 300053c4: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 300053c8: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 300053cc: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 300053d0: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 300053d4: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 300053d8: e5831020 str r1, [r3, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 300053dc: e3a01001 mov r1, #1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 300053e0: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 300053e4: e1a00002 mov r0, r2 300053e8: e58a1048 str r1, [sl, #72] ; 0x48 300053ec: e59f204c ldr r2, [pc, #76] ; 30005440 <_POSIX_Condition_variables_Wait_support+0x108> 300053f0: e1a01008 mov r1, r8 300053f4: eb000cd0 bl 3000873c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 300053f8: eb000b96 bl 30008258 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 300053fc: e5953000 ldr r3, [r5] 30005400: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 30005404: e3550074 cmp r5, #116 ; 0x74 30005408: 13550000 cmpne r5, #0 3000540c: 0a000002 beq 3000541c <_POSIX_Condition_variables_Wait_support+0xe4> 30005410: ea000006 b 30005430 <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 30005414: eb000b8f bl 30008258 <_Thread_Enable_dispatch> 30005418: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 3000541c: e1a00004 mov r0, r4 30005420: eb0000a3 bl 300056b4 if ( mutex_status ) 30005424: e3500000 cmp r0, #0 30005428: 0a000000 beq 30005430 <_POSIX_Condition_variables_Wait_support+0xf8> 3000542c: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 30005430: e1a00005 mov r0, r5 30005434: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} 30005438: 3001c6ac .word 0x3001c6ac 3000543c: 3001c760 .word 0x3001c760 30005440: 30008ae8 .word 0x30008ae8 30006710 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006710: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 30006714: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30006718: e281503c add r5, r1, #60 ; 0x3c 3000671c: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 30006720: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 30006724: e281c038 add ip, r1, #56 ; 0x38 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 30006728: e3130020 tst r3, #32 _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 ]; 3000672c: e1a04323 lsr r4, r3, #6 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30006730: e581503c str r5, [r1, #60] ; 0x3c 30006734: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 30006738: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 3000673c: e5907038 ldr r7, [r0, #56] ; 0x38 _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 ]; 30006740: e02c0495 mla ip, r5, r4, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30006744: 159f8154 ldrne r8, [pc, #340] ; 300068a0 <_Thread_queue_Enqueue_priority+0x190> priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 30006748: 1a000023 bne 300067dc <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000674c: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30006750: e10f5000 mrs r5, CPSR 30006754: e3854080 orr r4, r5, #128 ; 0x80 30006758: 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; 3000675c: e3e06000 mvn r6, #0 30006760: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 30006764: ea00000b b 30006798 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 30006768: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 3000676c: e1530006 cmp r3, r6 30006770: 9a00000a bls 300067a0 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30006774: e10fa000 mrs sl, CPSR 30006778: e129f005 msr CPSR_fc, r5 3000677c: e129f00a msr CPSR_fc, sl 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) ) { 30006780: e594a010 ldr sl, [r4, #16] 30006784: e117000a tst r7, sl 30006788: 1a000001 bne 30006794 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000678c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30006790: eaffffee b 30006750 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 30006794: 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 ) ) { 30006798: e1540008 cmp r4, r8 3000679c: 1afffff1 bne 30006768 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 300067a0: e5907030 ldr r7, [r0, #48] ; 0x30 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 ) ) { 300067a4: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 300067a8: e3570001 cmp r7, #1 300067ac: 1a000038 bne 30006894 <_Thread_queue_Enqueue_priority+0x184> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 300067b0: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 300067b4: e3a03000 mov r3, #0 300067b8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 300067bc: 0a00002a beq 3000686c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 300067c0: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 300067c4: e5814000 str r4, [r1] the_node->previous = previous_node; 300067c8: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 300067cc: 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; 300067d0: e5831000 str r1, [r3] search_node->previous = the_node; 300067d4: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 300067d8: ea000021 b 30006864 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 300067dc: e5d86000 ldrb r6, [r8] 300067e0: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300067e4: e10f5000 mrs r5, CPSR 300067e8: e3854080 orr r4, r5, #128 ; 0x80 300067ec: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 300067f0: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 300067f4: ea00000b b 30006828 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 300067f8: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 300067fc: e1530006 cmp r3, r6 30006800: 2a00000a bcs 30006830 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 30006804: e10fa000 mrs sl, CPSR 30006808: e129f005 msr CPSR_fc, r5 3000680c: e129f00a msr CPSR_fc, sl 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) ) { 30006810: e594a010 ldr sl, [r4, #16] 30006814: e117000a tst r7, sl 30006818: 1a000001 bne 30006824 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000681c: e129f005 msr CPSR_fc, r5 30006820: eaffffed b 300067dc <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 30006824: 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 ) ) { 30006828: e154000c cmp r4, ip 3000682c: 1afffff1 bne 300067f8 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006830: e5907030 ldr r7, [r0, #48] ; 0x30 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 ) ) { 30006834: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006838: e3570001 cmp r7, #1 3000683c: 1a000014 bne 30006894 <_Thread_queue_Enqueue_priority+0x184> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 30006840: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006844: e3a03000 mov r3, #0 30006848: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 3000684c: 0a000006 beq 3000686c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006850: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006854: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006858: 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; 3000685c: e5841000 str r1, [r4] next_node->previous = the_node; 30006860: e5831004 str r1, [r3, #4] 30006864: e129f005 msr CPSR_fc, r5 30006868: ea000007 b 3000688c <_Thread_queue_Enqueue_priority+0x17c> 3000686c: 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; 30006870: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006874: e5814000 str r4, [r1] the_node->previous = previous_node; 30006878: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 3000687c: 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; 30006880: e5831000 str r1, [r3] search_node->previous = the_node; 30006884: e5841004 str r1, [r4, #4] 30006888: e129f00c msr CPSR_fc, ip 3000688c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006890: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 30006894: e5900030 ldr r0, [r0, #48] ; 0x30 * 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; 30006898: e582c000 str ip, [r2] return the_thread_queue->sync_state; } 3000689c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 300068a0: 300192a8 .word 0x300192a8 30013d98 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 30013d98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30013d9c: e24dd020 sub sp, sp, #32 30013da0: e28d3014 add r3, sp, #20 30013da4: e28d5008 add r5, sp, #8 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30013da8: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30013dac: e283a004 add sl, r3, #4 30013db0: e2858004 add r8, r5, #4 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30013db4: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 30013db8: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 30013dbc: e2803040 add r3, r0, #64 ; 0x40 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 30013dc0: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30013dc4: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 30013dc8: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30013dcc: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 30013dd0: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 30013dd4: e58d5010 str r5, [sp, #16] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30013dd8: e280b030 add fp, r0, #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 ); 30013ddc: e2807068 add r7, r0, #104 ; 0x68 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 30013de0: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 30013de4: e58d3000 str r3, [sp] { /* * 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; 30013de8: e28d2014 add r2, sp, #20 30013dec: e5842078 str r2, [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; 30013df0: e59f2168 ldr r2, [pc, #360] ; 30013f60 <_Timer_server_Body+0x1c8> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30013df4: e1a0000b mov r0, fp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 30013df8: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 30013dfc: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30013e00: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 30013e04: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30013e08: e0611003 rsb r1, r1, r3 30013e0c: eb00104c bl 30017f44 <_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(); 30013e10: e59f314c ldr r3, [pc, #332] ; 30013f64 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 30013e14: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 30013e18: e5936000 ldr r6, [r3] /* * 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 ) { 30013e1c: e1560002 cmp r6, r2 30013e20: 9a000004 bls 30013e38 <_Timer_server_Body+0xa0> /* * 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 ); 30013e24: e0621006 rsb r1, r2, r6 30013e28: e1a00007 mov r0, r7 30013e2c: e1a02005 mov r2, r5 30013e30: eb001043 bl 30017f44 <_Watchdog_Adjust_to_chain> 30013e34: ea000003 b 30013e48 <_Timer_server_Body+0xb0> /* * 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 ); 30013e38: 30662002 rsbcc r2, r6, r2 30013e3c: 31a00007 movcc r0, r7 30013e40: 33a01001 movcc r1, #1 30013e44: 3b001016 blcc 30017ea4 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 30013e48: e5846074 str r6, [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 ); 30013e4c: e5940078 ldr r0, [r4, #120] ; 0x78 30013e50: eb00023c bl 30014748 <_Chain_Get> if ( timer == NULL ) { 30013e54: e2501000 subs r1, r0, #0 30013e58: 0a00000a beq 30013e88 <_Timer_server_Body+0xf0> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 30013e5c: e5913038 ldr r3, [r1, #56] ; 0x38 30013e60: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 30013e64: 02811010 addeq r1, r1, #16 30013e68: 01a0000b moveq r0, fp static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 30013e6c: 0a000003 beq 30013e80 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 30013e70: e3530003 cmp r3, #3 30013e74: 1afffff4 bne 30013e4c <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 30013e78: e2811010 add r1, r1, #16 30013e7c: e1a00007 mov r0, r7 30013e80: eb00105c bl 30017ff8 <_Watchdog_Insert> 30013e84: eafffff0 b 30013e4c <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30013e88: e10f3000 mrs r3, CPSR 30013e8c: e3832080 orr r2, r3, #128 ; 0x80 30013e90: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 30013e94: e59d2014 ldr r2, [sp, #20] 30013e98: e152000a cmp r2, sl 30013e9c: 1a000005 bne 30013eb8 <_Timer_server_Body+0x120> ts->insert_chain = NULL; 30013ea0: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30013ea4: e129f003 msr CPSR_fc, r3 _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 ) ) { 30013ea8: e59d3008 ldr r3, [sp, #8] 30013eac: e1530008 cmp r3, r8 30013eb0: 1a000002 bne 30013ec0 <_Timer_server_Body+0x128> 30013eb4: ea000015 b 30013f10 <_Timer_server_Body+0x178> 30013eb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30013ebc: eaffffcb b 30013df0 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30013ec0: e10f2000 mrs r2, CPSR 30013ec4: e3823080 orr r3, r2, #128 ; 0x80 30013ec8: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30013ecc: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30013ed0: e1530008 cmp r3, r8 30013ed4: 0a00000b beq 30013f08 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30013ed8: e5931000 ldr r1, [r3] * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 30013edc: e3530000 cmp r3, #0 the_chain->first = new_first; 30013ee0: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 30013ee4: e5815004 str r5, [r1, #4] 30013ee8: 0a000006 beq 30013f08 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 30013eec: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30013ef0: e129f002 msr CPSR_fc, r2 /* * 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 ); 30013ef4: e5930020 ldr r0, [r3, #32] 30013ef8: e5931024 ldr r1, [r3, #36] ; 0x24 30013efc: e1a0e00f mov lr, pc 30013f00: e593f01c ldr pc, [r3, #28] } 30013f04: eaffffed b 30013ec0 <_Timer_server_Body+0x128> 30013f08: e129f002 msr CPSR_fc, r2 30013f0c: eaffffb5 b 30013de8 <_Timer_server_Body+0x50> 30013f10: e59f3050 ldr r3, [pc, #80] ; 30013f68 <_Timer_server_Body+0x1d0> } else { ts->active = false; 30013f14: e5c4907c strb r9, [r4, #124] ; 0x7c 30013f18: e5932000 ldr r2, [r3] 30013f1c: e2822001 add r2, r2, #1 30013f20: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 30013f24: e3a01008 mov r1, #8 30013f28: e5940000 ldr r0, [r4] 30013f2c: eb000d7e bl 3001752c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 30013f30: e1a00004 mov r0, r4 30013f34: ebffff6b bl 30013ce8 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 30013f38: e1a00004 mov r0, r4 30013f3c: ebffff7f bl 30013d40 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 30013f40: eb000ae0 bl 30016ac8 <_Thread_Enable_dispatch> ts->active = true; 30013f44: e3a03001 mov r3, #1 30013f48: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 30013f4c: e59d0004 ldr r0, [sp, #4] 30013f50: eb001081 bl 3001815c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 30013f54: e59d0000 ldr r0, [sp] 30013f58: eb00107f bl 3001815c <_Watchdog_Remove> 30013f5c: eaffffa1 b 30013de8 <_Timer_server_Body+0x50> 30013f60: 30039364 .word 0x30039364 30013f64: 30039294 .word 0x30039294 30013f68: 3003920c .word 0x3003920c 30017a1c <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 30017a1c: e1a04000 mov r4, r0 30017a20: eb00022b bl 300182d4 <_fini> * 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(); 30017a24: ebffffe0 bl 300179ac rtems_shutdown_executive(status); 30017a28: e1a00004 mov r0, r4 30017a2c: eb00003b bl 30017b20 30017a30: eafffffe b 30017a30 <_exit+0x14> <== NOT EXECUTED 30033838 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 30033838: e1a00001 mov r0, r1 <== NOT EXECUTED 3003383c: e1a01002 mov r1, r2 <== NOT EXECUTED 30033840: e1a02003 mov r2, r3 <== NOT EXECUTED 30033844: eaffff8b b 30033678 <== NOT EXECUTED 3000b4f4 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 3000b4f4: e3a00001 mov r0, #1 <== NOT EXECUTED 3000b4f8: e12fff1e bx lr <== NOT EXECUTED 30008a24 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 30008a24: eaffffe8 b 300089cc <== NOT EXECUTED 30022ea8 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 30022ea8: e1a00001 mov r0, r1 <== NOT EXECUTED 30022eac: e1a01002 mov r1, r2 <== NOT EXECUTED 30022eb0: eaffff6d b 30022c6c <== NOT EXECUTED 300230a4 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 300230a4: e1a00001 mov r0, r1 <== NOT EXECUTED 300230a8: e1a01002 mov r1, r2 <== NOT EXECUTED 300230ac: eaffffc4 b 30022fc4 <== NOT EXECUTED 30017b04 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 30017b04: e1a00001 mov r0, r1 <== NOT EXECUTED 30017b08: e1a01002 mov r1, r2 <== NOT EXECUTED 30017b0c: ea00000e b 30017b4c <== NOT EXECUTED 30052b28 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 30052b28: e92d40f0 push {r4, r5, r6, r7, 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 ); 30052b2c: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 30052b30: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 30052b34: e1a05001 mov r5, r1 <== NOT EXECUTED 30052b38: 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 ); 30052b3c: ebfec96d bl 300050f8 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 30052b40: e2507000 subs r7, r0, #0 <== NOT EXECUTED 30052b44: 1a000015 bne 30052ba0 <_rename_r+0x78> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 30052b48: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 30052b4c: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 30052b50: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 30052b54: 0a000001 beq 30052b60 <_rename_r+0x38> <== NOT EXECUTED 30052b58: e3530000 cmp r3, #0 <== NOT EXECUTED 30052b5c: 1a000005 bne 30052b78 <_rename_r+0x50> <== NOT EXECUTED 30052b60: e59f3388 ldr r3, [pc, #904] ; 30052ef0 <_rename_r+0x3c8> <== NOT EXECUTED 30052b64: e28dc018 add ip, sp, #24 <== NOT EXECUTED 30052b68: e593e000 ldr lr, [r3] <== NOT EXECUTED 30052b6c: e3a04000 mov r4, #0 <== NOT EXECUTED 30052b70: e28ee018 add lr, lr, #24 <== NOT EXECUTED 30052b74: ea000004 b 30052b8c <_rename_r+0x64> <== NOT EXECUTED 30052b78: e59f3370 ldr r3, [pc, #880] ; 30052ef0 <_rename_r+0x3c8> <== NOT EXECUTED 30052b7c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 30052b80: e593e000 ldr lr, [r3] <== NOT EXECUTED 30052b84: e1a04007 mov r4, r7 <== NOT EXECUTED 30052b88: e28ee004 add lr, lr, #4 <== NOT EXECUTED 30052b8c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30052b90: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30052b94: e59e3000 ldr r3, [lr] <== NOT EXECUTED 30052b98: e58c3000 str r3, [ip] <== NOT EXECUTED 30052b9c: ea000009 b 30052bc8 <_rename_r+0xa0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 30052ba0: e3a0c000 mov ip, #0 <== NOT EXECUTED 30052ba4: e1a00005 mov r0, r5 <== NOT EXECUTED 30052ba8: e1a01007 mov r1, r7 <== NOT EXECUTED 30052bac: e3a02002 mov r2, #2 <== NOT EXECUTED 30052bb0: e28d3018 add r3, sp, #24 <== NOT EXECUTED 30052bb4: e58dc000 str ip, [sp] <== NOT EXECUTED 30052bb8: ebfec996 bl 30005218 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 30052bbc: e3500000 cmp r0, #0 <== NOT EXECUTED 30052bc0: 03a04001 moveq r4, #1 <== NOT EXECUTED 30052bc4: 1a000025 bne 30052c60 <_rename_r+0x138> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 30052bc8: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 30052bcc: e28de018 add lr, sp, #24 <== NOT EXECUTED 30052bd0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30052bd4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30052bd8: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 30052bdc: 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; 30052be0: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30052be4: 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; 30052be8: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30052bec: ebffb3d1 bl 3003fb38 <== NOT EXECUTED 30052bf0: e1a01000 mov r1, r0 <== NOT EXECUTED 30052bf4: e1a00005 mov r0, r5 <== NOT EXECUTED 30052bf8: ebfec932 bl 300050c8 <== NOT EXECUTED 30052bfc: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 30052c00: 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 ) ); 30052c04: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 30052c08: ebffb3ca bl 3003fb38 <== NOT EXECUTED 30052c0c: e3a0c000 mov ip, #0 <== NOT EXECUTED 30052c10: e1a01000 mov r1, r0 <== NOT EXECUTED 30052c14: e1a0200c mov r2, ip <== NOT EXECUTED 30052c18: e1a00005 mov r0, r5 <== NOT EXECUTED 30052c1c: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 30052c20: e58dc000 str ip, [sp] <== NOT EXECUTED 30052c24: ebfec943 bl 30005138 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 30052c28: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30052c2c: 0a00000d beq 30052c68 <_rename_r+0x140> <== NOT EXECUTED if ( free_old_parentloc ) 30052c30: e3540000 cmp r4, #0 <== NOT EXECUTED 30052c34: 0a000007 beq 30052c58 <_rename_r+0x130> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30052c38: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30052c3c: e3530000 cmp r3, #0 <== NOT EXECUTED 30052c40: 0a000004 beq 30052c58 <_rename_r+0x130> <== NOT EXECUTED 30052c44: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052c48: e3530000 cmp r3, #0 <== NOT EXECUTED 30052c4c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30052c50: 11a0e00f movne lr, pc <== NOT EXECUTED 30052c54: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 30052c58: ebff992b bl 3003910c <__errno> <== NOT EXECUTED 30052c5c: e5805000 str r5, [r0] <== NOT EXECUTED 30052c60: e3e06000 mvn r6, #0 <== NOT EXECUTED 30052c64: ea00009e b 30052ee4 <_rename_r+0x3bc> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 30052c68: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 30052c6c: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 30052c70: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 30052c74: 13a07000 movne r7, #0 <== NOT EXECUTED 30052c78: 03a07001 moveq r7, #1 <== NOT EXECUTED 30052c7c: 0a000001 beq 30052c88 <_rename_r+0x160> <== NOT EXECUTED 30052c80: e3530000 cmp r3, #0 <== NOT EXECUTED 30052c84: 1a000005 bne 30052ca0 <_rename_r+0x178> <== NOT EXECUTED 30052c88: e59f3260 ldr r3, [pc, #608] ; 30052ef0 <_rename_r+0x3c8> <== NOT EXECUTED 30052c8c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30052c90: e593e000 ldr lr, [r3] <== NOT EXECUTED 30052c94: e3a07001 mov r7, #1 <== NOT EXECUTED 30052c98: e28ee018 add lr, lr, #24 <== NOT EXECUTED 30052c9c: ea000003 b 30052cb0 <_rename_r+0x188> <== NOT EXECUTED 30052ca0: e59f3248 ldr r3, [pc, #584] ; 30052ef0 <_rename_r+0x3c8> <== NOT EXECUTED 30052ca4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30052ca8: e593e000 ldr lr, [r3] <== NOT EXECUTED 30052cac: e28ee004 add lr, lr, #4 <== NOT EXECUTED 30052cb0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30052cb4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30052cb8: e59e3000 ldr r3, [lr] <== NOT EXECUTED 30052cbc: e58c3000 str r3, [ip] <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 30052cc0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30052cc4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 30052cc8: e3530000 cmp r3, #0 <== NOT EXECUTED 30052ccc: 0a00004d beq 30052e08 <_rename_r+0x2e0> <== 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 ); 30052cd0: e28d5004 add r5, sp, #4 <== NOT EXECUTED 30052cd4: e0860007 add r0, r6, r7 <== NOT EXECUTED 30052cd8: e1a01005 mov r1, r5 <== NOT EXECUTED 30052cdc: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 30052ce0: e1a0e00f mov lr, pc <== NOT EXECUTED 30052ce4: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 30052ce8: e2506000 subs r6, r0, #0 <== NOT EXECUTED 30052cec: 0a00001c beq 30052d64 <_rename_r+0x23c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30052cf0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30052cf4: e3530000 cmp r3, #0 <== NOT EXECUTED 30052cf8: 0a000004 beq 30052d10 <_rename_r+0x1e8> <== NOT EXECUTED 30052cfc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052d00: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d04: 11a00005 movne r0, r5 <== NOT EXECUTED 30052d08: 11a0e00f movne lr, pc <== NOT EXECUTED 30052d0c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 30052d10: e3540000 cmp r4, #0 <== NOT EXECUTED 30052d14: 0a000007 beq 30052d38 <_rename_r+0x210> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30052d18: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30052d1c: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d20: 0a000004 beq 30052d38 <_rename_r+0x210> <== NOT EXECUTED 30052d24: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052d28: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d2c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30052d30: 11a0e00f movne lr, pc <== NOT EXECUTED 30052d34: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 30052d38: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 30052d3c: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d40: 0a000004 beq 30052d58 <_rename_r+0x230> <== NOT EXECUTED 30052d44: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052d48: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d4c: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 30052d50: 11a0e00f movne lr, pc <== NOT EXECUTED 30052d54: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 30052d58: ebff98eb bl 3003910c <__errno> <== NOT EXECUTED 30052d5c: e5806000 str r6, [r0] <== NOT EXECUTED 30052d60: eaffffbe b 30052c60 <_rename_r+0x138> <== 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 ) { 30052d64: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 30052d68: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED 30052d6c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30052d70: e1510002 cmp r1, r2 <== NOT EXECUTED 30052d74: 0a00001b beq 30052de8 <_rename_r+0x2c0> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30052d78: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d7c: 0a000004 beq 30052d94 <_rename_r+0x26c> <== NOT EXECUTED 30052d80: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052d84: e3530000 cmp r3, #0 <== NOT EXECUTED 30052d88: 11a00005 movne r0, r5 <== NOT EXECUTED 30052d8c: 11a0e00f movne lr, pc <== NOT EXECUTED 30052d90: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 30052d94: e3540000 cmp r4, #0 <== NOT EXECUTED 30052d98: 0a000007 beq 30052dbc <_rename_r+0x294> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30052d9c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30052da0: e3530000 cmp r3, #0 <== NOT EXECUTED 30052da4: 0a000004 beq 30052dbc <_rename_r+0x294> <== NOT EXECUTED 30052da8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052dac: e3530000 cmp r3, #0 <== NOT EXECUTED 30052db0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30052db4: 11a0e00f movne lr, pc <== NOT EXECUTED 30052db8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 30052dbc: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 30052dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 30052dc4: 0a000004 beq 30052ddc <_rename_r+0x2b4> <== NOT EXECUTED 30052dc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052dcc: e3530000 cmp r3, #0 <== NOT EXECUTED 30052dd0: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 30052dd4: 11a0e00f movne lr, pc <== NOT EXECUTED 30052dd8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 30052ddc: ebff98ca bl 3003910c <__errno> <== NOT EXECUTED 30052de0: e3a03012 mov r3, #18 <== NOT EXECUTED 30052de4: ea00001b b 30052e58 <_rename_r+0x330> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 30052de8: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 30052dec: e35c0000 cmp ip, #0 <== NOT EXECUTED 30052df0: 1a00001a bne 30052e60 <_rename_r+0x338> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30052df4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052df8: e3530000 cmp r3, #0 <== NOT EXECUTED 30052dfc: 11a00005 movne r0, r5 <== NOT EXECUTED 30052e00: 11a0e00f movne lr, pc <== NOT EXECUTED 30052e04: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 30052e08: e3540000 cmp r4, #0 <== NOT EXECUTED 30052e0c: 0a000007 beq 30052e30 <_rename_r+0x308> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30052e10: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30052e14: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e18: 0a000004 beq 30052e30 <_rename_r+0x308> <== NOT EXECUTED 30052e1c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052e20: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e24: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30052e28: 11a0e00f movne lr, pc <== NOT EXECUTED 30052e2c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 30052e30: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 30052e34: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e38: 0a000004 beq 30052e50 <_rename_r+0x328> <== NOT EXECUTED 30052e3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052e40: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e44: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 30052e48: 11a0e00f movne lr, pc <== NOT EXECUTED 30052e4c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30052e50: ebff98ad bl 3003910c <__errno> <== NOT EXECUTED 30052e54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30052e58: e5803000 str r3, [r0] <== NOT EXECUTED 30052e5c: eaffff7f b 30052c60 <_rename_r+0x138> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 30052e60: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 30052e64: e28d0018 add r0, sp, #24 <== NOT EXECUTED 30052e68: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 30052e6c: e1a02005 mov r2, r5 <== NOT EXECUTED 30052e70: e1a0e00f mov lr, pc <== NOT EXECUTED 30052e74: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30052e78: e59d3010 ldr r3, [sp, #16] <== 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 ); 30052e7c: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30052e80: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e84: 0a000004 beq 30052e9c <_rename_r+0x374> <== NOT EXECUTED 30052e88: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052e8c: e3530000 cmp r3, #0 <== NOT EXECUTED 30052e90: 11a00005 movne r0, r5 <== NOT EXECUTED 30052e94: 11a0e00f movne lr, pc <== NOT EXECUTED 30052e98: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 30052e9c: e3540000 cmp r4, #0 <== NOT EXECUTED 30052ea0: 0a000007 beq 30052ec4 <_rename_r+0x39c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30052ea4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30052ea8: e3530000 cmp r3, #0 <== NOT EXECUTED 30052eac: 0a000004 beq 30052ec4 <_rename_r+0x39c> <== NOT EXECUTED 30052eb0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052eb4: e3530000 cmp r3, #0 <== NOT EXECUTED 30052eb8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30052ebc: 11a0e00f movne lr, pc <== NOT EXECUTED 30052ec0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 30052ec4: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 30052ec8: e3530000 cmp r3, #0 <== NOT EXECUTED 30052ecc: 0a000004 beq 30052ee4 <_rename_r+0x3bc> <== NOT EXECUTED 30052ed0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30052ed4: e3530000 cmp r3, #0 <== NOT EXECUTED 30052ed8: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 30052edc: 11a0e00f movne lr, pc <== NOT EXECUTED 30052ee0: 112fff13 bxne r3 <== NOT EXECUTED return result; } 30052ee4: e1a00006 mov r0, r6 <== NOT EXECUTED 30052ee8: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 30052eec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30052ef0: 3005ce08 .word 0x3005ce08 3000698c <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 3000698c: e1a00001 mov r0, r1 <== NOT EXECUTED 30006990: e1a01002 mov r1, r2 <== NOT EXECUTED 30006994: eaffffc4 b 300068ac <== NOT EXECUTED 3000c444 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 3000c444: e1a00001 mov r0, r1 <== NOT EXECUTED 3000c448: eaffff60 b 3000c1d0 <== NOT EXECUTED 30021a24 : #include int chdir( const char *pathname ) { 30021a24: e92d4030 push {r4, r5, lr} 30021a28: e24dd018 sub sp, sp, #24 30021a2c: 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 ); 30021a30: eb007840 bl 3003fb38 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 30021a34: e28d4004 add r4, sp, #4 30021a38: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 30021a3c: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 30021a40: e1a0200c mov r2, ip 30021a44: e1a00005 mov r0, r5 30021a48: e1a03004 mov r3, r4 30021a4c: e58dc000 str ip, [sp] 30021a50: ebff8df0 bl 30005218 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 30021a54: e3500000 cmp r0, #0 30021a58: 1a00000b bne 30021a8c /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 30021a5c: e59d2010 ldr r2, [sp, #16] 30021a60: e5923010 ldr r3, [r2, #16] 30021a64: e3530000 cmp r3, #0 30021a68: 1a000009 bne 30021a94 rtems_filesystem_freenode( &loc ); 30021a6c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30021a70: e3530000 cmp r3, #0 <== NOT EXECUTED 30021a74: 11a00004 movne r0, r4 <== NOT EXECUTED 30021a78: 11a0e00f movne lr, pc <== NOT EXECUTED 30021a7c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30021a80: eb005da1 bl 3003910c <__errno> <== NOT EXECUTED 30021a84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30021a88: e5803000 str r3, [r0] 30021a8c: e3e00000 mvn r0, #0 30021a90: ea000022 b 30021b20 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 30021a94: e1a00004 mov r0, r4 30021a98: e1a0e00f mov lr, pc 30021a9c: e12fff13 bx r3 30021aa0: e3500001 cmp r0, #1 30021aa4: 0a00000a beq 30021ad4 rtems_filesystem_freenode( &loc ); 30021aa8: e59d3010 ldr r3, [sp, #16] 30021aac: e3530000 cmp r3, #0 30021ab0: 0a000004 beq 30021ac8 30021ab4: e593301c ldr r3, [r3, #28] 30021ab8: e3530000 cmp r3, #0 30021abc: 11a00004 movne r0, r4 30021ac0: 11a0e00f movne lr, pc 30021ac4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30021ac8: eb005d8f bl 3003910c <__errno> 30021acc: e3a03014 mov r3, #20 30021ad0: eaffffec b 30021a88 } rtems_filesystem_freenode( &rtems_filesystem_current ); 30021ad4: e59f304c ldr r3, [pc, #76] ; 30021b28 30021ad8: e5930000 ldr r0, [r3] 30021adc: e5903010 ldr r3, [r0, #16] 30021ae0: e3530000 cmp r3, #0 30021ae4: 0a000004 beq 30021afc 30021ae8: e593301c ldr r3, [r3, #28] 30021aec: e3530000 cmp r3, #0 30021af0: 12800004 addne r0, r0, #4 30021af4: 11a0e00f movne lr, pc 30021af8: 112fff13 bxne r3 rtems_filesystem_current = loc; 30021afc: e59f3024 ldr r3, [pc, #36] ; 30021b28 30021b00: e28d4004 add r4, sp, #4 30021b04: e593c000 ldr ip, [r3] 30021b08: e8b4000f ldm r4!, {r0, r1, r2, r3} 30021b0c: e28cc004 add ip, ip, #4 30021b10: e8ac000f stmia ip!, {r0, r1, r2, r3} 30021b14: e5943000 ldr r3, [r4] 30021b18: e3a00000 mov r0, #0 30021b1c: e58c3000 str r3, [ip] return 0; } 30021b20: e28dd018 add sp, sp, #24 30021b24: e8bd8030 pop {r4, r5, pc} 30021b28: 3005ce08 .word 0x3005ce08 30004f30 : int chmod( const char *path, mode_t mode ) { 30004f30: e92d4070 push {r4, r5, r6, lr} 30004f34: e24dd018 sub sp, sp, #24 30004f38: e1a05001 mov r5, r1 30004f3c: 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 ); 30004f40: eb00eafc bl 3003fb38 30004f44: e28d4004 add r4, sp, #4 30004f48: e1a01000 mov r1, r0 30004f4c: e3a0c001 mov ip, #1 30004f50: e1a00006 mov r0, r6 30004f54: e3a02000 mov r2, #0 30004f58: e1a03004 mov r3, r4 30004f5c: e58dc000 str ip, [sp] 30004f60: eb0000ac bl 30005218 if ( status != 0 ) 30004f64: e3500000 cmp r0, #0 30004f68: 1a00000d bne 30004fa4 return -1; if ( !loc.handlers ){ 30004f6c: e59d300c ldr r3, [sp, #12] 30004f70: e3530000 cmp r3, #0 30004f74: 1a00000c bne 30004fac rtems_filesystem_freenode( &loc ); 30004f78: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30004f7c: e3530000 cmp r3, #0 <== NOT EXECUTED 30004f80: 0a000004 beq 30004f98 <== NOT EXECUTED 30004f84: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30004f88: e3530000 cmp r3, #0 <== NOT EXECUTED 30004f8c: 11a00004 movne r0, r4 <== NOT EXECUTED 30004f90: 11a0e00f movne lr, pc <== NOT EXECUTED 30004f94: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 30004f98: eb00d05b bl 3003910c <__errno> <== NOT EXECUTED 30004f9c: e3a03009 mov r3, #9 <== NOT EXECUTED 30004fa0: e5803000 str r3, [r0] <== NOT EXECUTED 30004fa4: e3e05000 mvn r5, #0 30004fa8: ea00001a b 30005018 } if ( !loc.handlers->fchmod_h ){ 30004fac: e593301c ldr r3, [r3, #28] 30004fb0: e3530000 cmp r3, #0 30004fb4: 1a00000a bne 30004fe4 rtems_filesystem_freenode( &loc ); 30004fb8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30004fbc: e3530000 cmp r3, #0 <== NOT EXECUTED 30004fc0: 0a000004 beq 30004fd8 <== NOT EXECUTED 30004fc4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30004fc8: e3530000 cmp r3, #0 <== NOT EXECUTED 30004fcc: 11a00004 movne r0, r4 <== NOT EXECUTED 30004fd0: 11a0e00f movne lr, pc <== NOT EXECUTED 30004fd4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30004fd8: eb00d04b bl 3003910c <__errno> <== NOT EXECUTED 30004fdc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30004fe0: eaffffee b 30004fa0 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 30004fe4: e1a01005 mov r1, r5 30004fe8: e1a00004 mov r0, r4 30004fec: e1a0e00f mov lr, pc 30004ff0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30004ff4: e59d3010 ldr r3, [sp, #16] if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 30004ff8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 30004ffc: e3530000 cmp r3, #0 30005000: 0a000004 beq 30005018 30005004: e593301c ldr r3, [r3, #28] 30005008: e3530000 cmp r3, #0 3000500c: 11a00004 movne r0, r4 30005010: 11a0e00f movne lr, pc 30005014: 112fff13 bxne r3 return result; } 30005018: e1a00005 mov r0, r5 3000501c: e28dd018 add sp, sp, #24 30005020: e8bd8070 pop {r4, r5, r6, pc} 30021b2c : int chown( const char *path, uid_t owner, gid_t group ) { 30021b2c: e92d40f0 push {r4, r5, r6, r7, lr} 30021b30: e1a01801 lsl r1, r1, #16 30021b34: e24dd018 sub sp, sp, #24 30021b38: e1a02802 lsl r2, r2, #16 30021b3c: e1a06821 lsr r6, r1, #16 30021b40: e1a05822 lsr r5, r2, #16 30021b44: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 30021b48: eb0077fa bl 3003fb38 30021b4c: e28d4004 add r4, sp, #4 30021b50: e1a01000 mov r1, r0 30021b54: e3a0c001 mov ip, #1 30021b58: e1a00007 mov r0, r7 30021b5c: e3a02000 mov r2, #0 30021b60: e1a03004 mov r3, r4 30021b64: e58dc000 str ip, [sp] 30021b68: ebff8daa bl 30005218 30021b6c: e3500000 cmp r0, #0 30021b70: 1a00000b bne 30021ba4 return -1; if ( !loc.ops->chown_h ) { 30021b74: e59d2010 ldr r2, [sp, #16] 30021b78: e5923018 ldr r3, [r2, #24] 30021b7c: e3530000 cmp r3, #0 30021b80: 1a000009 bne 30021bac rtems_filesystem_freenode( &loc ); 30021b84: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30021b88: e3530000 cmp r3, #0 <== NOT EXECUTED 30021b8c: 11a00004 movne r0, r4 <== NOT EXECUTED 30021b90: 11a0e00f movne lr, pc <== NOT EXECUTED 30021b94: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30021b98: eb005d5b bl 3003910c <__errno> <== NOT EXECUTED 30021b9c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30021ba0: e5803000 str r3, [r0] <== NOT EXECUTED 30021ba4: e3e05000 mvn r5, #0 30021ba8: ea00000d b 30021be4 } result = (*loc.ops->chown_h)( &loc, owner, group ); 30021bac: e1a02005 mov r2, r5 30021bb0: e1a01006 mov r1, r6 30021bb4: e1a00004 mov r0, r4 30021bb8: e1a0e00f mov lr, pc 30021bbc: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30021bc0: e59d3010 ldr r3, [sp, #16] 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 ); 30021bc4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 30021bc8: e3530000 cmp r3, #0 30021bcc: 0a000004 beq 30021be4 30021bd0: e593301c ldr r3, [r3, #28] 30021bd4: e3530000 cmp r3, #0 30021bd8: 11a00004 movne r0, r4 30021bdc: 11a0e00f movne lr, pc 30021be0: 112fff13 bxne r3 return result; } 30021be4: e1a00005 mov r0, r5 30021be8: e28dd018 add sp, sp, #24 30021bec: e8bd80f0 pop {r4, r5, r6, r7, pc} 30021bf0 : #include int chroot( const char *pathname ) { 30021bf0: 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) { 30021bf4: e59f50d8 ldr r5, [pc, #216] ; 30021cd4 30021bf8: e59f30d8 ldr r3, [pc, #216] ; 30021cd8 30021bfc: e5954000 ldr r4, [r5] #include int chroot( const char *pathname ) { 30021c00: e24dd018 sub sp, sp, #24 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) { 30021c04: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 30021c08: 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) { 30021c0c: 1a000008 bne 30021c34 rtems_libio_set_private_env(); /* try to set a new private env*/ 30021c10: eb0005d8 bl 30023378 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 30021c14: e5953000 ldr r3, [r5] 30021c18: e1530004 cmp r3, r4 30021c1c: 1a000004 bne 30021c34 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30021c20: eb005d39 bl 3003910c <__errno> <== NOT EXECUTED 30021c24: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30021c28: e5803000 str r3, [r0] <== NOT EXECUTED 30021c2c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30021c30: ea000025 b 30021ccc <== NOT EXECUTED } result = chdir(pathname); 30021c34: e1a00006 mov r0, r6 30021c38: ebffff79 bl 30021a24 if (result) { 30021c3c: e250c000 subs ip, r0, #0 30021c40: 1a000007 bne 30021c64 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 30021c44: e1a0200c mov r2, ip 30021c48: e59f008c ldr r0, [pc, #140] ; 30021cdc 30021c4c: e3a01001 mov r1, #1 30021c50: e28d3004 add r3, sp, #4 30021c54: e58dc000 str ip, [sp] 30021c58: ebff8d6e bl 30005218 30021c5c: e3500000 cmp r0, #0 30021c60: 0a000006 beq 30021c80 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 30021c64: eb005d28 bl 3003910c <__errno> <== NOT EXECUTED 30021c68: e1a04000 mov r4, r0 <== NOT EXECUTED 30021c6c: eb005d26 bl 3003910c <__errno> <== NOT EXECUTED 30021c70: e5903000 ldr r3, [r0] <== NOT EXECUTED 30021c74: e3e00000 mvn r0, #0 <== NOT EXECUTED 30021c78: e5843000 str r3, [r4] <== NOT EXECUTED 30021c7c: ea000012 b 30021ccc <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 30021c80: e59f304c ldr r3, [pc, #76] ; 30021cd4 30021c84: e5930000 ldr r0, [r3] 30021c88: e5903024 ldr r3, [r0, #36] ; 0x24 30021c8c: e3530000 cmp r3, #0 30021c90: 0a000004 beq 30021ca8 30021c94: e593301c ldr r3, [r3, #28] 30021c98: e3530000 cmp r3, #0 30021c9c: 12800018 addne r0, r0, #24 30021ca0: 11a0e00f movne lr, pc 30021ca4: 112fff13 bxne r3 rtems_filesystem_root = loc; 30021ca8: e59f3024 ldr r3, [pc, #36] ; 30021cd4 30021cac: e28d4004 add r4, sp, #4 30021cb0: e593c000 ldr ip, [r3] 30021cb4: e8b4000f ldm r4!, {r0, r1, r2, r3} 30021cb8: e28cc018 add ip, ip, #24 30021cbc: e8ac000f stmia ip!, {r0, r1, r2, r3} 30021cc0: e5943000 ldr r3, [r4] 30021cc4: e3a00000 mov r0, #0 30021cc8: e58c3000 str r3, [ip] return 0; } 30021ccc: e28dd018 add sp, sp, #24 30021cd0: e8bd8070 pop {r4, r5, r6, pc} 30021cd4: 3005ce08 .word 0x3005ce08 30021cd8: 30060c10 .word 0x30060c10 30021cdc: 3005755f .word 0x3005755f 30007c48 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 30007c48: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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; 30007c4c: e5935000 ldr r5, [r3] const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 30007c50: e1a04003 mov r4, r3 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) 30007c54: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 30007c58: e1a09000 mov r9, r0 30007c5c: e1a08001 mov r8, 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) 30007c60: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 30007c64: 159fa090 ldrne sl, [pc, #144] ; 30007cfc 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) 30007c68: 1a000019 bne 30007cd4 rtems_set_errno_and_return_minus_one( EFAULT ); 30007c6c: eb000b87 bl 3000aa90 <__errno> <== NOT EXECUTED 30007c70: e3a0300e mov r3, #14 <== NOT EXECUTED 30007c74: e5803000 str r3, [r0] <== NOT EXECUTED 30007c78: e3e00000 mvn r0, #0 <== NOT EXECUTED 30007c7c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 30007c80: e5957000 ldr r7, [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++) { 30007c84: e2866001 add r6, r6, #1 if (!device_name_table[i].device_name) 30007c88: e2571000 subs r1, r7, #0 30007c8c: 0a00000f beq 30007cd0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 30007c90: eb000f34 bl 3000b968 30007c94: e3500000 cmp r0, #0 30007c98: 1a00000c bne 30007cd0 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 30007c9c: e7d70008 ldrb r0, [r7, r8] 30007ca0: e3500000 cmp r0, #0 30007ca4: 1a000009 bne 30007cd0 /* 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; 30007ca8: e59f3050 ldr r3, [pc, #80] ; 30007d00 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 30007cac: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 30007cb0: e5933000 ldr r3, [r3] 30007cb4: e5933028 ldr r3, [r3, #40] ; 0x28 30007cb8: e5843010 str r3, [r4, #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; 30007cbc: e59f3040 ldr r3, [pc, #64] ; 30007d04 30007cc0: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 30007cc4: e59f303c ldr r3, [pc, #60] ; 30007d08 30007cc8: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 30007ccc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, 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 ); for (i = 0; i < rtems_device_table_size; i++) { 30007cd0: e2855014 add r5, r5, #20 30007cd4: e59a3000 ldr r3, [sl] if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 30007cd8: e1a00009 mov r0, r9 /* 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++) { 30007cdc: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 30007ce0: e1a02008 mov r2, r8 /* 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++) { 30007ce4: 3affffe5 bcc 30007c80 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 30007ce8: eb000b68 bl 3000aa90 <__errno> 30007cec: e3a03002 mov r3, #2 30007cf0: e5803000 str r3, [r0] 30007cf4: e3e00000 mvn r0, #0 } 30007cf8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30007cfc: 3000e8e8 .word 0x3000e8e8 30007d00: 3000eb48 .word 0x3000eb48 30007d04: 3000eab4 .word 0x3000eab4 30007d08: 3000eaec .word 0x3000eaec 30000f20 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30000f20: e92d40f0 push {r4, r5, r6, r7, lr} rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 30000f24: e59f7058 ldr r7, [pc, #88] ; 30000f84 30000f28: e3a06014 mov r6, #20 30000f2c: e5973000 ldr r3, [r7] int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30000f30: 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( 30000f34: e0000396 mul r0, r6, r3 30000f38: eb001a16 bl 30007798 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 30000f3c: e2505000 subs r5, r0, #0 30000f40: 1a000004 bne 30000f58 rtems_set_errno_and_return_minus_one( ENOMEM ); 30000f44: eb0026d1 bl 3000aa90 <__errno> <== NOT EXECUTED 30000f48: e3a0300c mov r3, #12 <== NOT EXECUTED 30000f4c: e5803000 str r3, [r0] <== NOT EXECUTED 30000f50: e3e00000 mvn r0, #0 <== NOT EXECUTED 30000f54: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( 30000f58: e5972000 ldr r2, [r7] 30000f5c: e3a01000 mov r1, #0 30000f60: e0020296 mul r2, r6, r2 30000f64: eb0028f7 bl 3000b348 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; 30000f68: e59f3018 ldr r3, [pc, #24] ; 30000f88 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; 30000f6c: 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; 30000f70: e2832038 add r2, r3, #56 ; 0x38 30000f74: 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; 30000f78: 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; 30000f7c: e3a00000 mov r0, #0 return 0; } 30000f80: e8bd80f0 pop {r4, r5, r6, r7, pc} 30000f84: 3000e8e8 .word 0x3000e8e8 30000f88: 3000eab4 .word 0x3000eab4 30000f8c : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 30000f8c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 30000f90: 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') && 30000f94: e5d00000 ldrb r0, [r0] const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 30000f98: e1a05001 mov r5, r1 * 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') && 30000f9c: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 30000fa0: e58d2000 str r2, [sp] 30000fa4: e1a09003 mov r9, 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') && 30000fa8: 1a000008 bne 30000fd0 30000fac: e5d43001 ldrb r3, [r4, #1] 30000fb0: e3530065 cmp r3, #101 ; 0x65 30000fb4: 1a000005 bne 30000fd0 (path[2] == 'v') && (path[3] == '\0')) 30000fb8: e5d43002 ldrb r3, [r4, #2] 30000fbc: e3530076 cmp r3, #118 ; 0x76 30000fc0: 1a000002 bne 30000fd0 30000fc4: e5d40003 ldrb r0, [r4, #3] 30000fc8: e3500000 cmp r0, #0 30000fcc: 0a000039 beq 300010b8 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 30000fd0: e205aa0f and sl, r5, #61440 ; 0xf000 30000fd4: e35a0a02 cmp sl, #8192 ; 0x2000 30000fd8: 135a0a06 cmpne sl, #24576 ; 0x6000 30000fdc: 03a0a000 moveq sl, #0 30000fe0: 13a0a001 movne sl, #1 30000fe4: 0a000002 beq 30000ff4 rtems_set_errno_and_return_minus_one( EINVAL ); 30000fe8: eb0026a8 bl 3000aa90 <__errno> <== NOT EXECUTED 30000fec: e3a03016 mov r3, #22 <== NOT EXECUTED 30000ff0: ea000008 b 30001018 <== NOT EXECUTED 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; 30000ff4: e59d3028 ldr r3, [sp, #40] ; 0x28 30000ff8: e5936000 ldr r6, [r3] if (!device_name_table) 30000ffc: e3560000 cmp r6, #0 30001000: 13e07000 mvnne r7, #0 30001004: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 30001008: 159fb0ac ldrne fp, [pc, #172] ; 300010bc 3000100c: 1a000010 bne 30001054 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 ); 30001010: eb00269e bl 3000aa90 <__errno> <== NOT EXECUTED 30001014: e3a0300e mov r3, #14 <== NOT EXECUTED 30001018: e5803000 str r3, [r0] <== NOT EXECUTED 3000101c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001020: ea000024 b 300010b8 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 30001024: e796300a ldr r3, [r6, sl] /* 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++){ 30001028: e28aa014 add sl, sl, #20 if (device_name_table[i].device_name == NULL) 3000102c: e2531000 subs r1, r3, #0 30001030: 0a000005 beq 3000104c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 30001034: eb00296b bl 3000b5e8 <== NOT EXECUTED 30001038: e3500000 cmp r0, #0 <== NOT EXECUTED 3000103c: 1a000003 bne 30001050 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 30001040: eb002692 bl 3000aa90 <__errno> <== NOT EXECUTED 30001044: e3a03011 mov r3, #17 <== NOT EXECUTED 30001048: eafffff2 b 30001018 <== NOT EXECUTED 3000104c: e1a07008 mov r7, r8 /* 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++){ 30001050: e2888001 add r8, r8, #1 30001054: e59b3000 ldr r3, [fp] if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 30001058: e1a00004 mov r0, r4 /* 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++){ 3000105c: e1580003 cmp r8, r3 30001060: 3affffef bcc 30001024 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 30001064: e3770001 cmn r7, #1 30001068: 1a000004 bne 30001080 rtems_set_errno_and_return_minus_one( ENOMEM ); 3000106c: eb002687 bl 3000aa90 <__errno> <== NOT EXECUTED 30001070: e3a0300c mov r3, #12 <== NOT EXECUTED 30001074: e5803000 str r3, [r0] <== NOT EXECUTED 30001078: e1a00007 mov r0, r7 <== NOT EXECUTED 3000107c: ea00000d b 300010b8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30001080: e10f8000 mrs r8, CPSR 30001084: e3883080 orr r3, r8, #128 ; 0x80 30001088: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 3000108c: e3a02014 mov r2, #20 30001090: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); 30001094: e1a00004 mov r0, r4 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 30001098: e7864003 str r4, [r6, r3] 3000109c: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); 300010a0: eb002a18 bl 3000b908 device_name_table[slot].major = major; 300010a4: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 300010a8: e5865010 str r5, [r6, #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); 300010ac: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300010b0: e129f008 msr CPSR_fc, r8 300010b4: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 300010b8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 300010bc: 3000e8e8 .word 0x3000e8e8 30001138 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30001138: e92d4010 push {r4, lr} <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 3000113c: e590c014 ldr ip, [r0, #20] <== NOT EXECUTED ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30001140: e24dd01c sub sp, sp, #28 <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 30001144: e58d2010 str r2, [sp, #16] <== NOT EXECUTED ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30001148: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 3000114c: e3a02000 mov r2, #0 <== 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; 30001150: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 30001154: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 30001158: e58dc014 str ip, [sp, #20] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 3000115c: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 30001160: e1a0200d mov r2, sp <== NOT EXECUTED 30001164: e590100c ldr r1, [r0, #12] <== NOT EXECUTED 30001168: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 3000116c: e58d3000 str r3, [sp] <== NOT EXECUTED args.offset = iop->offset; 30001170: e283400c add r4, r3, #12 <== NOT EXECUTED 30001174: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED 30001178: e98d0018 stmib sp, {r3, r4} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 3000117c: eb000ee2 bl 30004d0c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 30001180: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 30001184: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 30001188: 1b001adf blne 30007d0c <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 3000118c: e28dd01c add sp, sp, #28 <== NOT EXECUTED 30001190: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30001194 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 30001194: e5903000 ldr r3, [r0] int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 30001198: 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) 3000119c: e3530000 cmp r3, #0 300011a0: 1a000004 bne 300011b8 rtems_set_errno_and_return_minus_one( EFAULT ); 300011a4: eb002639 bl 3000aa90 <__errno> <== NOT EXECUTED 300011a8: e3a0300e mov r3, #14 <== NOT EXECUTED 300011ac: e5803000 str r3, [r0] <== NOT EXECUTED 300011b0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300011b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 300011b8: 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 ); 300011bc: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 300011c0: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; 300011c4: 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 ); 300011c8: e5813018 str r3, [r1, #24] 300011cc: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 300011d0: e3a00000 mov r0, #0 return 0; } 300011d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 3000a870 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000a870: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 3000a874: e280400c add r4, r0, #12 <== NOT EXECUTED 3000a878: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000a87c: e24dd01c sub sp, sp, #28 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 3000a880: e590c014 ldr ip, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 3000a884: e98d0018 stmib sp, {r3, r4} <== NOT EXECUTED args.buffer = buffer; args.count = count; 3000a888: e58d2010 str r2, [sp, #16] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 3000a88c: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 3000a890: e3a02000 mov r2, #0 <== NOT EXECUTED 3000a894: e58d2018 str r2, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 3000a898: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; 3000a89c: e58dc014 str ip, [sp, #20] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 3000a8a0: e58d0000 str r0, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 3000a8a4: e5931054 ldr r1, [r3, #84] ; 0x54 <== NOT EXECUTED 3000a8a8: e5930050 ldr r0, [r3, #80] ; 0x50 <== NOT EXECUTED 3000a8ac: e1a0200d mov r2, sp <== NOT EXECUTED 3000a8b0: eb000513 bl 3000bd04 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 3000a8b4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 3000a8b8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 3000a8bc: 1b00062f blne 3000c180 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 3000a8c0: e28dd01c add sp, sp, #28 <== NOT EXECUTED 3000a8c4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30002c10 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c10: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002c14: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c18: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002c1c: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c20: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30002c24: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30002c28: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30002c2c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 30002c30: e3a05002 mov r5, #2 <== 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) { 30002c34: ea00000a b 30002c64 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 30002c38: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002c3c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 30002c40: e3a01000 mov r1, #0 <== NOT EXECUTED 30002c44: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30002c48: e1a02001 mov r2, r1 <== NOT EXECUTED 30002c4c: eb0005ac bl 30004304 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002c50: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30002c54: 1b00073e blne 30004954 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30002c58: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30002c5c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30002c60: 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) { 30002c64: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 30002c68: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 30002c6c: e1510002 cmp r1, r2 <== NOT EXECUTED 30002c70: 1afffff0 bne 30002c38 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002c74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30002c78: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30001ff0 : int dup2( int fildes, int fildes2 ) { 30001ff0: e92d4070 push {r4, r5, r6, lr} 30001ff4: e24dd048 sub sp, sp, #72 ; 0x48 30001ff8: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30001ffc: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 30002000: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 30002004: eb000196 bl 30002664 if ( status == -1 ) 30002008: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 3000200c: e1a0500d mov r5, sp if ( status == -1 ) 30002010: 0a000009 beq 3000203c /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 30002014: e1a0100d mov r1, sp 30002018: e1a00004 mov r0, r4 3000201c: eb000190 bl 30002664 if ( status == -1 ) 30002020: e3700001 cmn r0, #1 30002024: 0a000004 beq 3000203c /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 30002028: e1a00006 mov r0, r6 <== NOT EXECUTED 3000202c: e1a02004 mov r2, r4 <== NOT EXECUTED 30002030: e3a01000 mov r1, #0 <== NOT EXECUTED 30002034: eb000088 bl 3000225c <== NOT EXECUTED 30002038: ea000000 b 30002040 <== NOT EXECUTED 3000203c: e3e00000 mvn r0, #0 } 30002040: e28dd048 add sp, sp, #72 ; 0x48 30002044: e8bd8070 pop {r4, r5, r6, pc} 30002710 : * 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')) { 30002710: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 30002714: e92d4011 push {r0, r4, lr} <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 30002718: e3120c02 tst r2, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 3000271c: e1a04001 mov r4, r1 <== NOT EXECUTED 30002720: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 30002724: 0a000015 beq 30002780 <== NOT EXECUTED 30002728: e59f205c ldr r2, [pc, #92] ; 3000278c <== NOT EXECUTED 3000272c: e2503009 subs r3, r0, #9 <== NOT EXECUTED 30002730: 13a03001 movne r3, #1 <== NOT EXECUTED 30002734: e5922000 ldr r2, [r2] <== NOT EXECUTED 30002738: e0822000 add r2, r2, r0 <== NOT EXECUTED 3000273c: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30002740: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 30002744: 0a00000d beq 30002780 <== NOT EXECUTED 30002748: e350000a cmp r0, #10 <== NOT EXECUTED 3000274c: 0a00000b beq 30002780 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 30002750: 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] = '^'; 30002754: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 30002758: e1a0000d mov r0, sp <== NOT EXECUTED 3000275c: e3a01002 mov r1, #2 <== NOT EXECUTED 30002760: 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; 30002764: 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] = '^'; 30002768: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 3000276c: ebffff4d bl 300024a8 <== NOT EXECUTED tty->column += 2; 30002770: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30002774: e2833002 add r3, r3, #2 <== NOT EXECUTED 30002778: 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')) { 3000277c: ea000001 b 30002788 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 30002780: e1a01004 mov r1, r4 <== NOT EXECUTED 30002784: ebffff8b bl 300025b8 <== NOT EXECUTED } } 30002788: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 3000278c: 30019498 .word 0x30019498 30022298 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 30022298: e59f300c ldr r3, [pc, #12] ; 300222ac <== NOT EXECUTED 3002229c: e5930000 ldr r0, [r3] <== NOT EXECUTED 300222a0: e3500000 cmp r0, #0 <== NOT EXECUTED 300222a4: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 300222a8: ea005be4 b 30039240 <== NOT EXECUTED 300222ac: 300608c8 .word 0x300608c8 300222b0 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 300222b0: e59f300c ldr r3, [pc, #12] ; 300222c4 <== NOT EXECUTED 300222b4: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 300222b8: e3500000 cmp r0, #0 <== NOT EXECUTED 300222bc: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 300222c0: ea005bde b 30039240 <== NOT EXECUTED 300222c4: 300608c8 .word 0x300608c8 30002790 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 30002790: e5903020 ldr r3, [r0, #32] <== 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) { 30002794: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED if (tty->ccount == 0) 30002798: 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) { 3000279c: e1a04000 mov r4, r0 <== NOT EXECUTED 300027a0: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 300027a4: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 300027a8: e3510000 cmp r1, #0 <== NOT EXECUTED 300027ac: 0a000062 beq 3000293c <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 300027b0: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 300027b4: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 300027b8: 05802020 streq r2, [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)) { 300027bc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 300027c0: e2133010 ands r3, r3, #16 <== NOT EXECUTED 300027c4: 1a00005c bne 3000293c <== NOT EXECUTED tty->ccount = 0; 300027c8: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 300027cc: e1a01004 mov r1, r4 <== NOT EXECUTED 300027d0: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 300027d4: ebffffcd bl 30002710 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 300027d8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 300027dc: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 300027e0: 11a01004 movne r1, r4 <== NOT EXECUTED 300027e4: 13a0000a movne r0, #10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 300027e8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 300027ec: ea00000c b 30002824 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 300027f0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 300027f4: e2411001 sub r1, r1, #1 <== NOT EXECUTED 300027f8: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 300027fc: e5841020 str r1, [r4, #32] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 30002800: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 30002804: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 30002808: 0a000048 beq 30002930 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3000280c: e3570000 cmp r7, #0 <== NOT EXECUTED 30002810: 1a000005 bne 3000282c <== NOT EXECUTED 30002814: e3130010 tst r3, #16 <== NOT EXECUTED 30002818: 1a000003 bne 3000282c <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 3000281c: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 30002820: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 30002824: e8bd41f0 pop {r4, r5, r6, r7, r8, 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); 30002828: eaffffb8 b 30002710 <== NOT EXECUTED } else if (c == '\t') { 3000282c: e3550009 cmp r5, #9 <== NOT EXECUTED 30002830: 1a000020 bne 300028b8 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 30002834: e2033c02 and r3, r3, #512 ; 0x200 <== 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; 30002838: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3000283c: e596c000 ldr ip, [r6] <== NOT EXECUTED 30002840: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002844: ea00000d b 30002880 <== NOT EXECUTED c = tty->cbuf[i++]; 30002848: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 3000284c: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 30002850: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 30002854: e08c8000 add r8, ip, r0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 30002858: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 3000285c: 0a000005 beq 30002878 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 30002860: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 30002864: e3100020 tst r0, #32 <== NOT EXECUTED 30002868: 0a000002 beq 30002878 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 3000286c: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 30002870: 12855002 addne r5, r5, #2 <== NOT EXECUTED 30002874: ea000000 b 3000287c <== NOT EXECUTED } else { col++; 30002878: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 3000287c: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30002880: e1520001 cmp r2, r1 <== NOT EXECUTED 30002884: 1affffef bne 30002848 <== NOT EXECUTED 30002888: ea000005 b 300028a4 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 3000288c: e3a01001 mov r1, #1 <== NOT EXECUTED 30002890: e1a02004 mov r2, r4 <== NOT EXECUTED 30002894: ebffff03 bl 300024a8 <== NOT EXECUTED tty->column--; 30002898: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3000289c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300028a0: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 300028a4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 300028a8: e59f00a0 ldr r0, [pc, #160] ; 30002950 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 300028ac: e1530005 cmp r3, r5 <== NOT EXECUTED 300028b0: cafffff5 bgt 3000288c <== NOT EXECUTED 300028b4: ea00001d b 30002930 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 300028b8: e5962000 ldr r2, [r6] <== NOT EXECUTED 300028bc: e2855001 add r5, r5, #1 <== NOT EXECUTED 300028c0: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 300028c4: e3120020 tst r2, #32 <== NOT EXECUTED 300028c8: 0a000009 beq 300028f4 <== NOT EXECUTED 300028cc: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 300028d0: 0a000007 beq 300028f4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 300028d4: e59f0078 ldr r0, [pc, #120] ; 30002954 <== NOT EXECUTED 300028d8: e3a01003 mov r1, #3 <== NOT EXECUTED 300028dc: e1a02004 mov r2, r4 <== NOT EXECUTED 300028e0: ebfffef0 bl 300024a8 <== NOT EXECUTED if (tty->column) 300028e4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 300028e8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 300028ec: 12433001 subne r3, r3, #1 <== NOT EXECUTED 300028f0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 300028f4: e5963000 ldr r3, [r6] <== NOT EXECUTED 300028f8: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 300028fc: e3130020 tst r3, #32 <== NOT EXECUTED 30002900: 0a000002 beq 30002910 <== NOT EXECUTED 30002904: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30002908: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3000290c: 0a000007 beq 30002930 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30002910: e59f003c ldr r0, [pc, #60] ; 30002954 <== NOT EXECUTED 30002914: e3a01003 mov r1, #3 <== NOT EXECUTED 30002918: e1a02004 mov r2, r4 <== NOT EXECUTED 3000291c: ebfffee1 bl 300024a8 <== NOT EXECUTED if (tty->column) 30002920: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30002924: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 30002928: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3000292c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 30002930: e3570000 cmp r7, #0 <== NOT EXECUTED 30002934: 1a000001 bne 30002940 <== NOT EXECUTED 30002938: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3000293c: e59f6014 ldr r6, [pc, #20] ; 30002958 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 30002940: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 30002944: e3510000 cmp r1, #0 <== NOT EXECUTED 30002948: 1affffa8 bne 300027f0 <== NOT EXECUTED 3000294c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30002950: 30018d39 .word 0x30018d39 30002954: 30018d37 .word 0x30018d37 30002958: 30019498 .word 0x30019498 30033500 : #include int fchdir( int fd ) { 30033500: 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 ); 30033504: e59f315c ldr r3, [pc, #348] ; 30033668 <== NOT EXECUTED #include int fchdir( int fd ) { 30033508: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3003350c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30033510: e1500003 cmp r0, r3 <== NOT EXECUTED 30033514: 2a000005 bcs 30033530 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 30033518: e59f314c ldr r3, [pc, #332] ; 3003366c <== NOT EXECUTED 3003351c: e5938000 ldr r8, [r3] <== NOT EXECUTED 30033520: e0888300 add r8, r8, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 30033524: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED 30033528: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3003352c: 1a000002 bne 3003353c <== NOT EXECUTED 30033530: eb0016f5 bl 3003910c <__errno> <== NOT EXECUTED 30033534: e3a03009 mov r3, #9 <== NOT EXECUTED 30033538: ea000016 b 30033598 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3003353c: e3130002 tst r3, #2 <== NOT EXECUTED 30033540: 1a000002 bne 30033550 <== NOT EXECUTED 30033544: eb0016f0 bl 3003910c <__errno> <== NOT EXECUTED 30033548: e3a03016 mov r3, #22 <== NOT EXECUTED 3003354c: ea000011 b 30033598 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 30033550: e5983024 ldr r3, [r8, #36] ; 0x24 <== NOT EXECUTED 30033554: e3530000 cmp r3, #0 <== NOT EXECUTED 30033558: 0a000002 beq 30033568 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 3003355c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 30033560: e3530000 cmp r3, #0 <== NOT EXECUTED 30033564: 1a000002 bne 30033574 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30033568: eb0016e7 bl 3003910c <__errno> <== NOT EXECUTED 3003356c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30033570: ea000008 b 30033598 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 30033574: e2888018 add r8, r8, #24 <== NOT EXECUTED 30033578: e1a00008 mov r0, r8 <== NOT EXECUTED 3003357c: e1a0e00f mov lr, pc <== NOT EXECUTED 30033580: e12fff13 bx r3 <== NOT EXECUTED 30033584: e3500001 cmp r0, #1 <== NOT EXECUTED 30033588: e1a07000 mov r7, r0 <== NOT EXECUTED 3003358c: 0a000004 beq 300335a4 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 30033590: eb0016dd bl 3003910c <__errno> <== NOT EXECUTED 30033594: e3a03014 mov r3, #20 <== NOT EXECUTED 30033598: e5803000 str r3, [r0] <== NOT EXECUTED 3003359c: e3e00000 mvn r0, #0 <== NOT EXECUTED 300335a0: ea00002e b 30033660 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 300335a4: e59f40c4 ldr r4, [pc, #196] ; 30033670 <== NOT EXECUTED 300335a8: e28de004 add lr, sp, #4 <== NOT EXECUTED 300335ac: e5945000 ldr r5, [r4] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 300335b0: e3a06000 mov r6, #0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 300335b4: e285c004 add ip, r5, #4 <== NOT EXECUTED 300335b8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 300335bc: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 300335c0: e59c3000 ldr r3, [ip] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 300335c4: e2855004 add r5, r5, #4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 300335c8: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 300335cc: e8b8000f ldm r8!, {r0, r1, r2, r3} <== NOT EXECUTED 300335d0: e8a5000f stmia r5!, {r0, r1, r2, r3} <== NOT EXECUTED 300335d4: e5983000 ldr r3, [r8] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 300335d8: e1a01007 mov r1, r7 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 300335dc: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 300335e0: e1a02006 mov r2, r6 <== NOT EXECUTED 300335e4: e59f0088 ldr r0, [pc, #136] ; 30033674 <== NOT EXECUTED 300335e8: e28d3018 add r3, sp, #24 <== NOT EXECUTED 300335ec: e58d6000 str r6, [sp] <== NOT EXECUTED 300335f0: ebff4708 bl 30005218 <== NOT EXECUTED 300335f4: e1500006 cmp r0, r6 <== NOT EXECUTED 300335f8: 0a000007 beq 3003361c <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 300335fc: e594c000 ldr ip, [r4] <== NOT EXECUTED 30033600: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30033604: e28cc004 add ip, ip, #4 <== NOT EXECUTED 30033608: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3003360c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30033610: e3e00000 mvn r0, #0 <== NOT EXECUTED 30033614: e5943000 ldr r3, [r4] <== NOT EXECUTED 30033618: ea00000f b 3003365c <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 3003361c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30033620: e3530000 cmp r3, #0 <== NOT EXECUTED 30033624: 0a000004 beq 3003363c <== NOT EXECUTED 30033628: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3003362c: e3530000 cmp r3, #0 <== NOT EXECUTED 30033630: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 30033634: 11a0e00f movne lr, pc <== NOT EXECUTED 30033638: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 3003363c: e59f302c ldr r3, [pc, #44] ; 30033670 <== NOT EXECUTED 30033640: e28d4018 add r4, sp, #24 <== NOT EXECUTED 30033644: e593c000 ldr ip, [r3] <== NOT EXECUTED 30033648: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3003364c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 30033650: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30033654: e5943000 ldr r3, [r4] <== NOT EXECUTED 30033658: e3a00000 mov r0, #0 <== NOT EXECUTED 3003365c: e58c3000 str r3, [ip] <== NOT EXECUTED return 0; } 30033660: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 30033664: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30033668: 3005cad0 .word 0x3005cad0 3003366c: 30060bb4 .word 0x30060bb4 30033670: 3005ce08 .word 0x3005ce08 30033674: 3005755f .word 0x3005755f 30021ee8 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021ee8: e59f307c ldr r3, [pc, #124] ; 30021f6c <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 30021eec: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021ef0: e5933000 ldr r3, [r3] <== NOT EXECUTED 30021ef4: e1500003 cmp r0, r3 <== NOT EXECUTED 30021ef8: 2a000005 bcs 30021f14 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 30021efc: e59f306c ldr r3, [pc, #108] ; 30021f70 <== NOT EXECUTED 30021f00: e5933000 ldr r3, [r3] <== NOT EXECUTED 30021f04: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 30021f08: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 30021f0c: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 30021f10: 1a000002 bne 30021f20 <== NOT EXECUTED 30021f14: eb005c7c bl 3003910c <__errno> <== NOT EXECUTED 30021f18: e3a03009 mov r3, #9 <== NOT EXECUTED 30021f1c: ea00000a b 30021f4c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30021f20: e3120004 tst r2, #4 <== NOT EXECUTED 30021f24: 1a000002 bne 30021f34 <== NOT EXECUTED 30021f28: eb005c77 bl 3003910c <__errno> <== NOT EXECUTED 30021f2c: e3a03016 mov r3, #22 <== NOT EXECUTED 30021f30: ea000005 b 30021f4c <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 30021f34: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 30021f38: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 30021f3c: e3520000 cmp r2, #0 <== NOT EXECUTED 30021f40: 1a000004 bne 30021f58 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30021f44: eb005c70 bl 3003910c <__errno> <== NOT EXECUTED 30021f48: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30021f4c: e5803000 str r3, [r0] <== NOT EXECUTED 30021f50: e3e00000 mvn r0, #0 <== NOT EXECUTED 30021f54: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 30021f58: e2830018 add r0, r3, #24 <== NOT EXECUTED 30021f5c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 30021f60: e1a0e00f mov lr, pc <== NOT EXECUTED 30021f64: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 30021f68: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30021f6c: 3005cad0 .word 0x3005cad0 30021f70: 30060bb4 .word 0x30060bb4 30021f74 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021f74: e59f3088 ldr r3, [pc, #136] ; 30022004 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 30021f78: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021f7c: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 30021f80: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021f84: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 30021f88: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 30021f8c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30021f90: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30021f94: 2a000005 bcs 30021fb0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 30021f98: e59f3068 ldr r3, [pc, #104] ; 30022008 <== NOT EXECUTED 30021f9c: e5933000 ldr r3, [r3] <== NOT EXECUTED 30021fa0: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 30021fa4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 30021fa8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30021fac: 1a000002 bne 30021fbc <== NOT EXECUTED 30021fb0: eb005c55 bl 3003910c <__errno> <== NOT EXECUTED 30021fb4: e3a03009 mov r3, #9 <== NOT EXECUTED 30021fb8: ea00000a b 30021fe8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30021fbc: e3130004 tst r3, #4 <== NOT EXECUTED 30021fc0: 1a000002 bne 30021fd0 <== NOT EXECUTED 30021fc4: eb005c50 bl 3003910c <__errno> <== NOT EXECUTED 30021fc8: e3a03016 mov r3, #22 <== NOT EXECUTED 30021fcc: ea000005 b 30021fe8 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 30021fd0: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 30021fd4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30021fd8: e3530000 cmp r3, #0 <== NOT EXECUTED 30021fdc: 1a000004 bne 30021ff4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30021fe0: eb005c49 bl 3003910c <__errno> <== NOT EXECUTED 30021fe4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30021fe8: e5803000 str r3, [r0] <== NOT EXECUTED 30021fec: e3e00000 mvn r0, #0 <== NOT EXECUTED 30021ff0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 30021ff4: e2800018 add r0, r0, #24 <== NOT EXECUTED 30021ff8: e1a0e00f mov lr, pc <== NOT EXECUTED 30021ffc: e12fff13 bx r3 <== NOT EXECUTED } 30022000: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30022004: 3005cad0 .word 0x3005cad0 30022008: 30060bb4 .word 0x30060bb4 30033678 : int fcntl( int fd, int cmd, ... ) { 30033678: e92d000e push {r1, r2, r3} 3003367c: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30033680: e59f31a4 ldr r3, [pc, #420] ; 3003382c int fcntl( int fd, int cmd, ... ) { 30033684: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30033688: e5932000 ldr r2, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 3003368c: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30033690: e1500002 cmp r0, r2 ... ) { int ret; va_list ap; va_start( ap, cmd ); 30033694: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30033698: 2a000005 bcs 300336b4 iop = rtems_libio_iop( fd ); 3003369c: e59f118c ldr r1, [pc, #396] ; 30033830 300336a0: e591c000 ldr ip, [r1] 300336a4: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 300336a8: e5940014 ldr r0, [r4, #20] 300336ac: e3100c01 tst r0, #256 ; 0x100 300336b0: 1a000002 bne 300336c0 300336b4: eb001694 bl 3003910c <__errno> <== NOT EXECUTED 300336b8: e3a03009 mov r3, #9 <== NOT EXECUTED 300336bc: ea000045 b 300337d8 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 300336c0: e3570009 cmp r7, #9 300336c4: 979ff107 ldrls pc, [pc, r7, lsl #2] 300336c8: ea000040 b 300337d0 300336cc: 300336f4 .word 0x300336f4 <== NOT EXECUTED 300336d0: 30033760 .word 0x30033760 <== NOT EXECUTED 300336d4: 3003376c .word 0x3003376c <== NOT EXECUTED 300336d8: 3003378c .word 0x3003378c <== NOT EXECUTED 300336dc: 30033798 .word 0x30033798 <== NOT EXECUTED 300336e0: 300337c4 .word 0x300337c4 <== NOT EXECUTED 300336e4: 300337c4 .word 0x300337c4 <== NOT EXECUTED 300336e8: 300337c4 .word 0x300337c4 <== NOT EXECUTED 300336ec: 300337c4 .word 0x300337c4 <== NOT EXECUTED 300336f0: 300337c4 .word 0x300337c4 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 300336f4: e5933000 ldr r3, [r3] if ( fd2 ) 300336f8: e3530000 cmp r3, #0 300336fc: 0a000003 beq 30033710 diop = rtems_libio_iop( fd2 ); 30033700: e1530002 cmp r3, r2 <== NOT EXECUTED 30033704: 23a0c000 movcs ip, #0 <== NOT EXECUTED 30033708: 308cc303 addcc ip, ip, r3, lsl #6 <== NOT EXECUTED 3003370c: ea000002 b 3003371c <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 30033710: ebff47d4 bl 30005668 if ( diop == 0 ) { 30033714: e250c000 subs ip, r0, #0 30033718: 0a00003e beq 30033818 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3003371c: e28c5018 add r5, ip, #24 30033720: e2846018 add r6, r4, #24 30033724: e8b6000f ldm r6!, {r0, r1, r2, r3} 30033728: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 3003372c: e59f30fc ldr r3, [pc, #252] ; 30033830 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 30033730: e5966000 ldr r6, [r6] ret = (int) (diop - rtems_libio_iops); 30033734: e5933000 ldr r3, [r3] ret = -1; break; } } diop->handlers = iop->handlers; 30033738: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 3003373c: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 30033740: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30033744: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 30033748: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 3003374c: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 30033750: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 30033754: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 30033758: e1a05343 asr r5, r3, #6 3003375c: ea00001f b 300337e0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 30033760: e1a055a0 lsr r5, r0, #11 30033764: e2055001 and r5, r5, #1 30033768: ea00001e b 300337e8 * 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 ) ) 3003376c: e5935000 ldr r5, [r3] 30033770: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 30033774: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30033778: 03c00b02 biceq r0, r0, #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; 3003377c: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30033780: 05840014 streq r0, [r4, #20] * 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 ) ) 30033784: 0a000017 beq 300337e8 30033788: ea00000b b 300337bc else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 3003378c: ebff474c bl 300054c4 30033790: e1a05000 mov r5, r0 30033794: ea000011 b 300337e0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 30033798: e5930000 ldr r0, [r3] 3003379c: ebff47de bl 3000571c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 300337a0: e5943014 ldr r3, [r4, #20] 300337a4: e59f2088 ldr r2, [pc, #136] ; 30033834 300337a8: e3c33c02 bic r3, r3, #512 ; 0x200 300337ac: e0002002 and r2, r0, r2 300337b0: e3c33001 bic r3, r3, #1 300337b4: e1823003 orr r3, r2, r3 300337b8: e5843014 str r3, [r4, #20] 300337bc: e3a05000 mov r5, #0 300337c0: ea000008 b 300337e8 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 300337c4: eb001650 bl 3003910c <__errno> 300337c8: e3a03086 mov r3, #134 ; 0x86 300337cc: ea000001 b 300337d8 ret = -1; break; default: errno = EINVAL; 300337d0: eb00164d bl 3003910c <__errno> 300337d4: e3a03016 mov r3, #22 300337d8: e5803000 str r3, [r0] 300337dc: ea00000d b 30033818 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 300337e0: e3550000 cmp r5, #0 300337e4: ba00000c blt 3003381c if (iop->handlers->fcntl_h) { 300337e8: e594303c ldr r3, [r4, #60] ; 0x3c 300337ec: e5933030 ldr r3, [r3, #48] ; 0x30 300337f0: e3530000 cmp r3, #0 300337f4: 0a000008 beq 3003381c int err = (*iop->handlers->fcntl_h)( cmd, iop ); 300337f8: e1a01004 mov r1, r4 300337fc: e1a00007 mov r0, r7 30033800: e1a0e00f mov lr, pc 30033804: e12fff13 bx r3 if (err) { 30033808: e2504000 subs r4, r0, #0 3003380c: 0a000002 beq 3003381c errno = err; 30033810: eb00163d bl 3003910c <__errno> <== NOT EXECUTED 30033814: e5804000 str r4, [r0] <== NOT EXECUTED 30033818: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 3003381c: e1a00005 mov r0, r5 30033820: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 30033824: e28dd00c add sp, sp, #12 30033828: e12fff1e bx lr 3003382c: 3005cad0 .word 0x3005cad0 30033830: 30060bb4 .word 0x30060bb4 30033834: 00000201 .word 0x00000201 3000ae38 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ae38: e59f3368 ldr r3, [pc, #872] ; 3000b1a8 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ae3c: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} 3000ae40: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ae44: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ae48: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ae4c: e1a02001 mov r2, r1 3000ae50: e5930000 ldr r0, [r3] 3000ae54: ebffe52a bl 30004304 3000ae58: e250a000 subs sl, r0, #0 3000ae5c: 13e06003 mvnne r6, #3 3000ae60: 1a0000ce bne 3000b1a0 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 3000ae64: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { 3000ae68: e3540000 cmp r4, #0 <== NOT EXECUTED 3000ae6c: 1a00004f bne 3000afb0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000ae70: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 3000ae74: ebfff7b1 bl 30008d40 <== NOT EXECUTED if (pipe == NULL) 3000ae78: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000ae7c: e1a05000 mov r5, r0 <== NOT EXECUTED 3000ae80: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) 3000ae84: 03e0600b mvneq r6, #11 <== NOT EXECUTED 3000ae88: 0a000056 beq 3000afe8 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 3000ae8c: e1a0100a mov r1, sl <== NOT EXECUTED 3000ae90: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED 3000ae94: eb000928 bl 3000d33c <== NOT EXECUTED pipe->Size = PIPE_BUF; 3000ae98: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 3000ae9c: e1a00003 mov r0, r3 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 3000aea0: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 3000aea4: ebfff7a5 bl 30008d40 <== NOT EXECUTED if (! pipe->Buffer) 3000aea8: 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); 3000aeac: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) 3000aeb0: 03e0600b mvneq r6, #11 <== NOT EXECUTED 3000aeb4: 0a00003a beq 3000afa4 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 3000aeb8: e59f62ec ldr r6, [pc, #748] ; 3000b1ac <== NOT EXECUTED 3000aebc: e59f02ec ldr r0, [pc, #748] ; 3000b1b0 <== NOT EXECUTED 3000aec0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 3000aec4: e1a0100a mov r1, sl <== NOT EXECUTED 3000aec8: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3000aecc: e1a0200a mov r2, sl <== NOT EXECUTED 3000aed0: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED 3000aed4: eb000287 bl 3000b8f8 <== NOT EXECUTED 3000aed8: e2501000 subs r1, r0, #0 <== NOT EXECUTED 3000aedc: 1a00002d bne 3000af98 <== 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( 3000aee0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 3000aee4: e59f02c8 ldr r0, [pc, #712] ; 3000b1b4 <== NOT EXECUTED 3000aee8: e1a02001 mov r2, r1 <== NOT EXECUTED 3000aeec: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3000aef0: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED 3000aef4: eb00027f bl 3000b8f8 <== NOT EXECUTED 3000aef8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000aefc: 1a000023 bne 3000af90 <== 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( 3000af00: e5d62000 ldrb r2, [r6] <== NOT EXECUTED 3000af04: e59f02ac ldr r0, [pc, #684] ; 3000b1b8 <== NOT EXECUTED 3000af08: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED 3000af0c: e1820000 orr r0, r2, r0 <== NOT EXECUTED 3000af10: e3a01001 mov r1, #1 <== NOT EXECUTED 3000af14: e3a02010 mov r2, #16 <== NOT EXECUTED 3000af18: e58dc000 str ip, [sp] <== NOT EXECUTED 3000af1c: ebffe466 bl 300040bc <== NOT EXECUTED 3000af20: e3500000 cmp r0, #0 <== NOT EXECUTED 3000af24: 1a000017 bne 3000af88 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 3000af28: e28d5004 add r5, sp, #4 <== NOT EXECUTED 3000af2c: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED 3000af30: e1a02005 mov r2, r5 <== NOT EXECUTED 3000af34: e59f0280 ldr r0, [pc, #640] ; 3000b1bc <== NOT EXECUTED 3000af38: ebffea78 bl 30005920 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 3000af3c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 3000af40: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 3000af44: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 3000af48: ebffec8f bl 3000618c <_Thread_Enable_dispatch> <== NOT EXECUTED 3000af4c: e1a02005 mov r2, r5 <== NOT EXECUTED 3000af50: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 3000af54: e59f0260 ldr r0, [pc, #608] ; 3000b1bc <== NOT EXECUTED 3000af58: ebffea70 bl 30005920 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 3000af5c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 3000af60: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 3000af64: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 3000af68: ebffec87 bl 3000618c <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 3000af6c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 3000af70: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 3000af74: e2833001 add r3, r3, #1 <== NOT EXECUTED 3000af78: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; 3000af7c: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 3000af80: 05c63000 strbeq r3, [r6] <== NOT EXECUTED 3000af84: ea000009 b 3000afb0 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 3000af88: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED 3000af8c: eb000287 bl 3000b9b0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 3000af90: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED 3000af94: eb000285 bl 3000b9b0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 3000af98: e5950000 ldr r0, [r5] <== NOT EXECUTED 3000af9c: ebfff61d bl 30008818 <== NOT EXECUTED 3000afa0: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); 3000afa4: e1a00005 mov r0, r5 <== NOT EXECUTED 3000afa8: ebfff61a bl 30008818 <== NOT EXECUTED 3000afac: ea00000d b 3000afe8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 3000afb0: e3a01000 mov r1, #0 <== NOT EXECUTED 3000afb4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000afb8: e1a02001 mov r2, r1 <== NOT EXECUTED 3000afbc: ebffe4d0 bl 30004304 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 3000afc0: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 3000afc4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000afc8: 01a06000 moveq r6, r0 <== NOT EXECUTED 3000afcc: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 3000afd0: e3530000 cmp r3, #0 <== NOT EXECUTED 3000afd4: 1a000003 bne 3000afe8 <== NOT EXECUTED if (err) 3000afd8: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 3000afdc: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); 3000afe0: 11a00004 movne r0, r4 <== NOT EXECUTED 3000afe4: 1bffff47 blne 3000ad08 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 3000afe8: e59f31b8 ldr r3, [pc, #440] ; 3000b1a8 <== NOT EXECUTED 3000afec: e5930000 ldr r0, [r3] <== NOT EXECUTED 3000aff0: ebffe509 bl 3000441c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 3000aff4: e3560000 cmp r6, #0 <== NOT EXECUTED 3000aff8: 1a000068 bne 3000b1a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 3000affc: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 3000b000: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 3000b004: e2023006 and r3, r2, #6 <== NOT EXECUTED 3000b008: e3530004 cmp r3, #4 <== NOT EXECUTED 3000b00c: 0a000024 beq 3000b0a4 <== NOT EXECUTED 3000b010: e3530006 cmp r3, #6 <== NOT EXECUTED 3000b014: 0a000046 beq 3000b134 <== NOT EXECUTED 3000b018: e3530002 cmp r3, #2 <== NOT EXECUTED 3000b01c: 1a000058 bne 3000b184 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 3000b020: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 3000b024: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b028: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 3000b02c: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b030: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 3000b034: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b038: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 3000b03c: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000b040: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 3000b044: 0b000271 bleq 3000ba10 <== NOT EXECUTED if (pipe->Writers == 0) { 3000b048: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3000b04c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000b050: 1a00004b bne 3000b184 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 3000b054: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED 3000b058: e3130001 tst r3, #1 <== NOT EXECUTED 3000b05c: 1a000048 bne 3000b184 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 3000b060: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 3000b064: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000b068: ebffe4eb bl 3000441c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 3000b06c: e3a01000 mov r1, #0 <== NOT EXECUTED 3000b070: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000b074: eb00027b bl 3000ba68 <== NOT EXECUTED 3000b078: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 3000b07c: 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)) 3000b080: 1a000042 bne 3000b190 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 3000b084: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000b088: ebffe49d bl 30004304 <== NOT EXECUTED 3000b08c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000b090: 1a00003e bne 3000b190 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 3000b094: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 3000b098: e1550003 cmp r5, r3 <== NOT EXECUTED 3000b09c: 0afffff0 beq 3000b064 <== NOT EXECUTED 3000b0a0: ea000037 b 3000b184 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 3000b0a4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 3000b0a8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000b0ac: 1a000002 bne 3000b0bc <== NOT EXECUTED 3000b0b0: e3120001 tst r2, #1 <== NOT EXECUTED 3000b0b4: 13e06005 mvnne r6, #5 <== NOT EXECUTED 3000b0b8: 1a000035 bne 3000b194 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 3000b0bc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 3000b0c0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b0c4: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 3000b0c8: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b0cc: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 3000b0d0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b0d4: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 3000b0d8: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000b0dc: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 3000b0e0: 0b00024a bleq 3000ba10 <== NOT EXECUTED if (pipe->Readers == 0) { 3000b0e4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 3000b0e8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000b0ec: 1a000024 bne 3000b184 <== NOT EXECUTED prevCounter = pipe->readerCounter; 3000b0f0: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 3000b0f4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000b0f8: ebffe4c7 bl 3000441c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 3000b0fc: e3a01000 mov r1, #0 <== NOT EXECUTED 3000b100: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000b104: eb000257 bl 3000ba68 <== NOT EXECUTED 3000b108: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 3000b10c: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 3000b110: 1a00001e bne 3000b190 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 3000b114: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000b118: ebffe479 bl 30004304 <== NOT EXECUTED 3000b11c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000b120: 1a00001a bne 3000b190 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 3000b124: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3000b128: e1550003 cmp r5, r3 <== NOT EXECUTED 3000b12c: 0afffff0 beq 3000b0f4 <== NOT EXECUTED 3000b130: ea000013 b 3000b184 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 3000b134: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 3000b138: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b13c: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 3000b140: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b144: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 3000b148: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 3000b14c: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 3000b150: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000b154: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 3000b158: 0b00022c bleq 3000ba10 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 3000b15c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 3000b160: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b164: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 3000b168: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b16c: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 3000b170: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 3000b174: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 3000b178: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000b17c: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 3000b180: 0b000222 bleq 3000ba10 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 3000b184: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000b188: ebffe4a3 bl 3000441c <== NOT EXECUTED return 0; 3000b18c: ea000003 b 3000b1a0 <== NOT EXECUTED 3000b190: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 3000b194: e1a00007 mov r0, r7 <== NOT EXECUTED 3000b198: e1a01008 mov r1, r8 <== NOT EXECUTED 3000b19c: ebfffee6 bl 3000ad3c <== NOT EXECUTED return err; } 3000b1a0: e1a00006 mov r0, r6 3000b1a4: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} 3000b1a8: 30019b14 .word 0x30019b14 3000b1ac: 30019484 .word 0x30019484 3000b1b0: 50497200 .word 0x50497200 3000b1b4: 50497700 .word 0x50497700 3000b1b8: 50497300 .word 0x50497300 3000b1bc: 3001a604 .word 0x3001a604 3000870c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 3000870c: e59f3030 ldr r3, [pc, #48] ; 30008744 <== NOT EXECUTED 30008710: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 30008714: ea000006 b 30008734 <== 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 ) { 30008718: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 3000871c: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 30008720: e15c0000 cmp ip, r0 <== NOT EXECUTED 30008724: 1a000001 bne 30008730 <== NOT EXECUTED 30008728: e3a00001 mov r0, #1 <== NOT EXECUTED 3000872c: e12fff1e bx lr <== 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 ) { 30008730: e5922000 ldr r2, [r2] <== NOT EXECUTED 30008734: e1520003 cmp r2, r3 <== NOT EXECUTED 30008738: 1afffff6 bne 30008718 <== NOT EXECUTED 3000873c: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 30008740: e12fff1e bx lr <== NOT EXECUTED 30008744: 30060bf8 .word 0x30060bf8 300024b0 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 300024b0: e59f3100 ldr r3, [pc, #256] ; 300025b8 long fpathconf( int fd, int name ) { 300024b4: 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); 300024b8: e5933000 ldr r3, [r3] 300024bc: e1500003 cmp r0, r3 300024c0: 2a000005 bcs 300024dc iop = rtems_libio_iop(fd); 300024c4: e59f30f0 ldr r3, [pc, #240] ; 300025bc 300024c8: e5933000 ldr r3, [r3] 300024cc: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 300024d0: e5903014 ldr r3, [r0, #20] 300024d4: e3130c01 tst r3, #256 ; 0x100 300024d8: 1a000002 bne 300024e8 300024dc: eb0032d1 bl 3000f028 <__errno> 300024e0: e3a03009 mov r3, #9 300024e4: ea000003 b 300024f8 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 300024e8: e3130002 tst r3, #2 300024ec: 1a000004 bne 30002504 300024f0: eb0032cc bl 3000f028 <__errno> <== NOT EXECUTED 300024f4: e3a03016 mov r3, #22 <== NOT EXECUTED 300024f8: e5803000 str r3, [r0] 300024fc: e3e00000 mvn r0, #0 30002500: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 30002504: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 30002508: e351000b cmp r1, #11 3000250c: 979ff101 ldrls pc, [pc, r1, lsl #2] 30002510: ea000023 b 300025a4 30002514: 30002544 .word 0x30002544 <== NOT EXECUTED 30002518: 3000254c .word 0x3000254c <== NOT EXECUTED 3000251c: 30002554 .word 0x30002554 <== NOT EXECUTED 30002520: 3000255c .word 0x3000255c <== NOT EXECUTED 30002524: 30002564 .word 0x30002564 <== NOT EXECUTED 30002528: 3000256c .word 0x3000256c <== NOT EXECUTED 3000252c: 30002574 .word 0x30002574 <== NOT EXECUTED 30002530: 3000257c .word 0x3000257c <== NOT EXECUTED 30002534: 30002584 .word 0x30002584 <== NOT EXECUTED 30002538: 3000258c .word 0x3000258c <== NOT EXECUTED 3000253c: 30002594 .word 0x30002594 <== NOT EXECUTED 30002540: 3000259c .word 0x3000259c <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 30002544: e5930038 ldr r0, [r3, #56] ; 0x38 break; 30002548: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 3000254c: e593003c ldr r0, [r3, #60] ; 0x3c break; 30002550: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 30002554: e5930040 ldr r0, [r3, #64] ; 0x40 break; 30002558: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 3000255c: e5930044 ldr r0, [r3, #68] ; 0x44 break; 30002560: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 30002564: e5930048 ldr r0, [r3, #72] ; 0x48 break; 30002568: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 3000256c: e593004c ldr r0, [r3, #76] ; 0x4c break; 30002570: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 30002574: e5930054 ldr r0, [r3, #84] ; 0x54 break; 30002578: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 3000257c: e5930058 ldr r0, [r3, #88] ; 0x58 break; 30002580: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 30002584: e5930064 ldr r0, [r3, #100] ; 0x64 break; 30002588: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 3000258c: e5930050 ldr r0, [r3, #80] ; 0x50 break; 30002590: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 30002594: e593005c ldr r0, [r3, #92] ; 0x5c break; 30002598: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 3000259c: e5930060 ldr r0, [r3, #96] ; 0x60 break; 300025a0: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 300025a4: eb00329f bl 3000f028 <__errno> 300025a8: e3a03016 mov r3, #22 300025ac: e5803000 str r3, [r0] 300025b0: e3e00000 mvn r0, #0 break; } return return_value; } 300025b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300025b8: 3001cf38 .word 0x3001cf38 300025bc: 3001d8e0 .word 0x3001d8e0 30008818 : void free( void *ptr ) { MSBUMP(free_calls, 1); 30008818: e59f3088 ldr r3, [pc, #136] ; 300088a8 3000881c: e92d4030 push {r4, r5, lr} 30008820: e593200c ldr r2, [r3, #12] if ( !ptr ) 30008824: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 30008828: e2822001 add r2, r2, #1 3000882c: e583200c str r2, [r3, #12] if ( !ptr ) 30008830: 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()) && 30008834: e59f3070 ldr r3, [pc, #112] ; 300088ac 30008838: e5933000 ldr r3, [r3] 3000883c: e3530003 cmp r3, #3 30008840: 1a000005 bne 3000885c 30008844: eb00011d bl 30008cc0 30008848: e3500000 cmp r0, #0 3000884c: 1a000002 bne 3000885c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 30008850: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 30008854: 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); 30008858: ea00012b b 30008d0c <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 3000885c: e59f304c ldr r3, [pc, #76] ; 300088b0 30008860: e5933000 ldr r3, [r3] 30008864: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 30008868: 11a00004 movne r0, r4 3000886c: 11a0e00f movne lr, pc 30008870: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 30008874: e59f5038 ldr r5, [pc, #56] ; 300088b4 30008878: e1a01004 mov r1, r4 3000887c: e5950000 ldr r0, [r5] 30008880: eb00068b bl 3000a2b4 <_Protected_heap_Free> 30008884: e3500000 cmp r0, #0 30008888: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 3000888c: 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", 30008890: e59f0020 ldr r0, [pc, #32] ; 300088b8 <== NOT EXECUTED 30008894: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30008898: e5922018 ldr r2, [r2, #24] <== NOT EXECUTED 3000889c: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 300088a0: 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", 300088a4: eaffe596 b 30001f04 <== NOT EXECUTED 300088a8: 30019ba4 .word 0x30019ba4 300088ac: 30019eb0 .word 0x30019eb0 300088b0: 300199b8 .word 0x300199b8 300088b4: 30019204 .word 0x30019204 300088b8: 30018ef4 .word 0x30018ef4 30023270 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 30023270: e59f3058 ldr r3, [pc, #88] ; 300232d0 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 30023274: e92d4010 push {r4, lr} <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 30023278: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 3002327c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 30023280: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 30023284: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 30023288: e3530000 cmp r3, #0 <== NOT EXECUTED 3002328c: 0a000004 beq 300232a4 <== NOT EXECUTED 30023290: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30023294: e3530000 cmp r3, #0 <== NOT EXECUTED 30023298: 12800004 addne r0, r0, #4 <== NOT EXECUTED 3002329c: 11a0e00f movne lr, pc <== NOT EXECUTED 300232a0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 300232a4: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 300232a8: e3530000 cmp r3, #0 <== NOT EXECUTED 300232ac: 0a000004 beq 300232c4 <== NOT EXECUTED 300232b0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300232b4: e3530000 cmp r3, #0 <== NOT EXECUTED 300232b8: 12840018 addne r0, r4, #24 <== NOT EXECUTED 300232bc: 11a0e00f movne lr, pc <== NOT EXECUTED 300232c0: 112fff13 bxne r3 <== NOT EXECUTED free(env); 300232c4: e1a00004 mov r0, r4 <== NOT EXECUTED } } 300232c8: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 300232cc: eaff87ff b 300052d0 <== NOT EXECUTED 300232d0: 30060c10 .word 0x30060c10 300177d8 : int fstat( int fd, struct stat *sbuf ) { 300177d8: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 300177dc: e2515000 subs r5, r1, #0 300177e0: 1a000002 bne 300177f0 rtems_set_errno_and_return_minus_one( EFAULT ); 300177e4: ebffd48a bl 3000ca14 <__errno> 300177e8: e3a0300e mov r3, #14 300177ec: ea000014 b 30017844 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 300177f0: e59f3080 ldr r3, [pc, #128] ; 30017878 300177f4: e5933000 ldr r3, [r3] 300177f8: e1500003 cmp r0, r3 300177fc: 2a000008 bcs 30017824 30017800: e59f3074 ldr r3, [pc, #116] ; 3001787c 30017804: e5934000 ldr r4, [r3] 30017808: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 3001780c: e5943014 ldr r3, [r4, #20] 30017810: e3130c01 tst r3, #256 ; 0x100 30017814: 0a000002 beq 30017824 if ( !iop->handlers ) 30017818: e594303c ldr r3, [r4, #60] ; 0x3c 3001781c: e3530000 cmp r3, #0 30017820: 1a000002 bne 30017830 rtems_set_errno_and_return_minus_one( EBADF ); 30017824: ebffd47a bl 3000ca14 <__errno> 30017828: e3a03009 mov r3, #9 3001782c: ea000004 b 30017844 if ( !iop->handlers->fstat_h ) 30017830: e5933018 ldr r3, [r3, #24] 30017834: e3530000 cmp r3, #0 30017838: 1a000004 bne 30017850 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3001783c: ebffd474 bl 3000ca14 <__errno> <== NOT EXECUTED 30017840: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30017844: e5803000 str r3, [r0] 30017848: e3e00000 mvn r0, #0 3001784c: e8bd8030 pop {r4, r5, pc} /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 30017850: e3a01000 mov r1, #0 30017854: e3a02048 mov r2, #72 ; 0x48 30017858: e1a00005 mov r0, r5 3001785c: ebffd6b6 bl 3000d33c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 30017860: e2840018 add r0, r4, #24 30017864: e1a01005 mov r1, r5 30017868: e594303c ldr r3, [r4, #60] ; 0x3c 3001786c: e1a0e00f mov lr, pc 30017870: e593f018 ldr pc, [r3, #24] } 30017874: e8bd8030 pop {r4, r5, pc} 30017878: 300191f8 .word 0x300191f8 3001787c: 30019b98 .word 0x30019b98 300220c0 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300220c0: e59f307c ldr r3, [pc, #124] ; 30022144 #include int fsync( int fd ) { 300220c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300220c8: e5933000 ldr r3, [r3] 300220cc: e1500003 cmp r0, r3 300220d0: 2a00000d bcs 3002210c iop = rtems_libio_iop( fd ); 300220d4: e59f306c ldr r3, [pc, #108] ; 30022148 300220d8: e5933000 ldr r3, [r3] 300220dc: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 300220e0: e5903014 ldr r3, [r0, #20] 300220e4: e3130c01 tst r3, #256 ; 0x100 300220e8: 0a000007 beq 3002210c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 300220ec: e3130004 tst r3, #4 300220f0: 1a000002 bne 30022100 300220f4: eb005c04 bl 3003910c <__errno> 300220f8: e3a03016 mov r3, #22 300220fc: ea00000a b 3002212c /* * Now process the fsync(). */ if ( !iop->handlers ) 30022100: e590303c ldr r3, [r0, #60] ; 0x3c 30022104: e3530000 cmp r3, #0 30022108: 1a000002 bne 30022118 rtems_set_errno_and_return_minus_one( EBADF ); 3002210c: eb005bfe bl 3003910c <__errno> <== NOT EXECUTED 30022110: e3a03009 mov r3, #9 <== NOT EXECUTED 30022114: ea000004 b 3002212c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 30022118: e5933028 ldr r3, [r3, #40] ; 0x28 3002211c: e3530000 cmp r3, #0 30022120: 1a000004 bne 30022138 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30022124: eb005bf8 bl 3003910c <__errno> 30022128: e3a03086 mov r3, #134 ; 0x86 3002212c: e5803000 str r3, [r0] 30022130: e3e00000 mvn r0, #0 30022134: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 30022138: e1a0e00f mov lr, pc 3002213c: e12fff13 bx r3 } 30022140: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30022144: 3005cad0 .word 0x3005cad0 30022148: 30060bb4 .word 0x30060bb4 300088bc : int ftruncate( int fd, off_t length ) { 300088bc: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 300088c0: e59f30d4 ldr r3, [pc, #212] ; 3000899c int ftruncate( int fd, off_t length ) { 300088c4: e24dd014 sub sp, sp, #20 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 300088c8: e5933000 ldr r3, [r3] int ftruncate( int fd, off_t length ) { 300088cc: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 300088d0: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 300088d4: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 300088d8: 2a000005 bcs 300088f4 iop = rtems_libio_iop( fd ); 300088dc: e59f30bc ldr r3, [pc, #188] ; 300089a0 300088e0: e5934000 ldr r4, [r3] 300088e4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 300088e8: e5943014 ldr r3, [r4, #20] 300088ec: e3130c01 tst r3, #256 ; 0x100 300088f0: 1a000002 bne 30008900 300088f4: eb001046 bl 3000ca14 <__errno> <== NOT EXECUTED 300088f8: e3a03009 mov r3, #9 <== NOT EXECUTED 300088fc: ea00001c b 30008974 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 30008900: e1a0c00d mov ip, sp 30008904: e284e018 add lr, r4, #24 30008908: e8be000f ldm lr!, {r0, r1, r2, r3} 3000890c: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 30008910: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 30008914: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 30008918: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 3000891c: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 30008920: 0a000011 beq 3000896c rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 30008924: e1a0000d mov r0, sp 30008928: e1a0e00f mov lr, pc 3000892c: e12fff13 bx r3 30008930: e3500001 cmp r0, #1 30008934: 1a000002 bne 30008944 rtems_set_errno_and_return_minus_one( EISDIR ); 30008938: eb001035 bl 3000ca14 <__errno> 3000893c: e3a03015 mov r3, #21 30008940: ea00000b b 30008974 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30008944: e5943014 ldr r3, [r4, #20] 30008948: e3130004 tst r3, #4 3000894c: 1a000002 bne 3000895c 30008950: eb00102f bl 3000ca14 <__errno> <== NOT EXECUTED 30008954: e3a03016 mov r3, #22 <== NOT EXECUTED 30008958: ea000005 b 30008974 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 3000895c: e594303c ldr r3, [r4, #60] ; 0x3c 30008960: e5933020 ldr r3, [r3, #32] 30008964: e3530000 cmp r3, #0 30008968: 1a000004 bne 30008980 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000896c: eb001028 bl 3000ca14 <__errno> <== NOT EXECUTED 30008970: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008974: e5803000 str r3, [r0] 30008978: e3e00000 mvn r0, #0 3000897c: ea000004 b 30008994 return (*iop->handlers->ftruncate_h)( iop, length ); 30008980: e1a00004 mov r0, r4 30008984: e1a01005 mov r1, r5 30008988: e1a02006 mov r2, r6 3000898c: e1a0e00f mov lr, pc 30008990: e12fff13 bx r3 } 30008994: e28dd014 add sp, sp, #20 30008998: e8bd8070 pop {r4, r5, r6, pc} 3000899c: 300191f8 .word 0x300191f8 300089a0: 30019b98 .word 0x30019b98 30052a54 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30052a54: e59f30a8 ldr r3, [pc, #168] ; 30052b04 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30052a58: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30052a5c: e5933000 ldr r3, [r3] int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30052a60: e24dd014 sub sp, sp, #20 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30052a64: e1500003 cmp r0, r3 30052a68: 359f3098 ldrcc r3, [pc, #152] ; 30052b08 30052a6c: 23a04000 movcs r4, #0 30052a70: 35934000 ldrcc r4, [r3] /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30052a74: e1a0c00d mov ip, sp /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 30052a78: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30052a7c: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 30052a80: e1a06001 mov r6, r1 30052a84: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30052a88: e8be000f ldm lr!, {r0, r1, r2, r3} 30052a8c: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 30052a90: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30052a94: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 30052a98: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 30052a9c: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 30052aa0: 0a00000d beq 30052adc rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 30052aa4: e1a0000d mov r0, sp 30052aa8: e1a0e00f mov lr, pc 30052aac: e12fff13 bx r3 30052ab0: e3500001 cmp r0, #1 30052ab4: 0a000004 beq 30052acc rtems_set_errno_and_return_minus_one( ENOTDIR ); 30052ab8: ebff9993 bl 3003910c <__errno> 30052abc: e3a03014 mov r3, #20 30052ac0: e5803000 str r3, [r0] 30052ac4: e3e00000 mvn r0, #0 30052ac8: ea00000b b 30052afc /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 30052acc: e594303c ldr r3, [r4, #60] ; 0x3c 30052ad0: e5933008 ldr r3, [r3, #8] 30052ad4: e3530000 cmp r3, #0 30052ad8: 1a000002 bne 30052ae8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30052adc: ebff998a bl 3003910c <__errno> <== NOT EXECUTED 30052ae0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30052ae4: eafffff5 b 30052ac0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 30052ae8: e1a00004 mov r0, r4 30052aec: e1a01006 mov r1, r6 30052af0: e1a02005 mov r2, r5 30052af4: e1a0e00f mov lr, pc 30052af8: e12fff13 bx r3 } 30052afc: e28dd014 add sp, sp, #20 30052b00: e8bd8070 pop {r4, r5, r6, pc} 30052b04: 3005cad0 .word 0x3005cad0 30052b08: 30060bb4 .word 0x30060bb4 3002225c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 3002225c: e59f3008 ldr r3, [pc, #8] ; 3002226c <== NOT EXECUTED 30022260: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 30022264: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 30022268: e12fff1e bx lr <== NOT EXECUTED 3002226c: 3005ce08 .word 0x3005ce08 30022874 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 30022874: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30022878: e59da01c ldr sl, [sp, #28] 3002287c: e1a06000 mov r6, r0 30022880: e1a07001 mov r7, r1 30022884: e1a04002 mov r4, r2 30022888: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 3002288c: ebffffb7 bl 30022770 if ((fp = fopen("/etc/group", "r")) == NULL) { 30022890: e59f00a4 ldr r0, [pc, #164] ; 3002293c 30022894: e59f10a4 ldr r1, [pc, #164] ; 30022940 30022898: eb005c8b bl 30039acc 3002289c: e2505000 subs r5, r0, #0 300228a0: 1a000003 bne 300228b4 errno = EINVAL; 300228a4: eb005a18 bl 3003910c <__errno> <== NOT EXECUTED 300228a8: e3a03016 mov r3, #22 <== NOT EXECUTED 300228ac: e5803000 str r3, [r0] <== NOT EXECUTED 300228b0: ea00000c b 300228e8 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 300228b4: e1a01004 mov r1, r4 300228b8: e1a02008 mov r2, r8 300228bc: e1a0300a mov r3, sl 300228c0: e1a00005 mov r0, r5 300228c4: ebfffef2 bl 30022494 300228c8: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 300228cc: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 300228d0: 1a000006 bne 300228f0 errno = EINVAL; 300228d4: eb005a0c bl 3003910c <__errno> <== NOT EXECUTED 300228d8: e3a03016 mov r3, #22 <== NOT EXECUTED 300228dc: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 300228e0: e1a00005 mov r0, r5 <== NOT EXECUTED 300228e4: eb005a55 bl 30039240 <== NOT EXECUTED 300228e8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 300228ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 300228f0: e3560000 cmp r6, #0 300228f4: 0a000004 beq 3002290c match = (strcmp(grp->gr_name, name) == 0); 300228f8: e5940000 ldr r0, [r4] 300228fc: eb007225 bl 3003f198 30022900: e2700001 rsbs r0, r0, #1 30022904: 33a00000 movcc r0, #0 30022908: ea000003 b 3002291c } else { match = (grp->gr_gid == gid); 3002290c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 30022910: e1500007 cmp r0, r7 <== NOT EXECUTED 30022914: 13a00000 movne r0, #0 <== NOT EXECUTED 30022918: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 3002291c: e3500000 cmp r0, #0 30022920: 0affffe3 beq 300228b4 fclose(fp); 30022924: e1a00005 mov r0, r5 30022928: eb005a44 bl 30039240 *result = grp; 3002292c: e59d3020 ldr r3, [sp, #32] 30022930: e3a00000 mov r0, #0 30022934: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 30022938: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3002293c: 30055f40 .word 0x30055f40 30022940: 30056cda .word 0x30056cda 300225cc : return NULL; return p; } struct group *getgrent(void) { 300225cc: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 300225d0: e59f402c ldr r4, [pc, #44] ; 30022604 <== NOT EXECUTED 300225d4: e5940000 ldr r0, [r4] <== NOT EXECUTED 300225d8: e3500000 cmp r0, #0 <== NOT EXECUTED 300225dc: 0a000006 beq 300225fc <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 300225e0: e2841008 add r1, r4, #8 <== NOT EXECUTED 300225e4: e2842018 add r2, r4, #24 <== NOT EXECUTED 300225e8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 300225ec: ebffffa8 bl 30022494 <== NOT EXECUTED 300225f0: e3500000 cmp r0, #0 <== NOT EXECUTED 300225f4: 12840008 addne r0, r4, #8 <== NOT EXECUTED 300225f8: 18bd8010 popne {r4, pc} <== NOT EXECUTED 300225fc: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 30022600: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30022604: 300608c8 .word 0x300608c8 30022978 : struct group *getgrgid( gid_t gid ) { 30022978: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 3002297c: e59f1028 ldr r1, [pc, #40] ; 300229ac <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 30022980: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 30022984: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30022988: e2812010 add r2, r1, #16 <== NOT EXECUTED 3002298c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 30022990: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 30022994: e58dc000 str ip, [sp] <== NOT EXECUTED 30022998: ebffffe9 bl 30022944 <== NOT EXECUTED 3002299c: e3500000 cmp r0, #0 <== NOT EXECUTED 300229a0: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 300229a4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 300229a8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 300229ac: 300608d0 .word 0x300608d0 30022944 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 30022944: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 30022948: e1a0c002 mov ip, r2 <== NOT EXECUTED 3002294c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 30022950: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 30022954: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 30022958: e1a0300c mov r3, ip <== NOT EXECUTED 3002295c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 30022960: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30022964: e1a0200e mov r2, lr <== NOT EXECUTED 30022968: e3a00000 mov r0, #0 <== NOT EXECUTED 3002296c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30022970: ebffffbf bl 30022874 <== NOT EXECUTED } 30022974: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 30022a44 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 30022a44: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30022a48: e59da01c ldr sl, [sp, #28] 30022a4c: e1a06000 mov r6, r0 30022a50: e1a07001 mov r7, r1 30022a54: e1a04002 mov r4, r2 30022a58: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 30022a5c: ebffff43 bl 30022770 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 30022a60: e59f00a4 ldr r0, [pc, #164] ; 30022b0c 30022a64: e59f10a4 ldr r1, [pc, #164] ; 30022b10 30022a68: eb005c17 bl 30039acc 30022a6c: e2505000 subs r5, r0, #0 30022a70: 1a000003 bne 30022a84 errno = EINVAL; 30022a74: eb0059a4 bl 3003910c <__errno> <== NOT EXECUTED 30022a78: e3a03016 mov r3, #22 <== NOT EXECUTED 30022a7c: e5803000 str r3, [r0] <== NOT EXECUTED 30022a80: ea00000c b 30022ab8 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 30022a84: e1a01004 mov r1, r4 30022a88: e1a02008 mov r2, r8 30022a8c: e1a0300a mov r3, sl 30022a90: e1a00005 mov r0, r5 30022a94: ebfffedb bl 30022608 30022a98: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 30022a9c: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 30022aa0: 1a000006 bne 30022ac0 errno = EINVAL; 30022aa4: eb005998 bl 3003910c <__errno> <== NOT EXECUTED 30022aa8: e3a03016 mov r3, #22 <== NOT EXECUTED 30022aac: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 30022ab0: e1a00005 mov r0, r5 <== NOT EXECUTED 30022ab4: eb0059e1 bl 30039240 <== NOT EXECUTED 30022ab8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 30022abc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 30022ac0: e3560000 cmp r6, #0 30022ac4: 0a000004 beq 30022adc match = (strcmp(pwd->pw_name, name) == 0); 30022ac8: e5940000 ldr r0, [r4] 30022acc: eb0071b1 bl 3003f198 30022ad0: e2700001 rsbs r0, r0, #1 30022ad4: 33a00000 movcc r0, #0 30022ad8: ea000003 b 30022aec } else { match = (pwd->pw_uid == uid); 30022adc: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 30022ae0: e1500007 cmp r0, r7 <== NOT EXECUTED 30022ae4: 13a00000 movne r0, #0 <== NOT EXECUTED 30022ae8: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 30022aec: e3500000 cmp r0, #0 30022af0: 0affffe3 beq 30022a84 fclose(fp); 30022af4: e1a00005 mov r0, r5 30022af8: eb0059d0 bl 30039240 *result = pwd; 30022afc: e59d3020 ldr r3, [sp, #32] 30022b00: e3a00000 mov r0, #0 30022b04: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 30022b08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30022b0c: 30055e92 .word 0x30055e92 30022b10: 30056cda .word 0x30056cda 30022734 : return NULL; return p; } struct passwd *getpwent(void) { 30022734: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 30022738: e59f402c ldr r4, [pc, #44] ; 3002276c <== NOT EXECUTED 3002273c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30022740: e3500000 cmp r0, #0 <== NOT EXECUTED 30022744: 0a000006 beq 30022764 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 30022748: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 3002274c: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 30022750: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 30022754: ebffffab bl 30022608 <== NOT EXECUTED 30022758: e3500000 cmp r0, #0 <== NOT EXECUTED 3002275c: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 30022760: 18bd8010 popne {r4, pc} <== NOT EXECUTED 30022764: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 30022768: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3002276c: 300608c8 .word 0x300608c8 30022b48 : struct passwd *getpwuid( uid_t uid ) { 30022b48: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 30022b4c: e59f1028 ldr r1, [pc, #40] ; 30022b7c <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 30022b50: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 30022b54: e28dc004 add ip, sp, #4 <== NOT EXECUTED 30022b58: e281201c add r2, r1, #28 <== NOT EXECUTED 30022b5c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 30022b60: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 30022b64: e58dc000 str ip, [sp] <== NOT EXECUTED 30022b68: ebffffe9 bl 30022b14 <== NOT EXECUTED 30022b6c: e3500000 cmp r0, #0 <== NOT EXECUTED 30022b70: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 30022b74: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 30022b78: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 30022b7c: 300609a8 .word 0x300609a8 30022b14 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 30022b14: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 30022b18: e1a0c002 mov ip, r2 <== NOT EXECUTED 30022b1c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 30022b20: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 30022b24: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 30022b28: e1a0300c mov r3, ip <== NOT EXECUTED 30022b2c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 30022b30: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 30022b34: e1a0200e mov r2, lr <== NOT EXECUTED 30022b38: e3a00000 mov r0, #0 <== NOT EXECUTED 30022b3c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30022b40: ebffffbf bl 30022a44 <== NOT EXECUTED } 30022b44: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 300089cc : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 300089cc: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 300089d0: e2504000 subs r4, r0, #0 300089d4: 1a000004 bne 300089ec errno = EFAULT; 300089d8: eb00100d bl 3000ca14 <__errno> <== NOT EXECUTED 300089dc: e3a0300e mov r3, #14 <== NOT EXECUTED 300089e0: e5803000 str r3, [r0] <== NOT EXECUTED 300089e4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 300089e8: ea00000c b 30008a20 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300089ec: e10f5000 mrs r5, CPSR 300089f0: e3853080 orr r3, r5, #128 ; 0x80 300089f4: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 300089f8: e1a0000d mov r0, sp 300089fc: eb0004de bl 30009d7c <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30008a00: e129f005 msr CPSR_fc, r5 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 30008a04: e59d3000 ldr r3, [sp] time->tv_usec = useconds; 30008a08: e59d0004 ldr r0, [sp, #4] 30008a0c: e3a01ffa mov r1, #1000 ; 0x3e8 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 30008a10: e5843000 str r3, [r4] time->tv_usec = useconds; 30008a14: eb0035b5 bl 300160f0 <__aeabi_idiv> 30008a18: e5840004 str r0, [r4, #4] 30008a1c: 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; } 30008a20: e8bd803c pop {r2, r3, r4, r5, pc} 300053dc : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 300053dc: e59f3008 ldr r3, [pc, #8] ; 300053ec <== NOT EXECUTED 300053e0: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 300053e4: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 300053e8: e12fff1e bx lr <== NOT EXECUTED 300053ec: 3005ce08 .word 0x3005ce08 30004e64 : int ioctl( int fd, ioctl_command_t command, ... ) { 30004e64: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 30004e68: e59f3080 ldr r3, [pc, #128] ; 30004ef0 int ioctl( int fd, ioctl_command_t command, ... ) { 30004e6c: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 30004e70: e5933000 ldr r3, [r3] 30004e74: e1500003 cmp r0, r3 30004e78: 2a00000b bcs 30004eac iop = rtems_libio_iop( fd ); 30004e7c: e59f3070 ldr r3, [pc, #112] ; 30004ef4 30004e80: e5933000 ldr r3, [r3] 30004e84: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 30004e88: e5903014 ldr r3, [r0, #20] 30004e8c: e3130c01 tst r3, #256 ; 0x100 30004e90: 0a000005 beq 30004eac /* * Now process the ioctl(). */ if ( !iop->handlers ) 30004e94: 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 *); 30004e98: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 30004e9c: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 30004ea0: e58d2000 str r2, [sp] 30004ea4: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 30004ea8: 1a000002 bne 30004eb8 rtems_set_errno_and_return_minus_one( EBADF ); 30004eac: eb003505 bl 300122c8 <__errno> 30004eb0: e3a03009 mov r3, #9 30004eb4: ea000004 b 30004ecc if ( !iop->handlers->ioctl_h ) 30004eb8: e5933010 ldr r3, [r3, #16] 30004ebc: e3530000 cmp r3, #0 30004ec0: 1a000004 bne 30004ed8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30004ec4: eb0034ff bl 300122c8 <__errno> <== NOT EXECUTED 30004ec8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30004ecc: e5803000 str r3, [r0] 30004ed0: e3e00000 mvn r0, #0 30004ed4: ea000002 b 30004ee4 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 30004ed8: e59d1008 ldr r1, [sp, #8] 30004edc: e1a0e00f mov lr, pc 30004ee0: e12fff13 bx r3 return rc; } 30004ee4: e8bd4008 pop {r3, lr} 30004ee8: e28dd00c add sp, sp, #12 30004eec: e12fff1e bx lr 30004ef0: 3001f3dc .word 0x3001f3dc 30004ef4: 3001fe4c .word 0x3001fe4c 3000295c : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 3000295c: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002960: e92d4030 push {r4, r5, lr} <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 30002964: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002968: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 3000296c: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 30002970: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30002974: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 30002978: 0a000007 beq 3000299c <== NOT EXECUTED c = tolower (c); 3000297c: e59f2164 ldr r2, [pc, #356] ; 30002ae8 <== NOT EXECUTED 30002980: e5922000 ldr r2, [r2] <== NOT EXECUTED 30002984: e0822005 add r2, r2, r5 <== NOT EXECUTED 30002988: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 3000298c: e2022003 and r2, r2, #3 <== NOT EXECUTED 30002990: e3520001 cmp r2, #1 <== NOT EXECUTED 30002994: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 30002998: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 3000299c: e355000d cmp r5, #13 <== NOT EXECUTED 300029a0: 1a000005 bne 300029bc <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 300029a4: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 300029a8: 1a00004c bne 30002ae0 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 300029ac: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 300029b0: 03a0500d moveq r5, #13 <== NOT EXECUTED 300029b4: 13a0500a movne r5, #10 <== NOT EXECUTED 300029b8: ea000007 b 300029dc <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 300029bc: e355000a cmp r5, #10 <== NOT EXECUTED 300029c0: 1a000003 bne 300029d4 <== NOT EXECUTED 300029c4: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 300029c8: 03a0500a moveq r5, #10 <== NOT EXECUTED 300029cc: 13a0500d movne r5, #13 <== NOT EXECUTED 300029d0: ea000001 b 300029dc <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 300029d4: e3550000 cmp r5, #0 <== NOT EXECUTED 300029d8: 0a00002e beq 30002a98 <== NOT EXECUTED 300029dc: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 300029e0: e3130002 tst r3, #2 <== NOT EXECUTED 300029e4: 0a00002b beq 30002a98 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 300029e8: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 300029ec: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 300029f0: 01a00004 moveq r0, r4 <== NOT EXECUTED 300029f4: 03a01000 moveq r1, #0 <== 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]) { 300029f8: 0a000004 beq 30002a10 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 300029fc: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 30002a00: e1520005 cmp r2, r5 <== NOT EXECUTED 30002a04: 1a000003 bne 30002a18 <== NOT EXECUTED erase (tty, 1); 30002a08: e1a00004 mov r0, r4 <== NOT EXECUTED 30002a0c: e3a01001 mov r1, #1 <== NOT EXECUTED 30002a10: ebffff5e bl 30002790 <== NOT EXECUTED 30002a14: ea00002f b 30002ad8 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 30002a18: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 30002a1c: e1520005 cmp r2, r5 <== NOT EXECUTED 30002a20: 0a00001a beq 30002a90 <== NOT EXECUTED return 1; } else if (c == '\n') { 30002a24: e355000a cmp r5, #10 <== NOT EXECUTED 30002a28: 1a000009 bne 30002a54 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 30002a2c: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 30002a30: 11a00005 movne r0, r5 <== NOT EXECUTED 30002a34: 11a01004 movne r1, r4 <== NOT EXECUTED 30002a38: 1bffff34 blne 30002710 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002a3c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002a40: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 30002a44: e3a0000a mov r0, #10 <== NOT EXECUTED 30002a48: e2832001 add r2, r3, #1 <== NOT EXECUTED 30002a4c: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 30002a50: ea00000d b 30002a8c <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 30002a54: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 30002a58: e1520005 cmp r2, r5 <== NOT EXECUTED 30002a5c: 0a000002 beq 30002a6c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 30002a60: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 30002a64: e1520005 cmp r2, r5 <== NOT EXECUTED 30002a68: 1a00000a bne 30002a98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 30002a6c: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 30002a70: 11a00005 movne r0, r5 <== NOT EXECUTED 30002a74: 11a01004 movne r1, r4 <== NOT EXECUTED 30002a78: 1bffff24 blne 30002710 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002a7c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002a80: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 30002a84: e2832001 add r2, r3, #1 <== NOT EXECUTED 30002a88: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 30002a8c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 30002a90: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 30002a94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 30002a98: e59f304c ldr r3, [pc, #76] ; 30002aec <== NOT EXECUTED 30002a9c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30002aa0: e5933000 ldr r3, [r3] <== NOT EXECUTED 30002aa4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30002aa8: e1520003 cmp r2, r3 <== NOT EXECUTED 30002aac: aa00000b bge 30002ae0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 30002ab0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30002ab4: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 30002ab8: 11a00005 movne r0, r5 <== NOT EXECUTED 30002abc: 11a01004 movne r1, r4 <== NOT EXECUTED 30002ac0: 1bffff12 blne 30002710 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30002ac4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002ac8: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 30002acc: e2832001 add r2, r3, #1 <== NOT EXECUTED 30002ad0: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 30002ad4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 30002ad8: e3a00000 mov r0, #0 <== NOT EXECUTED 30002adc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002ae0: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 30002ae4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30002ae8: 30019498 .word 0x30019498 30002aec: 300193dc .word 0x300193dc 30022c6c : int link( const char *existing, const char *new ) { 30022c6c: e92d4070 push {r4, r5, r6, lr} 30022c70: e24dd030 sub sp, sp, #48 ; 0x30 30022c74: e1a04001 mov r4, r1 30022c78: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 30022c7c: eb0073ad bl 3003fb38 30022c80: e3a0c001 mov ip, #1 30022c84: e1a01000 mov r1, r0 30022c88: e3a02000 mov r2, #0 30022c8c: e1a00005 mov r0, r5 30022c90: e28d3018 add r3, sp, #24 30022c94: e58dc000 str ip, [sp] 30022c98: ebff895e bl 30005218 0, &existing_loc, true ); if ( result != 0 ) 30022c9c: e3500000 cmp r0, #0 30022ca0: 1a000025 bne 30022d3c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 30022ca4: e5d43000 ldrb r3, [r4] 30022ca8: e353002f cmp r3, #47 ; 0x2f 30022cac: 1353005c cmpne r3, #92 ; 0x5c 30022cb0: 13a05000 movne r5, #0 30022cb4: 03a05001 moveq r5, #1 30022cb8: 0a000001 beq 30022cc4 30022cbc: e3530000 cmp r3, #0 30022cc0: 1a000005 bne 30022cdc 30022cc4: e59f31d8 ldr r3, [pc, #472] ; 30022ea4 30022cc8: e28dc004 add ip, sp, #4 30022ccc: e593e000 ldr lr, [r3] 30022cd0: e3a05001 mov r5, #1 30022cd4: e28ee018 add lr, lr, #24 30022cd8: ea000003 b 30022cec 30022cdc: e59f31c0 ldr r3, [pc, #448] ; 30022ea4 30022ce0: e28dc004 add ip, sp, #4 30022ce4: e593e000 ldr lr, [r3] 30022ce8: e28ee004 add lr, lr, #4 30022cec: e8be000f ldm lr!, {r0, r1, r2, r3} 30022cf0: e8ac000f stmia ip!, {r0, r1, r2, r3} 30022cf4: e59e3000 ldr r3, [lr] 30022cf8: e58c3000 str r3, [ip] if ( !parent_loc.ops->evalformake_h ) { 30022cfc: e59d3010 ldr r3, [sp, #16] 30022d00: e5933004 ldr r3, [r3, #4] 30022d04: e3530000 cmp r3, #0 30022d08: 1a00000d bne 30022d44 rtems_filesystem_freenode( &existing_loc ); 30022d0c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30022d10: e3530000 cmp r3, #0 <== NOT EXECUTED 30022d14: 0a000005 beq 30022d30 <== NOT EXECUTED 30022d18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30022d1c: e3530000 cmp r3, #0 <== NOT EXECUTED 30022d20: 0a000002 beq 30022d30 <== NOT EXECUTED 30022d24: e28d0018 add r0, sp, #24 <== NOT EXECUTED 30022d28: e1a0e00f mov lr, pc <== NOT EXECUTED 30022d2c: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30022d30: eb0058f5 bl 3003910c <__errno> <== NOT EXECUTED 30022d34: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30022d38: e5803000 str r3, [r0] 30022d3c: e3e05000 mvn r5, #0 30022d40: ea000054 b 30022e98 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 30022d44: e28d6004 add r6, sp, #4 30022d48: e0840005 add r0, r4, r5 30022d4c: e1a01006 mov r1, r6 30022d50: e28d202c add r2, sp, #44 ; 0x2c 30022d54: e1a0e00f mov lr, pc 30022d58: e12fff13 bx r3 if ( result != 0 ) { 30022d5c: e2504000 subs r4, r0, #0 30022d60: 0a00000a beq 30022d90 rtems_filesystem_freenode( &existing_loc ); 30022d64: e59d3024 ldr r3, [sp, #36] ; 0x24 30022d68: e3530000 cmp r3, #0 30022d6c: 0a000004 beq 30022d84 30022d70: e593301c ldr r3, [r3, #28] 30022d74: e3530000 cmp r3, #0 30022d78: 128d0018 addne r0, sp, #24 30022d7c: 11a0e00f movne lr, pc 30022d80: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 30022d84: eb0058e0 bl 3003910c <__errno> 30022d88: e5804000 str r4, [r0] 30022d8c: eaffffea b 30022d3c /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 30022d90: e59d3028 ldr r3, [sp, #40] ; 0x28 30022d94: e59d2014 ldr r2, [sp, #20] 30022d98: e1520003 cmp r2, r3 30022d9c: 0a000012 beq 30022dec rtems_filesystem_freenode( &existing_loc ); 30022da0: e59d3024 ldr r3, [sp, #36] ; 0x24 30022da4: e3530000 cmp r3, #0 30022da8: 0a000004 beq 30022dc0 30022dac: e593301c ldr r3, [r3, #28] 30022db0: e3530000 cmp r3, #0 30022db4: 128d0018 addne r0, sp, #24 30022db8: 11a0e00f movne lr, pc 30022dbc: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 30022dc0: e59d3010 ldr r3, [sp, #16] 30022dc4: e3530000 cmp r3, #0 30022dc8: 0a000004 beq 30022de0 30022dcc: e593301c ldr r3, [r3, #28] 30022dd0: e3530000 cmp r3, #0 30022dd4: 128d0004 addne r0, sp, #4 30022dd8: 11a0e00f movne lr, pc 30022ddc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 30022de0: eb0058c9 bl 3003910c <__errno> 30022de4: e3a03012 mov r3, #18 30022de8: eaffffd2 b 30022d38 } if ( !parent_loc.ops->link_h ) { 30022dec: e59d3010 ldr r3, [sp, #16] 30022df0: e5933008 ldr r3, [r3, #8] 30022df4: e3530000 cmp r3, #0 30022df8: 1a00000f bne 30022e3c rtems_filesystem_freenode( &existing_loc ); 30022dfc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30022e00: e3530000 cmp r3, #0 <== NOT EXECUTED 30022e04: 0a000004 beq 30022e1c <== NOT EXECUTED 30022e08: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30022e0c: e3530000 cmp r3, #0 <== NOT EXECUTED 30022e10: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30022e14: 11a0e00f movne lr, pc <== NOT EXECUTED 30022e18: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 30022e1c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30022e20: e3530000 cmp r3, #0 <== NOT EXECUTED 30022e24: 0affffc1 beq 30022d30 <== NOT EXECUTED 30022e28: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30022e2c: e3530000 cmp r3, #0 <== NOT EXECUTED 30022e30: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 30022e34: 1affffbb bne 30022d28 <== NOT EXECUTED 30022e38: eaffffbc b 30022d30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 30022e3c: e28d4018 add r4, sp, #24 30022e40: e1a01006 mov r1, r6 30022e44: e1a00004 mov r0, r4 30022e48: e59d202c ldr r2, [sp, #44] ; 0x2c 30022e4c: e1a0e00f mov lr, pc 30022e50: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 30022e54: e59d3024 ldr r3, [sp, #36] ; 0x24 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 ); 30022e58: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 30022e5c: e3530000 cmp r3, #0 30022e60: 0a000004 beq 30022e78 30022e64: e593301c ldr r3, [r3, #28] 30022e68: e3530000 cmp r3, #0 30022e6c: 11a00004 movne r0, r4 30022e70: 11a0e00f movne lr, pc 30022e74: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 30022e78: e59d3010 ldr r3, [sp, #16] 30022e7c: e3530000 cmp r3, #0 30022e80: 0a000004 beq 30022e98 30022e84: e593301c ldr r3, [r3, #28] 30022e88: e3530000 cmp r3, #0 30022e8c: 128d0004 addne r0, sp, #4 30022e90: 11a0e00f movne lr, pc 30022e94: 112fff13 bxne r3 return result; } 30022e98: e1a00005 mov r0, r5 30022e9c: e28dd030 add sp, sp, #48 ; 0x30 30022ea0: e8bd8070 pop {r4, r5, r6, pc} 30022ea4: 3005ce08 .word 0x3005ce08 30017894 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 30017894: e59fc0ec ldr ip, [pc, #236] ; 30017988 off_t lseek( int fd, off_t offset, int whence ) { 30017898: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 3001789c: e59cc000 ldr ip, [ip] 300178a0: e150000c cmp r0, ip 300178a4: 2a000005 bcs 300178c0 iop = rtems_libio_iop( fd ); 300178a8: e59fc0dc ldr ip, [pc, #220] ; 3001798c 300178ac: e59c4000 ldr r4, [ip] 300178b0: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 300178b4: e5940014 ldr r0, [r4, #20] 300178b8: e3100c01 tst r0, #256 ; 0x100 300178bc: 1a000002 bne 300178cc 300178c0: ebffd453 bl 3000ca14 <__errno> 300178c4: e3a03009 mov r3, #9 300178c8: ea00001c b 30017940 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 300178cc: e594003c ldr r0, [r4, #60] ; 0x3c 300178d0: e5900014 ldr r0, [r0, #20] 300178d4: e3500000 cmp r0, #0 300178d8: 1a000002 bne 300178e8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 300178dc: ebffd44c bl 3000ca14 <__errno> <== NOT EXECUTED 300178e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300178e4: ea000015 b 30017940 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 300178e8: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 300178ec: e284600c add r6, r4, #12 300178f0: e8960060 ldm r6, {r5, r6} switch ( whence ) { 300178f4: 0a000006 beq 30017914 300178f8: e3530002 cmp r3, #2 300178fc: 0a000007 beq 30017920 30017900: e3530000 cmp r3, #0 30017904: 1a00000b bne 30017938 case SEEK_SET: iop->offset = offset; 30017908: e584100c str r1, [r4, #12] 3001790c: e5842010 str r2, [r4, #16] break; 30017910: ea00000e b 30017950 case SEEK_CUR: iop->offset += offset; 30017914: e091b005 adds fp, r1, r5 30017918: e0a2c006 adc ip, r2, r6 3001791c: ea000002 b 3001792c break; case SEEK_END: iop->offset = iop->size + offset; 30017920: e9941800 ldmib r4, {fp, ip} 30017924: e09bb001 adds fp, fp, r1 30017928: e0acc002 adc ip, ip, r2 3001792c: e584b00c str fp, [r4, #12] 30017930: e584c010 str ip, [r4, #16] break; 30017934: ea000005 b 30017950 default: rtems_set_errno_and_return_minus_one( EINVAL ); 30017938: ebffd435 bl 3000ca14 <__errno> 3001793c: e3a03016 mov r3, #22 30017940: e5803000 str r3, [r0] 30017944: e3e02000 mvn r2, #0 30017948: e3e03000 mvn r3, #0 3001794c: ea00000a b 3001797c /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 30017950: e594c03c ldr ip, [r4, #60] ; 0x3c 30017954: e1a00004 mov r0, r4 30017958: e1a0e00f mov lr, pc 3001795c: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 30017960: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 30017964: e1a02000 mov r2, r0 30017968: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 3001796c: 1a000002 bne 3001797c 30017970: e3710001 cmn r1, #1 iop->offset = old_offset; 30017974: 0584500c streq r5, [r4, #12] 30017978: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 3001797c: e1a01003 mov r1, r3 30017980: e1a00002 mov r0, r2 30017984: e8bd8870 pop {r4, r5, r6, fp, pc} 30017988: 300191f8 .word 0x300191f8 3001798c: 30019b98 .word 0x30019b98 30022fc4 : int _STAT_NAME( const char *path, struct stat *buf ) { 30022fc4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 30022fc8: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 30022fcc: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 30022fd0: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 30022fd4: 1a000002 bne 30022fe4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 30022fd8: eb00584b bl 3003910c <__errno> <== NOT EXECUTED 30022fdc: e3a0300e mov r3, #14 <== NOT EXECUTED 30022fe0: ea000018 b 30023048 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 30022fe4: eb0072d3 bl 3003fb38 <== NOT EXECUTED 30022fe8: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30022fec: e3a0c000 mov ip, #0 <== NOT EXECUTED 30022ff0: e1a01000 mov r1, r0 <== NOT EXECUTED 30022ff4: e1a0200c mov r2, ip <== NOT EXECUTED 30022ff8: e1a00006 mov r0, r6 <== NOT EXECUTED 30022ffc: e1a03004 mov r3, r4 <== NOT EXECUTED 30023000: e58dc000 str ip, [sp] <== NOT EXECUTED 30023004: ebff8883 bl 30005218 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 30023008: e2501000 subs r1, r0, #0 <== NOT EXECUTED 3002300c: 1a00000e bne 3002304c <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 30023010: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 30023014: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30023018: e3530000 cmp r3, #0 <== NOT EXECUTED 3002301c: 1a00000c bne 30023054 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30023020: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30023024: e3530000 cmp r3, #0 <== NOT EXECUTED 30023028: 0a000004 beq 30023040 <== NOT EXECUTED 3002302c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30023030: e3530000 cmp r3, #0 <== NOT EXECUTED 30023034: 11a00004 movne r0, r4 <== NOT EXECUTED 30023038: 11a0e00f movne lr, pc <== NOT EXECUTED 3002303c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30023040: eb005831 bl 3003910c <__errno> <== NOT EXECUTED 30023044: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30023048: e5803000 str r3, [r0] <== NOT EXECUTED 3002304c: e3e05000 mvn r5, #0 <== NOT EXECUTED 30023050: ea000010 b 30023098 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 30023054: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 30023058: e1a00005 mov r0, r5 <== NOT EXECUTED 3002305c: eb0064e2 bl 3003c3ec <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 30023060: e1a01005 mov r1, r5 <== NOT EXECUTED 30023064: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 30023068: e1a00004 mov r0, r4 <== NOT EXECUTED 3002306c: e1a0e00f mov lr, pc <== NOT EXECUTED 30023070: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30023074: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 30023078: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 3002307c: e3530000 cmp r3, #0 <== NOT EXECUTED 30023080: 0a000004 beq 30023098 <== NOT EXECUTED 30023084: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30023088: e3530000 cmp r3, #0 <== NOT EXECUTED 3002308c: 11a00004 movne r0, r4 <== NOT EXECUTED 30023090: 11a0e00f movne lr, pc <== NOT EXECUTED 30023094: 112fff13 bxne r3 <== NOT EXECUTED return status; } 30023098: e1a00005 mov r0, r5 <== NOT EXECUTED 3002309c: e28dd018 add sp, sp, #24 <== NOT EXECUTED 300230a0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30008d40 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 30008d40: e59f30d8 ldr r3, [pc, #216] ; 30008e20 30008d44: e92d4070 push {r4, r5, r6, lr} 30008d48: e5932004 ldr r2, [r3, #4] 30008d4c: e1a04000 mov r4, r0 30008d50: e2822001 add r2, r2, #1 30008d54: e5832004 str r2, [r3, #4] /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 30008d58: ebffffef bl 30008d1c /* * Validate the parameters */ if ( !size ) 30008d5c: e3540000 cmp r4, #0 30008d60: 0a00002b beq 30008e14 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 30008d64: e59f30b8 ldr r3, [pc, #184] ; 30008e24 30008d68: e5933000 ldr r3, [r3] 30008d6c: e3530003 cmp r3, #3 30008d70: 1a000002 bne 30008d80 30008d74: ebffffd1 bl 30008cc0 30008d78: e3500000 cmp r0, #0 30008d7c: 0a000024 beq 30008e14 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 30008d80: e59f30a0 ldr r3, [pc, #160] ; 30008e28 30008d84: e3a02000 mov r2, #0 30008d88: e5930000 ldr r0, [r3] 30008d8c: e1a01004 mov r1, r4 30008d90: e1a03002 mov r3, r2 30008d94: eb000533 bl 3000a268 <_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 ) { 30008d98: 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; 30008d9c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 30008da0: 1a00000c bne 30008dd8 if (rtems_malloc_sbrk_helpers) 30008da4: e59f3080 ldr r3, [pc, #128] ; 30008e2c 30008da8: e5933000 ldr r3, [r3] 30008dac: e3530000 cmp r3, #0 30008db0: 0a000004 beq 30008dc8 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 30008db4: e1a00004 mov r0, r4 <== NOT EXECUTED 30008db8: e1a0e00f mov lr, pc <== NOT EXECUTED 30008dbc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 30008dc0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30008dc4: 1a000003 bne 30008dd8 <== NOT EXECUTED errno = ENOMEM; 30008dc8: eb000f11 bl 3000ca14 <__errno> 30008dcc: e3a0300c mov r3, #12 30008dd0: e5803000 str r3, [r0] return (void *) 0; 30008dd4: ea00000f b 30008e18 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 30008dd8: e59f3050 ldr r3, [pc, #80] ; 30008e30 30008ddc: e5933000 ldr r3, [r3] 30008de0: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 30008de4: 11a01004 movne r1, r4 30008de8: 11a00005 movne r0, r5 30008dec: 11a0e00f movne lr, pc 30008df0: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 30008df4: e59f3038 ldr r3, [pc, #56] ; 30008e34 30008df8: e5933000 ldr r3, [r3] 30008dfc: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 30008e00: 11a00005 movne r0, r5 30008e04: 11a0e00f movne lr, pc 30008e08: 1593f004 ldrne pc, [r3, #4] 30008e0c: e1a06005 mov r6, r5 30008e10: ea000000 b 30008e18 30008e14: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 30008e18: e1a00006 mov r0, r6 30008e1c: e8bd8070 pop {r4, r5, r6, pc} 30008e20: 30019ba4 .word 0x30019ba4 30008e24: 30019eb0 .word 0x30019eb0 30008e28: 30019204 .word 0x30019204 30008e2c: 300199bc .word 0x300199bc 30008e30: 300199c0 .word 0x300199c0 30008e34: 300199b8 .word 0x300199b8 30008d0c : } void malloc_deferred_free( void *pointer ) { 30008d0c: e1a01000 mov r1, r0 <== NOT EXECUTED 30008d10: e59f0000 ldr r0, [pc, #0] ; 30008d18 <== NOT EXECUTED 30008d14: eaffefc9 b 30004c40 <_Chain_Append> <== NOT EXECUTED 30008d18: 3001a20c .word 0x3001a20c 30008d1c : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 30008d1c: 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) 30008d20: ea000000 b 30008d28 free(to_be_freed); 30008d24: ebfffebb bl 30008818 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 30008d28: e59f000c ldr r0, [pc, #12] ; 30008d3c 30008d2c: eb0003aa bl 30009bdc <_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) 30008d30: e3500000 cmp r0, #0 30008d34: 1afffffa bne 30008d24 free(to_be_freed); } 30008d38: e49df004 pop {pc} ; (ldr pc, [sp], #4) 30008d3c: 3001a20c .word 0x3001a20c 3001040c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 3001040c: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 30010410: 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 ) 30010414: e5943054 ldr r3, [r4, #84] ; 0x54 30010418: e1530002 cmp r3, r2 3001041c: ba000003 blt 30010430 30010420: 1a000005 bne 3001043c 30010424: e5943050 ldr r3, [r4, #80] ; 0x50 30010428: e1530001 cmp r3, r1 3001042c: 2a000002 bcs 3001043c return IMFS_memfile_extend( the_jnode, length ); 30010430: e1a00004 mov r0, r4 <== NOT EXECUTED 30010434: ebffff9a bl 300102a4 <== NOT EXECUTED 30010438: ea000008 b 30010460 <== NOT EXECUTED * 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; 3001043c: e5841050 str r1, [r4, #80] ; 0x50 30010440: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; 30010444: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); 30010448: e3a01000 mov r1, #0 3001044c: e1a0000d mov r0, sp 30010450: ebffc99c bl 30002ac8 30010454: e59d3000 ldr r3, [sp] 30010458: e3a00000 mov r0, #0 3001045c: e5843040 str r3, [r4, #64] ; 0x40 return 0; } 30010460: e8bd801c pop {r2, r3, r4, pc} 30010464 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30010464: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 30010468: e5905038 ldr r5, [r0, #56] ; 0x38 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3001046c: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 30010470: e595304c ldr r3, [r5, #76] ; 0x4c 30010474: e3530006 cmp r3, #6 30010478: 1a00000b bne 300104ac if (iop->offset > the_jnode->info.linearfile.size) 3001047c: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED 30010480: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED 30010484: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED 30010488: e1510003 cmp r1, r3 <== NOT EXECUTED 3001048c: ca000003 bgt 300104a0 <== NOT EXECUTED 30010490: 1a000014 bne 300104e8 <== NOT EXECUTED 30010494: e590100c ldr r1, [r0, #12] <== NOT EXECUTED 30010498: e1510002 cmp r1, r2 <== NOT EXECUTED 3001049c: 9a000011 bls 300104e8 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 300104a0: e584200c str r2, [r4, #12] <== NOT EXECUTED 300104a4: e5843010 str r3, [r4, #16] <== NOT EXECUTED 300104a8: ea00000e b 300104e8 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 300104ac: e1a00005 mov r0, r5 300104b0: e284200c add r2, r4, #12 300104b4: e8920006 ldm r2, {r1, r2} 300104b8: ebffff79 bl 300102a4 300104bc: e3500000 cmp r0, #0 300104c0: 0a000005 beq 300104dc rtems_set_errno_and_return_minus_one( ENOSPC ); 300104c4: eb000686 bl 30011ee4 <__errno> <== NOT EXECUTED 300104c8: e3a0301c mov r3, #28 <== NOT EXECUTED 300104cc: e5803000 str r3, [r0] <== NOT EXECUTED 300104d0: e3e04000 mvn r4, #0 <== NOT EXECUTED 300104d4: e3e03000 mvn r3, #0 <== NOT EXECUTED 300104d8: ea000004 b 300104f0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 300104dc: e2853050 add r3, r5, #80 ; 0x50 300104e0: e893000c ldm r3, {r2, r3} 300104e4: e984000c stmib r4, {r2, r3} } return iop->offset; 300104e8: e284400c add r4, r4, #12 300104ec: e8940018 ldm r4, {r3, r4} } 300104f0: e1a01004 mov r1, r4 300104f4: e1a00003 mov r0, r3 300104f8: e8bd8030 pop {r4, r5, pc} 30010780 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30010780: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30010784: e92d4031 push {r0, r4, r5, lr} the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30010788: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3001078c: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 30010790: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 30010794: 0a000017 beq 300107f8 && (the_jnode->type == IMFS_LINEAR_FILE)) { 30010798: e594304c ldr r3, [r4, #76] ; 0x4c 3001079c: e3530006 cmp r3, #6 300107a0: 1a000014 bne 300107f8 uint32_t count = the_jnode->info.linearfile.size; 300107a4: e594c050 ldr ip, [r4, #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; 300107a8: e3a02000 mov r2, #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; 300107ac: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 300107b0: e3a00000 mov r0, #0 <== NOT EXECUTED 300107b4: e3a01000 mov r1, #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) 300107b8: e15c0002 cmp ip, r2 <== 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; 300107bc: e584304c str r3, [r4, #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; 300107c0: e5842060 str r2, [r4, #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; 300107c4: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 300107c8: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED 300107cc: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 300107d0: e584205c str r2, [r4, #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; 300107d4: e5842058 str r2, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 300107d8: 0a000006 beq 300107f8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 300107dc: e1a02001 mov r2, r1 <== NOT EXECUTED 300107e0: e1a01000 mov r1, r0 <== NOT EXECUTED 300107e4: e1a00004 mov r0, r4 <== NOT EXECUTED 300107e8: e58dc000 str ip, [sp] <== NOT EXECUTED 300107ec: ebffff42 bl 300104fc <== 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) 300107f0: e3700001 cmn r0, #1 <== NOT EXECUTED 300107f4: 0a000009 beq 30010820 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 300107f8: e5953014 ldr r3, [r5, #20] 300107fc: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 30010800: 12843050 addne r3, r4, #80 ; 0x50 30010804: 1893000c ldmne r3, {r2, r3} 30010808: 1585200c strne r2, [r5, #12] 3001080c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 30010810: e2844050 add r4, r4, #80 ; 0x50 30010814: e8940018 ldm r4, {r3, r4} 30010818: e9850018 stmib r5, {r3, r4} 3001081c: e3a00000 mov r0, #0 return 0; } 30010820: e8bd8038 pop {r3, r4, r5, pc} 300015d4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 300015d4: e92d43f0 push {r4, r5, r6, r7, r8, r9, 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) ) ) 300015d8: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 300015dc: e24dd01c sub sp, sp, #28 300015e0: e1a05001 mov r5, r1 300015e4: e1a07000 mov r7, r0 300015e8: e1a08002 mov r8, r2 300015ec: e1a09003 mov r9, 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) ) ) 300015f0: 1a000002 bne 30001600 rtems_set_errno_and_return_minus_one( EINVAL ); 300015f4: eb002d06 bl 3000ca14 <__errno> <== NOT EXECUTED 300015f8: e3a03016 mov r3, #22 <== NOT EXECUTED 300015fc: ea00001b b 30001670 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 30001600: e5d03000 ldrb r3, [r0] 30001604: e353002f cmp r3, #47 ; 0x2f 30001608: 1353005c cmpne r3, #92 ; 0x5c 3000160c: 13a06000 movne r6, #0 30001610: 03a06001 moveq r6, #1 30001614: 0a000001 beq 30001620 30001618: e3530000 cmp r3, #0 3000161c: 1a000005 bne 30001638 30001620: e59f30ec ldr r3, [pc, #236] ; 30001714 30001624: e28dc004 add ip, sp, #4 30001628: e593e000 ldr lr, [r3] 3000162c: e3a06001 mov r6, #1 30001630: e28ee018 add lr, lr, #24 30001634: ea000003 b 30001648 30001638: e59f30d4 ldr r3, [pc, #212] ; 30001714 3000163c: e28dc004 add ip, sp, #4 30001640: e593e000 ldr lr, [r3] 30001644: e28ee004 add lr, lr, #4 30001648: e8be000f ldm lr!, {r0, r1, r2, r3} 3000164c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001650: e59e3000 ldr r3, [lr] 30001654: e58c3000 str r3, [ip] if ( !temp_loc.ops->evalformake_h ) { 30001658: e59d3010 ldr r3, [sp, #16] 3000165c: e5933004 ldr r3, [r3, #4] 30001660: e3530000 cmp r3, #0 30001664: 1a000004 bne 3000167c rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001668: eb002ce9 bl 3000ca14 <__errno> <== NOT EXECUTED 3000166c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001670: e5803000 str r3, [r0] <== NOT EXECUTED 30001674: e3e05000 mvn r5, #0 30001678: ea000022 b 30001708 } result = (*temp_loc.ops->evalformake_h)( 3000167c: e28d4004 add r4, sp, #4 30001680: e0870006 add r0, r7, r6 30001684: e1a01004 mov r1, r4 30001688: e28d2018 add r2, sp, #24 3000168c: e1a0e00f mov lr, pc 30001690: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 30001694: e3500000 cmp r0, #0 30001698: 1afffff5 bne 30001674 return -1; if ( !temp_loc.ops->mknod_h ) { 3000169c: e59d3010 ldr r3, [sp, #16] 300016a0: e593c014 ldr ip, [r3, #20] 300016a4: e35c0000 cmp ip, #0 300016a8: 1a000006 bne 300016c8 rtems_filesystem_freenode( &temp_loc ); 300016ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300016b0: e3530000 cmp r3, #0 <== NOT EXECUTED 300016b4: 0affffeb beq 30001668 <== NOT EXECUTED 300016b8: e1a00004 mov r0, r4 <== NOT EXECUTED 300016bc: e1a0e00f mov lr, pc <== NOT EXECUTED 300016c0: e12fff13 bx r3 <== NOT EXECUTED 300016c4: eaffffe7 b 30001668 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 300016c8: e1a01005 mov r1, r5 300016cc: e1a03009 mov r3, r9 300016d0: e58d4000 str r4, [sp] 300016d4: e1a02008 mov r2, r8 300016d8: e59d0018 ldr r0, [sp, #24] 300016dc: e1a0e00f mov lr, pc 300016e0: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 300016e4: e59d3010 ldr r3, [sp, #16] 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 ); 300016e8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 300016ec: e3530000 cmp r3, #0 300016f0: 0a000004 beq 30001708 300016f4: e593301c ldr r3, [r3, #28] 300016f8: e3530000 cmp r3, #0 300016fc: 11a00004 movne r0, r4 30001700: 11a0e00f movne lr, pc 30001704: 112fff13 bxne r3 return result; } 30001708: e1a00005 mov r0, r5 3000170c: e28dd01c add sp, sp, #28 30001710: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} 30001714: 300193f0 .word 0x300193f0 30001734 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 30001734: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 30001738: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 3000173c: e24dd018 sub sp, sp, #24 30001740: e1a06000 mov r6, r0 30001744: e1a09002 mov r9, r2 30001748: e1a0b003 mov fp, r3 3000174c: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 30001750: 0a000001 beq 3000175c /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 30001754: e3520001 cmp r2, #1 30001758: 9a000002 bls 30001768 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 3000175c: eb002cac bl 3000ca14 <__errno> 30001760: e3a03016 mov r3, #22 30001764: ea000014 b 300017bc return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 30001768: e5975024 ldr r5, [r7, #36] ; 0x24 3000176c: e3550000 cmp r5, #0 30001770: 1a000004 bne 30001788 errno = ENOTSUP; 30001774: eb002ca6 bl 3000ca14 <__errno> <== NOT EXECUTED 30001778: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000177c: e5803000 str r3, [r0] <== NOT EXECUTED 30001780: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 30001784: ea00006d b 30001940 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 30001788: e3530000 cmp r3, #0 3000178c: 03a0006c moveq r0, #108 ; 0x6c 30001790: 0a000002 beq 300017a0 size += strlen( device ) + 1; 30001794: e1a00003 mov r0, r3 <== NOT EXECUTED 30001798: eb00308e bl 3000d9d8 <== NOT EXECUTED 3000179c: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 300017a0: eb001d66 bl 30008d40 if ( !temp_mt_entry ) { 300017a4: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 300017a8: e1a04000 mov r4, r0 300017ac: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 300017b0: 1a000003 bne 300017c4 errno = ENOMEM; 300017b4: eb002c96 bl 3000ca14 <__errno> <== NOT EXECUTED 300017b8: e3a0300c mov r3, #12 <== NOT EXECUTED 300017bc: e5803000 str r3, [r0] 300017c0: ea00006a b 30001970 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 300017c4: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 300017c8: e5809030 str r9, [r0, #48] ; 0x30 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 300017cc: 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; 300017d0: 0580b068 streq fp, [r0, #104] ; 0x68 temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 300017d4: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 300017d8: 11a00003 movne r0, r3 300017dc: 11a0100b movne r1, fp } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 300017e0: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 300017e4: 1b00303f blne 3000d8e8 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 300017e8: e35a0000 cmp sl, #0 300017ec: 0a000035 beq 300018c8 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 300017f0: e1a0000a mov r0, sl 300017f4: eb003077 bl 3000d9d8 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 300017f8: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 300017fc: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 30001800: e3a0c001 mov ip, #1 30001804: e1a0000a mov r0, sl 30001808: e3a02007 mov r2, #7 3000180c: e1a03005 mov r3, r5 30001810: e58dc000 str ip, [sp] 30001814: ebfffed3 bl 30001368 30001818: e3700001 cmn r0, #1 3000181c: 0a000046 beq 3000193c /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 30001820: e59d3010 ldr r3, [sp, #16] 30001824: e5933010 ldr r3, [r3, #16] 30001828: e3530000 cmp r3, #0 3000182c: 1a000002 bne 3000183c errno = ENOTSUP; 30001830: eb002c77 bl 3000ca14 <__errno> <== NOT EXECUTED 30001834: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001838: ea000006 b 30001858 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 3000183c: e1a00005 mov r0, r5 30001840: e1a0e00f mov lr, pc 30001844: e12fff13 bx r3 30001848: e3500001 cmp r0, #1 3000184c: 0a000003 beq 30001860 errno = ENOTDIR; 30001850: eb002c6f bl 3000ca14 <__errno> 30001854: e3a03014 mov r3, #20 30001858: e5803000 str r3, [r0] goto cleanup_and_bail; 3000185c: ea000037 b 30001940 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 30001860: e59f2140 ldr r2, [pc, #320] ; 300019a8 !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 ) 30001864: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 30001868: e4923004 ldr r3, [r2], #4 3000186c: ea000003 b 30001880 !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 ) 30001870: e593001c ldr r0, [r3, #28] 30001874: e1500001 cmp r0, r1 30001878: 0a000003 beq 3000188c * 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 ) { 3000187c: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30001880: e1530002 cmp r3, r2 30001884: 1afffff9 bne 30001870 30001888: ea00003b b 3000197c /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 3000188c: eb002c60 bl 3000ca14 <__errno> 30001890: e3a03010 mov r3, #16 30001894: ea000001 b 300018a0 * 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; 30001898: eb002c5d bl 3000ca14 <__errno> <== NOT EXECUTED 3000189c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300018a0: e5803000 str r3, [r0] 300018a4: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 300018a8: ea000024 b 30001940 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 300018ac: e1a00004 mov r0, r4 300018b0: e1a0e00f mov lr, pc 300018b4: e12fff13 bx r3 300018b8: e3500000 cmp r0, #0 300018bc: e28d5004 add r5, sp, #4 300018c0: 0a000008 beq 300018e8 300018c4: ea00001d b 30001940 <== 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; 300018c8: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 300018cc: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 300018d0: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 300018d4: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 300018d8: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 300018dc: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 300018e0: e584a018 str sl, [r4, #24] 300018e4: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 300018e8: e1a00004 mov r0, r4 300018ec: e1a0e00f mov lr, pc 300018f0: e597f024 ldr pc, [r7, #36] ; 0x24 300018f4: e2507000 subs r7, r0, #0 300018f8: 0a000007 beq 3000191c /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 300018fc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 30001900: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 30001904: e3530000 cmp r3, #0 <== NOT EXECUTED 30001908: 0a00000c beq 30001940 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 3000190c: e1a00004 mov r0, r4 <== NOT EXECUTED 30001910: e1a0e00f mov lr, pc <== NOT EXECUTED 30001914: e12fff13 bx r3 <== NOT EXECUTED 30001918: ea000008 b 30001940 <== 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 ); 3000191c: e59f0084 ldr r0, [pc, #132] ; 300019a8 30001920: e1a01004 mov r1, r4 30001924: eb000cc5 bl 30004c40 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 30001928: e3560000 cmp r6, #0 3000192c: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 30001930: 15864000 strne r4, [r6] 30001934: 11a00007 movne r0, r7 30001938: ea00000d b 30001974 3000193c: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 30001940: e1a00008 mov r0, r8 30001944: eb001bb3 bl 30008818 if ( loc_to_free ) 30001948: e3550000 cmp r5, #0 3000194c: 0a000007 beq 30001970 rtems_filesystem_freenode( loc_to_free ); 30001950: e595300c ldr r3, [r5, #12] 30001954: e3530000 cmp r3, #0 30001958: 0a000004 beq 30001970 3000195c: e593301c ldr r3, [r3, #28] 30001960: e3530000 cmp r3, #0 30001964: 11a00005 movne r0, r5 30001968: 11a0e00f movne lr, pc 3000196c: 112fff13 bxne r3 30001970: e3e00000 mvn r0, #0 return -1; } 30001974: e28dd018 add sp, sp, #24 30001978: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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; 3000197c: e59d2010 ldr r2, [sp, #16] * 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; 30001980: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 30001984: e59d100c ldr r1, [sp, #12] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 30001988: 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; 3000198c: 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; 30001990: 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 ){ 30001994: e3530000 cmp r3, #0 */ 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; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 30001998: 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; 3000199c: 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 ){ 300019a0: 1affffc1 bne 300018ac 300019a4: eaffffbb b 30001898 <== NOT EXECUTED 300019a8: 30019bd0 .word 0x30019bd0 30001a1c : */ int newlib_free_buffers( FILE *fp ) { 30001a1c: e92d4010 push {r4, lr} 30001a20: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 30001a24: eb002cf9 bl 3000ce10 30001a28: e3500002 cmp r0, #2 30001a2c: 8a00000b bhi 30001a60 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 30001a30: e1d430bc ldrh r3, [r4, #12] 30001a34: e3130080 tst r3, #128 ; 0x80 30001a38: 0a00000a beq 30001a68 free( fp->_bf._base ); 30001a3c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30001a40: eb001b74 bl 30008818 <== NOT EXECUTED fp->_flags &= ~__SMBF; 30001a44: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001a48: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 30001a4c: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001a50: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 30001a54: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 30001a58: e5843000 str r3, [r4] <== NOT EXECUTED 30001a5c: ea000001 b 30001a68 <== NOT EXECUTED } break; default: fclose(fp); 30001a60: e1a00004 mov r0, r4 <== NOT EXECUTED 30001a64: eb002c37 bl 3000cb48 <== NOT EXECUTED } return 0; } 30001a68: e3a00000 mov r0, #0 30001a6c: e8bd8010 pop {r4, pc} 30001c90 : int open( const char *pathname, int flags, ... ) { 30001c90: e92d000e push {r1, r2, r3} 30001c94: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 30001c98: e24dd01c sub sp, sp, #28 30001c9c: e59d503c ldr r5, [sp, #60] ; 0x3c 30001ca0: e1a06000 mov r6, r0 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 30001ca4: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 30001ca8: e2138001 ands r8, r3, #1 30001cac: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 30001cb0: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 30001cb4: e28d3044 add r3, sp, #68 ; 0x44 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; 30001cb8: 13888002 orrne r8, r8, #2 va_start(ap, flags); mode = va_arg( ap, int ); 30001cbc: e58d3018 str r3, [sp, #24] 30001cc0: e59d9040 ldr r9, [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(); 30001cc4: eb001bc3 bl 30008bd8 if ( iop == 0 ) { 30001cc8: e2504000 subs r4, r0, #0 30001ccc: 03a05017 moveq r5, #23 30001cd0: 0a000077 beq 30001eb4 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 30001cd4: e1a00006 mov r0, r6 30001cd8: eb002f3e bl 3000d9d8 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 30001cdc: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 30001ce0: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 30001ce4: e1a02008 mov r2, r8 30001ce8: e1a00006 mov r0, r6 30001cec: e3a08001 mov r8, #1 30001cf0: e1a03007 mov r3, r7 30001cf4: e58d8000 str r8, [sp] 30001cf8: ebfffd9a bl 30001368 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 30001cfc: e3700001 cmn r0, #1 30001d00: 1a00001f bne 30001d84 if ( errno != ENOENT ) { 30001d04: eb002b42 bl 3000ca14 <__errno> 30001d08: e5903000 ldr r3, [r0] 30001d0c: e3530002 cmp r3, #2 30001d10: 1a00000a bne 30001d40 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 30001d14: e215ac02 ands sl, r5, #512 ; 0x200 30001d18: 01a0700a moveq r7, sl 30001d1c: 01a05003 moveq r5, r3 30001d20: 0a000056 beq 30001e80 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 30001d24: e1a00006 mov r0, r6 30001d28: e3891902 orr r1, r9, #32768 ; 0x8000 30001d2c: e3a02000 mov r2, #0 30001d30: e3a03000 mov r3, #0 30001d34: ebfffe26 bl 300015d4 if ( rc ) { 30001d38: e250a000 subs sl, r0, #0 30001d3c: 0a000003 beq 30001d50 rc = errno; 30001d40: eb002b33 bl 3000ca14 <__errno> 30001d44: e3a07000 mov r7, #0 30001d48: e5905000 ldr r5, [r0] goto done; 30001d4c: ea000049 b 30001e78 } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 30001d50: e1a00006 mov r0, r6 30001d54: eb002f1f bl 3000d9d8 30001d58: e1a03007 mov r3, r7 30001d5c: e1a01000 mov r1, r0 30001d60: e1a0200a mov r2, sl 30001d64: e1a00006 mov r0, r6 30001d68: e58d8000 str r8, [sp] 30001d6c: ebfffd7d bl 30001368 if ( status != 0 ) { /* The file did not exist */ 30001d70: e3500000 cmp r0, #0 30001d74: 11a0700a movne r7, sl 30001d78: 13a0500d movne r5, #13 30001d7c: 1a00003f bne 30001e80 30001d80: ea000003 b 30001d94 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 30001d84: e2053c0a and r3, r5, #2560 ; 0xa00 30001d88: e3530c0a cmp r3, #2560 ; 0xa00 30001d8c: 03a05011 moveq r5, #17 30001d90: 0a00003a beq 30001e80 * 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; 30001d94: e28d701c add r7, sp, #28 30001d98: e5373018 ldr r3, [r7, #-24]! iop->flags |= rtems_libio_fcntl_flags( flags ); 30001d9c: 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; 30001da0: e5843038 str r3, [r4, #56] ; 0x38 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 30001da4: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001da8: e5948014 ldr r8, [r4, #20] /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 30001dac: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001db0: eb001bb5 bl 30008c8c iop->pathinfo = loc; 30001db4: e284c018 add ip, r4, #24 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 30001db8: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 30001dbc: e8b7000f ldm r7!, {r0, r1, r2, r3} 30001dc0: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 30001dc4: 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; 30001dc8: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 30001dcc: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 30001dd0: 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 ); 30001dd4: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 30001dd8: 0a000041 beq 30001ee4 30001ddc: e593c000 ldr ip, [r3] 30001de0: e35c0000 cmp ip, #0 30001de4: 0a00003e beq 30001ee4 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 30001de8: e1a01006 mov r1, r6 30001dec: e1a03009 mov r3, r9 30001df0: e1a00004 mov r0, r4 30001df4: e1a02005 mov r2, r5 30001df8: e1a0e00f mov lr, pc 30001dfc: e12fff1c bx ip if ( rc ) { 30001e00: e3500000 cmp r0, #0 30001e04: 0a000003 beq 30001e18 rc = errno; 30001e08: eb002b01 bl 3000ca14 <__errno> 30001e0c: e28d7004 add r7, sp, #4 30001e10: e5905000 ldr r5, [r0] goto done; 30001e14: ea000017 b 30001e78 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 30001e18: e3150b01 tst r5, #1024 ; 0x400 30001e1c: 0a000028 beq 30001ec4 rc = ftruncate( iop - rtems_libio_iops, 0 ); 30001e20: e59f30c8 ldr r3, [pc, #200] ; 30001ef0 30001e24: e3a01000 mov r1, #0 30001e28: e5930000 ldr r0, [r3] 30001e2c: e3a02000 mov r2, #0 30001e30: e0600004 rsb r0, r0, r4 30001e34: e1a00340 asr r0, r0, #6 30001e38: eb001a9f bl 300088bc if ( rc ) { 30001e3c: e2505000 subs r5, r0, #0 30001e40: 0a00001f beq 30001ec4 if(errno) rc = errno; 30001e44: eb002af2 bl 3000ca14 <__errno> <== NOT EXECUTED 30001e48: e5903000 ldr r3, [r0] <== NOT EXECUTED 30001e4c: e3530000 cmp r3, #0 <== NOT EXECUTED 30001e50: 0a000001 beq 30001e5c <== NOT EXECUTED 30001e54: eb002aee bl 3000ca14 <__errno> <== NOT EXECUTED 30001e58: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 30001e5c: e59f308c ldr r3, [pc, #140] ; 30001ef0 <== NOT EXECUTED 30001e60: e5933000 ldr r3, [r3] <== NOT EXECUTED 30001e64: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 30001e68: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 30001e6c: eb001a40 bl 30008774 <== NOT EXECUTED 30001e70: e3a04000 mov r4, #0 <== NOT EXECUTED 30001e74: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 30001e78: e3550000 cmp r5, #0 30001e7c: 0a000010 beq 30001ec4 if ( iop ) 30001e80: e3540000 cmp r4, #0 rtems_libio_free( iop ); 30001e84: 11a00004 movne r0, r4 30001e88: 1b001b3b blne 30008b7c if ( loc_to_free ) 30001e8c: e3570000 cmp r7, #0 30001e90: 0a000007 beq 30001eb4 rtems_filesystem_freenode( loc_to_free ); 30001e94: e597300c ldr r3, [r7, #12] 30001e98: e3530000 cmp r3, #0 30001e9c: 0a000004 beq 30001eb4 30001ea0: e593301c ldr r3, [r3, #28] 30001ea4: e3530000 cmp r3, #0 30001ea8: 11a00007 movne r0, r7 30001eac: 11a0e00f movne lr, pc 30001eb0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 30001eb4: eb002ad6 bl 3000ca14 <__errno> 30001eb8: e5805000 str r5, [r0] 30001ebc: e3e00000 mvn r0, #0 30001ec0: ea000003 b 30001ed4 } return iop - rtems_libio_iops; 30001ec4: e59f3024 ldr r3, [pc, #36] ; 30001ef0 30001ec8: e5930000 ldr r0, [r3] 30001ecc: e0604004 rsb r4, r0, r4 30001ed0: e1a00344 asr r0, r4, #6 } 30001ed4: e28dd01c add sp, sp, #28 30001ed8: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 30001edc: e28dd00c add sp, sp, #12 30001ee0: e12fff1e bx lr if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 30001ee4: e28d7004 add r7, sp, #4 <== NOT EXECUTED 30001ee8: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 30001eec: eaffffe3 b 30001e80 <== NOT EXECUTED 30001ef0: 30019b98 .word 0x30019b98 30001c2c : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 30001c2c: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 30001c30: 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) { 30001c34: e59f0048 ldr r0, [pc, #72] ; 30001c84 30001c38: e1a02001 mov r2, r1 30001c3c: eb000013 bl 30001c90 30001c40: e3700001 cmn r0, #1 30001c44: 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) 30001c48: e59f0034 ldr r0, [pc, #52] ; 30001c84 30001c4c: e3a01001 mov r1, #1 30001c50: e3a02000 mov r2, #0 30001c54: eb00000d bl 30001c90 30001c58: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 30001c5c: 059f0024 ldreq r0, [pc, #36] ; 30001c88 /* * 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) 30001c60: 0a000006 beq 30001c80 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 30001c64: e59f0018 ldr r0, [pc, #24] ; 30001c84 30001c68: e3a01001 mov r1, #1 30001c6c: e3a02000 mov r2, #0 30001c70: eb000006 bl 30001c90 30001c74: e3700001 cmn r0, #1 30001c78: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 30001c7c: e59f0008 ldr r0, [pc, #8] ; 30001c8c <== NOT EXECUTED 30001c80: eb000b33 bl 30004954 <== NOT EXECUTED 30001c84: 30018ccb .word 0x30018ccb 30001c88: 55544431 .word 0x55544431 30001c8c: 55544432 .word 0x55544432 300025b8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 300025b8: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 300025bc: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 300025c0: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 300025c4: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 300025c8: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 300025cc: 0a000047 beq 300026f0 switch (c) { 300025d0: e5dd2000 ldrb r2, [sp] 300025d4: e2421008 sub r1, r2, #8 300025d8: e3510005 cmp r1, #5 300025dc: 979ff101 ldrls pc, [pc, r1, lsl #2] 300025e0: ea00002e b 300026a0 300025e4: 3000268c .word 0x3000268c <== NOT EXECUTED 300025e8: 30002660 .word 0x30002660 <== NOT EXECUTED 300025ec: 300025fc .word 0x300025fc <== NOT EXECUTED 300025f0: 300026a0 .word 0x300026a0 <== NOT EXECUTED 300025f4: 300026a0 .word 0x300026a0 <== NOT EXECUTED 300025f8: 30002628 .word 0x30002628 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 300025fc: e3130020 tst r3, #32 tty->column = 0; 30002600: 13a03000 movne r3, #0 30002604: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 30002608: e5943034 ldr r3, [r4, #52] ; 0x34 3000260c: e3130004 tst r3, #4 30002610: 0a000036 beq 300026f0 rtems_termios_puts ("\r", 1, tty); 30002614: e59f00e8 ldr r0, [pc, #232] ; 30002704 30002618: e3a01001 mov r1, #1 3000261c: e1a02004 mov r2, r4 30002620: ebffffa0 bl 300024a8 30002624: ea00000b b 30002658 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 30002628: e3130010 tst r3, #16 <== NOT EXECUTED 3000262c: 0a000002 beq 3000263c <== NOT EXECUTED 30002630: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 30002634: e3520000 cmp r2, #0 <== NOT EXECUTED 30002638: 0a000030 beq 30002700 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3000263c: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 30002640: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { 30002644: 0a000029 beq 300026f0 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 30002648: 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'; 3000264c: e3a0300a mov r3, #10 <== NOT EXECUTED 30002650: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 30002654: 0a000025 beq 300026f0 <== NOT EXECUTED tty->column = 0; 30002658: e3a03000 mov r3, #0 3000265c: ea000022 b 300026ec } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30002660: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30002664: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30002668: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3000266c: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30002670: e2611008 rsb r1, r1, #8 30002674: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30002678: 1a00001b bne 300026ec tty->column += i; 3000267c: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 30002680: e1a02004 mov r2, r4 30002684: e59f007c ldr r0, [pc, #124] ; 30002708 30002688: ea00001b b 300026fc } tty->column += i; break; case '\b': if (tty->column > 0) 3000268c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30002690: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 30002694: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 30002698: ca000013 bgt 300026ec <== NOT EXECUTED 3000269c: ea000013 b 300026f0 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 300026a0: e3130002 tst r3, #2 300026a4: 0a000007 beq 300026c8 c = toupper(c); 300026a8: e59f305c ldr r3, [pc, #92] ; 3000270c <== NOT EXECUTED 300026ac: e5933000 ldr r3, [r3] <== NOT EXECUTED 300026b0: e0833002 add r3, r3, r2 <== NOT EXECUTED 300026b4: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 300026b8: e2033003 and r3, r3, #3 <== NOT EXECUTED 300026bc: e3530002 cmp r3, #2 <== NOT EXECUTED 300026c0: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 300026c4: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 300026c8: e59f203c ldr r2, [pc, #60] ; 3000270c 300026cc: e5dd3000 ldrb r3, [sp] 300026d0: e5922000 ldr r2, [r2] 300026d4: e0823003 add r3, r2, r3 300026d8: e5d33001 ldrb r3, [r3, #1] 300026dc: e3130020 tst r3, #32 300026e0: 1a000002 bne 300026f0 tty->column++; 300026e4: e5943028 ldr r3, [r4, #40] ; 0x28 300026e8: e2833001 add r3, r3, #1 300026ec: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 300026f0: e1a02004 mov r2, r4 300026f4: e1a0000d mov r0, sp 300026f8: e3a01001 mov r1, #1 300026fc: ebffff69 bl 300024a8 } 30002700: e8bd8018 pop {r3, r4, pc} 30002704: 30018e5d .word 0x30018e5d 30002708: 30018d2e .word 0x30018d2e 3000270c: 30019498 .word 0x30019498 3000c004 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 3000c004: e92d4070 push {r4, r5, r6, lr} 3000c008: 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) 3000c00c: e28d5004 add r5, sp, #4 3000c010: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 3000c014: e1a04000 mov r4, 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) 3000c018: e3a01003 mov r1, #3 3000c01c: e59f0140 ldr r0, [pc, #320] ; 3000c164 3000c020: e3a02007 mov r2, #7 3000c024: e1a03005 mov r3, r5 3000c028: e58dc000 str ip, [sp] 3000c02c: ebffd4cd bl 30001368 3000c030: e3500000 cmp r0, #0 3000c034: 0a000009 beq 3000c060 != 0) { if (errno != ENOENT) 3000c038: eb000275 bl 3000ca14 <__errno> 3000c03c: e5903000 ldr r3, [r0] 3000c040: e3530002 cmp r3, #2 3000c044: 1a000043 bne 3000c158 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 3000c048: e59f0114 ldr r0, [pc, #276] ; 3000c164 3000c04c: e59f1114 ldr r1, [pc, #276] ; 3000c168 3000c050: ebffd55b bl 300015c4 3000c054: e3500000 cmp r0, #0 3000c058: 0a000008 beq 3000c080 3000c05c: ea00003d b 3000c158 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 3000c060: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3000c064: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c068: 0a000004 beq 3000c080 <== NOT EXECUTED 3000c06c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000c070: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c074: 11a00005 movne r0, r5 <== NOT EXECUTED 3000c078: 11a0e00f movne lr, pc <== NOT EXECUTED 3000c07c: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 3000c080: e28d5018 add r5, sp, #24 3000c084: e59f10e0 ldr r1, [pc, #224] ; 3000c16c 3000c088: e3a0200a mov r2, #10 3000c08c: e1a00005 mov r0, r5 3000c090: eb00046d bl 3000d24c sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 3000c094: e59f30d4 ldr r3, [pc, #212] ; 3000c170 3000c098: e59f10d4 ldr r1, [pc, #212] ; 3000c174 3000c09c: e1d3c0b0 ldrh ip, [r3] 3000c0a0: e285000a add r0, r5, #10 3000c0a4: e1a0200c mov r2, ip 3000c0a8: e28cc001 add ip, ip, #1 3000c0ac: e1c3c0b0 strh ip, [r3] 3000c0b0: eb00050b bl 3000d4e4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 3000c0b4: e1a00005 mov r0, r5 3000c0b8: e3a01d06 mov r1, #384 ; 0x180 3000c0bc: eb00003f bl 3000c1c0 3000c0c0: e2506000 subs r6, r0, #0 3000c0c4: 0a000001 beq 3000c0d0 if (errno != EEXIST){ 3000c0c8: eb000251 bl 3000ca14 <__errno> <== NOT EXECUTED 3000c0cc: ea000021 b 3000c158 <== NOT EXECUTED 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); 3000c0d0: e1a00005 mov r0, r5 3000c0d4: e3a01901 mov r1, #16384 ; 0x4000 3000c0d8: ebffd6ec bl 30001c90 if (filsdes[0] < 0) { 3000c0dc: 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); 3000c0e0: e5840000 str r0, [r4] if (filsdes[0] < 0) { 3000c0e4: aa000003 bge 3000c0f8 err = errno; 3000c0e8: eb000249 bl 3000ca14 <__errno> 3000c0ec: 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); 3000c0f0: e1a00005 mov r0, r5 3000c0f4: ea000014 b 3000c14c } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 3000c0f8: e59f3078 ldr r3, [pc, #120] ; 3000c178 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); 3000c0fc: e3a01001 mov r1, #1 <== NOT EXECUTED 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]); 3000c100: e5933000 ldr r3, [r3] <== NOT EXECUTED 3000c104: e1500003 cmp r0, r3 <== NOT EXECUTED 3000c108: 359f306c ldrcc r3, [pc, #108] ; 3000c17c <== NOT EXECUTED 3000c10c: 35936000 ldrcc r6, [r3] <== NOT EXECUTED 3000c110: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 3000c114: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 3000c118: e28d0018 add r0, sp, #24 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 3000c11c: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 3000c120: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 3000c124: ebffd6d9 bl 30001c90 <== NOT EXECUTED if (filsdes[1] < 0) { 3000c128: 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); 3000c12c: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { 3000c130: a3a06000 movge r6, #0 <== NOT EXECUTED 3000c134: aa000003 bge 3000c148 <== NOT EXECUTED err = errno; 3000c138: eb000235 bl 3000ca14 <__errno> <== NOT EXECUTED 3000c13c: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); 3000c140: e5940000 ldr r0, [r4] <== NOT EXECUTED 3000c144: ebfff18a bl 30008774 <== NOT EXECUTED } unlink(fifopath); 3000c148: e28d0018 add r0, sp, #24 <== NOT EXECUTED 3000c14c: eb00001f bl 3000c1d0 } rtems_set_errno_and_return_minus_one(err); 3000c150: eb00022f bl 3000ca14 <__errno> 3000c154: e5806000 str r6, [r0] } 3000c158: e3e00000 mvn r0, #0 3000c15c: e28dd028 add sp, sp, #40 ; 0x28 3000c160: e8bd8070 pop {r4, r5, r6, pc} 3000c164: 30018fa6 .word 0x30018fa6 3000c168: 000003ff .word 0x000003ff 3000c16c: 30018fab .word 0x30018fab 3000c170: 30019b1a .word 0x30019b1a 3000c174: 30018fb6 .word 0x30018fb6 3000c178: 300191f8 .word 0x300191f8 3000c17c: 30019b98 .word 0x30019b98 3000ad08 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 3000ad08: e92d4010 push {r4, lr} <== NOT EXECUTED 3000ad0c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 3000ad10: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED 3000ad14: eb000325 bl 3000b9b0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 3000ad18: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000ad1c: eb000323 bl 3000b9b0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 3000ad20: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000ad24: ebffe54f bl 30004268 <== NOT EXECUTED free(pipe->Buffer); 3000ad28: e5940000 ldr r0, [r4] <== NOT EXECUTED 3000ad2c: ebfff6b9 bl 30008818 <== NOT EXECUTED free(pipe); 3000ad30: e1a00004 mov r0, r4 <== NOT EXECUTED } 3000ad34: e8bd4010 pop {r4, lr} <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 3000ad38: eafff6b6 b 30008818 <== NOT EXECUTED 3000a994 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 3000a994: e59f3054 ldr r3, [pc, #84] ; 3000a9f0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000a998: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED if (cmd == FIONREAD) { 3000a99c: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000a9a0: e1a04000 mov r4, r0 <== NOT EXECUTED 3000a9a4: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { 3000a9a8: 13e00015 mvnne r0, #21 <== NOT EXECUTED 3000a9ac: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) 3000a9b0: e3520000 cmp r2, #0 <== NOT EXECUTED 3000a9b4: 03e0000d mvneq r0, #13 <== NOT EXECUTED 3000a9b8: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 3000a9bc: e3a01000 mov r1, #0 <== NOT EXECUTED 3000a9c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000a9c4: e1a02001 mov r2, r1 <== NOT EXECUTED 3000a9c8: ebffe64d bl 30004304 <== NOT EXECUTED 3000a9cc: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3000a9d0: 13e00003 mvnne r0, #3 <== NOT EXECUTED 3000a9d4: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 3000a9d8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000a9dc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 3000a9e0: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000a9e4: ebffe68c bl 3000441c <== NOT EXECUTED 3000a9e8: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } 3000a9ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3000a9f0: 4004667f .word 0x4004667f 3000a92c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 3000a92c: e3e0001c mvn r0, #28 <== NOT EXECUTED 3000a930: e12fff1e bx lr <== NOT EXECUTED 3000a9f4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000a9f4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 3000a9f8: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000a9fc: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000aa00: e1a04000 mov r4, r0 <== NOT EXECUTED 3000aa04: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000aa08: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 3000aa0c: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000aa10: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000aa14: ebffe63a bl 30004304 <== NOT EXECUTED 3000aa18: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3000aa1c: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 3000aa20: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000aa24: 0a000045 beq 3000ab40 <== NOT EXECUTED 3000aa28: ea00004b b 3000ab5c <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 3000aa2c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3000aa30: e3530000 cmp r3, #0 <== NOT EXECUTED 3000aa34: 0a000043 beq 3000ab48 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 3000aa38: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED 3000aa3c: e2177001 ands r7, r7, #1 <== NOT EXECUTED 3000aa40: 13e0700a mvnne r7, #10 <== NOT EXECUTED 3000aa44: 1a000040 bne 3000ab4c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000aa48: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000aa4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000aa50: e2833001 add r3, r3, #1 <== NOT EXECUTED 3000aa54: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000aa58: ebffe66f bl 3000441c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 3000aa5c: e1a01007 mov r1, r7 <== NOT EXECUTED 3000aa60: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000aa64: eb0003ff bl 3000ba68 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000aa68: e1a01007 mov r1, r7 <== NOT EXECUTED 3000aa6c: 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)) 3000aa70: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000aa74: 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)) 3000aa78: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000aa7c: ebffe620 bl 30004304 <== NOT EXECUTED 3000aa80: e3500000 cmp r0, #0 <== NOT EXECUTED 3000aa84: 13e07003 mvnne r7, #3 <== NOT EXECUTED 3000aa88: 1a000031 bne 3000ab54 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000aa8c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) 3000aa90: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000aa94: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000aa98: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) 3000aa9c: 1a00002a bne 3000ab4c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 3000aaa0: e594200c ldr r2, [r4, #12] <== NOT EXECUTED 3000aaa4: e3520000 cmp r2, #0 <== NOT EXECUTED 3000aaa8: 0affffdf beq 3000aa2c <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; 3000aaac: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 3000aab0: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 3000aab4: e0667005 rsb r7, r6, r5 <== NOT EXECUTED 3000aab8: e1520007 cmp r2, r7 <== NOT EXECUTED 3000aabc: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 3000aac0: e0638008 rsb r8, r3, r8 <== NOT EXECUTED 3000aac4: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { 3000aac8: e1570008 cmp r7, r8 <== NOT EXECUTED 3000aacc: e0890006 add r0, r9, r6 <== 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); 3000aad0: d0811003 addle r1, r1, r3 <== NOT EXECUTED 3000aad4: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { 3000aad8: da000006 ble 3000aaf8 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 3000aadc: e0811003 add r1, r1, r3 <== NOT EXECUTED 3000aae0: e1a02008 mov r2, r8 <== NOT EXECUTED 3000aae4: eb0009d8 bl 3000d24c <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 3000aae8: e0860008 add r0, r6, r8 <== NOT EXECUTED 3000aaec: e5941000 ldr r1, [r4] <== NOT EXECUTED 3000aaf0: e0890000 add r0, r9, r0 <== NOT EXECUTED 3000aaf4: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 3000aaf8: eb0009d3 bl 3000d24c <== NOT EXECUTED pipe->Start += chunk; 3000aafc: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; 3000ab00: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 3000ab04: e0870000 add r0, r7, r0 <== NOT EXECUTED 3000ab08: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; 3000ab0c: eb002dc7 bl 30016230 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; 3000ab10: e594300c ldr r3, [r4, #12] <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 3000ab14: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; 3000ab18: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 3000ab1c: e3530000 cmp r3, #0 <== NOT EXECUTED pipe->Start = 0; 3000ab20: 05843008 streq r3, [r4, #8] <== NOT EXECUTED else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; 3000ab24: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) 3000ab28: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 3000ab2c: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 3000ab30: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000ab34: 11a0100d movne r1, sp <== NOT EXECUTED 3000ab38: 1b0003b4 blne 3000ba10 <== NOT EXECUTED read += chunk; 3000ab3c: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 3000ab40: e1560005 cmp r6, r5 <== NOT EXECUTED 3000ab44: 3affffd5 bcc 3000aaa0 <== NOT EXECUTED 3000ab48: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 3000ab4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000ab50: ebffe631 bl 3000441c <== NOT EXECUTED out_nolock: if (read > 0) 3000ab54: e3560000 cmp r6, #0 <== NOT EXECUTED 3000ab58: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } 3000ab5c: e1a00006 mov r0, r6 <== NOT EXECUTED 3000ab60: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 3000ad3c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ad3c: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; 3000ad40: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ad44: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 3000ad48: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ad4c: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 3000ad50: e1a02001 mov r2, r1 <== NOT EXECUTED 3000ad54: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000ad58: ebffe569 bl 30004304 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 3000ad5c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ad60: 1a000010 bne 3000ada8 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 3000ad64: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ad68: e3a01000 mov r1, #0 <== NOT EXECUTED /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) 3000ad6c: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; 3000ad70: 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); 3000ad74: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; 3000ad78: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3000ad7c: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 3000ad80: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; 3000ad84: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ad88: e1a02001 mov r2, r1 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 3000ad8c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3000ad90: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 3000ad94: e59f3098 ldr r3, [pc, #152] ; 3000ae34 <== NOT EXECUTED 3000ad98: e5930000 ldr r0, [r3] <== NOT EXECUTED 3000ad9c: ebffe558 bl 30004304 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 3000ada0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ada4: 0a000000 beq 3000adac <== NOT EXECUTED rtems_fatal_error_occurred(sc); 3000ada8: ebffe6e9 bl 30004954 <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000adac: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000adb0: ebffe599 bl 3000441c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 3000adb4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 3000adb8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000adbc: 1a000006 bne 3000addc <== NOT EXECUTED 3000adc0: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED 3000adc4: e3570000 cmp r7, #0 <== NOT EXECUTED 3000adc8: 1a000003 bne 3000addc <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 3000adcc: e1a00004 mov r0, r4 <== NOT EXECUTED 3000add0: ebffffcc bl 3000ad08 <== NOT EXECUTED *pipep = NULL; 3000add4: e5867000 str r7, [r6] <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 3000add8: ea000010 b 3000ae20 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 3000addc: e2552004 subs r2, r5, #4 <== NOT EXECUTED 3000ade0: 13a02001 movne r2, #1 <== NOT EXECUTED 3000ade4: e3530000 cmp r3, #0 <== NOT EXECUTED 3000ade8: 13a02000 movne r2, #0 <== NOT EXECUTED 3000adec: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 3000adf0: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 3000adf4: 1a000007 bne 3000ae18 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 3000adf8: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED 3000adfc: e2553002 subs r3, r5, #2 <== NOT EXECUTED 3000ae00: 13a03001 movne r3, #1 <== NOT EXECUTED 3000ae04: e3520000 cmp r2, #0 <== NOT EXECUTED 3000ae08: 13a03000 movne r3, #0 <== NOT EXECUTED 3000ae0c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000ae10: 0a000002 beq 3000ae20 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 3000ae14: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000ae18: e1a0100d mov r1, sp <== NOT EXECUTED 3000ae1c: eb0002fb bl 3000ba10 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 3000ae20: e59f300c ldr r3, [pc, #12] ; 3000ae34 <== NOT EXECUTED 3000ae24: e5930000 ldr r0, [r3] <== NOT EXECUTED 3000ae28: ebffe57b bl 3000441c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 3000ae2c: e3a00000 mov r0, #0 <== NOT EXECUTED 3000ae30: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED 3000ae34: 30019b14 .word 0x30019b14 3000ab64 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000ab64: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000ab68: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000ab6c: e1a04000 mov r4, r0 <== NOT EXECUTED 3000ab70: e1a0b001 mov fp, r1 <== NOT EXECUTED 3000ab74: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000ab78: 01a06005 moveq r6, r5 <== NOT EXECUTED 3000ab7c: 0a00005f beq 3000ad00 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 3000ab80: e3a01000 mov r1, #0 <== NOT EXECUTED 3000ab84: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 3000ab88: e1a02001 mov r2, r1 <== NOT EXECUTED 3000ab8c: ebffe5dc bl 30004304 <== NOT EXECUTED 3000ab90: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ab94: 13e06003 mvnne r6, #3 <== NOT EXECUTED 3000ab98: 1a000058 bne 3000ad00 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 3000ab9c: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED 3000aba0: e3560000 cmp r6, #0 <== NOT EXECUTED 3000aba4: 0a000022 beq 3000ac34 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 3000aba8: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED 3000abac: e1a06000 mov r6, r0 <== NOT EXECUTED 3000abb0: e1550009 cmp r5, r9 <== NOT EXECUTED 3000abb4: 91a09005 movls r9, r5 <== NOT EXECUTED 3000abb8: 83a09001 movhi r9, #1 <== NOT EXECUTED 3000abbc: ea000043 b 3000acd0 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 3000abc0: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED 3000abc4: e2177001 ands r7, r7, #1 <== NOT EXECUTED 3000abc8: 13e0700a mvnne r7, #10 <== NOT EXECUTED 3000abcc: 1a000042 bne 3000acdc <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000abd0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000abd4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000abd8: e2833001 add r3, r3, #1 <== NOT EXECUTED 3000abdc: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); 3000abe0: ebffe60d bl 3000441c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 3000abe4: e1a01007 mov r1, r7 <== NOT EXECUTED 3000abe8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 3000abec: eb00039d bl 3000ba68 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000abf0: e1a01007 mov r1, r7 <== NOT EXECUTED 3000abf4: 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)) 3000abf8: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000abfc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 3000ac00: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000ac04: ebffe5be bl 30004304 <== NOT EXECUTED 3000ac08: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ac0c: 13e07003 mvnne r7, #3 <== NOT EXECUTED 3000ac10: 1a000038 bne 3000acf8 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000ac14: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) 3000ac18: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000ac1c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000ac20: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) 3000ac24: 1a00002c bne 3000acdc <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 3000ac28: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 3000ac2c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000ac30: 1a000001 bne 3000ac3c <== NOT EXECUTED 3000ac34: e3e0701f mvn r7, #31 <== NOT EXECUTED 3000ac38: ea000027 b 3000acdc <== 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) { 3000ac3c: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED 3000ac40: e594200c ldr r2, [r4, #12] <== NOT EXECUTED 3000ac44: e062300a rsb r3, r2, sl <== NOT EXECUTED 3000ac48: e1530009 cmp r3, r9 <== NOT EXECUTED 3000ac4c: 3affffdb bcc 3000abc0 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000ac50: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3000ac54: e1a0100a mov r1, sl <== NOT EXECUTED 3000ac58: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 3000ac5c: e0667005 rsb r7, r6, r5 <== NOT EXECUTED 3000ac60: e1530007 cmp r3, r7 <== NOT EXECUTED 3000ac64: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000ac68: eb002d70 bl 30016230 <__umodsi3> <== NOT EXECUTED 3000ac6c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3000ac70: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { 3000ac74: e157000a cmp r7, sl <== NOT EXECUTED 3000ac78: e08b1006 add r1, fp, r6 <== NOT EXECUTED 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); 3000ac7c: d0830000 addle r0, r3, r0 <== NOT EXECUTED 3000ac80: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { 3000ac84: da000006 ble 3000aca4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 3000ac88: e1a0200a mov r2, sl <== NOT EXECUTED 3000ac8c: e0830000 add r0, r3, r0 <== NOT EXECUTED 3000ac90: eb00096d bl 3000d24c <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 3000ac94: e08a1006 add r1, sl, r6 <== NOT EXECUTED 3000ac98: e5940000 ldr r0, [r4] <== NOT EXECUTED 3000ac9c: e08b1001 add r1, fp, r1 <== NOT EXECUTED 3000aca0: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 3000aca4: eb000968 bl 3000d24c <== NOT EXECUTED pipe->Length += chunk; 3000aca8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) 3000acac: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 3000acb0: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) 3000acb4: e3520000 cmp r2, #0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 3000acb8: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 3000acbc: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED 3000acc0: 11a0100d movne r1, sp <== NOT EXECUTED 3000acc4: 1b000351 blne 3000ba10 <== NOT EXECUTED written += chunk; 3000acc8: e0866007 add r6, r6, r7 <== NOT EXECUTED 3000accc: e3a09001 mov r9, #1 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 3000acd0: e1560005 cmp r6, r5 <== NOT EXECUTED 3000acd4: 3affffd8 bcc 3000ac3c <== NOT EXECUTED 3000acd8: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 3000acdc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 3000ace0: ebffe5cd bl 3000441c <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 3000ace4: e3770020 cmn r7, #32 <== NOT EXECUTED 3000ace8: 1a000002 bne 3000acf8 <== NOT EXECUTED kill(getpid(), SIGPIPE); 3000acec: eb0001fe bl 3000b4ec <== NOT EXECUTED 3000acf0: e3a0100d mov r1, #13 <== NOT EXECUTED 3000acf4: eb00026b bl 3000b6a8 <== NOT EXECUTED #endif if (written > 0) 3000acf8: e3560000 cmp r6, #0 <== NOT EXECUTED 3000acfc: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } 3000ad00: e1a00006 mov r0, r6 <== NOT EXECUTED 3000ad04: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30017a34 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017a34: e59f30b0 ldr r3, [pc, #176] ; 30017aec ssize_t read( int fd, void *buffer, size_t count ) { 30017a38: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017a3c: e5933000 ldr r3, [r3] ssize_t read( int fd, void *buffer, size_t count ) { 30017a40: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017a44: e1500003 cmp r0, r3 30017a48: 2a000005 bcs 30017a64 iop = rtems_libio_iop( fd ); 30017a4c: e59f309c ldr r3, [pc, #156] ; 30017af0 30017a50: e5934000 ldr r4, [r3] 30017a54: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 30017a58: e5943014 ldr r3, [r4, #20] 30017a5c: e3130c01 tst r3, #256 ; 0x100 30017a60: 1a000002 bne 30017a70 30017a64: ebffd3ea bl 3000ca14 <__errno> 30017a68: e3a03009 mov r3, #9 30017a6c: ea00000f b 30017ab0 rtems_libio_check_buffer( buffer ); 30017a70: e3510000 cmp r1, #0 30017a74: 0a000004 beq 30017a8c rtems_libio_check_count( count ); 30017a78: e3520000 cmp r2, #0 30017a7c: 01a00002 moveq r0, r2 30017a80: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 30017a84: e3130002 tst r3, #2 30017a88: 1a000002 bne 30017a98 30017a8c: ebffd3e0 bl 3000ca14 <__errno> <== NOT EXECUTED 30017a90: e3a03016 mov r3, #22 <== NOT EXECUTED 30017a94: ea000005 b 30017ab0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 30017a98: e594303c ldr r3, [r4, #60] ; 0x3c 30017a9c: e5933008 ldr r3, [r3, #8] 30017aa0: e3530000 cmp r3, #0 30017aa4: 1a000004 bne 30017abc rtems_set_errno_and_return_minus_one( ENOTSUP ); 30017aa8: ebffd3d9 bl 3000ca14 <__errno> <== NOT EXECUTED 30017aac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30017ab0: e5803000 str r3, [r0] 30017ab4: e3e00000 mvn r0, #0 30017ab8: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 30017abc: e1a00004 mov r0, r4 30017ac0: e1a0e00f mov lr, pc 30017ac4: e12fff13 bx r3 if ( rc > 0 ) 30017ac8: e3500000 cmp r0, #0 30017acc: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 30017ad0: e284600c add r6, r4, #12 30017ad4: e8960060 ldm r6, {r5, r6} 30017ad8: e0952000 adds r2, r5, r0 30017adc: e0a63fc0 adc r3, r6, r0, asr #31 30017ae0: e584200c str r2, [r4, #12] 30017ae4: e5843010 str r3, [r4, #16] return rc; } 30017ae8: e8bd8070 pop {r4, r5, r6, pc} 30017aec: 300191f8 .word 0x300191f8 30017af0: 30019b98 .word 0x30019b98 300234b8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 300234b8: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 300234bc: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 300234c0: e24dd018 sub sp, sp, #24 300234c4: e1a05002 mov r5, r2 300234c8: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 300234cc: 1a000002 bne 300234dc rtems_set_errno_and_return_minus_one( EFAULT ); 300234d0: eb00570d bl 3003910c <__errno> <== NOT EXECUTED 300234d4: e3a0300e mov r3, #14 <== NOT EXECUTED 300234d8: ea000028 b 30023580 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 300234dc: eb007195 bl 3003fb38 300234e0: e28d4004 add r4, sp, #4 300234e4: e3a0c000 mov ip, #0 300234e8: e1a01000 mov r1, r0 300234ec: e1a0200c mov r2, ip 300234f0: e1a00007 mov r0, r7 300234f4: e1a03004 mov r3, r4 300234f8: e58dc000 str ip, [sp] 300234fc: ebff8745 bl 30005218 0, &loc, false ); if ( result != 0 ) 30023500: e3500000 cmp r0, #0 30023504: 1a00001e bne 30023584 return -1; if ( !loc.ops->node_type_h ){ 30023508: e59d2010 ldr r2, [sp, #16] 3002350c: e5923010 ldr r3, [r2, #16] 30023510: e3530000 cmp r3, #0 30023514: 0a000012 beq 30023564 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 30023518: e1a00004 mov r0, r4 3002351c: e1a0e00f mov lr, pc 30023520: e12fff13 bx r3 30023524: e3500004 cmp r0, #4 30023528: e59d2010 ldr r2, [sp, #16] 3002352c: 0a000009 beq 30023558 rtems_filesystem_freenode( &loc ); 30023530: e3520000 cmp r2, #0 30023534: 0a000004 beq 3002354c 30023538: e592301c ldr r3, [r2, #28] 3002353c: e3530000 cmp r3, #0 30023540: 11a00004 movne r0, r4 30023544: 11a0e00f movne lr, pc 30023548: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 3002354c: eb0056ee bl 3003910c <__errno> 30023550: e3a03016 mov r3, #22 30023554: ea000009 b 30023580 } if ( !loc.ops->readlink_h ){ 30023558: e592303c ldr r3, [r2, #60] ; 0x3c 3002355c: e3530000 cmp r3, #0 30023560: 1a000009 bne 3002358c rtems_filesystem_freenode( &loc ); 30023564: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30023568: e3530000 cmp r3, #0 <== NOT EXECUTED 3002356c: 11a00004 movne r0, r4 <== NOT EXECUTED 30023570: 11a0e00f movne lr, pc <== NOT EXECUTED 30023574: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30023578: eb0056e3 bl 3003910c <__errno> <== NOT EXECUTED 3002357c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30023580: e5803000 str r3, [r0] 30023584: e3e05000 mvn r5, #0 30023588: ea00000d b 300235c4 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 3002358c: e1a02005 mov r2, r5 30023590: e1a01006 mov r1, r6 30023594: e1a00004 mov r0, r4 30023598: e1a0e00f mov lr, pc 3002359c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 300235a0: e59d3010 ldr r3, [sp, #16] 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 ); 300235a4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 300235a8: e3530000 cmp r3, #0 300235ac: 0a000004 beq 300235c4 300235b0: e593301c ldr r3, [r3, #28] 300235b4: e3530000 cmp r3, #0 300235b8: 11a00004 movne r0, r4 300235bc: 11a0e00f movne lr, pc 300235c0: 112fff13 bxne r3 return result; } 300235c4: e1a00005 mov r0, r5 300235c8: e28dd018 add sp, sp, #24 300235cc: e8bd80f0 pop {r4, r5, r6, r7, pc} 300033d8 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 300033d8: e59f3138 ldr r3, [pc, #312] ; 30003518 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 300033dc: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 300033e0: e5933000 ldr r3, [r3] ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 300033e4: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 300033e8: e1500003 cmp r0, r3 300033ec: 2a000005 bcs 30003408 iop = rtems_libio_iop( fd ); 300033f0: e59f3124 ldr r3, [pc, #292] ; 3000351c 300033f4: e5936000 ldr r6, [r3] 300033f8: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 300033fc: e5963014 ldr r3, [r6, #20] 30003400: e3130c01 tst r3, #256 ; 0x100 30003404: 1a000002 bne 30003414 30003408: eb002ea8 bl 3000eeb0 <__errno> <== NOT EXECUTED 3000340c: e3a03009 mov r3, #9 <== NOT EXECUTED 30003410: ea00001f b 30003494 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 30003414: e3130002 tst r3, #2 30003418: 0a00001b beq 3000348c /* * Argument validation on IO vector */ if ( !iov ) 3000341c: e3510000 cmp r1, #0 30003420: 0a000019 beq 3000348c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 30003424: e3520000 cmp r2, #0 30003428: da000017 ble 3000348c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3000342c: e3520b01 cmp r2, #1024 ; 0x400 30003430: ca000015 bgt 3000348c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 30003434: e596303c ldr r3, [r6, #60] ; 0x3c 30003438: e5933008 ldr r3, [r3, #8] 3000343c: e3530000 cmp r3, #0 30003440: 1a000002 bne 30003450 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30003444: eb002e99 bl 3000eeb0 <__errno> <== NOT EXECUTED 30003448: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000344c: ea000010 b 30003494 <== NOT EXECUTED 30003450: e3a03000 mov r3, #0 30003454: e1a05001 mov r5, r1 30003458: e1a02001 mov r2, r1 3000345c: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 30003460: e5920000 ldr r0, [r2] * 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++ ) { 30003464: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 30003468: e3500000 cmp r0, #0 3000346c: 0a000006 beq 3000348c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 30003470: e592c004 ldr ip, [r2, #4] * 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++ ) { 30003474: e2822008 add r2, r2, #8 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 30003478: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 3000347c: e081000c add r0, r1, ip ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 30003480: 0a000001 beq 3000348c rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 30003484: e1500001 cmp r0, r1 30003488: aa000003 bge 3000349c rtems_set_errno_and_return_minus_one( EINVAL ); 3000348c: eb002e87 bl 3000eeb0 <__errno> 30003490: e3a03016 mov r3, #22 30003494: e5803000 str r3, [r0] 30003498: ea00000c b 300034d0 * 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++ ) { 3000349c: e1530008 cmp r3, r8 300034a0: b1a01000 movlt r1, r0 300034a4: baffffed blt 30003460 300034a8: e3a07000 mov r7, #0 300034ac: e1a04007 mov r4, r7 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 300034b0: e8950006 ldm r5, {r1, r2} 300034b4: e596303c ldr r3, [r6, #60] ; 0x3c 300034b8: e1a00006 mov r0, r6 300034bc: e1a0e00f mov lr, pc 300034c0: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 300034c4: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 300034c8: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 300034cc: aa000001 bge 300034d8 300034d0: e3e04000 mvn r4, #0 300034d4: ea00000d b 30003510 return -1; if ( bytes > 0 ) { 300034d8: 0a000006 beq 300034f8 iop->offset += bytes; 300034dc: e286c00c add ip, r6, #12 <== NOT EXECUTED 300034e0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 300034e4: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 300034e8: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 300034ec: e586200c str r2, [r6, #12] <== NOT EXECUTED 300034f0: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 300034f4: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 300034f8: e5953004 ldr r3, [r5, #4] } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 300034fc: e2855008 add r5, r5, #8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) 30003500: e1500003 cmp r0, r3 30003504: 1a000001 bne 30003510 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 30003508: e1570008 cmp r7, r8 <== NOT EXECUTED 3000350c: baffffe7 blt 300034b0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 30003510: e1a00004 mov r0, r4 30003514: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 30003518: 3001db64 .word 0x3001db64 3000351c: 3001ecd8 .word 0x3001ecd8 30017b4c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 30017b4c: e59f310c ldr r3, [pc, #268] ; 30017c60 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30017b50: e59fc10c ldr ip, [pc, #268] ; 30017c64 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 30017b54: e5932010 ldr r2, [r3, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30017b58: e59cc000 ldr ip, [ip] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 30017b5c: e2822001 add r2, r2, #1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30017b60: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 30017b64: e92d40f1 push {r0, r4, r5, r6, r7, lr} 30017b68: e5832010 str r2, [r3, #16] 30017b6c: e1a04000 mov r4, r0 30017b70: e1a05001 mov r5, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 30017b74: 1a000007 bne 30017b98 if (_Thread_Dispatch_disable_level > 0) 30017b78: e59f30e8 ldr r3, [pc, #232] ; 30017c68 30017b7c: e5933000 ldr r3, [r3] 30017b80: e3530000 cmp r3, #0 30017b84: 1a000032 bne 30017c54 return (void *) 0; if (_ISR_Nest_level > 0) 30017b88: e59f30dc ldr r3, [pc, #220] ; 30017c6c 30017b8c: e5933000 ldr r3, [r3] 30017b90: e3530000 cmp r3, #0 30017b94: 1a00002e bne 30017c54 } /* * Continue with realloc(). */ if ( !ptr ) 30017b98: e3540000 cmp r4, #0 30017b9c: 1a000003 bne 30017bb0 return malloc( size ); 30017ba0: e1a00005 mov r0, r5 30017ba4: ebffc465 bl 30008d40 30017ba8: e1a04000 mov r4, r0 30017bac: ea000029 b 30017c58 if ( !size ) { 30017bb0: e3550000 cmp r5, #0 30017bb4: 1a000003 bne 30017bc8 free( ptr ); 30017bb8: e1a00004 mov r0, r4 <== NOT EXECUTED 30017bbc: ebffc315 bl 30008818 <== NOT EXECUTED 30017bc0: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 30017bc4: ea000023 b 30017c58 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 30017bc8: e59f60a0 ldr r6, [pc, #160] ; 30017c70 30017bcc: e1a01004 mov r1, r4 30017bd0: e5960000 ldr r0, [r6] 30017bd4: e1a0200d mov r2, sp 30017bd8: eb000055 bl 30017d34 <_Protected_heap_Get_block_size> 30017bdc: e2507000 subs r7, r0, #0 30017be0: 1a000004 bne 30017bf8 errno = EINVAL; 30017be4: ebffd38a bl 3000ca14 <__errno> 30017be8: e3a03016 mov r3, #22 30017bec: e5803000 str r3, [r0] 30017bf0: e1a04007 mov r4, r7 return (void *) 0; 30017bf4: ea000017 b 30017c58 #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 ) ) { 30017bf8: e5960000 ldr r0, [r6] 30017bfc: e1a01004 mov r1, r4 30017c00: e1a02005 mov r2, r5 30017c04: eb00005b bl 30017d78 <_Protected_heap_Resize_block> 30017c08: e3500000 cmp r0, #0 30017c0c: 1a000011 bne 30017c58 * 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 ); 30017c10: e1a00005 mov r0, r5 30017c14: ebffc449 bl 30008d40 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 30017c18: e59f3040 ldr r3, [pc, #64] ; 30017c60 if ( !new_area ) { 30017c1c: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 30017c20: e5932004 ldr r2, [r3, #4] 30017c24: e2422001 sub r2, r2, #1 30017c28: e5832004 str r2, [r3, #4] if ( !new_area ) { 30017c2c: 0a000008 beq 30017c54 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 30017c30: e59d2000 ldr r2, [sp] 30017c34: e1a01004 mov r1, r4 30017c38: e1550002 cmp r5, r2 30017c3c: 31a02005 movcc r2, r5 30017c40: ebffd581 bl 3000d24c free( ptr ); 30017c44: e1a00004 mov r0, r4 30017c48: ebffc2f2 bl 30008818 30017c4c: e1a04006 mov r4, r6 return new_area; 30017c50: ea000000 b 30017c58 30017c54: e3a04000 mov r4, #0 } 30017c58: e1a00004 mov r0, r4 30017c5c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 30017c60: 30019ba4 .word 0x30019ba4 30017c64: 30019eb0 .word 0x30019eb0 30017c68: 30019d0c .word 0x30019d0c 30017c6c: 30019d9c .word 0x30019d9c 30017c70: 30019204 .word 0x30019204 30006624 : #include int rmdir( const char *pathname ) { 30006624: e92d4070 push {r4, r5, r6, lr} 30006628: e24dd02c sub sp, sp, #44 ; 0x2c 3000662c: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 30006630: ebfffab0 bl 300050f8 if ( parentpathlen == 0 ) 30006634: e2505000 subs r5, r0, #0 30006638: 1a000015 bne 30006694 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 3000663c: e5d63000 ldrb r3, [r6] 30006640: e353002f cmp r3, #47 ; 0x2f 30006644: 1353005c cmpne r3, #92 ; 0x5c 30006648: 0a000001 beq 30006654 3000664c: e3530000 cmp r3, #0 <== NOT EXECUTED 30006650: 1a000005 bne 3000666c <== NOT EXECUTED 30006654: e59f324c ldr r3, [pc, #588] ; 300068a8 30006658: e28dc018 add ip, sp, #24 3000665c: e593e000 ldr lr, [r3] 30006660: e3a04000 mov r4, #0 30006664: e28ee018 add lr, lr, #24 30006668: ea000004 b 30006680 3000666c: e59f3234 ldr r3, [pc, #564] ; 300068a8 <== NOT EXECUTED 30006670: e28dc018 add ip, sp, #24 <== NOT EXECUTED 30006674: e593e000 ldr lr, [r3] <== NOT EXECUTED 30006678: e1a04005 mov r4, r5 <== NOT EXECUTED 3000667c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 30006680: e8be000f ldm lr!, {r0, r1, r2, r3} 30006684: e8ac000f stmia ip!, {r0, r1, r2, r3} 30006688: e59e3000 ldr r3, [lr] 3000668c: e58c3000 str r3, [ip] 30006690: ea000009 b 300066bc else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 30006694: e3a0c000 mov ip, #0 30006698: e1a00006 mov r0, r6 3000669c: e1a01005 mov r1, r5 300066a0: e3a02002 mov r2, #2 300066a4: e28d3018 add r3, sp, #24 300066a8: e58dc000 str ip, [sp] 300066ac: ebfffad9 bl 30005218 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 300066b0: e3500000 cmp r0, #0 300066b4: 1a000077 bne 30006898 300066b8: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 300066bc: e28dc004 add ip, sp, #4 300066c0: e28de018 add lr, sp, #24 300066c4: e8be000f ldm lr!, {r0, r1, r2, r3} 300066c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300066cc: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 300066d0: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 300066d4: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 300066d8: e1a00005 mov r0, r5 300066dc: eb00e515 bl 3003fb38 300066e0: e1a01000 mov r1, r0 300066e4: e1a00005 mov r0, r5 300066e8: ebfffa76 bl 300050c8 300066ec: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 300066f0: e1a00006 mov r0, r6 300066f4: eb00e50f bl 3003fb38 300066f8: e28d5004 add r5, sp, #4 300066fc: e3a0c000 mov ip, #0 30006700: e1a01000 mov r1, r0 30006704: e1a0200c mov r2, ip 30006708: e1a00006 mov r0, r6 3000670c: e1a03005 mov r3, r5 30006710: e58dc000 str ip, [sp] 30006714: ebfffa87 bl 30005138 0, &loc, false ); if ( result != 0 ) { 30006718: e3500000 cmp r0, #0 3000671c: 0a00000b beq 30006750 if ( free_parentloc ) 30006720: e3540000 cmp r4, #0 30006724: 0a00005b beq 30006898 rtems_filesystem_freenode( &parentloc ); 30006728: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3000672c: e3530000 cmp r3, #0 <== NOT EXECUTED 30006730: 0a000058 beq 30006898 <== NOT EXECUTED 30006734: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006738: e3530000 cmp r3, #0 <== NOT EXECUTED 3000673c: 0a000055 beq 30006898 <== NOT EXECUTED 30006740: e28d0018 add r0, sp, #24 <== NOT EXECUTED 30006744: e1a0e00f mov lr, pc <== NOT EXECUTED 30006748: e12fff13 bx r3 <== NOT EXECUTED 3000674c: ea000051 b 30006898 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 30006750: e59d2010 ldr r2, [sp, #16] 30006754: e5923010 ldr r3, [r2, #16] 30006758: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 3000675c: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 30006760: 0a000021 beq 300067ec 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 ){ 30006764: e1a00005 mov r0, r5 30006768: e1a0e00f mov lr, pc 3000676c: e12fff13 bx r3 30006770: e3500001 cmp r0, #1 30006774: 0a000014 beq 300067cc rtems_filesystem_freenode( &loc ); 30006778: e59d3010 ldr r3, [sp, #16] 3000677c: e3530000 cmp r3, #0 30006780: 0a000004 beq 30006798 30006784: e593301c ldr r3, [r3, #28] 30006788: e3530000 cmp r3, #0 3000678c: 11a00005 movne r0, r5 30006790: 11a0e00f movne lr, pc 30006794: 112fff13 bxne r3 if ( free_parentloc ) 30006798: e3540000 cmp r4, #0 3000679c: 0a000007 beq 300067c0 rtems_filesystem_freenode( &parentloc ); 300067a0: e59d3024 ldr r3, [sp, #36] ; 0x24 300067a4: e3530000 cmp r3, #0 300067a8: 0a000004 beq 300067c0 300067ac: e593301c ldr r3, [r3, #28] 300067b0: e3530000 cmp r3, #0 300067b4: 128d0018 addne r0, sp, #24 300067b8: 11a0e00f movne lr, pc 300067bc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 300067c0: eb00ca51 bl 3003910c <__errno> 300067c4: e3a03014 mov r3, #20 300067c8: ea000017 b 3000682c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 300067cc: e59d300c ldr r3, [sp, #12] 300067d0: e5933034 ldr r3, [r3, #52] ; 0x34 300067d4: e3530000 cmp r3, #0 300067d8: 1a000015 bne 30006834 rtems_filesystem_freenode( &loc ); 300067dc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 300067e0: e3530000 cmp r3, #0 <== NOT EXECUTED 300067e4: 0a000004 beq 300067fc <== NOT EXECUTED 300067e8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 300067ec: e3530000 cmp r3, #0 <== NOT EXECUTED 300067f0: 11a00005 movne r0, r5 <== NOT EXECUTED 300067f4: 11a0e00f movne lr, pc <== NOT EXECUTED 300067f8: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 300067fc: e3540000 cmp r4, #0 <== NOT EXECUTED 30006800: 0a000007 beq 30006824 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 30006804: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 30006808: e3530000 cmp r3, #0 <== NOT EXECUTED 3000680c: 0a000004 beq 30006824 <== NOT EXECUTED 30006810: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006814: e3530000 cmp r3, #0 <== NOT EXECUTED 30006818: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 3000681c: 11a0e00f movne lr, pc <== NOT EXECUTED 30006820: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30006824: eb00ca38 bl 3003910c <__errno> <== NOT EXECUTED 30006828: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000682c: e5803000 str r3, [r0] 30006830: ea000018 b 30006898 } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 30006834: e28d0018 add r0, sp, #24 30006838: e1a01005 mov r1, r5 3000683c: e1a0e00f mov lr, pc 30006840: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30006844: e59d3010 ldr r3, [sp, #16] if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 30006848: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 3000684c: e3530000 cmp r3, #0 30006850: 0a000004 beq 30006868 30006854: e593301c ldr r3, [r3, #28] 30006858: e3530000 cmp r3, #0 3000685c: 11a00005 movne r0, r5 30006860: 11a0e00f movne lr, pc 30006864: 112fff13 bxne r3 if ( free_parentloc ) 30006868: e3540000 cmp r4, #0 3000686c: 0a00000a beq 3000689c rtems_filesystem_freenode( &parentloc ); 30006870: e59d3024 ldr r3, [sp, #36] ; 0x24 30006874: e3530000 cmp r3, #0 30006878: 0a000007 beq 3000689c 3000687c: e593301c ldr r3, [r3, #28] 30006880: e3530000 cmp r3, #0 30006884: 0a000004 beq 3000689c 30006888: e28d0018 add r0, sp, #24 3000688c: e1a0e00f mov lr, pc 30006890: e12fff13 bx r3 30006894: ea000000 b 3000689c 30006898: e3e06000 mvn r6, #0 return result; } 3000689c: e1a00006 mov r0, r6 300068a0: e28dd02c add sp, sp, #44 ; 0x2c 300068a4: e8bd8070 pop {r4, r5, r6, pc} 300068a8: 3005ce08 .word 0x3005ce08 300122cc : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 300122cc: e59f0000 ldr r0, [pc, #0] ; 300122d4 <== NOT EXECUTED 300122d0: e12fff1e bx lr <== NOT EXECUTED 300122d4: 300241ec .word 0x300241ec 3000ec0c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000ec0c: e92d4010 push {r4, lr} 3000ec10: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 3000ec14: eb000006 bl 3000ec34 if (nap) 3000ec18: e3500000 cmp r0, #0 3000ec1c: 0a000001 beq 3000ec28 return nap->name; return rtems_assoc_name_bad(local_value); } 3000ec20: e5900000 ldr r0, [r0] 3000ec24: 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); 3000ec28: e1a00004 mov r0, r4 <== NOT EXECUTED } 3000ec2c: 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); 3000ec30: ea000da5 b 300122cc <== NOT EXECUTED 3000c1ac : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 3000c1ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 3000c1b0: eb0001fa bl 3000c9a0 <== NOT EXECUTED if (nap) 3000c1b4: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; 3000c1b8: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } 3000c1bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30001508 : size_t length ) { const char *p; if ( !name ) 30001508: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 3000150c: e92d4070 push {r4, r5, r6, lr} 30001510: e1a04001 mov r4, r1 30001514: e1a05002 mov r5, r2 const char *p; if ( !name ) 30001518: 0a00001c beq 30001590 return NULL; if ( !value ) 3000151c: e3510000 cmp r1, #0 30001520: 0a00001b beq 30001594 return NULL; if ( !length ) 30001524: e3520000 cmp r2, #0 30001528: 0a000018 beq 30001590 return NULL; value[0] = '\0'; 3000152c: e3a06000 mov r6, #0 30001530: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 30001534: eb000018 bl 3000159c if ( !p ) 30001538: e3500000 cmp r0, #0 3000153c: 0a000013 beq 30001590 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 3000155c: e3160001 tst r6, #1 30001560: 1a000001 bne 3000156c 30001564: e3520020 cmp r2, #32 30001568: 0a000009 beq 30001594 break; value[i++] = *p++; 3000156c: e7c42003 strb r2, [r4, r3] 30001570: e2833001 add r3, r3, #1 value[i] = '\0'; 30001574: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 30001584: e1530005 cmp r3, r5 30001588: 3afffff0 bcc 30001550 3000158c: ea000000 b 30001594 <== NOT EXECUTED 30001590: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 30001594: e1a00004 mov r0, r4 30001598: e8bd8070 pop {r4, r5, r6, pc} 300015c4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 300015c4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 300015c8: e1a05000 mov r5, r0 <== NOT EXECUTED 300015cc: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 300015d0: ebffffcc bl 30001508 <== NOT EXECUTED if ( !p ) 300015d4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 300015d8: 0a000018 beq 30001640 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 300015dc: e1a00005 mov r0, r5 <== NOT EXECUTED 300015e0: eb003244 bl 3000def8 <== NOT EXECUTED if ( *rhs != '=' ) 300015e4: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 300015e8: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 300015ec: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED 300015f0: 1a000012 bne 30001640 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 300015f4: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 300015f8: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 300015fc: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 30001600: 02866001 addeq r6, r6, #1 <== NOT EXECUTED 30001604: e1a02004 mov r2, r4 <== NOT EXECUTED 30001608: e3a0c000 mov ip, #0 <== NOT EXECUTED 3000160c: ea000000 b 30001614 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 30001610: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 30001614: e7d6100c ldrb r1, [r6, ip] <== NOT EXECUTED *d++ = *rhs++; 30001618: e1a03002 mov r3, r2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 3000161c: e3510000 cmp r1, #0 <== NOT EXECUTED 30001620: e28cc001 add ip, ip, #1 <== NOT EXECUTED 30001624: e2822001 add r2, r2, #1 <== NOT EXECUTED 30001628: 1afffff8 bne 30001610 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 3000162c: e5532001 ldrb r2, [r3, #-1] <== NOT EXECUTED 30001630: e3520022 cmp r2, #34 ; 0x22 <== NOT EXECUTED 30001634: 02433001 subeq r3, r3, #1 <== NOT EXECUTED d--; *d = '\0'; 30001638: e5c31000 strb r1, [r3] <== NOT EXECUTED return value; 3000163c: ea000000 b 30001644 <== NOT EXECUTED 30001640: e3a04000 mov r4, #0 <== NOT EXECUTED } 30001644: e1a00004 mov r0, r4 <== NOT EXECUTED 30001648: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30001e94 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001e94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 30001e98: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001e9c: e24dd040 sub sp, sp, #64 ; 0x40 30001ea0: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 30001ea4: 0a000059 beq 30002010 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 30001ea8: e28d4030 add r4, sp, #48 ; 0x30 30001eac: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30001eb0: e28d5028 add r5, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 30001eb4: eb00129a bl 30006924 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30001eb8: e1a01004 mov r1, r4 30001ebc: e1a02005 mov r2, r5 30001ec0: e59f0150 ldr r0, [pc, #336] ; 30002018 30001ec4: eb001b8a bl 30008cf4 <_Timespec_Subtract> } } } #endif (*print)( 30001ec8: e1a00008 mov r0, r8 30001ecc: e59f1148 ldr r1, [pc, #328] ; 3000201c 30001ed0: e1a0e00f mov lr, pc 30001ed4: e12fff1a bx sl 30001ed8: e59f4140 ldr r4, [pc, #320] ; 30002020 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30001edc: e59fb140 ldr fp, [pc, #320] ; 30002024 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 30001ee0: e5943004 ldr r3, [r4, #4] 30001ee4: e3530000 cmp r3, #0 30001ee8: 0a00003b beq 30001fdc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 30001eec: e5936004 ldr r6, [r3, #4] if ( information ) { 30001ef0: e3560000 cmp r6, #0 30001ef4: 13a07001 movne r7, #1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 30001ef8: 128d9018 addne r9, sp, #24 30001efc: 11a05004 movne r5, r4 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 30001f00: 1a00002f bne 30001fc4 30001f04: ea000034 b 30001fdc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30001f08: e596301c ldr r3, [r6, #28] 30001f0c: e7934107 ldr r4, [r3, r7, lsl #2] api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001f10: e2877001 add r7, r7, #1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 30001f14: e3540000 cmp r4, #0 30001f18: 0a000029 beq 30001fc4 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30001f1c: e5940008 ldr r0, [r4, #8] 30001f20: eb000dfb bl 30005714 (*print)( 30001f24: e28d3008 add r3, sp, #8 30001f28: e5942008 ldr r2, [r4, #8] 30001f2c: e1a00008 mov r0, r8 30001f30: e59f10f0 ldr r1, [pc, #240] ; 30002028 30001f34: e1a0e00f mov lr, pc 30001f38: e12fff1a bx sl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 30001f3c: e2843084 add r3, r4, #132 ; 0x84 30001f40: e893000c ldm r3, {r2, r3} 30001f44: e58d2020 str r2, [sp, #32] 30001f48: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30001f4c: e59b2000 ldr r2, [fp] 30001f50: e5943008 ldr r3, [r4, #8] 30001f54: e5922008 ldr r2, [r2, #8] 30001f58: e1520003 cmp r2, r3 30001f5c: 1a000006 bne 30001f7c Timestamp_Control used; _Timestamp_Subtract( 30001f60: e59f00c4 ldr r0, [pc, #196] ; 3000202c 30001f64: e28d1030 add r1, sp, #48 ; 0x30 30001f68: e1a02009 mov r2, r9 30001f6c: eb001b60 bl 30008cf4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 30001f70: e28d0020 add r0, sp, #32 30001f74: e1a01009 mov r1, r9 30001f78: eb001b25 bl 30008c14 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 30001f7c: e28d203c add r2, sp, #60 ; 0x3c 30001f80: e28d3038 add r3, sp, #56 ; 0x38 30001f84: e28d0020 add r0, sp, #32 30001f88: e28d1028 add r1, sp, #40 ; 0x28 30001f8c: eb001b34 bl 30008c64 <_Timespec_Divide> /* * Print the information */ (*print)( context, 30001f90: e3a01ffa mov r1, #1000 ; 0x3e8 30001f94: e59d0024 ldr r0, [sp, #36] ; 0x24 30001f98: eb006469 bl 3001b144 <__aeabi_uidiv> 30001f9c: e59d203c ldr r2, [sp, #60] ; 0x3c 30001fa0: e1a03000 mov r3, r0 30001fa4: e58d2000 str r2, [sp] 30001fa8: e59d2038 ldr r2, [sp, #56] ; 0x38 30001fac: e1a00008 mov r0, r8 30001fb0: e58d2004 str r2, [sp, #4] 30001fb4: e59f1074 ldr r1, [pc, #116] ; 30002030 30001fb8: e59d2020 ldr r2, [sp, #32] 30001fbc: e1a0e00f mov lr, pc 30001fc0: e12fff1a bx sl api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001fc4: e1d631b0 ldrh r3, [r6, #16] the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30001fc8: e3a0100d mov r1, #13 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001fcc: e1570003 cmp r7, r3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30001fd0: e28d2008 add r2, sp, #8 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001fd4: 9affffcb bls 30001f08 30001fd8: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 30001fdc: e59f3050 ldr r3, [pc, #80] ; 30002034 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30001fe0: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 30001fe4: e1540003 cmp r4, r3 30001fe8: 1affffbc bne 30001ee0 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 30001fec: e3a01ffa mov r1, #1000 ; 0x3e8 30001ff0: e59d002c ldr r0, [sp, #44] ; 0x2c 30001ff4: eb006452 bl 3001b144 <__aeabi_uidiv> 30001ff8: e59f1038 ldr r1, [pc, #56] ; 30002038 30001ffc: e1a03000 mov r3, r0 30002000: e59d2028 ldr r2, [sp, #40] ; 0x28 30002004: e1a00008 mov r0, r8 30002008: e1a0e00f mov lr, pc 3000200c: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 30002010: e28dd040 add sp, sp, #64 ; 0x40 30002014: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30002018: 3002816c .word 0x3002816c 3000201c: 3001e292 .word 0x3001e292 30002020: 30027be8 .word 0x30027be8 30002024: 30027ce0 .word 0x30027ce0 30002028: 3001e404 .word 0x3001e404 3000202c: 30027ce8 .word 0x30027ce8 30002030: 3001e417 .word 0x3001e417 30002034: 30027bf8 .word 0x30027bf8 30002038: 3001e42f .word 0x3001e42f 3000c180 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 3000c180: e92d4010 push {r4, lr} <== NOT EXECUTED 3000c184: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 3000c188: e59f0018 ldr r0, [pc, #24] ; 3000c1a8 <== NOT EXECUTED 3000c18c: eb000006 bl 3000c1ac <== NOT EXECUTED 3000c190: e2504000 subs r4, r0, #0 <== NOT EXECUTED 3000c194: 0a000001 beq 3000c1a0 <== NOT EXECUTED { errno = rc; 3000c198: eb00021d bl 3000ca14 <__errno> <== NOT EXECUTED 3000c19c: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } 3000c1a0: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000c1a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000c1a8: 3001887c .word 0x3001887c 30006000 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 30006000: e92d000e push {r1, r2, r3} <== NOT EXECUTED 30006004: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 30006008: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 3000600c: e1a02003 mov r2, r3 <== NOT EXECUTED 30006010: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 30006014: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 30006018: ebffff84 bl 30005e30 <== NOT EXECUTED va_end(arglist); return chars_written; } 3000601c: e8bd4008 pop {r3, lr} <== NOT EXECUTED 30006020: e28dd00c add sp, sp, #12 <== NOT EXECUTED 30006024: e12fff1e bx lr <== NOT EXECUTED 30001248 : } int rtems_filesystem_dirname( const char *pathname ) { 30001248: e92d4010 push {r4, lr} 3000124c: e1a04000 mov r4, r0 int len = strlen( pathname ); 30001250: eb0031e0 bl 3000d9d8 30001254: e0844000 add r4, r4, r0 while ( len ) { 30001258: ea000007 b 3000127c len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 3000125c: e5543001 ldrb r3, [r4, #-1] ) { int len = strlen( pathname ); while ( len ) { len--; 30001260: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 30001264: e353002f cmp r3, #47 ; 0x2f 30001268: 1353005c cmpne r3, #92 ; 0x5c 3000126c: 08bd8010 popeq {r4, pc} 30001270: e3530000 cmp r3, #0 30001274: e2444001 sub r4, r4, #1 30001278: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 3000127c: e3500000 cmp r0, #0 30001280: 1afffff5 bne 3000125c if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 30001284: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30001368 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001368: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 3000136c: e2506000 subs r6, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001370: e1a08001 mov r8, r1 30001374: e1a07002 mov r7, r2 30001378: e1a0c003 mov ip, r3 3000137c: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 30001380: 1a000002 bne 30001390 rtems_set_errno_and_return_minus_one( EFAULT ); 30001384: eb002da2 bl 3000ca14 <__errno> 30001388: e3a0300e mov r3, #14 3000138c: ea000003 b 300013a0 if ( !pathloc ) 30001390: e3530000 cmp r3, #0 30001394: 1a000004 bne 300013ac rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 30001398: eb002d9d bl 3000ca14 <__errno> <== NOT EXECUTED 3000139c: e3a03005 mov r3, #5 <== NOT EXECUTED 300013a0: e5803000 str r3, [r0] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 300013a4: e3e00000 mvn r0, #0 300013a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 300013ac: e5d63000 ldrb r3, [r6] 300013b0: e353002f cmp r3, #47 ; 0x2f 300013b4: 1353005c cmpne r3, #92 ; 0x5c 300013b8: 13a05000 movne r5, #0 300013bc: 03a05001 moveq r5, #1 300013c0: 0a000001 beq 300013cc 300013c4: e3530000 cmp r3, #0 300013c8: 1a000004 bne 300013e0 300013cc: e59f3048 ldr r3, [pc, #72] ; 3000141c 300013d0: e3a05001 mov r5, #1 300013d4: e5934000 ldr r4, [r3] 300013d8: e2844018 add r4, r4, #24 300013dc: ea000002 b 300013ec 300013e0: e59f3034 ldr r3, [pc, #52] ; 3000141c 300013e4: e5934000 ldr r4, [r3] 300013e8: e2844004 add r4, r4, #4 300013ec: e1a0900c mov r9, ip 300013f0: e8b4000f ldm r4!, {r0, r1, r2, r3} 300013f4: e8a9000f stmia r9!, {r0, r1, r2, r3} 300013f8: e5942000 ldr r2, [r4] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 300013fc: e0651008 rsb r1, r5, r8 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 30001400: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 30001404: e0860005 add r0, r6, r5 30001408: e1a02007 mov r2, r7 3000140c: e1a0300c mov r3, ip 30001410: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 30001414: 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], 30001418: eaffff9a b 30001288 3000141c: 300193f0 .word 0x300193f0 30001288 : /* * Verify Input parameters. */ if ( !pathname ) 30001288: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 3000128c: e92d4030 push {r4, r5, lr} 30001290: e1a05002 mov r5, r2 30001294: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 30001298: 1a000002 bne 300012a8 rtems_set_errno_and_return_minus_one( EFAULT ); 3000129c: eb002ddc bl 3000ca14 <__errno> <== NOT EXECUTED 300012a0: e3a0300e mov r3, #14 <== NOT EXECUTED 300012a4: ea000027 b 30001348 <== NOT EXECUTED if ( !pathloc ) 300012a8: e3530000 cmp r3, #0 300012ac: 1a000002 bne 300012bc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 300012b0: eb002dd7 bl 3000ca14 <__errno> <== NOT EXECUTED 300012b4: e3a03005 mov r3, #5 <== NOT EXECUTED 300012b8: ea000022 b 30001348 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 300012bc: e593c00c ldr ip, [r3, #12] 300012c0: e59cc000 ldr ip, [ip] 300012c4: e35c0000 cmp ip, #0 300012c8: 0a00001c beq 30001340 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 300012cc: e1a0e00f mov lr, pc 300012d0: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 300012d4: e59d200c ldr r2, [sp, #12] 300012d8: e2703001 rsbs r3, r0, #1 300012dc: 33a03000 movcc r3, #0 300012e0: e3520000 cmp r2, #0 300012e4: 03a03000 moveq r3, #0 300012e8: e3530000 cmp r3, #0 300012ec: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 300012f0: e594200c ldr r2, [r4, #12] 300012f4: e5923010 ldr r3, [r2, #16] 300012f8: e3530000 cmp r3, #0 300012fc: 0a00000a beq 3000132c rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 30001300: e1a00004 mov r0, r4 30001304: e1a0e00f mov lr, pc 30001308: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 3000130c: e2400003 sub r0, r0, #3 30001310: e3500001 cmp r0, #1 30001314: 83a00000 movhi r0, #0 30001318: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 3000131c: e594200c ldr r2, [r4, #12] 30001320: e5923034 ldr r3, [r2, #52] ; 0x34 30001324: e3530000 cmp r3, #0 30001328: 1a000009 bne 30001354 rtems_filesystem_freenode( pathloc ); 3000132c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30001330: e3530000 cmp r3, #0 <== NOT EXECUTED 30001334: 11a00004 movne r0, r4 <== NOT EXECUTED 30001338: 11a0e00f movne lr, pc <== NOT EXECUTED 3000133c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001340: eb002db3 bl 3000ca14 <__errno> <== NOT EXECUTED 30001344: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001348: e5803000 str r3, [r0] <== NOT EXECUTED 3000134c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001350: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED * 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 ); 30001354: e1a00004 mov r0, r4 30001358: e1a01005 mov r1, r5 3000135c: e1a0e00f mov lr, pc 30001360: e12fff13 bx r3 } } return result; } 30001364: e8bd8030 pop {r4, r5, pc} 300010e8 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 300010e8: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 300010ec: e59f6100 ldr r6, [pc, #256] ; 300011f4 300010f0: e3a02012 mov r2, #18 300010f4: e5963000 ldr r3, [r6] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 300010f8: e24dd01c sub sp, sp, #28 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 300010fc: e583202c str r2, [r3, #44] ; 0x2c init_fs_mount_table(); 30001100: eb000184 bl 30001718 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001104: e59f30ec ldr r3, [pc, #236] ; 300011f8 30001108: e5933000 ldr r3, [r3] 3000110c: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 30001110: 059f00e4 ldreq r0, [pc, #228] ; 300011fc /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001114: 0a000009 beq 30001140 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30001118: e59f30e0 ldr r3, [pc, #224] ; 30001200 status = mount( 3000111c: e28d0018 add r0, sp, #24 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30001120: e5932000 ldr r2, [r3] status = mount( 30001124: e592300c ldr r3, [r2, #12] 30001128: e58d3000 str r3, [sp] 3000112c: e892000e ldm r2, {r1, r2, r3} 30001130: eb00017f bl 30001734 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 30001134: e3700001 cmn r0, #1 30001138: 1a000001 bne 30001144 rtems_fatal_error_occurred( 0xABCD0002 ); 3000113c: e59f00c0 ldr r0, [pc, #192] ; 30001204 <== NOT EXECUTED 30001140: eb000e03 bl 30004954 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 30001144: 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; 30001148: e59de018 ldr lr, [sp, #24] 3000114c: e287c018 add ip, r7, #24 30001150: e28ee01c add lr, lr, #28 30001154: e8be000f ldm lr!, {r0, r1, r2, r3} 30001158: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000115c: 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; 30001160: 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); 30001164: 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; 30001168: 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; 3000116c: 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); 30001170: e1a03004 mov r3, r4 30001174: e3a01001 mov r1, #1 30001178: e1a02005 mov r2, r5 3000117c: e59f0084 ldr r0, [pc, #132] ; 30001208 30001180: e58d5000 str r5, [sp] 30001184: eb000077 bl 30001368 rtems_filesystem_root = loc; 30001188: e596c000 ldr ip, [r6] 3000118c: e1a07004 mov r7, r4 30001190: e28cc018 add ip, ip, #24 30001194: e8b7000f ldm r7!, {r0, r1, r2, r3} 30001198: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000119c: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 300011a0: 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; 300011a4: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 300011a8: e3a01001 mov r1, #1 300011ac: e1a03004 mov r3, r4 300011b0: e59f0050 ldr r0, [pc, #80] ; 30001208 300011b4: e58d5000 str r5, [sp] 300011b8: eb00006a bl 30001368 rtems_filesystem_current = loc; 300011bc: e8b4000f ldm r4!, {r0, r1, r2, r3} 300011c0: e596c000 ldr ip, [r6] 300011c4: e28cc004 add ip, ip, #4 300011c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300011cc: 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); 300011d0: e59f0034 ldr r0, [pc, #52] ; 3000120c /* 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; 300011d4: 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); 300011d8: e59f1030 ldr r1, [pc, #48] ; 30001210 300011dc: eb0000f8 bl 300015c4 if ( status != 0 ) 300011e0: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 300011e4: 159f0028 ldrne r0, [pc, #40] ; 30001214 * 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); if ( status != 0 ) 300011e8: 1affffd4 bne 30001140 * 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. */ } 300011ec: e28dd01c add sp, sp, #28 300011f0: e8bd80f0 pop {r4, r5, r6, r7, pc} 300011f4: 300193f0 .word 0x300193f0 300011f8: 30018300 .word 0x30018300 300011fc: abcd0001 .word 0xabcd0001 30001200: 30019200 .word 0x30019200 30001204: abcd0002 .word 0xabcd0002 30001208: 30018d25 .word 0x30018d25 3000120c: 30018d27 .word 0x30018d27 30001210: 000001ff .word 0x000001ff 30001214: abcd0003 .word 0xabcd0003 300086f4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 300086f4: e5903000 ldr r3, [r0] <== NOT EXECUTED 300086f8: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 300086fc: e1530000 cmp r3, r0 <== NOT EXECUTED 30008700: 13a00000 movne r0, #0 <== NOT EXECUTED 30008704: 03a00001 moveq r0, #1 <== NOT EXECUTED 30008708: e12fff1e bx lr <== NOT EXECUTED 30000fa8 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 30000fa8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 30000fac: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 30000fb0: e1a05001 mov r5, r1 <== NOT EXECUTED 30000fb4: e1a06000 mov r6, 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 ); 30000fb8: eb003286 bl 3000d9d8 <== NOT EXECUTED 30000fbc: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30000fc0: e1a01000 mov r1, r0 <== NOT EXECUTED 30000fc4: e3a02000 mov r2, #0 <== NOT EXECUTED 30000fc8: e1a03004 mov r3, r4 <== NOT EXECUTED 30000fcc: e3a0c001 mov ip, #1 <== NOT EXECUTED 30000fd0: e1a00006 mov r0, r6 <== NOT EXECUTED 30000fd4: e58dc000 str ip, [sp] <== NOT EXECUTED 30000fd8: eb0000e2 bl 30001368 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 30000fdc: e59d2010 ldr r2, [sp, #16] <== 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 ); 30000fe0: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 30000fe4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 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 ); the_jnode = loc.node_access; 30000fe8: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 30000fec: e3530000 cmp r3, #0 <== NOT EXECUTED 30000ff0: 1a000009 bne 3000101c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30000ff4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30000ff8: e3530000 cmp r3, #0 <== NOT EXECUTED 30000ffc: 11a00004 movne r0, r4 <== NOT EXECUTED 30001000: 11a0e00f movne lr, pc <== NOT EXECUTED 30001004: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001008: eb002e81 bl 3000ca14 <__errno> <== NOT EXECUTED 3000100c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001010: e5803000 str r3, [r0] <== NOT EXECUTED 30001014: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001018: ea000026 b 300010b8 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 3000101c: e1a00004 mov r0, r4 <== NOT EXECUTED 30001020: e1a0e00f mov lr, pc <== NOT EXECUTED 30001024: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 30001028: e3570000 cmp r7, #0 <== NOT EXECUTED 3000102c: 03500002 cmpeq r0, #2 <== NOT EXECUTED 30001030: 03a0a000 moveq sl, #0 <== NOT EXECUTED 30001034: 13a0a001 movne sl, #1 <== NOT EXECUTED 30001038: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED 3000103c: 0a000008 beq 30001064 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30001040: e3570000 cmp r7, #0 <== NOT EXECUTED 30001044: 0a000018 beq 300010ac <== NOT EXECUTED 30001048: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 3000104c: e3530000 cmp r3, #0 <== NOT EXECUTED 30001050: 0a000015 beq 300010ac <== NOT EXECUTED 30001054: e1a00004 mov r0, r4 <== NOT EXECUTED 30001058: e1a0e00f mov lr, pc <== NOT EXECUTED 3000105c: e12fff13 bx r3 <== NOT EXECUTED 30001060: ea000011 b 300010ac <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 30001064: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 30001068: e1a00006 mov r0, r6 <== NOT EXECUTED 3000106c: eb003259 bl 3000d9d8 <== NOT EXECUTED 30001070: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 30001074: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 30001078: e3570000 cmp r7, #0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 3000107c: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 30001080: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED 30001084: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 30001088: 0a000009 beq 300010b4 <== NOT EXECUTED 3000108c: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 30001090: e3530000 cmp r3, #0 <== NOT EXECUTED 30001094: 0a000006 beq 300010b4 <== NOT EXECUTED 30001098: e1a00004 mov r0, r4 <== NOT EXECUTED 3000109c: e1a0e00f mov lr, pc <== NOT EXECUTED 300010a0: e12fff13 bx r3 <== NOT EXECUTED 300010a4: e1a0000a mov r0, sl <== NOT EXECUTED 300010a8: ea000002 b 300010b8 <== NOT EXECUTED 300010ac: e3a0000d mov r0, #13 <== NOT EXECUTED 300010b0: ea000000 b 300010b8 <== NOT EXECUTED 300010b4: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 300010b8: e28dd018 add sp, sp, #24 <== NOT EXECUTED 300010bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 30001420 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 30001420: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 30001424: e59f4098 ldr r4, [pc, #152] ; 300014c4 30001428: e5940000 ldr r0, [r4] 3000142c: e3500000 cmp r0, #0 30001430: 0a000013 beq 30001484 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 30001434: e3a01040 mov r1, #64 ; 0x40 30001438: eb001cba bl 30008728 3000143c: e59f3084 ldr r3, [pc, #132] ; 300014c8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 30001440: 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, 30001444: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 30001448: 0280001a addeq r0, r0, #26 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) 3000144c: 0a000015 beq 300014a8 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 30001450: e59f3074 ldr r3, [pc, #116] ; 300014cc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 30001454: 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; 30001458: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 3000145c: e3a03000 mov r3, #0 30001460: ea000000 b 30001468 iop->data1 = iop + 1; 30001464: e500000c str r0, [r0, #-12] 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++) 30001468: e2833001 add r3, r3, #1 3000146c: e1530001 cmp r3, r1 iop->data1 = iop + 1; 30001470: e1a02000 mov r2, r0 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++) 30001474: e2800040 add r0, r0, #64 ; 0x40 30001478: 3afffff9 bcc 30001464 iop->data1 = iop + 1; iop->data1 = NULL; 3000147c: e3a03000 mov r3, #0 30001480: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 30001484: e59fc044 ldr ip, [pc, #68] ; 300014d0 30001488: e59f0044 ldr r0, [pc, #68] ; 300014d4 3000148c: e3a01001 mov r1, #1 30001490: e3a02054 mov r2, #84 ; 0x54 30001494: e3a03000 mov r3, #0 30001498: e58dc000 str ip, [sp] 3000149c: eb000b06 bl 300040bc 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 300014a0: e3500000 cmp r0, #0 300014a4: 0a000000 beq 300014ac rtems_fatal_error_occurred( rc ); 300014a8: eb000d29 bl 30004954 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 300014ac: e59f3024 ldr r3, [pc, #36] ; 300014d8 300014b0: e5933000 ldr r3, [r3] 300014b4: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 300014b8: 11a0e00f movne lr, pc 300014bc: 112fff13 bxne r3 } 300014c0: e8bd8018 pop {r3, r4, pc} 300014c4: 300191f8 .word 0x300191f8 300014c8: 30019b98 .word 0x30019b98 300014cc: 30019b9c .word 0x30019b9c 300014d0: 30019ba0 .word 0x30019ba0 300014d4: 4c42494f .word 0x4c42494f 300014d8: 300191f4 .word 0x300191f4 30023378 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 30023378: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 3002337c: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 30023380: 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); 30023384: e1a01000 mov r1, r0 30023388: e28d2018 add r2, sp, #24 3002338c: eb000634 bl 30024c64 if (sc != RTEMS_SUCCESSFUL) return sc; 30023390: e2508000 subs r8, r0, #0 30023394: 1a00003f bne 30023498 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 30023398: e59f4104 ldr r4, [pc, #260] ; 300234a4 3002339c: e59f3104 ldr r3, [pc, #260] ; 300234a8 300233a0: e5942000 ldr r2, [r4] 300233a4: e1520003 cmp r2, r3 300233a8: 1a00000f bne 300233ec rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 300233ac: e2800048 add r0, r0, #72 ; 0x48 300233b0: ebff8948 bl 300058d8 if (!tmp) 300233b4: e2505000 subs r5, r0, #0 300233b8: 03a0801a moveq r8, #26 300233bc: 0a000035 beq 30023498 #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); 300233c0: e1a00008 mov r0, r8 300233c4: e1a01004 mov r1, r4 300233c8: e59f20dc ldr r2, [pc, #220] ; 300234ac 300233cc: eb00071b bl 30025040 if (sc != RTEMS_SUCCESSFUL) { 300233d0: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 300233d4: 05845000 streq r5, [r4] #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) { 300233d8: 0a000003 beq 300233ec /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 300233dc: e1a00005 mov r0, r5 <== NOT EXECUTED 300233e0: ebff87ba bl 300052d0 <== NOT EXECUTED 300233e4: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 300233e8: ea00002a b 30023498 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 300233ec: e59f60b0 ldr r6, [pc, #176] ; 300234a4 300233f0: e59f10b0 ldr r1, [pc, #176] ; 300234a8 300233f4: e5964000 ldr r4, [r6] 300233f8: e3a02048 mov r2, #72 ; 0x48 300233fc: e1a00004 mov r0, r4 30023400: eb006372 bl 3003c1d0 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 30023404: e59f30a4 ldr r3, [pc, #164] ; 300234b0 } 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*/ 30023408: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 3002340c: 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*/ 30023410: e59d3018 ldr r3, [sp, #24] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 30023414: 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*/ 30023418: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 3002341c: e8be000f ldm lr!, {r0, r1, r2, r3} 30023420: e8ac000f stmia ip!, {r0, r1, r2, r3} 30023424: 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); 30023428: e28d4004 add r4, sp, #4 3002342c: e3a05000 mov r5, #0 *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; 30023430: 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); 30023434: e3a01001 mov r1, #1 30023438: e1a03004 mov r3, r4 3002343c: e1a02005 mov r2, r5 30023440: e59f006c ldr r0, [pc, #108] ; 300234b4 30023444: e58d5000 str r5, [sp] 30023448: ebff8772 bl 30005218 rtems_filesystem_root = loc; 3002344c: e596c000 ldr ip, [r6] 30023450: e1a07004 mov r7, r4 30023454: e28cc018 add ip, ip, #24 30023458: e8b7000f ldm r7!, {r0, r1, r2, r3} 3002345c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30023460: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30023464: e1a02005 mov r2, r5 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 30023468: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3002346c: e3a01001 mov r1, #1 30023470: e1a03004 mov r3, r4 30023474: e59f0038 ldr r0, [pc, #56] ; 300234b4 30023478: e58d5000 str r5, [sp] 3002347c: ebff8765 bl 30005218 rtems_filesystem_current = loc; 30023480: e8b4000f ldm r4!, {r0, r1, r2, r3} 30023484: e596c000 ldr ip, [r6] 30023488: e28cc004 add ip, ip, #4 3002348c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30023490: e5973000 ldr r3, [r7] 30023494: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 30023498: e1a00008 mov r0, r8 3002349c: e28dd01c add sp, sp, #28 300234a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 300234a4: 3005ce08 .word 0x3005ce08 300234a8: 30060c10 .word 0x30060c10 300234ac: 30023270 .word 0x30023270 300234b0: 30060bf8 .word 0x30060bf8 300234b4: 300565a5 .word 0x300565a5 300232d4 : * 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) { 300232d4: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 300232d8: e1a05000 mov r5, r0 <== 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); 300232dc: e3a00000 mov r0, #0 <== NOT EXECUTED 300232e0: e1a01000 mov r1, r0 <== NOT EXECUTED 300232e4: e1a0200d mov r2, sp <== NOT EXECUTED 300232e8: eb00065d bl 30024c64 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 300232ec: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300232f0: 1a00001b bne 30023364 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 300232f4: e59f1070 ldr r1, [pc, #112] ; 3002336c <== NOT EXECUTED 300232f8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300232fc: e5914000 ldr r4, [r1] <== NOT EXECUTED 30023300: e5942000 ldr r2, [r4] <== NOT EXECUTED 30023304: e1520003 cmp r2, r3 <== NOT EXECUTED 30023308: 1a000004 bne 30023320 <== NOT EXECUTED /* 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); 3002330c: eb000774 bl 300250e4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 30023310: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30023314: 1a000012 bne 30023364 <== NOT EXECUTED free_user_env(tmp); 30023318: e1a00004 mov r0, r4 <== NOT EXECUTED 3002331c: ebffffd3 bl 30023270 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 30023320: e59f4044 ldr r4, [pc, #68] ; 3002336c <== NOT EXECUTED 30023324: e1a00005 mov r0, r5 <== NOT EXECUTED 30023328: e1a01004 mov r1, r4 <== NOT EXECUTED 3002332c: e28d2004 add r2, sp, #4 <== NOT EXECUTED 30023330: eb000788 bl 30025158 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 30023334: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30023338: 1a000006 bne 30023358 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 3002333c: e59f202c ldr r2, [pc, #44] ; 30023370 <== NOT EXECUTED 30023340: e1a01004 mov r1, r4 <== NOT EXECUTED 30023344: eb00073d bl 30025040 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 30023348: e2503000 subs r3, r0, #0 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 3002334c: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 30023350: 05842000 streq r2, [r4] <== NOT EXECUTED (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); if (sc != RTEMS_SUCCESSFUL) 30023354: 0a000002 beq 30023364 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 30023358: e59f1014 ldr r1, [pc, #20] ; 30023374 <== NOT EXECUTED 3002335c: e59f2008 ldr r2, [pc, #8] ; 3002336c <== NOT EXECUTED 30023360: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 30023364: e1a00003 mov r0, r3 <== NOT EXECUTED 30023368: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 3002336c: 3005ce08 .word 0x3005ce08 30023370: 30023270 .word 0x30023270 30023374: 30060c10 .word 0x30060c10 300059d0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 300059d0: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 300059d4: e59f3038 ldr r3, [pc, #56] ; 30005a14 <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 300059d8: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 300059dc: e1a0200d mov r2, sp <== NOT EXECUTED 300059e0: e5930000 ldr r0, [r3] <== NOT EXECUTED 300059e4: eb001552 bl 3000af34 <_Protected_heap_Get_block_size> <== NOT EXECUTED 300059e8: e3500000 cmp r0, #0 <== NOT EXECUTED 300059ec: 0a000007 beq 30005a10 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 300059f0: e59f3020 ldr r3, [pc, #32] ; 30005a18 <== NOT EXECUTED 300059f4: e59d0000 ldr r0, [sp] <== NOT EXECUTED 300059f8: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 300059fc: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 30005a00: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 30005a04: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 30005a08: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 30005a0c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 30005a10: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 30005a14: 3005cadc .word 0x3005cadc 30005a18: 30060bcc .word 0x30060bcc 30005a1c : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 30005a1c: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 30005a20: e92d4811 push {r0, r4, fp, lr} <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 30005a24: 0a000013 beq 30005a78 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 30005a28: e59f304c ldr r3, [pc, #76] ; 30005a7c <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 30005a2c: e28d2004 add r2, sp, #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); 30005a30: e5930000 ldr r0, [r3] <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 30005a34: e3a03000 mov r3, #0 <== NOT EXECUTED 30005a38: 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); 30005a3c: e1a0200d mov r2, sp <== NOT EXECUTED 30005a40: eb00153b bl 3000af34 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 30005a44: e59f3034 ldr r3, [pc, #52] ; 30005a80 <== NOT EXECUTED 30005a48: e59d4000 ldr r4, [sp] <== NOT EXECUTED 30005a4c: e283c01c add ip, r3, #28 <== NOT EXECUTED 30005a50: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 30005a54: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 30005a58: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 30005a5c: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 30005a60: 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); 30005a64: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 30005a68: e583001c str r0, [r3, #28] <== NOT EXECUTED 30005a6c: e5831020 str r1, [r3, #32] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 30005a70: e152000c cmp r2, ip <== NOT EXECUTED s->max_depth = current_depth; 30005a74: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 30005a78: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 30005a7c: 3005cadc .word 0x3005cadc 30005a80: 30060bcc .word 0x30060bcc 30005a84 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 30005a84: e59f0008 ldr r0, [pc, #8] ; 30005a94 <== NOT EXECUTED 30005a88: e3a01000 mov r1, #0 <== NOT EXECUTED 30005a8c: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 30005a90: ea00da55 b 3003c3ec <== NOT EXECUTED 30005a94: 30060bcc .word 0x30060bcc 30005fd4 : void rtems_panic( const char *printf_format, ... ) { 30005fd4: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 30005fd8: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 30005fdc: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 30005fe0: e1a02003 mov r2, r3 <== NOT EXECUTED 30005fe4: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 30005fe8: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 30005fec: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 30005ff0: ebffff8e bl 30005e30 <== NOT EXECUTED va_end(arglist); } 30005ff4: e8bd4008 pop {r3, lr} <== NOT EXECUTED 30005ff8: e28dd010 add sp, sp, #16 <== NOT EXECUTED 30005ffc: e12fff1e bx lr <== NOT EXECUTED 3000a934 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) 3000a934: e59f3048 ldr r3, [pc, #72] ; 3000a984 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 3000a938: e92d4001 push {r0, lr} if (!rtems_pipe_configured) 3000a93c: e5d33000 ldrb r3, [r3] 3000a940: e3530000 cmp r3, #0 3000a944: 0a00000d beq 3000a980 return; if (rtems_pipe_semaphore) 3000a948: e59fc038 ldr ip, [pc, #56] ; 3000a988 <== NOT EXECUTED 3000a94c: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3000a950: e3530000 cmp r3, #0 <== NOT EXECUTED 3000a954: 1a000009 bne 3000a980 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 3000a958: e59f002c ldr r0, [pc, #44] ; 3000a98c <== NOT EXECUTED 3000a95c: e3a01001 mov r1, #1 <== NOT EXECUTED 3000a960: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED 3000a964: e58dc000 str ip, [sp] <== NOT EXECUTED 3000a968: ebffe5d3 bl 300040bc <== 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) 3000a96c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000a970: 1bffe7f7 blne 30004954 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 3000a974: ebffe4d5 bl 30003cd0 <== NOT EXECUTED rtems_pipe_no = now; 3000a978: e59f3010 ldr r3, [pc, #16] ; 3000a990 <== NOT EXECUTED 3000a97c: e1c300b0 strh r0, [r3] <== NOT EXECUTED } 3000a980: e8bd8008 pop {r3, pc} 3000a984: 300199b4 .word 0x300199b4 3000a988: 30019b14 .word 0x30019b14 3000a98c: 50495045 .word 0x50495045 3000a990: 30019b1a .word 0x30019b1a 30003ac4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30003ac4: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30003ac8: e59f307c ldr r3, [pc, #124] ; 30003b4c /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30003acc: e28db008 add fp, sp, #8 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30003ad0: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 30003ad4: e59300c8 ldr r0, [r3, #200] ; 0xc8 30003ad8: e15b0000 cmp fp, r0 30003adc: 33a04000 movcc r4, #0 30003ae0: 3a000004 bcc 30003af8 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 30003ae4: e59340c4 ldr r4, [r3, #196] ; 0xc4 30003ae8: e0804004 add r4, r0, r4 30003aec: e15b0004 cmp fp, r4 30003af0: 83a04000 movhi r4, #0 30003af4: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 30003af8: e59f3050 ldr r3, [pc, #80] ; 30003b50 30003afc: e5933000 ldr r3, [r3] 30003b00: e3530000 cmp r3, #0 30003b04: 03a01001 moveq r1, #1 30003b08: 0a000005 beq 30003b24 pattern_ok = (!memcmp( 30003b0c: e59f1040 ldr r1, [pc, #64] ; 30003b54 30003b10: e2800008 add r0, r0, #8 30003b14: e3a02010 mov r2, #16 30003b18: eb00e182 bl 3003c128 30003b1c: e2701001 rsbs r1, r0, #1 30003b20: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 30003b24: e3540000 cmp r4, #0 30003b28: 0a000002 beq 30003b38 30003b2c: e3510000 cmp r1, #0 30003b30: 13a00000 movne r0, #0 30003b34: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 30003b38: e59f300c ldr r3, [pc, #12] ; 30003b4c <== NOT EXECUTED 30003b3c: e5930000 ldr r0, [r3] <== NOT EXECUTED 30003b40: ebffffb4 bl 30003a18 <== NOT EXECUTED 30003b44: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 30003b48: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 30003b4c: 30060de0 .word 0x30060de0 30003b50: 3005e0c0 .word 0x3005e0c0 30003b54: 30060b9c .word 0x30060b9c 30003a08 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 30003a08: e59f1004 ldr r1, [pc, #4] ; 30003a14 <== NOT EXECUTED 30003a0c: e3a00000 mov r0, #0 <== NOT EXECUTED 30003a10: eaffffe3 b 300039a4 <== NOT EXECUTED 30003a14: 30006400 .word 0x30006400 300039a4 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 300039a4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 300039a8: e59f4048 ldr r4, [pc, #72] ; 300039f8 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 300039ac: e1a05001 mov r5, r1 <== NOT EXECUTED 300039b0: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 300039b4: 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; 300039b8: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 300039bc: e59f1038 ldr r1, [pc, #56] ; 300039fc <== NOT EXECUTED 300039c0: e1a0e00f mov lr, pc <== NOT EXECUTED 300039c4: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 300039c8: e59f1030 ldr r1, [pc, #48] ; 30003a00 <== NOT EXECUTED 300039cc: e1a00006 mov r0, r6 <== NOT EXECUTED 300039d0: e1a0e00f mov lr, pc <== NOT EXECUTED 300039d4: 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 ); 300039d8: e59f0024 ldr r0, [pc, #36] ; 30003a04 <== NOT EXECUTED 300039dc: eb001b3a bl 3000a6cc <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 300039e0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300039e4: ebffff9f bl 30003868 <== NOT EXECUTED print_context = NULL; 300039e8: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 300039ec: 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; 300039f0: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 300039f4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 300039f8: 3005e0c0 .word 0x3005e0c0 300039fc: 300563e7 .word 0x300563e7 30003a00: 300563fe .word 0x300563fe 30003a04: 30003868 .word 0x30003868 30003b58 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 30003b58: e92d4830 push {r4, r5, fp, lr} 30003b5c: 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; 30003b60: e59000c8 ldr r0, [r0, #200] ; 0xc8 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 30003b64: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 30003b68: e15b0000 cmp fp, r0 30003b6c: 33a05000 movcc r5, #0 30003b70: 3a000004 bcc 30003b88 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 30003b74: e59450c4 ldr r5, [r4, #196] ; 0xc4 30003b78: e0805005 add r5, r0, r5 30003b7c: e15b0005 cmp fp, r5 30003b80: 83a05000 movhi r5, #0 30003b84: 93a05001 movls r5, #1 /* * 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, 30003b88: e59f102c ldr r1, [pc, #44] ; 30003bbc 30003b8c: e2800008 add r0, r0, #8 30003b90: e3a02010 mov r2, #16 30003b94: eb00e163 bl 3003c128 30003b98: e2701001 rsbs r1, r0, #1 30003b9c: 33a01000 movcc r1, #0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 30003ba0: e3550000 cmp r5, #0 30003ba4: 0a000001 beq 30003bb0 30003ba8: e3510000 cmp r1, #0 30003bac: 18bd8830 popne {r4, r5, fp, pc} Stack_check_report_blown_task( running, pattern_ok ); 30003bb0: e1a00004 mov r0, r4 <== NOT EXECUTED } } 30003bb4: e8bd4830 pop {r4, r5, fp, lr} <== NOT EXECUTED 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 ); 30003bb8: eaffff96 b 30003a18 <== NOT EXECUTED 30003bbc: 30060b9c .word 0x30060b9c 3000a900 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000a900: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000a904: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000a908: e1a07000 mov r7, r0 <== NOT EXECUTED 3000a90c: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000a910: 03a00009 moveq r0, #9 <== NOT EXECUTED 3000a914: 0a00001e beq 3000a994 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 3000a918: eb000d06 bl 3000dd38 <__errno> <== NOT EXECUTED 3000a91c: e3a03000 mov r3, #0 <== NOT EXECUTED 3000a920: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; 3000a924: e3a02000 mov r2, #0 <== NOT EXECUTED 3000a928: e3a03000 mov r3, #0 <== NOT EXECUTED 3000a92c: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 3000a930: e1a00007 mov r0, r7 <== NOT EXECUTED 3000a934: e1a0100d mov r1, sp <== NOT EXECUTED 3000a938: eb001875 bl 30010b14 <== 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 ) 3000a93c: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; 3000a940: 159d3000 ldrne r3, [sp] <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 3000a944: e1a05000 mov r5, r0 <== NOT EXECUTED result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; 3000a948: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 3000a94c: e59d3000 ldr r3, [sp] <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 3000a950: 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 ) 3000a954: e1530007 cmp r3, r7 <== NOT EXECUTED 3000a958: 03a0000b moveq r0, #11 <== NOT EXECUTED 3000a95c: 0a00000c beq 3000a994 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 3000a960: e1a00005 mov r0, r5 <== NOT EXECUTED 3000a964: e59f202c ldr r2, [pc, #44] ; 3000a998 <== NOT EXECUTED 3000a968: e3e03000 mvn r3, #0 <== NOT EXECUTED 3000a96c: ebffe098 bl 30002bd4 <__gedf2> <== NOT EXECUTED 3000a970: e3500000 cmp r0, #0 <== NOT EXECUTED 3000a974: da000004 ble 3000a98c <== NOT EXECUTED 3000a978: eb000cee bl 3000dd38 <__errno> <== NOT EXECUTED 3000a97c: e5903000 ldr r3, [r0] <== NOT EXECUTED 3000a980: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 3000a984: 03a0000a moveq r0, #10 <== NOT EXECUTED 3000a988: 0a000001 beq 3000a994 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 3000a98c: e8840060 stm r4, {r5, r6} <== NOT EXECUTED 3000a990: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 3000a994: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3000a998: 7fefffff .word 0x7fefffff 3000a99c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000a99c: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000a9a0: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000a9a4: e1a05000 mov r5, r0 3000a9a8: e1a07002 mov r7, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000a9ac: 03a00009 moveq r0, #9 3000a9b0: 0a00001b beq 3000aa24 return RTEMS_INVALID_ADDRESS; errno = 0; 3000a9b4: eb000cdf bl 3000dd38 <__errno> 3000a9b8: e3a03000 mov r3, #0 3000a9bc: e5803000 str r3, [r0] *n = 0; 3000a9c0: e3a03000 mov r3, #0 3000a9c4: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 3000a9c8: e1a00005 mov r0, r5 3000a9cc: e1a0100d mov r1, sp 3000a9d0: eb00183c bl 30010ac8 #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 ) 3000a9d4: e3570000 cmp r7, #0 *endptr = end; 3000a9d8: 159d3000 ldrne r3, [sp] errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 3000a9dc: e1a06000 mov r6, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; 3000a9e0: 15873000 strne r3, [r7] /* nothing was converted */ if ( end == s ) 3000a9e4: e59d3000 ldr r3, [sp] 3000a9e8: e1530005 cmp r3, r5 3000a9ec: 03a0000b moveq r0, #11 3000a9f0: 0a00000b beq 3000aa24 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 3000a9f4: e1a00006 mov r0, r6 3000a9f8: e59f1028 ldr r1, [pc, #40] ; 3000aa28 3000a9fc: ebffe0bf bl 30002d00 <__gesf2> 3000aa00: e3500000 cmp r0, #0 3000aa04: da000004 ble 3000aa1c 3000aa08: eb000cca bl 3000dd38 <__errno> <== NOT EXECUTED 3000aa0c: e5903000 ldr r3, [r0] <== NOT EXECUTED 3000aa10: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 3000aa14: 03a0000a moveq r0, #10 <== NOT EXECUTED 3000aa18: 0a000001 beq 3000aa24 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 3000aa1c: e5846000 str r6, [r4] 3000aa20: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 3000aa24: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 3000aa28: 7f7fffff .word 0x7f7fffff 30019e14 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 30019e14: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 30019e18: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 30019e1c: e1a05000 mov r5, r0 30019e20: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 30019e24: 03a00009 moveq r0, #9 30019e28: 0a000018 beq 30019e90 return RTEMS_INVALID_ADDRESS; errno = 0; 30019e2c: eb007cb6 bl 3003910c <__errno> 30019e30: e3a03000 mov r3, #0 30019e34: e5803000 str r3, [r0] *n = 0; 30019e38: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 30019e3c: e1a00005 mov r0, r5 30019e40: e1a0100d mov r1, sp 30019e44: e3a02010 mov r2, #16 30019e48: eb009c56 bl 30040fa8 #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 ) 30019e4c: e3560000 cmp r6, #0 *endptr = end; 30019e50: 159d3000 ldrne r3, [sp] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 30019e54: e1a07000 mov r7, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; 30019e58: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 30019e5c: e59d3000 ldr r3, [sp] 30019e60: e1530005 cmp r3, r5 30019e64: 03a0000b moveq r0, #11 30019e68: 0a000008 beq 30019e90 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 30019e6c: e3770001 cmn r7, #1 30019e70: 1a000004 bne 30019e88 30019e74: eb007ca4 bl 3003910c <__errno> <== NOT EXECUTED 30019e78: e5903000 ldr r3, [r0] <== NOT EXECUTED 30019e7c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 30019e80: 03a0000a moveq r0, #10 <== NOT EXECUTED 30019e84: 0a000001 beq 30019e90 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 30019e88: e5847000 str r7, [r4] 30019e8c: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 30019e90: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 3000343c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3000343c: e3500009 cmp r0, #9 30003440: 012fff1e bxeq lr 30003444: ca000016 bgt 300034a4 30003448: e3500004 cmp r0, #4 3000344c: 012fff1e bxeq lr 30003450: ca00000a bgt 30003480 30003454: e3500001 cmp r0, #1 30003458: 012fff1e bxeq lr 3000345c: ca000002 bgt 3000346c 30003460: e3500000 cmp r0, #0 30003464: 012fff1e bxeq lr 30003468: ea000030 b 30003530 3000346c: e3500002 cmp r0, #2 <== NOT EXECUTED 30003470: 012fff1e bxeq lr <== NOT EXECUTED 30003474: e3500003 cmp r0, #3 <== NOT EXECUTED 30003478: 1a00002c bne 30003530 <== NOT EXECUTED 3000347c: e12fff1e bx lr <== NOT EXECUTED 30003480: e3500006 cmp r0, #6 <== NOT EXECUTED 30003484: 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; 30003488: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3000348c: b12fff1e bxlt lr <== NOT EXECUTED 30003490: e3500007 cmp r0, #7 <== NOT EXECUTED 30003494: 012fff1e bxeq lr <== NOT EXECUTED 30003498: e3500008 cmp r0, #8 <== NOT EXECUTED 3000349c: 1a000023 bne 30003530 <== NOT EXECUTED 300034a0: e12fff1e bx lr <== NOT EXECUTED 300034a4: e350000e cmp r0, #14 <== NOT EXECUTED 300034a8: 012fff1e bxeq lr <== NOT EXECUTED 300034ac: ca000008 bgt 300034d4 <== NOT EXECUTED 300034b0: e350000b cmp r0, #11 <== NOT EXECUTED 300034b4: 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; 300034b8: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 300034bc: b12fff1e bxlt lr <== NOT EXECUTED 300034c0: e350000c cmp r0, #12 <== NOT EXECUTED 300034c4: 012fff1e bxeq lr <== NOT EXECUTED 300034c8: e350000d cmp r0, #13 <== NOT EXECUTED 300034cc: 1a000017 bne 30003530 <== NOT EXECUTED 300034d0: e12fff1e bx lr <== NOT EXECUTED 300034d4: e59f305c ldr r3, [pc, #92] ; 30003538 <== NOT EXECUTED 300034d8: 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; 300034dc: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 300034e0: 012fff1e bxeq lr <== NOT EXECUTED 300034e4: ca000005 bgt 30003500 <== NOT EXECUTED 300034e8: e350000f cmp r0, #15 <== NOT EXECUTED 300034ec: 012fff1e bxeq lr <== NOT EXECUTED 300034f0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300034f4: e1500003 cmp r0, r3 <== NOT EXECUTED 300034f8: 1a00000c bne 30003530 <== NOT EXECUTED 300034fc: ea000007 b 30003520 <== NOT EXECUTED 30003500: e59f3034 ldr r3, [pc, #52] ; 3000353c <== NOT EXECUTED 30003504: 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; 30003508: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3000350c: 012fff1e bxeq lr <== NOT EXECUTED 30003510: e2833001 add r3, r3, #1 <== NOT EXECUTED 30003514: e1500003 cmp r0, r3 <== NOT EXECUTED 30003518: 1a000004 bne 30003530 <== NOT EXECUTED 3000351c: ea000001 b 30003528 <== 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; 30003520: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 30003524: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 30003528: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3000352c: e12fff1e bx lr <== NOT EXECUTED 30003530: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 30003534: e12fff1e bx lr 30003538: 00001002 .word 0x00001002 3000353c: 00001003 .word 0x00001003 30001f68 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 30001f68: e59f3008 ldr r3, [pc, #8] ; 30001f78 <== NOT EXECUTED 30001f6c: 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; } 30001f70: e3a00000 mov r0, #0 <== NOT EXECUTED 30001f74: e12fff1e bx lr <== NOT EXECUTED 30001f78: 300193dc .word 0x300193dc 30003374 : { 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); 30003374: e59f2180 ldr r2, [pc, #384] ; 300034fc rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003378: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3000337c: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 30003380: e92d4030 push {r4, r5, lr} 30003384: e1a05000 mov r5, 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); 30003388: e5920000 ldr r0, [r2] 3000338c: e1a02001 mov r2, r1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003390: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003394: eb0003da bl 30004304 if (sc != RTEMS_SUCCESSFUL) 30003398: e3500000 cmp r0, #0 3000339c: 1a000022 bne 3000342c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 300033a0: e5943008 ldr r3, [r4, #8] 300033a4: e2433001 sub r3, r3, #1 300033a8: e3530000 cmp r3, #0 300033ac: e5843008 str r3, [r4, #8] 300033b0: 1a00004c bne 300034e8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300033b4: e59420cc ldr r2, [r4, #204] ; 0xcc 300033b8: e59f3140 ldr r3, [pc, #320] ; 30003500 300033bc: e0833282 add r3, r3, r2, lsl #5 300033c0: e5931004 ldr r1, [r3, #4] 300033c4: e3510000 cmp r1, #0 300033c8: 0a000003 beq 300033dc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300033cc: e1a00004 mov r0, r4 <== NOT EXECUTED 300033d0: e1a0e00f mov lr, pc <== NOT EXECUTED 300033d4: e12fff11 bx r1 <== NOT EXECUTED 300033d8: ea000006 b 300033f8 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300033dc: e5940018 ldr r0, [r4, #24] 300033e0: e1a02001 mov r2, r1 300033e4: eb0003c6 bl 30004304 if (sc != RTEMS_SUCCESSFUL) { 300033e8: e3500000 cmp r0, #0 300033ec: 1a00000e bne 3000342c rtems_fatal_error_occurred (sc); } drainOutput (tty); 300033f0: e1a00004 mov r0, r4 300033f4: ebfffe05 bl 30002c10 } if (tty->device.outputUsesInterrupts 300033f8: e59430b4 ldr r3, [r4, #180] ; 0xb4 300033fc: e3530002 cmp r3, #2 30003400: 1a00000a bne 30003430 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 30003404: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 30003408: e3a01001 mov r1, #1 <== NOT EXECUTED 3000340c: eb0002a8 bl 30003eb4 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 30003410: e3500000 cmp r0, #0 <== NOT EXECUTED 30003414: 1a000004 bne 3000342c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 30003418: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3000341c: e3a01001 mov r1, #1 <== NOT EXECUTED 30003420: eb0002a3 bl 30003eb4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 30003424: e3500000 cmp r0, #0 <== NOT EXECUTED 30003428: 0a000000 beq 30003430 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000342c: eb000548 bl 30004954 <== NOT EXECUTED } if (tty->device.lastClose) 30003430: e594309c ldr r3, [r4, #156] ; 0x9c 30003434: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 30003438: 11a02005 movne r2, r5 3000343c: 1594000c ldrne r0, [r4, #12] 30003440: 15941010 ldrne r1, [r4, #16] 30003444: 11a0e00f movne lr, pc 30003448: 112fff13 bxne r3 if (tty->forw == NULL) { 3000344c: e894000c ldm r4, {r2, r3} 30003450: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 30003454: 15823004 strne r3, [r2, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { 30003458: 1a000003 bne 3000346c rtems_termios_ttyTail = tty->back; 3000345c: e59f10a0 ldr r1, [pc, #160] ; 30003504 if ( rtems_termios_ttyTail != NULL ) { 30003460: e3530000 cmp r3, #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; 30003464: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30003468: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000346c: e5942004 ldr r2, [r4, #4] 30003470: e5943000 ldr r3, [r4] 30003474: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 30003478: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000347c: 1a000003 bne 30003490 rtems_termios_ttyHead = tty->forw; 30003480: e59f1080 ldr r1, [pc, #128] ; 30003508 if ( rtems_termios_ttyHead != NULL ) { 30003484: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30003488: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3000348c: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 30003490: e5940014 ldr r0, [r4, #20] 30003494: eb000373 bl 30004268 rtems_semaphore_delete (tty->osem); 30003498: e5940018 ldr r0, [r4, #24] 3000349c: eb000371 bl 30004268 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 300034a0: e594008c ldr r0, [r4, #140] ; 0x8c 300034a4: eb00036f bl 30004268 if ((tty->device.pollRead == NULL) || 300034a8: e59430a0 ldr r3, [r4, #160] ; 0xa0 300034ac: e3530000 cmp r3, #0 300034b0: 0a000002 beq 300034c0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 300034b4: e59430b4 ldr r3, [r4, #180] ; 0xb4 300034b8: e3530002 cmp r3, #2 300034bc: 1a000001 bne 300034c8 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 300034c0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 300034c4: eb000367 bl 30004268 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 300034c8: e5940058 ldr r0, [r4, #88] ; 0x58 300034cc: eb0014d1 bl 30008818 free (tty->rawOutBuf.theBuf); 300034d0: e594007c ldr r0, [r4, #124] ; 0x7c 300034d4: eb0014cf bl 30008818 free (tty->cbuf); 300034d8: e594001c ldr r0, [r4, #28] 300034dc: eb0014cd bl 30008818 free (tty); 300034e0: e1a00004 mov r0, r4 300034e4: eb0014cb bl 30008818 } rtems_semaphore_release (rtems_termios_ttyMutex); 300034e8: e59f300c ldr r3, [pc, #12] ; 300034fc 300034ec: e5930000 ldr r0, [r3] 300034f0: eb0003c9 bl 3000441c return RTEMS_SUCCESSFUL; } 300034f4: e3a00000 mov r0, #0 300034f8: e8bd8030 pop {r4, r5, pc} 300034fc: 30019bdc .word 0x30019bdc 30003500: 30019a08 .word 0x30019a08 30003504: 30019be0 .word 0x30019be0 30003508: 30019be4 .word 0x30019be4 3000216c : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 3000216c: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002170: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30002174: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002178: 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) { 3000217c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30002180: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002184: 1a000005 bne 300021a0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 30002188: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 3000218c: e1a01002 mov r1, r2 <== NOT EXECUTED 30002190: eb000747 bl 30003eb4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 30002194: e3500000 cmp r0, #0 <== NOT EXECUTED 30002198: 0a00000c beq 300021d0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000219c: eb0009ec bl 30004954 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 300021a0: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 300021a4: e3530005 cmp r3, #5 <== NOT EXECUTED 300021a8: 1a000006 bne 300021c8 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 300021ac: e59f3024 ldr r3, [pc, #36] ; 300021d8 <== NOT EXECUTED 300021b0: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 300021b4: e3530000 cmp r3, #0 <== NOT EXECUTED 300021b8: 0a000004 beq 300021d0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 300021bc: e1a0e00f mov lr, pc <== NOT EXECUTED 300021c0: e12fff13 bx r3 <== NOT EXECUTED 300021c4: ea000001 b 300021d0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 300021c8: 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); 300021cc: eaffff6d b 30001f88 <== NOT EXECUTED } } 300021d0: e3a00000 mov r0, #0 <== NOT EXECUTED 300021d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 300021d8: 30019a08 .word 0x30019a08 300021dc : * 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) { 300021dc: e92d4ff7 push {r0, r1, r2, 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) { 300021e0: e59f32b8 ldr r3, [pc, #696] ; 300024a0 <== 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) { 300021e4: e1a04000 mov r4, r0 <== 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) { 300021e8: e59000cc ldr r0, [r0, #204] ; 0xcc <== 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) { 300021ec: e1a0b001 mov fp, r1 <== 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) { 300021f0: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 300021f4: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 300021f8: e3560000 cmp r6, #0 <== 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); 300021fc: 11a05002 movne r5, r2 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 30002200: 11a07003 movne r7, r3 <== 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); 30002204: 13a06000 movne r6, #0 <== 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) { 30002208: 1a00000e bne 30002248 <== 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); 3000220c: e1a08002 mov r8, r2 <== NOT EXECUTED 30002210: e2843030 add r3, r4, #48 ; 0x30 <== 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, 30002214: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 30002218: e58d2008 str r2, [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); 3000221c: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 30002220: e1a09006 mov r9, r6 <== NOT EXECUTED 30002224: e1a05006 mov r5, r6 <== NOT EXECUTED 30002228: ea000091 b 30002474 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 3000222c: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 30002230: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 30002234: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 30002238: e1a0e00f mov lr, pc <== NOT EXECUTED 3000223c: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 30002240: e2866001 add r6, r6, #1 <== NOT EXECUTED 30002244: e2455001 sub r5, r5, #1 <== 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--) { 30002248: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 3000224c: e1a01004 mov r1, r4 <== 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--) { 30002250: 1afffff5 bne 3000222c <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 30002254: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 30002258: e3530000 cmp r3, #0 <== NOT EXECUTED 3000225c: 1a00008c bne 30002494 <== NOT EXECUTED 30002260: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 30002264: e3530000 cmp r3, #0 <== NOT EXECUTED 30002268: 0a000089 beq 30002494 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 3000226c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 30002270: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 30002274: e1a0e00f mov lr, pc <== NOT EXECUTED 30002278: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 3000227c: e3a03001 mov r3, #1 <== NOT EXECUTED 30002280: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 30002284: ea000083 b 30002498 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30002288: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 3000228c: e7dba006 ldrb sl, [fp, r6] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30002290: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30002294: 0a00000f beq 300022d8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 30002298: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 3000229c: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 300022a0: e152000a cmp r2, sl <== NOT EXECUTED 300022a4: 1a000007 bne 300022c8 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 300022a8: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 300022ac: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 300022b0: 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; 300022b4: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 300022b8: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 300022bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 300022c0: e3a09001 mov r9, #1 <== NOT EXECUTED 300022c4: ea000005 b 300022e0 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 300022c8: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 300022cc: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300022d0: 03c33010 biceq r3, r3, #16 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 300022d4: 0afffff8 beq 300022bc <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 300022d8: e3590000 cmp r9, #0 <== NOT EXECUTED 300022dc: 0a000015 beq 30002338 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 300022e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300022e4: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 300022e8: e3530020 cmp r3, #32 <== NOT EXECUTED 300022ec: 1a00005e bne 3000246c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300022f0: e10f7000 mrs r7, CPSR <== NOT EXECUTED 300022f4: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 300022f8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 300022fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30002300: 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; 30002304: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30002308: 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; 3000230c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30002310: 0a000006 beq 30002330 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 30002314: 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, 30002318: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3000231c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002320: e0811003 add r1, r1, r3 <== NOT EXECUTED 30002324: e3a02001 mov r2, #1 <== NOT EXECUTED 30002328: e1a0e00f mov lr, pc <== NOT EXECUTED 3000232c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002330: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 30002334: ea00004c b 3000246c <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 30002338: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 3000233c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 30002340: e2800001 add r0, r0, #1 <== NOT EXECUTED 30002344: eb004fb9 bl 30016230 <__umodsi3> <== NOT EXECUTED 30002348: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000234c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30002350: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 30002354: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30002358: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 3000235c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 30002360: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 30002364: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 30002368: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 3000236c: e0800007 add r0, r0, r7 <== NOT EXECUTED 30002370: eb004fae bl 30016230 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 30002374: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 30002378: e1500003 cmp r0, r3 <== NOT EXECUTED 3000237c: 9a000025 bls 30002418 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 30002380: 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) 30002384: e3130001 tst r3, #1 <== NOT EXECUTED 30002388: 1a000022 bne 30002418 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 3000238c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 30002390: e59f310c ldr r3, [pc, #268] ; 300024a4 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 30002394: e3822001 orr r2, r2, #1 <== NOT EXECUTED 30002398: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 3000239c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 300023a0: e0023003 and r3, r2, r3 <== NOT EXECUTED 300023a4: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 300023a8: 1a00000e bne 300023e8 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 300023ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300023b0: e3130020 tst r3, #32 <== NOT EXECUTED 300023b4: 1a000002 bne 300023c4 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 300023b8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 300023bc: e3530000 cmp r3, #0 <== NOT EXECUTED 300023c0: 1a000014 bne 30002418 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 300023c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 300023c8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED == (FL_MDXOF ) ){ 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; 300023cc: e3833002 orr r3, r3, #2 <== NOT EXECUTED 300023d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 300023d4: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 300023d8: e3a02001 mov r2, #1 <== NOT EXECUTED 300023dc: e1a0e00f mov lr, pc <== NOT EXECUTED 300023e0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 300023e4: ea00000b b 30002418 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 300023e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300023ec: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 300023f0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 300023f4: 1a000007 bne 30002418 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 300023f8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 300023fc: 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; 30002400: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 30002404: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 30002408: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 3000240c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30002410: 11a0e00f movne lr, pc <== NOT EXECUTED 30002414: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002418: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000241c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 30002420: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 30002424: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 30002428: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 3000242c: 0a00000e beq 3000246c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 30002430: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30002434: e7c3a007 strb sl, [r3, r7] <== 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 )) { 30002438: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 3000243c: e5847060 str r7, [r4, #96] ; 0x60 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 30002440: e3530000 cmp r3, #0 <== NOT EXECUTED 30002444: 1a000008 bne 3000246c <== NOT EXECUTED 30002448: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 3000244c: e3530000 cmp r3, #0 <== NOT EXECUTED 30002450: 0a000005 beq 3000246c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30002454: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 30002458: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 3000245c: e1a0e00f mov lr, pc <== NOT EXECUTED 30002460: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30002464: e3a02001 mov r2, #1 <== NOT EXECUTED 30002468: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 3000246c: e2866001 add r6, r6, #1 <== NOT EXECUTED 30002470: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 30002474: e3580000 cmp r8, #0 <== NOT EXECUTED 30002478: 1affff82 bne 30002288 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 3000247c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 30002480: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 30002484: e0833005 add r3, r3, r5 <== NOT EXECUTED 30002488: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 3000248c: eb0007e2 bl 3000441c <== NOT EXECUTED return dropped; 30002490: ea000000 b 30002498 <== NOT EXECUTED 30002494: e3a05000 mov r5, #0 <== NOT EXECUTED } 30002498: e1a00005 mov r0, r5 <== NOT EXECUTED 3000249c: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 300024a0: 30019a08 .word 0x30019a08 300024a4: 00000402 .word 0x00000402 30002fcc : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002fcc: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 30002fd0: e92d41f0 push {r4, r5, r6, r7, r8, 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; 30002fd4: e3a01000 mov r1, #0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002fd8: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 30002fdc: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 30002fe0: e1a05000 mov r5, 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); 30002fe4: e1a02001 mov r2, r1 30002fe8: e5940018 ldr r0, [r4, #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; 30002fec: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002ff0: eb0004c3 bl 30004304 if (sc != RTEMS_SUCCESSFUL) { 30002ff4: e2506000 subs r6, r0, #0 30002ff8: 1a0000d7 bne 3000335c args->ioctl_return = sc; return sc; } switch (args->command) { 30002ffc: e5953004 ldr r3, [r5, #4] 30003000: e3530004 cmp r3, #4 30003004: 0a0000ab beq 300032b8 30003008: 8a000005 bhi 30003024 3000300c: e3530002 cmp r3, #2 30003010: 0a000029 beq 300030bc 30003014: 8a0000a0 bhi 3000329c 30003018: e3530001 cmp r3, #1 3000301c: 1a000010 bne 30003064 30003020: ea00001b b 30003094 30003024: e59f233c ldr r2, [pc, #828] ; 30003368 <== NOT EXECUTED 30003028: e1530002 cmp r3, r2 <== NOT EXECUTED 3000302c: 0a0000bd beq 30003328 <== NOT EXECUTED 30003030: 8a000002 bhi 30003040 <== NOT EXECUTED 30003034: e3530005 cmp r3, #5 <== NOT EXECUTED 30003038: 1a000009 bne 30003064 <== NOT EXECUTED 3000303c: ea000099 b 300032a8 <== NOT EXECUTED 30003040: e59f2324 ldr r2, [pc, #804] ; 3000336c <== NOT EXECUTED 30003044: e1530002 cmp r3, r2 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 30003048: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 3000304c: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 30003050: 05832000 streq r2, [r3] <== 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) { 30003054: 0a0000be beq 30003354 <== NOT EXECUTED 30003058: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 3000305c: e1530002 cmp r3, r2 <== NOT EXECUTED 30003060: 0a000098 beq 300032c8 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30003064: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 30003068: e59f3300 ldr r3, [pc, #768] ; 30003370 <== NOT EXECUTED 3000306c: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 30003070: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 30003074: e3530000 cmp r3, #0 <== NOT EXECUTED 30003078: 03a0600a moveq r6, #10 <== NOT EXECUTED 3000307c: 0a0000b4 beq 30003354 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 30003080: e1a00004 mov r0, r4 <== NOT EXECUTED 30003084: e1a01005 mov r1, r5 <== NOT EXECUTED 30003088: e1a0e00f mov lr, pc <== NOT EXECUTED 3000308c: e12fff13 bx r3 <== NOT EXECUTED 30003090: ea0000a2 b 30003320 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 30003094: e5957008 ldr r7, [r5, #8] 30003098: e284c030 add ip, r4, #48 ; 0x30 3000309c: e1a0e007 mov lr, r7 300030a0: e8bc000f ldm ip!, {r0, r1, r2, r3} 300030a4: e8ae000f stmia lr!, {r0, r1, r2, r3} 300030a8: e8bc000f ldm ip!, {r0, r1, r2, r3} 300030ac: e8ae000f stmia lr!, {r0, r1, r2, r3} 300030b0: e59c3000 ldr r3, [ip] 300030b4: e58e3000 str r3, [lr] break; 300030b8: ea0000a5 b 30003354 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 300030bc: e595e008 ldr lr, [r5, #8] 300030c0: e284c030 add ip, r4, #48 ; 0x30 300030c4: e8be000f ldm lr!, {r0, r1, r2, r3} 300030c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300030cc: e8be000f ldm lr!, {r0, r1, r2, r3} 300030d0: 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) && 300030d4: e59420b8 ldr r2, [r4, #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; 300030d8: 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) && 300030dc: 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; 300030e0: 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) && 300030e4: 0a000019 beq 30003150 300030e8: e5943030 ldr r3, [r4, #48] ; 0x30 300030ec: e3130b01 tst r3, #1024 ; 0x400 300030f0: 1a000016 bne 30003150 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 300030f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300030f8: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 300030fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 30003100: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003104: e3130020 tst r3, #32 <== NOT EXECUTED 30003108: 0a000010 beq 30003150 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000310c: e10f7000 mrs r7, CPSR <== NOT EXECUTED 30003110: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 30003114: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 30003118: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3000311c: e5942094 ldr r2, [r4, #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; 30003120: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30003124: 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; 30003128: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3000312c: 0a000006 beq 3000314c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 30003130: 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, 30003134: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 30003138: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000313c: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003140: e3a02001 mov r2, #1 <== NOT EXECUTED 30003144: e1a0e00f mov lr, pc <== NOT EXECUTED 30003148: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000314c: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 30003150: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003154: e3130b01 tst r3, #1024 ; 0x400 30003158: 0a000008 beq 30003180 3000315c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30003160: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30003164: 1a000005 bne 30003180 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30003168: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000316c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30003170: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 30003174: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003178: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3000317c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30003180: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003184: e3130c01 tst r3, #256 ; 0x100 30003188: 0a000010 beq 300031d0 3000318c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30003190: e3530000 cmp r3, #0 <== NOT EXECUTED 30003194: ba00000d blt 300031d0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30003198: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000319c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300031a0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 300031a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300031a8: e3130004 tst r3, #4 <== NOT EXECUTED 300031ac: 0a000004 beq 300031c4 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 300031b0: e59430b0 ldr r3, [r4, #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) && 300031b4: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 300031b8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 300031bc: 11a0e00f movne lr, pc <== NOT EXECUTED 300031c0: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 300031c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300031c8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 300031cc: e58430b8 str r3, [r4, #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) { 300031d0: e5943038 ldr r3, [r4, #56] ; 0x38 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) { 300031d4: e594703c ldr r7, [r4, #60] ; 0x3c /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 300031d8: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 300031dc: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 300031e0: b3833c01 orrlt r3, r3, #256 ; 0x100 300031e4: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 300031e8: e5943030 ldr r3, [r4, #48] ; 0x30 300031ec: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 300031f0: 159430b8 ldrne r3, [r4, #184] ; 0xb8 300031f4: 13833b01 orrne r3, r3, #1024 ; 0x400 300031f8: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 300031fc: e5943030 ldr r3, [r4, #48] ; 0x30 30003200: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 30003204: 159430b8 ldrne r3, [r4, #184] ; 0xb8 30003208: 13833c02 orrne r3, r3, #512 ; 0x200 3000320c: 158430b8 strne r3, [r4, #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) { 30003210: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003214: 13a03000 movne r3, #0 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) { 30003218: 1a000014 bne 30003270 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; 3000321c: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 30003220: eb0002a2 bl 30003cb0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 30003224: e3a0100a mov r1, #10 <== NOT EXECUTED 30003228: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3000322c: eb004b6b bl 30015fe0 <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 30003230: e5d43046 ldrb r3, [r4, #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] * 30003234: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 30003238: e3530000 cmp r3, #0 <== NOT EXECUTED 3000323c: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED 30003240: 0a000006 beq 30003260 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003244: e3520000 cmp r2, #0 <== NOT EXECUTED 30003248: 01a02000 moveq r2, r0 <== NOT EXECUTED 3000324c: 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; 30003250: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003254: e5842074 str r2, [r4, #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; 30003258: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 3000325c: ea000006 b 3000327c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 30003260: e3520000 cmp r2, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 30003264: 03a03001 moveq r3, #1 <== NOT EXECUTED 30003268: 0584306c streq r3, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3000326c: 0a000002 beq 3000327c <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003270: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003274: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 30003278: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3000327c: e59430a8 ldr r3, [r4, #168] ; 0xa8 30003280: e3530000 cmp r3, #0 30003284: 0a000032 beq 30003354 (*tty->device.setAttributes)(tty->minor, &tty->termios); 30003288: e5940010 ldr r0, [r4, #16] 3000328c: e2841030 add r1, r4, #48 ; 0x30 30003290: e1a0e00f mov lr, pc 30003294: e12fff13 bx r3 30003298: ea00002d b 30003354 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3000329c: e1a00004 mov r0, r4 300032a0: ebfffe5a bl 30002c10 break; 300032a4: ea00002a b 30003354 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 300032a8: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 300032ac: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 300032b0: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 300032b4: ea000026 b 30003354 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 300032b8: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 300032bc: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 300032c0: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 300032c4: ea000022 b 30003354 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300032c8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 300032cc: e59f309c ldr r3, [pc, #156] ; 30003370 <== NOT EXECUTED 300032d0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 300032d4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 300032d8: e3530000 cmp r3, #0 <== NOT EXECUTED 300032dc: 0a000003 beq 300032f0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300032e0: e1a00004 mov r0, r4 <== NOT EXECUTED 300032e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300032e8: e12fff13 bx r3 <== NOT EXECUTED 300032ec: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 300032f0: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 300032f4: e3a01000 mov r1, #0 <== 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); 300032f8: 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) { 300032fc: e59f306c ldr r3, [pc, #108] ; 30003370 <== 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 */ 30003300: e58410d0 str r1, [r4, #208] ; 0xd0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 30003304: e7933282 ldr r3, [r3, r2, lsl #5] <== 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); 30003308: e58420cc str r2, [r4, #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) { 3000330c: e1530001 cmp r3, r1 <== NOT EXECUTED 30003310: 0a00000f beq 30003354 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 30003314: e1a00004 mov r0, r4 <== NOT EXECUTED 30003318: e1a0e00f mov lr, pc <== NOT EXECUTED 3000331c: e12fff13 bx r3 <== NOT EXECUTED 30003320: e1a06000 mov r6, r0 <== NOT EXECUTED 30003324: ea00000a b 30003354 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 30003328: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3000332c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003330: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) 30003334: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 30003338: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3000333c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 30003340: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003344: e0611000 rsb r1, r1, r0 <== NOT EXECUTED 30003348: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3000334c: e0813003 add r3, r1, r3 <== NOT EXECUTED 30003350: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 30003354: e5940018 ldr r0, [r4, #24] 30003358: eb00042f bl 3000441c args->ioctl_return = sc; 3000335c: e585600c str r6, [r5, #12] return sc; } 30003360: e1a00006 mov r0, r6 30003364: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30003368: 4004667f .word 0x4004667f 3000336c: 4004741a .word 0x4004741a 30003370: 30019a08 .word 0x30019a08 3000350c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3000350c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 30003510: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003514: e59f23d4 ldr r2, [pc, #980] ; 300038f0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003518: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3000351c: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30003520: e1a0b000 mov fp, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003524: e5920000 ldr r0, [r2] 30003528: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3000352c: e58d3008 str r3, [sp, #8] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 30003530: eb000373 bl 30004304 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30003534: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30003538: 059f33b4 ldreq r3, [pc, #948] ; 300038f4 3000353c: 05935000 ldreq r5, [r3] /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30003540: 0a000007 beq 30003564 30003544: ea0000df b 300038c8 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 30003548: e595300c ldr r3, [r5, #12] 3000354c: e153000b cmp r3, fp 30003550: 1a000002 bne 30003560 30003554: e5953010 ldr r3, [r5, #16] 30003558: e153000a cmp r3, sl 3000355c: 0a0000b8 beq 30003844 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30003560: e5955000 ldr r5, [r5] 30003564: e3550000 cmp r5, #0 30003568: 1afffff6 bne 30003548 3000356c: ea0000d7 b 300038d0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 30003570: e59f7380 ldr r7, [pc, #896] ; 300038f8 30003574: e5973004 ldr r3, [r7, #4] 30003578: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3000357c: e5950064 ldr r0, [r5, #100] ; 0x64 30003580: eb0015ee bl 30008d40 if (tty->rawInBuf.theBuf == NULL) { 30003584: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30003588: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 3000358c: 0a00000f beq 300035d0 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 30003590: e5973008 ldr r3, [r7, #8] 30003594: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 30003598: e5950088 ldr r0, [r5, #136] ; 0x88 3000359c: eb0015e7 bl 30008d40 if (tty->rawOutBuf.theBuf == NULL) { 300035a0: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 300035a4: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 300035a8: 0a000006 beq 300035c8 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 300035ac: e5970000 ldr r0, [r7] 300035b0: eb0015e2 bl 30008d40 if (tty->cbuf == NULL) { 300035b4: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 300035b8: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 300035bc: 1a000007 bne 300035e0 free((void *)(tty->rawOutBuf.theBuf)); 300035c0: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 300035c4: eb001493 bl 30008818 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 300035c8: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 300035cc: eb001491 bl 30008818 <== NOT EXECUTED free(tty); 300035d0: e1a00005 mov r0, r5 <== NOT EXECUTED 300035d4: eb00148f bl 30008818 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 300035d8: e3a0601a mov r6, #26 <== NOT EXECUTED 300035dc: ea0000b6 b 300038bc <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 300035e0: e59f230c ldr r2, [pc, #780] ; 300038f4 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 300035e4: e3a03000 mov r3, #0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 300035e8: e5922000 ldr r2, [r2] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 300035ec: e58530d4 str r3, [r5, #212] ; 0xd4 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 300035f0: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) 300035f4: e1520003 cmp r2, r3 } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; tty->tty_snd.sw_arg = NULL; 300035f8: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 300035fc: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 30003600: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 30003604: e58530e4 str r3, [r5, #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) 30003608: e59f32ec ldr r3, [pc, #748] ; 300038fc * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3000360c: 15825004 strne r5, [r2, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 30003610: e5852000 str r2, [r5] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 30003614: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003618: e59f72d8 ldr r7, [pc, #728] ; 300038f8 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) 3000361c: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 30003620: 05834000 streq r4, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 30003624: e59f12c8 ldr r1, [pc, #712] ; 300038f4 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003628: e5d7300c ldrb r3, [r7, #12] 3000362c: e59f02cc ldr r0, [pc, #716] ; 30003900 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 30003630: e5814000 str r4, [r1] if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 30003634: e584a010 str sl, [r4, #16] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003638: e1830000 orr r0, r3, r0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 3000363c: e584b00c str fp, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30003640: e284c014 add ip, r4, #20 30003644: e3a03000 mov r3, #0 30003648: e3a01001 mov r1, #1 3000364c: e3a02054 mov r2, #84 ; 0x54 30003650: e58dc000 str ip, [sp] 30003654: eb000298 bl 300040bc 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) 30003658: e2503000 subs r3, r0, #0 3000365c: 1a000095 bne 300038b8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30003660: e5d7200c ldrb r2, [r7, #12] 30003664: e59f0298 ldr r0, [pc, #664] ; 30003904 30003668: e284c018 add ip, r4, #24 3000366c: e1820000 orr r0, r2, r0 30003670: e3a01001 mov r1, #1 30003674: e3a02054 mov r2, #84 ; 0x54 30003678: e58dc000 str ip, [sp] 3000367c: eb00028e bl 300040bc 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) 30003680: e2501000 subs r1, r0, #0 30003684: 1a00008b bne 300038b8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30003688: e5d7300c ldrb r3, [r7, #12] 3000368c: e59f0274 ldr r0, [pc, #628] ; 30003908 30003690: e284c08c add ip, r4, #140 ; 0x8c 30003694: e1830000 orr r0, r3, r0 30003698: e3a02020 mov r2, #32 3000369c: e1a03001 mov r3, r1 300036a0: e58dc000 str ip, [sp] 300036a4: eb000284 bl 300040bc rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 300036a8: e2509000 subs r9, r0, #0 300036ac: 1a000081 bne 300038b8 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 300036b0: e59de008 ldr lr, [sp, #8] 300036b4: e284c098 add ip, r4, #152 ; 0x98 300036b8: e8be000f ldm lr!, {r0, r1, r2, r3} 300036bc: e8ac000f stmia ip!, {r0, r1, r2, r3} 300036c0: e89e000f ldm lr, {r0, r1, r2, r3} 300036c4: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300036c8: e59430b4 ldr r3, [r4, #180] ; 0xb4 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; 300036cc: e5849094 str r9, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300036d0: e3530002 cmp r3, #2 300036d4: 1a000016 bne 30003734 sc = rtems_task_create ( 300036d8: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 300036dc: e59f0228 ldr r0, [pc, #552] ; 3000390c <== NOT EXECUTED 300036e0: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 300036e4: e1830000 orr r0, r3, r0 <== NOT EXECUTED 300036e8: e3a0100a mov r1, #10 <== NOT EXECUTED 300036ec: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 300036f0: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 300036f4: e88d1200 stm sp, {r9, ip} <== NOT EXECUTED 300036f8: eb00036e bl 300044b8 <== 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) 300036fc: e250e000 subs lr, r0, #0 <== NOT EXECUTED 30003700: 1a00006c bne 300038b8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 30003704: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 30003708: e59f0200 ldr r0, [pc, #512] ; 30003910 <== NOT EXECUTED 3000370c: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 30003710: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003714: e3a01009 mov r1, #9 <== NOT EXECUTED 30003718: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3000371c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 30003720: e58de000 str lr, [sp] <== NOT EXECUTED 30003724: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30003728: eb000362 bl 300044b8 <== 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) 3000372c: e3500000 cmp r0, #0 <== NOT EXECUTED 30003730: 1a000060 bne 300038b8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 30003734: e59430a0 ldr r3, [r4, #160] ; 0xa0 30003738: e3530000 cmp r3, #0 3000373c: 0a000002 beq 3000374c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 30003740: e59430b4 ldr r3, [r4, #180] ; 0xb4 30003744: e3530002 cmp r3, #2 30003748: 1a00000b bne 3000377c sc = rtems_semaphore_create ( 3000374c: e59f31a4 ldr r3, [pc, #420] ; 300038f8 <== NOT EXECUTED 30003750: e59f01bc ldr r0, [pc, #444] ; 30003914 <== NOT EXECUTED 30003754: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 30003758: e3a01000 mov r1, #0 <== NOT EXECUTED 3000375c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 30003760: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 30003764: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 30003768: e1a03001 mov r3, r1 <== NOT EXECUTED 3000376c: e58dc000 str ip, [sp] <== NOT EXECUTED 30003770: eb000251 bl 300040bc <== 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) 30003774: e3500000 cmp r0, #0 <== NOT EXECUTED 30003778: 1a00004e bne 300038b8 <== NOT EXECUTED 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; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 3000377c: e3a0e01c mov lr, #28 30003780: e5c4e042 strb lr, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 30003784: e28ee063 add lr, lr, #99 ; 0x63 30003788: e5c4e043 strb lr, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 3000378c: e3a0e015 mov lr, #21 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 30003790: e3a02000 mov r2, #0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 30003794: e5c4e044 strb lr, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 30003798: e3a0e004 mov lr, #4 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; 3000379c: e58420b8 str r2, [r4, #184] ; 0xb8 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'; 300037a0: e5c4e045 strb lr, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 300037a4: e28ee00d add lr, lr, #13 /* 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; 300037a8: e594c064 ldr ip, [r4, #100] ; 0x64 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 300037ac: e5c4e049 strb lr, [r4, #73] ; 0x49 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; 300037b0: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 300037b4: e28ee002 add lr, lr, #2 300037b8: e5c4e04a strb lr, [r4, #74] ; 0x4a 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; tty->termios.c_cc[VINTR] = '\003'; 300037bc: e3a01003 mov r1, #3 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 300037c0: e28ee007 add lr, lr, #7 300037c4: e5c4e04b strb lr, [r4, #75] ; 0x4b 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; 300037c8: e0000391 mul r0, r1, r3 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 300037cc: e3a0e012 mov lr, #18 300037d0: e5c4e04d strb lr, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 300037d4: e3a0e00f mov lr, #15 300037d8: e5c4e04e strb lr, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 300037dc: e28ee008 add lr, lr, #8 300037e0: e5c4e04f strb lr, [r4, #79] ; 0x4f tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 300037e4: e59f310c ldr r3, [pc, #268] ; 300038f8 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'; 300037e8: e3a0e016 mov lr, #22 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; tty->termios.c_cc[VINTR] = '\003'; 300037ec: e5c41041 strb r1, [r4, #65] ; 0x41 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'; 300037f0: e5c4e050 strb lr, [r4, #80] ; 0x50 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'; 300037f4: e5c4204c strb r2, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 300037f8: e5c42051 strb r2, [r4, #81] ; 0x51 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; 300037fc: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 30003800: e5d3200c ldrb r2, [r3, #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; 30003804: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30003808: e59f0108 ldr r0, [pc, #264] ; 30003918 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3000380c: e352007a cmp r2, #122 ; 0x7a } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30003810: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30003814: e59f0100 ldr r0, [pc, #256] ; 3000391c tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003818: e2822001 add r2, r2, #1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3000381c: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30003820: e59f00f8 ldr r0, [pc, #248] ; 30003920 /* 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; 30003824: e1a010ac lsr r1, ip, #1 /* * 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; 30003828: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3000382c: e59f00f0 ldr r0, [pc, #240] ; 30003924 /* 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; 30003830: e58410bc str r1, [r4, #188] ; 0xbc * 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; 30003834: e584003c str r0, [r4, #60] ; 0x3c tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003838: e5c3200c strb r2, [r3, #12] c = 'a'; 3000383c: 03a02061 moveq r2, #97 ; 0x61 30003840: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 30003844: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 30003848: e5982000 ldr r2, [r8] if (!tty->refcount++) { 3000384c: e3530000 cmp r3, #0 30003850: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 30003854: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 30003858: e5853008 str r3, [r5, #8] 3000385c: 1a000016 bne 300038bc if (tty->device.firstOpen) 30003860: e5953098 ldr r3, [r5, #152] ; 0x98 30003864: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 30003868: 11a0000b movne r0, fp 3000386c: 11a0100a movne r1, sl 30003870: 11a02008 movne r2, r8 30003874: 11a0e00f movne lr, pc 30003878: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3000387c: e59530b4 ldr r3, [r5, #180] ; 0xb4 30003880: e3530002 cmp r3, #2 30003884: 1a00000c bne 300038bc sc = rtems_task_start(tty->rxTaskId, 30003888: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 3000388c: e59f1094 ldr r1, [pc, #148] ; 30003928 <== NOT EXECUTED 30003890: e1a02005 mov r2, r5 <== NOT EXECUTED 30003894: eb0003ac bl 3000474c <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 30003898: e3500000 cmp r0, #0 <== NOT EXECUTED 3000389c: 1a000005 bne 300038b8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 300038a0: e1a02005 mov r2, r5 <== NOT EXECUTED 300038a4: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 300038a8: e59f107c ldr r1, [pc, #124] ; 3000392c <== NOT EXECUTED 300038ac: eb0003a6 bl 3000474c <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 300038b0: e3500000 cmp r0, #0 <== NOT EXECUTED 300038b4: 0a000000 beq 300038bc <== NOT EXECUTED rtems_fatal_error_occurred (sc); 300038b8: eb000425 bl 30004954 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 300038bc: e59f302c ldr r3, [pc, #44] ; 300038f0 300038c0: e5930000 ldr r0, [r3] 300038c4: eb0002d4 bl 3000441c return RTEMS_SUCCESSFUL; } 300038c8: e1a00006 mov r0, r6 300038cc: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 300038d0: e3a00001 mov r0, #1 300038d4: e3a010e8 mov r1, #232 ; 0xe8 300038d8: eb001392 bl 30008728 if (tty == NULL) { 300038dc: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 300038e0: e1a05000 mov r5, r0 300038e4: e1a04000 mov r4, r0 if (tty == NULL) { 300038e8: 1affff20 bne 30003570 300038ec: eaffff39 b 300035d8 <== NOT EXECUTED 300038f0: 30019bdc .word 0x30019bdc 300038f4: 30019be4 .word 0x30019be4 300038f8: 300193dc .word 0x300193dc 300038fc: 30019be0 .word 0x30019be0 30003900: 54526900 .word 0x54526900 30003904: 54526f00 .word 0x54526f00 30003908: 54527800 .word 0x54527800 3000390c: 54785400 .word 0x54785400 30003910: 52785400 .word 0x52785400 30003914: 54527200 .word 0x54527200 30003918: 00002502 .word 0x00002502 3000391c: 00001805 .word 0x00001805 30003920: 000008bd .word 0x000008bd 30003924: 0000823b .word 0x0000823b 30003928: 3000399c .word 0x3000399c 3000392c: 30003930 .word 0x30003930 300024a8 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 300024a8: e59230b4 ldr r3, [r2, #180] ; 0xb4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 300024ac: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 300024b0: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 300024b4: e1a04002 mov r4, r2 300024b8: e1a0a000 mov sl, r0 300024bc: e1a06001 mov r6, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 300024c0: 1a000005 bne 300024dc (*tty->device.write)(tty->minor, (void *)buf, len); 300024c4: e1a01000 mov r1, r0 300024c8: e1a02006 mov r2, r6 300024cc: e5940010 ldr r0, [r4, #16] 300024d0: e1a0e00f mov lr, pc 300024d4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 300024d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 300024dc: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 300024e0: e3a07000 mov r7, #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; 300024e4: e3a09002 mov r9, #2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 300024e8: e3a0b001 mov fp, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 300024ec: ea00002e b 300025ac <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 300024f0: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 300024f4: e2850001 add r0, r5, #1 <== NOT EXECUTED 300024f8: eb004f4c bl 30016230 <__umodsi3> <== NOT EXECUTED 300024fc: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30002500: e10f8000 mrs r8, CPSR <== NOT EXECUTED 30002504: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 30002508: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 3000250c: ea00000a b 3000253c <== NOT EXECUTED tty->rawOutBufState = rob_wait; 30002510: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002514: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 30002518: e3a01000 mov r1, #0 <== NOT EXECUTED 3000251c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30002520: e1a02001 mov r2, r1 <== NOT EXECUTED 30002524: eb000776 bl 30004304 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002528: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3000252c: 1b000908 blne 30004954 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30002530: e10f8000 mrs r8, CPSR <== NOT EXECUTED 30002534: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 30002538: 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) { 3000253c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 30002540: e1550003 cmp r5, r3 <== NOT EXECUTED 30002544: 0afffff1 beq 30002510 <== 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++; 30002548: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 3000254c: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 30002550: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 30002554: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 30002558: e5943094 ldr r3, [r4, #148] ; 0x94 <== 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; 3000255c: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 30002560: e3530000 cmp r3, #0 <== NOT EXECUTED 30002564: 1a00000d bne 300025a0 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 30002568: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000256c: e3130010 tst r3, #16 <== 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; 30002570: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30002574: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 30002578: 158430b8 strne r3, [r4, #184] ; 0xb8 <== 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)) { 3000257c: 1a000006 bne 3000259c <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 30002580: 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, 30002584: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 30002588: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000258c: e0811003 add r1, r1, r3 <== NOT EXECUTED 30002590: e3a02001 mov r2, #1 <== NOT EXECUTED 30002594: e1a0e00f mov lr, pc <== NOT EXECUTED 30002598: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 3000259c: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300025a0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 300025a4: e2466001 sub r6, r6, #1 <== NOT EXECUTED 300025a8: e2877001 add r7, r7, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 300025ac: e3560000 cmp r6, #0 <== NOT EXECUTED 300025b0: 1affffce bne 300024f0 <== NOT EXECUTED 300025b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30002c7c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002c7c: e92d4ff1 push {r0, 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; 30002c80: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30002c84: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002c88: 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); 30002c8c: 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; 30002c90: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002c94: e1a02001 mov r2, r1 <== NOT EXECUTED 30002c98: e5940014 ldr r0, [r4, #20] <== 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; 30002c9c: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 30002ca0: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002ca4: eb000596 bl 30004304 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 30002ca8: e2506000 subs r6, r0, #0 <== NOT EXECUTED 30002cac: 1a0000c1 bne 30002fb8 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 30002cb0: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 30002cb4: e59f3304 ldr r3, [pc, #772] ; 30002fc0 <== NOT EXECUTED 30002cb8: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 30002cbc: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30002cc0: e3530000 cmp r3, #0 <== NOT EXECUTED 30002cc4: 0a000005 beq 30002ce0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 30002cc8: e1a01005 mov r1, r5 <== NOT EXECUTED 30002ccc: e1a00004 mov r0, r4 <== NOT EXECUTED 30002cd0: e1a0e00f mov lr, pc <== NOT EXECUTED 30002cd4: e12fff13 bx r3 <== NOT EXECUTED 30002cd8: e1a06000 mov r6, r0 <== NOT EXECUTED 30002cdc: ea0000b1 b 30002fa8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 30002ce0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 30002ce4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002ce8: e1520003 cmp r2, r3 <== NOT EXECUTED 30002cec: 1a00009a bne 30002f5c <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30002cf0: e59420a0 ldr r2, [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; 30002cf4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 30002cf8: e3520000 cmp r2, #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; 30002cfc: e584302c str r3, [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; 30002d00: e5846020 str r6, [r4, #32] <== NOT EXECUTED 30002d04: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 30002d08: 0a00003b beq 30002dfc <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 30002d0c: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 30002d10: e3530000 cmp r3, #0 <== NOT EXECUTED 30002d14: 1a000038 bne 30002dfc <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30002d18: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30002d1c: e3130002 tst r3, #2 <== NOT EXECUTED 30002d20: 0a00000d beq 30002d5c <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 30002d24: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002d28: e1a0e00f mov lr, pc <== NOT EXECUTED 30002d2c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 30002d30: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 30002d34: e1a01004 mov r1, r4 <== NOT EXECUTED 30002d38: 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) { 30002d3c: aa000002 bge 30002d4c <== NOT EXECUTED rtems_task_wake_after (1); 30002d40: e3a00001 mov r0, #1 <== NOT EXECUTED 30002d44: eb000698 bl 300047ac <== NOT EXECUTED 30002d48: eafffff5 b 30002d24 <== NOT EXECUTED } else { if (siproc (n, tty)) 30002d4c: ebffff67 bl 30002af0 <== NOT EXECUTED 30002d50: e3500000 cmp r0, #0 <== NOT EXECUTED 30002d54: 0afffff2 beq 30002d24 <== NOT EXECUTED 30002d58: ea00007f b 30002f5c <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 30002d5c: eb0003db bl 30003cd0 <== NOT EXECUTED 30002d60: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 30002d64: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002d68: e1a0e00f mov lr, pc <== NOT EXECUTED 30002d6c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 30002d70: e3500000 cmp r0, #0 <== NOT EXECUTED 30002d74: aa000013 bge 30002dc8 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 30002d78: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED 30002d7c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 30002d80: e3520000 cmp r2, #0 <== NOT EXECUTED 30002d84: 0a000005 beq 30002da0 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 30002d88: e3530000 cmp r3, #0 <== NOT EXECUTED 30002d8c: 0a00000a beq 30002dbc <== NOT EXECUTED 30002d90: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30002d94: e3530000 cmp r3, #0 <== NOT EXECUTED 30002d98: 0a000007 beq 30002dbc <== NOT EXECUTED 30002d9c: ea000001 b 30002da8 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 30002da0: e3530000 cmp r3, #0 <== NOT EXECUTED 30002da4: 0a00006c beq 30002f5c <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 30002da8: eb0003c8 bl 30003cd0 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 30002dac: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 30002db0: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 30002db4: e1500003 cmp r0, r3 <== NOT EXECUTED 30002db8: 8a000067 bhi 30002f5c <== NOT EXECUTED break; } } rtems_task_wake_after (1); 30002dbc: e3a00001 mov r0, #1 <== NOT EXECUTED 30002dc0: eb000679 bl 300047ac <== NOT EXECUTED 30002dc4: eaffffe6 b 30002d64 <== NOT EXECUTED } else { siproc (n, tty); 30002dc8: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 30002dcc: e1a01004 mov r1, r4 <== NOT EXECUTED 30002dd0: ebffff46 bl 30002af0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30002dd4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 30002dd8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30002ddc: e1520003 cmp r2, r3 <== NOT EXECUTED 30002de0: aa00005d bge 30002f5c <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30002de4: e3530000 cmp r3, #0 <== NOT EXECUTED 30002de8: 0affffdd beq 30002d64 <== NOT EXECUTED 30002dec: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 30002df0: e3530000 cmp r3, #0 <== NOT EXECUTED 30002df4: 0affffda beq 30002d64 <== NOT EXECUTED 30002df8: eaffffd7 b 30002d5c <== 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; 30002dfc: e5948074 ldr r8, [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, 30002e00: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 30002e04: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30002e08: e59f91b4 ldr r9, [pc, #436] ; 30002fc4 <== NOT EXECUTED 30002e0c: ea000041 b 30002f18 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 30002e10: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 30002e14: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 30002e18: e2800001 add r0, r0, #1 <== NOT EXECUTED 30002e1c: eb004d03 bl 30016230 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 30002e20: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 30002e24: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 30002e28: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 30002e2c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 30002e30: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 30002e34: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 30002e38: e0823003 add r3, r2, r3 <== NOT EXECUTED 30002e3c: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 30002e40: eb004cfa bl 30016230 <__umodsi3> <== NOT EXECUTED 30002e44: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 30002e48: e1500003 cmp r0, r3 <== NOT EXECUTED 30002e4c: 2a00001f bcs 30002ed0 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30002e50: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30002e54: e59f316c ldr r3, [pc, #364] ; 30002fc8 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30002e58: e3c22001 bic r2, r2, #1 <== NOT EXECUTED 30002e5c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30002e60: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 30002e64: e59f115c ldr r1, [pc, #348] ; 30002fc8 <== NOT EXECUTED 30002e68: e0023003 and r3, r2, r3 <== NOT EXECUTED 30002e6c: e1530001 cmp r3, r1 <== NOT EXECUTED 30002e70: 1a00000b bne 30002ea4 <== NOT EXECUTED 30002e74: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30002e78: e3530000 cmp r3, #0 <== NOT EXECUTED 30002e7c: 0a000002 beq 30002e8c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 30002e80: 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)) 30002e84: e3130020 tst r3, #32 <== NOT EXECUTED 30002e88: 0a000005 beq 30002ea4 <== 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, 30002e8c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30002e90: e1a0100b mov r1, fp <== NOT EXECUTED 30002e94: e3a02001 mov r2, #1 <== NOT EXECUTED 30002e98: e1a0e00f mov lr, pc <== NOT EXECUTED 30002e9c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 30002ea0: ea00000a b 30002ed0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 30002ea4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30002ea8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 30002eac: 0a000007 beq 30002ed0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 30002eb0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30002eb4: 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; 30002eb8: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30002ebc: 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; 30002ec0: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 30002ec4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30002ec8: 11a0e00f movne lr, pc <== NOT EXECUTED 30002ecc: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 30002ed0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30002ed4: e3130002 tst r3, #2 <== NOT EXECUTED 30002ed8: 0a000005 beq 30002ef4 <== NOT EXECUTED if (siproc (c, tty)) 30002edc: e1a00008 mov r0, r8 <== NOT EXECUTED 30002ee0: e1a01004 mov r1, r4 <== NOT EXECUTED 30002ee4: ebffff01 bl 30002af0 <== NOT EXECUTED 30002ee8: e3500000 cmp r0, #0 <== NOT EXECUTED 30002eec: 1a000007 bne 30002f10 <== NOT EXECUTED 30002ef0: ea000007 b 30002f14 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 30002ef4: e1a00008 mov r0, r8 <== NOT EXECUTED 30002ef8: e1a01004 mov r1, r4 <== NOT EXECUTED 30002efc: ebfffefb bl 30002af0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30002f00: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 30002f04: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30002f08: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f0c: ba000000 blt 30002f14 <== NOT EXECUTED 30002f10: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 30002f14: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30002f18: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 30002f1c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 30002f20: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f24: 0a000004 beq 30002f3c <== NOT EXECUTED 30002f28: e5993000 ldr r3, [r9] <== NOT EXECUTED 30002f2c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30002f30: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30002f34: e1520003 cmp r2, r3 <== NOT EXECUTED 30002f38: baffffb4 blt 30002e10 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 30002f3c: e35a0000 cmp sl, #0 <== NOT EXECUTED 30002f40: 0a000005 beq 30002f5c <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 30002f44: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 30002f48: e594106c ldr r1, [r4, #108] ; 0x6c <== NOT EXECUTED 30002f4c: e1a02008 mov r2, r8 <== NOT EXECUTED 30002f50: eb0004eb bl 30004304 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 30002f54: e3500000 cmp r0, #0 <== NOT EXECUTED 30002f58: 0affffee beq 30002f18 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 30002f5c: e3a03000 mov r3, #0 <== NOT EXECUTED 30002f60: ea000006 b 30002f80 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30002f64: e594101c ldr r1, [r4, #28] <== NOT EXECUTED count--; 30002f68: e2477001 sub r7, r7, #1 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30002f6c: e7d12002 ldrb r2, [r1, r2] <== NOT EXECUTED 30002f70: e59d1000 ldr r1, [sp] <== NOT EXECUTED 30002f74: e7c12003 strb r2, [r1, r3] <== NOT EXECUTED 30002f78: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 30002f7c: e2833001 add r3, r3, #1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30002f80: e3570000 cmp r7, #0 <== NOT EXECUTED 30002f84: 0a000004 beq 30002f9c <== NOT EXECUTED 30002f88: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 30002f8c: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 30002f90: e2820001 add r0, r2, #1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30002f94: e1520001 cmp r2, r1 <== NOT EXECUTED 30002f98: bafffff1 blt 30002f64 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 30002f9c: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 30002fa0: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 30002fa4: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 30002fa8: e3a03000 mov r3, #0 <== NOT EXECUTED 30002fac: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 30002fb0: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 30002fb4: eb000518 bl 3000441c <== NOT EXECUTED return sc; } 30002fb8: e1a00006 mov r0, r6 <== NOT EXECUTED 30002fbc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30002fc0: 30019a08 .word 0x30019a08 30002fc4: 300193dc .word 0x300193dc 30002fc8: 00000202 .word 0x00000202 30001f88 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30001f88: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 30001f8c: e59f31d0 ldr r3, [pc, #464] ; 30002164 <== 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) { 30001f90: e92d4070 push {r4, r5, r6, lr} <== 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)) 30001f94: e0023003 and r3, r2, r3 <== NOT EXECUTED 30001f98: e59f21c8 ldr r2, [pc, #456] ; 30002168 <== 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) { 30001f9c: 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)) 30001fa0: e1530002 cmp r3, r2 <== NOT EXECUTED 30001fa4: 1a00000e bne 30001fe4 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 30001fa8: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 30001fac: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 30001fb0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30001fb4: e1a0e00f mov lr, pc <== NOT EXECUTED 30001fb8: 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 ( 30001fbc: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30001fc0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30001fc4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 30001fc8: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30001fcc: 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--; 30001fd0: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30001fd4: e3811002 orr r1, r1, #2 <== NOT EXECUTED 30001fd8: 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--; 30001fdc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 30001fe0: ea000011 b 3000202c <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 30001fe4: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 30001fe8: e2033003 and r3, r3, #3 <== NOT EXECUTED 30001fec: e3530002 cmp r3, #2 <== NOT EXECUTED 30001ff0: 1a000010 bne 30002038 <== 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, 30001ff4: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 30001ff8: e3a02001 mov r2, #1 <== NOT EXECUTED 30001ffc: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30002000: e1a0e00f mov lr, pc <== NOT EXECUTED 30002004: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 30002008: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3000200c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30002010: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 30002014: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30002018: 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--; 3000201c: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30002020: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 30002024: 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--; 30002028: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000202c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30002030: e3a05001 mov r5, #1 <== NOT EXECUTED 30002034: ea000048 b 3000215c <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 30002038: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 3000203c: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 30002040: e1520003 cmp r2, r3 <== NOT EXECUTED 30002044: 1a000005 bne 30002060 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 30002048: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 3000204c: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30002050: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 30002054: 0b0008f0 bleq 3000441c <== NOT EXECUTED 30002058: e3a05000 mov r5, #0 <== NOT EXECUTED 3000205c: ea00003e b 3000215c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30002060: e10f3000 mrs r3, CPSR <== NOT EXECUTED 30002064: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 30002068: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 3000206c: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 30002070: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 30002074: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002078: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 3000207c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 30002080: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 30002084: e0800003 add r0, r0, r3 <== NOT EXECUTED 30002088: eb005068 bl 30016230 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 3000208c: e5943094 ldr r3, [r4, #148] ; 0x94 <== 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; 30002090: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30002094: e3530002 cmp r3, #2 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 30002098: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 3000209c: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 300020a0: 0b0008dd bleq 3000441c <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 300020a4: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 300020a8: e1560003 cmp r6, r3 <== NOT EXECUTED 300020ac: 1a00000a bne 300020dc <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 300020b0: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 300020b4: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 300020b8: e1530005 cmp r3, r5 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 300020bc: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 300020c0: 01a05003 moveq r5, r3 <== NOT EXECUTED 300020c4: 0a000023 beq 30002158 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 300020c8: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 300020cc: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 300020d0: e1a0e00f mov lr, pc <== NOT EXECUTED 300020d4: e12fff13 bx r3 <== NOT EXECUTED 300020d8: ea00001e b 30002158 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 300020dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300020e0: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 300020e4: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 300020e8: 1a00000a bne 30002118 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300020ec: e10f3000 mrs r3, CPSR <== NOT EXECUTED 300020f0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 300020f4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED == (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; 300020f8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 300020fc: e3822020 orr r2, r2, #32 <== NOT EXECUTED 30002100: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 30002104: e3a02001 mov r2, #1 <== NOT EXECUTED 30002108: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000210c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 30002110: e3a05000 mov r5, #0 <== NOT EXECUTED 30002114: ea00000f b 30002158 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 30002118: e5943080 ldr r3, [r4, #128] ; 0x80 <== 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, 3000211c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 30002120: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 30002124: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 30002128: 95945080 ldrls r5, [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)) { 3000212c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 30002130: e0665005 rsb r5, r6, r5 <== 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)) { 30002134: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED 30002138: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 3000213c: e3a03001 mov r3, #1 <== NOT EXECUTED 30002140: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 30002144: e0811006 add r1, r1, r6 <== NOT EXECUTED 30002148: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000214c: e1a02005 mov r2, r5 <== NOT EXECUTED 30002150: e1a0e00f mov lr, pc <== NOT EXECUTED 30002154: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 30002158: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 3000215c: e1a00005 mov r0, r5 <== NOT EXECUTED 30002160: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30002164: 00000403 .word 0x00000403 30002168: 00000401 .word 0x00000401 3000399c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 3000399c: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 300039a0: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 300039a4: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 300039a8: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 300039ac: e1a0300d mov r3, sp <== NOT EXECUTED 300039b0: e3a01002 mov r1, #2 <== NOT EXECUTED 300039b4: e3a02000 mov r2, #0 <== NOT EXECUTED 300039b8: e3a00003 mov r0, #3 <== NOT EXECUTED 300039bc: eb0000e0 bl 30003d44 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 300039c0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300039c4: e3130001 tst r3, #1 <== NOT EXECUTED 300039c8: 0a000003 beq 300039dc <== NOT EXECUTED tty->rxTaskId = 0; 300039cc: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 300039d0: e1a00005 mov r0, r5 <== NOT EXECUTED 300039d4: eb000309 bl 30004600 <== NOT EXECUTED 300039d8: eafffff3 b 300039ac <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 300039dc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300039e0: e1a0e00f mov lr, pc <== NOT EXECUTED 300039e4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 300039e8: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 300039ec: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 300039f0: 0affffed beq 300039ac <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 300039f4: e1a00004 mov r0, r4 <== NOT EXECUTED 300039f8: e1a01006 mov r1, r6 <== NOT EXECUTED 300039fc: e3a02001 mov r2, #1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 30003a00: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 30003a04: ebfff9f4 bl 300021dc <== NOT EXECUTED 30003a08: eaffffe7 b 300039ac <== NOT EXECUTED 30001f7c : 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); 30001f7c: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 30001f80: e3a01002 mov r1, #2 <== NOT EXECUTED 30001f84: ea0007ca b 30003eb4 <== NOT EXECUTED 30003930 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 30003930: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30003934: e59f705c ldr r7, [pc, #92] ; 30003998 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 30003938: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3000393c: e3a05000 mov r5, #0 <== NOT EXECUTED 30003940: e1a0300d mov r3, sp <== NOT EXECUTED 30003944: e3a01002 mov r1, #2 <== NOT EXECUTED 30003948: e3a02000 mov r2, #0 <== NOT EXECUTED 3000394c: e3a00003 mov r0, #3 <== NOT EXECUTED 30003950: eb0000fb bl 30003d44 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 30003954: e59d3000 ldr r3, [sp] <== 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); 30003958: 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) { 3000395c: e3130001 tst r3, #1 <== NOT EXECUTED 30003960: 0a000003 beq 30003974 <== NOT EXECUTED tty->txTaskId = 0; 30003964: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 30003968: e1a00005 mov r0, r5 <== NOT EXECUTED 3000396c: eb000323 bl 30004600 <== NOT EXECUTED 30003970: eafffff2 b 30003940 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30003974: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 30003978: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 3000397c: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 30003980: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 30003984: 11a0e00f movne lr, pc <== NOT EXECUTED 30003988: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 3000398c: e1a00004 mov r0, r4 <== NOT EXECUTED 30003990: ebfff97c bl 30001f88 <== NOT EXECUTED 30003994: eaffffe9 b 30003940 <== NOT EXECUTED 30003998: 30019a08 .word 0x30019a08 30002b50 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002b50: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002b54: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30002b58: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002b5c: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30002b60: e1a04000 mov r4, 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); 30002b64: e1a02001 mov r2, r1 30002b68: e5950018 ldr r0, [r5, #24] 30002b6c: eb0005e4 bl 30004304 if (sc != RTEMS_SUCCESSFUL) 30002b70: e2506000 subs r6, r0, #0 30002b74: 1a000022 bne 30002c04 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 30002b78: e59520cc ldr r2, [r5, #204] ; 0xcc 30002b7c: e59f3088 ldr r3, [pc, #136] ; 30002c0c 30002b80: e0833282 add r3, r3, r2, lsl #5 30002b84: e593300c ldr r3, [r3, #12] 30002b88: e3530000 cmp r3, #0 30002b8c: 0a000005 beq 30002ba8 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 30002b90: e1a01004 mov r1, r4 <== NOT EXECUTED 30002b94: e1a00005 mov r0, r5 <== NOT EXECUTED 30002b98: e1a0e00f mov lr, pc <== NOT EXECUTED 30002b9c: e12fff13 bx r3 <== NOT EXECUTED 30002ba0: e1a06000 mov r6, r0 <== NOT EXECUTED 30002ba4: ea000014 b 30002bfc <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 30002ba8: e5953034 ldr r3, [r5, #52] ; 0x34 30002bac: e3130001 tst r3, #1 uint32_t count = args->count; 30002bb0: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 30002bb4: 1594a00c ldrne sl, [r4, #12] 30002bb8: 11a07006 movne r7, r6 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) { 30002bbc: 1a000004 bne 30002bd4 30002bc0: ea000007 b 30002be4 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 30002bc4: e7da0007 ldrb r0, [sl, r7] 30002bc8: ebfffe7a bl 300025b8 30002bcc: e2877001 add r7, r7, #1 30002bd0: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30002bd4: e3580000 cmp r8, #0 oproc (*buffer++, tty); 30002bd8: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30002bdc: 1afffff8 bne 30002bc4 30002be0: ea000003 b 30002bf4 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 30002be4: e594000c ldr r0, [r4, #12] <== NOT EXECUTED 30002be8: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED 30002bec: e1a02005 mov r2, r5 <== NOT EXECUTED 30002bf0: ebfffe2c bl 300024a8 <== NOT EXECUTED args->bytes_moved = args->count; 30002bf4: e5943010 ldr r3, [r4, #16] 30002bf8: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 30002bfc: e5950018 ldr r0, [r5, #24] 30002c00: eb000605 bl 3000441c return sc; } 30002c04: e1a00006 mov r0, r6 30002c08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30002c0c: 30019a08 .word 0x30019a08 30005e30 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 30005e30: 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) 30005e34: e2107202 ands r7, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 30005e38: e1a06000 mov r6, r0 <== NOT EXECUTED 30005e3c: e1a09001 mov r9, r1 <== NOT EXECUTED 30005e40: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 30005e44: 0a00000d beq 30005e80 <== NOT EXECUTED { if (rtems_panic_in_progress++) 30005e48: e59f3160 ldr r3, [pc, #352] ; 30005fb0 <== NOT EXECUTED 30005e4c: e5932000 ldr r2, [r3] <== NOT EXECUTED 30005e50: e3520000 cmp r2, #0 <== NOT EXECUTED 30005e54: e2822001 add r2, r2, #1 <== NOT EXECUTED 30005e58: e5832000 str r2, [r3] <== NOT EXECUTED 30005e5c: 0a000003 beq 30005e70 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30005e60: e59f314c ldr r3, [pc, #332] ; 30005fb4 <== NOT EXECUTED 30005e64: e5932000 ldr r2, [r3] <== NOT EXECUTED 30005e68: e2822001 add r2, r2, #1 <== NOT EXECUTED 30005e6c: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 30005e70: e59f3138 ldr r3, [pc, #312] ; 30005fb0 <== NOT EXECUTED 30005e74: e5933000 ldr r3, [r3] <== NOT EXECUTED 30005e78: e3530002 cmp r3, #2 <== NOT EXECUTED 30005e7c: ca000049 bgt 30005fa8 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30005e80: e59f3130 ldr r3, [pc, #304] ; 30005fb8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 30005e84: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30005e88: e5933000 ldr r3, [r3] <== NOT EXECUTED 30005e8c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30005e90: eb003538 bl 30013378 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 30005e94: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED 30005e98: 0a000001 beq 30005ea4 <== NOT EXECUTED local_errno = errno; 30005e9c: eb003442 bl 30012fac <__errno> <== NOT EXECUTED 30005ea0: e5905000 ldr r5, [r0] <== 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); 30005ea4: e59fa10c ldr sl, [pc, #268] ; 30005fb8 <== NOT EXECUTED 30005ea8: e1a02004 mov r2, r4 <== NOT EXECUTED 30005eac: e59a3000 ldr r3, [sl] <== NOT EXECUTED 30005eb0: e1a01009 mov r1, r9 <== NOT EXECUTED 30005eb4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005eb8: eb004d4f bl 300193fc <== NOT EXECUTED if (status) 30005ebc: e3580000 cmp r8, #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); 30005ec0: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 30005ec4: 0a000008 beq 30005eec <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30005ec8: e59a3000 ldr r3, [sl] <== NOT EXECUTED 30005ecc: e1a00008 mov r0, r8 <== NOT EXECUTED 30005ed0: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 30005ed4: ebffffd1 bl 30005e20 <== NOT EXECUTED 30005ed8: e59f10dc ldr r1, [pc, #220] ; 30005fbc <== NOT EXECUTED 30005edc: e1a02000 mov r2, r0 <== NOT EXECUTED 30005ee0: e1a00008 mov r0, r8 <== NOT EXECUTED 30005ee4: eb0035e1 bl 30013670 <== NOT EXECUTED 30005ee8: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 30005eec: e3550000 cmp r5, #0 <== NOT EXECUTED 30005ef0: 0a000015 beq 30005f4c <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 30005ef4: da00000d ble 30005f30 <== NOT EXECUTED 30005ef8: e1a00005 mov r0, r5 <== NOT EXECUTED 30005efc: eb0038ee bl 300142bc <== NOT EXECUTED 30005f00: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 30005f04: e3530000 cmp r3, #0 <== NOT EXECUTED 30005f08: 0a000008 beq 30005f30 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 30005f0c: e59f30a4 ldr r3, [pc, #164] ; 30005fb8 <== NOT EXECUTED 30005f10: e1a00005 mov r0, r5 <== NOT EXECUTED 30005f14: e5933000 ldr r3, [r3] <== NOT EXECUTED 30005f18: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 30005f1c: eb0038e6 bl 300142bc <== NOT EXECUTED 30005f20: e59f1098 ldr r1, [pc, #152] ; 30005fc0 <== NOT EXECUTED 30005f24: e1a02000 mov r2, r0 <== NOT EXECUTED 30005f28: e1a00008 mov r0, r8 <== NOT EXECUTED 30005f2c: ea000004 b 30005f44 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 30005f30: e59f3080 ldr r3, [pc, #128] ; 30005fb8 <== NOT EXECUTED 30005f34: e59f1088 ldr r1, [pc, #136] ; 30005fc4 <== NOT EXECUTED 30005f38: e5933000 ldr r3, [r3] <== NOT EXECUTED 30005f3c: e1a02005 mov r2, r5 <== NOT EXECUTED 30005f40: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005f44: eb0035c9 bl 30013670 <== NOT EXECUTED 30005f48: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 30005f4c: e59f8064 ldr r8, [pc, #100] ; 30005fb8 <== NOT EXECUTED 30005f50: e59f1070 ldr r1, [pc, #112] ; 30005fc8 <== NOT EXECUTED 30005f54: e5983000 ldr r3, [r8] <== NOT EXECUTED 30005f58: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005f5c: eb0035c3 bl 30013670 <== NOT EXECUTED (void) fflush(stderr); 30005f60: e5983000 ldr r3, [r8] <== 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"); 30005f64: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 30005f68: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 30005f6c: eb003501 bl 30013378 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 30005f70: e3160203 tst r6, #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"); 30005f74: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 30005f78: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 30005f7c: e3570000 cmp r7, #0 <== NOT EXECUTED 30005f80: 0a000004 beq 30005f98 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 30005f84: e3a00000 mov r0, #0 <== NOT EXECUTED 30005f88: e59f103c ldr r1, [pc, #60] ; 30005fcc <== NOT EXECUTED 30005f8c: eb00001b bl 30006000 <== NOT EXECUTED _exit(local_errno); 30005f90: e1a00005 mov r0, r5 <== NOT EXECUTED 30005f94: eb0002c5 bl 30006ab0 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 30005f98: e59f1030 ldr r1, [pc, #48] ; 30005fd0 <== NOT EXECUTED 30005f9c: e1a00007 mov r0, r7 <== NOT EXECUTED 30005fa0: eb000016 bl 30006000 <== NOT EXECUTED abort(); 30005fa4: eb0033f7 bl 30012f88 <== NOT EXECUTED 30005fa8: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 30005fac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 30005fb0: 30024a1c .word 0x30024a1c 30005fb4: 30024bac .word 0x30024bac 30005fb8: 30024228 .word 0x30024228 30005fbc: 30023005 .word 0x30023005 30005fc0: 30023013 .word 0x30023013 30005fc4: 30023020 .word 0x30023020 30005fc8: 30022ffc .word 0x30022ffc 30005fcc: 30023034 .word 0x30023034 30005fd0: 30023049 .word 0x30023049 300222c8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 300222c8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 300222cc: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 300222d0: e59fb0d4 ldr fp, [pc, #212] ; 300223ac limit++; continue; } sign = 1; } if (!isdigit(c)) 300222d4: e59f90d4 ldr r9, [pc, #212] ; 300223b0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 300222d8: e1a05000 mov r5, r0 300222dc: e58d1000 str r1, [sp] 300222e0: e3e08102 mvn r8, #-2147483648 ; 0x80000000 300222e4: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 300222e8: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 300222ec: e5953004 ldr r3, [r5, #4] 300222f0: e2433001 sub r3, r3, #1 300222f4: e3530000 cmp r3, #0 300222f8: e5853004 str r3, [r5, #4] 300222fc: a5953000 ldrge r3, [r5] 30022300: a4d36001 ldrbge r6, [r3], #1 30022304: a5853000 strge r3, [r5] 30022308: aa000003 bge 3002231c 3002230c: e59b0000 ldr r0, [fp] <== NOT EXECUTED 30022310: e1a01005 mov r1, r5 <== NOT EXECUTED 30022314: eb00707b bl 3003e508 <__srget_r> <== NOT EXECUTED 30022318: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 3002231c: e356003a cmp r6, #58 ; 0x3a 30022320: 0a000019 beq 3002238c break; if (sign == 0) { 30022324: e3540000 cmp r4, #0 30022328: 1a000004 bne 30022340 if (c == '-') { 3002232c: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 30022330: 02888001 addeq r8, r8, #1 30022334: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 30022338: 0affffeb beq 300222ec sign = -1; limit++; continue; 3002233c: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 30022340: e5993000 ldr r3, [r9] 30022344: e0833006 add r3, r3, r6 30022348: e5d33001 ldrb r3, [r3, #1] 3002234c: e3130004 tst r3, #4 30022350: 0a000013 beq 300223a4 return 0; d = c - '0'; if ((i > (limit / 10)) 30022354: e1a00008 mov r0, r8 30022358: e3a0100a mov r1, #10 3002235c: eb00baff bl 30050f60 <__aeabi_uidiv> 30022360: e1570000 cmp r7, r0 30022364: 8a00000e bhi 300223a4 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 30022368: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 3002236c: 1a000004 bne 30022384 30022370: e1a00008 mov r0, r8 <== NOT EXECUTED 30022374: e3a0100a mov r1, #10 <== NOT EXECUTED 30022378: eb00bb8c bl 300511b0 <__umodsi3> <== NOT EXECUTED 3002237c: e1560000 cmp r6, r0 <== NOT EXECUTED 30022380: 8a000007 bhi 300223a4 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 30022384: e027679a mla r7, sl, r7, r6 30022388: eaffffd7 b 300222ec } if (sign == 0) 3002238c: e3540000 cmp r4, #0 return 0; *val = i * sign; 30022390: 10030497 mulne r3, r7, r4 30022394: 159d2000 ldrne r2, [sp] 30022398: 13a00001 movne r0, #1 3002239c: 15823000 strne r3, [r2] return 1; 300223a0: 1a000000 bne 300223a8 300223a4: e3a00000 mov r0, #0 <== NOT EXECUTED } 300223a8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 300223ac: 3005d620 .word 0x3005d620 300223b0: 3005d614 .word 0x3005d614 300223b4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 300223b4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 300223b8: e1a04002 mov r4, r2 int c; *name = *bufp; 300223bc: 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) { 300223c0: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; for (;;) { c = getc(fp); 300223c4: e59f70c4 ldr r7, [pc, #196] ; 30022490 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 300223c8: e5812000 str r2, [r1] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 300223cc: e1a05000 mov r5, r0 300223d0: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 300223d4: e5953004 ldr r3, [r5, #4] 300223d8: e2433001 sub r3, r3, #1 300223dc: e3530000 cmp r3, #0 300223e0: e5853004 str r3, [r5, #4] 300223e4: a5953000 ldrge r3, [r5] 300223e8: a4d30001 ldrbge r0, [r3], #1 300223ec: a5853000 strge r3, [r5] 300223f0: b5970000 ldrlt r0, [r7] 300223f4: b1a01005 movlt r1, r5 300223f8: bb007042 bllt 3003e508 <__srget_r> if (c == ':') { 300223fc: e350003a cmp r0, #58 ; 0x3a 30022400: 1a000002 bne 30022410 if (nlFlag) 30022404: e3560000 cmp r6, #0 30022408: 0a000013 beq 3002245c 3002240c: ea00001d b 30022488 <== NOT EXECUTED return 0; break; } if (c == '\n') { 30022410: e350000a cmp r0, #10 30022414: 1a000002 bne 30022424 if (!nlFlag) 30022418: e3560000 cmp r6, #0 3002241c: 1a00000e bne 3002245c 30022420: ea000018 b 30022488 <== NOT EXECUTED return 0; break; } if (c == EOF) 30022424: e3700001 cmn r0, #1 30022428: 0a000016 beq 30022488 return 0; if (*nleft < 2) 3002242c: e5983000 ldr r3, [r8] 30022430: e3530001 cmp r3, #1 30022434: 9a000013 bls 30022488 return 0; **bufp = c; 30022438: e5943000 ldr r3, [r4] 3002243c: e5c30000 strb r0, [r3] ++(*bufp); 30022440: e5942000 ldr r2, [r4] --(*nleft); 30022444: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 30022448: e2822001 add r2, r2, #1 --(*nleft); 3002244c: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 30022450: e5842000 str r2, [r4] --(*nleft); 30022454: e5883000 str r3, [r8] } 30022458: eaffffdd b 300223d4 **bufp = '\0'; 3002245c: e5943000 ldr r3, [r4] 30022460: e3a02000 mov r2, #0 30022464: e5c32000 strb r2, [r3] ++(*bufp); 30022468: e5942000 ldr r2, [r4] --(*nleft); 3002246c: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 30022470: e2822001 add r2, r2, #1 --(*nleft); 30022474: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 30022478: e5842000 str r2, [r4] --(*nleft); 3002247c: e5883000 str r3, [r8] 30022480: e3a00001 mov r0, #1 return 1; 30022484: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30022488: e3a00000 mov r0, #0 <== NOT EXECUTED } 3002248c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30022490: 3005d620 .word 0x3005d620 30022494 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 30022494: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30022498: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 3002249c: e28d6008 add r6, sp, #8 300224a0: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 300224a4: e58d2008 str r2, [sp, #8] 300224a8: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 300224ac: e3a08000 mov r8, #0 300224b0: e1a02006 mov r2, r6 300224b4: e1a03005 mov r3, r5 300224b8: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 300224bc: e1a07000 mov r7, r0 300224c0: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 300224c4: ebffffba bl 300223b4 300224c8: e1500008 cmp r0, r8 300224cc: 0a00003b beq 300225c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 300224d0: e1a00007 mov r0, r7 300224d4: e2841004 add r1, r4, #4 300224d8: e1a02006 mov r2, r6 300224dc: e1a03005 mov r3, r5 300224e0: e58d8000 str r8, [sp] 300224e4: ebffffb2 bl 300223b4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 300224e8: e1500008 cmp r0, r8 300224ec: 0a000033 beq 300225c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 300224f0: e1a00007 mov r0, r7 300224f4: e28d1010 add r1, sp, #16 300224f8: ebffff72 bl 300222c8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 300224fc: e1500008 cmp r0, r8 30022500: 0a00002e beq 300225c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 30022504: e1a03005 mov r3, r5 30022508: e28d100c add r1, sp, #12 3002250c: e1a00007 mov r0, r7 30022510: e1a02006 mov r2, r6 30022514: e3a05001 mov r5, #1 30022518: e58d5000 str r5, [sp] 3002251c: ebffffa4 bl 300223b4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 30022520: e1500008 cmp r0, r8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 30022524: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 30022528: 159d100c ldrne 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; 3002252c: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 30022530: 1a000002 bne 30022540 30022534: ea000021 b 300225c0 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 30022538: e353002c cmp r3, #44 ; 0x2c memcount++; 3002253c: 02855001 addeq r5, r5, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 30022540: e7d13008 ldrb r3, [r1, r8] if(*cp == ',') memcount++; 30022544: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 30022548: e3530000 cmp r3, #0 3002254c: 1afffff9 bne 30022538 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 30022550: e1a05105 lsl r5, r5, #2 30022554: e59d2004 ldr r2, [sp, #4] 30022558: e2855013 add r5, r5, #19 3002255c: e1520005 cmp r2, r5 30022560: 3a000016 bcc 300225c0 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 30022564: e59d2008 ldr r2, [sp, #8] * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 30022568: e1a00003 mov r0, 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); 3002256c: e282200f add r2, r2, #15 30022570: e3c2200f bic r2, r2, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 30022574: e5821000 str r1, [r2] /* * 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); 30022578: e584200c str r2, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 3002257c: e59d200c ldr r2, [sp, #12] 30022580: e2823001 add r3, r2, #1 30022584: e3a02001 mov r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 30022588: ea000005 b 300225a4 if(*cp == ',') { 3002258c: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 30022590: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 30022594: 0594100c ldreq r1, [r4, #12] 30022598: 07813102 streq r3, [r1, r2, lsl #2] 3002259c: 02822001 addeq r2, r2, #1 300225a0: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 300225a4: e5531001 ldrb r1, [r3, #-1] 300225a8: e3510000 cmp r1, #0 300225ac: 1afffff6 bne 3002258c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 300225b0: e594300c ldr r3, [r4, #12] 300225b4: e3a00001 mov r0, #1 300225b8: e7831102 str r1, [r3, r2, lsl #2] return 1; 300225bc: ea000000 b 300225c4 300225c0: e3a00000 mov r0, #0 <== NOT EXECUTED } 300225c4: e28dd014 add sp, sp, #20 300225c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30022608 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 30022608: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3002260c: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022610: e28d7008 add r7, sp, #8 30022614: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 30022618: e58d2008 str r2, [sp, #8] 3002261c: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022620: e3a08000 mov r8, #0 30022624: e1a02007 mov r2, r7 30022628: e1a03006 mov r3, r6 3002262c: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 30022630: e1a05000 mov r5, r0 30022634: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022638: ebffff5d bl 300223b4 3002263c: e1500008 cmp r0, r8 30022640: 0a000038 beq 30022728 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 30022644: e1a00005 mov r0, r5 30022648: e2841004 add r1, r4, #4 3002264c: e1a02007 mov r2, r7 30022650: e1a03006 mov r3, r6 30022654: e58d8000 str r8, [sp] 30022658: ebffff55 bl 300223b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 3002265c: e1500008 cmp r0, r8 30022660: 0a000030 beq 30022728 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 30022664: e1a00005 mov r0, r5 30022668: e28d1010 add r1, sp, #16 3002266c: ebffff15 bl 300222c8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022670: e1500008 cmp r0, r8 30022674: 0a00002b beq 30022728 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 30022678: e1a00005 mov r0, r5 3002267c: e28d100c add r1, sp, #12 30022680: ebffff10 bl 300222c8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022684: e1500008 cmp r0, r8 30022688: 0a000026 beq 30022728 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 3002268c: e1a00005 mov r0, r5 30022690: e284100c add r1, r4, #12 30022694: e1a02007 mov r2, r7 30022698: e1a03006 mov r3, r6 3002269c: e58d8000 str r8, [sp] 300226a0: ebffff43 bl 300223b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 300226a4: e1500008 cmp r0, r8 300226a8: 0a00001e beq 30022728 || !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) 300226ac: e1a00005 mov r0, r5 300226b0: e2841010 add r1, r4, #16 300226b4: e1a02007 mov r2, r7 300226b8: e1a03006 mov r3, r6 300226bc: e58d8000 str r8, [sp] 300226c0: ebffff3b bl 300223b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 300226c4: e1500008 cmp r0, r8 300226c8: 0a000016 beq 30022728 || !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) 300226cc: e1a00005 mov r0, r5 300226d0: e2841014 add r1, r4, #20 300226d4: e1a02007 mov r2, r7 300226d8: e1a03006 mov r3, r6 300226dc: e58d8000 str r8, [sp] 300226e0: ebffff33 bl 300223b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 300226e4: e1500008 cmp r0, r8 300226e8: 0a00000e beq 30022728 || !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)) 300226ec: e1a00005 mov r0, r5 300226f0: e1a02007 mov r2, r7 300226f4: e1a03006 mov r3, r6 300226f8: e3a05001 mov r5, #1 300226fc: e2841018 add r1, r4, #24 30022700: e58d5000 str r5, [sp] 30022704: ebffff2a bl 300223b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 30022708: e1500008 cmp r0, r8 3002270c: 0a000005 beq 30022728 || !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; 30022710: e1dd30bc ldrh r3, [sp, #12] 30022714: e1a00005 mov r0, r5 30022718: e1c430ba strh r3, [r4, #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; 3002271c: e1dd31b0 ldrh r3, [sp, #16] 30022720: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 30022724: ea000000 b 3002272c 30022728: e3a00000 mov r0, #0 <== NOT EXECUTED } 3002272c: e28dd014 add sp, sp, #20 30022730: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30022270 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 30022270: e59f300c ldr r3, [pc, #12] ; 30022284 <== NOT EXECUTED 30022274: e5933000 ldr r3, [r3] <== NOT EXECUTED 30022278: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 3002227c: e3a00000 mov r0, #0 <== NOT EXECUTED 30022280: e12fff1e bx lr <== NOT EXECUTED 30022284: 3005ce08 .word 0x3005ce08 30022838 : return NULL; return &grent; } void setgrent(void) { 30022838: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 3002283c: ebffffcb bl 30022770 <== NOT EXECUTED if (group_fp != NULL) 30022840: e59f3020 ldr r3, [pc, #32] ; 30022868 <== NOT EXECUTED 30022844: e5930000 ldr r0, [r3] <== NOT EXECUTED 30022848: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 3002284c: 1b005a7b blne 30039240 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 30022850: e59f0014 ldr r0, [pc, #20] ; 3002286c <== NOT EXECUTED 30022854: e59f1014 ldr r1, [pc, #20] ; 30022870 <== NOT EXECUTED 30022858: eb005c9b bl 30039acc <== NOT EXECUTED 3002285c: e59f3004 ldr r3, [pc, #4] ; 30022868 <== NOT EXECUTED 30022860: e5830000 str r0, [r3] <== NOT EXECUTED } 30022864: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30022868: 300608c8 .word 0x300608c8 3002286c: 30055f40 .word 0x30055f40 30022870: 30056cda .word 0x30056cda 30022a08 : return NULL; return &pwent; } void setpwent(void) { 30022a08: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 30022a0c: ebffff57 bl 30022770 <== NOT EXECUTED if (passwd_fp != NULL) 30022a10: e59f3020 ldr r3, [pc, #32] ; 30022a38 <== NOT EXECUTED 30022a14: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 30022a18: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 30022a1c: 1b005a07 blne 30039240 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 30022a20: e59f0014 ldr r0, [pc, #20] ; 30022a3c <== NOT EXECUTED 30022a24: e59f1014 ldr r1, [pc, #20] ; 30022a40 <== NOT EXECUTED 30022a28: eb005c27 bl 30039acc <== NOT EXECUTED 30022a2c: e59f3004 ldr r3, [pc, #4] ; 30022a38 <== NOT EXECUTED 30022a30: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 30022a34: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 30022a38: 300608c8 .word 0x300608c8 30022a3c: 30055e92 .word 0x30055e92 30022a40: 30056cda .word 0x30056cda 300053f0 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 300053f0: e59f300c ldr r3, [pc, #12] ; 30005404 <== NOT EXECUTED 300053f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 300053f8: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 300053fc: e3a00000 mov r0, #0 <== NOT EXECUTED 30005400: e12fff1e bx lr <== NOT EXECUTED 30005404: 3005ce08 .word 0x3005ce08 30002af0 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30002af0: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 30002af4: e59f3050 ldr r3, [pc, #80] ; 30002b4c <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002af8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30002afc: e0023003 and r3, r2, r3 <== NOT EXECUTED 30002b00: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30002b04: e1a04001 mov r4, r1 <== NOT EXECUTED 30002b08: 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)) { 30002b0c: 0a00000b beq 30002b40 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30002b10: e3a01000 mov r1, #0 <== NOT EXECUTED 30002b14: e1a02001 mov r2, r1 <== NOT EXECUTED 30002b18: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 30002b1c: eb0005f8 bl 30004304 <== NOT EXECUTED i = iproc (c, tty); 30002b20: e1a01004 mov r1, r4 <== NOT EXECUTED 30002b24: e1a00005 mov r0, r5 <== NOT EXECUTED 30002b28: ebffff8b bl 3000295c <== NOT EXECUTED 30002b2c: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 30002b30: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 30002b34: eb000638 bl 3000441c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 30002b38: e1a00005 mov r0, r5 <== NOT EXECUTED 30002b3c: e8bd8030 pop {r4, r5, pc} <== 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); 30002b40: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 30002b44: 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); 30002b48: eaffff83 b 3000295c <== NOT EXECUTED 30002b4c: 00000e78 .word 0x00000e78 300068ac : int _STAT_NAME( const char *path, struct stat *buf ) { 300068ac: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 300068b0: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 300068b4: e24dd018 sub sp, sp, #24 300068b8: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 300068bc: 1a000002 bne 300068cc rtems_set_errno_and_return_minus_one( EFAULT ); 300068c0: eb00ca11 bl 3003910c <__errno> 300068c4: e3a0300e mov r3, #14 300068c8: ea000018 b 30006930 status = rtems_filesystem_evaluate_path( path, strlen( path ), 300068cc: eb00e499 bl 3003fb38 300068d0: e28d4004 add r4, sp, #4 300068d4: e1a01000 mov r1, r0 300068d8: e3a0c001 mov ip, #1 300068dc: e1a00006 mov r0, r6 300068e0: e3a02000 mov r2, #0 300068e4: e1a03004 mov r3, r4 300068e8: e58dc000 str ip, [sp] 300068ec: ebfffa49 bl 30005218 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 300068f0: e2501000 subs r1, r0, #0 300068f4: 1a00000e bne 30006934 return -1; if ( !loc.handlers->fstat_h ){ 300068f8: e59d300c ldr r3, [sp, #12] 300068fc: e5933018 ldr r3, [r3, #24] 30006900: e3530000 cmp r3, #0 30006904: 1a00000c bne 3000693c rtems_filesystem_freenode( &loc ); 30006908: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3000690c: e3530000 cmp r3, #0 <== NOT EXECUTED 30006910: 0a000004 beq 30006928 <== NOT EXECUTED 30006914: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30006918: e3530000 cmp r3, #0 <== NOT EXECUTED 3000691c: 11a00004 movne r0, r4 <== NOT EXECUTED 30006920: 11a0e00f movne lr, pc <== NOT EXECUTED 30006924: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30006928: eb00c9f7 bl 3003910c <__errno> <== NOT EXECUTED 3000692c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30006930: e5803000 str r3, [r0] 30006934: e3e05000 mvn r5, #0 30006938: ea000010 b 30006980 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 3000693c: e3a02048 mov r2, #72 ; 0x48 30006940: e1a00005 mov r0, r5 30006944: eb00d6a8 bl 3003c3ec status = (*loc.handlers->fstat_h)( &loc, buf ); 30006948: e1a01005 mov r1, r5 3000694c: e59d300c ldr r3, [sp, #12] 30006950: e1a00004 mov r0, r4 30006954: e1a0e00f mov lr, pc 30006958: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 3000695c: e59d3010 ldr r3, [sp, #16] * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 30006960: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 30006964: e3530000 cmp r3, #0 30006968: 0a000004 beq 30006980 3000696c: e593301c ldr r3, [r3, #28] 30006970: e3530000 cmp r3, #0 30006974: 11a00004 movne r0, r4 30006978: 11a0e00f movne lr, pc 3000697c: 112fff13 bxne r3 return status; } 30006980: e1a00005 mov r0, r5 30006984: e28dd018 add sp, sp, #24 30006988: e8bd8070 pop {r4, r5, r6, pc} 30023668 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 30023668: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 3002366c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 30023670: e1a05001 mov r5, r1 <== NOT EXECUTED 30023674: 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 ) ) 30023678: eb00712e bl 3003fb38 <== NOT EXECUTED 3002367c: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30023680: e1a01000 mov r1, r0 <== NOT EXECUTED 30023684: e3a0c001 mov ip, #1 <== NOT EXECUTED 30023688: e1a00006 mov r0, r6 <== NOT EXECUTED 3002368c: e3a02000 mov r2, #0 <== NOT EXECUTED 30023690: e1a03004 mov r3, r4 <== NOT EXECUTED 30023694: e58dc000 str ip, [sp] <== NOT EXECUTED 30023698: ebff86de bl 30005218 <== NOT EXECUTED 3002369c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 300236a0: 1a000007 bne 300236c4 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 300236a4: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 300236a8: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 300236ac: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 300236b0: e3530000 cmp r3, #0 <== NOT EXECUTED 300236b4: 1a000004 bne 300236cc <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 300236b8: eb005693 bl 3003910c <__errno> <== NOT EXECUTED 300236bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300236c0: e5803000 str r3, [r0] <== NOT EXECUTED 300236c4: e3e05000 mvn r5, #0 <== NOT EXECUTED 300236c8: ea000010 b 30023710 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 300236cc: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 300236d0: e1a00005 mov r0, r5 <== NOT EXECUTED 300236d4: eb006344 bl 3003c3ec <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 300236d8: e1a01005 mov r1, r5 <== NOT EXECUTED 300236dc: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 300236e0: e286001c add r0, r6, #28 <== NOT EXECUTED 300236e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300236e8: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 300236ec: e59d3010 ldr r3, [sp, #16] <== 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 ); 300236f0: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 300236f4: e3530000 cmp r3, #0 <== NOT EXECUTED 300236f8: 0a000004 beq 30023710 <== NOT EXECUTED 300236fc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 30023700: e3530000 cmp r3, #0 <== NOT EXECUTED 30023704: 11a00004 movne r0, r4 <== NOT EXECUTED 30023708: 11a0e00f movne lr, pc <== NOT EXECUTED 3002370c: 112fff13 bxne r3 <== NOT EXECUTED return result; } 30023710: e1a00005 mov r0, r5 <== NOT EXECUTED 30023714: e28dd018 add sp, sp, #24 <== NOT EXECUTED 30023718: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3002371c : int symlink( const char *actualpath, const char *sympath ) { 3002371c: 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 ); 30023720: e5d13000 ldrb r3, [r1] int symlink( const char *actualpath, const char *sympath ) { 30023724: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 30023728: e353002f cmp r3, #47 ; 0x2f 3002372c: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 30023730: e1a06001 mov r6, r1 30023734: e1a04000 mov r4, r0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 30023738: 13a05000 movne r5, #0 3002373c: 03a05001 moveq r5, #1 30023740: 0a000001 beq 3002374c 30023744: e3530000 cmp r3, #0 30023748: 1a000005 bne 30023764 3002374c: e59f30dc ldr r3, [pc, #220] ; 30023830 30023750: e1a0c00d mov ip, sp 30023754: e593e000 ldr lr, [r3] 30023758: e3a05001 mov r5, #1 3002375c: e28ee018 add lr, lr, #24 30023760: ea000003 b 30023774 30023764: e59f30c4 ldr r3, [pc, #196] ; 30023830 30023768: e1a0c00d mov ip, sp 3002376c: e593e000 ldr lr, [r3] 30023770: e28ee004 add lr, lr, #4 30023774: e8be000f ldm lr!, {r0, r1, r2, r3} 30023778: e8ac000f stmia ip!, {r0, r1, r2, r3} 3002377c: e59e3000 ldr r3, [lr] 30023780: e58c3000 str r3, [ip] if ( !loc.ops->evalformake_h ) { 30023784: e59d300c ldr r3, [sp, #12] 30023788: e5933004 ldr r3, [r3, #4] 3002378c: e3530000 cmp r3, #0 30023790: 0a000010 beq 300237d8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 30023794: e0860005 add r0, r6, r5 30023798: e1a0100d mov r1, sp 3002379c: e28d2014 add r2, sp, #20 300237a0: e1a0e00f mov lr, pc 300237a4: e12fff13 bx r3 if ( result != 0 ) 300237a8: e3500000 cmp r0, #0 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 300237ac: e1a0700d mov r7, sp if ( result != 0 ) 300237b0: 1a00000b bne 300237e4 return -1; if ( !loc.ops->symlink_h ) { 300237b4: e59d200c ldr r2, [sp, #12] 300237b8: e5923038 ldr r3, [r2, #56] ; 0x38 300237bc: e3530000 cmp r3, #0 300237c0: 1a000009 bne 300237ec rtems_filesystem_freenode( &loc ); 300237c4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 300237c8: e3530000 cmp r3, #0 <== NOT EXECUTED 300237cc: 11a0000d movne r0, sp <== NOT EXECUTED 300237d0: 11a0e00f movne lr, pc <== NOT EXECUTED 300237d4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 300237d8: eb00564b bl 3003910c <__errno> <== NOT EXECUTED 300237dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 300237e0: e5803000 str r3, [r0] <== NOT EXECUTED 300237e4: e3e04000 mvn r4, #0 300237e8: ea00000d b 30023824 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 300237ec: e1a01004 mov r1, r4 300237f0: e1a0000d mov r0, sp 300237f4: e59d2014 ldr r2, [sp, #20] 300237f8: e1a0e00f mov lr, pc 300237fc: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 30023800: e59d300c ldr r3, [sp, #12] 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); 30023804: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 30023808: e3530000 cmp r3, #0 3002380c: 0a000004 beq 30023824 30023810: e593301c ldr r3, [r3, #28] 30023814: e3530000 cmp r3, #0 30023818: 11a0000d movne r0, sp 3002381c: 11a0e00f movne lr, pc 30023820: 112fff13 bxne r3 return result; } 30023824: e1a00004 mov r0, r4 30023828: e28dd018 add sp, sp, #24 3002382c: e8bd80f0 pop {r4, r5, r6, r7, pc} 30023830: 3005ce08 .word 0x3005ce08 3000f6b0 : int fd, int opt, struct termios *tp ) { switch (opt) { 3000f6b0: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { 3000f6b4: e92d4030 push {r4, r5, lr} 3000f6b8: e1a04002 mov r4, r2 3000f6bc: e1a05000 mov r5, r0 switch (opt) { 3000f6c0: 0a00000a beq 3000f6f0 3000f6c4: e3510001 cmp r1, #1 <== NOT EXECUTED 3000f6c8: 0a000003 beq 3000f6dc <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000f6cc: eb0013e0 bl 30014654 <__errno> <== NOT EXECUTED 3000f6d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000f6d4: e5803000 str r3, [r0] <== NOT EXECUTED 3000f6d8: ea000009 b 3000f704 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 3000f6dc: e3a01003 mov r1, #3 <== NOT EXECUTED 3000f6e0: e3a02000 mov r2, #0 <== NOT EXECUTED 3000f6e4: eb000e17 bl 30012f48 <== NOT EXECUTED 3000f6e8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f6ec: ba000004 blt 3000f704 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3000f6f0: e1a00005 mov r0, r5 3000f6f4: e1a02004 mov r2, r4 3000f6f8: e3a01002 mov r1, #2 } } 3000f6fc: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 3000f700: ea000e10 b 30012f48 } } 3000f704: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000f708: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3000c1d0 : #include int unlink( const char *path ) { 3000c1d0: e92d4070 push {r4, r5, r6, lr} 3000c1d4: e24dd02c sub sp, sp, #44 ; 0x2c 3000c1d8: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 3000c1dc: ebffd419 bl 30001248 if ( parentpathlen == 0 ) 3000c1e0: e2505000 subs r5, r0, #0 3000c1e4: 1a000015 bne 3000c240 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 3000c1e8: e5d63000 ldrb r3, [r6] 3000c1ec: e353002f cmp r3, #47 ; 0x2f 3000c1f0: 1353005c cmpne r3, #92 ; 0x5c 3000c1f4: 0a000001 beq 3000c200 3000c1f8: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c1fc: 1a000005 bne 3000c218 <== NOT EXECUTED 3000c200: e59f3238 ldr r3, [pc, #568] ; 3000c440 3000c204: e28dc018 add ip, sp, #24 3000c208: e593e000 ldr lr, [r3] 3000c20c: e3a04000 mov r4, #0 3000c210: e28ee018 add lr, lr, #24 3000c214: ea000004 b 3000c22c 3000c218: e59f3220 ldr r3, [pc, #544] ; 3000c440 <== NOT EXECUTED 3000c21c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 3000c220: e593e000 ldr lr, [r3] <== NOT EXECUTED 3000c224: e1a04005 mov r4, r5 <== NOT EXECUTED 3000c228: e28ee004 add lr, lr, #4 <== NOT EXECUTED 3000c22c: e8be000f ldm lr!, {r0, r1, r2, r3} 3000c230: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000c234: e59e3000 ldr r3, [lr] 3000c238: e58c3000 str r3, [ip] 3000c23c: ea000009 b 3000c268 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 3000c240: e3a0c000 mov ip, #0 3000c244: e1a00006 mov r0, r6 3000c248: e1a01005 mov r1, r5 3000c24c: e3a02002 mov r2, #2 3000c250: e28d3018 add r3, sp, #24 3000c254: e58dc000 str ip, [sp] 3000c258: ebffd442 bl 30001368 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 3000c25c: e3500000 cmp r0, #0 3000c260: 1a000072 bne 3000c430 3000c264: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 3000c268: e28dc004 add ip, sp, #4 3000c26c: e28de018 add lr, sp, #24 3000c270: e8be000f ldm lr!, {r0, r1, r2, r3} 3000c274: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000c278: e59e3000 ldr r3, [lr] name = path + parentpathlen; 3000c27c: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 3000c280: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 3000c284: e1a00005 mov r0, r5 3000c288: eb0005d2 bl 3000d9d8 3000c28c: e1a01000 mov r1, r0 3000c290: e1a00005 mov r0, r5 3000c294: ebffd3df bl 30001218 3000c298: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 3000c29c: e1a00006 mov r0, r6 3000c2a0: eb0005cc bl 3000d9d8 3000c2a4: e28d5004 add r5, sp, #4 3000c2a8: e3a0c000 mov ip, #0 3000c2ac: e1a01000 mov r1, r0 3000c2b0: e1a0200c mov r2, ip 3000c2b4: e1a00006 mov r0, r6 3000c2b8: e1a03005 mov r3, r5 3000c2bc: e58dc000 str ip, [sp] 3000c2c0: ebffd3f0 bl 30001288 0, &loc, false ); if ( result != 0 ) { 3000c2c4: e3500000 cmp r0, #0 3000c2c8: 0a00000b beq 3000c2fc if ( free_parentloc ) 3000c2cc: e3540000 cmp r4, #0 3000c2d0: 0a000056 beq 3000c430 rtems_filesystem_freenode( &parentloc ); 3000c2d4: e59d3024 ldr r3, [sp, #36] ; 0x24 3000c2d8: e3530000 cmp r3, #0 3000c2dc: 0a000053 beq 3000c430 3000c2e0: e593301c ldr r3, [r3, #28] 3000c2e4: e3530000 cmp r3, #0 3000c2e8: 0a000050 beq 3000c430 3000c2ec: e28d0018 add r0, sp, #24 3000c2f0: e1a0e00f mov lr, pc 3000c2f4: e12fff13 bx r3 3000c2f8: ea00004c b 3000c430 return -1; } if ( !loc.ops->node_type_h ) { 3000c2fc: e59d2010 ldr r2, [sp, #16] 3000c300: e5923010 ldr r3, [r2, #16] 3000c304: e3530000 cmp r3, #0 3000c308: 0a00001c beq 3000c380 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 ) { 3000c30c: e1a00005 mov r0, r5 3000c310: e1a0e00f mov lr, pc 3000c314: e12fff13 bx r3 3000c318: e3500001 cmp r0, #1 3000c31c: e59d2010 ldr r2, [sp, #16] 3000c320: 1a000013 bne 3000c374 rtems_filesystem_freenode( &loc ); 3000c324: e3520000 cmp r2, #0 3000c328: 0a000004 beq 3000c340 3000c32c: e592301c ldr r3, [r2, #28] 3000c330: e3530000 cmp r3, #0 3000c334: 11a00005 movne r0, r5 3000c338: 11a0e00f movne lr, pc 3000c33c: 112fff13 bxne r3 if ( free_parentloc ) 3000c340: e3540000 cmp r4, #0 3000c344: 0a000007 beq 3000c368 rtems_filesystem_freenode( &parentloc ); 3000c348: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3000c34c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c350: 0a000004 beq 3000c368 <== NOT EXECUTED 3000c354: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000c358: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c35c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 3000c360: 11a0e00f movne lr, pc <== NOT EXECUTED 3000c364: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 3000c368: eb0001a9 bl 3000ca14 <__errno> 3000c36c: e3a03015 mov r3, #21 3000c370: ea000013 b 3000c3c4 } if ( !loc.ops->unlink_h ) { 3000c374: e592300c ldr r3, [r2, #12] 3000c378: e3530000 cmp r3, #0 3000c37c: 1a000012 bne 3000c3cc rtems_filesystem_freenode( &loc ); 3000c380: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3000c384: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c388: 11a00005 movne r0, r5 <== NOT EXECUTED 3000c38c: 11a0e00f movne lr, pc <== NOT EXECUTED 3000c390: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 3000c394: e3540000 cmp r4, #0 <== NOT EXECUTED 3000c398: 0a000007 beq 3000c3bc <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 3000c39c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 3000c3a0: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c3a4: 0a000004 beq 3000c3bc <== NOT EXECUTED 3000c3a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3000c3ac: e3530000 cmp r3, #0 <== NOT EXECUTED 3000c3b0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 3000c3b4: 11a0e00f movne lr, pc <== NOT EXECUTED 3000c3b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000c3bc: eb000194 bl 3000ca14 <__errno> <== NOT EXECUTED 3000c3c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000c3c4: e5803000 str r3, [r0] 3000c3c8: ea000018 b 3000c430 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 3000c3cc: e28d0018 add r0, sp, #24 3000c3d0: e1a01005 mov r1, r5 3000c3d4: e1a0e00f mov lr, pc 3000c3d8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 3000c3dc: e59d3010 ldr r3, [sp, #16] if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 3000c3e0: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 3000c3e4: e3530000 cmp r3, #0 3000c3e8: 0a000004 beq 3000c400 3000c3ec: e593301c ldr r3, [r3, #28] 3000c3f0: e3530000 cmp r3, #0 3000c3f4: 11a00005 movne r0, r5 3000c3f8: 11a0e00f movne lr, pc 3000c3fc: 112fff13 bxne r3 if ( free_parentloc ) 3000c400: e3540000 cmp r4, #0 3000c404: 0a00000a beq 3000c434 rtems_filesystem_freenode( &parentloc ); 3000c408: e59d3024 ldr r3, [sp, #36] ; 0x24 3000c40c: e3530000 cmp r3, #0 3000c410: 0a000007 beq 3000c434 3000c414: e593301c ldr r3, [r3, #28] 3000c418: e3530000 cmp r3, #0 3000c41c: 0a000004 beq 3000c434 3000c420: e28d0018 add r0, sp, #24 3000c424: e1a0e00f mov lr, pc 3000c428: e12fff13 bx r3 3000c42c: ea000000 b 3000c434 3000c430: e3e06000 mvn r6, #0 return result; } 3000c434: e1a00006 mov r0, r6 3000c438: e28dd02c add sp, sp, #44 ; 0x2c 3000c43c: e8bd8070 pop {r4, r5, r6, pc} 3000c440: 300193f0 .word 0x300193f0 30008748 : */ int unmount( const char *path ) { 30008748: e92d4030 push {r4, r5, lr} 3000874c: e24dd018 sub sp, sp, #24 30008750: 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 ) ) 30008754: eb00dcf7 bl 3003fb38 30008758: e28d4004 add r4, sp, #4 3000875c: e1a01000 mov r1, r0 30008760: e3a0c001 mov ip, #1 30008764: e1a00005 mov r0, r5 30008768: e3a02000 mov r2, #0 3000876c: e1a03004 mov r3, r4 30008770: e58dc000 str ip, [sp] 30008774: ebfff2a7 bl 30005218 30008778: e3500000 cmp r0, #0 3000877c: 1a000057 bne 300088e0 return -1; mt_entry = loc.mt_entry; 30008780: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 30008784: e59d2004 ldr r2, [sp, #4] 30008788: e595101c ldr r1, [r5, #28] 3000878c: e59d3010 ldr r3, [sp, #16] 30008790: e1510002 cmp r1, r2 30008794: 0a000009 beq 300087c0 /* * 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 ); 30008798: e3530000 cmp r3, #0 3000879c: 0a000004 beq 300087b4 300087a0: e593301c ldr r3, [r3, #28] 300087a4: e3530000 cmp r3, #0 300087a8: 11a00004 movne r0, r4 300087ac: 11a0e00f movne lr, pc 300087b0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 300087b4: eb00c254 bl 3003910c <__errno> 300087b8: e3a0300d mov r3, #13 300087bc: ea000023 b 30008850 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 300087c0: e3530000 cmp r3, #0 300087c4: 0a000004 beq 300087dc 300087c8: e593301c ldr r3, [r3, #28] 300087cc: e3530000 cmp r3, #0 300087d0: 11a00004 movne r0, r4 300087d4: 11a0e00f movne lr, pc 300087d8: 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; 300087dc: e5953014 ldr r3, [r5, #20] 300087e0: e5933028 ldr r3, [r3, #40] ; 0x28 300087e4: e3530000 cmp r3, #0 300087e8: 0a000003 beq 300087fc fs_root_loc = &mt_entry->mt_fs_root; 300087ec: e5953028 ldr r3, [r5, #40] ; 0x28 300087f0: e593302c ldr r3, [r3, #44] ; 0x2c 300087f4: e3530000 cmp r3, #0 300087f8: 1a000002 bne 30008808 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 ); 300087fc: eb00c242 bl 3003910c <__errno> <== NOT EXECUTED 30008800: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30008804: ea000011 b 30008850 <== NOT EXECUTED * 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 ) 30008808: e59f30f0 ldr r3, [pc, #240] ; 30008900 3000880c: e5933000 ldr r3, [r3] 30008810: e5933014 ldr r3, [r3, #20] 30008814: e1530005 cmp r3, r5 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 30008818: 159f20e4 ldrne r2, [pc, #228] ; 30008904 3000881c: 14923004 ldrne r3, [r2], #4 * 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 ) 30008820: 1a000005 bne 3000883c 30008824: ea000007 b 30008848 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; fs_root_loc = &mt_entry->mt_fs_root; 30008828: e5930018 ldr r0, [r3, #24] 3000882c: e595102c ldr r1, [r5, #44] ; 0x2c 30008830: e1500001 cmp r0, r1 30008834: 0a000003 beq 30008848 * 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 ) { 30008838: e5933000 ldr r3, [r3] 3000883c: e1530002 cmp r3, r2 30008840: 1afffff8 bne 30008828 30008844: ea000028 b 300088ec * 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 ); 30008848: eb00c22f bl 3003910c <__errno> 3000884c: e3a03010 mov r3, #16 30008850: e5803000 str r3, [r0] 30008854: ea000021 b 300088e0 * 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 ) 30008858: e5953014 ldr r3, [r5, #20] 3000885c: e1a00005 mov r0, r5 30008860: e1a0e00f mov lr, pc 30008864: e593f028 ldr pc, [r3, #40] ; 0x28 30008868: e2504000 subs r4, r0, #0 3000886c: 1a00001b bne 300088e0 * 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){ 30008870: e5953028 ldr r3, [r5, #40] ; 0x28 30008874: e1a00005 mov r0, r5 30008878: e1a0e00f mov lr, pc 3000887c: e593f02c ldr pc, [r3, #44] ; 0x2c 30008880: e3500000 cmp r0, #0 30008884: 0a000007 beq 300088a8 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 30008888: e1a00005 mov r0, r5 <== NOT EXECUTED 3000888c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 30008890: e1a0e00f mov lr, pc <== NOT EXECUTED 30008894: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 30008898: e3500000 cmp r0, #0 <== NOT EXECUTED 3000889c: 0a00000f beq 300088e0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 300088a0: e1a00004 mov r0, r4 <== NOT EXECUTED 300088a4: eb00047b bl 30009a98 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 300088a8: e1a00005 mov r0, r5 300088ac: eb00053f bl 30009db0 <_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 ); 300088b0: e5953014 ldr r3, [r5, #20] 300088b4: e3530000 cmp r3, #0 300088b8: 0a000004 beq 300088d0 300088bc: e593301c ldr r3, [r3, #28] 300088c0: e3530000 cmp r3, #0 300088c4: 12850008 addne r0, r5, #8 300088c8: 11a0e00f movne lr, pc 300088cc: 112fff13 bxne r3 free( mt_entry ); 300088d0: e1a00005 mov r0, r5 300088d4: ebfff27d bl 300052d0 300088d8: e3a00000 mov r0, #0 return 0; 300088dc: ea000000 b 300088e4 300088e0: e3e00000 mvn r0, #0 } 300088e4: e28dd018 add sp, sp, #24 300088e8: e8bd8030 pop {r4, r5, pc} * 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 ) 300088ec: e1a00005 mov r0, r5 300088f0: ebfff324 bl 30005588 300088f4: e3500001 cmp r0, #1 300088f8: 1affffd6 bne 30008858 300088fc: eaffffd1 b 30008848 30008900: 3005ce08 .word 0x3005ce08 30008904: 30060bf8 .word 0x30060bf8 300238c4 : int utime( const char *path, const struct utimbuf *times ) { 300238c4: e92d4070 push {r4, r5, r6, lr} 300238c8: e24dd018 sub sp, sp, #24 300238cc: e1a05001 mov r5, r1 300238d0: 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 ) ) 300238d4: eb007097 bl 3003fb38 300238d8: e28d4004 add r4, sp, #4 300238dc: e1a01000 mov r1, r0 300238e0: e3a0c001 mov ip, #1 300238e4: e1a00006 mov r0, r6 300238e8: e3a02000 mov r2, #0 300238ec: e1a03004 mov r3, r4 300238f0: e58dc000 str ip, [sp] 300238f4: ebff8647 bl 30005218 300238f8: e3500000 cmp r0, #0 300238fc: 1a00000b bne 30023930 return -1; if ( !temp_loc.ops->utime_h ){ 30023900: e59d2010 ldr r2, [sp, #16] 30023904: e5923030 ldr r3, [r2, #48] ; 0x30 30023908: e3530000 cmp r3, #0 3002390c: 1a000009 bne 30023938 rtems_filesystem_freenode( &temp_loc ); 30023910: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 30023914: e3530000 cmp r3, #0 <== NOT EXECUTED 30023918: 11a00004 movne r0, r4 <== NOT EXECUTED 3002391c: 11a0e00f movne lr, pc <== NOT EXECUTED 30023920: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 30023924: eb0055f8 bl 3003910c <__errno> <== NOT EXECUTED 30023928: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3002392c: e5803000 str r3, [r0] <== NOT EXECUTED 30023930: e3e05000 mvn r5, #0 30023934: ea00000c b 3002396c } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 30023938: e8950006 ldm r5, {r1, r2} 3002393c: e1a00004 mov r0, r4 30023940: e1a0e00f mov lr, pc 30023944: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 30023948: e59d3010 ldr r3, [sp, #16] 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 ); 3002394c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 30023950: e3530000 cmp r3, #0 30023954: 0a000004 beq 3002396c 30023958: e593301c ldr r3, [r3, #28] 3002395c: e3530000 cmp r3, #0 30023960: 11a00004 movne r0, r4 30023964: 11a0e00f movne lr, pc 30023968: 112fff13 bxne r3 return result; } 3002396c: e1a00005 mov r0, r5 30023970: e28dd018 add sp, sp, #24 30023974: e8bd8070 pop {r4, r5, r6, pc} 30017c74 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017c74: e59f30b0 ldr r3, [pc, #176] ; 30017d2c ssize_t write( int fd, const void *buffer, size_t count ) { 30017c78: e92d4070 push {r4, r5, r6, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017c7c: e5933000 ldr r3, [r3] ssize_t write( int fd, const void *buffer, size_t count ) { 30017c80: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 30017c84: e1500003 cmp r0, r3 30017c88: 2a000005 bcs 30017ca4 iop = rtems_libio_iop( fd ); 30017c8c: e59f309c ldr r3, [pc, #156] ; 30017d30 30017c90: e5934000 ldr r4, [r3] 30017c94: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 30017c98: e5943014 ldr r3, [r4, #20] 30017c9c: e3130c01 tst r3, #256 ; 0x100 30017ca0: 1a000002 bne 30017cb0 30017ca4: ebffd35a bl 3000ca14 <__errno> <== NOT EXECUTED 30017ca8: e3a03009 mov r3, #9 <== NOT EXECUTED 30017cac: ea00000f b 30017cf0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 30017cb0: e3510000 cmp r1, #0 30017cb4: 0a000004 beq 30017ccc rtems_libio_check_count( count ); 30017cb8: e3520000 cmp r2, #0 30017cbc: 01a00002 moveq r0, r2 30017cc0: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 30017cc4: e3130004 tst r3, #4 30017cc8: 1a000002 bne 30017cd8 30017ccc: ebffd350 bl 3000ca14 <__errno> <== NOT EXECUTED 30017cd0: e3a03016 mov r3, #22 <== NOT EXECUTED 30017cd4: ea000005 b 30017cf0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 30017cd8: e594303c ldr r3, [r4, #60] ; 0x3c 30017cdc: e593300c ldr r3, [r3, #12] 30017ce0: e3530000 cmp r3, #0 30017ce4: 1a000004 bne 30017cfc rtems_set_errno_and_return_minus_one( ENOTSUP ); 30017ce8: ebffd349 bl 3000ca14 <__errno> <== NOT EXECUTED 30017cec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30017cf0: e5803000 str r3, [r0] <== NOT EXECUTED 30017cf4: e3e00000 mvn r0, #0 <== NOT EXECUTED 30017cf8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 30017cfc: e1a00004 mov r0, r4 30017d00: e1a0e00f mov lr, pc 30017d04: e12fff13 bx r3 if ( rc > 0 ) 30017d08: e3500000 cmp r0, #0 30017d0c: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 30017d10: e284600c add r6, r4, #12 30017d14: e8960060 ldm r6, {r5, r6} 30017d18: e0952000 adds r2, r5, r0 30017d1c: e0a63fc0 adc r3, r6, r0, asr #31 30017d20: e584200c str r2, [r4, #12] 30017d24: e5843010 str r3, [r4, #16] return rc; } 30017d28: e8bd8070 pop {r4, r5, r6, pc} 30017d2c: 300191f8 .word 0x300191f8 30017d30: 30019b98 .word 0x30019b98 30005520 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 30005520: e59f3164 ldr r3, [pc, #356] ; 3000568c ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 30005524: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 30005528: e5933000 ldr r3, [r3] ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 3000552c: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 30005530: e1500003 cmp r0, r3 30005534: 2a000005 bcs 30005550 iop = rtems_libio_iop( fd ); 30005538: e59f3150 ldr r3, [pc, #336] ; 30005690 3000553c: e5936000 ldr r6, [r3] 30005540: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 30005544: e5963014 ldr r3, [r6, #20] 30005548: e3130c01 tst r3, #256 ; 0x100 3000554c: 1a000002 bne 3000555c 30005550: eb002656 bl 3000eeb0 <__errno> 30005554: e3a03009 mov r3, #9 30005558: ea000026 b 300055f8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 3000555c: e3130004 tst r3, #4 30005560: 0a000022 beq 300055f0 /* * Argument validation on IO vector */ if ( !iov ) 30005564: e3510000 cmp r1, #0 30005568: 0a000020 beq 300055f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3000556c: e3520000 cmp r2, #0 30005570: da00001e ble 300055f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 30005574: e3520b01 cmp r2, #1024 ; 0x400 30005578: ca00001c bgt 300055f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 3000557c: e596303c ldr r3, [r6, #60] ; 0x3c 30005580: e593300c ldr r3, [r3, #12] 30005584: e3530000 cmp r3, #0 30005588: 1a000002 bne 30005598 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000558c: eb002647 bl 3000eeb0 <__errno> <== NOT EXECUTED 30005590: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30005594: ea000017 b 300055f8 <== NOT EXECUTED 30005598: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 3000559c: e59fc0f0 ldr ip, [pc, #240] ; 30005694 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 ); 300055a0: e1a05001 mov r5, r1 300055a4: e1a02001 mov r2, r1 300055a8: e3a07001 mov r7, #1 300055ac: e1a04003 mov r4, r3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 300055b0: e5921000 ldr r1, [r2] * 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++ ) { 300055b4: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 300055b8: e3510000 cmp r1, #0 300055bc: 0a00000b beq 300055f0 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 ) 300055c0: e5920004 ldr r0, [r2, #4] * 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++ ) { 300055c4: e2822008 add r2, r2, #8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 300055c8: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 300055cc: e1510004 cmp r1, r4 300055d0: a3a04000 movge r4, #0 300055d4: b3a04001 movlt r4, #1 300055d8: e151000c cmp r1, ip 300055dc: c3844001 orrgt r4, r4, #1 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 ) 300055e0: e3500000 cmp r0, #0 300055e4: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 300055e8: e3540000 cmp r4, #0 300055ec: 0a000003 beq 30005600 rtems_set_errno_and_return_minus_one( EINVAL ); 300055f0: eb00262e bl 3000eeb0 <__errno> 300055f4: e3a03016 mov r3, #22 300055f8: e5803000 str r3, [r0] 300055fc: ea000010 b 30005644 * 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++ ) { 30005600: e1530008 cmp r3, r8 30005604: b1a04001 movlt r4, r1 30005608: baffffe8 blt 300055b0 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 3000560c: e3570000 cmp r7, #0 <== NOT EXECUTED 30005610: 1a00001b bne 30005684 <== NOT EXECUTED 30005614: e1a04007 mov r4, r7 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 30005618: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3000561c: e2877001 add r7, r7, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 30005620: e3520000 cmp r2, #0 <== NOT EXECUTED 30005624: 0a000013 beq 30005678 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 30005628: e5951000 ldr r1, [r5] <== NOT EXECUTED 3000562c: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 30005630: e1a00006 mov r0, r6 <== NOT EXECUTED 30005634: e1a0e00f mov lr, pc <== NOT EXECUTED 30005638: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 3000563c: e3500000 cmp r0, #0 <== NOT EXECUTED 30005640: aa000001 bge 3000564c <== NOT EXECUTED 30005644: e3e04000 mvn r4, #0 30005648: ea00000d b 30005684 return -1; if ( bytes > 0 ) { 3000564c: 0a000006 beq 3000566c <== NOT EXECUTED iop->offset += bytes; 30005650: e286c00c add ip, r6, #12 <== NOT EXECUTED 30005654: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 30005658: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 3000565c: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 30005660: e586200c str r2, [r6, #12] <== NOT EXECUTED 30005664: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 30005668: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 3000566c: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 30005670: e1500003 cmp r0, r3 <== NOT EXECUTED 30005674: 1a000002 bne 30005684 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 30005678: e1570008 cmp r7, r8 <== NOT EXECUTED 3000567c: e2855008 add r5, r5, #8 <== NOT EXECUTED 30005680: baffffe4 blt 30005618 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 30005684: e1a00004 mov r0, r4 30005688: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 3000568c: 3001db64 .word 0x3001db64 30005690: 3001ecd8 .word 0x3001ecd8 30005694: 00007fff .word 0x00007fff