00008138 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8138: e5903000 ldr r3, [r0] 813c: e593204c ldr r2, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8140: e5903010 ldr r3, [r0, #16] switch( node->type ) { 8144: e2422001 sub r2, r2, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8148: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 814c: e3520006 cmp r2, #6 8150: 979ff102 ldrls pc, [pc, r2, lsl #2] 8154: ea000010 b 819c <== NOT EXECUTED 8158: 00008174 .word 0x00008174 <== NOT EXECUTED 815c: 0000817c .word 0x0000817c <== NOT EXECUTED 8160: 00008184 .word 0x00008184 <== NOT EXECUTED 8164: 00008184 .word 0x00008184 <== NOT EXECUTED 8168: 0000818c .word 0x0000818c <== NOT EXECUTED 816c: 0000818c .word 0x0000818c <== NOT EXECUTED 8170: 00008194 .word 0x00008194 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8174: e593300c ldr r3, [r3, #12] 8178: ea000006 b 8198 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 817c: e59f3020 ldr r3, [pc, #32] ; 81a4 8180: ea000004 b 8198 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8184: e59f301c ldr r3, [pc, #28] ; 81a8 8188: ea000002 b 8198 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 818c: e5933008 ldr r3, [r3, #8] 8190: ea000000 b 8198 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 8194: e59f3010 ldr r3, [pc, #16] ; 81ac 8198: e5803008 str r3, [r0, #8] break; } return 0; } 819c: e3a00000 mov r0, #0 81a0: e12fff1e bx lr 0000cab8 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { cab8: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} cabc: e1a02802 lsl r2, r2, #16 cac0: 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; cac4: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { cac8: e1a07821 lsr r7, r1, #16 cacc: 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(); cad0: eb000448 bl dbf8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) cad4: e1d453bc ldrh r5, [r4, #60] ; 0x3c cad8: e3500000 cmp r0, #0 cadc: 11550000 cmpne r5, r0 cae0: 03a05000 moveq r5, #0 cae4: 13a05001 movne r5, #1 cae8: 0a000004 beq cb00 rtems_set_errno_and_return_minus_one( EPERM ); caec: eb0014b4 bl 11dc4 <__errno> <== NOT EXECUTED caf0: e3a03001 mov r3, #1 <== NOT EXECUTED caf4: e5803000 str r3, [r0] <== NOT EXECUTED caf8: e3e00000 mvn r0, #0 <== NOT EXECUTED cafc: ea000007 b cb20 <== NOT EXECUTED #endif jnode->st_uid = owner; cb00: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; cb04: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); cb08: e1a0000d mov r0, sp cb0c: e1a01005 mov r1, r5 cb10: ebffd8b9 bl 2dfc cb14: e59d3000 ldr r3, [sp] cb18: e5843048 str r3, [r4, #72] ; 0x48 cb1c: e1a00005 mov r0, r5 return 0; } cb20: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} 0000b668 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b668: 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 ) b66c: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b670: e1a05001 mov r5, r1 b674: e59d6014 ldr r6, [sp, #20] b678: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) b67c: 01a07004 moveq r7, r4 b680: 0a000041 beq b78c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); b684: e59f2108 ldr r2, [pc, #264] ; b794 b688: e5922000 ldr r2, [r2] b68c: e592202c ldr r2, [r2, #44] ; 0x2c b690: e1a00005 mov r0, r5 b694: e1c32002 bic r2, r3, r2 b698: ebffffc4 bl b5b0 if ( !node ) b69c: e2507000 subs r7, r0, #0 b6a0: 0a000039 beq b78c return NULL; /* * Set the type specific information */ switch (type) { b6a4: e2455001 sub r5, r5, #1 b6a8: e3550006 cmp r5, #6 b6ac: 979ff105 ldrls pc, [pc, r5, lsl #2] b6b0: ea000025 b b74c <== NOT EXECUTED b6b4: 0000b6d0 .word 0x0000b6d0 <== NOT EXECUTED b6b8: 0000b6f4 .word 0x0000b6f4 <== NOT EXECUTED b6bc: 0000b6ec .word 0x0000b6ec <== NOT EXECUTED b6c0: 0000b6ec .word 0x0000b6ec <== NOT EXECUTED b6c4: 0000b71c .word 0x0000b71c <== NOT EXECUTED b6c8: 0000b704 .word 0x0000b704 <== NOT EXECUTED b6cc: 0000b740 .word 0x0000b740 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b6d0: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); b6d4: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b6d8: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; b6dc: e3a02000 mov r2, #0 b6e0: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); b6e4: e5873058 str r3, [r7, #88] ; 0x58 b6e8: ea00001c b b760 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; b6ec: e5963000 ldr r3, [r6] b6f0: ea000013 b b744 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; b6f4: 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; b6f8: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; b6fc: e5872054 str r2, [r7, #84] ; 0x54 b700: ea00000f b b744 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; b704: e3a03000 mov r3, #0 <== NOT EXECUTED b708: e3a02000 mov r2, #0 <== NOT EXECUTED b70c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED b710: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; b714: e3a03000 mov r3, #0 <== NOT EXECUTED b718: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; b71c: 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; b720: e3a01000 mov r1, #0 b724: e3a02000 mov r2, #0 b728: e5871050 str r1, [r7, #80] ; 0x50 b72c: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; b730: 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; b734: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; b738: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; b73c: ea000007 b b760 case IMFS_FIFO: node->info.fifo.pipe = NULL; b740: e3a03000 mov r3, #0 b744: e5873050 str r3, [r7, #80] ; 0x50 break; b748: ea000004 b b760 default: assert(0); b74c: e59f0044 ldr r0, [pc, #68] ; b798 <== NOT EXECUTED b750: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED b754: e59f2040 ldr r2, [pc, #64] ; b79c <== NOT EXECUTED b758: e59f3040 ldr r3, [pc, #64] ; b7a0 <== NOT EXECUTED b75c: ebfff5ee bl 8f1c <__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; b760: e5943010 ldr r3, [r4, #16] b764: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; b768: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; b76c: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; b770: e2833001 add r3, r3, #1 b774: e5823004 str r3, [r2, #4] * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; b778: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; b77c: e5873038 str r3, [r7, #56] ; 0x38 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); b780: e2800050 add r0, r0, #80 ; 0x50 b784: e1a01007 mov r1, r7 b788: ebffe704 bl 53a0 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } b78c: e1a00007 mov r0, r7 b790: e8bd80f0 pop {r4, r5, r6, r7, pc} 00003324 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3324: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 3328: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 332c: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3330: 059f00a4 ldreq r0, [pc, #164] ; 33dc 3334: 03a01084 moveq r1, #132 ; 0x84 3338: 059f20a0 ldreq r2, [pc, #160] ; 33e0 333c: 059f30a0 ldreq r3, [pc, #160] ; 33e4 3340: 0a000005 beq 335c assert( level >= 0 ); 3344: e3510000 cmp r1, #0 3348: aa000004 bge 3360 334c: e59f0088 ldr r0, [pc, #136] ; 33dc <== NOT EXECUTED 3350: e59f2088 ldr r2, [pc, #136] ; 33e0 <== NOT EXECUTED 3354: e59f308c ldr r3, [pc, #140] ; 33e8 <== NOT EXECUTED 3358: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 335c: eb0001da bl 3acc <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 3360: e590304c ldr r3, [r0, #76] ; 0x4c 3364: e3530001 cmp r3, #1 3368: 159f006c ldrne r0, [pc, #108] ; 33dc 336c: 13a01088 movne r1, #136 ; 0x88 3370: 159f2068 ldrne r2, [pc, #104] ; 33e0 3374: 159f3070 ldrne r3, [pc, #112] ; 33ec 3378: 1afffff7 bne 335c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 337c: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3380: 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, "...." ); 3384: e59f8064 ldr r8, [pc, #100] ; 33f0 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3388: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 338c: ea00000f b 33d0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 3390: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3394: 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++ ) 3398: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 339c: e5931008 ldr r1, [r3, #8] 33a0: e59f004c ldr r0, [pc, #76] ; 33f4 33a4: eb003922 bl 11834 !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++ ) 33a8: e1560005 cmp r6, r5 33ac: dafffff8 ble 3394 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 33b0: e1a00004 mov r0, r4 33b4: ebffff7e bl 31b4 if ( the_jnode->type == IMFS_DIRECTORY ) 33b8: e594304c ldr r3, [r4, #76] ; 0x4c 33bc: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 33c0: 01a00004 moveq r0, r4 33c4: 01a01007 moveq r1, r7 33c8: 0bffffd5 bleq 3324 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 ) { 33cc: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 33d0: e154000a cmp r4, sl 33d4: 1affffed bne 3390 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 33d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 00008340 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8340: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8344: e24dd040 sub sp, sp, #64 ; 0x40 8348: e1a04003 mov r4, r3 834c: e1a0a000 mov sl, r0 8350: e1a06001 mov r6, r1 8354: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8358: e5935000 ldr r5, [r3] 835c: e3a09001 mov r9, #1 8360: 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 ); 8364: e28d8004 add r8, sp, #4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8368: ea000054 b 84c0 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 836c: e28d303c add r3, sp, #60 ; 0x3c 8370: e08a0007 add r0, sl, r7 8374: e1a01006 mov r1, r6 8378: e1a02008 mov r2, r8 837c: eb0001e7 bl 8b20 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8380: e5943000 ldr r3, [r4] 8384: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8388: e1a09000 mov r9, r0 pathnamelen -= len; 838c: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8390: 0a000042 beq 84a0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8394: e3500000 cmp r0, #0 8398: 0a000006 beq 83b8 if ( node->type == IMFS_DIRECTORY ) 839c: e595104c ldr r1, [r5, #76] ; 0x4c 83a0: e3510001 cmp r1, #1 83a4: 1a000003 bne 83b8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 83a8: e1a00004 mov r0, r4 83ac: ebffff7f bl 81b0 83b0: e3500000 cmp r0, #0 83b4: 0a000068 beq 855c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 83b8: 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; 83bc: 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; 83c0: 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; 83c4: e5945000 ldr r5, [r4] switch( type ) { 83c8: 0a000013 beq 841c 83cc: e3590004 cmp r9, #4 83d0: 0a000037 beq 84b4 83d4: e3590002 cmp r9, #2 83d8: 1a000038 bne 84c0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 83dc: e59f2194 ldr r2, [pc, #404] ; 8578 83e0: e5923000 ldr r3, [r2] 83e4: e5933018 ldr r3, [r3, #24] 83e8: e1550003 cmp r5, r3 83ec: 0a000033 beq 84c0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 83f0: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 83f4: e59e301c ldr r3, [lr, #28] 83f8: 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; 83fc: 028ee008 addeq lr, lr, #8 8400: 0a000038 beq 84e8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8404: e5955008 ldr r5, [r5, #8] 8408: e3550000 cmp r5, #0 840c: 1a000026 bne 84ac rtems_set_errno_and_return_minus_one( ENOENT ); 8410: eb001253 bl cd64 <__errno> 8414: e5809000 str r9, [r0] 8418: ea000052 b 8568 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 841c: e595304c ldr r3, [r5, #76] ; 0x4c 8420: e3530003 cmp r3, #3 8424: 1a000006 bne 8444 IMFS_evaluate_hard_link( pathloc, 0 ); 8428: e1a00004 mov r0, r4 842c: e3a01000 mov r1, #0 8430: ebffff71 bl 81fc node = pathloc->node_access; 8434: e5945000 ldr r5, [r4] if ( !node ) 8438: e3550000 cmp r5, #0 843c: 1a000009 bne 8468 8440: ea00000b b 8474 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8444: e3530004 cmp r3, #4 8448: 1a000006 bne 8468 result = IMFS_evaluate_sym_link( pathloc, 0 ); 844c: e1a00004 mov r0, r4 8450: e3a01000 mov r1, #0 8454: ebffff7f bl 8258 node = pathloc->node_access; if ( result == -1 ) 8458: 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 ); 845c: e1a0b000 mov fp, r0 node = pathloc->node_access; 8460: e5945000 ldr r5, [r4] if ( result == -1 ) 8464: 0a000040 beq 856c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8468: e595304c ldr r3, [r5, #76] ; 0x4c 846c: e3530001 cmp r3, #1 8470: 0a000002 beq 8480 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8474: eb00123a bl cd64 <__errno> 8478: e3a03014 mov r3, #20 847c: ea000038 b 8564 /* * 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 ) { 8480: e595e05c ldr lr, [r5, #92] ; 0x5c 8484: e35e0000 cmp lr, #0 8488: 1a000015 bne 84e4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 848c: e1a00005 mov r0, r5 8490: e1a01008 mov r1, r8 8494: eb000179 bl 8a80 if ( !node ) 8498: e2505000 subs r5, r0, #0 849c: 1a000002 bne 84ac rtems_set_errno_and_return_minus_one( ENOENT ); 84a0: eb00122f bl cd64 <__errno> 84a4: e3a03002 mov r3, #2 84a8: ea00002d b 8564 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 84ac: e5845000 str r5, [r4] 84b0: ea000002 b 84c0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 84b4: eb00122a bl cd64 <__errno> 84b8: e3a0305b mov r3, #91 ; 0x5b 84bc: ea000028 b 8564 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 84c0: e3590004 cmp r9, #4 84c4: 13590000 cmpne r9, #0 84c8: 1affffa7 bne 836c * 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 ) { 84cc: e595304c ldr r3, [r5, #76] ; 0x4c 84d0: e3530001 cmp r3, #1 84d4: 1a000018 bne 853c if ( node->info.directory.mt_fs != NULL ) { 84d8: e595e05c ldr lr, [r5, #92] ; 0x5c 84dc: e35e0000 cmp lr, #0 84e0: 0a000015 beq 853c newloc = node->info.directory.mt_fs->mt_fs_root; 84e4: e28ee01c add lr, lr, #28 84e8: e8be000f ldm lr!, {r0, r1, r2, r3} 84ec: e28dc028 add ip, sp, #40 ; 0x28 84f0: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 84f4: e28d5028 add r5, sp, #40 ; 0x28 84f8: e8b5000f ldm r5!, {r0, r1, r2, r3} 84fc: 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; 8500: e59ee000 ldr lr, [lr] *pathloc = newloc; 8504: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8508: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 850c: e585e000 str lr, [r5] * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8510: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8514: e0610007 rsb r0, r1, r7 8518: e08a0000 add r0, sl, r0 851c: e0861001 add r1, r6, r1 8520: e59d2000 ldr r2, [sp] 8524: e1a03004 mov r3, r4 8528: e594c00c ldr ip, [r4, #12] 852c: e1a0e00f mov lr, pc 8530: e59cf000 ldr pc, [ip] 8534: e1a0b000 mov fp, r0 8538: ea00000b b 856c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 853c: e1a00004 mov r0, r4 8540: ebfffefc bl 8138 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8544: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8548: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 854c: e1a00004 mov r0, r4 8550: ebffff16 bl 81b0 8554: e3500000 cmp r0, #0 8558: 1a000003 bne 856c rtems_set_errno_and_return_minus_one( EACCES ); 855c: eb001200 bl cd64 <__errno> 8560: e3a0300d mov r3, #13 8564: e5803000 str r3, [r0] 8568: e3e0b000 mvn fp, #0 return result; } 856c: e1a0000b mov r0, fp 8570: e28dd040 add sp, sp, #64 ; 0x40 8574: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 00008630 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8630: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8634: e24dd040 sub sp, sp, #64 ; 0x40 8638: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 863c: 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 */ ) { 8640: e58d2000 str r2, [sp] 8644: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8648: eb0015b6 bl dd28 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 864c: e59fa224 ldr sl, [pc, #548] ; 8878 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8650: e3a05000 mov r5, #0 8654: 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 ); 8658: e1a01008 mov r1, r8 865c: e28d303c add r3, sp, #60 ; 0x3c 8660: e0870005 add r0, r7, r5 8664: e28d2004 add r2, sp, #4 8668: eb00012c bl 8b20 pathlen -= len; i += len; if ( !pathloc->node_access ) 866c: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8670: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8674: 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 ); 8678: e1a09000 mov r9, r0 pathlen -= len; 867c: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 8680: 0a000060 beq 8808 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8684: e3500000 cmp r0, #0 8688: 0a000006 beq 86a8 if ( node->type == IMFS_DIRECTORY ) 868c: e596104c ldr r1, [r6, #76] ; 0x4c 8690: e3510001 cmp r1, #1 8694: 1a000003 bne 86a8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8698: e1a00004 mov r0, r4 869c: ebfffec3 bl 81b0 86a0: e3500000 cmp r0, #0 86a4: 0a00006c beq 885c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 86a8: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 86ac: 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; 86b0: e1a06003 mov r6, r3 switch( type ) { 86b4: e3590004 cmp r9, #4 86b8: 979ff109 ldrls pc, [pc, r9, lsl #2] 86bc: eaffffe5 b 8658 <== NOT EXECUTED 86c0: 000087c4 .word 0x000087c4 <== NOT EXECUTED 86c4: 00008658 .word 0x00008658 <== NOT EXECUTED 86c8: 000086d4 .word 0x000086d4 <== NOT EXECUTED 86cc: 00008708 .word 0x00008708 <== NOT EXECUTED 86d0: 000087d0 .word 0x000087d0 <== 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 ) 86d4: e59a2000 ldr r2, [sl] 86d8: e5922018 ldr r2, [r2, #24] 86dc: e1530002 cmp r3, r2 86e0: 0affffdc beq 8658 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 86e4: e594e010 ldr lr, [r4, #16] 86e8: e59e201c ldr r2, [lr, #28] 86ec: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 86f0: 028ee008 addeq lr, lr, #8 86f4: 0a000018 beq 875c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 86f8: e5936008 ldr r6, [r3, #8] 86fc: e3560000 cmp r6, #0 8700: 1a00002d bne 87bc 8704: ea00003f b 8808 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8708: e593304c ldr r3, [r3, #76] ; 0x4c 870c: e3530003 cmp r3, #3 8710: 0a000001 beq 871c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8714: e3530004 cmp r3, #4 8718: 1a000005 bne 8734 result = IMFS_evaluate_link( pathloc, 0 ); 871c: e1a00004 mov r0, r4 8720: e3a01000 mov r1, #0 8724: ebffff94 bl 857c if ( result == -1 ) 8728: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 872c: e1a06000 mov r6, r0 if ( result == -1 ) 8730: 0a00004d beq 886c return -1; } node = pathloc->node_access; 8734: e5940000 ldr r0, [r4] if ( !node ) 8738: e3500000 cmp r0, #0 873c: 0a00003e beq 883c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8740: e590304c ldr r3, [r0, #76] ; 0x4c 8744: e3530001 cmp r3, #1 8748: 1a00003b bne 883c /* * 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 ) { 874c: e590e05c ldr lr, [r0, #92] ; 0x5c 8750: e35e0000 cmp lr, #0 8754: 0a000014 beq 87ac newloc = node->info.directory.mt_fs->mt_fs_root; 8758: e28ee01c add lr, lr, #28 875c: e8be000f ldm lr!, {r0, r1, r2, r3} 8760: e28dc028 add ip, sp, #40 ; 0x28 8764: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 8768: e28d6028 add r6, sp, #40 ; 0x28 876c: e8b6000f ldm r6!, {r0, r1, r2, r3} 8770: 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; 8774: e59ee000 ldr lr, [lr] *pathloc = newloc; 8778: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 877c: 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; 8780: e586e000 str lr, [r6] * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8784: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8788: e0635005 rsb r5, r3, r5 878c: e0870005 add r0, r7, r5 8790: e1a01004 mov r1, r4 8794: e59d2000 ldr r2, [sp] 8798: e594300c ldr r3, [r4, #12] 879c: e1a0e00f mov lr, pc 87a0: e593f004 ldr pc, [r3, #4] 87a4: e1a06000 mov r6, r0 87a8: ea00002f b 886c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 87ac: e28d1004 add r1, sp, #4 87b0: eb0000b2 bl 8a80 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 87b4: e2506000 subs r6, r0, #0 87b8: 0a000007 beq 87dc done = true; else pathloc->node_access = node; 87bc: e5846000 str r6, [r4] 87c0: eaffffa4 b 8658 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 87c4: eb001166 bl cd64 <__errno> 87c8: e3a03011 mov r3, #17 87cc: ea000024 b 8864 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 87d0: eb001163 bl cd64 <__errno> 87d4: e3a0305b mov r3, #91 ; 0x5b 87d8: ea000021 b 8864 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 87dc: e59d303c ldr r3, [sp, #60] ; 0x3c 87e0: e59d2000 ldr r2, [sp] 87e4: e0633005 rsb r3, r3, r5 87e8: e0873003 add r3, r7, r3 87ec: e5823000 str r3, [r2] 87f0: e0875005 add r5, r7, r5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 87f4: ea000006 b 8814 if ( !IMFS_is_separator( path[ i ] ) ) 87f8: e353005c cmp r3, #92 ; 0x5c 87fc: 1353002f cmpne r3, #47 ; 0x2f /* * 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++) { 8800: e2855001 add r5, r5, #1 if ( !IMFS_is_separator( path[ i ] ) ) 8804: 0a000002 beq 8814 rtems_set_errno_and_return_minus_one( ENOENT ); 8808: eb001155 bl cd64 <__errno> 880c: e3a03002 mov r3, #2 8810: ea000013 b 8864 /* * 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++) { 8814: e5d53000 ldrb r3, [r5] 8818: e3530000 cmp r3, #0 881c: 1afffff5 bne 87f8 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8820: e1a00004 mov r0, r4 8824: ebfffe43 bl 8138 /* * The returned node must be a directory */ node = pathloc->node_access; 8828: e5943000 ldr r3, [r4] 882c: e593304c ldr r3, [r3, #76] ; 0x4c 8830: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8834: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 8838: 0a000002 beq 8848 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 883c: eb001148 bl cd64 <__errno> 8840: e3a03014 mov r3, #20 8844: ea000006 b 8864 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8848: e1a00004 mov r0, r4 884c: e3a01003 mov r1, #3 8850: ebfffe56 bl 81b0 8854: e3500000 cmp r0, #0 8858: 1a000003 bne 886c rtems_set_errno_and_return_minus_one( EACCES ); 885c: eb001140 bl cd64 <__errno> 8860: e3a0300d mov r3, #13 8864: e5803000 str r3, [r0] 8868: e3e06000 mvn r6, #0 return result; } 886c: e1a00006 mov r0, r6 8870: e28dd040 add sp, sp, #64 ; 0x40 8874: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 000081fc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 81fc: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8200: e593204c ldr r2, [r3, #76] ; 0x4c 8204: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8208: e92d4030 push {r4, r5, lr} 820c: e1a04000 mov r4, r0 8210: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8214: 159f0038 ldrne r0, [pc, #56] ; 8254 8218: 1bfff3a6 blne 50b8 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 821c: e5933050 ldr r3, [r3, #80] ; 0x50 8220: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 8224: ebffffc3 bl 8138 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8228: e1a00004 mov r0, r4 822c: e1a01005 mov r1, r5 8230: ebffffde bl 81b0 8234: e3500000 cmp r0, #0 8238: 13a00000 movne r0, #0 823c: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 8240: eb0012c7 bl cd64 <__errno> <== NOT EXECUTED 8244: e3a0300d mov r3, #13 <== NOT EXECUTED 8248: e5803000 str r3, [r0] <== NOT EXECUTED 824c: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 8250: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00008258 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8258: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 825c: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8260: e59e304c ldr r3, [lr, #76] ; 0x4c 8264: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8268: e1a04000 mov r4, r0 826c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8270: 159f00bc ldrne r0, [pc, #188] ; 8334 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8274: 1a000003 bne 8288 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 8278: e59e3008 ldr r3, [lr, #8] 827c: e3530000 cmp r3, #0 8280: 1a000001 bne 828c rtems_fatal_error_occurred( 0xBAD00000 ); 8284: e59f00ac ldr r0, [pc, #172] ; 8338 <== NOT EXECUTED 8288: ebfff38a bl 50b8 <== 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; 828c: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 8290: e59e3050 ldr r3, [lr, #80] ; 0x50 8294: e5d33000 ldrb r3, [r3] 8298: e353002f cmp r3, #47 ; 0x2f 829c: 1353005c cmpne r3, #92 ; 0x5c 82a0: 13a06000 movne r6, #0 82a4: 03a06001 moveq r6, #1 82a8: 0a000001 beq 82b4 82ac: e3530000 cmp r3, #0 82b0: 1a000008 bne 82d8 82b4: e59f3080 ldr r3, [pc, #128] ; 833c 82b8: e593c000 ldr ip, [r3] 82bc: e28cc018 add ip, ip, #24 82c0: e8bc000f ldm ip!, {r0, r1, r2, r3} 82c4: e1a06004 mov r6, r4 82c8: e8a6000f stmia r6!, {r0, r1, r2, r3} 82cc: e59c2000 ldr r2, [ip] 82d0: e5862000 str r2, [r6] 82d4: e3a06001 mov r6, #1 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 82d8: e59e3050 ldr r3, [lr, #80] ; 0x50 82dc: e0836006 add r6, r3, r6 82e0: e1a00006 mov r0, r6 82e4: eb00168f bl dd28 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 82e8: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 82ec: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 82f0: e1a03004 mov r3, r4 82f4: e1a00006 mov r0, r6 82f8: eb000010 bl 8340 82fc: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8300: e1a00004 mov r0, r4 8304: ebffff8b bl 8138 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8308: e1a00004 mov r0, r4 830c: e1a01005 mov r1, r5 8310: ebffffa6 bl 81b0 8314: e3500000 cmp r0, #0 8318: 1a000003 bne 832c rtems_set_errno_and_return_minus_one( EACCES ); 831c: eb001290 bl cd64 <__errno> <== NOT EXECUTED 8320: e3a0300d mov r3, #13 <== NOT EXECUTED 8324: e5803000 str r3, [r0] <== NOT EXECUTED 8328: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 832c: e1a00006 mov r0, r6 8330: e8bd8070 pop {r4, r5, r6, pc} 0000b7a4 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b7a4: 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; b7a8: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b7ac: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); b7b0: ebfff665 bl 914c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) b7b4: e1d453bc ldrh r5, [r4, #60] ; 0x3c b7b8: e3500000 cmp r0, #0 b7bc: 11550000 cmpne r5, r0 b7c0: 03a05000 moveq r5, #0 b7c4: 13a05001 movne r5, #1 b7c8: 0a000004 beq b7e0 rtems_set_errno_and_return_minus_one( EPERM ); b7cc: eb000564 bl cd64 <__errno> <== NOT EXECUTED b7d0: e3a03001 mov r3, #1 <== NOT EXECUTED b7d4: e5803000 str r3, [r0] <== NOT EXECUTED b7d8: e3e00000 mvn r0, #0 <== NOT EXECUTED b7dc: ea00000c b b814 <== 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); b7e0: e5943030 ldr r3, [r4, #48] ; 0x30 b7e4: e1a06a06 lsl r6, r6, #20 b7e8: e3c33eff bic r3, r3, #4080 ; 0xff0 b7ec: e3c3300f bic r3, r3, #15 b7f0: e1a06a26 lsr r6, r6, #20 b7f4: e1866003 orr r6, r6, r3 b7f8: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); b7fc: e1a0000d mov r0, sp b800: e1a01005 mov r1, r5 b804: ebfff655 bl 9160 b808: e59d3000 ldr r3, [sp] b80c: e5843048 str r3, [r4, #72] ; 0x48 b810: e1a00005 mov r0, r5 return 0; } b814: e8bd807c pop {r2, r3, r4, r5, r6, pc} 000089dc : } int IMFS_fifo_close( rtems_libio_t *iop ) { 89dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 89e0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 89e4: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 89e8: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 89ec: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 89f0: eb0009cd bl b12c <== NOT EXECUTED if (! err) { 89f4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 89f8: 1a00000c bne 8a30 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 89fc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8a00: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 8a04: 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) 8a08: e1a00004 mov r0, r4 <== NOT EXECUTED 8a0c: eb0001fd bl 9208 <== NOT EXECUTED 8a10: e3500000 cmp r0, #0 <== NOT EXECUTED 8a14: 1a00000a bne 8a44 <== NOT EXECUTED 8a18: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 8a1c: e3530000 cmp r3, #0 <== NOT EXECUTED 8a20: 1a000007 bne 8a44 <== NOT EXECUTED free(jnode); 8a24: e1a00004 mov r0, r4 <== NOT EXECUTED 8a28: ebffe3c6 bl 1948 <== NOT EXECUTED 8a2c: ea000004 b 8a44 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 8a30: aa000003 bge 8a44 <== NOT EXECUTED 8a34: eb0010ca bl cd64 <__errno> <== NOT EXECUTED 8a38: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 8a3c: e5806000 str r6, [r0] <== NOT EXECUTED 8a40: e3e06000 mvn r6, #0 <== NOT EXECUTED } 8a44: e1a00006 mov r0, r6 <== NOT EXECUTED 8a48: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 000088c4 : void *buffer ) { int err; if (command == FIONBIO) { 88c4: e59f3068 ldr r3, [pc, #104] ; 8934 <== NOT EXECUTED 88c8: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 88cc: e92d4010 push {r4, lr} <== NOT EXECUTED 88d0: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 88d4: 1a00000b bne 8908 <== NOT EXECUTED if (buffer == NULL) 88d8: e3520000 cmp r2, #0 <== NOT EXECUTED 88dc: 03e0400d mvneq r4, #13 <== NOT EXECUTED 88e0: 0a00000d beq 891c <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 88e4: e5924000 ldr r4, [r2] <== NOT EXECUTED 88e8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 88ec: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 88f0: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 88f4: 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; 88f8: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 88fc: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8900: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 8904: ea000008 b 892c <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8908: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 890c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 8910: eb00091b bl ad84 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8914: e2504000 subs r4, r0, #0 <== NOT EXECUTED 8918: aa000003 bge 892c <== NOT EXECUTED 891c: eb001110 bl cd64 <__errno> <== NOT EXECUTED 8920: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 8924: e5804000 str r4, [r0] <== NOT EXECUTED 8928: e3e04000 mvn r4, #0 <== NOT EXECUTED } 892c: e1a00004 mov r0, r4 <== NOT EXECUTED 8930: e8bd8010 pop {r4, pc} <== NOT EXECUTED 0000887c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 887c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 8880: e58d0000 str r0, [sp] <== NOT EXECUTED 8884: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 8888: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 888c: eb000922 bl ad1c <== NOT EXECUTED 8890: e1a03000 mov r3, r0 <== NOT EXECUTED 8894: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8898: 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); 889c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 88a0: aa000004 bge 88b8 <== NOT EXECUTED 88a4: eb00112e bl cd64 <__errno> <== NOT EXECUTED 88a8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 88ac: e5805000 str r5, [r0] <== NOT EXECUTED 88b0: e3e03000 mvn r3, #0 <== NOT EXECUTED 88b4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 88b8: e1a01004 mov r1, r4 <== NOT EXECUTED 88bc: e1a00003 mov r0, r3 <== NOT EXECUTED 88c0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 0000898c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 898c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8990: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8994: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 8998: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 899c: eb000910 bl ade4 <== NOT EXECUTED if (err > 0) 89a0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 89a4: da000005 ble 89c0 <== NOT EXECUTED IMFS_update_atime(jnode); 89a8: e1a0000d mov r0, sp <== NOT EXECUTED 89ac: e3a01000 mov r1, #0 <== NOT EXECUTED 89b0: eb0001ea bl 9160 <== NOT EXECUTED 89b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 89b8: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 89bc: ea000004 b 89d4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 89c0: 0a000003 beq 89d4 <== NOT EXECUTED 89c4: eb0010e6 bl cd64 <__errno> <== NOT EXECUTED 89c8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 89cc: e5805000 str r5, [r0] <== NOT EXECUTED 89d0: e3e05000 mvn r5, #0 <== NOT EXECUTED } 89d4: e1a00005 mov r0, r5 <== NOT EXECUTED 89d8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00008938 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8938: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 893c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8940: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8944: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8948: eb000981 bl af54 <== NOT EXECUTED if (err > 0) { 894c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8950: da000006 ble 8970 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8954: e1a0000d mov r0, sp <== NOT EXECUTED 8958: e3a01000 mov r1, #0 <== NOT EXECUTED 895c: eb0001ff bl 9160 <== NOT EXECUTED 8960: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8964: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 8968: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 896c: ea000004 b 8984 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 8970: 0a000003 beq 8984 <== NOT EXECUTED 8974: eb0010fa bl cd64 <__errno> <== NOT EXECUTED 8978: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 897c: e5805000 str r5, [r0] <== NOT EXECUTED 8980: e3e05000 mvn r5, #0 <== NOT EXECUTED } 8984: e1a00005 mov r0, r5 <== NOT EXECUTED 8988: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000d668 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { d668: 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; d66c: e1a0c000 mov ip, r0 d670: 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 ) { d674: e1a05000 mov r5, r0 d678: 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; d67c: e8bc000f ldm ip!, {r0, r1, r2, r3} d680: e1a0e00d mov lr, sp d684: e8ae000f stmia lr!, {r0, r1, r2, r3} d688: e59c3000 ldr r3, [ip] d68c: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; d690: e3a03000 mov r3, #0 d694: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); d698: e1a0500d mov r5, sp d69c: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; d6a0: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; d6a4: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); d6a8: ebfffd9a bl cd18 if ( jnode->type != IMFS_DIRECTORY ) { d6ac: e594204c ldr r2, [r4, #76] ; 0x4c d6b0: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; d6b4: e2843054 add r3, r4, #84 ; 0x54 d6b8: 1a000002 bne d6c8 d6bc: e5942050 ldr r2, [r4, #80] ; 0x50 d6c0: e1520003 cmp r2, r3 d6c4: 1a000005 bne d6e0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); d6c8: e3a00000 mov r0, #0 d6cc: e1a0100d mov r1, sp d6d0: ebffd41d bl 274c if (result != 0) d6d4: e3500000 cmp r0, #0 d6d8: 1a00000c bne d710 d6dc: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { d6e0: e3540000 cmp r4, #0 d6e4: 0a00000b beq d718 if ( jnode->type == IMFS_DIRECTORY ) { d6e8: e594304c ldr r3, [r4, #76] ; 0x4c d6ec: e3530001 cmp r3, #1 d6f0: 1affffe9 bne d69c d6f4: e5943050 ldr r3, [r4, #80] ; 0x50 d6f8: e2842054 add r2, r4, #84 ; 0x54 d6fc: e1530002 cmp r3, r2 d700: 0affffe5 beq d69c if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); d704: e2534000 subs r4, r3, #0 d708: 1affffe3 bne d69c d70c: ea000001 b d718 <== NOT EXECUTED d710: e3e00000 mvn r0, #0 <== NOT EXECUTED d714: ea000000 b d71c <== NOT EXECUTED d718: e3a00000 mov r0, #0 return 0; } d71c: e28dd014 add sp, sp, #20 d720: e8bd8070 pop {r4, r5, r6, pc} 00008be8 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8be8: e59fc0d4 ldr ip, [pc, #212] ; 8cc4 8bec: e59cc000 ldr ip, [ip] 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 ) { 8bf0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 8bf4: e1a08002 mov r8, r2 8bf8: e1a06003 mov r6, r3 8bfc: e1a04000 mov r4, r0 8c00: 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, 8c04: e3a02000 mov r2, #0 8c08: 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) { 8c0c: e153000c cmp r3, ip 8c10: e2822001 add r2, r2, #1 8c14: 0a000003 beq 8c28 8c18: e3520006 cmp r2, #6 8c1c: e1a03083 lsl r3, r3, #1 8c20: 1afffff9 bne 8c0c 8c24: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8c28: e59f5098 ldr r5, [pc, #152] ; 8cc8 8c2c: e5853000 str r3, [r5] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 8c30: eb000a7c bl b628 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; 8c34: e59fe090 ldr lr, [pc, #144] ; 8ccc /* * 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(); 8c38: 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; 8c3c: e8be000f ldm lr!, {r0, r1, r2, r3} 8c40: e284c038 add ip, r4, #56 ; 0x38 8c44: e8ac000f stmia ip!, {r0, r1, r2, r3} 8c48: e8be000f ldm lr!, {r0, r1, r2, r3} 8c4c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8c50: 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; 8c54: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8c58: 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; 8c5c: e5846024 str r6, [r4, #36] ; 0x24 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8c60: e3a00001 mov r0, #1 8c64: e3a01010 mov r1, #16 8c68: eb0000bc bl 8f60 if ( !fs_info ) { 8c6c: e3500000 cmp r0, #0 8c70: 1a000006 bne 8c90 free(temp_mt_entry->mt_fs_root.node_access); 8c74: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 8c78: ebffe332 bl 1948 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8c7c: eb001038 bl cd64 <__errno> <== NOT EXECUTED 8c80: e3a0300c mov r3, #12 <== NOT EXECUTED 8c84: e5803000 str r3, [r0] <== NOT EXECUTED 8c88: e3e00000 mvn r0, #0 <== NOT EXECUTED 8c8c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8c90: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8c94: e594101c ldr r1, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 8c98: e3a03001 mov r3, #1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8c9c: e880000c stm r0, {r2, r3} fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8ca0: e580600c str r6, [r0, #12] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8ca4: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8ca8: e0822003 add r2, r2, r3 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 8cac: 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; 8cb0: e5813038 str r3, [r1, #56] ; 0x38 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 8cb4: e5852004 str r2, [r5, #4] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 8cb8: eb000819 bl ad24 8cbc: e3a00000 mov r0, #0 return 0; } 8cc0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00002454 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 2454: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2458: 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 */ ) { 245c: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2460: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 2464: e1d333b4 ldrh r3, [r3, #52] ; 0x34 2468: 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 */ ) { 246c: e1a05001 mov r5, r1 2470: 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 ) 2474: 9a000002 bls 2484 rtems_set_errno_and_return_minus_one( EMLINK ); 2478: eb003e51 bl 11dc4 <__errno> 247c: e3a0301f mov r3, #31 2480: ea000012 b 24d0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 2484: e1a00002 mov r0, r2 2488: eb004226 bl 12d28 248c: e28d4004 add r4, sp, #4 2490: e1a01000 mov r1, r0 2494: e1a02004 mov r2, r4 2498: e28d3044 add r3, sp, #68 ; 0x44 249c: e1a00006 mov r0, r6 24a0: eb002cc7 bl d7c4 * 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( 24a4: e28dc028 add ip, sp, #40 ; 0x28 24a8: e1a00005 mov r0, r5 24ac: e1a02004 mov r2, r4 24b0: e3a01003 mov r1, #3 24b4: e59f3054 ldr r3, [pc, #84] ; 2510 24b8: e58dc000 str ip, [sp] 24bc: eb0029c6 bl cbdc new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 24c0: e3500000 cmp r0, #0 24c4: 1a000004 bne 24dc rtems_set_errno_and_return_minus_one( ENOMEM ); 24c8: eb003e3d bl 11dc4 <__errno> <== NOT EXECUTED 24cc: e3a0300c mov r3, #12 <== NOT EXECUTED 24d0: e5803000 str r3, [r0] 24d4: e3e00000 mvn r0, #0 24d8: ea00000a b 2508 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 24dc: e59d3028 ldr r3, [sp, #40] ; 0x28 24e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 24e4: e2822001 add r2, r2, #1 24e8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 24ec: e28d003c add r0, sp, #60 ; 0x3c 24f0: e3a01000 mov r1, #0 24f4: eb000240 bl 2dfc 24f8: e59d203c ldr r2, [sp, #60] ; 0x3c 24fc: e59d3028 ldr r3, [sp, #40] ; 0x28 2500: e5832048 str r2, [r3, #72] ; 0x48 2504: e3a00000 mov r0, #0 return 0; } 2508: e28dd048 add sp, sp, #72 ; 0x48 250c: e8bd8070 pop {r4, r5, r6, pc} 000101b8 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 101b8: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 101bc: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 101c0: 059f0060 ldreq r0, [pc, #96] ; 10228 101c4: 059f1060 ldreq r1, [pc, #96] ; 1022c 101c8: 059f2060 ldreq r2, [pc, #96] ; 10230 101cc: 059f3060 ldreq r3, [pc, #96] ; 10234 101d0: 0a000006 beq 101f0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 101d4: e593304c ldr r3, [r3, #76] ; 0x4c 101d8: e3530005 cmp r3, #5 101dc: 0a000004 beq 101f4 101e0: e59f0040 ldr r0, [pc, #64] ; 10228 <== NOT EXECUTED 101e4: e59f104c ldr r1, [pc, #76] ; 10238 <== NOT EXECUTED 101e8: e59f2040 ldr r2, [pc, #64] ; 10230 <== NOT EXECUTED 101ec: e59f3048 ldr r3, [pc, #72] ; 1023c <== NOT EXECUTED 101f0: ebfff607 bl da14 <__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 ); 101f4: e3a02001 mov r2, #1 101f8: ebfffeab bl fcac if ( *block_entry_ptr ) 101fc: e5904000 ldr r4, [r0] 10200: e3540000 cmp r4, #0 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 10204: e1a05000 mov r5, r0 if ( *block_entry_ptr ) 10208: 13a00000 movne r0, #0 1020c: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 10210: ebfffe98 bl fc78 if ( !memory ) 10214: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; 10218: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 1021c: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; 10220: 11a00004 movne r0, r4 return 0; } 10224: e8bd8030 pop {r4, r5, pc} 00010240 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 10240: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 10244: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 10248: e1a05001 mov r5, r1 1024c: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); 10250: 059f0134 ldreq r0, [pc, #308] ; 1038c 10254: 059f1134 ldreq r1, [pc, #308] ; 10390 10258: 059f2134 ldreq r2, [pc, #308] ; 10394 1025c: 059f3134 ldreq r3, [pc, #308] ; 10398 10260: 0a000006 beq 10280 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 10264: e594304c ldr r3, [r4, #76] ; 0x4c 10268: e3530005 cmp r3, #5 1026c: 0a000004 beq 10284 10270: e59f0114 ldr r0, [pc, #276] ; 1038c <== NOT EXECUTED 10274: e59f1120 ldr r1, [pc, #288] ; 1039c <== NOT EXECUTED 10278: e59f2114 ldr r2, [pc, #276] ; 10394 <== NOT EXECUTED 1027c: e59f311c ldr r3, [pc, #284] ; 103a0 <== NOT EXECUTED 10280: ebfff5e3 bl da14 <__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 ) 10284: e59f3118 ldr r3, [pc, #280] ; 103a4 10288: e593b000 ldr fp, [r3] 1028c: e1a0312b lsr r3, fp, #2 10290: e2832001 add r2, r3, #1 10294: e0010293 mul r1, r3, r2 10298: e2811001 add r1, r1, #1 1029c: e0020193 mul r2, r3, r1 102a0: e3a03000 mov r3, #0 102a4: e1530006 cmp r3, r6 102a8: e2422001 sub r2, r2, #1 102ac: e003029b mul r3, fp, r2 102b0: ca000005 bgt 102cc 102b4: 1a000001 bne 102c0 102b8: e1530005 cmp r3, r5 102bc: 8a000002 bhi 102cc rtems_set_errno_and_return_minus_one( EINVAL ); 102c0: eb0006bf bl 11dc4 <__errno> <== NOT EXECUTED 102c4: e3a03016 mov r3, #22 <== NOT EXECUTED 102c8: ea000025 b 10364 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 102cc: e5948054 ldr r8, [r4, #84] ; 0x54 102d0: e1560008 cmp r6, r8 102d4: e5947050 ldr r7, [r4, #80] ; 0x50 102d8: ca000002 bgt 102e8 102dc: 1a000028 bne 10384 102e0: e1550007 cmp r5, r7 102e4: 9a000026 bls 10384 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 102e8: e1a0cfcb asr ip, fp, #31 102ec: e1a0300c mov r3, ip 102f0: e1a0200b mov r2, fp 102f4: e1a00005 mov r0, r5 102f8: e1a01006 mov r1, r6 102fc: e58dc000 str ip, [sp] 10300: eb002f1d bl 1bf7c <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10304: e59dc000 ldr ip, [sp] 10308: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 1030c: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10310: e1a0200b mov r2, fp 10314: e1a00007 mov r0, r7 10318: e1a0300c mov r3, ip 1031c: eb002f16 bl 1bf7c <__divdi3> 10320: e1a08000 mov r8, r0 10324: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10328: ea000011 b 10374 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 1032c: e1a00004 mov r0, r4 10330: e1a01007 mov r1, r7 10334: ebffff9f bl 101b8 10338: e3500000 cmp r0, #0 1033c: 0a00000b beq 10370 10340: ea000003 b 10354 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 10344: e1a01007 mov r1, r7 <== NOT EXECUTED 10348: e1a00004 mov r0, r4 <== NOT EXECUTED 1034c: ebfffefa bl ff3c <== 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-- ) { 10350: e2477001 sub r7, r7, #1 <== NOT EXECUTED 10354: e1570008 cmp r7, r8 <== NOT EXECUTED 10358: 2afffff9 bcs 10344 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1035c: eb000698 bl 11dc4 <__errno> <== NOT EXECUTED 10360: e3a0301c mov r3, #28 <== NOT EXECUTED 10364: e5803000 str r3, [r0] <== NOT EXECUTED 10368: e3e00000 mvn r0, #0 <== NOT EXECUTED 1036c: ea000005 b 10388 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10370: e2877001 add r7, r7, #1 10374: e157000a cmp r7, sl 10378: 9affffeb bls 1032c /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1037c: e5846054 str r6, [r4, #84] ; 0x54 10380: e5845050 str r5, [r4, #80] ; 0x50 10384: e3a00000 mov r0, #0 return 0; } 10388: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} 0000fcac : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { fcac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fcb0: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { fcb4: e1a06001 mov r6, r1 fcb8: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); fcbc: 059f01e8 ldreq r0, [pc, #488] ; feac fcc0: 03a01fe2 moveq r1, #904 ; 0x388 fcc4: 059f21e4 ldreq r2, [pc, #484] ; feb0 fcc8: 059f31e4 ldreq r3, [pc, #484] ; feb4 fccc: 0a000006 beq fcec if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); fcd0: e594304c ldr r3, [r4, #76] ; 0x4c fcd4: e3530005 cmp r3, #5 fcd8: 0a000004 beq fcf0 fcdc: e59f01c8 ldr r0, [pc, #456] ; feac <== NOT EXECUTED fce0: e59f21c8 ldr r2, [pc, #456] ; feb0 <== NOT EXECUTED fce4: e59f31cc ldr r3, [pc, #460] ; feb8 <== NOT EXECUTED fce8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED fcec: ebfff748 bl da14 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { fcf0: e59f31c4 ldr r3, [pc, #452] ; febc fcf4: e5935000 ldr r5, [r3] fcf8: e1a05125 lsr r5, r5, #2 fcfc: e2453001 sub r3, r5, #1 fd00: e1510003 cmp r1, r3 fd04: 8a00000e bhi fd44 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { fd08: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; fd0c: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { fd10: 0a000007 beq fd34 if ( !p ) { fd14: e3500000 cmp r0, #0 fd18: 1a000003 bne fd2c p = memfile_alloc_block(); fd1c: ebffffd5 bl fc78 if ( !p ) fd20: e3500000 cmp r0, #0 fd24: 0a00005e beq fea4 return 0; info->indirect = p; fd28: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; fd2c: e5940058 ldr r0, [r4, #88] ; 0x58 fd30: ea000001 b fd3c } if ( !p ) fd34: e3500000 cmp r0, #0 fd38: 0a000059 beq fea4 return 0; return &info->indirect[ my_block ]; fd3c: e0800106 add r0, r0, r6, lsl #2 fd40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { fd44: e2852001 add r2, r5, #1 <== NOT EXECUTED fd48: e0030295 mul r3, r5, r2 <== NOT EXECUTED fd4c: e2432001 sub r2, r3, #1 <== NOT EXECUTED fd50: e1510002 cmp r1, r2 <== NOT EXECUTED fd54: 8a00001b bhi fdc8 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; fd58: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fd5c: e1a00006 mov r0, r6 <== NOT EXECUTED fd60: e1a01005 mov r1, r5 <== NOT EXECUTED fd64: eb002dd7 bl 1b4c8 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fd68: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fd6c: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fd70: e1a00006 mov r0, r6 <== NOT EXECUTED fd74: eb002d3f bl 1b278 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { fd78: 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; fd7c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; fd80: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { fd84: 0a000009 beq fdb0 <== NOT EXECUTED if ( !p ) { fd88: e3530000 cmp r3, #0 <== NOT EXECUTED fd8c: 1a000003 bne fda0 <== NOT EXECUTED p = memfile_alloc_block(); fd90: ebffffb8 bl fc78 <== NOT EXECUTED if ( !p ) fd94: e2503000 subs r3, r0, #0 <== NOT EXECUTED fd98: 0a000041 beq fea4 <== NOT EXECUTED return 0; info->doubly_indirect = p; fd9c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; fda0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED fda4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { fda8: e3500000 cmp r0, #0 <== NOT EXECUTED fdac: ea00002e b fe6c <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) fdb0: e3530000 cmp r3, #0 <== NOT EXECUTED fdb4: 0a00003a beq fea4 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; fdb8: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) fdbc: e3500000 cmp r0, #0 <== NOT EXECUTED fdc0: 1a000035 bne fe9c <== NOT EXECUTED fdc4: ea000036 b fea4 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { fdc8: e2831001 add r1, r3, #1 <== NOT EXECUTED fdcc: e0020195 mul r2, r5, r1 <== NOT EXECUTED fdd0: e2422001 sub r2, r2, #1 <== NOT EXECUTED fdd4: e1560002 cmp r6, r2 <== NOT EXECUTED fdd8: 8a000031 bhi fea4 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; fddc: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fde0: e1a01005 mov r1, r5 <== NOT EXECUTED fde4: e1a00006 mov r0, r6 <== NOT EXECUTED fde8: eb002db6 bl 1b4c8 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fdec: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; fdf0: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; fdf4: e1a00006 mov r0, r6 <== NOT EXECUTED fdf8: eb002d1e bl 1b278 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; fdfc: 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; fe00: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; fe04: eb002d1b bl 1b278 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; fe08: 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; fe0c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; fe10: e1a00006 mov r0, r6 <== NOT EXECUTED fe14: eb002dab bl 1b4c8 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { fe18: 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; fe1c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; fe20: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { fe24: 0a000016 beq fe84 <== NOT EXECUTED if ( !p ) { fe28: e3530000 cmp r3, #0 <== NOT EXECUTED fe2c: 1a000003 bne fe40 <== NOT EXECUTED p = memfile_alloc_block(); fe30: ebffff90 bl fc78 <== NOT EXECUTED if ( !p ) fe34: e2503000 subs r3, r0, #0 <== NOT EXECUTED fe38: 0a000019 beq fea4 <== NOT EXECUTED return 0; info->triply_indirect = p; fe3c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; fe40: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { fe44: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; fe48: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { fe4c: 1a000003 bne fe60 <== NOT EXECUTED p1 = memfile_alloc_block(); fe50: ebffff88 bl fc78 <== NOT EXECUTED if ( !p1 ) fe54: e2502000 subs r2, r0, #0 <== NOT EXECUTED fe58: 0a000011 beq fea4 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; fe5c: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; fe60: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED fe64: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { fe68: e3500000 cmp r0, #0 <== NOT EXECUTED fe6c: 1a00000a bne fe9c <== NOT EXECUTED p2 = memfile_alloc_block(); fe70: ebffff80 bl fc78 <== NOT EXECUTED if ( !p2 ) fe74: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; fe78: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) fe7c: 1a000006 bne fe9c <== NOT EXECUTED fe80: ea000007 b fea4 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) fe84: e3530000 cmp r3, #0 <== NOT EXECUTED fe88: 0a000005 beq fea4 <== 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 ]; fe8c: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) fe90: e3530000 cmp r3, #0 <== NOT EXECUTED fe94: 0a000002 beq fea4 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; fe98: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED fe9c: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED fea0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED fea4: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } fea8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 000107c8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 107c8: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 107cc: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 107d0: e1a06003 mov r6, r3 107d4: e1a08001 mov r8, r1 107d8: e1a09002 mov r9, r2 107dc: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 107e0: 059f024c ldreq r0, [pc, #588] ; 10a34 107e4: 03a01f93 moveq r1, #588 ; 0x24c 107e8: 059f2248 ldreq r2, [pc, #584] ; 10a38 107ec: 059f3248 ldreq r3, [pc, #584] ; 10a3c 107f0: 0a000007 beq 10814 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 107f4: e594304c ldr r3, [r4, #76] ; 0x4c 107f8: e2432005 sub r2, r3, #5 107fc: e3520001 cmp r2, #1 10800: 9a000004 bls 10818 10804: e59f0228 ldr r0, [pc, #552] ; 10a34 <== NOT EXECUTED 10808: e59f1230 ldr r1, [pc, #560] ; 10a40 <== NOT EXECUTED 1080c: e59f2224 ldr r2, [pc, #548] ; 10a38 <== NOT EXECUTED 10810: e59f322c ldr r3, [pc, #556] ; 10a44 <== NOT EXECUTED 10814: ebfff47e bl da14 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 10818: e3560000 cmp r6, #0 1081c: 059f0210 ldreq r0, [pc, #528] ; 10a34 10820: 059f1220 ldreq r1, [pc, #544] ; 10a48 10824: 059f220c ldreq r2, [pc, #524] ; 10a38 10828: 059f321c ldreq r3, [pc, #540] ; 10a4c 1082c: 0afffff8 beq 10814 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 10830: e3570000 cmp r7, #0 10834: 1a000004 bne 1084c rtems_set_errno_and_return_minus_one( EINVAL ); 10838: eb000561 bl 11dc4 <__errno> <== NOT EXECUTED 1083c: e3a03016 mov r3, #22 <== NOT EXECUTED 10840: e5803000 str r3, [r0] <== NOT EXECUTED 10844: e3e07000 mvn r7, #0 <== NOT EXECUTED 10848: ea000077 b 10a2c <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 1084c: e3530006 cmp r3, #6 10850: 1a000012 bne 108a0 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 10854: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED 10858: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED 1085c: e1a0200a mov r2, sl <== NOT EXECUTED 10860: e1a0300b mov r3, fp <== NOT EXECUTED 10864: e3a01000 mov r1, #0 <== NOT EXECUTED 10868: e0522008 subs r2, r2, r8 <== NOT EXECUTED 1086c: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED 10870: 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; 10874: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 10878: ca000002 bgt 10888 <== NOT EXECUTED 1087c: 1a000002 bne 1088c <== NOT EXECUTED 10880: e1570002 cmp r7, r2 <== NOT EXECUTED 10884: 9a000000 bls 1088c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 10888: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 1088c: e0811008 add r1, r1, r8 <== NOT EXECUTED 10890: e1a00006 mov r0, r6 <== NOT EXECUTED 10894: e1a02007 mov r2, r7 <== NOT EXECUTED 10898: eb000757 bl 125fc <== NOT EXECUTED 1089c: ea00005d b 10a18 <== 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 ) 108a0: e5943054 ldr r3, [r4, #84] ; 0x54 108a4: e3a02000 mov r2, #0 108a8: e1520003 cmp r2, r3 108ac: 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; 108b0: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 108b4: e0872001 add r2, r7, r1 108b8: ca000004 bgt 108d0 108bc: 1a000001 bne 108c8 108c0: e1520005 cmp r2, r5 108c4: 8a000001 bhi 108d0 108c8: e1a05007 mov r5, r7 108cc: ea000000 b 108d4 my_length = the_jnode->info.file.size - start; 108d0: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 108d4: e59f3174 ldr r3, [pc, #372] ; 10a50 108d8: e593a000 ldr sl, [r3] 108dc: e1a0b00a mov fp, sl 108e0: e1a0cfcb asr ip, fp, #31 108e4: e1a0300c mov r3, ip 108e8: e1a00008 mov r0, r8 108ec: e1a0200b mov r2, fp 108f0: e1a01009 mov r1, r9 108f4: e58dc000 str ip, [sp] 108f8: eb002ec9 bl 1c424 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 108fc: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10900: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10904: e1a01009 mov r1, r9 10908: e1a00008 mov r0, r8 1090c: e1a0200b mov r2, fp 10910: e1a0300c mov r3, ip 10914: eb002d98 bl 1bf7c <__divdi3> if ( start_offset ) { 10918: 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; 1091c: e1a08000 mov r8, r0 if ( start_offset ) { 10920: 0a000013 beq 10974 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 ); 10924: e1a00004 mov r0, r4 10928: e1a01008 mov r1, r8 1092c: e3a02000 mov r2, #0 10930: ebfffcdd bl fcac assert( block_ptr ); 10934: e3500000 cmp r0, #0 10938: 059f00f4 ldreq r0, [pc, #244] ; 10a34 1093c: 059f1110 ldreq r1, [pc, #272] ; 10a54 10940: 0a00002c beq 109f8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 10944: 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; 10948: e067a00a rsb sl, r7, sl 1094c: e155000a cmp r5, sl 10950: 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 ); 10954: e0811007 add r1, r1, r7 10958: e1a00006 mov r0, r6 1095c: e1a0200a mov r2, sl 10960: eb000725 bl 125fc dest += to_copy; 10964: e086600a add r6, r6, sl block++; 10968: e2888001 add r8, r8, #1 my_length -= to_copy; 1096c: e06a5005 rsb r5, sl, r5 10970: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10974: e59f30d4 ldr r3, [pc, #212] ; 10a50 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10978: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1097c: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10980: ea00000f b 109c4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10984: e1a00004 mov r0, r4 10988: e1a01008 mov r1, r8 1098c: e3a02000 mov r2, #0 10990: ebfffcc5 bl fcac assert( block_ptr ); 10994: e3500000 cmp r0, #0 10998: 059f0094 ldreq r0, [pc, #148] ; 10a34 1099c: 059f10b4 ldreq r1, [pc, #180] ; 10a58 109a0: 0a000014 beq 109f8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 109a4: e5901000 ldr r1, [r0] 109a8: e1a0200a mov r2, sl 109ac: e1a00006 mov r0, r6 109b0: eb000711 bl 125fc dest += to_copy; 109b4: e086600a add r6, r6, sl block++; 109b8: e2888001 add r8, r8, #1 my_length -= to_copy; 109bc: e06a5005 rsb r5, sl, r5 copied += to_copy; 109c0: 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 ) { 109c4: e5993000 ldr r3, [r9] 109c8: e1550003 cmp r5, r3 109cc: 2affffec bcs 10984 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 109d0: e3550000 cmp r5, #0 109d4: 0a00000f beq 10a18 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 109d8: e1a01008 mov r1, r8 109dc: e1a00004 mov r0, r4 109e0: e3a02000 mov r2, #0 109e4: ebfffcb0 bl fcac assert( block_ptr ); 109e8: e2503000 subs r3, r0, #0 109ec: 1a000004 bne 10a04 109f0: e59f003c ldr r0, [pc, #60] ; 10a34 <== NOT EXECUTED 109f4: e59f1060 ldr r1, [pc, #96] ; 10a5c <== NOT EXECUTED 109f8: e59f2038 ldr r2, [pc, #56] ; 10a38 <== NOT EXECUTED 109fc: e59f305c ldr r3, [pc, #92] ; 10a60 <== NOT EXECUTED 10a00: eaffff83 b 10814 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 10a04: e1a00006 mov r0, r6 10a08: e5931000 ldr r1, [r3] 10a0c: e1a02005 mov r2, r5 10a10: eb0006f9 bl 125fc copied += my_length; 10a14: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); 10a18: e28d0004 add r0, sp, #4 10a1c: e3a01000 mov r1, #0 10a20: ebffc8f5 bl 2dfc 10a24: e59d3004 ldr r3, [sp, #4] 10a28: e5843040 str r3, [r4, #64] ; 0x40 return copied; } 10a2c: e1a00007 mov r0, r7 10a30: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 0000ff88 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ff88: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ff8c: e2504000 subs r4, r0, #0 ff90: 059f012c ldreq r0, [pc, #300] ; 100c4 ff94: 059f112c ldreq r1, [pc, #300] ; 100c8 ff98: 059f212c ldreq r2, [pc, #300] ; 100cc ff9c: 059f312c ldreq r3, [pc, #300] ; 100d0 ffa0: 0a000006 beq ffc0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffa4: e594304c ldr r3, [r4, #76] ; 0x4c ffa8: e3530005 cmp r3, #5 ffac: 0a000004 beq ffc4 ffb0: e59f010c ldr r0, [pc, #268] ; 100c4 <== NOT EXECUTED ffb4: e59f1118 ldr r1, [pc, #280] ; 100d4 <== NOT EXECUTED ffb8: e59f210c ldr r2, [pc, #268] ; 100cc <== NOT EXECUTED ffbc: e59f3114 ldr r3, [pc, #276] ; 100d8 <== NOT EXECUTED ffc0: ebfff693 bl da14 <__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; ffc4: e59f2110 ldr r2, [pc, #272] ; 100dc * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc8: 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; ffcc: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffd0: 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; ffd4: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); ffd8: 12840058 addne r0, r4, #88 ; 0x58 ffdc: 11a01005 movne r1, r5 ffe0: 1bffffb6 blne fec0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffe4: e594305c ldr r3, [r4, #92] ; 0x5c ffe8: e3530000 cmp r3, #0 ffec: 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; fff4: 1a000008 bne 1001c fff8: ea00000d b 10034 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { fffc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 10000: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 10004: e3520000 cmp r2, #0 <== NOT EXECUTED 10008: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( 1000c: 10830000 addne r0, r3, r0 <== NOT EXECUTED 10010: 11a01005 movne r1, r5 <== NOT EXECUTED 10014: 1bffffa9 blne fec0 <== 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 ); 10028: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 1002c: e1a01005 mov r1, r5 <== NOT EXECUTED 10030: ebffffa2 bl fec0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 10034: e5943060 ldr r3, [r4, #96] ; 0x60 10038: e3530000 cmp r3, #0 1003c: 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; 10044: 1a000016 bne 100a4 10048: ea00001b b 100bc } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 1004c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 10050: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 10054: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 10058: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 1005c: 0a000013 beq 100b0 <== NOT EXECUTED 10060: e3a08000 mov r8, #0 <== NOT EXECUTED 10064: ea000006 b 10084 <== 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( 10090: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 10094: e1a01005 mov r1, r5 <== NOT EXECUTED 10098: e0800009 add r0, r0, r9 <== NOT EXECUTED 1009c: ebffff87 bl fec0 <== 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( 100b0: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 100b4: e1a01005 mov r1, r5 <== NOT EXECUTED 100b8: ebffff80 bl fec0 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 100bc: e3a00000 mov r0, #0 100c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 0000ff3c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ff3c: 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 ); ff40: e3a02000 mov r2, #0 <== NOT EXECUTED ff44: ebffff58 bl fcac <== NOT EXECUTED assert( block_ptr ); ff48: e2503000 subs r3, r0, #0 <== NOT EXECUTED ff4c: 059f0024 ldreq r0, [pc, #36] ; ff78 <== NOT EXECUTED ff50: 059f1024 ldreq r1, [pc, #36] ; ff7c <== NOT EXECUTED ff54: 059f2024 ldreq r2, [pc, #36] ; ff80 <== NOT EXECUTED ff58: 059f3024 ldreq r3, [pc, #36] ; ff84 <== NOT EXECUTED ff5c: 0bfff6ac bleq da14 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; ff60: 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; ff64: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; ff68: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); ff6c: ebffff39 bl fc58 <== NOT EXECUTED } return 1; } ff70: e3a00001 mov r0, #1 <== NOT EXECUTED ff74: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00010498 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10498: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 1049c: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 104a0: e1a08001 mov r8, r1 104a4: e1a0a002 mov sl, r2 104a8: e1a06003 mov r6, r3 104ac: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 104b0: 059f0204 ldreq r0, [pc, #516] ; 106bc 104b4: 059f1204 ldreq r1, [pc, #516] ; 106c0 104b8: 059f2204 ldreq r2, [pc, #516] ; 106c4 104bc: 059f3204 ldreq r3, [pc, #516] ; 106c8 104c0: 0a000006 beq 104e0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 104c4: e594304c ldr r3, [r4, #76] ; 0x4c 104c8: e3530005 cmp r3, #5 104cc: 0a000004 beq 104e4 104d0: e59f01e4 ldr r0, [pc, #484] ; 106bc <== NOT EXECUTED 104d4: e59f11f0 ldr r1, [pc, #496] ; 106cc <== NOT EXECUTED 104d8: e59f21e4 ldr r2, [pc, #484] ; 106c4 <== NOT EXECUTED 104dc: e59f31ec ldr r3, [pc, #492] ; 106d0 <== NOT EXECUTED 104e0: ebfff54b bl da14 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 104e4: e3560000 cmp r6, #0 104e8: 059f01cc ldreq r0, [pc, #460] ; 106bc 104ec: 059f11e0 ldreq r1, [pc, #480] ; 106d4 104f0: 059f21cc ldreq r2, [pc, #460] ; 106c4 104f4: 059f31dc ldreq r3, [pc, #476] ; 106d8 104f8: 0afffff8 beq 104e0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 104fc: e3550000 cmp r5, #0 10500: 1a000002 bne 10510 rtems_set_errno_and_return_minus_one( EINVAL ); 10504: eb00062e bl 11dc4 <__errno> <== NOT EXECUTED 10508: e3a03016 mov r3, #22 <== NOT EXECUTED 1050c: ea00000e b 1054c <== 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 ) { 10510: e5943054 ldr r3, [r4, #84] ; 0x54 10514: e3530000 cmp r3, #0 10518: e0851001 add r1, r5, r1 1051c: ba000003 blt 10530 10520: 1a00000c bne 10558 10524: e5943050 ldr r3, [r4, #80] ; 0x50 10528: e1530001 cmp r3, r1 1052c: 2a000009 bcs 10558 status = IMFS_memfile_extend( the_jnode, last_byte ); 10530: e1a00004 mov r0, r4 10534: e3a02000 mov r2, #0 10538: ebffff40 bl 10240 if ( status ) 1053c: e3500000 cmp r0, #0 10540: 0a000004 beq 10558 rtems_set_errno_and_return_minus_one( ENOSPC ); 10544: eb00061e bl 11dc4 <__errno> <== NOT EXECUTED 10548: e3a0301c mov r3, #28 <== NOT EXECUTED 1054c: e5803000 str r3, [r0] <== NOT EXECUTED 10550: e3e07000 mvn r7, #0 <== NOT EXECUTED 10554: ea000056 b 106b4 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10558: e59f317c ldr r3, [pc, #380] ; 106dc 1055c: e5939000 ldr r9, [r3] 10560: e1a0b009 mov fp, r9 10564: e1a0cfcb asr ip, fp, #31 10568: e1a0300c mov r3, ip 1056c: e1a00008 mov r0, r8 10570: e1a0200b mov r2, fp 10574: e1a0100a mov r1, sl 10578: e58dc000 str ip, [sp] 1057c: eb002fa8 bl 1c424 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10580: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10584: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10588: e1a0100a mov r1, sl 1058c: e1a00008 mov r0, r8 10590: e1a0200b mov r2, fp 10594: e1a0300c mov r3, ip 10598: eb002e77 bl 1bf7c <__divdi3> if ( start_offset ) { 1059c: 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; 105a0: e1a08000 mov r8, r0 if ( start_offset ) { 105a4: 0a000013 beq 105f8 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 ); 105a8: e1a01008 mov r1, r8 105ac: e1a00004 mov r0, r4 105b0: e3a02000 mov r2, #0 105b4: ebfffdbc bl fcac assert( block_ptr ); 105b8: e3500000 cmp r0, #0 105bc: 059f00f8 ldreq r0, [pc, #248] ; 106bc 105c0: 03a01fc7 moveq r1, #796 ; 0x31c 105c4: 0a00002c beq 1067c 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 ); 105c8: 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; 105cc: e067a009 rsb sl, r7, r9 105d0: e15a0005 cmp sl, r5 105d4: 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 ); 105d8: e0800007 add r0, r0, r7 105dc: e1a01006 mov r1, r6 105e0: e1a0200a mov r2, sl 105e4: eb000804 bl 125fc src += to_copy; 105e8: e086600a add r6, r6, sl block++; 105ec: e2888001 add r8, r8, #1 my_length -= to_copy; 105f0: e06a5005 rsb r5, sl, r5 copied += to_copy; 105f4: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 105f8: e59f30dc ldr r3, [pc, #220] ; 106dc while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 105fc: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10600: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10604: ea00000f b 10648 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10608: e1a00004 mov r0, r4 1060c: e1a01008 mov r1, r8 10610: e3a02000 mov r2, #0 10614: ebfffda4 bl fcac assert( block_ptr ); 10618: e3500000 cmp r0, #0 1061c: 059f0098 ldreq r0, [pc, #152] ; 106bc 10620: 03a01e33 moveq r1, #816 ; 0x330 10624: 0a000014 beq 1067c 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 ); 10628: e1a01006 mov r1, r6 1062c: e5900000 ldr r0, [r0] 10630: e1a0200a mov r2, sl 10634: eb0007f0 bl 125fc src += to_copy; 10638: e086600a add r6, r6, sl block++; 1063c: e2888001 add r8, r8, #1 my_length -= to_copy; 10640: 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( 10644: 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 ) { 10648: e5993000 ldr r3, [r9] 1064c: e1550003 cmp r5, r3 10650: 2affffec bcs 10608 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 10654: e3550000 cmp r5, #0 10658: 0a00000f beq 1069c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1065c: e1a01008 mov r1, r8 10660: e1a00004 mov r0, r4 10664: e3a02000 mov r2, #0 10668: ebfffd8f bl fcac assert( block_ptr ); 1066c: e3500000 cmp r0, #0 10670: 1a000004 bne 10688 10674: e59f0040 ldr r0, [pc, #64] ; 106bc <== NOT EXECUTED 10678: e59f1060 ldr r1, [pc, #96] ; 106e0 <== NOT EXECUTED 1067c: e59f2040 ldr r2, [pc, #64] ; 106c4 <== NOT EXECUTED 10680: e59f305c ldr r3, [pc, #92] ; 106e4 <== NOT EXECUTED 10684: eaffff95 b 104e0 <== 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 ); 10688: e5900000 ldr r0, [r0] 1068c: e1a01006 mov r1, r6 10690: e1a02005 mov r2, r5 10694: eb0007d8 bl 125fc my_length = 0; copied += to_copy; 10698: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); 1069c: e28d0004 add r0, sp, #4 106a0: e3a01000 mov r1, #0 106a4: ebffc9d4 bl 2dfc 106a8: e59d3004 ldr r3, [sp, #4] 106ac: e5843048 str r3, [r4, #72] ; 0x48 106b0: e5843044 str r3, [r4, #68] ; 0x44 return copied; } 106b4: e1a00007 mov r0, r7 106b8: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 00008cd0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8cd0: e92d40f0 push {r4, r5, r6, r7, lr} 8cd4: e24dd040 sub sp, sp, #64 ; 0x40 8cd8: e1a04001 mov r4, r1 8cdc: e1a07000 mov r7, r0 8ce0: e1a06002 mov r6, r2 8ce4: 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 ); 8ce8: eb00140e bl dd28 8cec: e28d303c add r3, sp, #60 ; 0x3c 8cf0: e1a01000 mov r1, r0 8cf4: e28d2004 add r2, sp, #4 8cf8: e1a00007 mov r0, r7 8cfc: ebffff87 bl 8b20 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8d00: e2043a0f and r3, r4, #61440 ; 0xf000 8d04: e3530901 cmp r3, #16384 ; 0x4000 8d08: 0a00000e beq 8d48 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8d0c: e3530902 cmp r3, #32768 ; 0x8000 8d10: 03a01005 moveq r1, #5 8d14: 0a00000c beq 8d4c type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8d18: e3530a06 cmp r3, #24576 ; 0x6000 8d1c: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8d20: 058d6028 streq r6, [sp, #40] ; 0x28 8d24: 058d502c streq r5, [sp, #44] ; 0x2c 8d28: 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) ) { 8d2c: 0a000006 beq 8d4c type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8d30: e3530a01 cmp r3, #4096 ; 0x1000 8d34: 03a01007 moveq r1, #7 8d38: 0a000003 beq 8d4c type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8d3c: eb001008 bl cd64 <__errno> <== NOT EXECUTED 8d40: e3a03016 mov r3, #22 <== NOT EXECUTED 8d44: ea00000b b 8d78 <== NOT EXECUTED 8d48: 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( 8d4c: e28dc028 add ip, sp, #40 ; 0x28 8d50: e59d0054 ldr r0, [sp, #84] ; 0x54 8d54: e1a03004 mov r3, r4 8d58: e28d2004 add r2, sp, #4 8d5c: e58dc000 str ip, [sp] 8d60: eb000a40 bl b668 new_name, mode, &info ); if ( !new_node ) 8d64: e3500000 cmp r0, #0 8d68: 13a00000 movne r0, #0 8d6c: 1a000003 bne 8d80 rtems_set_errno_and_return_minus_one( ENOMEM ); 8d70: eb000ffb bl cd64 <__errno> <== NOT EXECUTED 8d74: e3a0300c mov r3, #12 <== NOT EXECUTED 8d78: e5803000 str r3, [r0] <== NOT EXECUTED 8d7c: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 8d80: e28dd040 add sp, sp, #64 ; 0x40 8d84: e8bd80f0 pop {r4, r5, r6, r7, pc} 000025cc : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 25cc: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 25d0: e593204c ldr r2, [r3, #76] ; 0x4c 25d4: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 25d8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 25dc: 0a000004 beq 25f4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 25e0: eb003df7 bl 11dc4 <__errno> <== NOT EXECUTED 25e4: e3a03014 mov r3, #20 <== NOT EXECUTED 25e8: e5803000 str r3, [r0] <== NOT EXECUTED 25ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 25f0: 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; 25f4: e583005c str r0, [r3, #92] ; 0x5c 25f8: e3a00000 mov r0, #0 return 0; } 25fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) 000031b4 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 31b4: e92d4030 push {r4, r5, lr} assert( the_jnode ); 31b8: e2504000 subs r4, r0, #0 31bc: 059f0130 ldreq r0, [pc, #304] ; 32f4 31c0: 03a01038 moveq r1, #56 ; 0x38 31c4: 059f212c ldreq r2, [pc, #300] ; 32f8 31c8: 059f312c ldreq r3, [pc, #300] ; 32fc 31cc: 0a00002f beq 3290 fprintf(stdout, "%s", the_jnode->name ); 31d0: e59f5128 ldr r5, [pc, #296] ; 3300 31d4: e5953000 ldr r3, [r5] 31d8: e284000c add r0, r4, #12 31dc: e5931008 ldr r1, [r3, #8] 31e0: eb003993 bl 11834 switch( the_jnode->type ) { 31e4: e594204c ldr r2, [r4, #76] ; 0x4c 31e8: e2423001 sub r3, r2, #1 31ec: e3530006 cmp r3, #6 31f0: 979ff103 ldrls pc, [pc, r3, lsl #2] 31f4: ea000034 b 32cc <== NOT EXECUTED 31f8: 00003214 .word 0x00003214 <== NOT EXECUTED 31fc: 00003228 .word 0x00003228 <== NOT EXECUTED 3200: 00003270 .word 0x00003270 <== NOT EXECUTED 3204: 00003294 .word 0x00003294 <== NOT EXECUTED 3208: 00003258 .word 0x00003258 <== NOT EXECUTED 320c: 0000323c .word 0x0000323c <== NOT EXECUTED 3210: 000032b0 .word 0x000032b0 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 3214: e5953000 ldr r3, [r5] 3218: e3a0002f mov r0, #47 ; 0x2f 321c: e5931008 ldr r1, [r3, #8] 3220: eb00393e bl 11720 break; 3224: ea00002f b 32e8 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 3228: e5952000 ldr r2, [r5] 322c: e5943054 ldr r3, [r4, #84] ; 0x54 3230: e5920008 ldr r0, [r2, #8] 3234: e59f10c8 ldr r1, [pc, #200] ; 3304 3238: ea000003 b 324c the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 323c: e5952000 ldr r2, [r5] <== NOT EXECUTED 3240: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3244: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3248: e59f10b8 ldr r1, [pc, #184] ; 3308 <== NOT EXECUTED 324c: e5942050 ldr r2, [r4, #80] ; 0x50 3250: eb003916 bl 116b0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3254: ea000023 b 32e8 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 3258: e5953000 ldr r3, [r5] 325c: e5942050 ldr r2, [r4, #80] ; 0x50 3260: e5930008 ldr r0, [r3, #8] 3264: e59f10a0 ldr r1, [pc, #160] ; 330c 3268: eb003910 bl 116b0 (uint32_t)the_jnode->info.file.size ); #endif break; 326c: ea00001d b 32e8 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 3270: e5953000 ldr r3, [r5] <== NOT EXECUTED 3274: e59f0094 ldr r0, [pc, #148] ; 3310 <== NOT EXECUTED 3278: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 327c: eb00396c bl 11834 <== NOT EXECUTED assert(0); 3280: e59f006c ldr r0, [pc, #108] ; 32f4 <== NOT EXECUTED 3284: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3288: e59f2068 ldr r2, [pc, #104] ; 32f8 <== NOT EXECUTED 328c: e59f3080 ldr r3, [pc, #128] ; 3314 <== NOT EXECUTED 3290: eb00020d bl 3acc <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3294: e5953000 ldr r3, [r5] <== NOT EXECUTED 3298: e59f0070 ldr r0, [pc, #112] ; 3310 <== NOT EXECUTED 329c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 32a0: eb003963 bl 11834 <== NOT EXECUTED assert(0); 32a4: e59f0048 ldr r0, [pc, #72] ; 32f4 <== NOT EXECUTED 32a8: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 32ac: eafffff5 b 3288 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 32b0: e5953000 ldr r3, [r5] <== NOT EXECUTED 32b4: e59f005c ldr r0, [pc, #92] ; 3318 <== NOT EXECUTED 32b8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 32bc: eb00395c bl 11834 <== NOT EXECUTED assert(0); 32c0: e59f002c ldr r0, [pc, #44] ; 32f4 <== NOT EXECUTED 32c4: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 32c8: eaffffee b 3288 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 32cc: e5953000 ldr r3, [r5] <== NOT EXECUTED 32d0: e59f1044 ldr r1, [pc, #68] ; 331c <== NOT EXECUTED 32d4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 32d8: eb0038f4 bl 116b0 <== NOT EXECUTED assert(0); 32dc: e59f0010 ldr r0, [pc, #16] ; 32f4 <== NOT EXECUTED 32e0: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 32e4: eaffffe7 b 3288 <== NOT EXECUTED break; } puts(""); 32e8: e59f0030 ldr r0, [pc, #48] ; 3320 } 32ec: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 32f0: ea00401b b 13364 0000260c : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 260c: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 2610: e593004c ldr r0, [r3, #76] ; 0x4c 2614: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 2618: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 261c: 03a00000 moveq r0, #0 2620: 0a000006 beq 2640 rtems_set_errno_and_return_minus_one( EINVAL ); 2624: eb003de6 bl 11dc4 <__errno> <== NOT EXECUTED 2628: e3a03016 mov r3, #22 <== NOT EXECUTED 262c: e5803000 str r3, [r0] <== NOT EXECUTED 2630: e3e00000 mvn r0, #0 <== NOT EXECUTED 2634: 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]; 2638: 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++ ) 263c: e2800001 add r0, r0, #1 2640: e1500002 cmp r0, r2 2644: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 2648: e593c050 ldr ip, [r3, #80] ; 0x50 264c: e7dcc000 ldrb ip, [ip, r0] 2650: e35c0000 cmp ip, #0 2654: 1afffff7 bne 2638 buf[i] = node->info.sym_link.name[i]; return i; } 2658: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000265c : 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 */ ) { 265c: 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; 2660: 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 */ ) { 2664: 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 ); 2668: e1a01003 mov r1, r3 <== NOT EXECUTED 266c: e284000c add r0, r4, #12 <== NOT EXECUTED 2670: e3a02020 mov r2, #32 <== NOT EXECUTED 2674: eb0041c3 bl 12d88 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 2678: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 267c: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2680: 11a00004 movne r0, r4 <== NOT EXECUTED 2684: 1b0011a6 blne 6d24 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 2688: 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 ); 268c: e1a01004 mov r1, r4 <== NOT EXECUTED 2690: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 2694: e5843008 str r3, [r4, #8] <== NOT EXECUTED 2698: eb001196 bl 6cf8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 269c: e1a0000d mov r0, sp <== NOT EXECUTED 26a0: e3a01000 mov r1, #0 <== NOT EXECUTED 26a4: eb0001d4 bl 2dfc <== NOT EXECUTED 26a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 26ac: 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 ); 26b0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 26b4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00008e3c : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8e3c: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 8e40: e593204c ldr r2, [r3, #76] ; 0x4c 8e44: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8e48: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8e4c: e3520005 cmp r2, #5 8e50: 979ff102 ldrls pc, [pc, r2, lsl #2] 8e54: ea000012 b 8ea4 <== NOT EXECUTED 8e58: 00008e70 .word 0x00008e70 <== NOT EXECUTED 8e5c: 00008ea4 .word 0x00008ea4 <== NOT EXECUTED 8e60: 00008e90 .word 0x00008e90 <== NOT EXECUTED 8e64: 00008e84 .word 0x00008e84 <== NOT EXECUTED 8e68: 00008e84 .word 0x00008e84 <== NOT EXECUTED 8e6c: 00008e90 .word 0x00008e90 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8e70: e2832050 add r2, r3, #80 ; 0x50 8e74: e8921004 ldm r2, {r2, ip} 8e78: e581c01c str ip, [r1, #28] 8e7c: e5812018 str r2, [r1, #24] break; 8e80: ea00000c b 8eb8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8e84: e283c050 add ip, r3, #80 ; 0x50 8e88: e89c1800 ldm ip, {fp, ip} 8e8c: ea000001 b 8e98 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8e90: e3a0b000 mov fp, #0 <== NOT EXECUTED 8e94: e3a0c000 mov ip, #0 <== NOT EXECUTED 8e98: e581b020 str fp, [r1, #32] 8e9c: e581c024 str ip, [r1, #36] ; 0x24 break; 8ea0: ea000004 b 8eb8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8ea4: eb000fae bl cd64 <__errno> <== NOT EXECUTED 8ea8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8eac: e5803000 str r3, [r0] <== NOT EXECUTED 8eb0: e3e00000 mvn r0, #0 <== NOT EXECUTED 8eb4: e8bd8800 pop {fp, pc} <== NOT EXECUTED */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 8eb8: e5932030 ldr r2, [r3, #48] ; 0x30 8ebc: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8ec0: e5932038 ldr r2, [r3, #56] ; 0x38 8ec4: 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; 8ec8: e5932040 ldr r2, [r3, #64] ; 0x40 8ecc: e5812028 str r2, [r1, #40] ; 0x28 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 8ed0: e5902010 ldr r2, [r0, #16] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8ed4: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 8ed8: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8edc: e5930044 ldr r0, [r3, #68] ; 0x44 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 8ee0: e5922000 ldr r2, [r2] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8ee4: e1c1c1b0 strh ip, [r1, #16] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8ee8: e5810030 str r0, [r1, #48] ; 0x30 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 8eec: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8ef0: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8ef4: e5930048 ldr r0, [r3, #72] ; 0x48 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8ef8: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8efc: e5810038 str r0, [r1, #56] ; 0x38 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 8f00: e1d333be ldrh r3, [r3, #62] ; 0x3e /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 8f04: e59f000c ldr r0, [pc, #12] ; 8f18 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; 8f08: e1c131b4 strh r3, [r1, #20] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 8f0c: e5810000 str r0, [r1] 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; 8f10: e3a00000 mov r0, #0 return 0; } 8f14: e8bd8800 pop {fp, pc} 000026b8 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 26b8: e92d40f0 push {r4, r5, r6, r7, lr} 26bc: e1a05000 mov r5, r0 26c0: 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 ); 26c4: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 26c8: e1a07002 mov r7, r2 26cc: 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 ); 26d0: eb004194 bl 12d28 26d4: e28d4004 add r4, sp, #4 26d8: e1a01000 mov r1, r0 26dc: e1a02004 mov r2, r4 26e0: e28d303c add r3, sp, #60 ; 0x3c 26e4: e1a00007 mov r0, r7 26e8: eb002c35 bl d7c4 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 26ec: e1a00006 mov r0, r6 26f0: eb004178 bl 12cd8 if (info.sym_link.name == NULL) { 26f4: 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); 26f8: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 26fc: 0a00000b beq 2730 * 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( 2700: e28dc028 add ip, sp, #40 ; 0x28 2704: e1a00005 mov r0, r5 2708: e1a02004 mov r2, r4 270c: e3a01004 mov r1, #4 2710: e59f3030 ldr r3, [pc, #48] ; 2748 2714: e58dc000 str ip, [sp] 2718: eb00292f bl cbdc new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 271c: e3500000 cmp r0, #0 2720: 13a00000 movne r0, #0 2724: 1a000005 bne 2740 free(info.sym_link.name); 2728: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 272c: eb000189 bl 2d58 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2730: eb003da3 bl 11dc4 <__errno> <== NOT EXECUTED 2734: e3a0300c mov r3, #12 <== NOT EXECUTED 2738: e5803000 str r3, [r0] <== NOT EXECUTED 273c: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 2740: e28dd040 add sp, sp, #64 ; 0x40 2744: e8bd80f0 pop {r4, r5, r6, r7, pc} 0000274c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 274c: 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; 2750: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2754: e595304c ldr r3, [r5, #76] ; 0x4c 2758: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 275c: e24dd01c sub sp, sp, #28 2760: e1a04001 mov r4, r1 2764: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2768: 1a000025 bne 2804 if ( !node->info.hard_link.link_node ) 276c: e595e050 ldr lr, [r5, #80] ; 0x50 2770: e35e0000 cmp lr, #0 2774: 1a000003 bne 2788 rtems_set_errno_and_return_minus_one( EINVAL ); 2778: eb003d91 bl 11dc4 <__errno> <== NOT EXECUTED 277c: e3a03016 mov r3, #22 <== NOT EXECUTED 2780: e5803000 str r3, [r0] <== NOT EXECUTED 2784: ea000014 b 27dc <== NOT EXECUTED the_link = *loc; 2788: e1a07001 mov r7, r1 278c: e8b7000f ldm r7!, {r0, r1, r2, r3} 2790: e1a0c00d mov ip, sp 2794: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 2798: e28d801c add r8, sp, #28 279c: 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; 27a0: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 27a4: 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; 27a8: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 27ac: eb002959 bl cd18 /* * 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) 27b0: e5953050 ldr r3, [r5, #80] ; 0x50 27b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 27b8: e3520001 cmp r2, #1 27bc: 1a000008 bne 27e4 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 27c0: e1a0100d mov r1, sp 27c4: e1a00006 mov r0, r6 27c8: e59d3008 ldr r3, [sp, #8] 27cc: e1a0e00f mov lr, pc 27d0: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 27d4: e3500000 cmp r0, #0 27d8: 0a000009 beq 2804 27dc: e3e00000 mvn r0, #0 27e0: ea00000c b 2818 return -1; } else { node->info.hard_link.link_node->st_nlink --; 27e4: e2422001 sub r2, r2, #1 27e8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 27ec: e28d0014 add r0, sp, #20 27f0: e3a01000 mov r1, #0 27f4: eb000180 bl 2dfc 27f8: e5953050 ldr r3, [r5, #80] ; 0x50 27fc: e59d2014 ldr r2, [sp, #20] 2800: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2804: e1a00006 mov r0, r6 2808: e1a01004 mov r1, r4 280c: e5943008 ldr r3, [r4, #8] 2810: e1a0e00f mov lr, pc 2814: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 2818: e28dd01c add sp, sp, #28 281c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00002820 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2820: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2824: e593204c ldr r2, [r3, #76] ; 0x4c 2828: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 282c: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2830: 0a000002 beq 2840 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2834: eb003d62 bl 11dc4 <__errno> <== NOT EXECUTED 2838: e3a03014 mov r3, #20 <== NOT EXECUTED 283c: ea000004 b 2854 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2840: e593205c ldr r2, [r3, #92] ; 0x5c 2844: e3520000 cmp r2, #0 2848: 1a000004 bne 2860 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 284c: eb003d5c bl 11dc4 <__errno> <== NOT EXECUTED 2850: e3a03016 mov r3, #22 <== NOT EXECUTED 2854: e5803000 str r3, [r0] <== NOT EXECUTED 2858: e3e00000 mvn r0, #0 <== NOT EXECUTED 285c: 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; 2860: e3a00000 mov r0, #0 2864: e583005c str r0, [r3, #92] ; 0x5c return 0; } 2868: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001b28 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1b28: e59f30c8 ldr r3, [pc, #200] ; 1bf8 1b2c: e5933000 ldr r3, [r3] 1b30: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1b34: e92d4070 push {r4, r5, r6, lr} 1b38: e1a04000 mov r4, r0 1b3c: e1a05001 mov r5, r1 1b40: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 1b44: 11a0e00f movne lr, pc 1b48: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1b4c: ebffffe1 bl 1ad8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1b50: e59f30a4 ldr r3, [pc, #164] ; 1bfc 1b54: e5933000 ldr r3, [r3] 1b58: e3530000 cmp r3, #0 1b5c: 0a000006 beq 1b7c void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1b60: e1a00004 mov r0, r4 <== NOT EXECUTED 1b64: e1a01006 mov r1, r6 <== NOT EXECUTED 1b68: e1a0e00f mov lr, pc <== NOT EXECUTED 1b6c: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1b70: e0845005 add r5, r4, r5 <== NOT EXECUTED 1b74: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 1b78: 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 ( 1b7c: e59f307c ldr r3, [pc, #124] ; 1c00 1b80: e5d31000 ldrb r1, [r3] 1b84: e3510000 cmp r1, #0 1b88: 1a000005 bne 1ba4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1b8c: e59f3070 ldr r3, [pc, #112] ; 1c04 1b90: e5d33028 ldrb r3, [r3, #40] ; 0x28 1b94: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 1b98: 11a00004 movne r0, r4 1b9c: 11a02005 movne r2, r5 1ba0: 1b002eb9 blne d68c * 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 ) { 1ba4: e59f3054 ldr r3, [pc, #84] ; 1c00 1ba8: e5d33000 ldrb r3, [r3] 1bac: e3530000 cmp r3, #0 1bb0: 1a000008 bne 1bd8 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1bb4: e59f304c ldr r3, [pc, #76] ; 1c08 1bb8: e1a01004 mov r1, r4 1bbc: e5930000 ldr r0, [r3] 1bc0: e1a02005 mov r2, r5 1bc4: e3a03004 mov r3, #4 1bc8: eb000f1f bl 584c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1bcc: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1bd0: 0280001a addeq r0, r0, #26 1bd4: 0b000d37 bleq 50b8 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1bd8: e59f3028 ldr r3, [pc, #40] ; 1c08 1bdc: e59f4028 ldr r4, [pc, #40] ; 1c0c 1be0: e5930000 ldr r0, [r3] 1be4: e5945000 ldr r5, [r4] 1be8: eb0011f8 bl 63d0 <_Protected_heap_Get_size> 1bec: e0800005 add r0, r0, r5 1bf0: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 1bf4: e8bd8070 pop {r4, r5, r6, pc} 00002db8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2db8: 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 ) 2dbc: e250a000 subs sl, r0, #0 <== NOT EXECUTED 2dc0: 0a000043 beq 2ed4 <== NOT EXECUTED return; if ( !print_handler ) 2dc4: e59f310c ldr r3, [pc, #268] ; 2ed8 <== NOT EXECUTED 2dc8: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 2dcc: e3570000 cmp r7, #0 <== NOT EXECUTED 2dd0: 0a00003f beq 2ed4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2dd4: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 2dd8: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 2ddc: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2de0: 1a000005 bne 2dfc <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 2de4: e59f40f0 ldr r4, [pc, #240] ; 2edc <== NOT EXECUTED 2de8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 2dec: e3530000 cmp r3, #0 <== NOT EXECUTED 2df0: 13a06000 movne r6, #0 <== NOT EXECUTED 2df4: 11a0a006 movne sl, r6 <== NOT EXECUTED 2df8: 0a000035 beq 2ed4 <== 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); 2dfc: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 2e00: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2e04: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 2e08: e1a00009 mov r0, r9 <== NOT EXECUTED 2e0c: e1a01005 mov r1, r5 <== NOT EXECUTED 2e10: ebffffda bl 2d80 <== NOT EXECUTED if ( high_water_mark ) 2e14: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 2e18: 10899005 addne r9, r9, r5 <== NOT EXECUTED 2e1c: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 2e20: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e24: e59f30ac ldr r3, [pc, #172] ; 2ed8 <== NOT EXECUTED 2e28: 0a00000c beq 2e60 <== NOT EXECUTED (*print_handler)( 2e2c: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 2e30: e28d2008 add r2, sp, #8 <== NOT EXECUTED 2e34: e1a0000a mov r0, sl <== NOT EXECUTED 2e38: e3a01005 mov r1, #5 <== NOT EXECUTED 2e3c: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 2e40: eb001543 bl 8354 <== NOT EXECUTED 2e44: e1a0200a mov r2, sl <== NOT EXECUTED 2e48: e1a03000 mov r3, r0 <== NOT EXECUTED 2e4c: e59f108c ldr r1, [pc, #140] ; 2ee0 <== NOT EXECUTED 2e50: e1a00009 mov r0, r9 <== NOT EXECUTED 2e54: e1a0e00f mov lr, pc <== NOT EXECUTED 2e58: e12fff17 bx r7 <== NOT EXECUTED 2e5c: ea000004 b 2e74 <== 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 ); 2e60: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2e64: e59f1078 ldr r1, [pc, #120] ; 2ee4 <== NOT EXECUTED 2e68: e3e02000 mvn r2, #0 <== NOT EXECUTED 2e6c: e1a0e00f mov lr, pc <== NOT EXECUTED 2e70: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 2e74: e5943000 ldr r3, [r4] <== NOT EXECUTED 2e78: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 2e7c: e59f4054 ldr r4, [pc, #84] ; 2ed8 <== NOT EXECUTED 2e80: e58d6000 str r6, [sp] <== NOT EXECUTED 2e84: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 2e88: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e8c: e0823003 add r3, r2, r3 <== NOT EXECUTED 2e90: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2e94: e59f104c ldr r1, [pc, #76] ; 2ee8 <== NOT EXECUTED 2e98: e1a0e00f mov lr, pc <== NOT EXECUTED 2e9c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2ea0: e5943000 ldr r3, [r4] <== NOT EXECUTED 2ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ea8: 1a000004 bne 2ec0 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 2eac: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2eb0: e59f1034 ldr r1, [pc, #52] ; 2eec <== NOT EXECUTED 2eb4: e1a0e00f mov lr, pc <== NOT EXECUTED 2eb8: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 2ebc: ea000004 b 2ed4 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2ec0: e1a02008 mov r2, r8 <== NOT EXECUTED 2ec4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 2ec8: e59f1020 ldr r1, [pc, #32] ; 2ef0 <== NOT EXECUTED 2ecc: e1a0e00f mov lr, pc <== NOT EXECUTED 2ed0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 2ed4: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED 00002d80 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2d80: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 2d84: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 2d88: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 2d8c: e59f3020 ldr r3, [pc, #32] ; 2db4 <== 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++) 2d90: ea000003 b 2da4 <== NOT EXECUTED if (*base != U32_PATTERN) 2d94: e5902000 ldr r2, [r0] <== NOT EXECUTED 2d98: e1520003 cmp r2, r3 <== NOT EXECUTED 2d9c: 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++) 2da0: e2800004 add r0, r0, #4 <== NOT EXECUTED 2da4: e1500001 cmp r0, r1 <== NOT EXECUTED 2da8: 3afffff9 bcc 2d94 <== NOT EXECUTED 2dac: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 2db0: e12fff1e bx lr <== NOT EXECUTED 00005aa4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5aa4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 5aa8: e1a04001 mov r4, r1 5aac: 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 ) ) { 5ab0: e1a0100d mov r1, sp 5ab4: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5ab8: e1a08002 mov r8, r2 5abc: 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 ) ) { 5ac0: eb00006f bl 5c84 <_POSIX_Mutex_Get> 5ac4: e3500000 cmp r0, #0 5ac8: 0a000032 beq 5b98 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 5acc: e59f30d0 ldr r3, [pc, #208] ; 5ba4 <_POSIX_Condition_variables_Wait_support+0x100> 5ad0: e5932000 ldr r2, [r3] 5ad4: e2422001 sub r2, r2, #1 5ad8: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5adc: e1a0100d mov r1, sp 5ae0: e1a00006 mov r0, r6 5ae4: ebffff7c bl 58dc <_POSIX_Condition_variables_Get> switch ( location ) { 5ae8: e59d3000 ldr r3, [sp] 5aec: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 5af0: e1a0a000 mov sl, r0 switch ( location ) { 5af4: 1a000027 bne 5b98 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 5af8: e5903014 ldr r3, [r0, #20] 5afc: e3530000 cmp r3, #0 5b00: 0a000004 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74> 5b04: e5942000 ldr r2, [r4] 5b08: e1530002 cmp r3, r2 5b0c: 0a000001 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); 5b10: eb000bd9 bl 8a7c <_Thread_Enable_dispatch> 5b14: ea00001f b 5b98 <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5b18: e1a00004 mov r0, r4 5b1c: eb0000de bl 5e9c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 5b20: e3570000 cmp r7, #0 5b24: 1a000015 bne 5b80 <_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; 5b28: e59f5078 ldr r5, [pc, #120] ; 5ba8 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5b2c: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5b30: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5b34: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5b38: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 5b3c: 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; 5b40: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 5b44: 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; 5b48: 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; 5b4c: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 5b50: e1a00002 mov r0, r2 5b54: e58a1048 str r1, [sl, #72] ; 0x48 5b58: e59f204c ldr r2, [pc, #76] ; 5bac <_POSIX_Condition_variables_Wait_support+0x108> 5b5c: e1a01008 mov r1, r8 5b60: eb000cfe bl 8f60 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 5b64: eb000bc4 bl 8a7c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 5b68: e5953000 ldr r3, [r5] 5b6c: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 5b70: e3550074 cmp r5, #116 ; 0x74 5b74: 13550000 cmpne r5, #0 5b78: 0a000002 beq 5b88 <_POSIX_Condition_variables_Wait_support+0xe4> 5b7c: ea000006 b 5b9c <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 5b80: eb000bbd bl 8a7c <_Thread_Enable_dispatch> 5b84: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 5b88: e1a00004 mov r0, r4 5b8c: eb0000a3 bl 5e20 if ( mutex_status ) 5b90: e3500000 cmp r0, #0 5b94: 0a000000 beq 5b9c <_POSIX_Condition_variables_Wait_support+0xf8> 5b98: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 5b9c: e1a00005 mov r0, r5 5ba0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} 00006f2c <_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 ) { 6f2c: 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; 6f30: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6f34: e281503c add r5, r1, #60 ; 0x3c 6f38: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 6f3c: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 6f40: 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 ) ) 6f44: 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 ]; 6f48: 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; 6f4c: e581503c str r5, [r1, #60] ; 0x3c 6f50: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 6f54: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 6f58: 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 ]; 6f5c: 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; 6f60: 159f8154 ldrne r8, [pc, #340] ; 70bc <_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 ) ) 6f64: 1a000023 bne 6ff8 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6f68: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6f6c: e10f5000 mrs r5, CPSR 6f70: e3854080 orr r4, r5, #128 ; 0x80 6f74: 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; 6f78: e3e06000 mvn r6, #0 6f7c: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6f80: ea00000b b 6fb4 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 6f84: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 6f88: e1530006 cmp r3, r6 6f8c: 9a00000a bls 6fbc <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6f90: e10fa000 mrs sl, CPSR 6f94: e129f005 msr CPSR_fc, r5 6f98: 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) ) { 6f9c: e594a010 ldr sl, [r4, #16] 6fa0: e117000a tst r7, sl 6fa4: 1a000001 bne 6fb0 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6fa8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6fac: eaffffee b 6f6c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 6fb0: 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 ) ) { 6fb4: e1540008 cmp r4, r8 6fb8: 1afffff1 bne 6f84 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6fbc: e590c030 ldr ip, [r0, #48] ; 0x30 6fc0: e35c0001 cmp ip, #1 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 ) ) { 6fc4: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6fc8: 1a000038 bne 70b0 <_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 ) 6fcc: 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; 6fd0: e3a03000 mov r3, #0 6fd4: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6fd8: 0a00002a beq 7088 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6fdc: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6fe0: e5814000 str r4, [r1] the_node->previous = previous_node; 6fe4: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6fe8: 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; 6fec: e5831000 str r1, [r3] search_node->previous = the_node; 6ff0: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6ff4: ea000021 b 7080 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6ff8: e5d86000 ldrb r6, [r8] 6ffc: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7000: e10f5000 mrs r5, CPSR 7004: e3854080 orr r4, r5, #128 ; 0x80 7008: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 700c: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7010: ea00000b b 7044 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 7014: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 7018: e1530006 cmp r3, r6 701c: 2a00000a bcs 704c <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7020: e10fa000 mrs sl, CPSR 7024: e129f005 msr CPSR_fc, r5 7028: 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) ) { 702c: e594a010 ldr sl, [r4, #16] 7030: e117000a tst r7, sl 7034: 1a000001 bne 7040 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7038: e129f005 msr CPSR_fc, r5 703c: eaffffed b 6ff8 <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 7040: 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 ) ) { 7044: e154000c cmp r4, ip 7048: 1afffff1 bne 7014 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 704c: e590c030 ldr ip, [r0, #48] ; 0x30 7050: e35c0001 cmp ip, #1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7054: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7058: 1a000014 bne 70b0 <_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 ) 705c: 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; 7060: e3a03000 mov r3, #0 7064: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7068: 0a000006 beq 7088 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 706c: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7070: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7074: 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; 7078: e5841000 str r1, [r4] next_node->previous = the_node; 707c: e5831004 str r1, [r3, #4] 7080: e129f005 msr CPSR_fc, r5 7084: ea000007 b 70a8 <_Thread_queue_Enqueue_priority+0x17c> 7088: 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; 708c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7090: e5814000 str r4, [r1] the_node->previous = previous_node; 7094: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7098: 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; 709c: e5831000 str r1, [r3] search_node->previous = the_node; 70a0: e5841004 str r1, [r4, #4] 70a4: e129f00c msr CPSR_fc, ip 70a8: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 70ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * 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; 70b0: e582c000 str ip, [r2] return the_thread_queue->sync_state; 70b4: e5900030 ldr r0, [r0, #48] ; 0x30 } 70b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 00014a24 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 14a24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 14a28: e24dd020 sub sp, sp, #32 14a2c: e28d3014 add r3, sp, #20 14a30: 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; 14a34: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 14a38: e283a004 add sl, r3, #4 14a3c: 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); 14a40: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 14a44: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14a48: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 14a4c: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 14a50: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 14a54: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 14a58: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 14a5c: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 14a60: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14a64: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 14a68: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14a6c: 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 ); 14a70: e2807068 add r7, r0, #104 ; 0x68 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 14a74: e28d2014 add r2, sp, #20 14a78: 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; 14a7c: e59f2168 ldr r2, [pc, #360] ; 14bec <_Timer_server_Body+0x1c8> 14a80: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 14a84: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14a88: e1a02005 mov r2, r5 14a8c: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 14a90: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14a94: e1a0000b mov r0, fp 14a98: eb00106c bl 18c50 <_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(); 14a9c: e59f314c ldr r3, [pc, #332] ; 14bf0 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 14aa0: 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(); 14aa4: 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 ) { 14aa8: e1560002 cmp r6, r2 14aac: 9a000004 bls 14ac4 <_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 ); 14ab0: e0621006 rsb r1, r2, r6 14ab4: e1a00007 mov r0, r7 14ab8: e1a02005 mov r2, r5 14abc: eb001063 bl 18c50 <_Watchdog_Adjust_to_chain> 14ac0: ea000003 b 14ad4 <_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 ); 14ac4: 30662002 rsbcc r2, r6, r2 14ac8: 31a00007 movcc r0, r7 14acc: 33a01001 movcc r1, #1 14ad0: 3b001036 blcc 18bb0 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 14ad4: 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 ); 14ad8: e5940078 ldr r0, [r4, #120] ; 0x78 14adc: eb00023b bl 153d0 <_Chain_Get> if ( timer == NULL ) { 14ae0: e2501000 subs r1, r0, #0 14ae4: 0a00000a beq 14b14 <_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 ) { 14ae8: e5913038 ldr r3, [r1, #56] ; 0x38 14aec: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 14af0: 02811010 addeq r1, r1, #16 14af4: 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 ) { 14af8: 0a000003 beq 14b0c <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 14afc: e3530003 cmp r3, #3 14b00: 1afffff4 bne 14ad8 <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 14b04: e2811010 add r1, r1, #16 14b08: e1a00007 mov r0, r7 14b0c: eb00107c bl 18d04 <_Watchdog_Insert> 14b10: eafffff0 b 14ad8 <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 14b14: e10f3000 mrs r3, CPSR 14b18: e3832080 orr r2, r3, #128 ; 0x80 14b1c: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 14b20: e59d2014 ldr r2, [sp, #20] 14b24: e152000a cmp r2, sl 14b28: 1a000005 bne 14b44 <_Timer_server_Body+0x120> ts->insert_chain = NULL; 14b2c: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 14b30: 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 ) ) { 14b34: e59d3008 ldr r3, [sp, #8] 14b38: e1530008 cmp r3, r8 14b3c: 1a000002 bne 14b4c <_Timer_server_Body+0x128> 14b40: ea000015 b 14b9c <_Timer_server_Body+0x178> 14b44: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 14b48: eaffffcb b 14a7c <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 14b4c: e10f2000 mrs r2, CPSR 14b50: e3823080 orr r3, r2, #128 ; 0x80 14b54: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 14b58: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 14b5c: e1530008 cmp r3, r8 14b60: 0a00000b beq 14b94 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 14b64: 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 ) { 14b68: e3530000 cmp r3, #0 the_chain->first = new_first; 14b6c: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 14b70: e5815004 str r5, [r1, #4] 14b74: 0a000006 beq 14b94 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 14b78: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 14b7c: 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 ); 14b80: e2830020 add r0, r3, #32 14b84: e8900003 ldm r0, {r0, r1} 14b88: e1a0e00f mov lr, pc 14b8c: e593f01c ldr pc, [r3, #28] } 14b90: eaffffed b 14b4c <_Timer_server_Body+0x128> 14b94: e129f002 msr CPSR_fc, r2 14b98: eaffffb5 b 14a74 <_Timer_server_Body+0x50> } else { ts->active = false; 14b9c: e5c4907c strb r9, [r4, #124] ; 0x7c 14ba0: e59f304c ldr r3, [pc, #76] ; 14bf4 <_Timer_server_Body+0x1d0> 14ba4: e5932000 ldr r2, [r3] 14ba8: e2822001 add r2, r2, #1 14bac: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 14bb0: e3a01008 mov r1, #8 14bb4: e5940000 ldr r0, [r4] 14bb8: eb000d9f bl 1823c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 14bbc: e1a00004 mov r0, r4 14bc0: ebffff6b bl 14974 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 14bc4: e1a00004 mov r0, r4 14bc8: ebffff7f bl 149cc <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 14bcc: eb000b01 bl 177d8 <_Thread_Enable_dispatch> ts->active = true; 14bd0: e3a03001 mov r3, #1 14bd4: 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 ); 14bd8: e59d0004 ldr r0, [sp, #4] 14bdc: eb0010a1 bl 18e68 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14be0: e59d0000 ldr r0, [sp] 14be4: eb00109f bl 18e68 <_Watchdog_Remove> 14be8: eaffffa1 b 14a74 <_Timer_server_Body+0x50> 00017ef4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 17ef4: e1a04000 mov r4, r0 17ef8: eb000228 bl 187a0 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 17efc: ebffffe0 bl 17e84 rtems_shutdown_executive(status); 17f00: e1a00004 mov r0, r4 17f04: eb00003b bl 17ff8 17f08: eafffffe b 17f08 <_exit+0x14> <== NOT EXECUTED 00033cf8 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 33cf8: e1a00001 mov r0, r1 <== NOT EXECUTED 33cfc: e1a01002 mov r1, r2 <== NOT EXECUTED 33d00: e1a02003 mov r2, r3 <== NOT EXECUTED 33d04: eaffff8b b 33b38 <== NOT EXECUTED 0000b8e4 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } b8e4: e3a00001 mov r0, #1 <== NOT EXECUTED b8e8: e12fff1e bx lr <== NOT EXECUTED 000091b8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 91b8: eaffffe8 b 9160 <== NOT EXECUTED 00022f2c <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 22f2c: e1a00001 mov r0, r1 <== NOT EXECUTED 22f30: e1a01002 mov r1, r2 <== NOT EXECUTED 22f34: eaffff68 b 22cdc <== NOT EXECUTED 00023128 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 23128: e1a00001 mov r0, r1 <== NOT EXECUTED 2312c: e1a01002 mov r1, r2 <== NOT EXECUTED 23130: eaffffc4 b 23048 <== NOT EXECUTED 00017fdc <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 17fdc: e1a00001 mov r0, r1 <== NOT EXECUTED 17fe0: e1a01002 mov r1, r2 <== NOT EXECUTED 17fe4: ea00000e b 18024 <== NOT EXECUTED 000531fc <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 531fc: 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 ); 53200: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 53204: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 53208: e1a05001 mov r5, r1 <== NOT EXECUTED 5320c: 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 ); 53210: ebfec50f bl 4654 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 53214: e2507000 subs r7, r0, #0 <== NOT EXECUTED 53218: 1a000019 bne 53284 <_rename_r+0x88> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5321c: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 53220: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 53224: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 53228: 0a000001 beq 53234 <_rename_r+0x38> <== NOT EXECUTED 5322c: e3530000 cmp r3, #0 <== NOT EXECUTED 53230: 1a000009 bne 5325c <_rename_r+0x60> <== NOT EXECUTED 53234: e59f33ac ldr r3, [pc, #940] ; 535e8 <_rename_r+0x3ec> <== NOT EXECUTED 53238: e593e000 ldr lr, [r3] <== NOT EXECUTED 5323c: e28ee018 add lr, lr, #24 <== NOT EXECUTED 53240: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 53244: e28dc018 add ip, sp, #24 <== NOT EXECUTED 53248: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5324c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 53250: e3a04000 mov r4, #0 <== NOT EXECUTED 53254: e58c3000 str r3, [ip] <== NOT EXECUTED 53258: ea000013 b 532ac <_rename_r+0xb0> <== NOT EXECUTED 5325c: e59f3384 ldr r3, [pc, #900] ; 535e8 <_rename_r+0x3ec> <== NOT EXECUTED 53260: e593e000 ldr lr, [r3] <== NOT EXECUTED 53264: e28ee004 add lr, lr, #4 <== NOT EXECUTED 53268: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5326c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 53270: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 53274: e59e3000 ldr r3, [lr] <== NOT EXECUTED 53278: e1a04007 mov r4, r7 <== NOT EXECUTED 5327c: e58c3000 str r3, [ip] <== NOT EXECUTED 53280: ea000009 b 532ac <_rename_r+0xb0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 53284: e3a0c000 mov ip, #0 <== NOT EXECUTED 53288: e1a00005 mov r0, r5 <== NOT EXECUTED 5328c: e1a01007 mov r1, r7 <== NOT EXECUTED 53290: e3a02002 mov r2, #2 <== NOT EXECUTED 53294: e28d3018 add r3, sp, #24 <== NOT EXECUTED 53298: e58dc000 str ip, [sp] <== NOT EXECUTED 5329c: ebfec534 bl 4774 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 532a0: e3500000 cmp r0, #0 <== NOT EXECUTED 532a4: 03a04001 moveq r4, #1 <== NOT EXECUTED 532a8: 1a000025 bne 53344 <_rename_r+0x148> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 532ac: e28de018 add lr, sp, #24 <== NOT EXECUTED 532b0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 532b4: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 532b8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 532bc: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 532c0: 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; 532c4: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 532c8: 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; 532cc: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 532d0: ebffb333 bl 3ffa4 <== NOT EXECUTED 532d4: e1a01000 mov r1, r0 <== NOT EXECUTED 532d8: e1a00005 mov r0, r5 <== NOT EXECUTED 532dc: ebfec4d0 bl 4624 <== NOT EXECUTED 532e0: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 532e4: 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 ) ); 532e8: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 532ec: ebffb32c bl 3ffa4 <== NOT EXECUTED 532f0: e3a0c000 mov ip, #0 <== NOT EXECUTED 532f4: e1a01000 mov r1, r0 <== NOT EXECUTED 532f8: e1a0200c mov r2, ip <== NOT EXECUTED 532fc: e1a00005 mov r0, r5 <== NOT EXECUTED 53300: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 53304: e58dc000 str ip, [sp] <== NOT EXECUTED 53308: ebfec4e1 bl 4694 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 5330c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 53310: 0a00000d beq 5334c <_rename_r+0x150> <== NOT EXECUTED if ( free_old_parentloc ) 53314: e3540000 cmp r4, #0 <== NOT EXECUTED 53318: 0a000007 beq 5333c <_rename_r+0x140> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5331c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 53320: e3530000 cmp r3, #0 <== NOT EXECUTED 53324: 0a000004 beq 5333c <_rename_r+0x140> <== NOT EXECUTED 53328: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5332c: e3530000 cmp r3, #0 <== NOT EXECUTED 53330: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 53334: 11a0e00f movne lr, pc <== NOT EXECUTED 53338: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 5333c: ebff988d bl 39578 <__errno> <== NOT EXECUTED 53340: e5805000 str r5, [r0] <== NOT EXECUTED 53344: e3e06000 mvn r6, #0 <== NOT EXECUTED 53348: ea0000a3 b 535dc <_rename_r+0x3e0> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 5334c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 53350: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 53354: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 53358: 13a05000 movne r5, #0 <== NOT EXECUTED 5335c: 03a05001 moveq r5, #1 <== NOT EXECUTED 53360: 0a000001 beq 5336c <_rename_r+0x170> <== NOT EXECUTED 53364: e3530000 cmp r3, #0 <== NOT EXECUTED 53368: 1a000009 bne 53394 <_rename_r+0x198> <== NOT EXECUTED 5336c: e59f3274 ldr r3, [pc, #628] ; 535e8 <_rename_r+0x3ec> <== NOT EXECUTED 53370: e593e000 ldr lr, [r3] <== NOT EXECUTED 53374: e28ee018 add lr, lr, #24 <== NOT EXECUTED 53378: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5337c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 53380: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 53384: e59e3000 ldr r3, [lr] <== NOT EXECUTED 53388: e3a00001 mov r0, #1 <== NOT EXECUTED 5338c: e58c3000 str r3, [ip] <== NOT EXECUTED 53390: ea000008 b 533b8 <_rename_r+0x1bc> <== NOT EXECUTED 53394: e59f324c ldr r3, [pc, #588] ; 535e8 <_rename_r+0x3ec> <== NOT EXECUTED 53398: e593e000 ldr lr, [r3] <== NOT EXECUTED 5339c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 533a0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 533a4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 533a8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 533ac: e59e3000 ldr r3, [lr] <== NOT EXECUTED 533b0: e58c3000 str r3, [ip] <== NOT EXECUTED 533b4: e1a00005 mov r0, r5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 533b8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 533bc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 533c0: e3530000 cmp r3, #0 <== NOT EXECUTED 533c4: 0a00004d beq 53500 <_rename_r+0x304> <== 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 ); 533c8: e28d5004 add r5, sp, #4 <== NOT EXECUTED 533cc: e0860000 add r0, r6, r0 <== NOT EXECUTED 533d0: e1a01005 mov r1, r5 <== NOT EXECUTED 533d4: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 533d8: e1a0e00f mov lr, pc <== NOT EXECUTED 533dc: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 533e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 533e4: 0a00001c beq 5345c <_rename_r+0x260> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 533e8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 533ec: e3530000 cmp r3, #0 <== NOT EXECUTED 533f0: 0a000004 beq 53408 <_rename_r+0x20c> <== NOT EXECUTED 533f4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 533f8: e3530000 cmp r3, #0 <== NOT EXECUTED 533fc: 11a00005 movne r0, r5 <== NOT EXECUTED 53400: 11a0e00f movne lr, pc <== NOT EXECUTED 53404: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 53408: e3540000 cmp r4, #0 <== NOT EXECUTED 5340c: 0a000007 beq 53430 <_rename_r+0x234> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 53410: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 53414: e3530000 cmp r3, #0 <== NOT EXECUTED 53418: 0a000004 beq 53430 <_rename_r+0x234> <== NOT EXECUTED 5341c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53420: e3530000 cmp r3, #0 <== NOT EXECUTED 53424: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 53428: 11a0e00f movne lr, pc <== NOT EXECUTED 5342c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 53430: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 53434: e3530000 cmp r3, #0 <== NOT EXECUTED 53438: 0a000004 beq 53450 <_rename_r+0x254> <== NOT EXECUTED 5343c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53440: e3530000 cmp r3, #0 <== NOT EXECUTED 53444: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 53448: 11a0e00f movne lr, pc <== NOT EXECUTED 5344c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 53450: ebff9848 bl 39578 <__errno> <== NOT EXECUTED 53454: e5806000 str r6, [r0] <== NOT EXECUTED 53458: eaffffb9 b 53344 <_rename_r+0x148> <== 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 ) { 5345c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 53460: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 53464: e1520003 cmp r2, r3 <== NOT EXECUTED 53468: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5346c: 0a00001b beq 534e0 <_rename_r+0x2e4> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 53470: e3530000 cmp r3, #0 <== NOT EXECUTED 53474: 0a000004 beq 5348c <_rename_r+0x290> <== NOT EXECUTED 53478: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5347c: e3530000 cmp r3, #0 <== NOT EXECUTED 53480: 11a00005 movne r0, r5 <== NOT EXECUTED 53484: 11a0e00f movne lr, pc <== NOT EXECUTED 53488: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 5348c: e3540000 cmp r4, #0 <== NOT EXECUTED 53490: 0a000007 beq 534b4 <_rename_r+0x2b8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 53494: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 53498: e3530000 cmp r3, #0 <== NOT EXECUTED 5349c: 0a000004 beq 534b4 <_rename_r+0x2b8> <== NOT EXECUTED 534a0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 534a4: e3530000 cmp r3, #0 <== NOT EXECUTED 534a8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 534ac: 11a0e00f movne lr, pc <== NOT EXECUTED 534b0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 534b4: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 534b8: e3530000 cmp r3, #0 <== NOT EXECUTED 534bc: 0a000004 beq 534d4 <_rename_r+0x2d8> <== NOT EXECUTED 534c0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 534c4: e3530000 cmp r3, #0 <== NOT EXECUTED 534c8: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 534cc: 11a0e00f movne lr, pc <== NOT EXECUTED 534d0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 534d4: ebff9827 bl 39578 <__errno> <== NOT EXECUTED 534d8: e3a03012 mov r3, #18 <== NOT EXECUTED 534dc: ea00001b b 53550 <_rename_r+0x354> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 534e0: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 534e4: e35c0000 cmp ip, #0 <== NOT EXECUTED 534e8: 1a00001a bne 53558 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 534ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 534f0: e3530000 cmp r3, #0 <== NOT EXECUTED 534f4: 11a00005 movne r0, r5 <== NOT EXECUTED 534f8: 11a0e00f movne lr, pc <== NOT EXECUTED 534fc: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 53500: e3540000 cmp r4, #0 <== NOT EXECUTED 53504: 0a000007 beq 53528 <_rename_r+0x32c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 53508: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 5350c: e3530000 cmp r3, #0 <== NOT EXECUTED 53510: 0a000004 beq 53528 <_rename_r+0x32c> <== NOT EXECUTED 53514: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53518: e3530000 cmp r3, #0 <== NOT EXECUTED 5351c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 53520: 11a0e00f movne lr, pc <== NOT EXECUTED 53524: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 53528: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 5352c: e3530000 cmp r3, #0 <== NOT EXECUTED 53530: 0a000004 beq 53548 <_rename_r+0x34c> <== NOT EXECUTED 53534: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53538: e3530000 cmp r3, #0 <== NOT EXECUTED 5353c: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 53540: 11a0e00f movne lr, pc <== NOT EXECUTED 53544: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 53548: ebff980a bl 39578 <__errno> <== NOT EXECUTED 5354c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 53550: e5803000 str r3, [r0] <== NOT EXECUTED 53554: eaffff7a b 53344 <_rename_r+0x148> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 53558: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 5355c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 53560: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 53564: e1a02005 mov r2, r5 <== NOT EXECUTED 53568: e1a0e00f mov lr, pc <== NOT EXECUTED 5356c: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 53570: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 53574: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 53578: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 5357c: 0a000004 beq 53594 <_rename_r+0x398> <== NOT EXECUTED 53580: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53584: e3530000 cmp r3, #0 <== NOT EXECUTED 53588: 11a00005 movne r0, r5 <== NOT EXECUTED 5358c: 11a0e00f movne lr, pc <== NOT EXECUTED 53590: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 53594: e3540000 cmp r4, #0 <== NOT EXECUTED 53598: 0a000007 beq 535bc <_rename_r+0x3c0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5359c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 535a0: e3530000 cmp r3, #0 <== NOT EXECUTED 535a4: 0a000004 beq 535bc <_rename_r+0x3c0> <== NOT EXECUTED 535a8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 535ac: e3530000 cmp r3, #0 <== NOT EXECUTED 535b0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 535b4: 11a0e00f movne lr, pc <== NOT EXECUTED 535b8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 535bc: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 535c0: e3530000 cmp r3, #0 <== NOT EXECUTED 535c4: 0a000004 beq 535dc <_rename_r+0x3e0> <== NOT EXECUTED 535c8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 535cc: e3530000 cmp r3, #0 <== NOT EXECUTED 535d0: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 535d4: 11a0e00f movne lr, pc <== NOT EXECUTED 535d8: 112fff13 bxne r3 <== NOT EXECUTED return result; } 535dc: e1a00006 mov r0, r6 <== NOT EXECUTED 535e0: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 535e4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00005c88 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 5c88: e1a00001 mov r0, r1 <== NOT EXECUTED 5c8c: e1a01002 mov r1, r2 <== NOT EXECUTED 5c90: eaffffc4 b 5ba8 <== NOT EXECUTED 0000c794 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); c794: e1a00001 mov r0, r1 <== NOT EXECUTED c798: eaffff5c b c510 <== NOT EXECUTED 00021a88 : #include int chdir( const char *pathname ) { 21a88: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 21a8c: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { 21a90: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 21a94: 1a000002 bne 21aa4 rtems_set_errno_and_return_minus_one( EFAULT ); 21a98: eb005eb6 bl 39578 <__errno> 21a9c: e3a0300e mov r3, #14 21aa0: ea000025 b 21b3c /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 21aa4: eb00793e bl 3ffa4 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 21aa8: e28d4004 add r4, sp, #4 21aac: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 21ab0: e1a01000 mov r1, r0 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 21ab4: e1a0200c mov r2, ip 21ab8: e1a00005 mov r0, r5 21abc: e1a03004 mov r3, r4 21ac0: e58dc000 str ip, [sp] 21ac4: ebff8b2a bl 4774 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 21ac8: e3500000 cmp r0, #0 21acc: 1a00001b bne 21b40 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 21ad0: e59d2010 ldr r2, [sp, #16] 21ad4: e5923010 ldr r3, [r2, #16] 21ad8: e3530000 cmp r3, #0 21adc: 1a000007 bne 21b00 rtems_filesystem_freenode( &loc ); 21ae0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21ae4: e3530000 cmp r3, #0 <== NOT EXECUTED 21ae8: 11a00004 movne r0, r4 <== NOT EXECUTED 21aec: 11a0e00f movne lr, pc <== NOT EXECUTED 21af0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21af4: eb005e9f bl 39578 <__errno> <== NOT EXECUTED 21af8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21afc: ea00000e b 21b3c <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 21b00: e1a00004 mov r0, r4 21b04: e1a0e00f mov lr, pc 21b08: e12fff13 bx r3 21b0c: e3500001 cmp r0, #1 21b10: 0a00000c beq 21b48 rtems_filesystem_freenode( &loc ); 21b14: e59d3010 ldr r3, [sp, #16] 21b18: e3530000 cmp r3, #0 21b1c: 0a000004 beq 21b34 21b20: e593301c ldr r3, [r3, #28] 21b24: e3530000 cmp r3, #0 21b28: 11a00004 movne r0, r4 21b2c: 11a0e00f movne lr, pc 21b30: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 21b34: eb005e8f bl 39578 <__errno> 21b38: e3a03014 mov r3, #20 21b3c: e5803000 str r3, [r0] 21b40: e3e00000 mvn r0, #0 21b44: ea000012 b 21b94 } rtems_filesystem_freenode( &rtems_filesystem_current ); 21b48: e59f304c ldr r3, [pc, #76] ; 21b9c 21b4c: e5930000 ldr r0, [r3] 21b50: e5903010 ldr r3, [r0, #16] 21b54: e3530000 cmp r3, #0 21b58: 0a000004 beq 21b70 21b5c: e593301c ldr r3, [r3, #28] 21b60: e3530000 cmp r3, #0 21b64: 12800004 addne r0, r0, #4 21b68: 11a0e00f movne lr, pc 21b6c: 112fff13 bxne r3 rtems_filesystem_current = loc; 21b70: e59f3024 ldr r3, [pc, #36] ; 21b9c 21b74: e28d4004 add r4, sp, #4 21b78: e593c000 ldr ip, [r3] 21b7c: e8b4000f ldm r4!, {r0, r1, r2, r3} 21b80: e28cc004 add ip, ip, #4 21b84: e8ac000f stmia ip!, {r0, r1, r2, r3} 21b88: e5943000 ldr r3, [r4] 21b8c: e58c3000 str r3, [ip] 21b90: e3a00000 mov r0, #0 return 0; } 21b94: e28dd018 add sp, sp, #24 21b98: e8bd8030 pop {r4, r5, pc} 0000448c : int chmod( const char *path, mode_t mode ) { 448c: e92d4070 push {r4, r5, r6, lr} 4490: e24dd018 sub sp, sp, #24 4494: e1a05001 mov r5, r1 4498: 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 ); 449c: eb00eec0 bl 3ffa4 44a0: e28d4004 add r4, sp, #4 44a4: e1a01000 mov r1, r0 44a8: e3a0c001 mov ip, #1 44ac: e1a00006 mov r0, r6 44b0: e3a02000 mov r2, #0 44b4: e1a03004 mov r3, r4 44b8: e58dc000 str ip, [sp] 44bc: eb0000ac bl 4774 if ( status != 0 ) 44c0: e3500000 cmp r0, #0 44c4: 1a00000d bne 4500 return -1; if ( !loc.handlers ){ 44c8: e59d300c ldr r3, [sp, #12] 44cc: e3530000 cmp r3, #0 44d0: 1a00000c bne 4508 rtems_filesystem_freenode( &loc ); 44d4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 44d8: e3530000 cmp r3, #0 <== NOT EXECUTED 44dc: 0a000004 beq 44f4 <== NOT EXECUTED 44e0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 44e4: e3530000 cmp r3, #0 <== NOT EXECUTED 44e8: 11a00004 movne r0, r4 <== NOT EXECUTED 44ec: 11a0e00f movne lr, pc <== NOT EXECUTED 44f0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 44f4: eb00d41f bl 39578 <__errno> <== NOT EXECUTED 44f8: e3a03009 mov r3, #9 <== NOT EXECUTED 44fc: e5803000 str r3, [r0] <== NOT EXECUTED 4500: e3e05000 mvn r5, #0 4504: ea00001a b 4574 } if ( !loc.handlers->fchmod_h ){ 4508: e593301c ldr r3, [r3, #28] 450c: e3530000 cmp r3, #0 4510: 1a00000a bne 4540 rtems_filesystem_freenode( &loc ); 4514: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4518: e3530000 cmp r3, #0 <== NOT EXECUTED 451c: 0a000004 beq 4534 <== NOT EXECUTED 4520: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4524: e3530000 cmp r3, #0 <== NOT EXECUTED 4528: 11a00004 movne r0, r4 <== NOT EXECUTED 452c: 11a0e00f movne lr, pc <== NOT EXECUTED 4530: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4534: eb00d40f bl 39578 <__errno> <== NOT EXECUTED 4538: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 453c: eaffffee b 44fc <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4540: e1a01005 mov r1, r5 4544: e1a00004 mov r0, r4 4548: e1a0e00f mov lr, pc 454c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 4550: e59d3010 ldr r3, [sp, #16] 4554: e3530000 cmp r3, #0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4558: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 455c: 0a000004 beq 4574 4560: e593301c ldr r3, [r3, #28] 4564: e3530000 cmp r3, #0 4568: 11a00004 movne r0, r4 456c: 11a0e00f movne lr, pc 4570: 112fff13 bxne r3 return result; } 4574: e1a00005 mov r0, r5 4578: e28dd018 add sp, sp, #24 457c: e8bd8070 pop {r4, r5, r6, pc} 00021ba0 : int chown( const char *path, uid_t owner, gid_t group ) { 21ba0: e92d40f0 push {r4, r5, r6, r7, lr} 21ba4: e1a01801 lsl r1, r1, #16 21ba8: e24dd018 sub sp, sp, #24 21bac: e1a02802 lsl r2, r2, #16 21bb0: e1a06821 lsr r6, r1, #16 21bb4: e1a05822 lsr r5, r2, #16 21bb8: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 21bbc: eb0078f8 bl 3ffa4 21bc0: e28d4004 add r4, sp, #4 21bc4: e1a01000 mov r1, r0 21bc8: e3a0c001 mov ip, #1 21bcc: e1a00007 mov r0, r7 21bd0: e3a02000 mov r2, #0 21bd4: e1a03004 mov r3, r4 21bd8: e58dc000 str ip, [sp] 21bdc: ebff8ae4 bl 4774 21be0: e3500000 cmp r0, #0 21be4: 1a00000b bne 21c18 return -1; if ( !loc.ops->chown_h ) { 21be8: e59d2010 ldr r2, [sp, #16] 21bec: e5923018 ldr r3, [r2, #24] 21bf0: e3530000 cmp r3, #0 21bf4: 1a000009 bne 21c20 rtems_filesystem_freenode( &loc ); 21bf8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21bfc: e3530000 cmp r3, #0 <== NOT EXECUTED 21c00: 11a00004 movne r0, r4 <== NOT EXECUTED 21c04: 11a0e00f movne lr, pc <== NOT EXECUTED 21c08: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21c0c: eb005e59 bl 39578 <__errno> <== NOT EXECUTED 21c10: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21c14: e5803000 str r3, [r0] <== NOT EXECUTED 21c18: e3e05000 mvn r5, #0 21c1c: ea00000d b 21c58 } result = (*loc.ops->chown_h)( &loc, owner, group ); 21c20: e1a02005 mov r2, r5 21c24: e1a01006 mov r1, r6 21c28: e1a00004 mov r0, r4 21c2c: e1a0e00f mov lr, pc 21c30: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 21c34: e59d3010 ldr r3, [sp, #16] 21c38: e3530000 cmp r3, #0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 21c3c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 21c40: 0a000004 beq 21c58 21c44: e593301c ldr r3, [r3, #28] 21c48: e3530000 cmp r3, #0 21c4c: 11a00004 movne r0, r4 21c50: 11a0e00f movne lr, pc 21c54: 112fff13 bxne r3 return result; } 21c58: e1a00005 mov r0, r5 21c5c: e28dd018 add sp, sp, #24 21c60: e8bd80f0 pop {r4, r5, r6, r7, pc} 00021c64 : #include int chroot( const char *pathname ) { 21c64: 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) { 21c68: e59f50d4 ldr r5, [pc, #212] ; 21d44 21c6c: e59f30d4 ldr r3, [pc, #212] ; 21d48 21c70: e5954000 ldr r4, [r5] 21c74: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 21c78: e24dd018 sub sp, sp, #24 21c7c: 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) { 21c80: 1a000007 bne 21ca4 rtems_libio_set_private_env(); /* try to set a new private env*/ 21c84: eb0005dc bl 233fc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 21c88: e5953000 ldr r3, [r5] 21c8c: e1530004 cmp r3, r4 21c90: 1a000003 bne 21ca4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21c94: eb005e37 bl 39578 <__errno> <== NOT EXECUTED 21c98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21c9c: e5803000 str r3, [r0] <== NOT EXECUTED 21ca0: ea000008 b 21cc8 <== NOT EXECUTED } result = chdir(pathname); 21ca4: e1a00006 mov r0, r6 21ca8: ebffff76 bl 21a88 if (result) { 21cac: e250c000 subs ip, r0, #0 21cb0: 0a000006 beq 21cd0 rtems_set_errno_and_return_minus_one( errno ); 21cb4: eb005e2f bl 39578 <__errno> <== NOT EXECUTED 21cb8: e1a04000 mov r4, r0 <== NOT EXECUTED 21cbc: eb005e2d bl 39578 <__errno> <== NOT EXECUTED 21cc0: e5903000 ldr r3, [r0] <== NOT EXECUTED 21cc4: e5843000 str r3, [r4] <== NOT EXECUTED 21cc8: e3e00000 mvn r0, #0 <== NOT EXECUTED 21ccc: ea00001a b 21d3c <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 21cd0: e1a0200c mov r2, ip 21cd4: e59f0070 ldr r0, [pc, #112] ; 21d4c 21cd8: e3a01001 mov r1, #1 21cdc: e28d3004 add r3, sp, #4 21ce0: e58dc000 str ip, [sp] 21ce4: ebff8aa2 bl 4774 21ce8: e3500000 cmp r0, #0 21cec: 1afffff0 bne 21cb4 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 21cf0: e59f304c ldr r3, [pc, #76] ; 21d44 21cf4: e5930000 ldr r0, [r3] 21cf8: e5903024 ldr r3, [r0, #36] ; 0x24 21cfc: e3530000 cmp r3, #0 21d00: 0a000004 beq 21d18 21d04: e593301c ldr r3, [r3, #28] 21d08: e3530000 cmp r3, #0 21d0c: 12800018 addne r0, r0, #24 21d10: 11a0e00f movne lr, pc 21d14: 112fff13 bxne r3 rtems_filesystem_root = loc; 21d18: e59f3024 ldr r3, [pc, #36] ; 21d44 21d1c: e28d4004 add r4, sp, #4 21d20: e593c000 ldr ip, [r3] 21d24: e8b4000f ldm r4!, {r0, r1, r2, r3} 21d28: e28cc018 add ip, ip, #24 21d2c: e8ac000f stmia ip!, {r0, r1, r2, r3} 21d30: e5943000 ldr r3, [r4] 21d34: e58c3000 str r3, [ip] 21d38: e3a00000 mov r0, #0 return 0; } 21d3c: e28dd018 add sp, sp, #24 21d40: e8bd8070 pop {r4, r5, r6, pc} 00008050 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8050: 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; 8054: e5935000 ldr r5, [r3] if (!device_name_table) 8058: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 805c: e1a04003 mov r4, r3 8060: e1a09000 mov r9, r0 8064: 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) 8068: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 806c: 159fa090 ldrne sl, [pc, #144] ; 8104 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) 8070: 1a000019 bne 80dc rtems_set_errno_and_return_minus_one( EFAULT ); 8074: eb0008eb bl a428 <__errno> <== NOT EXECUTED 8078: e3a0300e mov r3, #14 <== NOT EXECUTED 807c: e5803000 str r3, [r0] <== NOT EXECUTED 8080: e3e00000 mvn r0, #0 <== NOT EXECUTED 8084: 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) 8088: e5957000 ldr r7, [r5] 808c: e2571000 subs r1, r7, #0 8090: 0a00000f beq 80d4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8094: eb000c99 bl b300 8098: e3500000 cmp r0, #0 809c: 1a00000c bne 80d4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 80a0: e7d70008 ldrb r0, [r7, r8] 80a4: e3500000 cmp r0, #0 80a8: 1a000009 bne 80d4 /* 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; 80ac: e59f3054 ldr r3, [pc, #84] ; 8108 80b0: e5933000 ldr r3, [r3] 80b4: e5933028 ldr r3, [r3, #40] ; 0x28 80b8: 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; 80bc: e59f3048 ldr r3, [pc, #72] ; 810c 80c0: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 80c4: e59f3044 ldr r3, [pc, #68] ; 8110 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 80c8: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 80cc: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 80d0: 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++) { 80d4: e2866001 add r6, r6, #1 80d8: e2855014 add r5, r5, #20 80dc: e59a3000 ldr r3, [sl] 80e0: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 80e4: e1a00009 mov r0, r9 80e8: 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++) { 80ec: 3affffe5 bcc 8088 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 80f0: eb0008cc bl a428 <__errno> 80f4: e3a03002 mov r3, #2 80f8: e5803000 str r3, [r0] 80fc: e3e00000 mvn r0, #0 } 8100: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 00001234 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1234: 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( 1238: e59f7058 ldr r7, [pc, #88] ; 1298 123c: e5973000 ldr r3, [r7] 1240: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1244: 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( 1248: e0000396 mul r0, r6, r3 124c: eb001a53 bl 7ba0 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 1250: e2505000 subs r5, r0, #0 1254: 1a000004 bne 126c rtems_set_errno_and_return_minus_one( ENOMEM ); 1258: eb002472 bl a428 <__errno> <== NOT EXECUTED 125c: e3a0300c mov r3, #12 <== NOT EXECUTED 1260: e5803000 str r3, [r0] <== NOT EXECUTED 1264: e3e00000 mvn r0, #0 <== NOT EXECUTED 1268: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( 126c: e5972000 ldr r2, [r7] 1270: e3a01000 mov r1, #0 1274: e0020296 mul r2, r6, r2 1278: eb002698 bl ace0 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; 127c: e59f3018 ldr r3, [pc, #24] ; 129c temp_mt_entry->mt_fs_root.ops = &devFS_ops; 1280: e2832038 add r2, r3, #56 ; 0x38 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 1284: 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; 1288: 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; 128c: 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; 1290: e3a00000 mov r0, #0 return 0; } 1294: e8bd80f0 pop {r4, r5, r6, r7, pc} 000012a0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 12a0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 12a4: 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') && 12a8: e5d00000 ldrb r0, [r0] 12ac: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 12b0: e1a05001 mov r5, r1 12b4: e58d2000 str r2, [sp] 12b8: 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') && 12bc: 1a000008 bne 12e4 12c0: e5d43001 ldrb r3, [r4, #1] 12c4: e3530065 cmp r3, #101 ; 0x65 12c8: 1a000005 bne 12e4 (path[2] == 'v') && (path[3] == '\0')) 12cc: e5d43002 ldrb r3, [r4, #2] 12d0: e3530076 cmp r3, #118 ; 0x76 12d4: 1a000002 bne 12e4 12d8: e5d40003 ldrb r0, [r4, #3] 12dc: e3500000 cmp r0, #0 12e0: 0a000039 beq 13cc return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 12e4: e205aa0f and sl, r5, #61440 ; 0xf000 12e8: e35a0a02 cmp sl, #8192 ; 0x2000 12ec: 135a0a06 cmpne sl, #24576 ; 0x6000 12f0: 03a0a000 moveq sl, #0 12f4: 13a0a001 movne sl, #1 12f8: 0a000002 beq 1308 rtems_set_errno_and_return_minus_one( EINVAL ); 12fc: eb002449 bl a428 <__errno> <== NOT EXECUTED 1300: e3a03016 mov r3, #22 <== NOT EXECUTED 1304: ea000008 b 132c <== 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; 1308: e59d3028 ldr r3, [sp, #40] ; 0x28 130c: e5936000 ldr r6, [r3] if (!device_name_table) 1310: e3560000 cmp r6, #0 1314: 13e07000 mvnne r7, #0 1318: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 131c: 159fb0ac ldrne fp, [pc, #172] ; 13d0 1320: 1a000010 bne 1368 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 ); 1324: eb00243f bl a428 <__errno> <== NOT EXECUTED 1328: e3a0300e mov r3, #14 <== NOT EXECUTED 132c: e5803000 str r3, [r0] <== NOT EXECUTED 1330: e3e00000 mvn r0, #0 <== NOT EXECUTED 1334: ea000024 b 13cc <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 1338: e796300a ldr r3, [r6, sl] 133c: e2531000 subs r1, r3, #0 1340: 0a000005 beq 135c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 1344: eb00270d bl af80 <== NOT EXECUTED 1348: e3500000 cmp r0, #0 <== NOT EXECUTED 134c: 1a000003 bne 1360 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 1350: eb002434 bl a428 <__errno> <== NOT EXECUTED 1354: e3a03011 mov r3, #17 <== NOT EXECUTED 1358: eafffff3 b 132c <== NOT EXECUTED 135c: 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++){ 1360: e2888001 add r8, r8, #1 1364: e28aa014 add sl, sl, #20 1368: e59b3000 ldr r3, [fp] 136c: e1580003 cmp r8, r3 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 1370: 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++){ 1374: 3affffef bcc 1338 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 1378: e3770001 cmn r7, #1 137c: 1a000004 bne 1394 rtems_set_errno_and_return_minus_one( ENOMEM ); 1380: eb002428 bl a428 <__errno> <== NOT EXECUTED 1384: e3a0300c mov r3, #12 <== NOT EXECUTED 1388: e5803000 str r3, [r0] <== NOT EXECUTED 138c: e1a00007 mov r0, r7 <== NOT EXECUTED 1390: ea00000d b 13cc <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1394: e10f8000 mrs r8, CPSR 1398: e3883080 orr r3, r8, #128 ; 0x80 139c: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 13a0: e3a02014 mov r2, #20 13a4: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); 13a8: 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; 13ac: e7864003 str r4, [r6, r3] 13b0: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); 13b4: eb0027b9 bl b2a0 device_name_table[slot].major = major; 13b8: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 13bc: 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); 13c0: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13c4: e129f008 msr CPSR_fc, r8 13c8: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 13cc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 00001450 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1450: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED 1454: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 1458: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 145c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 1460: e3a02000 mov r2, #0 <== NOT EXECUTED 1464: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 1468: e58d0014 str r0, [sp, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 146c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 1470: e283c00c add ip, r3, #12 <== NOT EXECUTED 1474: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; 1478: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 147c: e2820008 add r0, r2, #8 <== NOT EXECUTED 1480: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 1484: e1a0200d mov r2, sp <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 1488: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 148c: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1490: eb000f5b bl 5204 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 1494: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1498: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 149c: 1b001b1c blne 8114 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 14a0: e28dd01c add sp, sp, #28 <== NOT EXECUTED 14a4: e8bd8800 pop {fp, pc} <== NOT EXECUTED 000014a8 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 14a8: e5903000 ldr r3, [r0] if (!the_dev) 14ac: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 14b0: 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) 14b4: 1a000004 bne 14cc rtems_set_errno_and_return_minus_one( EFAULT ); 14b8: eb0023da bl a428 <__errno> <== NOT EXECUTED 14bc: e3a0300e mov r3, #14 <== NOT EXECUTED 14c0: e5803000 str r3, [r0] <== NOT EXECUTED 14c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 14c8: 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; 14cc: 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 ); 14d0: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 14d4: e5933008 ldr r3, [r3, #8] 14d8: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 14dc: 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 ); 14e0: e5813018 str r3, [r1, #24] buf->st_mode = the_dev->mode; 14e4: e3a00000 mov r0, #0 return 0; } 14e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000ac64 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { ac64: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; ac68: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ac6c: e280c00c add ip, r0, #12 <== NOT EXECUTED ac70: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; ac74: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ac78: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ac7c: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; ac80: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; ac84: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; ac88: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; ac8c: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ac90: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ac94: e1a0200d mov r2, sp <== NOT EXECUTED ac98: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED ac9c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED aca0: eb0004e8 bl c048 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) aca4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; aca8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); acac: 1b000603 blne c4c0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } acb0: e28dd01c add sp, sp, #28 <== NOT EXECUTED acb4: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00003368 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3368: e59030b4 ldr r3, [r0, #180] ; 0xb4 336c: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 3370: e92d4030 push {r4, r5, lr} 3374: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3378: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 337c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3380: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3384: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 3388: 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) { 338c: ea00000a b 33bc <== NOT EXECUTED tty->rawOutBufState = rob_wait; 3390: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3394: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 3398: e3a01000 mov r1, #0 <== NOT EXECUTED 339c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 33a0: e1a02001 mov r2, r1 <== NOT EXECUTED 33a4: eb0005af bl 4a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 33a8: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 33ac: 1b000741 blne 50b8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 33b0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 33b4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 33b8: 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) { 33bc: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 33c0: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 33c4: e1510002 cmp r1, r2 <== NOT EXECUTED 33c8: 1afffff0 bne 3390 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 33cc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 33d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000253c : int dup2( int fildes, int fildes2 ) { 253c: e92d4070 push {r4, r5, r6, lr} 2540: e24dd048 sub sp, sp, #72 ; 0x48 2544: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2548: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 254c: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2550: eb00019b bl 2bc4 if ( status == -1 ) 2554: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2558: e1a0500d mov r5, sp if ( status == -1 ) 255c: 0a000009 beq 2588 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2560: e1a0100d mov r1, sp 2564: e1a00004 mov r0, r4 2568: eb000195 bl 2bc4 if ( status == -1 ) 256c: e3700001 cmn r0, #1 2570: 0a000004 beq 2588 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2574: e1a00006 mov r0, r6 <== NOT EXECUTED 2578: e1a02004 mov r2, r4 <== NOT EXECUTED 257c: e3a01000 mov r1, #0 <== NOT EXECUTED 2580: eb00008d bl 27bc <== NOT EXECUTED 2584: ea000000 b 258c <== NOT EXECUTED 2588: e3e00000 mvn r0, #0 } 258c: e28dd048 add sp, sp, #72 ; 0x48 2590: e8bd8070 pop {r4, r5, r6, pc} 00002e68 : * 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')) { 2e68: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2e6c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2e70: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2e74: e1a04001 mov r4, r1 <== NOT EXECUTED 2e78: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2e7c: 0a000015 beq 2ed8 <== NOT EXECUTED 2e80: e59f305c ldr r3, [pc, #92] ; 2ee4 <== NOT EXECUTED 2e84: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e88: e0833000 add r3, r3, r0 <== NOT EXECUTED 2e8c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2e90: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2e94: 13a03001 movne r3, #1 <== NOT EXECUTED 2e98: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2e9c: 0a00000d beq 2ed8 <== NOT EXECUTED 2ea0: e350000a cmp r0, #10 <== NOT EXECUTED 2ea4: 0a00000b beq 2ed8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2ea8: 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] = '^'; 2eac: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2eb0: e1a0000d mov r0, sp <== NOT EXECUTED 2eb4: e3a01002 mov r1, #2 <== NOT EXECUTED 2eb8: 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; 2ebc: 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] = '^'; 2ec0: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 2ec4: ebffff4d bl 2c00 <== NOT EXECUTED tty->column += 2; 2ec8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ecc: e2833002 add r3, r3, #2 <== NOT EXECUTED 2ed0: 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')) { 2ed4: ea000001 b 2ee0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2ed8: e1a01004 mov r1, r4 <== NOT EXECUTED 2edc: ebffff8b bl 2d10 <== NOT EXECUTED } } 2ee0: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 00022308 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 22308: e59f300c ldr r3, [pc, #12] ; 2231c <== NOT EXECUTED 2230c: e5930000 ldr r0, [r3] <== NOT EXECUTED 22310: e3500000 cmp r0, #0 <== NOT EXECUTED 22314: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 22318: ea005ce3 b 396ac <== NOT EXECUTED 00022320 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 22320: e59f300c ldr r3, [pc, #12] ; 22334 <== NOT EXECUTED 22324: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22328: e3500000 cmp r0, #0 <== NOT EXECUTED 2232c: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 22330: ea005cdd b 396ac <== NOT EXECUTED 00002ee8 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 2ee8: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 2eec: 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) { 2ef0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 2ef4: e1a04000 mov r4, r0 <== NOT EXECUTED 2ef8: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 2efc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 2f00: e3510000 cmp r1, #0 <== NOT EXECUTED 2f04: 0a000062 beq 3094 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 2f08: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 2f0c: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 2f10: 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)) { 2f14: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2f18: e2133010 ands r3, r3, #16 <== NOT EXECUTED 2f1c: 1a00005c bne 3094 <== NOT EXECUTED tty->ccount = 0; 2f20: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2f24: e1a01004 mov r1, r4 <== NOT EXECUTED 2f28: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 2f2c: ebffffcd bl 2e68 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2f30: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2f34: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 2f38: 11a01004 movne r1, r4 <== NOT EXECUTED 2f3c: 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) 2f40: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2f44: ea00000c b 2f7c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2f48: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2f4c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2f50: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2f54: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2f58: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2f5c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2f60: 0a000048 beq 3088 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2f64: e3570000 cmp r7, #0 <== NOT EXECUTED 2f68: 1a000005 bne 2f84 <== NOT EXECUTED 2f6c: e3130010 tst r3, #16 <== NOT EXECUTED 2f70: 1a000003 bne 2f84 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2f74: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2f78: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2f7c: 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); 2f80: eaffffb8 b 2e68 <== NOT EXECUTED } else if (c == '\t') { 2f84: e3550009 cmp r5, #9 <== NOT EXECUTED 2f88: 1a000020 bne 3010 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2f8c: 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; 2f90: 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)) { 2f94: e596c000 ldr ip, [r6] <== NOT EXECUTED 2f98: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2f9c: ea00000d b 2fd8 <== NOT EXECUTED c = tty->cbuf[i++]; 2fa0: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2fa4: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2fa8: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2fac: 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; 2fb0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 2fb4: 0a000005 beq 2fd0 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2fb8: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 2fbc: e3100020 tst r0, #32 <== NOT EXECUTED 2fc0: 0a000002 beq 2fd0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2fc4: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 2fc8: 12855002 addne r5, r5, #2 <== NOT EXECUTED 2fcc: ea000000 b 2fd4 <== NOT EXECUTED } else { col++; 2fd0: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 2fd4: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2fd8: e1520001 cmp r2, r1 <== NOT EXECUTED 2fdc: 1affffef bne 2fa0 <== NOT EXECUTED 2fe0: ea000006 b 3000 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2fe4: e59f00bc ldr r0, [pc, #188] ; 30a8 <== NOT EXECUTED 2fe8: e3a01001 mov r1, #1 <== NOT EXECUTED 2fec: e1a02004 mov r2, r4 <== NOT EXECUTED 2ff0: ebffff02 bl 2c00 <== NOT EXECUTED tty->column--; 2ff4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ff8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2ffc: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3000: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3004: e1530005 cmp r3, r5 <== NOT EXECUTED 3008: cafffff5 bgt 2fe4 <== NOT EXECUTED 300c: ea00001d b 3088 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3010: e5962000 ldr r2, [r6] <== NOT EXECUTED 3014: e2855001 add r5, r5, #1 <== NOT EXECUTED 3018: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 301c: e3120020 tst r2, #32 <== NOT EXECUTED 3020: 0a000009 beq 304c <== NOT EXECUTED 3024: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3028: 0a000007 beq 304c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 302c: e59f0078 ldr r0, [pc, #120] ; 30ac <== NOT EXECUTED 3030: e3a01003 mov r1, #3 <== NOT EXECUTED 3034: e1a02004 mov r2, r4 <== NOT EXECUTED 3038: ebfffef0 bl 2c00 <== NOT EXECUTED if (tty->column) 303c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3040: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3044: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3048: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 304c: e5963000 ldr r3, [r6] <== NOT EXECUTED 3050: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3054: e3130020 tst r3, #32 <== NOT EXECUTED 3058: 0a000002 beq 3068 <== NOT EXECUTED 305c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3060: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3064: 0a000007 beq 3088 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3068: e59f003c ldr r0, [pc, #60] ; 30ac <== NOT EXECUTED 306c: e3a01003 mov r1, #3 <== NOT EXECUTED 3070: e1a02004 mov r2, r4 <== NOT EXECUTED 3074: ebfffee1 bl 2c00 <== NOT EXECUTED if (tty->column) 3078: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 307c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3080: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3084: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 3088: e3570000 cmp r7, #0 <== NOT EXECUTED 308c: 1a000001 bne 3098 <== NOT EXECUTED 3090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3094: e59f6014 ldr r6, [pc, #20] ; 30b0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 3098: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 309c: e3510000 cmp r1, #0 <== NOT EXECUTED 30a0: 1affffa8 bne 2f48 <== NOT EXECUTED 30a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 000339c0 : #include int fchdir( int fd ) { 339c0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 339c4: e59f315c ldr r3, [pc, #348] ; 33b28 <== NOT EXECUTED 339c8: e5933000 ldr r3, [r3] <== NOT EXECUTED 339cc: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 339d0: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 339d4: 2a000005 bcs 339f0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 339d8: e59f314c ldr r3, [pc, #332] ; 33b2c <== NOT EXECUTED 339dc: e5934000 ldr r4, [r3] <== NOT EXECUTED 339e0: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 339e4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 339e8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 339ec: 1a000002 bne 339fc <== NOT EXECUTED 339f0: eb0016e0 bl 39578 <__errno> <== NOT EXECUTED 339f4: e3a03009 mov r3, #9 <== NOT EXECUTED 339f8: ea000016 b 33a58 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 339fc: e3130002 tst r3, #2 <== NOT EXECUTED 33a00: 1a000002 bne 33a10 <== NOT EXECUTED 33a04: eb0016db bl 39578 <__errno> <== NOT EXECUTED 33a08: e3a03016 mov r3, #22 <== NOT EXECUTED 33a0c: ea000011 b 33a58 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 33a10: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 33a14: e3530000 cmp r3, #0 <== NOT EXECUTED 33a18: 0a000002 beq 33a28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 33a1c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 33a20: e3530000 cmp r3, #0 <== NOT EXECUTED 33a24: 1a000002 bne 33a34 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 33a28: eb0016d2 bl 39578 <__errno> <== NOT EXECUTED 33a2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 33a30: ea000008 b 33a58 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 33a34: e2844018 add r4, r4, #24 <== NOT EXECUTED 33a38: e1a00004 mov r0, r4 <== NOT EXECUTED 33a3c: e1a0e00f mov lr, pc <== NOT EXECUTED 33a40: e12fff13 bx r3 <== NOT EXECUTED 33a44: e3500001 cmp r0, #1 <== NOT EXECUTED 33a48: e1a06000 mov r6, r0 <== NOT EXECUTED 33a4c: 0a000003 beq 33a60 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 33a50: eb0016c8 bl 39578 <__errno> <== NOT EXECUTED 33a54: e3a03014 mov r3, #20 <== NOT EXECUTED 33a58: e5803000 str r3, [r0] <== NOT EXECUTED 33a5c: ea00001c b 33ad4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 33a60: e59f50c8 ldr r5, [pc, #200] ; 33b30 <== NOT EXECUTED 33a64: e5957000 ldr r7, [r5] <== NOT EXECUTED 33a68: e287c004 add ip, r7, #4 <== NOT EXECUTED 33a6c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33a70: e28de004 add lr, sp, #4 <== NOT EXECUTED 33a74: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33a78: e59c3000 ldr r3, [ip] <== NOT EXECUTED 33a7c: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 33a80: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 33a84: e287e004 add lr, r7, #4 <== NOT EXECUTED 33a88: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33a8c: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 33a90: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 33a94: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 33a98: e1a01006 mov r1, r6 <== NOT EXECUTED 33a9c: e1a0200e mov r2, lr <== NOT EXECUTED 33aa0: e59f008c ldr r0, [pc, #140] ; 33b34 <== NOT EXECUTED 33aa4: e28d3018 add r3, sp, #24 <== NOT EXECUTED 33aa8: e58de000 str lr, [sp] <== NOT EXECUTED 33aac: ebff4330 bl 4774 <== NOT EXECUTED 33ab0: e3500000 cmp r0, #0 <== NOT EXECUTED 33ab4: 0a000008 beq 33adc <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 33ab8: e595c000 ldr ip, [r5] <== NOT EXECUTED 33abc: e28d4004 add r4, sp, #4 <== NOT EXECUTED 33ac0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 33ac4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 33ac8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33acc: e5943000 ldr r3, [r4] <== NOT EXECUTED 33ad0: e58c3000 str r3, [ip] <== NOT EXECUTED 33ad4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 33ad8: ea000010 b 33b20 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 33adc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 33ae0: e3530000 cmp r3, #0 <== NOT EXECUTED 33ae4: 0a000004 beq 33afc <== NOT EXECUTED 33ae8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 33aec: e3530000 cmp r3, #0 <== NOT EXECUTED 33af0: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 33af4: 11a0e00f movne lr, pc <== NOT EXECUTED 33af8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 33afc: e59f302c ldr r3, [pc, #44] ; 33b30 <== NOT EXECUTED 33b00: e28d4018 add r4, sp, #24 <== NOT EXECUTED 33b04: e593c000 ldr ip, [r3] <== NOT EXECUTED 33b08: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 33b0c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 33b10: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33b14: e5943000 ldr r3, [r4] <== NOT EXECUTED 33b18: e58c3000 str r3, [ip] <== NOT EXECUTED 33b1c: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 33b20: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 33b24: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00021f58 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f58: e59f307c ldr r3, [pc, #124] ; 21fdc <== NOT EXECUTED 21f5c: e5932000 ldr r2, [r3] <== NOT EXECUTED 21f60: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 21f64: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f68: 2a000005 bcs 21f84 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21f6c: e59f306c ldr r3, [pc, #108] ; 21fe0 <== NOT EXECUTED 21f70: e5933000 ldr r3, [r3] <== NOT EXECUTED 21f74: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21f78: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21f7c: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21f80: 1a000002 bne 21f90 <== NOT EXECUTED 21f84: eb005d7b bl 39578 <__errno> <== NOT EXECUTED 21f88: e3a03009 mov r3, #9 <== NOT EXECUTED 21f8c: ea00000a b 21fbc <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21f90: e3120004 tst r2, #4 <== NOT EXECUTED 21f94: 1a000002 bne 21fa4 <== NOT EXECUTED 21f98: eb005d76 bl 39578 <__errno> <== NOT EXECUTED 21f9c: e3a03016 mov r3, #22 <== NOT EXECUTED 21fa0: ea000005 b 21fbc <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 21fa4: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21fa8: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21fac: e3520000 cmp r2, #0 <== NOT EXECUTED 21fb0: 1a000004 bne 21fc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21fb4: eb005d6f bl 39578 <__errno> <== NOT EXECUTED 21fb8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21fbc: e5803000 str r3, [r0] <== NOT EXECUTED 21fc0: e3e00000 mvn r0, #0 <== NOT EXECUTED 21fc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 21fc8: e2830018 add r0, r3, #24 <== NOT EXECUTED 21fcc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21fd0: e1a0e00f mov lr, pc <== NOT EXECUTED 21fd4: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 21fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00021fe4 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21fe4: e59f3088 ldr r3, [pc, #136] ; 22074 <== NOT EXECUTED 21fe8: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21fec: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21ff0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21ff4: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21ff8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21ffc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22000: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 22004: 2a000005 bcs 22020 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 22008: e59f3068 ldr r3, [pc, #104] ; 22078 <== NOT EXECUTED 2200c: e5933000 ldr r3, [r3] <== NOT EXECUTED 22010: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 22014: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 22018: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2201c: 1a000002 bne 2202c <== NOT EXECUTED 22020: eb005d54 bl 39578 <__errno> <== NOT EXECUTED 22024: e3a03009 mov r3, #9 <== NOT EXECUTED 22028: ea00000a b 22058 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2202c: e3130004 tst r3, #4 <== NOT EXECUTED 22030: 1a000002 bne 22040 <== NOT EXECUTED 22034: eb005d4f bl 39578 <__errno> <== NOT EXECUTED 22038: e3a03016 mov r3, #22 <== NOT EXECUTED 2203c: ea000005 b 22058 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 22040: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 22044: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22048: e3530000 cmp r3, #0 <== NOT EXECUTED 2204c: 1a000004 bne 22064 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22050: eb005d48 bl 39578 <__errno> <== NOT EXECUTED 22054: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22058: e5803000 str r3, [r0] <== NOT EXECUTED 2205c: e3e00000 mvn r0, #0 <== NOT EXECUTED 22060: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 22064: e2800018 add r0, r0, #24 <== NOT EXECUTED 22068: e1a0e00f mov lr, pc <== NOT EXECUTED 2206c: e12fff13 bx r3 <== NOT EXECUTED } 22070: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00033b38 : int fcntl( int fd, int cmd, ... ) { 33b38: e92d000e push {r1, r2, r3} 33b3c: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33b40: e59f31a4 ldr r3, [pc, #420] ; 33cec 33b44: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 33b48: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33b4c: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 33b50: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 33b54: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33b58: 2a000005 bcs 33b74 iop = rtems_libio_iop( fd ); 33b5c: e59f118c ldr r1, [pc, #396] ; 33cf0 33b60: e591c000 ldr ip, [r1] 33b64: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 33b68: e5940014 ldr r0, [r4, #20] 33b6c: e3100c01 tst r0, #256 ; 0x100 33b70: 1a000002 bne 33b80 33b74: eb00167f bl 39578 <__errno> <== NOT EXECUTED 33b78: e3a03009 mov r3, #9 <== NOT EXECUTED 33b7c: ea000045 b 33c98 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 33b80: e3570009 cmp r7, #9 33b84: 979ff107 ldrls pc, [pc, r7, lsl #2] 33b88: ea000040 b 33c90 33b8c: 00033bb4 .word 0x00033bb4 <== NOT EXECUTED 33b90: 00033c20 .word 0x00033c20 <== NOT EXECUTED 33b94: 00033c2c .word 0x00033c2c <== NOT EXECUTED 33b98: 00033c4c .word 0x00033c4c <== NOT EXECUTED 33b9c: 00033c58 .word 0x00033c58 <== NOT EXECUTED 33ba0: 00033c84 .word 0x00033c84 <== NOT EXECUTED 33ba4: 00033c84 .word 0x00033c84 <== NOT EXECUTED 33ba8: 00033c84 .word 0x00033c84 <== NOT EXECUTED 33bac: 00033c84 .word 0x00033c84 <== NOT EXECUTED 33bb0: 00033c84 .word 0x00033c84 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 33bb4: e5922000 ldr r2, [r2] if ( fd2 ) 33bb8: e3520000 cmp r2, #0 33bbc: 0a000003 beq 33bd0 diop = rtems_libio_iop( fd2 ); 33bc0: e1520003 cmp r2, r3 <== NOT EXECUTED 33bc4: 23a0c000 movcs ip, #0 <== NOT EXECUTED 33bc8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 33bcc: ea000002 b 33bdc <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 33bd0: ebff4400 bl 4bd8 if ( diop == 0 ) { 33bd4: e250c000 subs ip, r0, #0 33bd8: 0a00003e beq 33cd8 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 33bdc: e2846018 add r6, r4, #24 33be0: e8b6000f ldm r6!, {r0, r1, r2, r3} 33be4: e28c5018 add r5, ip, #24 33be8: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 33bec: e59f30fc ldr r3, [pc, #252] ; 33cf0 33bf0: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 33bf4: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 33bf8: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 33bfc: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 33c00: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 33c04: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 33c08: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 33c0c: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 33c10: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 33c14: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 33c18: e1a05343 asr r5, r3, #6 33c1c: ea00001f b 33ca0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 33c20: e1a055a0 lsr r5, r0, #11 33c24: e2055001 and r5, r5, #1 33c28: ea00001e b 33ca8 * 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 ) ) 33c2c: e5925000 ldr r5, [r2] 33c30: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 33c34: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33c38: 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; 33c3c: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33c40: 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 ) ) 33c44: 0a000017 beq 33ca8 33c48: ea00000b b 33c7c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 33c4c: ebff4378 bl 4a34 33c50: e1a05000 mov r5, r0 33c54: ea000011 b 33ca0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 33c58: e5920000 ldr r0, [r2] 33c5c: ebff440a bl 4c8c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 33c60: e5943014 ldr r3, [r4, #20] 33c64: e59f2088 ldr r2, [pc, #136] ; 33cf4 33c68: e3c33c02 bic r3, r3, #512 ; 0x200 33c6c: e0002002 and r2, r0, r2 33c70: e3c33001 bic r3, r3, #1 33c74: e1823003 orr r3, r2, r3 33c78: e5843014 str r3, [r4, #20] 33c7c: e3a05000 mov r5, #0 33c80: ea000008 b 33ca8 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 33c84: eb00163b bl 39578 <__errno> 33c88: e3a03086 mov r3, #134 ; 0x86 33c8c: ea000001 b 33c98 ret = -1; break; default: errno = EINVAL; 33c90: eb001638 bl 39578 <__errno> 33c94: e3a03016 mov r3, #22 33c98: e5803000 str r3, [r0] 33c9c: ea00000d b 33cd8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 33ca0: e3550000 cmp r5, #0 33ca4: ba00000c blt 33cdc if (iop->handlers->fcntl_h) { 33ca8: e594303c ldr r3, [r4, #60] ; 0x3c 33cac: e5933030 ldr r3, [r3, #48] ; 0x30 33cb0: e3530000 cmp r3, #0 33cb4: 0a000008 beq 33cdc int err = (*iop->handlers->fcntl_h)( cmd, iop ); 33cb8: e1a01004 mov r1, r4 33cbc: e1a00007 mov r0, r7 33cc0: e1a0e00f mov lr, pc 33cc4: e12fff13 bx r3 if (err) { 33cc8: e2504000 subs r4, r0, #0 33ccc: 0a000002 beq 33cdc errno = err; 33cd0: eb001628 bl 39578 <__errno> <== NOT EXECUTED 33cd4: e5804000 str r4, [r0] <== NOT EXECUTED 33cd8: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 33cdc: e1a00005 mov r0, r5 33ce0: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 33ce4: e28dd00c add sp, sp, #12 33ce8: e12fff1e bx lr 0000b228 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b228: e59f3368 ldr r3, [pc, #872] ; b598 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b22c: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} b230: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b234: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b238: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, b23c: e1a02001 mov r2, r1 b240: e5930000 ldr r0, [r3] b244: ebffe607 bl 4a68 b248: e250a000 subs sl, r0, #0 b24c: 13e06003 mvnne r6, #3 b250: 1a0000ce bne b590 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; b254: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { b258: e3540000 cmp r4, #0 <== NOT EXECUTED b25c: 1a00004f bne b3a0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b260: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED b264: ebffda69 bl 1c10 <== NOT EXECUTED if (pipe == NULL) b268: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b26c: e1a05000 mov r5, r0 <== NOT EXECUTED b270: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) b274: 03e0600b mvneq r6, #11 <== NOT EXECUTED b278: 0a000056 beq b3d8 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); b27c: e1a0100a mov r1, sl <== NOT EXECUTED b280: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED b284: eb000900 bl d68c <== NOT EXECUTED pipe->Size = PIPE_BUF; b288: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); b28c: 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; b290: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); b294: ebffda5d bl 1c10 <== NOT EXECUTED if (! pipe->Buffer) b298: 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); b29c: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) b2a0: 03e0600b mvneq r6, #11 <== NOT EXECUTED b2a4: 0a00003a beq b394 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( b2a8: e59f62ec ldr r6, [pc, #748] ; b59c <== NOT EXECUTED b2ac: e59f02ec ldr r0, [pc, #748] ; b5a0 <== NOT EXECUTED b2b0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b2b4: e1a0100a mov r1, sl <== NOT EXECUTED b2b8: e1830000 orr r0, r3, r0 <== NOT EXECUTED b2bc: e1a0200a mov r2, sl <== NOT EXECUTED b2c0: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED b2c4: eb00025c bl bc3c <== NOT EXECUTED b2c8: e2501000 subs r1, r0, #0 <== NOT EXECUTED b2cc: 1a00002d bne b388 <== 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( b2d0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b2d4: e59f02c8 ldr r0, [pc, #712] ; b5a4 <== NOT EXECUTED b2d8: e1a02001 mov r2, r1 <== NOT EXECUTED b2dc: e1830000 orr r0, r3, r0 <== NOT EXECUTED b2e0: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED b2e4: eb000254 bl bc3c <== NOT EXECUTED b2e8: e2503000 subs r3, r0, #0 <== NOT EXECUTED b2ec: 1a000023 bne b380 <== 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( b2f0: e5d62000 ldrb r2, [r6] <== NOT EXECUTED b2f4: e59f02ac ldr r0, [pc, #684] ; b5a8 <== NOT EXECUTED b2f8: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED b2fc: e1820000 orr r0, r2, r0 <== NOT EXECUTED b300: e3a01001 mov r1, #1 <== NOT EXECUTED b304: e3a02010 mov r2, #16 <== NOT EXECUTED b308: e58dc000 str ip, [sp] <== NOT EXECUTED b30c: ebffe543 bl 4820 <== NOT EXECUTED b310: e3500000 cmp r0, #0 <== NOT EXECUTED b314: 1a000017 bne b378 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) b318: e28d5004 add r5, sp, #4 <== NOT EXECUTED b31c: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED b320: e1a02005 mov r2, r5 <== NOT EXECUTED b324: e59f0280 ldr r0, [pc, #640] ; b5ac <== NOT EXECUTED b328: ebffeb60 bl 60b0 <_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 b32c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED b330: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED b334: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); b338: ebffed9a bl 69a8 <_Thread_Enable_dispatch> <== NOT EXECUTED b33c: e1a02005 mov r2, r5 <== NOT EXECUTED b340: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED b344: e59f0260 ldr r0, [pc, #608] ; b5ac <== NOT EXECUTED b348: ebffeb58 bl 60b0 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state b34c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED b350: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED b354: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); b358: ebffed92 bl 69a8 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b35c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b360: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED b364: e2833001 add r3, r3, #1 <== NOT EXECUTED b368: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; b36c: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED b370: 05c63000 strbeq r3, [r6] <== NOT EXECUTED b374: ea000009 b b3a0 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b378: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b37c: eb00025c bl bcf4 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); b380: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b384: eb00025a bl bcf4 <== NOT EXECUTED err_rbar: free(pipe->Buffer); b388: e5950000 ldr r0, [r5] <== NOT EXECUTED b38c: ebffd96d bl 1948 <== NOT EXECUTED b390: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); b394: e1a00005 mov r0, r5 <== NOT EXECUTED b398: ebffd96a bl 1948 <== NOT EXECUTED b39c: ea00000d b b3d8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b3a0: e3a01000 mov r1, #0 <== NOT EXECUTED b3a4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b3a8: e1a02001 mov r2, r1 <== NOT EXECUTED b3ac: ebffe5ad bl 4a68 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { b3b0: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b3b4: e3500000 cmp r0, #0 <== NOT EXECUTED b3b8: 01a06000 moveq r6, r0 <== NOT EXECUTED b3bc: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { b3c0: e3530000 cmp r3, #0 <== NOT EXECUTED b3c4: 1a000003 bne b3d8 <== NOT EXECUTED if (err) b3c8: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; b3cc: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); b3d0: 11a00004 movne r0, r4 <== NOT EXECUTED b3d4: 1bffff47 blne b0f8 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); b3d8: e59f31b8 ldr r3, [pc, #440] ; b598 <== NOT EXECUTED b3dc: e5930000 ldr r0, [r3] <== NOT EXECUTED b3e0: ebffe5e6 bl 4b80 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) b3e4: e3560000 cmp r6, #0 <== NOT EXECUTED b3e8: 1a000068 bne b590 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { b3ec: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED b3f0: e2023006 and r3, r2, #6 <== NOT EXECUTED b3f4: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; b3f8: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { b3fc: 0a000024 beq b494 <== NOT EXECUTED b400: e3530006 cmp r3, #6 <== NOT EXECUTED b404: 0a000046 beq b524 <== NOT EXECUTED b408: e3530002 cmp r3, #2 <== NOT EXECUTED b40c: 1a000058 bne b574 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b410: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b414: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b418: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b41c: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b420: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; b424: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b428: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); b42c: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b430: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b434: 0b000246 bleq bd54 <== NOT EXECUTED if (pipe->Writers == 0) { b438: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED b43c: e3530000 cmp r3, #0 <== NOT EXECUTED b440: 1a00004b bne b574 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) b444: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED b448: e3130001 tst r3, #1 <== NOT EXECUTED b44c: 1a000048 bne b574 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; b450: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b454: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b458: ebffe5c8 bl 4b80 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) b45c: e3a01000 mov r1, #0 <== NOT EXECUTED b460: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b464: eb000250 bl bdac <== NOT EXECUTED b468: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b46c: 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)) b470: 1a000042 bne b580 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b474: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b478: ebffe57a bl 4a68 <== NOT EXECUTED b47c: e3500000 cmp r0, #0 <== NOT EXECUTED b480: 1a00003e bne b580 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); b484: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED b488: e1550003 cmp r5, r3 <== NOT EXECUTED b48c: 0afffff0 beq b454 <== NOT EXECUTED b490: ea000037 b b574 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b494: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b498: e3530000 cmp r3, #0 <== NOT EXECUTED b49c: 1a000002 bne b4ac <== NOT EXECUTED b4a0: e3120001 tst r2, #1 <== NOT EXECUTED b4a4: 13e06005 mvnne r6, #5 <== NOT EXECUTED b4a8: 1a000035 bne b584 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) b4ac: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b4b0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b4b4: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b4b8: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b4bc: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b4c0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b4c4: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b4c8: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b4cc: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b4d0: 0b00021f bleq bd54 <== NOT EXECUTED if (pipe->Readers == 0) { b4d4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b4d8: e3530000 cmp r3, #0 <== NOT EXECUTED b4dc: 1a000024 bne b574 <== NOT EXECUTED prevCounter = pipe->readerCounter; b4e0: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); b4e4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b4e8: ebffe5a4 bl 4b80 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b4ec: e3a01000 mov r1, #0 <== NOT EXECUTED b4f0: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b4f4: eb00022c bl bdac <== NOT EXECUTED b4f8: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b4fc: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b500: 1a00001e bne b580 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b504: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b508: ebffe556 bl 4a68 <== NOT EXECUTED b50c: e3500000 cmp r0, #0 <== NOT EXECUTED b510: 1a00001a bne b580 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); b514: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED b518: e1550003 cmp r5, r3 <== NOT EXECUTED b51c: 0afffff0 beq b4e4 <== NOT EXECUTED b520: ea000013 b b574 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b524: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b528: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b52c: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b530: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b534: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b538: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b53c: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); b540: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b544: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b548: 0b000201 bleq bd54 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) b54c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b550: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b554: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b558: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b55c: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b560: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b564: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b568: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b56c: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b570: 0b0001f7 bleq bd54 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); b574: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b578: ebffe580 bl 4b80 <== NOT EXECUTED return 0; b57c: ea000003 b b590 <== NOT EXECUTED b580: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); b584: e1a00007 mov r0, r7 <== NOT EXECUTED b588: e1a01008 mov r1, r8 <== NOT EXECUTED b58c: ebfffee6 bl b12c <== NOT EXECUTED return err; } b590: e1a00006 mov r0, r6 b594: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} 00023c0c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 23c0c: e59f3030 ldr r3, [pc, #48] ; 23c44 <== NOT EXECUTED 23c10: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 23c14: ea000006 b 23c34 <== 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 ) { 23c18: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 23c1c: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 23c20: e15c0000 cmp ip, r0 <== NOT EXECUTED 23c24: 1a000001 bne 23c30 <== NOT EXECUTED 23c28: e3a00001 mov r0, #1 <== NOT EXECUTED 23c2c: 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 ) { 23c30: e5922000 ldr r2, [r2] <== NOT EXECUTED 23c34: e1520003 cmp r2, r3 <== NOT EXECUTED 23c38: 1afffff6 bne 23c18 <== NOT EXECUTED 23c3c: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 23c40: e12fff1e bx lr <== NOT EXECUTED 00002a10 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2a10: e59f3100 ldr r3, [pc, #256] ; 2b18 2a14: e5933000 ldr r3, [r3] 2a18: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2a1c: 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); 2a20: 2a000005 bcs 2a3c iop = rtems_libio_iop(fd); 2a24: e59f30f0 ldr r3, [pc, #240] ; 2b1c 2a28: e5933000 ldr r3, [r3] 2a2c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2a30: e5903014 ldr r3, [r0, #20] 2a34: e3130c01 tst r3, #256 ; 0x100 2a38: 1a000002 bne 2a48 2a3c: eb00325b bl f3b0 <__errno> 2a40: e3a03009 mov r3, #9 2a44: ea000003 b 2a58 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2a48: e3130002 tst r3, #2 2a4c: 1a000004 bne 2a64 2a50: eb003256 bl f3b0 <__errno> <== NOT EXECUTED 2a54: e3a03016 mov r3, #22 <== NOT EXECUTED 2a58: e5803000 str r3, [r0] 2a5c: e3e00000 mvn r0, #0 2a60: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2a64: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2a68: e351000b cmp r1, #11 2a6c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2a70: ea000023 b 2b04 2a74: 00002aa4 .word 0x00002aa4 <== NOT EXECUTED 2a78: 00002aac .word 0x00002aac <== NOT EXECUTED 2a7c: 00002ab4 .word 0x00002ab4 <== NOT EXECUTED 2a80: 00002abc .word 0x00002abc <== NOT EXECUTED 2a84: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2a88: 00002acc .word 0x00002acc <== NOT EXECUTED 2a8c: 00002ad4 .word 0x00002ad4 <== NOT EXECUTED 2a90: 00002adc .word 0x00002adc <== NOT EXECUTED 2a94: 00002ae4 .word 0x00002ae4 <== NOT EXECUTED 2a98: 00002aec .word 0x00002aec <== NOT EXECUTED 2a9c: 00002af4 .word 0x00002af4 <== NOT EXECUTED 2aa0: 00002afc .word 0x00002afc <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 2aa4: e5930038 ldr r0, [r3, #56] ; 0x38 break; 2aa8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2aac: e593003c ldr r0, [r3, #60] ; 0x3c break; 2ab0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2ab4: e5930040 ldr r0, [r3, #64] ; 0x40 break; 2ab8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 2abc: e5930044 ldr r0, [r3, #68] ; 0x44 break; 2ac0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 2ac4: e5930048 ldr r0, [r3, #72] ; 0x48 break; 2ac8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2acc: e593004c ldr r0, [r3, #76] ; 0x4c break; 2ad0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2ad4: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2ad8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2adc: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2ae0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2ae4: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2ae8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2aec: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2af0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2af4: e593005c ldr r0, [r3, #92] ; 0x5c break; 2af8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2afc: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2b00: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2b04: eb003229 bl f3b0 <__errno> 2b08: e3a03016 mov r3, #22 2b0c: e5803000 str r3, [r0] 2b10: e3e00000 mvn r0, #0 break; } return return_value; } 2b14: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001948 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1948: e59f3088 ldr r3, [pc, #136] ; 19d8 194c: e593200c ldr r2, [r3, #12] 1950: e92d4030 push {r4, r5, lr} 1954: e2822001 add r2, r2, #1 if ( !ptr ) 1958: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 195c: e583200c str r2, [r3, #12] if ( !ptr ) 1960: 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()) && 1964: e59f3070 ldr r3, [pc, #112] ; 19dc 1968: e5933000 ldr r3, [r3] 196c: e3530003 cmp r3, #3 1970: 1a000005 bne 198c 1974: eb00004b bl 1aa8 1978: e3500000 cmp r0, #0 197c: 1a000002 bne 198c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1980: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1984: 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); 1988: ea000059 b 1af4 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 198c: e59f304c ldr r3, [pc, #76] ; 19e0 1990: e5933000 ldr r3, [r3] 1994: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1998: 11a00004 movne r0, r4 199c: 11a0e00f movne lr, pc 19a0: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 19a4: e59f5038 ldr r5, [pc, #56] ; 19e4 19a8: e1a01004 mov r1, r4 19ac: e5950000 ldr r0, [r5] 19b0: eb001277 bl 6394 <_Protected_heap_Free> 19b4: e3500000 cmp r0, #0 19b8: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 19bc: 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", 19c0: e59f0020 ldr r0, [pc, #32] ; 19e8 <== NOT EXECUTED 19c4: e2822018 add r2, r2, #24 <== NOT EXECUTED 19c8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 19cc: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 19d0: 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", 19d4: ea000320 b 265c <== NOT EXECUTED 000232f4 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 232f4: e59f3058 ldr r3, [pc, #88] ; 23354 <== NOT EXECUTED 232f8: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 232fc: e92d4010 push {r4, lr} <== NOT EXECUTED 23300: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23304: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 23308: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 2330c: e3530000 cmp r3, #0 <== NOT EXECUTED 23310: 0a000004 beq 23328 <== NOT EXECUTED 23314: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23318: e3530000 cmp r3, #0 <== NOT EXECUTED 2331c: 12800004 addne r0, r0, #4 <== NOT EXECUTED 23320: 11a0e00f movne lr, pc <== NOT EXECUTED 23324: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 23328: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 2332c: e3530000 cmp r3, #0 <== NOT EXECUTED 23330: 0a000004 beq 23348 <== NOT EXECUTED 23334: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23338: e3530000 cmp r3, #0 <== NOT EXECUTED 2333c: 12840018 addne r0, r4, #24 <== NOT EXECUTED 23340: 11a0e00f movne lr, pc <== NOT EXECUTED 23344: 112fff13 bxne r3 <== NOT EXECUTED free(env); 23348: e1a00004 mov r0, r4 <== NOT EXECUTED } } 2334c: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 23350: eaff853a b 4840 <== NOT EXECUTED 00017cb0 : int fstat( int fd, struct stat *sbuf ) { 17cb0: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 17cb4: e2515000 subs r5, r1, #0 17cb8: 1a000002 bne 17cc8 rtems_set_errno_and_return_minus_one( EFAULT ); 17cbc: ebffd428 bl cd64 <__errno> 17cc0: e3a0300e mov r3, #14 17cc4: ea000014 b 17d1c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 17cc8: e59f3080 ldr r3, [pc, #128] ; 17d50 17ccc: e5933000 ldr r3, [r3] 17cd0: e1500003 cmp r0, r3 17cd4: 2a000008 bcs 17cfc 17cd8: e59f3074 ldr r3, [pc, #116] ; 17d54 17cdc: e5934000 ldr r4, [r3] 17ce0: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 17ce4: e5943014 ldr r3, [r4, #20] 17ce8: e3130c01 tst r3, #256 ; 0x100 17cec: 0a000002 beq 17cfc if ( !iop->handlers ) 17cf0: e594303c ldr r3, [r4, #60] ; 0x3c 17cf4: e3530000 cmp r3, #0 17cf8: 1a000002 bne 17d08 rtems_set_errno_and_return_minus_one( EBADF ); 17cfc: ebffd418 bl cd64 <__errno> 17d00: e3a03009 mov r3, #9 17d04: ea000004 b 17d1c if ( !iop->handlers->fstat_h ) 17d08: e5933018 ldr r3, [r3, #24] 17d0c: e3530000 cmp r3, #0 17d10: 1a000004 bne 17d28 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17d14: ebffd412 bl cd64 <__errno> <== NOT EXECUTED 17d18: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17d1c: e5803000 str r3, [r0] 17d20: e3e00000 mvn r0, #0 17d24: 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) ); 17d28: e3a01000 mov r1, #0 17d2c: e3a02048 mov r2, #72 ; 0x48 17d30: e1a00005 mov r0, r5 17d34: ebffd654 bl d68c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 17d38: e2840018 add r0, r4, #24 17d3c: e1a01005 mov r1, r5 17d40: e594303c ldr r3, [r4, #60] ; 0x3c 17d44: e1a0e00f mov lr, pc 17d48: e593f018 ldr pc, [r3, #24] } 17d4c: e8bd8030 pop {r4, r5, pc} 00022130 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 22130: e59f307c ldr r3, [pc, #124] ; 221b4 22134: e5933000 ldr r3, [r3] 22138: e1500003 cmp r0, r3 #include int fsync( int fd ) { 2213c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 22140: 2a00000d bcs 2217c iop = rtems_libio_iop( fd ); 22144: e59f306c ldr r3, [pc, #108] ; 221b8 22148: e5933000 ldr r3, [r3] 2214c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 22150: e5903014 ldr r3, [r0, #20] 22154: e3130c01 tst r3, #256 ; 0x100 22158: 0a000007 beq 2217c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2215c: e3130004 tst r3, #4 22160: 1a000002 bne 22170 22164: eb005d03 bl 39578 <__errno> 22168: e3a03016 mov r3, #22 2216c: ea00000a b 2219c /* * Now process the fsync(). */ if ( !iop->handlers ) 22170: e590303c ldr r3, [r0, #60] ; 0x3c 22174: e3530000 cmp r3, #0 22178: 1a000002 bne 22188 rtems_set_errno_and_return_minus_one( EBADF ); 2217c: eb005cfd bl 39578 <__errno> <== NOT EXECUTED 22180: e3a03009 mov r3, #9 <== NOT EXECUTED 22184: ea000004 b 2219c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 22188: e5933028 ldr r3, [r3, #40] ; 0x28 2218c: e3530000 cmp r3, #0 22190: 1a000004 bne 221a8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 22194: eb005cf7 bl 39578 <__errno> 22198: e3a03086 mov r3, #134 ; 0x86 2219c: e5803000 str r3, [r0] 221a0: e3e00000 mvn r0, #0 221a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 221a8: e1a0e00f mov lr, pc 221ac: e12fff13 bx r3 } 221b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00009050 : int ftruncate( int fd, off_t length ) { 9050: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 9054: e59f30d4 ldr r3, [pc, #212] ; 9130 9058: e5933000 ldr r3, [r3] 905c: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 9060: e24dd014 sub sp, sp, #20 9064: e1a05001 mov r5, r1 9068: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 906c: 2a000005 bcs 9088 iop = rtems_libio_iop( fd ); 9070: e59f30bc ldr r3, [pc, #188] ; 9134 9074: e5934000 ldr r4, [r3] 9078: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 907c: e5943014 ldr r3, [r4, #20] 9080: e3130c01 tst r3, #256 ; 0x100 9084: 1a000002 bne 9094 9088: eb000f35 bl cd64 <__errno> <== NOT EXECUTED 908c: e3a03009 mov r3, #9 <== NOT EXECUTED 9090: ea00001c b 9108 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 9094: e284e018 add lr, r4, #24 9098: e8be000f ldm lr!, {r0, r1, r2, r3} 909c: e1a0c00d mov ip, sp 90a0: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 90a4: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90a8: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 90ac: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 90b0: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 90b4: 0a000011 beq 9100 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 90b8: e1a0000d mov r0, sp 90bc: e1a0e00f mov lr, pc 90c0: e12fff13 bx r3 90c4: e3500001 cmp r0, #1 90c8: 1a000002 bne 90d8 rtems_set_errno_and_return_minus_one( EISDIR ); 90cc: eb000f24 bl cd64 <__errno> 90d0: e3a03015 mov r3, #21 90d4: ea00000b b 9108 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 90d8: e5943014 ldr r3, [r4, #20] 90dc: e3130004 tst r3, #4 90e0: 1a000002 bne 90f0 90e4: eb000f1e bl cd64 <__errno> <== NOT EXECUTED 90e8: e3a03016 mov r3, #22 <== NOT EXECUTED 90ec: ea000005 b 9108 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 90f0: e594303c ldr r3, [r4, #60] ; 0x3c 90f4: e5933020 ldr r3, [r3, #32] 90f8: e3530000 cmp r3, #0 90fc: 1a000004 bne 9114 rtems_set_errno_and_return_minus_one( ENOTSUP ); 9100: eb000f17 bl cd64 <__errno> <== NOT EXECUTED 9104: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9108: e5803000 str r3, [r0] 910c: e3e00000 mvn r0, #0 9110: ea000004 b 9128 return (*iop->handlers->ftruncate_h)( iop, length ); 9114: e1a00004 mov r0, r4 9118: e1a01005 mov r1, r5 911c: e1a02006 mov r2, r6 9120: e1a0e00f mov lr, pc 9124: e12fff13 bx r3 } 9128: e28dd014 add sp, sp, #20 912c: e8bd8070 pop {r4, r5, r6, pc} 00053128 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 53128: e59f30a8 ldr r3, [pc, #168] ; 531d8 5312c: e5933000 ldr r3, [r3] 53130: e1500003 cmp r0, r3 53134: 359f30a0 ldrcc r3, [pc, #160] ; 531dc int getdents( int dd_fd, char *dd_buf, int dd_len ) { 53138: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5313c: 35934000 ldrcc r4, [r3] 53140: 23a04000 movcs r4, #0 53144: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 53148: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5314c: e24dd014 sub sp, sp, #20 53150: e1a06001 mov r6, r1 53154: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 53158: e8be000f ldm lr!, {r0, r1, r2, r3} 5315c: e1a0c00d mov ip, sp 53160: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 53164: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 53168: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 5316c: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 53170: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 53174: 0a00000d beq 531b0 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 53178: e1a0000d mov r0, sp 5317c: e1a0e00f mov lr, pc 53180: e12fff13 bx r3 53184: e3500001 cmp r0, #1 53188: 0a000004 beq 531a0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5318c: ebff98f9 bl 39578 <__errno> 53190: e3a03014 mov r3, #20 53194: e5803000 str r3, [r0] 53198: e3e00000 mvn r0, #0 5319c: ea00000b b 531d0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 531a0: e594303c ldr r3, [r4, #60] ; 0x3c 531a4: e5933008 ldr r3, [r3, #8] 531a8: e3530000 cmp r3, #0 531ac: 1a000002 bne 531bc rtems_set_errno_and_return_minus_one( ENOTSUP ); 531b0: ebff98f0 bl 39578 <__errno> <== NOT EXECUTED 531b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 531b8: eafffff5 b 53194 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 531bc: e1a00004 mov r0, r4 531c0: e1a01006 mov r1, r6 531c4: e1a02005 mov r2, r5 531c8: e1a0e00f mov lr, pc 531cc: e12fff13 bx r3 } 531d0: e28dd014 add sp, sp, #20 531d4: e8bd8070 pop {r4, r5, r6, pc} 000222cc : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 222cc: e59f3008 ldr r3, [pc, #8] ; 222dc <== NOT EXECUTED 222d0: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 222d4: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 222d8: e12fff1e bx lr <== NOT EXECUTED 000228e4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 228e4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 228e8: e59da01c ldr sl, [sp, #28] 228ec: e1a06000 mov r6, r0 228f0: e1a07001 mov r7, r1 228f4: e1a04002 mov r4, r2 228f8: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 228fc: ebffffb7 bl 227e0 if ((fp = fopen("/etc/group", "r")) == NULL) { 22900: e59f00a4 ldr r0, [pc, #164] ; 229ac 22904: e59f10a4 ldr r1, [pc, #164] ; 229b0 22908: eb005d8a bl 39f38 2290c: e2505000 subs r5, r0, #0 22910: 1a000003 bne 22924 errno = EINVAL; 22914: eb005b17 bl 39578 <__errno> <== NOT EXECUTED 22918: e3a03016 mov r3, #22 <== NOT EXECUTED 2291c: e5803000 str r3, [r0] <== NOT EXECUTED 22920: ea00000c b 22958 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 22924: e1a01004 mov r1, r4 22928: e1a02008 mov r2, r8 2292c: e1a0300a mov r3, sl 22930: e1a00005 mov r0, r5 22934: ebfffef2 bl 22504 22938: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 2293c: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 22940: 1a000006 bne 22960 errno = EINVAL; 22944: eb005b0b bl 39578 <__errno> <== NOT EXECUTED 22948: e3a03016 mov r3, #22 <== NOT EXECUTED 2294c: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 22950: e1a00005 mov r0, r5 <== NOT EXECUTED 22954: eb005b54 bl 396ac <== NOT EXECUTED 22958: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 2295c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 22960: e3560000 cmp r6, #0 22964: 0a000004 beq 2297c match = (strcmp(grp->gr_name, name) == 0); 22968: e5940000 ldr r0, [r4] 2296c: eb007324 bl 3f604 22970: e2700001 rsbs r0, r0, #1 22974: 33a00000 movcc r0, #0 22978: ea000003 b 2298c } else { match = (grp->gr_gid == gid); 2297c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22980: e1500007 cmp r0, r7 <== NOT EXECUTED 22984: 13a00000 movne r0, #0 <== NOT EXECUTED 22988: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 2298c: e3500000 cmp r0, #0 22990: 0affffe3 beq 22924 fclose(fp); 22994: e1a00005 mov r0, r5 22998: eb005b43 bl 396ac *result = grp; 2299c: e59d3020 ldr r3, [sp, #32] 229a0: e3a00000 mov r0, #0 229a4: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 229a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 0002263c : return NULL; return p; } struct group *getgrent(void) { 2263c: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 22640: e59f402c ldr r4, [pc, #44] ; 22674 <== NOT EXECUTED 22644: e5940000 ldr r0, [r4] <== NOT EXECUTED 22648: e3500000 cmp r0, #0 <== NOT EXECUTED 2264c: 0a000006 beq 2266c <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 22650: e2841008 add r1, r4, #8 <== NOT EXECUTED 22654: e2842018 add r2, r4, #24 <== NOT EXECUTED 22658: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2265c: ebffffa8 bl 22504 <== NOT EXECUTED 22660: e3500000 cmp r0, #0 <== NOT EXECUTED 22664: 12840008 addne r0, r4, #8 <== NOT EXECUTED 22668: 18bd8010 popne {r4, pc} <== NOT EXECUTED 2266c: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 22670: e8bd8010 pop {r4, pc} <== NOT EXECUTED 000229e8 : struct group *getgrgid( gid_t gid ) { 229e8: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 229ec: e59f1028 ldr r1, [pc, #40] ; 22a1c <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 229f0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 229f4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 229f8: e2812010 add r2, r1, #16 <== NOT EXECUTED 229fc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22a00: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22a04: e58dc000 str ip, [sp] <== NOT EXECUTED 22a08: ebffffe9 bl 229b4 <== NOT EXECUTED 22a0c: e3500000 cmp r0, #0 <== NOT EXECUTED 22a10: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22a14: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22a18: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 000229b4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 229b4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 229b8: e1a0c002 mov ip, r2 <== NOT EXECUTED 229bc: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 229c0: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 229c4: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 229c8: e1a0300c mov r3, ip <== NOT EXECUTED 229cc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 229d0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 229d4: e1a0200e mov r2, lr <== NOT EXECUTED 229d8: e3a00000 mov r0, #0 <== NOT EXECUTED 229dc: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 229e0: ebffffbf bl 228e4 <== NOT EXECUTED } 229e4: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00022ab4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22ab4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22ab8: e59da01c ldr sl, [sp, #28] 22abc: e1a06000 mov r6, r0 22ac0: e1a07001 mov r7, r1 22ac4: e1a04002 mov r4, r2 22ac8: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 22acc: ebffff43 bl 227e0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 22ad0: e59f00a4 ldr r0, [pc, #164] ; 22b7c 22ad4: e59f10a4 ldr r1, [pc, #164] ; 22b80 22ad8: eb005d16 bl 39f38 22adc: e2505000 subs r5, r0, #0 22ae0: 1a000003 bne 22af4 errno = EINVAL; 22ae4: eb005aa3 bl 39578 <__errno> <== NOT EXECUTED 22ae8: e3a03016 mov r3, #22 <== NOT EXECUTED 22aec: e5803000 str r3, [r0] <== NOT EXECUTED 22af0: ea00000c b 22b28 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22af4: e1a01004 mov r1, r4 22af8: e1a02008 mov r2, r8 22afc: e1a0300a mov r3, sl 22b00: e1a00005 mov r0, r5 22b04: ebfffedb bl 22678 22b08: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 22b0c: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22b10: 1a000006 bne 22b30 errno = EINVAL; 22b14: eb005a97 bl 39578 <__errno> <== NOT EXECUTED 22b18: e3a03016 mov r3, #22 <== NOT EXECUTED 22b1c: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 22b20: e1a00005 mov r0, r5 <== NOT EXECUTED 22b24: eb005ae0 bl 396ac <== NOT EXECUTED 22b28: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22b2c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 22b30: e3560000 cmp r6, #0 22b34: 0a000004 beq 22b4c match = (strcmp(pwd->pw_name, name) == 0); 22b38: e5940000 ldr r0, [r4] 22b3c: eb0072b0 bl 3f604 22b40: e2700001 rsbs r0, r0, #1 22b44: 33a00000 movcc r0, #0 22b48: ea000003 b 22b5c } else { match = (pwd->pw_uid == uid); 22b4c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22b50: e1500007 cmp r0, r7 <== NOT EXECUTED 22b54: 13a00000 movne r0, #0 <== NOT EXECUTED 22b58: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 22b5c: e3500000 cmp r0, #0 22b60: 0affffe3 beq 22af4 fclose(fp); 22b64: e1a00005 mov r0, r5 22b68: eb005acf bl 396ac *result = pwd; 22b6c: e59d3020 ldr r3, [sp, #32] 22b70: e3a00000 mov r0, #0 22b74: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22b78: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 000227a4 : return NULL; return p; } struct passwd *getpwent(void) { 227a4: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 227a8: e59f402c ldr r4, [pc, #44] ; 227dc <== NOT EXECUTED 227ac: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 227b0: e3500000 cmp r0, #0 <== NOT EXECUTED 227b4: 0a000006 beq 227d4 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 227b8: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 227bc: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 227c0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 227c4: ebffffab bl 22678 <== NOT EXECUTED 227c8: e3500000 cmp r0, #0 <== NOT EXECUTED 227cc: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 227d0: 18bd8010 popne {r4, pc} <== NOT EXECUTED 227d4: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 227d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00022bb8 : struct passwd *getpwuid( uid_t uid ) { 22bb8: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22bbc: e59f1028 ldr r1, [pc, #40] ; 22bec <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 22bc0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22bc4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22bc8: e281201c add r2, r1, #28 <== NOT EXECUTED 22bcc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22bd0: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22bd4: e58dc000 str ip, [sp] <== NOT EXECUTED 22bd8: ebffffe9 bl 22b84 <== NOT EXECUTED 22bdc: e3500000 cmp r0, #0 <== NOT EXECUTED 22be0: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22be4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22be8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00022b84 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22b84: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22b88: e1a0c002 mov ip, r2 <== NOT EXECUTED 22b8c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22b90: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22b94: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22b98: e1a0300c mov r3, ip <== NOT EXECUTED 22b9c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22ba0: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22ba4: e1a0200e mov r2, lr <== NOT EXECUTED 22ba8: e3a00000 mov r0, #0 <== NOT EXECUTED 22bac: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22bb0: ebffffbf bl 22ab4 <== NOT EXECUTED } 22bb4: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00009160 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 9160: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 9164: e2504000 subs r4, r0, #0 9168: 1a000004 bne 9180 errno = EFAULT; 916c: eb000efc bl cd64 <__errno> <== NOT EXECUTED 9170: e3a0300e mov r3, #14 <== NOT EXECUTED 9174: e5803000 str r3, [r0] <== NOT EXECUTED 9178: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 917c: ea00000c b 91b4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 9180: e10f5000 mrs r5, CPSR 9184: e3853080 orr r3, r5, #128 ; 0x80 9188: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 918c: e1a0000d mov r0, sp 9190: eb00042b bl a244 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 9194: 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; 9198: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 919c: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 91a0: 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; 91a4: e5843000 str r3, [r4] time->tv_usec = useconds; 91a8: eb0034b4 bl 16480 <__aeabi_idiv> 91ac: e5840004 str r0, [r4, #4] 91b0: 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; } 91b4: e8bd803c pop {r2, r3, r4, r5, pc} 0000494c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 494c: e59f3008 ldr r3, [pc, #8] ; 495c <== NOT EXECUTED 4950: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 4954: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 4958: e12fff1e bx lr <== NOT EXECUTED 000051e0 : int ioctl( int fd, ioctl_command_t command, ... ) { 51e0: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 51e4: e59f3080 ldr r3, [pc, #128] ; 526c 51e8: e5933000 ldr r3, [r3] 51ec: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 51f0: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 51f4: 2a00000b bcs 5228 iop = rtems_libio_iop( fd ); 51f8: e59f3070 ldr r3, [pc, #112] ; 5270 51fc: e5933000 ldr r3, [r3] 5200: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 5204: e5903014 ldr r3, [r0, #20] 5208: e3130c01 tst r3, #256 ; 0x100 520c: 0a000005 beq 5228 /* * Now process the ioctl(). */ if ( !iop->handlers ) 5210: 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 *); 5214: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 5218: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 521c: e58d2000 str r2, [sp] 5220: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 5224: 1a000002 bne 5234 rtems_set_errno_and_return_minus_one( EBADF ); 5228: eb0033de bl 121a8 <__errno> 522c: e3a03009 mov r3, #9 5230: ea000004 b 5248 if ( !iop->handlers->ioctl_h ) 5234: e5933010 ldr r3, [r3, #16] 5238: e3530000 cmp r3, #0 523c: 1a000004 bne 5254 rtems_set_errno_and_return_minus_one( ENOTSUP ); 5240: eb0033d8 bl 121a8 <__errno> <== NOT EXECUTED 5244: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5248: e5803000 str r3, [r0] 524c: e3e00000 mvn r0, #0 5250: ea000002 b 5260 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 5254: e59d1008 ldr r1, [sp, #8] 5258: e1a0e00f mov lr, pc 525c: e12fff13 bx r3 return rc; } 5260: e8bd4008 pop {r3, lr} 5264: e28dd00c add sp, sp, #12 5268: e12fff1e bx lr 000030b4 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 30b4: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 30b8: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 30c0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 30c4: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 30c8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30cc: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 30d0: 0a000007 beq 30f4 <== NOT EXECUTED c = tolower (c); 30d4: e59f2164 ldr r2, [pc, #356] ; 3240 <== NOT EXECUTED 30d8: e5922000 ldr r2, [r2] <== NOT EXECUTED 30dc: e0822005 add r2, r2, r5 <== NOT EXECUTED 30e0: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30e4: e2022003 and r2, r2, #3 <== NOT EXECUTED 30e8: e3520001 cmp r2, #1 <== NOT EXECUTED 30ec: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 30f0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 30f4: e355000d cmp r5, #13 <== NOT EXECUTED 30f8: 1a000005 bne 3114 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 30fc: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3100: 1a00004c bne 3238 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 3104: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3108: 03a0500d moveq r5, #13 <== NOT EXECUTED 310c: 13a0500a movne r5, #10 <== NOT EXECUTED 3110: ea000007 b 3134 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3114: e355000a cmp r5, #10 <== NOT EXECUTED 3118: 1a000003 bne 312c <== NOT EXECUTED 311c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 3120: 03a0500a moveq r5, #10 <== NOT EXECUTED 3124: 13a0500d movne r5, #13 <== NOT EXECUTED 3128: ea000001 b 3134 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 312c: e3550000 cmp r5, #0 <== NOT EXECUTED 3130: 0a00002e beq 31f0 <== NOT EXECUTED 3134: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3138: e3130002 tst r3, #2 <== NOT EXECUTED 313c: 0a00002b beq 31f0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 3140: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 3144: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 3148: 01a00004 moveq r0, r4 <== NOT EXECUTED 314c: 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]) { 3150: 0a000004 beq 3168 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3154: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 3158: e1520005 cmp r2, r5 <== NOT EXECUTED 315c: 1a000003 bne 3170 <== NOT EXECUTED erase (tty, 1); 3160: e1a00004 mov r0, r4 <== NOT EXECUTED 3164: e3a01001 mov r1, #1 <== NOT EXECUTED 3168: ebffff5e bl 2ee8 <== NOT EXECUTED 316c: ea00002f b 3230 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3170: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 3174: e1520005 cmp r2, r5 <== NOT EXECUTED 3178: 0a00001a beq 31e8 <== NOT EXECUTED return 1; } else if (c == '\n') { 317c: e355000a cmp r5, #10 <== NOT EXECUTED 3180: 1a000009 bne 31ac <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 3184: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 3188: 11a00005 movne r0, r5 <== NOT EXECUTED 318c: 11a01004 movne r1, r4 <== NOT EXECUTED 3190: 1bffff34 blne 2e68 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3194: e284101c add r1, r4, #28 <== NOT EXECUTED 3198: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 319c: e3a0000a mov r0, #10 <== NOT EXECUTED 31a0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31a4: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 31a8: ea00000d b 31e4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 31ac: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 31b0: e1520005 cmp r2, r5 <== NOT EXECUTED 31b4: 0a000002 beq 31c4 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 31b8: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 31bc: e1520005 cmp r2, r5 <== NOT EXECUTED 31c0: 1a00000a bne 31f0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 31c4: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 31c8: 11a00005 movne r0, r5 <== NOT EXECUTED 31cc: 11a01004 movne r1, r4 <== NOT EXECUTED 31d0: 1bffff24 blne 2e68 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 31d4: e284101c add r1, r4, #28 <== NOT EXECUTED 31d8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 31dc: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 31e0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31e4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 31e8: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 31ec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 31f0: e59f304c ldr r3, [pc, #76] ; 3244 <== NOT EXECUTED 31f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 31f8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 31fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3200: e1520003 cmp r2, r3 <== NOT EXECUTED 3204: aa00000b bge 3238 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 3208: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 320c: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3210: 11a00005 movne r0, r5 <== NOT EXECUTED 3214: 11a01004 movne r1, r4 <== NOT EXECUTED 3218: 1bffff12 blne 2e68 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 321c: e284101c add r1, r4, #28 <== NOT EXECUTED 3220: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3224: e2832001 add r2, r3, #1 <== NOT EXECUTED 3228: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 322c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 3230: e3a00000 mov r0, #0 <== NOT EXECUTED 3234: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3238: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 323c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00022cdc : int link( const char *existing, const char *new ) { 22cdc: e92d4030 push {r4, r5, lr} 22ce0: e24dd030 sub sp, sp, #48 ; 0x30 22ce4: e1a04001 mov r4, r1 22ce8: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 22cec: eb0074ac bl 3ffa4 22cf0: e3a0c001 mov ip, #1 22cf4: e1a01000 mov r1, r0 22cf8: e3a02000 mov r2, #0 22cfc: e1a00005 mov r0, r5 22d00: e28d3018 add r3, sp, #24 22d04: e58dc000 str ip, [sp] 22d08: ebff8699 bl 4774 0, &existing_loc, true ); if ( result != 0 ) 22d0c: e3500000 cmp r0, #0 22d10: 1a00002a bne 22dc0 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 22d14: e5d43000 ldrb r3, [r4] 22d18: e353002f cmp r3, #47 ; 0x2f 22d1c: 1353005c cmpne r3, #92 ; 0x5c 22d20: 13a05000 movne r5, #0 22d24: 03a05001 moveq r5, #1 22d28: 0a000001 beq 22d34 22d2c: e3530000 cmp r3, #0 22d30: 1a000009 bne 22d5c 22d34: e59f31ec ldr r3, [pc, #492] ; 22f28 22d38: e593e000 ldr lr, [r3] 22d3c: e28ee018 add lr, lr, #24 22d40: e8be000f ldm lr!, {r0, r1, r2, r3} 22d44: e28dc004 add ip, sp, #4 22d48: e8ac000f stmia ip!, {r0, r1, r2, r3} 22d4c: e59e3000 ldr r3, [lr] 22d50: e3a00001 mov r0, #1 22d54: e58c3000 str r3, [ip] 22d58: ea000008 b 22d80 22d5c: e59f31c4 ldr r3, [pc, #452] ; 22f28 22d60: e593e000 ldr lr, [r3] 22d64: e28ee004 add lr, lr, #4 22d68: e8be000f ldm lr!, {r0, r1, r2, r3} 22d6c: e28dc004 add ip, sp, #4 22d70: e8ac000f stmia ip!, {r0, r1, r2, r3} 22d74: e59e3000 ldr r3, [lr] 22d78: e58c3000 str r3, [ip] 22d7c: e1a00005 mov r0, r5 if ( !parent_loc.ops->evalformake_h ) { 22d80: e59d3010 ldr r3, [sp, #16] 22d84: e5933004 ldr r3, [r3, #4] 22d88: e3530000 cmp r3, #0 22d8c: 1a00000d bne 22dc8 rtems_filesystem_freenode( &existing_loc ); 22d90: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22d94: e3530000 cmp r3, #0 <== NOT EXECUTED 22d98: 0a000005 beq 22db4 <== NOT EXECUTED 22d9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22da0: e3530000 cmp r3, #0 <== NOT EXECUTED 22da4: 0a000002 beq 22db4 <== NOT EXECUTED 22da8: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22dac: e1a0e00f mov lr, pc <== NOT EXECUTED 22db0: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22db4: eb0059ef bl 39578 <__errno> <== NOT EXECUTED 22db8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22dbc: e5803000 str r3, [r0] 22dc0: e3e05000 mvn r5, #0 22dc4: ea000054 b 22f1c } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 22dc8: e28d5004 add r5, sp, #4 22dcc: e0840000 add r0, r4, r0 22dd0: e1a01005 mov r1, r5 22dd4: e28d202c add r2, sp, #44 ; 0x2c 22dd8: e1a0e00f mov lr, pc 22ddc: e12fff13 bx r3 if ( result != 0 ) { 22de0: e2504000 subs r4, r0, #0 22de4: 0a00000a beq 22e14 rtems_filesystem_freenode( &existing_loc ); 22de8: e59d3024 ldr r3, [sp, #36] ; 0x24 22dec: e3530000 cmp r3, #0 22df0: 0a000004 beq 22e08 22df4: e593301c ldr r3, [r3, #28] 22df8: e3530000 cmp r3, #0 22dfc: 128d0018 addne r0, sp, #24 22e00: 11a0e00f movne lr, pc 22e04: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 22e08: eb0059da bl 39578 <__errno> 22e0c: e5804000 str r4, [r0] 22e10: eaffffea b 22dc0 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 22e14: e59d3028 ldr r3, [sp, #40] ; 0x28 22e18: e59d2014 ldr r2, [sp, #20] 22e1c: e1520003 cmp r2, r3 22e20: 0a000012 beq 22e70 rtems_filesystem_freenode( &existing_loc ); 22e24: e59d3024 ldr r3, [sp, #36] ; 0x24 22e28: e3530000 cmp r3, #0 22e2c: 0a000004 beq 22e44 22e30: e593301c ldr r3, [r3, #28] 22e34: e3530000 cmp r3, #0 22e38: 128d0018 addne r0, sp, #24 22e3c: 11a0e00f movne lr, pc 22e40: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22e44: e59d3010 ldr r3, [sp, #16] 22e48: e3530000 cmp r3, #0 22e4c: 0a000004 beq 22e64 22e50: e593301c ldr r3, [r3, #28] 22e54: e3530000 cmp r3, #0 22e58: 128d0004 addne r0, sp, #4 22e5c: 11a0e00f movne lr, pc 22e60: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 22e64: eb0059c3 bl 39578 <__errno> 22e68: e3a03012 mov r3, #18 22e6c: eaffffd2 b 22dbc } if ( !parent_loc.ops->link_h ) { 22e70: e59d3010 ldr r3, [sp, #16] 22e74: e5933008 ldr r3, [r3, #8] 22e78: e3530000 cmp r3, #0 22e7c: 1a00000f bne 22ec0 rtems_filesystem_freenode( &existing_loc ); 22e80: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22e84: e3530000 cmp r3, #0 <== NOT EXECUTED 22e88: 0a000004 beq 22ea0 <== NOT EXECUTED 22e8c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22e90: e3530000 cmp r3, #0 <== NOT EXECUTED 22e94: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22e98: 11a0e00f movne lr, pc <== NOT EXECUTED 22e9c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 22ea0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 22ea8: 0affffc1 beq 22db4 <== NOT EXECUTED 22eac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22eb0: e3530000 cmp r3, #0 <== NOT EXECUTED 22eb4: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22eb8: 1affffbb bne 22dac <== NOT EXECUTED 22ebc: eaffffbc b 22db4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22ec0: e28d4018 add r4, sp, #24 22ec4: e1a01005 mov r1, r5 22ec8: e1a00004 mov r0, r4 22ecc: e59d202c ldr r2, [sp, #44] ; 0x2c 22ed0: e1a0e00f mov lr, pc 22ed4: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 22ed8: e59d3024 ldr r3, [sp, #36] ; 0x24 22edc: e3530000 cmp r3, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22ee0: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 22ee4: 0a000004 beq 22efc 22ee8: e593301c ldr r3, [r3, #28] 22eec: e3530000 cmp r3, #0 22ef0: 11a00004 movne r0, r4 22ef4: 11a0e00f movne lr, pc 22ef8: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22efc: e59d3010 ldr r3, [sp, #16] 22f00: e3530000 cmp r3, #0 22f04: 0a000004 beq 22f1c 22f08: e593301c ldr r3, [r3, #28] 22f0c: e3530000 cmp r3, #0 22f10: 128d0004 addne r0, sp, #4 22f14: 11a0e00f movne lr, pc 22f18: 112fff13 bxne r3 return result; } 22f1c: e1a00005 mov r0, r5 22f20: e28dd030 add sp, sp, #48 ; 0x30 22f24: e8bd8030 pop {r4, r5, pc} 00017d6c : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17d6c: e59fc0ec ldr ip, [pc, #236] ; 17e60 17d70: e59cc000 ldr ip, [ip] 17d74: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 17d78: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17d7c: 2a000005 bcs 17d98 iop = rtems_libio_iop( fd ); 17d80: e59fc0dc ldr ip, [pc, #220] ; 17e64 17d84: e59c4000 ldr r4, [ip] 17d88: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 17d8c: e5940014 ldr r0, [r4, #20] 17d90: e3100c01 tst r0, #256 ; 0x100 17d94: 1a000002 bne 17da4 17d98: ebffd3f1 bl cd64 <__errno> <== NOT EXECUTED 17d9c: e3a03009 mov r3, #9 <== NOT EXECUTED 17da0: ea00001c b 17e18 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 17da4: e594003c ldr r0, [r4, #60] ; 0x3c 17da8: e5900014 ldr r0, [r0, #20] 17dac: e3500000 cmp r0, #0 17db0: 1a000002 bne 17dc0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17db4: ebffd3ea bl cd64 <__errno> <== NOT EXECUTED 17db8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17dbc: ea000015 b 17e18 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 17dc0: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 17dc4: e284600c add r6, r4, #12 17dc8: e8960060 ldm r6, {r5, r6} switch ( whence ) { 17dcc: 0a000006 beq 17dec 17dd0: e3530002 cmp r3, #2 17dd4: 0a000007 beq 17df8 17dd8: e3530000 cmp r3, #0 17ddc: 1a00000b bne 17e10 case SEEK_SET: iop->offset = offset; 17de0: e584100c str r1, [r4, #12] 17de4: e5842010 str r2, [r4, #16] break; 17de8: ea00000e b 17e28 case SEEK_CUR: iop->offset += offset; 17dec: e091b005 adds fp, r1, r5 17df0: e0a2c006 adc ip, r2, r6 17df4: ea000002 b 17e04 break; case SEEK_END: iop->offset = iop->size + offset; 17df8: e9941800 ldmib r4, {fp, ip} 17dfc: e09bb001 adds fp, fp, r1 17e00: e0acc002 adc ip, ip, r2 17e04: e584b00c str fp, [r4, #12] 17e08: e584c010 str ip, [r4, #16] break; 17e0c: ea000005 b 17e28 default: rtems_set_errno_and_return_minus_one( EINVAL ); 17e10: ebffd3d3 bl cd64 <__errno> 17e14: e3a03016 mov r3, #22 17e18: e5803000 str r3, [r0] 17e1c: e3e02000 mvn r2, #0 17e20: e3e03000 mvn r3, #0 17e24: ea00000a b 17e54 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17e28: e594c03c ldr ip, [r4, #60] ; 0x3c 17e2c: e1a00004 mov r0, r4 17e30: e1a0e00f mov lr, pc 17e34: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 17e38: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17e3c: e1a02000 mov r2, r0 17e40: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 17e44: 1a000002 bne 17e54 17e48: e3710001 cmn r1, #1 iop->offset = old_offset; 17e4c: 0584500c streq r5, [r4, #12] 17e50: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17e54: e1a01003 mov r1, r3 17e58: e1a00002 mov r0, r2 17e5c: e8bd8870 pop {r4, r5, r6, fp, pc} 00023048 : int _STAT_NAME( const char *path, struct stat *buf ) { 23048: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2304c: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 23050: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 23054: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 23058: 1a000002 bne 23068 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 2305c: eb005945 bl 39578 <__errno> <== NOT EXECUTED 23060: e3a0300e mov r3, #14 <== NOT EXECUTED 23064: ea000018 b 230cc <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 23068: eb0073cd bl 3ffa4 <== NOT EXECUTED 2306c: e28d4004 add r4, sp, #4 <== NOT EXECUTED 23070: e3a0c000 mov ip, #0 <== NOT EXECUTED 23074: e1a01000 mov r1, r0 <== NOT EXECUTED 23078: e1a0200c mov r2, ip <== NOT EXECUTED 2307c: e1a00006 mov r0, r6 <== NOT EXECUTED 23080: e1a03004 mov r3, r4 <== NOT EXECUTED 23084: e58dc000 str ip, [sp] <== NOT EXECUTED 23088: ebff85b9 bl 4774 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 2308c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 23090: 1a00000e bne 230d0 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 23094: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 23098: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2309c: e3530000 cmp r3, #0 <== NOT EXECUTED 230a0: 1a00000c bne 230d8 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 230a4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 230a8: e3530000 cmp r3, #0 <== NOT EXECUTED 230ac: 0a000004 beq 230c4 <== NOT EXECUTED 230b0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 230b4: e3530000 cmp r3, #0 <== NOT EXECUTED 230b8: 11a00004 movne r0, r4 <== NOT EXECUTED 230bc: 11a0e00f movne lr, pc <== NOT EXECUTED 230c0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 230c4: eb00592b bl 39578 <__errno> <== NOT EXECUTED 230c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 230cc: e5803000 str r3, [r0] <== NOT EXECUTED 230d0: e3e05000 mvn r5, #0 <== NOT EXECUTED 230d4: ea000010 b 2311c <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 230d8: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 230dc: e1a00005 mov r0, r5 <== NOT EXECUTED 230e0: eb0065dc bl 3c858 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 230e4: e1a01005 mov r1, r5 <== NOT EXECUTED 230e8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 230ec: e1a00004 mov r0, r4 <== NOT EXECUTED 230f0: e1a0e00f mov lr, pc <== NOT EXECUTED 230f4: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 230f8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 230fc: e3530000 cmp r3, #0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 23100: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23104: 0a000004 beq 2311c <== NOT EXECUTED 23108: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2310c: e3530000 cmp r3, #0 <== NOT EXECUTED 23110: 11a00004 movne r0, r4 <== NOT EXECUTED 23114: 11a0e00f movne lr, pc <== NOT EXECUTED 23118: 112fff13 bxne r3 <== NOT EXECUTED return status; } 2311c: e1a00005 mov r0, r5 <== NOT EXECUTED 23120: e28dd018 add sp, sp, #24 <== NOT EXECUTED 23124: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001c10 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 1c10: e59f30d8 ldr r3, [pc, #216] ; 1cf0 1c14: e5932004 ldr r2, [r3, #4] 1c18: e2822001 add r2, r2, #1 1c1c: e92d4070 push {r4, r5, r6, lr} 1c20: e5832004 str r2, [r3, #4] 1c24: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1c28: ebffffb5 bl 1b04 /* * Validate the parameters */ if ( !size ) 1c2c: e3540000 cmp r4, #0 1c30: 0a00002b beq 1ce4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1c34: e59f30b8 ldr r3, [pc, #184] ; 1cf4 1c38: e5933000 ldr r3, [r3] 1c3c: e3530003 cmp r3, #3 1c40: 1a000002 bne 1c50 1c44: ebffff97 bl 1aa8 1c48: e3500000 cmp r0, #0 1c4c: 0a000024 beq 1ce4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1c50: e59f30a0 ldr r3, [pc, #160] ; 1cf8 1c54: e3a02000 mov r2, #0 1c58: e5930000 ldr r0, [r3] 1c5c: e1a01004 mov r1, r4 1c60: e1a03002 mov r3, r2 1c64: eb0011b7 bl 6348 <_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 ) { 1c68: 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; 1c6c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1c70: 1a00000c bne 1ca8 if (rtems_malloc_sbrk_helpers) 1c74: e59f3080 ldr r3, [pc, #128] ; 1cfc 1c78: e5933000 ldr r3, [r3] 1c7c: e3530000 cmp r3, #0 1c80: 0a000004 beq 1c98 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1c84: e1a00004 mov r0, r4 <== NOT EXECUTED 1c88: e1a0e00f mov lr, pc <== NOT EXECUTED 1c8c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 1c90: e2505000 subs r5, r0, #0 <== NOT EXECUTED 1c94: 1a000003 bne 1ca8 <== NOT EXECUTED errno = ENOMEM; 1c98: eb002c31 bl cd64 <__errno> 1c9c: e3a0300c mov r3, #12 1ca0: e5803000 str r3, [r0] return (void *) 0; 1ca4: ea00000f b 1ce8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1ca8: e59f3050 ldr r3, [pc, #80] ; 1d00 1cac: e5933000 ldr r3, [r3] 1cb0: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 1cb4: 11a01004 movne r1, r4 1cb8: 11a00005 movne r0, r5 1cbc: 11a0e00f movne lr, pc 1cc0: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1cc4: e59f3038 ldr r3, [pc, #56] ; 1d04 1cc8: e5933000 ldr r3, [r3] 1ccc: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1cd0: 11a00005 movne r0, r5 1cd4: 11a0e00f movne lr, pc 1cd8: 1593f004 ldrne pc, [r3, #4] 1cdc: e1a06005 mov r6, r5 1ce0: ea000000 b 1ce8 1ce4: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1ce8: e1a00006 mov r0, r6 1cec: e8bd8070 pop {r4, r5, r6, pc} 00001af4 : } void malloc_deferred_free( void *pointer ) { 1af4: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1af8: e59f0000 ldr r0, [pc, #0] ; 1b00 <== NOT EXECUTED 1afc: ea000e27 b 53a0 <_Chain_Append> <== NOT EXECUTED 00001b04 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 1b04: 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) 1b08: ea000000 b 1b10 free(to_be_freed); 1b0c: ebffff8d bl 1948 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 1b10: e59f000c ldr r0, [pc, #12] ; 1b24 1b14: eb000e2c bl 53cc <_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) 1b18: e3500000 cmp r0, #0 1b1c: 1afffffa bne 1b0c free(to_be_freed); } 1b20: e49df004 pop {pc} ; (ldr pc, [sp], #4) 000103a8 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 103a8: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 103ac: 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 ) 103b0: e5943054 ldr r3, [r4, #84] ; 0x54 103b4: e1530002 cmp r3, r2 103b8: ba000003 blt 103cc 103bc: 1a000005 bne 103d8 103c0: e5943050 ldr r3, [r4, #80] ; 0x50 103c4: e1530001 cmp r3, r1 103c8: 2a000002 bcs 103d8 return IMFS_memfile_extend( the_jnode, length ); 103cc: e1a00004 mov r0, r4 <== NOT EXECUTED 103d0: ebffff9a bl 10240 <== NOT EXECUTED 103d4: ea000008 b 103fc <== 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; 103d8: e5841050 str r1, [r4, #80] ; 0x50 103dc: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; 103e0: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); 103e4: e3a01000 mov r1, #0 103e8: e1a0000d mov r0, sp 103ec: ebffca82 bl 2dfc 103f0: e59d3000 ldr r3, [sp] 103f4: e5843040 str r3, [r4, #64] ; 0x40 103f8: e3a00000 mov r0, #0 return 0; } 103fc: e8bd801c pop {r2, r3, r4, pc} 00010400 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10400: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10404: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { 10408: e595304c ldr r3, [r5, #76] ; 0x4c 1040c: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10410: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 10414: 1a00000b bne 10448 if (iop->offset > the_jnode->info.linearfile.size) 10418: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED 1041c: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED 10420: e1520003 cmp r2, r3 <== NOT EXECUTED 10424: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED 10428: ca000003 bgt 1043c <== NOT EXECUTED 1042c: 1a000014 bne 10484 <== NOT EXECUTED 10430: e590100c ldr r1, [r0, #12] <== NOT EXECUTED 10434: e1510002 cmp r1, r2 <== NOT EXECUTED 10438: 9a000011 bls 10484 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1043c: e584200c str r2, [r4, #12] <== NOT EXECUTED 10440: e5843010 str r3, [r4, #16] <== NOT EXECUTED 10444: ea00000e b 10484 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 10448: e1a00005 mov r0, r5 1044c: e284200c add r2, r4, #12 10450: e8920006 ldm r2, {r1, r2} 10454: ebffff79 bl 10240 10458: e3500000 cmp r0, #0 1045c: 0a000005 beq 10478 rtems_set_errno_and_return_minus_one( ENOSPC ); 10460: eb000657 bl 11dc4 <__errno> <== NOT EXECUTED 10464: e3a0301c mov r3, #28 <== NOT EXECUTED 10468: e5803000 str r3, [r0] <== NOT EXECUTED 1046c: e3e04000 mvn r4, #0 <== NOT EXECUTED 10470: e3e03000 mvn r3, #0 <== NOT EXECUTED 10474: ea000004 b 1048c <== NOT EXECUTED iop->size = the_jnode->info.file.size; 10478: e2853050 add r3, r5, #80 ; 0x50 1047c: e893000c ldm r3, {r2, r3} 10480: e984000c stmib r4, {r2, r3} } return iop->offset; 10484: e284400c add r4, r4, #12 10488: e8940018 ldm r4, {r3, r4} } 1048c: e1a01004 mov r1, r4 10490: e1a00003 mov r0, r3 10494: e8bd8030 pop {r4, r5, pc} 00010724 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10724: e5903014 ldr r3, [r0, #20] 10728: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1072c: e92d4031 push {r0, r4, r5, lr} 10730: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10734: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10738: 0a000017 beq 1079c && (the_jnode->type == IMFS_LINEAR_FILE)) { 1073c: e594304c ldr r3, [r4, #76] ; 0x4c 10740: e3530006 cmp r3, #6 10744: 1a000014 bne 1079c uint32_t count = the_jnode->info.linearfile.size; 10748: 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; 1074c: 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; 10750: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 10754: e3a00000 mov r0, #0 <== NOT EXECUTED 10758: 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) 1075c: e35c0000 cmp ip, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 10760: 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; 10764: 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; 10768: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 1076c: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED 10770: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 10774: 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; 10778: 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) 1077c: 0a000006 beq 1079c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 10780: e1a02001 mov r2, r1 <== NOT EXECUTED 10784: e1a01000 mov r1, r0 <== NOT EXECUTED 10788: e1a00004 mov r0, r4 <== NOT EXECUTED 1078c: e58dc000 str ip, [sp] <== NOT EXECUTED 10790: ebffff40 bl 10498 <== 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) 10794: e3700001 cmn r0, #1 <== NOT EXECUTED 10798: 0a000009 beq 107c4 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1079c: e5953014 ldr r3, [r5, #20] 107a0: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 107a4: 12843050 addne r3, r4, #80 ; 0x50 107a8: 1893000c ldmne r3, {r2, r3} 107ac: 1585200c strne r2, [r5, #12] 107b0: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 107b4: e2844050 add r4, r4, #80 ; 0x50 107b8: e8940018 ldm r4, {r3, r4} 107bc: e9850018 stmib r5, {r3, r4} 107c0: e3a00000 mov r0, #0 return 0; } 107c4: e8bd8038 pop {r3, r4, r5, pc} 00001d18 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1d18: e92d41f0 push {r4, r5, r6, r7, r8, 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) ) ) 1d1c: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1d20: e24dd01c sub sp, sp, #28 1d24: e1a05001 mov r5, r1 1d28: e1a06000 mov r6, r0 1d2c: e1a07002 mov r7, r2 1d30: e1a08003 mov r8, r3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1d34: 1a000002 bne 1d44 rtems_set_errno_and_return_minus_one( EINVAL ); 1d38: eb002c09 bl cd64 <__errno> <== NOT EXECUTED 1d3c: e3a03016 mov r3, #22 <== NOT EXECUTED 1d40: ea000020 b 1dc8 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1d44: e5d03000 ldrb r3, [r0] 1d48: e353002f cmp r3, #47 ; 0x2f 1d4c: 1353005c cmpne r3, #92 ; 0x5c 1d50: 13a04000 movne r4, #0 1d54: 03a04001 moveq r4, #1 1d58: 0a000001 beq 1d64 1d5c: e3530000 cmp r3, #0 1d60: 1a000009 bne 1d8c 1d64: e59f3100 ldr r3, [pc, #256] ; 1e6c 1d68: e593e000 ldr lr, [r3] 1d6c: e28ee018 add lr, lr, #24 1d70: e8be000f ldm lr!, {r0, r1, r2, r3} 1d74: e28dc004 add ip, sp, #4 1d78: e8ac000f stmia ip!, {r0, r1, r2, r3} 1d7c: e59e3000 ldr r3, [lr] 1d80: e3a00001 mov r0, #1 1d84: e58c3000 str r3, [ip] 1d88: ea000008 b 1db0 1d8c: e59f30d8 ldr r3, [pc, #216] ; 1e6c 1d90: e593e000 ldr lr, [r3] 1d94: e28ee004 add lr, lr, #4 1d98: e8be000f ldm lr!, {r0, r1, r2, r3} 1d9c: e28dc004 add ip, sp, #4 1da0: e8ac000f stmia ip!, {r0, r1, r2, r3} 1da4: e59e3000 ldr r3, [lr] 1da8: e58c3000 str r3, [ip] 1dac: e1a00004 mov r0, r4 if ( !temp_loc.ops->evalformake_h ) { 1db0: e59d3010 ldr r3, [sp, #16] 1db4: e5933004 ldr r3, [r3, #4] 1db8: e3530000 cmp r3, #0 1dbc: 1a000004 bne 1dd4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1dc0: eb002be7 bl cd64 <__errno> <== NOT EXECUTED 1dc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dc8: e5803000 str r3, [r0] <== NOT EXECUTED 1dcc: e3e05000 mvn r5, #0 1dd0: ea000022 b 1e60 } result = (*temp_loc.ops->evalformake_h)( 1dd4: e28d4004 add r4, sp, #4 1dd8: e0860000 add r0, r6, r0 1ddc: e1a01004 mov r1, r4 1de0: e28d2018 add r2, sp, #24 1de4: e1a0e00f mov lr, pc 1de8: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 1dec: e3500000 cmp r0, #0 1df0: 1afffff5 bne 1dcc return -1; if ( !temp_loc.ops->mknod_h ) { 1df4: e59d3010 ldr r3, [sp, #16] 1df8: e593c014 ldr ip, [r3, #20] 1dfc: e35c0000 cmp ip, #0 1e00: 1a000006 bne 1e20 rtems_filesystem_freenode( &temp_loc ); 1e04: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1e08: e3530000 cmp r3, #0 <== NOT EXECUTED 1e0c: 0affffeb beq 1dc0 <== NOT EXECUTED 1e10: e1a00004 mov r0, r4 <== NOT EXECUTED 1e14: e1a0e00f mov lr, pc <== NOT EXECUTED 1e18: e12fff13 bx r3 <== NOT EXECUTED 1e1c: eaffffe7 b 1dc0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1e20: e1a01005 mov r1, r5 1e24: e1a03008 mov r3, r8 1e28: e58d4000 str r4, [sp] 1e2c: e1a02007 mov r2, r7 1e30: e59d0018 ldr r0, [sp, #24] 1e34: e1a0e00f mov lr, pc 1e38: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1e3c: e59d3010 ldr r3, [sp, #16] 1e40: e3530000 cmp r3, #0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1e44: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1e48: 0a000004 beq 1e60 1e4c: e593301c ldr r3, [r3, #28] 1e50: e3530000 cmp r3, #0 1e54: 11a00004 movne r0, r4 1e58: 11a0e00f movne lr, pc 1e5c: 112fff13 bxne r3 return result; } 1e60: e1a00005 mov r0, r5 1e64: e28dd01c add sp, sp, #28 1e68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00001e8c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1e8c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1e90: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1e94: e24dd018 sub sp, sp, #24 1e98: e1a06000 mov r6, r0 1e9c: e1a09002 mov r9, r2 1ea0: e1a0b003 mov fp, r3 1ea4: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1ea8: 0a000001 beq 1eb4 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 1eac: e3520001 cmp r2, #1 1eb0: 9a000002 bls 1ec0 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 1eb4: eb002baa bl cd64 <__errno> 1eb8: e3a03016 mov r3, #22 1ebc: ea000014 b 1f14 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 1ec0: e5975024 ldr r5, [r7, #36] ; 0x24 1ec4: e3550000 cmp r5, #0 1ec8: 1a000004 bne 1ee0 errno = ENOTSUP; 1ecc: eb002ba4 bl cd64 <__errno> <== NOT EXECUTED 1ed0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1ed4: e5803000 str r3, [r0] <== NOT EXECUTED 1ed8: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 1edc: ea00006d b 2098 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 1ee0: e3530000 cmp r3, #0 1ee4: 03a0006c moveq r0, #108 ; 0x6c 1ee8: 0a000002 beq 1ef8 size += strlen( device ) + 1; 1eec: e1a00003 mov r0, r3 <== NOT EXECUTED 1ef0: eb002f8c bl dd28 <== NOT EXECUTED 1ef4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 1ef8: ebffff44 bl 1c10 if ( !temp_mt_entry ) { 1efc: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 1f00: e1a04000 mov r4, r0 1f04: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 1f08: 1a000003 bne 1f1c errno = ENOMEM; 1f0c: eb002b94 bl cd64 <__errno> <== NOT EXECUTED 1f10: e3a0300c mov r3, #12 <== NOT EXECUTED 1f14: e5803000 str r3, [r0] 1f18: ea00006a b 20c8 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 1f1c: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 1f20: 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; 1f24: 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; 1f28: 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 ); 1f2c: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 1f30: 11a00003 movne r0, r3 1f34: 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 = 1f38: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 1f3c: 1b002f3d blne dc38 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1f40: e35a0000 cmp sl, #0 1f44: 0a000035 beq 2020 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1f48: e1a0000a mov r0, sl 1f4c: eb002f75 bl dd28 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1f50: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1f54: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1f58: e3a0c001 mov ip, #1 1f5c: e1a0000a mov r0, sl 1f60: e3a02007 mov r2, #7 1f64: e1a03005 mov r3, r5 1f68: e58dc000 str ip, [sp] 1f6c: ebfffe42 bl 187c 1f70: e3700001 cmn r0, #1 1f74: 0a000046 beq 2094 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1f78: e59d3010 ldr r3, [sp, #16] 1f7c: e5933010 ldr r3, [r3, #16] 1f80: e3530000 cmp r3, #0 1f84: 1a000002 bne 1f94 errno = ENOTSUP; 1f88: eb002b75 bl cd64 <__errno> <== NOT EXECUTED 1f8c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f90: ea000006 b 1fb0 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1f94: e1a00005 mov r0, r5 1f98: e1a0e00f mov lr, pc 1f9c: e12fff13 bx r3 1fa0: e3500001 cmp r0, #1 1fa4: 0a000003 beq 1fb8 errno = ENOTDIR; 1fa8: eb002b6d bl cd64 <__errno> 1fac: e3a03014 mov r3, #20 1fb0: e5803000 str r3, [r0] goto cleanup_and_bail; 1fb4: ea000037 b 2098 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 1fb8: e59f2140 ldr r2, [pc, #320] ; 2100 !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 ) 1fbc: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 1fc0: e4923004 ldr r3, [r2], #4 1fc4: ea000003 b 1fd8 !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 ) 1fc8: e593001c ldr r0, [r3, #28] 1fcc: e1500001 cmp r0, r1 1fd0: 0a000003 beq 1fe4 * 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 ) { 1fd4: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1fd8: e1530002 cmp r3, r2 1fdc: 1afffff9 bne 1fc8 1fe0: ea00003b b 20d4 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 1fe4: eb002b5e bl cd64 <__errno> 1fe8: e3a03010 mov r3, #16 1fec: ea000001 b 1ff8 * 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; 1ff0: eb002b5b bl cd64 <__errno> <== NOT EXECUTED 1ff4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1ff8: e5803000 str r3, [r0] 1ffc: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 2000: ea000024 b 2098 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 2004: e1a00004 mov r0, r4 2008: e1a0e00f mov lr, pc 200c: e12fff13 bx r3 2010: e3500000 cmp r0, #0 2014: e28d5004 add r5, sp, #4 2018: 0a000008 beq 2040 201c: ea00001d b 2098 <== 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; 2020: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 2024: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 2028: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 202c: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 2030: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 2034: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 2038: e584a018 str sl, [r4, #24] 203c: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 2040: e1a00004 mov r0, r4 2044: e1a0e00f mov lr, pc 2048: e597f024 ldr pc, [r7, #36] ; 0x24 204c: e2507000 subs r7, r0, #0 2050: 0a000007 beq 2074 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 2054: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2058: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 205c: e3530000 cmp r3, #0 <== NOT EXECUTED 2060: 0a00000c beq 2098 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 2064: e1a00004 mov r0, r4 <== NOT EXECUTED 2068: e1a0e00f mov lr, pc <== NOT EXECUTED 206c: e12fff13 bx r3 <== NOT EXECUTED 2070: ea000008 b 2098 <== 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 ); 2074: e59f0084 ldr r0, [pc, #132] ; 2100 2078: e1a01004 mov r1, r4 207c: eb000cc7 bl 53a0 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 2080: e3560000 cmp r6, #0 2084: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 2088: 15864000 strne r4, [r6] 208c: 11a00007 movne r0, r7 2090: ea00000d b 20cc 2094: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 2098: e1a00008 mov r0, r8 209c: ebfffe29 bl 1948 if ( loc_to_free ) 20a0: e3550000 cmp r5, #0 20a4: 0a000007 beq 20c8 rtems_filesystem_freenode( loc_to_free ); 20a8: e595300c ldr r3, [r5, #12] 20ac: e3530000 cmp r3, #0 20b0: 0a000004 beq 20c8 20b4: e593301c ldr r3, [r3, #28] 20b8: e3530000 cmp r3, #0 20bc: 11a00005 movne r0, r5 20c0: 11a0e00f movne lr, pc 20c4: 112fff13 bxne r3 20c8: e3e00000 mvn r0, #0 return -1; } 20cc: e28dd018 add sp, sp, #24 20d0: 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; 20d4: 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; 20d8: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 20dc: 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 ){ 20e0: 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; 20e4: 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; 20e8: 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 ){ 20ec: 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; 20f0: 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; 20f4: 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 ){ 20f8: 1affffc1 bne 2004 20fc: eaffffbb b 1ff0 <== NOT EXECUTED 00002174 : */ int newlib_free_buffers( FILE *fp ) { 2174: e92d4010 push {r4, lr} 2178: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 217c: eb002bf7 bl d160 2180: e3500002 cmp r0, #2 2184: 8a00000b bhi 21b8 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2188: e1d430bc ldrh r3, [r4, #12] 218c: e3130080 tst r3, #128 ; 0x80 2190: 0a00000a beq 21c0 free( fp->_bf._base ); 2194: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2198: ebfffdea bl 1948 <== NOT EXECUTED fp->_flags &= ~__SMBF; 219c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 21a0: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 21a4: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 21a8: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 21ac: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 21b0: e5843000 str r3, [r4] <== NOT EXECUTED 21b4: ea000001 b 21c0 <== NOT EXECUTED } break; default: fclose(fp); 21b8: e1a00004 mov r0, r4 <== NOT EXECUTED 21bc: eb002b35 bl ce98 <== NOT EXECUTED } return 0; } 21c0: e3a00000 mov r0, #0 21c4: e8bd8010 pop {r4, pc} 000023e8 : int open( const char *pathname, int flags, ... ) { 23e8: e92d000e push {r1, r2, r3} 23ec: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 23f0: e24dd01c sub sp, sp, #28 23f4: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 23f8: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 23fc: e2138001 ands r8, r3, #1 2400: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 2404: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 2408: 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; 240c: 13888002 orrne r8, r8, #2 int open( const char *pathname, int flags, ... ) { 2410: e1a06000 mov r6, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 2414: e58d3018 str r3, [sp, #24] 2418: 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(); 241c: eb001bd2 bl 936c if ( iop == 0 ) { 2420: e2504000 subs r4, r0, #0 2424: 03a05017 moveq r5, #23 2428: 0a000077 beq 260c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 242c: e1a00006 mov r0, r6 2430: eb002e3c bl dd28 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 2434: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 2438: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 243c: e1a02008 mov r2, r8 2440: e1a00006 mov r0, r6 2444: e3a08001 mov r8, #1 2448: e1a03007 mov r3, r7 244c: e58d8000 str r8, [sp] 2450: ebfffd09 bl 187c pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 2454: e3700001 cmn r0, #1 2458: 1a00001f bne 24dc if ( errno != ENOENT ) { 245c: eb002a40 bl cd64 <__errno> 2460: e5903000 ldr r3, [r0] 2464: e3530002 cmp r3, #2 2468: 1a00000a bne 2498 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 246c: e215ac02 ands sl, r5, #512 ; 0x200 2470: 01a0700a moveq r7, sl 2474: 01a05003 moveq r5, r3 2478: 0a000056 beq 25d8 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 247c: e1a00006 mov r0, r6 2480: e3891902 orr r1, r9, #32768 ; 0x8000 2484: e3a02000 mov r2, #0 2488: e3a03000 mov r3, #0 248c: ebfffe21 bl 1d18 if ( rc ) { 2490: e250a000 subs sl, r0, #0 2494: 0a000003 beq 24a8 rc = errno; 2498: eb002a31 bl cd64 <__errno> 249c: e3a07000 mov r7, #0 24a0: e5905000 ldr r5, [r0] goto done; 24a4: ea000049 b 25d0 } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 24a8: e1a00006 mov r0, r6 24ac: eb002e1d bl dd28 24b0: e1a03007 mov r3, r7 24b4: e1a01000 mov r1, r0 24b8: e1a0200a mov r2, sl 24bc: e1a00006 mov r0, r6 24c0: e58d8000 str r8, [sp] 24c4: ebfffcec bl 187c if ( status != 0 ) { /* The file did not exist */ 24c8: e3500000 cmp r0, #0 24cc: 11a0700a movne r7, sl 24d0: 13a0500d movne r5, #13 24d4: 1a00003f bne 25d8 24d8: ea000003 b 24ec rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 24dc: e2053c0a and r3, r5, #2560 ; 0xa00 24e0: e3530c0a cmp r3, #2560 ; 0xa00 24e4: 03a05011 moveq r5, #17 24e8: 0a00003a beq 25d8 * 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; 24ec: e28d701c add r7, sp, #28 24f0: e5373018 ldr r3, [r7, #-24]! 24f4: 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; 24f8: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 24fc: e1a00005 mov r0, r5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 2500: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 2504: e5948014 ldr r8, [r4, #20] 2508: eb001bc4 bl 9420 250c: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 2510: e8b7000f ldm r7!, {r0, r1, r2, r3} 2514: e284c018 add ip, r4, #24 2518: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 251c: 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; 2520: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 2524: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 2528: 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 ); 252c: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 2530: 0a000041 beq 263c 2534: e593c000 ldr ip, [r3] 2538: e35c0000 cmp ip, #0 253c: 0a00003e beq 263c rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 2540: e1a01006 mov r1, r6 2544: e1a03009 mov r3, r9 2548: e1a00004 mov r0, r4 254c: e1a02005 mov r2, r5 2550: e1a0e00f mov lr, pc 2554: e12fff1c bx ip if ( rc ) { 2558: e3500000 cmp r0, #0 255c: 0a000003 beq 2570 rc = errno; 2560: eb0029ff bl cd64 <__errno> 2564: e28d7004 add r7, sp, #4 2568: e5905000 ldr r5, [r0] goto done; 256c: ea000017 b 25d0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 2570: e3150b01 tst r5, #1024 ; 0x400 2574: 0a000028 beq 261c rc = ftruncate( iop - rtems_libio_iops, 0 ); 2578: e59f30c8 ldr r3, [pc, #200] ; 2648 257c: e5930000 ldr r0, [r3] 2580: e0600004 rsb r0, r0, r4 2584: e1a00340 asr r0, r0, #6 2588: e3a01000 mov r1, #0 258c: e3a02000 mov r2, #0 2590: eb001aae bl 9050 if ( rc ) { 2594: e2505000 subs r5, r0, #0 2598: 0a00001f beq 261c if(errno) rc = errno; 259c: eb0029f0 bl cd64 <__errno> <== NOT EXECUTED 25a0: e5903000 ldr r3, [r0] <== NOT EXECUTED 25a4: e3530000 cmp r3, #0 <== NOT EXECUTED 25a8: 0a000001 beq 25b4 <== NOT EXECUTED 25ac: eb0029ec bl cd64 <__errno> <== NOT EXECUTED 25b0: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 25b4: e59f308c ldr r3, [pc, #140] ; 2648 <== NOT EXECUTED 25b8: e5933000 ldr r3, [r3] <== NOT EXECUTED 25bc: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 25c0: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 25c4: eb001a78 bl 8fac <== NOT EXECUTED 25c8: e3a04000 mov r4, #0 <== NOT EXECUTED 25cc: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 25d0: e3550000 cmp r5, #0 25d4: 0a000010 beq 261c if ( iop ) 25d8: e3540000 cmp r4, #0 rtems_libio_free( iop ); 25dc: 11a00004 movne r0, r4 25e0: 1b001b4a blne 9310 if ( loc_to_free ) 25e4: e3570000 cmp r7, #0 25e8: 0a000007 beq 260c rtems_filesystem_freenode( loc_to_free ); 25ec: e597300c ldr r3, [r7, #12] 25f0: e3530000 cmp r3, #0 25f4: 0a000004 beq 260c 25f8: e593301c ldr r3, [r3, #28] 25fc: e3530000 cmp r3, #0 2600: 11a00007 movne r0, r7 2604: 11a0e00f movne lr, pc 2608: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 260c: eb0029d4 bl cd64 <__errno> 2610: e5805000 str r5, [r0] 2614: e3e00000 mvn r0, #0 2618: ea000003 b 262c } return iop - rtems_libio_iops; 261c: e59f3024 ldr r3, [pc, #36] ; 2648 2620: e5930000 ldr r0, [r3] 2624: e0604004 rsb r4, r0, r4 2628: e1a00344 asr r0, r4, #6 } 262c: e28dd01c add sp, sp, #28 2630: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2634: e28dd00c add sp, sp, #12 2638: 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; 263c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 2640: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 2644: eaffffe3 b 25d8 <== NOT EXECUTED 00002384 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 2384: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 2388: 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) { 238c: e59f0048 ldr r0, [pc, #72] ; 23dc 2390: e1a02001 mov r2, r1 2394: eb000013 bl 23e8 2398: e3700001 cmn r0, #1 239c: 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) 23a0: e59f0034 ldr r0, [pc, #52] ; 23dc 23a4: e3a01001 mov r1, #1 23a8: e3a02000 mov r2, #0 23ac: eb00000d bl 23e8 23b0: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 23b4: 059f0024 ldreq r0, [pc, #36] ; 23e0 /* * 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) 23b8: 0a000006 beq 23d8 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 23bc: e59f0018 ldr r0, [pc, #24] ; 23dc 23c0: e3a01001 mov r1, #1 23c4: e3a02000 mov r2, #0 23c8: eb000006 bl 23e8 23cc: e3700001 cmn r0, #1 23d0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 23d4: e59f0008 ldr r0, [pc, #8] ; 23e4 <== NOT EXECUTED 23d8: eb000b36 bl 50b8 <== NOT EXECUTED 00002d10 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2d10: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2d14: e5913034 ldr r3, [r1, #52] ; 0x34 2d18: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2d1c: e1a04001 mov r4, r1 2d20: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2d24: 0a000047 beq 2e48 switch (c) { 2d28: e5dd2000 ldrb r2, [sp] 2d2c: e2421008 sub r1, r2, #8 2d30: e3510005 cmp r1, #5 2d34: 979ff101 ldrls pc, [pc, r1, lsl #2] 2d38: ea00002e b 2df8 2d3c: 00002de4 .word 0x00002de4 <== NOT EXECUTED 2d40: 00002db8 .word 0x00002db8 <== NOT EXECUTED 2d44: 00002d54 .word 0x00002d54 <== NOT EXECUTED 2d48: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d4c: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d50: 00002d80 .word 0x00002d80 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2d54: e3130020 tst r3, #32 tty->column = 0; 2d58: 13a03000 movne r3, #0 2d5c: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 2d60: e5943034 ldr r3, [r4, #52] ; 0x34 2d64: e3130004 tst r3, #4 2d68: 0a000036 beq 2e48 rtems_termios_puts ("\r", 1, tty); 2d6c: e59f00e8 ldr r0, [pc, #232] ; 2e5c 2d70: e3a01001 mov r1, #1 2d74: e1a02004 mov r2, r4 2d78: ebffffa0 bl 2c00 2d7c: ea00000b b 2db0 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2d80: e3130010 tst r3, #16 <== NOT EXECUTED 2d84: 0a000002 beq 2d94 <== NOT EXECUTED 2d88: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2d8c: e3520000 cmp r2, #0 <== NOT EXECUTED 2d90: 0a000030 beq 2e58 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2d94: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 2d98: 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) { 2d9c: 0a000029 beq 2e48 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 2da0: 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'; 2da4: e3a0300a mov r3, #10 <== NOT EXECUTED 2da8: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2dac: 0a000025 beq 2e48 <== NOT EXECUTED tty->column = 0; 2db0: e3a03000 mov r3, #0 2db4: ea000022 b 2e44 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2db8: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2dbc: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2dc0: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2dc4: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 2dc8: e2611008 rsb r1, r1, #8 2dcc: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2dd0: 1a00001b bne 2e44 tty->column += i; 2dd4: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 2dd8: e1a02004 mov r2, r4 2ddc: e59f007c ldr r0, [pc, #124] ; 2e60 2de0: ea00001b b 2e54 } tty->column += i; break; case '\b': if (tty->column > 0) 2de4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2de8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2dec: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 2df0: ca000013 bgt 2e44 <== NOT EXECUTED 2df4: ea000013 b 2e48 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 2df8: e3130002 tst r3, #2 2dfc: 0a000007 beq 2e20 c = toupper(c); 2e00: e59f305c ldr r3, [pc, #92] ; 2e64 <== NOT EXECUTED 2e04: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e08: e0833002 add r3, r3, r2 <== NOT EXECUTED 2e0c: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 2e10: e2033003 and r3, r3, #3 <== NOT EXECUTED 2e14: e3530002 cmp r3, #2 <== NOT EXECUTED 2e18: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 2e1c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 2e20: e59f303c ldr r3, [pc, #60] ; 2e64 2e24: e5932000 ldr r2, [r3] 2e28: e5dd3000 ldrb r3, [sp] 2e2c: e0823003 add r3, r2, r3 2e30: e5d33001 ldrb r3, [r3, #1] 2e34: e3130020 tst r3, #32 2e38: 1a000002 bne 2e48 tty->column++; 2e3c: e5943028 ldr r3, [r4, #40] ; 0x28 2e40: e2833001 add r3, r3, #1 2e44: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2e48: e1a02004 mov r2, r4 2e4c: e1a0000d mov r0, sp 2e50: e3a01001 mov r1, #1 2e54: ebffff69 bl 2c00 } 2e58: e8bd8018 pop {r3, r4, pc} 0000c344 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { c344: e92d4070 push {r4, r5, r6, lr} c348: 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) c34c: e28d5004 add r5, sp, #4 c350: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { c354: 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) c358: e3a01003 mov r1, #3 c35c: e59f0140 ldr r0, [pc, #320] ; c4a4 c360: e3a02007 mov r2, #7 c364: e1a03005 mov r3, r5 c368: e58dc000 str ip, [sp] c36c: ebffd542 bl 187c c370: e3500000 cmp r0, #0 c374: 0a000009 beq c3a0 != 0) { if (errno != ENOENT) c378: eb000279 bl cd64 <__errno> c37c: e5903000 ldr r3, [r0] c380: e3530002 cmp r3, #2 c384: 1a000043 bne c498 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) c388: e59f0114 ldr r0, [pc, #276] ; c4a4 c38c: e59f1114 ldr r1, [pc, #276] ; c4a8 c390: ebffd65c bl 1d08 c394: e3500000 cmp r0, #0 c398: 0a000008 beq c3c0 c39c: ea00003d b c498 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); c3a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED c3a4: e3530000 cmp r3, #0 <== NOT EXECUTED c3a8: 0a000004 beq c3c0 <== NOT EXECUTED c3ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c3b0: e3530000 cmp r3, #0 <== NOT EXECUTED c3b4: 11a00005 movne r0, r5 <== NOT EXECUTED c3b8: 11a0e00f movne lr, pc <== NOT EXECUTED c3bc: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); c3c0: e28d5018 add r5, sp, #24 c3c4: e59f10e0 ldr r1, [pc, #224] ; c4ac c3c8: e3a0200a mov r2, #10 c3cc: e1a00005 mov r0, r5 c3d0: eb000471 bl d59c sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); c3d4: e59f30d4 ldr r3, [pc, #212] ; c4b0 c3d8: e1d3c0b0 ldrh ip, [r3] c3dc: e1a0200c mov r2, ip c3e0: e28cc001 add ip, ip, #1 c3e4: e59f10c8 ldr r1, [pc, #200] ; c4b4 c3e8: e1c3c0b0 strh ip, [r3] c3ec: e285000a add r0, r5, #10 c3f0: eb00050f bl d834 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { c3f4: e1a00005 mov r0, r5 c3f8: e3a01d06 mov r1, #384 ; 0x180 c3fc: eb00003f bl c500 c400: e2506000 subs r6, r0, #0 c404: 0a000001 beq c410 if (errno != EEXIST){ c408: eb000255 bl cd64 <__errno> <== NOT EXECUTED c40c: ea000021 b c498 <== 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); c410: e1a00005 mov r0, r5 c414: e3a01901 mov r1, #16384 ; 0x4000 c418: ebffd7f2 bl 23e8 if (filsdes[0] < 0) { c41c: 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); c420: e5840000 str r0, [r4] if (filsdes[0] < 0) { c424: aa000003 bge c438 err = errno; c428: eb00024d bl cd64 <__errno> c42c: 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); c430: e1a00005 mov r0, r5 c434: ea000014 b c48c } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); c438: e59f3078 ldr r3, [pc, #120] ; c4b8 <== NOT EXECUTED c43c: e5933000 ldr r3, [r3] <== NOT EXECUTED c440: e1500003 cmp r0, r3 <== NOT EXECUTED c444: 359f3070 ldrcc r3, [pc, #112] ; c4bc <== NOT EXECUTED c448: 35936000 ldrcc r6, [r3] <== NOT EXECUTED c44c: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; c450: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED c454: e3c33001 bic r3, r3, #1 <== NOT EXECUTED c458: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); c45c: e28d0018 add r0, sp, #24 <== NOT EXECUTED c460: e3a01001 mov r1, #1 <== NOT EXECUTED c464: ebffd7df bl 23e8 <== NOT EXECUTED if (filsdes[1] < 0) { c468: 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); c46c: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { c470: a3a06000 movge r6, #0 <== NOT EXECUTED c474: aa000003 bge c488 <== NOT EXECUTED err = errno; c478: eb000239 bl cd64 <__errno> <== NOT EXECUTED c47c: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); c480: e5940000 ldr r0, [r4] <== NOT EXECUTED c484: ebfff2c8 bl 8fac <== NOT EXECUTED } unlink(fifopath); c488: e28d0018 add r0, sp, #24 <== NOT EXECUTED c48c: eb00001f bl c510 } rtems_set_errno_and_return_minus_one(err); c490: eb000233 bl cd64 <__errno> c494: e5806000 str r6, [r0] } c498: e3e00000 mvn r0, #0 c49c: e28dd028 add sp, sp, #40 ; 0x28 c4a0: e8bd8070 pop {r4, r5, r6, pc} 0000b0f8 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { b0f8: e92d4010 push {r4, lr} <== NOT EXECUTED b0fc: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); b100: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED b104: eb0002fa bl bcf4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); b108: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b10c: eb0002f8 bl bcf4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); b110: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b114: ebffe62c bl 49cc <== NOT EXECUTED free(pipe->Buffer); b118: e5940000 ldr r0, [r4] <== NOT EXECUTED b11c: ebffda09 bl 1948 <== NOT EXECUTED free(pipe); b120: e1a00004 mov r0, r4 <== NOT EXECUTED } b124: 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); b128: eaffda06 b 1948 <== NOT EXECUTED 0000ad84 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { ad84: e59f3054 ldr r3, [pc, #84] ; ade0 <== NOT EXECUTED ad88: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ad8c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED ad90: e1a04000 mov r4, r0 <== NOT EXECUTED ad94: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { ad98: 13e00015 mvnne r0, #21 <== NOT EXECUTED ad9c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) ada0: e3520000 cmp r2, #0 <== NOT EXECUTED ada4: 03e0000d mvneq r0, #13 <== NOT EXECUTED ada8: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) adac: e3a01000 mov r1, #0 <== NOT EXECUTED adb0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED adb4: e1a02001 mov r2, r1 <== NOT EXECUTED adb8: ebffe72a bl 4a68 <== NOT EXECUTED adbc: e2506000 subs r6, r0, #0 <== NOT EXECUTED adc0: 13e00003 mvnne r0, #3 <== NOT EXECUTED adc4: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; adc8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); adcc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; add0: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); add4: ebffe769 bl 4b80 <== NOT EXECUTED add8: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } addc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 0000ad1c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } ad1c: e3e0001c mvn r0, #28 <== NOT EXECUTED ad20: e12fff1e bx lr <== NOT EXECUTED 0000ade4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ade4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED ade8: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) adec: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { adf0: e1a04000 mov r4, r0 <== NOT EXECUTED adf4: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) adf8: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED adfc: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ae00: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ae04: ebffe717 bl 4a68 <== NOT EXECUTED ae08: e2506000 subs r6, r0, #0 <== NOT EXECUTED ae0c: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ae10: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ae14: 0a000045 beq af30 <== NOT EXECUTED ae18: ea00004b b af4c <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ae1c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED ae20: e3530000 cmp r3, #0 <== NOT EXECUTED ae24: 0a000043 beq af38 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ae28: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED ae2c: e2177001 ands r7, r7, #1 <== NOT EXECUTED ae30: 13e0700a mvnne r7, #10 <== NOT EXECUTED ae34: 1a000040 bne af3c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ae38: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED ae3c: e2833001 add r3, r3, #1 <== NOT EXECUTED ae40: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); ae44: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ae48: ebffe74c bl 4b80 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) ae4c: e1a01007 mov r1, r7 <== NOT EXECUTED ae50: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED ae54: eb0003d4 bl bdac <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ae58: e1a01007 mov r1, r7 <== NOT EXECUTED ae5c: 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)) ae60: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ae64: 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)) ae68: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ae6c: ebffe6fd bl 4a68 <== NOT EXECUTED ae70: e3500000 cmp r0, #0 <== NOT EXECUTED ae74: 13e07003 mvnne r7, #3 <== NOT EXECUTED ae78: 1a000031 bne af44 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ae7c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) ae80: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ae84: e2433001 sub r3, r3, #1 <== NOT EXECUTED ae88: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) ae8c: 1a00002a bne af3c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ae90: e594200c ldr r2, [r4, #12] <== NOT EXECUTED ae94: e3520000 cmp r2, #0 <== NOT EXECUTED ae98: 0affffdf beq ae1c <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; ae9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED aea0: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); aea4: e0667005 rsb r7, r6, r5 <== NOT EXECUTED aea8: e1520007 cmp r2, r7 <== NOT EXECUTED aeac: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; aeb0: e0638008 rsb r8, r3, r8 <== NOT EXECUTED aeb4: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { aeb8: e1570008 cmp r7, r8 <== NOT EXECUTED aebc: 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); aec0: d0811003 addle r1, r1, r3 <== NOT EXECUTED aec4: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { aec8: da000006 ble aee8 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); aecc: e0811003 add r1, r1, r3 <== NOT EXECUTED aed0: e1a02008 mov r2, r8 <== NOT EXECUTED aed4: eb0009b0 bl d59c <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); aed8: e0860008 add r0, r6, r8 <== NOT EXECUTED aedc: e5941000 ldr r1, [r4] <== NOT EXECUTED aee0: e0890000 add r0, r9, r0 <== NOT EXECUTED aee4: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); aee8: eb0009ab bl d59c <== NOT EXECUTED pipe->Start += chunk; aeec: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED aef0: e0870000 add r0, r7, r0 <== NOT EXECUTED aef4: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; aef8: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED aefc: eb002daf bl 165c0 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; af00: e594300c ldr r3, [r4, #12] <== NOT EXECUTED af04: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) af08: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; af0c: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; af10: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; af14: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) af18: e594301c ldr r3, [r4, #28] <== NOT EXECUTED af1c: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); af20: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED af24: 11a0100d movne r1, sp <== NOT EXECUTED af28: 1b000389 blne bd54 <== NOT EXECUTED read += chunk; af2c: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { af30: e1560005 cmp r6, r5 <== NOT EXECUTED af34: 3affffd5 bcc ae90 <== NOT EXECUTED af38: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); af3c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED af40: ebffe70e bl 4b80 <== NOT EXECUTED out_nolock: if (read > 0) af44: e3560000 cmp r6, #0 <== NOT EXECUTED af48: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } af4c: e1a00006 mov r0, r6 <== NOT EXECUTED af50: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000b12c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b12c: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; b130: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b134: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, b138: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { b13c: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, b140: e1a02001 mov r2, r1 <== NOT EXECUTED b144: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b148: ebffe646 bl 4a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) b14c: e3500000 cmp r0, #0 <== NOT EXECUTED b150: 1a000010 bne b198 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); b154: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) b158: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; b15c: 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); b160: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; b164: 12433001 subne r3, r3, #1 <== NOT EXECUTED b168: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) b16c: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; b170: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED b174: 12433001 subne r3, r3, #1 <== NOT EXECUTED b178: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, b17c: e59f30a0 ldr r3, [pc, #160] ; b224 <== NOT EXECUTED b180: e3a01000 mov r1, #0 <== NOT EXECUTED b184: e5930000 ldr r0, [r3] <== NOT EXECUTED b188: e1a02001 mov r2, r1 <== NOT EXECUTED b18c: ebffe635 bl 4a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) b190: e3500000 cmp r0, #0 <== NOT EXECUTED b194: 0a000000 beq b19c <== NOT EXECUTED rtems_fatal_error_occurred(sc); b198: ebffe7c6 bl 50b8 <== NOT EXECUTED PIPE_UNLOCK(pipe); b19c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b1a0: ebffe676 bl 4b80 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { b1a4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b1a8: e3530000 cmp r3, #0 <== NOT EXECUTED b1ac: 1a000006 bne b1cc <== NOT EXECUTED b1b0: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED b1b4: e3570000 cmp r7, #0 <== NOT EXECUTED b1b8: 1a000003 bne b1cc <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); b1bc: e1a00004 mov r0, r4 <== NOT EXECUTED b1c0: ebffffcc bl b0f8 <== NOT EXECUTED *pipep = NULL; b1c4: 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) { b1c8: ea000010 b b210 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) b1cc: e2552004 subs r2, r5, #4 <== NOT EXECUTED b1d0: 13a02001 movne r2, #1 <== NOT EXECUTED b1d4: e3530000 cmp r3, #0 <== NOT EXECUTED b1d8: 13a02000 movne r2, #0 <== NOT EXECUTED b1dc: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); b1e0: 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) b1e4: 1a000007 bne b208 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) b1e8: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED b1ec: e2553002 subs r3, r5, #2 <== NOT EXECUTED b1f0: 13a03001 movne r3, #1 <== NOT EXECUTED b1f4: e3520000 cmp r2, #0 <== NOT EXECUTED b1f8: 13a03000 movne r3, #0 <== NOT EXECUTED b1fc: e3530000 cmp r3, #0 <== NOT EXECUTED b200: 0a000002 beq b210 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b204: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b208: e1a0100d mov r1, sp <== NOT EXECUTED b20c: eb0002d0 bl bd54 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); b210: e59f300c ldr r3, [pc, #12] ; b224 <== NOT EXECUTED b214: e5930000 ldr r0, [r3] <== NOT EXECUTED b218: ebffe658 bl 4b80 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } b21c: e3a00000 mov r0, #0 <== NOT EXECUTED b220: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED 0000af54 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { af54: 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) af58: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { af5c: e1a04000 mov r4, r0 <== NOT EXECUTED af60: e1a0b001 mov fp, r1 <== NOT EXECUTED af64: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) af68: 01a06005 moveq r6, r5 <== NOT EXECUTED af6c: 0a00005f beq b0f0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) af70: e3a01000 mov r1, #0 <== NOT EXECUTED af74: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED af78: e1a02001 mov r2, r1 <== NOT EXECUTED af7c: ebffe6b9 bl 4a68 <== NOT EXECUTED af80: e3500000 cmp r0, #0 <== NOT EXECUTED af84: 13e06003 mvnne r6, #3 <== NOT EXECUTED af88: 1a000058 bne b0f0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { af8c: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED af90: e3560000 cmp r6, #0 <== NOT EXECUTED af94: 0a000022 beq b024 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; af98: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED af9c: e1550009 cmp r5, r9 <== NOT EXECUTED afa0: 91a09005 movls r9, r5 <== NOT EXECUTED afa4: 83a09001 movhi r9, #1 <== NOT EXECUTED afa8: e1a06000 mov r6, r0 <== NOT EXECUTED afac: ea000043 b b0c0 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { afb0: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED afb4: e2177001 ands r7, r7, #1 <== NOT EXECUTED afb8: 13e0700a mvnne r7, #10 <== NOT EXECUTED afbc: 1a000042 bne b0cc <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; afc0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED afc4: e2833001 add r3, r3, #1 <== NOT EXECUTED afc8: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); afcc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afd0: ebffe6ea bl 4b80 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) afd4: e1a01007 mov r1, r7 <== NOT EXECUTED afd8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED afdc: eb000372 bl bdac <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { afe0: e1a01007 mov r1, r7 <== NOT EXECUTED afe4: 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)) afe8: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { afec: 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)) aff0: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { aff4: ebffe69b bl 4a68 <== NOT EXECUTED aff8: e3500000 cmp r0, #0 <== NOT EXECUTED affc: 13e07003 mvnne r7, #3 <== NOT EXECUTED b000: 1a000038 bne b0e8 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b004: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) b008: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b00c: e2433001 sub r3, r3, #1 <== NOT EXECUTED b010: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) b014: 1a00002c bne b0cc <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { b018: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b01c: e3530000 cmp r3, #0 <== NOT EXECUTED b020: 1a000001 bne b02c <== NOT EXECUTED b024: e3e0701f mvn r7, #31 <== NOT EXECUTED b028: ea000027 b b0cc <== 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) { b02c: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED b030: e594200c ldr r2, [r4, #12] <== NOT EXECUTED b034: e062300a rsb r3, r2, sl <== NOT EXECUTED b038: e1530009 cmp r3, r9 <== NOT EXECUTED b03c: 3affffdb bcc afb0 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); b040: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED b044: e1a0100a mov r1, sl <== NOT EXECUTED b048: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); b04c: e0667005 rsb r7, r6, r5 <== NOT EXECUTED b050: e1530007 cmp r3, r7 <== NOT EXECUTED b054: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); b058: eb002d58 bl 165c0 <__umodsi3> <== NOT EXECUTED b05c: e5943000 ldr r3, [r4] <== NOT EXECUTED b060: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { b064: e157000a cmp r7, sl <== NOT EXECUTED b068: 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); b06c: d0830000 addle r0, r3, r0 <== NOT EXECUTED b070: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { b074: da000006 ble b094 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); b078: e1a0200a mov r2, sl <== NOT EXECUTED b07c: e0830000 add r0, r3, r0 <== NOT EXECUTED b080: eb000945 bl d59c <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); b084: e08a1006 add r1, sl, r6 <== NOT EXECUTED b088: e5940000 ldr r0, [r4] <== NOT EXECUTED b08c: e08b1001 add r1, fp, r1 <== NOT EXECUTED b090: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); b094: eb000940 bl d59c <== NOT EXECUTED pipe->Length += chunk; b098: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) b09c: 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; b0a0: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) b0a4: 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; b0a8: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); b0ac: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED b0b0: 11a0100d movne r1, sp <== NOT EXECUTED b0b4: 1b000326 blne bd54 <== NOT EXECUTED written += chunk; b0b8: e0866007 add r6, r6, r7 <== NOT EXECUTED b0bc: 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) { b0c0: e1560005 cmp r6, r5 <== NOT EXECUTED b0c4: 3affffd8 bcc b02c <== NOT EXECUTED b0c8: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); b0cc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b0d0: ebffe6aa bl 4b80 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) b0d4: e3770020 cmn r7, #32 <== NOT EXECUTED b0d8: 1a000002 bne b0e8 <== NOT EXECUTED kill(getpid(), SIGPIPE); b0dc: eb0001fe bl b8dc <== NOT EXECUTED b0e0: e3a0100d mov r1, #13 <== NOT EXECUTED b0e4: eb000240 bl b9ec <== NOT EXECUTED #endif if (written > 0) b0e8: e3560000 cmp r6, #0 <== NOT EXECUTED b0ec: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } b0f0: e1a00006 mov r0, r6 <== NOT EXECUTED b0f4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00017f0c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17f0c: e59f30b0 ldr r3, [pc, #176] ; 17fc4 17f10: e5933000 ldr r3, [r3] 17f14: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 17f18: e92d4070 push {r4, r5, r6, lr} 17f1c: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17f20: 2a000005 bcs 17f3c iop = rtems_libio_iop( fd ); 17f24: e59f309c ldr r3, [pc, #156] ; 17fc8 17f28: e5934000 ldr r4, [r3] 17f2c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17f30: e5943014 ldr r3, [r4, #20] 17f34: e3130c01 tst r3, #256 ; 0x100 17f38: 1a000002 bne 17f48 17f3c: ebffd388 bl cd64 <__errno> 17f40: e3a03009 mov r3, #9 17f44: ea00000f b 17f88 rtems_libio_check_buffer( buffer ); 17f48: e3510000 cmp r1, #0 17f4c: 0a000004 beq 17f64 rtems_libio_check_count( count ); 17f50: e3520000 cmp r2, #0 17f54: 01a00002 moveq r0, r2 17f58: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17f5c: e3130002 tst r3, #2 17f60: 1a000002 bne 17f70 17f64: ebffd37e bl cd64 <__errno> <== NOT EXECUTED 17f68: e3a03016 mov r3, #22 <== NOT EXECUTED 17f6c: ea000005 b 17f88 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 17f70: e594303c ldr r3, [r4, #60] ; 0x3c 17f74: e5933008 ldr r3, [r3, #8] 17f78: e3530000 cmp r3, #0 17f7c: 1a000004 bne 17f94 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17f80: ebffd377 bl cd64 <__errno> <== NOT EXECUTED 17f84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17f88: e5803000 str r3, [r0] 17f8c: e3e00000 mvn r0, #0 17f90: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 17f94: e1a00004 mov r0, r4 17f98: e1a0e00f mov lr, pc 17f9c: e12fff13 bx r3 if ( rc > 0 ) 17fa0: e3500000 cmp r0, #0 17fa4: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 17fa8: e284600c add r6, r4, #12 17fac: e8960060 ldm r6, {r5, r6} 17fb0: e0952000 adds r2, r5, r0 17fb4: e0a63fc0 adc r3, r6, r0, asr #31 17fb8: e584200c str r2, [r4, #12] 17fbc: e5843010 str r3, [r4, #16] return rc; } 17fc0: e8bd8070 pop {r4, r5, r6, pc} 0002353c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 2353c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 23540: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 23544: e24dd018 sub sp, sp, #24 23548: e1a05002 mov r5, r2 2354c: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 23550: 1a000002 bne 23560 rtems_set_errno_and_return_minus_one( EFAULT ); 23554: eb005807 bl 39578 <__errno> <== NOT EXECUTED 23558: e3a0300e mov r3, #14 <== NOT EXECUTED 2355c: ea000028 b 23604 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 23560: eb00728f bl 3ffa4 23564: e28d4004 add r4, sp, #4 23568: e3a0c000 mov ip, #0 2356c: e1a01000 mov r1, r0 23570: e1a0200c mov r2, ip 23574: e1a00007 mov r0, r7 23578: e1a03004 mov r3, r4 2357c: e58dc000 str ip, [sp] 23580: ebff847b bl 4774 0, &loc, false ); if ( result != 0 ) 23584: e3500000 cmp r0, #0 23588: 1a00001e bne 23608 return -1; if ( !loc.ops->node_type_h ){ 2358c: e59d2010 ldr r2, [sp, #16] 23590: e5923010 ldr r3, [r2, #16] 23594: e3530000 cmp r3, #0 23598: 0a000012 beq 235e8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 2359c: e1a00004 mov r0, r4 235a0: e1a0e00f mov lr, pc 235a4: e12fff13 bx r3 235a8: e3500004 cmp r0, #4 235ac: e59d2010 ldr r2, [sp, #16] 235b0: 0a000009 beq 235dc rtems_filesystem_freenode( &loc ); 235b4: e3520000 cmp r2, #0 235b8: 0a000004 beq 235d0 235bc: e592301c ldr r3, [r2, #28] 235c0: e3530000 cmp r3, #0 235c4: 11a00004 movne r0, r4 235c8: 11a0e00f movne lr, pc 235cc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 235d0: eb0057e8 bl 39578 <__errno> 235d4: e3a03016 mov r3, #22 235d8: ea000009 b 23604 } if ( !loc.ops->readlink_h ){ 235dc: e592303c ldr r3, [r2, #60] ; 0x3c 235e0: e3530000 cmp r3, #0 235e4: 1a000009 bne 23610 rtems_filesystem_freenode( &loc ); 235e8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 235ec: e3530000 cmp r3, #0 <== NOT EXECUTED 235f0: 11a00004 movne r0, r4 <== NOT EXECUTED 235f4: 11a0e00f movne lr, pc <== NOT EXECUTED 235f8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 235fc: eb0057dd bl 39578 <__errno> <== NOT EXECUTED 23600: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23604: e5803000 str r3, [r0] 23608: e3e05000 mvn r5, #0 2360c: ea00000d b 23648 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 23610: e1a02005 mov r2, r5 23614: e1a01006 mov r1, r6 23618: e1a00004 mov r0, r4 2361c: e1a0e00f mov lr, pc 23620: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23624: e59d3010 ldr r3, [sp, #16] 23628: e3530000 cmp r3, #0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 2362c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 23630: 0a000004 beq 23648 23634: e593301c ldr r3, [r3, #28] 23638: e3530000 cmp r3, #0 2363c: 11a00004 movne r0, r4 23640: 11a0e00f movne lr, pc 23644: 112fff13 bxne r3 return result; } 23648: e1a00005 mov r0, r5 2364c: e28dd018 add sp, sp, #24 23650: e8bd80f0 pop {r4, r5, r6, r7, pc} 00003924 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3924: e59f3144 ldr r3, [pc, #324] ; 3a70 3928: e5933000 ldr r3, [r3] 392c: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 3930: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3934: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3938: 2a000005 bcs 3954 iop = rtems_libio_iop( fd ); 393c: e59f3130 ldr r3, [pc, #304] ; 3a74 3940: e5936000 ldr r6, [r3] 3944: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3948: e5963014 ldr r3, [r6, #20] 394c: e3130c01 tst r3, #256 ; 0x100 3950: 1a000002 bne 3960 3954: eb002e30 bl f21c <__errno> <== NOT EXECUTED 3958: e3a03009 mov r3, #9 <== NOT EXECUTED 395c: ea00001d b 39d8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3960: e3130002 tst r3, #2 3964: 0a000019 beq 39d0 /* * Argument validation on IO vector */ if ( !iov ) 3968: e3510000 cmp r1, #0 396c: 0a000017 beq 39d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3970: e3520000 cmp r2, #0 3974: da000015 ble 39d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3978: e3520b01 cmp r2, #1024 ; 0x400 397c: ca000013 bgt 39d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 3980: e596303c ldr r3, [r6, #60] ; 0x3c 3984: e5933008 ldr r3, [r3, #8] 3988: e3530000 cmp r3, #0 398c: 1a000002 bne 399c rtems_set_errno_and_return_minus_one( ENOTSUP ); 3990: eb002e21 bl f21c <__errno> <== NOT EXECUTED 3994: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3998: ea00000e b 39d8 <== NOT EXECUTED 399c: e3a03000 mov r3, #0 39a0: e1a05001 mov r5, r1 39a4: e1a02001 mov r2, r1 39a8: e3a07001 mov r7, #1 39ac: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 39b0: e5920000 ldr r0, [r2] 39b4: e3500000 cmp r0, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 39b8: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 39bc: 0a000003 beq 39d0 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 39c0: e592c004 ldr ip, [r2, #4] 39c4: e081000c add r0, r1, ip if ( total < old ) 39c8: e1500001 cmp r0, r1 39cc: aa000003 bge 39e0 rtems_set_errno_and_return_minus_one( EINVAL ); 39d0: eb002e11 bl f21c <__errno> 39d4: e3a03016 mov r3, #22 39d8: e5803000 str r3, [r0] 39dc: ea000011 b 3a28 if ( iov[v].iov_len ) 39e0: e35c0000 cmp ip, #0 39e4: 13a07000 movne r7, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 39e8: e1530008 cmp r3, r8 39ec: e2822008 add r2, r2, #8 39f0: b1a01000 movlt r1, r0 39f4: baffffed blt 39b0 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 39f8: e3570000 cmp r7, #0 39fc: 13a04000 movne r4, #0 3a00: 1a000018 bne 3a68 3a04: 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 ); 3a08: e8950006 ldm r5, {r1, r2} 3a0c: e596303c ldr r3, [r6, #60] ; 0x3c 3a10: e1a00006 mov r0, r6 3a14: e1a0e00f mov lr, pc 3a18: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 3a1c: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3a20: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3a24: aa000001 bge 3a30 3a28: e3e04000 mvn r4, #0 3a2c: ea00000d b 3a68 return -1; if ( bytes > 0 ) { 3a30: 0a000006 beq 3a50 iop->offset += bytes; 3a34: e286c00c add ip, r6, #12 3a38: e89c1800 ldm ip, {fp, ip} 3a3c: e09b2000 adds r2, fp, r0 3a40: e0ac3fc0 adc r3, ip, r0, asr #31 3a44: e586200c str r2, [r6, #12] 3a48: e5863010 str r3, [r6, #16] total += bytes; 3a4c: e0844000 add r4, r4, r0 } if (bytes != iov[ v ].iov_len) 3a50: e5953004 ldr r3, [r5, #4] 3a54: e1500003 cmp r0, r3 3a58: 1a000002 bne 3a68 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3a5c: e1570008 cmp r7, r8 3a60: e2855008 add r5, r5, #8 3a64: baffffe7 blt 3a08 if (bytes != iov[ v ].iov_len) break; } return total; } 3a68: e1a00004 mov r0, r4 3a6c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 00018024 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 18024: e59f310c ldr r3, [pc, #268] ; 18138 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 18028: e59f210c ldr r2, [pc, #268] ; 1813c 1802c: e592c000 ldr ip, [r2] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 18030: 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())) { 18034: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 18038: e2822001 add r2, r2, #1 1803c: e92d40f1 push {r0, r4, r5, r6, r7, lr} 18040: e5832010 str r2, [r3, #16] 18044: e1a04000 mov r4, r0 18048: 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())) { 1804c: 1a000007 bne 18070 if (_Thread_Dispatch_disable_level > 0) 18050: e59f30e8 ldr r3, [pc, #232] ; 18140 18054: e5933000 ldr r3, [r3] 18058: e3530000 cmp r3, #0 1805c: 1a000032 bne 1812c return (void *) 0; if (_ISR_Nest_level > 0) 18060: e59f30dc ldr r3, [pc, #220] ; 18144 18064: e5933000 ldr r3, [r3] 18068: e3530000 cmp r3, #0 1806c: 1a00002e bne 1812c } /* * Continue with realloc(). */ if ( !ptr ) 18070: e3540000 cmp r4, #0 18074: 1a000003 bne 18088 return malloc( size ); 18078: e1a00005 mov r0, r5 1807c: ebffa6e3 bl 1c10 18080: e1a04000 mov r4, r0 18084: ea000029 b 18130 if ( !size ) { 18088: e3550000 cmp r5, #0 1808c: 1a000003 bne 180a0 free( ptr ); 18090: e1a00004 mov r0, r4 <== NOT EXECUTED 18094: ebffa62b bl 1948 <== NOT EXECUTED 18098: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 1809c: ea000023 b 18130 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 180a0: e59f60a0 ldr r6, [pc, #160] ; 18148 180a4: e1a01004 mov r1, r4 180a8: e5960000 ldr r0, [r6] 180ac: e1a0200d mov r2, sp 180b0: eb000055 bl 1820c <_Protected_heap_Get_block_size> 180b4: e2507000 subs r7, r0, #0 180b8: 1a000004 bne 180d0 errno = EINVAL; 180bc: ebffd328 bl cd64 <__errno> 180c0: e3a03016 mov r3, #22 180c4: e5803000 str r3, [r0] 180c8: e1a04007 mov r4, r7 return (void *) 0; 180cc: ea000017 b 18130 #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 ) ) { 180d0: e5960000 ldr r0, [r6] 180d4: e1a01004 mov r1, r4 180d8: e1a02005 mov r2, r5 180dc: eb00005b bl 18250 <_Protected_heap_Resize_block> 180e0: e3500000 cmp r0, #0 180e4: 1a000011 bne 18130 * 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 ); 180e8: e1a00005 mov r0, r5 180ec: ebffa6c7 bl 1c10 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 180f0: e59f3040 ldr r3, [pc, #64] ; 18138 180f4: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 180f8: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 180fc: e2422001 sub r2, r2, #1 18100: e5832004 str r2, [r3, #4] if ( !new_area ) { 18104: 0a000008 beq 1812c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 18108: e59d2000 ldr r2, [sp] 1810c: e1a01004 mov r1, r4 18110: e1550002 cmp r5, r2 18114: 31a02005 movcc r2, r5 18118: ebffd51f bl d59c free( ptr ); 1811c: e1a00004 mov r0, r4 18120: ebffa608 bl 1948 18124: e1a04006 mov r4, r6 return new_area; 18128: ea000000 b 18130 1812c: e3a04000 mov r4, #0 } 18130: e1a00004 mov r0, r4 18134: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00023654 : #include int rmdir( const char *pathname ) { 23654: e92d4070 push {r4, r5, r6, lr} 23658: e24dd02c sub sp, sp, #44 ; 0x2c 2365c: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 23660: ebff83fb bl 4654 if ( parentpathlen == 0 ) 23664: e2505000 subs r5, r0, #0 23668: 1a000019 bne 236d4 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 2366c: e5d63000 ldrb r3, [r6] 23670: e353002f cmp r3, #47 ; 0x2f 23674: 1353005c cmpne r3, #92 ; 0x5c 23678: 0a000001 beq 23684 2367c: e3530000 cmp r3, #0 <== NOT EXECUTED 23680: 1a000009 bne 236ac <== NOT EXECUTED 23684: e59f325c ldr r3, [pc, #604] ; 238e8 23688: e593e000 ldr lr, [r3] 2368c: e28ee018 add lr, lr, #24 23690: e8be000f ldm lr!, {r0, r1, r2, r3} 23694: e28dc018 add ip, sp, #24 23698: e8ac000f stmia ip!, {r0, r1, r2, r3} 2369c: e59e3000 ldr r3, [lr] 236a0: e3a04000 mov r4, #0 236a4: e58c3000 str r3, [ip] 236a8: ea000013 b 236fc 236ac: e59f3234 ldr r3, [pc, #564] ; 238e8 <== NOT EXECUTED 236b0: e593e000 ldr lr, [r3] <== NOT EXECUTED 236b4: e28ee004 add lr, lr, #4 <== NOT EXECUTED 236b8: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 236bc: e28dc018 add ip, sp, #24 <== NOT EXECUTED 236c0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 236c4: e59e3000 ldr r3, [lr] <== NOT EXECUTED 236c8: e1a04005 mov r4, r5 <== NOT EXECUTED 236cc: e58c3000 str r3, [ip] <== NOT EXECUTED 236d0: ea000009 b 236fc <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 236d4: e3a0c000 mov ip, #0 236d8: e1a00006 mov r0, r6 236dc: e1a01005 mov r1, r5 236e0: e3a02002 mov r2, #2 236e4: e28d3018 add r3, sp, #24 236e8: e58dc000 str ip, [sp] 236ec: ebff8420 bl 4774 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 236f0: e3500000 cmp r0, #0 236f4: 1a000077 bne 238d8 236f8: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 236fc: e28de018 add lr, sp, #24 23700: e8be000f ldm lr!, {r0, r1, r2, r3} 23704: e28dc004 add ip, sp, #4 23708: e8ac000f stmia ip!, {r0, r1, r2, r3} 2370c: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 23710: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 23714: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 23718: e1a00005 mov r0, r5 2371c: eb007220 bl 3ffa4 23720: e1a01000 mov r1, r0 23724: e1a00005 mov r0, r5 23728: ebff83bd bl 4624 2372c: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 23730: e1a00006 mov r0, r6 23734: eb00721a bl 3ffa4 23738: e28d5004 add r5, sp, #4 2373c: e3a0c000 mov ip, #0 23740: e1a01000 mov r1, r0 23744: e1a0200c mov r2, ip 23748: e1a00006 mov r0, r6 2374c: e1a03005 mov r3, r5 23750: e58dc000 str ip, [sp] 23754: ebff83ce bl 4694 0, &loc, false ); if ( result != 0 ) { 23758: e3500000 cmp r0, #0 2375c: 0a00000b beq 23790 if ( free_parentloc ) 23760: e3540000 cmp r4, #0 23764: 0a00005b beq 238d8 rtems_filesystem_freenode( &parentloc ); 23768: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 2376c: e3530000 cmp r3, #0 <== NOT EXECUTED 23770: 0a000058 beq 238d8 <== NOT EXECUTED 23774: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23778: e3530000 cmp r3, #0 <== NOT EXECUTED 2377c: 0a000055 beq 238d8 <== NOT EXECUTED 23780: e28d0018 add r0, sp, #24 <== NOT EXECUTED 23784: e1a0e00f mov lr, pc <== NOT EXECUTED 23788: e12fff13 bx r3 <== NOT EXECUTED 2378c: ea000051 b 238d8 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 23790: e59d2010 ldr r2, [sp, #16] 23794: e5923010 ldr r3, [r2, #16] 23798: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 2379c: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 237a0: 0a000021 beq 2382c 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 ){ 237a4: e1a00005 mov r0, r5 237a8: e1a0e00f mov lr, pc 237ac: e12fff13 bx r3 237b0: e3500001 cmp r0, #1 237b4: 0a000014 beq 2380c rtems_filesystem_freenode( &loc ); 237b8: e59d3010 ldr r3, [sp, #16] 237bc: e3530000 cmp r3, #0 237c0: 0a000004 beq 237d8 237c4: e593301c ldr r3, [r3, #28] 237c8: e3530000 cmp r3, #0 237cc: 11a00005 movne r0, r5 237d0: 11a0e00f movne lr, pc 237d4: 112fff13 bxne r3 if ( free_parentloc ) 237d8: e3540000 cmp r4, #0 237dc: 0a000007 beq 23800 rtems_filesystem_freenode( &parentloc ); 237e0: e59d3024 ldr r3, [sp, #36] ; 0x24 237e4: e3530000 cmp r3, #0 237e8: 0a000004 beq 23800 237ec: e593301c ldr r3, [r3, #28] 237f0: e3530000 cmp r3, #0 237f4: 128d0018 addne r0, sp, #24 237f8: 11a0e00f movne lr, pc 237fc: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 23800: eb00575c bl 39578 <__errno> 23804: e3a03014 mov r3, #20 23808: ea000017 b 2386c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 2380c: e59d300c ldr r3, [sp, #12] 23810: e5933034 ldr r3, [r3, #52] ; 0x34 23814: e3530000 cmp r3, #0 23818: 1a000015 bne 23874 rtems_filesystem_freenode( &loc ); 2381c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23820: e3530000 cmp r3, #0 <== NOT EXECUTED 23824: 0a000004 beq 2383c <== NOT EXECUTED 23828: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2382c: e3530000 cmp r3, #0 <== NOT EXECUTED 23830: 11a00005 movne r0, r5 <== NOT EXECUTED 23834: 11a0e00f movne lr, pc <== NOT EXECUTED 23838: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 2383c: e3540000 cmp r4, #0 <== NOT EXECUTED 23840: 0a000007 beq 23864 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 23844: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 23848: e3530000 cmp r3, #0 <== NOT EXECUTED 2384c: 0a000004 beq 23864 <== NOT EXECUTED 23850: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23854: e3530000 cmp r3, #0 <== NOT EXECUTED 23858: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 2385c: 11a0e00f movne lr, pc <== NOT EXECUTED 23860: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23864: eb005743 bl 39578 <__errno> <== NOT EXECUTED 23868: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2386c: e5803000 str r3, [r0] 23870: ea000018 b 238d8 } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 23874: e28d0018 add r0, sp, #24 23878: e1a01005 mov r1, r5 2387c: e1a0e00f mov lr, pc 23880: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23884: e59d3010 ldr r3, [sp, #16] 23888: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 2388c: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 23890: 0a000004 beq 238a8 23894: e593301c ldr r3, [r3, #28] 23898: e3530000 cmp r3, #0 2389c: 11a00005 movne r0, r5 238a0: 11a0e00f movne lr, pc 238a4: 112fff13 bxne r3 if ( free_parentloc ) 238a8: e3540000 cmp r4, #0 238ac: 0a00000a beq 238dc rtems_filesystem_freenode( &parentloc ); 238b0: e59d3024 ldr r3, [sp, #36] ; 0x24 238b4: e3530000 cmp r3, #0 238b8: 0a000007 beq 238dc 238bc: e593301c ldr r3, [r3, #28] 238c0: e3530000 cmp r3, #0 238c4: 0a000004 beq 238dc 238c8: e28d0018 add r0, sp, #24 238cc: e1a0e00f mov lr, pc 238d0: e12fff13 bx r3 238d4: ea000000 b 238dc 238d8: e3e06000 mvn r6, #0 return result; } 238dc: e1a00006 mov r0, r6 238e0: e28dd02c add sp, sp, #44 ; 0x2c 238e4: e8bd8070 pop {r4, r5, r6, pc} 000126f8 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 126f8: e59f0000 ldr r0, [pc, #0] ; 12700 <== NOT EXECUTED 126fc: e12fff1e bx lr <== NOT EXECUTED 0000f1a0 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { f1a0: e92d4010 push {r4, lr} f1a4: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); f1a8: eb000006 bl f1c8 if (nap) f1ac: e3500000 cmp r0, #0 f1b0: 0a000001 beq f1bc return nap->name; return rtems_assoc_name_bad(local_value); } f1b4: e5900000 ldr r0, [r0] f1b8: 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); f1bc: e1a00004 mov r0, r4 <== NOT EXECUTED } f1c0: 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); f1c4: ea000d4b b 126f8 <== NOT EXECUTED 0000c4ec : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c4ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); c4f0: eb0001fe bl ccf0 <== NOT EXECUTED if (nap) c4f4: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; c4f8: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } c4fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001820 : size_t length ) { const char *p; if ( !name ) 1820: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1824: e92d4070 push {r4, r5, r6, lr} 1828: e1a04001 mov r4, r1 182c: e1a05002 mov r5, r2 const char *p; if ( !name ) 1830: 0a00001c beq 18a8 return NULL; if ( !value ) 1834: e3510000 cmp r1, #0 1838: 0a00001b beq 18ac return NULL; if ( !length ) 183c: e3520000 cmp r2, #0 1840: 0a000018 beq 18a8 return NULL; value[0] = '\0'; 1844: e3a06000 mov r6, #0 1848: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 184c: eb000018 bl 18b4 if ( !p ) 1850: e3500000 cmp r0, #0 1854: 0a000013 beq 18a8 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 == ' ' ) 1874: e3160001 tst r6, #1 1878: 1a000001 bne 1884 187c: e3520020 cmp r2, #32 1880: 0a000009 beq 18ac break; value[i++] = *p++; 1884: e7c42003 strb r2, [r4, r3] 1888: e2833001 add r3, r3, #1 value[i] = '\0'; 188c: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 189c: e1530005 cmp r3, r5 18a0: 3afffff0 bcc 1868 18a4: ea000000 b 18ac <== NOT EXECUTED 18a8: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 18ac: e1a00004 mov r0, r4 18b0: e8bd8070 pop {r4, r5, r6, pc} 00002414 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2414: 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 ) 2418: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 241c: e24dd040 sub sp, sp, #64 ; 0x40 2420: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2424: 0a000059 beq 2590 * 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 ); 2428: e28d4030 add r4, sp, #48 ; 0x30 242c: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2430: 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 ); 2434: eb001339 bl 7120 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2438: e1a01004 mov r1, r4 243c: e1a02005 mov r2, r5 2440: e59f0150 ldr r0, [pc, #336] ; 2598 2444: eb001c4c bl 957c <_Timespec_Subtract> } } } #endif (*print)( 2448: e1a00008 mov r0, r8 244c: e59f1148 ldr r1, [pc, #328] ; 259c 2450: e1a0e00f mov lr, pc 2454: e12fff1a bx sl 2458: e59f4140 ldr r4, [pc, #320] ; 25a0 /* * 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 ) { 245c: e59fb140 ldr fp, [pc, #320] ; 25a4 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2460: e5943004 ldr r3, [r4, #4] 2464: e3530000 cmp r3, #0 2468: 0a00003b beq 255c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 246c: e5936004 ldr r6, [r3, #4] if ( information ) { 2470: e3560000 cmp r6, #0 2474: 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( 2478: 128d9018 addne r9, sp, #24 247c: 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 ) { 2480: 1a00002f bne 2544 2484: ea000034 b 255c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 2488: e596301c ldr r3, [r6, #28] 248c: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 2490: e3540000 cmp r4, #0 2494: 0a000029 beq 2540 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2498: e5940008 ldr r0, [r4, #8] 249c: eb000e90 bl 5ee4 (*print)( 24a0: e28d3008 add r3, sp, #8 24a4: e5942008 ldr r2, [r4, #8] 24a8: e1a00008 mov r0, r8 24ac: e59f10f4 ldr r1, [pc, #244] ; 25a8 24b0: e1a0e00f mov lr, pc 24b4: 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; 24b8: e2843084 add r3, r4, #132 ; 0x84 24bc: e893000c ldm r3, {r2, r3} 24c0: e58d2020 str r2, [sp, #32] 24c4: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 24c8: e59b2000 ldr r2, [fp] 24cc: e5943008 ldr r3, [r4, #8] 24d0: e5922008 ldr r2, [r2, #8] 24d4: e1520003 cmp r2, r3 24d8: 1a000006 bne 24f8 Timestamp_Control used; _Timestamp_Subtract( 24dc: e59f00c8 ldr r0, [pc, #200] ; 25ac 24e0: e28d1030 add r1, sp, #48 ; 0x30 24e4: e1a02009 mov r2, r9 24e8: eb001c23 bl 957c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 24ec: e28d0020 add r0, sp, #32 24f0: e1a01009 mov r1, r9 24f4: eb001be5 bl 9490 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 24f8: e28d203c add r2, sp, #60 ; 0x3c 24fc: e28d3038 add r3, sp, #56 ; 0x38 2500: e28d0020 add r0, sp, #32 2504: e28d1028 add r1, sp, #40 ; 0x28 2508: eb001bf5 bl 94e4 <_Timespec_Divide> /* * Print the information */ (*print)( context, 250c: e3a01ffa mov r1, #1000 ; 0x3e8 2510: e59d0024 ldr r0, [sp, #36] ; 0x24 2514: eb00641a bl 1b584 <__aeabi_uidiv> 2518: e59d203c ldr r2, [sp, #60] ; 0x3c 251c: e58d2000 str r2, [sp] 2520: e59d2038 ldr r2, [sp, #56] ; 0x38 2524: e1a03000 mov r3, r0 2528: e58d2004 str r2, [sp, #4] 252c: e1a00008 mov r0, r8 2530: e59f1078 ldr r1, [pc, #120] ; 25b0 2534: e59d2020 ldr r2, [sp, #32] 2538: e1a0e00f mov lr, pc 253c: 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++ ) { 2540: e2877001 add r7, r7, #1 2544: e1d631b0 ldrh r3, [r6, #16] 2548: 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 ); 254c: e3a0100d mov r1, #13 2550: 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++ ) { 2554: 9affffcb bls 2488 2558: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 255c: e59f3050 ldr r3, [pc, #80] ; 25b4 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++ ) { 2560: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 2564: e1540003 cmp r4, r3 2568: 1affffbc bne 2460 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 256c: e3a01ffa mov r1, #1000 ; 0x3e8 2570: e59d002c ldr r0, [sp, #44] ; 0x2c 2574: eb006402 bl 1b584 <__aeabi_uidiv> 2578: e59f1038 ldr r1, [pc, #56] ; 25b8 257c: e1a03000 mov r3, r0 2580: e59d2028 ldr r2, [sp, #40] ; 0x28 2584: e1a00008 mov r0, r8 2588: e1a0e00f mov lr, pc 258c: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 2590: e28dd040 add sp, sp, #64 ; 0x40 2594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0000c4c0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { c4c0: e92d4010 push {r4, lr} <== NOT EXECUTED c4c4: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) c4c8: e59f0018 ldr r0, [pc, #24] ; c4e8 <== NOT EXECUTED c4cc: eb000006 bl c4ec <== NOT EXECUTED c4d0: e2504000 subs r4, r0, #0 <== NOT EXECUTED c4d4: 0a000001 beq c4e0 <== NOT EXECUTED { errno = rc; c4d8: eb000221 bl cd64 <__errno> <== NOT EXECUTED c4dc: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } c4e0: e3e00000 mvn r0, #0 <== NOT EXECUTED c4e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00006548 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 6548: e92d000e push {r1, r2, r3} <== NOT EXECUTED 654c: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 6550: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6554: e1a02003 mov r2, r3 <== NOT EXECUTED 6558: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 655c: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 6560: ebffff84 bl 6378 <== NOT EXECUTED va_end(arglist); return chars_written; } 6564: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6568: e28dd00c add sp, sp, #12 <== NOT EXECUTED 656c: e12fff1e bx lr <== NOT EXECUTED 0000187c : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 187c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 1880: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1884: e1a07001 mov r7, r1 1888: e1a06002 mov r6, r2 188c: e1a0c003 mov ip, r3 1890: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 1894: 1a000002 bne 18a4 rtems_set_errno_and_return_minus_one( EFAULT ); 1898: eb002d31 bl cd64 <__errno> <== NOT EXECUTED 189c: e3a0300e mov r3, #14 <== NOT EXECUTED 18a0: ea000003 b 18b4 <== NOT EXECUTED if ( !pathloc ) 18a4: e3530000 cmp r3, #0 18a8: 1a000004 bne 18c0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 18ac: eb002d2c bl cd64 <__errno> <== NOT EXECUTED 18b0: e3a03005 mov r3, #5 <== NOT EXECUTED 18b4: e5803000 str r3, [r0] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 18b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 18bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 18c0: e5d53000 ldrb r3, [r5] 18c4: e353002f cmp r3, #47 ; 0x2f 18c8: 1353005c cmpne r3, #92 ; 0x5c 18cc: 13a08000 movne r8, #0 18d0: 03a08001 moveq r8, #1 18d4: 0a000001 beq 18e0 18d8: e3530000 cmp r3, #0 18dc: 1a000009 bne 1908 18e0: e59f305c ldr r3, [pc, #92] ; 1944 18e4: e5934000 ldr r4, [r3] 18e8: e2844018 add r4, r4, #24 18ec: e8b4000f ldm r4!, {r0, r1, r2, r3} 18f0: e1a0800c mov r8, ip 18f4: e8a8000f stmia r8!, {r0, r1, r2, r3} 18f8: e5942000 ldr r2, [r4] 18fc: e5882000 str r2, [r8] 1900: e3a08001 mov r8, #1 1904: ea000007 b 1928 1908: e59f3034 ldr r3, [pc, #52] ; 1944 190c: e5934000 ldr r4, [r3] 1910: e2844004 add r4, r4, #4 1914: e8b4000f ldm r4!, {r0, r1, r2, r3} 1918: e1a0900c mov r9, ip 191c: e8a9000f stmia r9!, {r0, r1, r2, r3} 1920: e5942000 ldr r2, [r4] 1924: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1928: e0681007 rsb r1, r8, r7 192c: e0850008 add r0, r5, r8 1930: e1a02006 mov r2, r6 1934: e1a0300c mov r3, ip 1938: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 193c: 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], 1940: eaffff95 b 179c 0000179c : /* * Verify Input parameters. */ if ( !pathname ) 179c: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 17a0: e92d4030 push {r4, r5, lr} 17a4: e1a05002 mov r5, r2 17a8: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 17ac: 1a000002 bne 17bc rtems_set_errno_and_return_minus_one( EFAULT ); 17b0: eb002d6b bl cd64 <__errno> <== NOT EXECUTED 17b4: e3a0300e mov r3, #14 <== NOT EXECUTED 17b8: ea000027 b 185c <== NOT EXECUTED if ( !pathloc ) 17bc: e3530000 cmp r3, #0 17c0: 1a000002 bne 17d0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 17c4: eb002d66 bl cd64 <__errno> <== NOT EXECUTED 17c8: e3a03005 mov r3, #5 <== NOT EXECUTED 17cc: ea000022 b 185c <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 17d0: e593c00c ldr ip, [r3, #12] 17d4: e59cc000 ldr ip, [ip] 17d8: e35c0000 cmp ip, #0 17dc: 0a00001c beq 1854 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 17e0: e1a0e00f mov lr, pc 17e4: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 17e8: e59d200c ldr r2, [sp, #12] 17ec: e2703001 rsbs r3, r0, #1 17f0: 33a03000 movcc r3, #0 17f4: e3520000 cmp r2, #0 17f8: 03a03000 moveq r3, #0 17fc: e3530000 cmp r3, #0 1800: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 1804: e594200c ldr r2, [r4, #12] 1808: e5923010 ldr r3, [r2, #16] 180c: e3530000 cmp r3, #0 1810: 0a00000a beq 1840 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1814: e1a00004 mov r0, r4 1818: e1a0e00f mov lr, pc 181c: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1820: e2400003 sub r0, r0, #3 1824: e3500001 cmp r0, #1 1828: 83a00000 movhi r0, #0 182c: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1830: e594200c ldr r2, [r4, #12] 1834: e5923034 ldr r3, [r2, #52] ; 0x34 1838: e3530000 cmp r3, #0 183c: 1a000009 bne 1868 rtems_filesystem_freenode( pathloc ); 1840: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1844: e3530000 cmp r3, #0 <== NOT EXECUTED 1848: 11a00004 movne r0, r4 <== NOT EXECUTED 184c: 11a0e00f movne lr, pc <== NOT EXECUTED 1850: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1854: eb002d42 bl cd64 <__errno> <== NOT EXECUTED 1858: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 185c: e5803000 str r3, [r0] <== NOT EXECUTED 1860: e3e00000 mvn r0, #0 <== NOT EXECUTED 1864: 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 ); 1868: e1a00004 mov r0, r4 186c: e1a01005 mov r1, r5 1870: e1a0e00f mov lr, pc 1874: e12fff13 bx r3 } } return result; } 1878: e8bd8030 pop {r4, r5, pc} 000015fc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 15fc: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1600: e59f6100 ldr r6, [pc, #256] ; 1708 1604: e5963000 ldr r3, [r6] 1608: e3a02012 mov r2, #18 160c: e583202c str r2, [r3, #44] ; 0x2c * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1610: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 1614: eb000215 bl 1e70 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1618: e59f30ec ldr r3, [pc, #236] ; 170c 161c: e5933000 ldr r3, [r3] 1620: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 1624: 059f00e4 ldreq r0, [pc, #228] ; 1710 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1628: 0a000009 beq 1654 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 162c: e59f30e0 ldr r3, [pc, #224] ; 1714 1630: e5932000 ldr r2, [r3] status = mount( 1634: e592300c ldr r3, [r2, #12] 1638: e58d3000 str r3, [sp] 163c: e28d0018 add r0, sp, #24 1640: e892000e ldm r2, {r1, r2, r3} 1644: eb000210 bl 1e8c &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1648: e3700001 cmn r0, #1 164c: 1a000001 bne 1658 rtems_fatal_error_occurred( 0xABCD0002 ); 1650: e59f00c0 ldr r0, [pc, #192] ; 1718 <== NOT EXECUTED 1654: eb000e97 bl 50b8 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1658: e59de018 ldr lr, [sp, #24] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 165c: 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; 1660: e28ee01c add lr, lr, #28 1664: e8be000f ldm lr!, {r0, r1, r2, r3} 1668: e287c018 add ip, r7, #24 166c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1670: 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; 1674: 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); 1678: 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; 167c: 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; 1680: 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); 1684: e1a03004 mov r3, r4 1688: e3a01001 mov r1, #1 168c: e1a02005 mov r2, r5 1690: e59f0084 ldr r0, [pc, #132] ; 171c rtems_filesystem_root = loc; 1694: e1a07004 mov r7, r4 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1698: e58d5000 str r5, [sp] 169c: eb000076 bl 187c rtems_filesystem_root = loc; 16a0: e596c000 ldr ip, [r6] 16a4: e8b7000f ldm r7!, {r0, r1, r2, r3} 16a8: e28cc018 add ip, ip, #24 16ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 16b0: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 16b4: 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; 16b8: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 16bc: e3a01001 mov r1, #1 16c0: e1a03004 mov r3, r4 16c4: e59f0050 ldr r0, [pc, #80] ; 171c 16c8: e58d5000 str r5, [sp] 16cc: eb00006a bl 187c rtems_filesystem_current = loc; 16d0: e596c000 ldr ip, [r6] 16d4: e8b4000f ldm r4!, {r0, r1, r2, r3} 16d8: e28cc004 add ip, ip, #4 16dc: e8ac000f stmia ip!, {r0, r1, r2, r3} 16e0: 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); 16e4: e59f0034 ldr r0, [pc, #52] ; 1720 /* 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; 16e8: 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); 16ec: e59f1030 ldr r1, [pc, #48] ; 1724 16f0: eb000184 bl 1d08 if ( status != 0 ) 16f4: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 16f8: 159f0028 ldrne r0, [pc, #40] ; 1728 * 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 ) 16fc: 1affffd4 bne 1654 * 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. */ } 1700: e28dd01c add sp, sp, #28 1704: e8bd80f0 pop {r4, r5, r6, r7, pc} 00023bf4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 23bf4: e5903000 ldr r3, [r0] <== NOT EXECUTED 23bf8: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 23bfc: e1530000 cmp r3, r0 <== NOT EXECUTED 23c00: 13a00000 movne r0, #0 <== NOT EXECUTED 23c04: 03a00001 moveq r0, #1 <== NOT EXECUTED 23c08: e12fff1e bx lr <== NOT EXECUTED 000014bc : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 14bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 14c0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 14c4: e1a05001 mov r5, r1 <== NOT EXECUTED 14c8: 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 ); 14cc: eb003215 bl dd28 <== NOT EXECUTED 14d0: e28d4004 add r4, sp, #4 <== NOT EXECUTED 14d4: e1a01000 mov r1, r0 <== NOT EXECUTED 14d8: e3a02000 mov r2, #0 <== NOT EXECUTED 14dc: e1a03004 mov r3, r4 <== NOT EXECUTED 14e0: e3a0c001 mov ip, #1 <== NOT EXECUTED 14e4: e1a00006 mov r0, r6 <== NOT EXECUTED 14e8: e58dc000 str ip, [sp] <== NOT EXECUTED 14ec: eb0000e2 bl 187c <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 14f0: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 14f4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 14f8: e3530000 cmp r3, #0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 14fc: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; 1500: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 1504: 1a000009 bne 1530 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1508: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 150c: e3530000 cmp r3, #0 <== NOT EXECUTED 1510: 11a00004 movne r0, r4 <== NOT EXECUTED 1514: 11a0e00f movne lr, pc <== NOT EXECUTED 1518: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 151c: eb002e10 bl cd64 <__errno> <== NOT EXECUTED 1520: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1524: e5803000 str r3, [r0] <== NOT EXECUTED 1528: e3e00000 mvn r0, #0 <== NOT EXECUTED 152c: ea000026 b 15cc <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 1530: e1a00004 mov r0, r4 <== NOT EXECUTED 1534: e1a0e00f mov lr, pc <== NOT EXECUTED 1538: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 153c: e3570000 cmp r7, #0 <== NOT EXECUTED 1540: 03500002 cmpeq r0, #2 <== NOT EXECUTED 1544: 03a0a000 moveq sl, #0 <== NOT EXECUTED 1548: 13a0a001 movne sl, #1 <== NOT EXECUTED 154c: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED 1550: 0a000008 beq 1578 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1554: e3570000 cmp r7, #0 <== NOT EXECUTED 1558: 0a000018 beq 15c0 <== NOT EXECUTED 155c: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 1560: e3530000 cmp r3, #0 <== NOT EXECUTED 1564: 0a000015 beq 15c0 <== NOT EXECUTED 1568: e1a00004 mov r0, r4 <== NOT EXECUTED 156c: e1a0e00f mov lr, pc <== NOT EXECUTED 1570: e12fff13 bx r3 <== NOT EXECUTED 1574: ea000011 b 15c0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1578: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 157c: e1a00006 mov r0, r6 <== NOT EXECUTED 1580: eb0031e8 bl dd28 <== NOT EXECUTED 1584: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1588: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 158c: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 1590: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1594: e3570000 cmp r7, #0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 1598: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 159c: 0a000009 beq 15c8 <== NOT EXECUTED 15a0: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 15a4: e3530000 cmp r3, #0 <== NOT EXECUTED 15a8: 0a000006 beq 15c8 <== NOT EXECUTED 15ac: e1a00004 mov r0, r4 <== NOT EXECUTED 15b0: e1a0e00f mov lr, pc <== NOT EXECUTED 15b4: e12fff13 bx r3 <== NOT EXECUTED 15b8: e1a0000a mov r0, sl <== NOT EXECUTED 15bc: ea000002 b 15cc <== NOT EXECUTED 15c0: e3a0000d mov r0, #13 <== NOT EXECUTED 15c4: ea000000 b 15cc <== NOT EXECUTED 15c8: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 15cc: e28dd018 add sp, sp, #24 <== NOT EXECUTED 15d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 000019ec : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 19ec: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 19f0: e59f4098 ldr r4, [pc, #152] ; 1a90 19f4: e5940000 ldr r0, [r4] 19f8: e3500000 cmp r0, #0 19fc: 0a000013 beq 1a50 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1a00: e3a01040 mov r1, #64 ; 0x40 1a04: eb001d55 bl 8f60 1a08: e59f3084 ldr r3, [pc, #132] ; 1a94 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1a0c: 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, 1a10: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1a14: 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) 1a18: 0a000015 beq 1a74 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1a1c: e59f3074 ldr r3, [pc, #116] ; 1a98 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1a20: 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; 1a24: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1a28: e3a03000 mov r3, #0 1a2c: ea000000 b 1a34 iop->data1 = iop + 1; 1a30: 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++) 1a34: e2833001 add r3, r3, #1 1a38: e1530001 cmp r3, r1 iop->data1 = iop + 1; 1a3c: 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++) 1a40: e2800040 add r0, r0, #64 ; 0x40 1a44: 3afffff9 bcc 1a30 iop->data1 = iop + 1; iop->data1 = NULL; 1a48: e3a03000 mov r3, #0 1a4c: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1a50: e59fc044 ldr ip, [pc, #68] ; 1a9c 1a54: e59f0044 ldr r0, [pc, #68] ; 1aa0 1a58: e3a01001 mov r1, #1 1a5c: e3a02054 mov r2, #84 ; 0x54 1a60: e3a03000 mov r3, #0 1a64: e58dc000 str ip, [sp] 1a68: eb000b6c bl 4820 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1a6c: e3500000 cmp r0, #0 1a70: 0a000000 beq 1a78 rtems_fatal_error_occurred( rc ); 1a74: eb000d8f bl 50b8 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1a78: e59f3024 ldr r3, [pc, #36] ; 1aa4 1a7c: e5933000 ldr r3, [r3] 1a80: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 1a84: 11a0e00f movne lr, pc 1a88: 112fff13 bxne r3 } 1a8c: e8bd8018 pop {r3, r4, pc} 000233fc : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 233fc: 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); 23400: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23404: 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); 23408: e1a01000 mov r1, r0 2340c: e28d2018 add r2, sp, #24 23410: eb00071b bl 25084 if (sc != RTEMS_SUCCESSFUL) return sc; 23414: e2508000 subs r8, r0, #0 23418: 1a00003f bne 2351c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 2341c: e59f4104 ldr r4, [pc, #260] ; 23528 23420: e59f3104 ldr r3, [pc, #260] ; 2352c 23424: e5942000 ldr r2, [r4] 23428: e1520003 cmp r2, r3 2342c: 1a00000f bne 23470 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 23430: e2800048 add r0, r0, #72 ; 0x48 23434: ebff8683 bl 4e48 if (!tmp) 23438: e2505000 subs r5, r0, #0 2343c: 03a0801a moveq r8, #26 23440: 0a000035 beq 2351c #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); 23444: e1a00008 mov r0, r8 23448: e1a01004 mov r1, r4 2344c: e59f20dc ldr r2, [pc, #220] ; 23530 23450: eb000802 bl 25460 if (sc != RTEMS_SUCCESSFUL) { 23454: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 23458: 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) { 2345c: 0a000003 beq 23470 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 23460: e1a00005 mov r0, r5 <== NOT EXECUTED 23464: ebff84f5 bl 4840 <== NOT EXECUTED 23468: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 2346c: ea00002a b 2351c <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 23470: e59f60b0 ldr r6, [pc, #176] ; 23528 23474: e5964000 ldr r4, [r6] 23478: e59f10ac ldr r1, [pc, #172] ; 2352c 2347c: e3a02048 mov r2, #72 ; 0x48 23480: e1a00004 mov r0, r4 23484: eb00646c bl 3c63c rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23488: e59f30a4 ldr r3, [pc, #164] ; 23534 2348c: 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*/ 23490: e59d3018 ldr r3, [sp, #24] 23494: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23498: 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*/ 2349c: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 234a0: e8be000f ldm lr!, {r0, r1, r2, r3} 234a4: e8ac000f stmia ip!, {r0, r1, r2, r3} 234a8: 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); 234ac: e28d4004 add r4, sp, #4 234b0: 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; 234b4: 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); 234b8: e3a01001 mov r1, #1 234bc: e1a03004 mov r3, r4 234c0: e1a02005 mov r2, r5 234c4: e59f006c ldr r0, [pc, #108] ; 23538 rtems_filesystem_root = loc; 234c8: e1a07004 mov r7, r4 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 234cc: e58d5000 str r5, [sp] 234d0: ebff84a7 bl 4774 rtems_filesystem_root = loc; 234d4: e596c000 ldr ip, [r6] 234d8: e8b7000f ldm r7!, {r0, r1, r2, r3} 234dc: e28cc018 add ip, ip, #24 234e0: e8ac000f stmia ip!, {r0, r1, r2, r3} 234e4: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 234e8: 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; 234ec: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 234f0: e3a01001 mov r1, #1 234f4: e1a03004 mov r3, r4 234f8: e59f0038 ldr r0, [pc, #56] ; 23538 234fc: e58d5000 str r5, [sp] 23500: ebff849b bl 4774 rtems_filesystem_current = loc; 23504: e596c000 ldr ip, [r6] 23508: e8b4000f ldm r4!, {r0, r1, r2, r3} 2350c: e28cc004 add ip, ip, #4 23510: e8ac000f stmia ip!, {r0, r1, r2, r3} 23514: e5973000 ldr r3, [r7] 23518: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 2351c: e1a00008 mov r0, r8 23520: e28dd01c add sp, sp, #28 23524: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00023358 : * 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) { 23358: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 2335c: 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); 23360: e3a00000 mov r0, #0 <== NOT EXECUTED 23364: e1a01000 mov r1, r0 <== NOT EXECUTED 23368: e1a0200d mov r2, sp <== NOT EXECUTED 2336c: eb000744 bl 25084 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 23370: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23374: 1a00001b bne 233e8 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 23378: e59f1070 ldr r1, [pc, #112] ; 233f0 <== NOT EXECUTED 2337c: e5914000 ldr r4, [r1] <== NOT EXECUTED 23380: e59d3000 ldr r3, [sp] <== NOT EXECUTED 23384: e5942000 ldr r2, [r4] <== NOT EXECUTED 23388: e1520003 cmp r2, r3 <== NOT EXECUTED 2338c: 1a000004 bne 233a4 <== 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); 23390: eb00085b bl 25504 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 23394: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23398: 1a000012 bne 233e8 <== NOT EXECUTED free_user_env(tmp); 2339c: e1a00004 mov r0, r4 <== NOT EXECUTED 233a0: ebffffd3 bl 232f4 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 233a4: e59f4044 ldr r4, [pc, #68] ; 233f0 <== NOT EXECUTED 233a8: e1a00005 mov r0, r5 <== NOT EXECUTED 233ac: e1a01004 mov r1, r4 <== NOT EXECUTED 233b0: e28d2004 add r2, sp, #4 <== NOT EXECUTED 233b4: eb00086f bl 25578 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 233b8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 233bc: 1a000006 bne 233dc <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 233c0: e59f202c ldr r2, [pc, #44] ; 233f4 <== NOT EXECUTED 233c4: e1a01004 mov r1, r4 <== NOT EXECUTED 233c8: eb000824 bl 25460 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 233cc: 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; 233d0: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 233d4: 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) 233d8: 0a000002 beq 233e8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 233dc: e59f1014 ldr r1, [pc, #20] ; 233f8 <== NOT EXECUTED 233e0: e59f2008 ldr r2, [pc, #8] ; 233f0 <== NOT EXECUTED 233e4: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 233e8: e1a00003 mov r0, r3 <== NOT EXECUTED 233ec: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00004f40 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 4f40: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 4f44: e59f3038 ldr r3, [pc, #56] ; 4f84 <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 4f48: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 4f4c: e1a0200d mov r2, sp <== NOT EXECUTED 4f50: e5930000 ldr r0, [r3] <== NOT EXECUTED 4f54: eb001435 bl a030 <_Protected_heap_Get_block_size> <== NOT EXECUTED 4f58: e3500000 cmp r0, #0 <== NOT EXECUTED 4f5c: 0a000007 beq 4f80 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 4f60: e59f3020 ldr r3, [pc, #32] ; 4f88 <== NOT EXECUTED 4f64: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4f68: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 4f6c: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 4f70: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 4f74: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 4f78: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 4f7c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 4f80: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 00004f8c : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 4f8c: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 4f90: 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 ) 4f94: 0a000013 beq 4fe8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 4f98: e28d2004 add r2, sp, #4 <== NOT EXECUTED 4f9c: e3a03000 mov r3, #0 <== NOT EXECUTED 4fa0: 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); 4fa4: e59f3040 ldr r3, [pc, #64] ; 4fec <== NOT EXECUTED 4fa8: e1a0200d mov r2, sp <== NOT EXECUTED 4fac: e5930000 ldr r0, [r3] <== NOT EXECUTED 4fb0: eb00141e bl a030 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 4fb4: e59f3034 ldr r3, [pc, #52] ; 4ff0 <== NOT EXECUTED 4fb8: e59d4000 ldr r4, [sp] <== NOT EXECUTED 4fbc: e283c01c add ip, r3, #28 <== NOT EXECUTED 4fc0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 4fc4: 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); 4fc8: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 4fcc: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 4fd0: 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); 4fd4: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (current_depth > s->max_depth) 4fd8: e152000c cmp r2, ip <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 4fdc: e583001c str r0, [r3, #28] <== NOT EXECUTED 4fe0: e5831020 str r1, [r3, #32] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) s->max_depth = current_depth; 4fe4: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 4fe8: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 00004ff4 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 4ff4: e59f0008 ldr r0, [pc, #8] ; 5004 <== NOT EXECUTED 4ff8: e3a01000 mov r1, #0 <== NOT EXECUTED 4ffc: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 5000: ea00de14 b 3c858 <== NOT EXECUTED 0000651c : void rtems_panic( const char *printf_format, ... ) { 651c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6520: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 6524: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 6528: e1a02003 mov r2, r3 <== NOT EXECUTED 652c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 6530: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 6534: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 6538: ebffff8e bl 6378 <== NOT EXECUTED va_end(arglist); } 653c: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6540: e28dd010 add sp, sp, #16 <== NOT EXECUTED 6544: e12fff1e bx lr <== NOT EXECUTED 0000ad24 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) ad24: e59f3048 ldr r3, [pc, #72] ; ad74 ad28: e5d33000 ldrb r3, [r3] ad2c: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { ad30: e92d4001 push {r0, lr} if (!rtems_pipe_configured) ad34: 0a00000d beq ad70 return; if (rtems_pipe_semaphore) ad38: e59fc038 ldr ip, [pc, #56] ; ad78 <== NOT EXECUTED ad3c: e59c3000 ldr r3, [ip] <== NOT EXECUTED ad40: e3530000 cmp r3, #0 <== NOT EXECUTED ad44: 1a000009 bne ad70 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( ad48: e59f002c ldr r0, [pc, #44] ; ad7c <== NOT EXECUTED ad4c: e3a01001 mov r1, #1 <== NOT EXECUTED ad50: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED ad54: e58dc000 str ip, [sp] <== NOT EXECUTED ad58: ebffe6b0 bl 4820 <== 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) ad5c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ad60: 1bffe8d4 blne 50b8 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); ad64: ebffe5b2 bl 4434 <== NOT EXECUTED rtems_pipe_no = now; ad68: e59f3010 ldr r3, [pc, #16] ; ad80 <== NOT EXECUTED ad6c: e1c300b0 strh r0, [r3] <== NOT EXECUTED } ad70: e8bd8008 pop {r3, pc} 00003014 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 3014: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 3018: e59f307c ldr r3, [pc, #124] ; 309c 301c: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3020: e59300c8 ldr r0, [r3, #200] ; 0xc8 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 3024: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3028: e15b0000 cmp fp, r0 302c: 33a04000 movcc r4, #0 3030: 3a000004 bcc 3048 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 3034: e59340c4 ldr r4, [r3, #196] ; 0xc4 3038: e0804004 add r4, r0, r4 303c: e15b0004 cmp fp, r4 3040: 83a04000 movhi r4, #0 3044: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3048: e59f3050 ldr r3, [pc, #80] ; 30a0 304c: e5933000 ldr r3, [r3] 3050: e3530000 cmp r3, #0 3054: 03a01001 moveq r1, #1 3058: 0a000005 beq 3074 pattern_ok = (!memcmp( 305c: e59f1040 ldr r1, [pc, #64] ; 30a4 3060: e2800008 add r0, r0, #8 3064: e3a02010 mov r2, #16 3068: eb00e549 bl 3c594 306c: e2701001 rsbs r1, r0, #1 3070: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3074: e3540000 cmp r4, #0 3078: 0a000002 beq 3088 307c: e3510000 cmp r1, #0 3080: 13a00000 movne r0, #0 3084: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3088: e59f300c ldr r3, [pc, #12] ; 309c <== NOT EXECUTED 308c: e5930000 ldr r0, [r3] <== NOT EXECUTED 3090: ebffffb4 bl 2f68 <== NOT EXECUTED 3094: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3098: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 00002f58 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2f58: e59f1004 ldr r1, [pc, #4] ; 2f64 <== NOT EXECUTED 2f5c: e3a00000 mov r0, #0 <== NOT EXECUTED 2f60: eaffffe3 b 2ef4 <== NOT EXECUTED 00002ef4 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2ef4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 2ef8: e59f4048 ldr r4, [pc, #72] ; 2f48 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2efc: e1a05001 mov r5, r1 <== NOT EXECUTED 2f00: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 2f04: 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; 2f08: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 2f0c: e59f1038 ldr r1, [pc, #56] ; 2f4c <== NOT EXECUTED 2f10: e1a0e00f mov lr, pc <== NOT EXECUTED 2f14: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 2f18: e59f1030 ldr r1, [pc, #48] ; 2f50 <== NOT EXECUTED 2f1c: e1a00006 mov r0, r6 <== NOT EXECUTED 2f20: e1a0e00f mov lr, pc <== NOT EXECUTED 2f24: 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 ); 2f28: e59f0024 ldr r0, [pc, #36] ; 2f54 <== NOT EXECUTED 2f2c: eb001a25 bl 97c8 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 2f30: e3e00000 mvn r0, #0 <== NOT EXECUTED 2f34: ebffff9f bl 2db8 <== NOT EXECUTED print_context = NULL; 2f38: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 2f3c: 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; 2f40: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 2f44: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00018f28 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 18f28: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 18f2c: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 18f30: e1a05000 mov r5, r0 18f34: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 18f38: 03a00009 moveq r0, #9 18f3c: 0a000018 beq 18fa4 return RTEMS_INVALID_ADDRESS; errno = 0; 18f40: eb00818c bl 39578 <__errno> 18f44: e3a03000 mov r3, #0 18f48: e5803000 str r3, [r0] *n = 0; 18f4c: 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 ); 18f50: e1a00005 mov r0, r5 18f54: e1a0100d mov r1, sp 18f58: e3a02010 mov r2, #16 18f5c: eb00a12c bl 41414 #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 ) 18f60: e3560000 cmp r6, #0 *endptr = end; 18f64: 159d3000 ldrne r3, [sp] 18f68: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 18f6c: e59d3000 ldr r3, [sp] 18f70: e1530005 cmp r3, r5 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 18f74: e1a07000 mov r7, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 18f78: 03a0000b moveq r0, #11 18f7c: 0a000008 beq 18fa4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 18f80: e3770001 cmn r7, #1 18f84: 1a000004 bne 18f9c 18f88: eb00817a bl 39578 <__errno> <== NOT EXECUTED 18f8c: e5903000 ldr r3, [r0] <== NOT EXECUTED 18f90: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 18f94: 03a0000a moveq r0, #10 <== NOT EXECUTED 18f98: 0a000001 beq 18fa4 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 18f9c: e5847000 str r7, [r4] 18fa0: e3a00000 mov r0, #0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 18fa4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00003ba0 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3ba0: e3500009 cmp r0, #9 3ba4: 012fff1e bxeq lr 3ba8: ca000016 bgt 3c08 3bac: e3500004 cmp r0, #4 3bb0: 012fff1e bxeq lr 3bb4: ca00000a bgt 3be4 3bb8: e3500001 cmp r0, #1 3bbc: 012fff1e bxeq lr 3bc0: ca000002 bgt 3bd0 3bc4: e3500000 cmp r0, #0 3bc8: 012fff1e bxeq lr 3bcc: ea000030 b 3c94 3bd0: e3500002 cmp r0, #2 <== NOT EXECUTED 3bd4: 012fff1e bxeq lr <== NOT EXECUTED 3bd8: e3500003 cmp r0, #3 <== NOT EXECUTED 3bdc: 1a00002c bne 3c94 <== NOT EXECUTED 3be0: e12fff1e bx lr <== NOT EXECUTED 3be4: e3500006 cmp r0, #6 <== NOT EXECUTED 3be8: 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; 3bec: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3bf0: b12fff1e bxlt lr <== NOT EXECUTED 3bf4: e3500007 cmp r0, #7 <== NOT EXECUTED 3bf8: 012fff1e bxeq lr <== NOT EXECUTED 3bfc: e3500008 cmp r0, #8 <== NOT EXECUTED 3c00: 1a000023 bne 3c94 <== NOT EXECUTED 3c04: e12fff1e bx lr <== NOT EXECUTED 3c08: e350000e cmp r0, #14 <== NOT EXECUTED 3c0c: 012fff1e bxeq lr <== NOT EXECUTED 3c10: ca000008 bgt 3c38 <== NOT EXECUTED 3c14: e350000b cmp r0, #11 <== NOT EXECUTED 3c18: 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; 3c1c: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3c20: b12fff1e bxlt lr <== NOT EXECUTED 3c24: e350000c cmp r0, #12 <== NOT EXECUTED 3c28: 012fff1e bxeq lr <== NOT EXECUTED 3c2c: e350000d cmp r0, #13 <== NOT EXECUTED 3c30: 1a000017 bne 3c94 <== NOT EXECUTED 3c34: e12fff1e bx lr <== NOT EXECUTED 3c38: e59f305c ldr r3, [pc, #92] ; 3c9c <== NOT EXECUTED 3c3c: 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; 3c40: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3c44: 012fff1e bxeq lr <== NOT EXECUTED 3c48: ca000005 bgt 3c64 <== NOT EXECUTED 3c4c: e350000f cmp r0, #15 <== NOT EXECUTED 3c50: 012fff1e bxeq lr <== NOT EXECUTED 3c54: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3c58: e1500003 cmp r0, r3 <== NOT EXECUTED 3c5c: 1a00000c bne 3c94 <== NOT EXECUTED 3c60: ea000007 b 3c84 <== NOT EXECUTED 3c64: e59f3034 ldr r3, [pc, #52] ; 3ca0 <== NOT EXECUTED 3c68: 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; 3c6c: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3c70: 012fff1e bxeq lr <== NOT EXECUTED 3c74: e2833001 add r3, r3, #1 <== NOT EXECUTED 3c78: e1500003 cmp r0, r3 <== NOT EXECUTED 3c7c: 1a000004 bne 3c94 <== NOT EXECUTED 3c80: ea000001 b 3c8c <== 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; 3c84: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 3c88: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 3c8c: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3c90: e12fff1e bx lr <== NOT EXECUTED 3c94: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 3c98: e12fff1e bx lr 000026c0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 26c0: e59f3008 ldr r3, [pc, #8] ; 26d0 <== NOT EXECUTED 26c4: 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; } 26c8: e3a00000 mov r0, #0 <== NOT EXECUTED 26cc: e12fff1e bx lr <== NOT EXECUTED 00003acc : { 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); 3acc: e59f2180 ldr r2, [pc, #384] ; 3c54 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3ad0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3ad4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 3ad8: e92d4030 push {r4, r5, lr} 3adc: 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); 3ae0: e5920000 ldr r0, [r2] 3ae4: 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; 3ae8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3aec: eb0003dd bl 4a68 if (sc != RTEMS_SUCCESSFUL) 3af0: e3500000 cmp r0, #0 3af4: 1a000022 bne 3b84 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 3af8: e5943008 ldr r3, [r4, #8] 3afc: e2433001 sub r3, r3, #1 3b00: e3530000 cmp r3, #0 3b04: e5843008 str r3, [r4, #8] 3b08: 1a00004c bne 3c40 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3b0c: e59420cc ldr r2, [r4, #204] ; 0xcc 3b10: e59f3140 ldr r3, [pc, #320] ; 3c58 3b14: e0833282 add r3, r3, r2, lsl #5 3b18: e5931004 ldr r1, [r3, #4] 3b1c: e3510000 cmp r1, #0 3b20: 0a000003 beq 3b34 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3b24: e1a00004 mov r0, r4 <== NOT EXECUTED 3b28: e1a0e00f mov lr, pc <== NOT EXECUTED 3b2c: e12fff11 bx r1 <== NOT EXECUTED 3b30: ea000006 b 3b50 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3b34: e5940018 ldr r0, [r4, #24] 3b38: e1a02001 mov r2, r1 3b3c: eb0003c9 bl 4a68 if (sc != RTEMS_SUCCESSFUL) { 3b40: e3500000 cmp r0, #0 3b44: 1a00000e bne 3b84 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3b48: e1a00004 mov r0, r4 3b4c: ebfffe05 bl 3368 } if (tty->device.outputUsesInterrupts 3b50: e59430b4 ldr r3, [r4, #180] ; 0xb4 3b54: e3530002 cmp r3, #2 3b58: 1a00000a bne 3b88 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 3b5c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3b60: e3a01001 mov r1, #1 <== NOT EXECUTED 3b64: eb0002ab bl 4618 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3b68: e3500000 cmp r0, #0 <== NOT EXECUTED 3b6c: 1a000004 bne 3b84 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3b70: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3b74: e3a01001 mov r1, #1 <== NOT EXECUTED 3b78: eb0002a6 bl 4618 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3b7c: e3500000 cmp r0, #0 <== NOT EXECUTED 3b80: 0a000000 beq 3b88 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3b84: eb00054b bl 50b8 <== NOT EXECUTED } if (tty->device.lastClose) 3b88: e594309c ldr r3, [r4, #156] ; 0x9c 3b8c: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3b90: 11a02005 movne r2, r5 3b94: 1284000c addne r0, r4, #12 3b98: 18900003 ldmne r0, {r0, r1} 3b9c: 11a0e00f movne lr, pc 3ba0: 112fff13 bxne r3 if (tty->forw == NULL) { 3ba4: e894000c ldm r4, {r2, r3} 3ba8: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3bac: 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) { 3bb0: 1a000003 bne 3bc4 rtems_termios_ttyTail = tty->back; 3bb4: e59f10a0 ldr r1, [pc, #160] ; 3c5c if ( rtems_termios_ttyTail != NULL ) { 3bb8: 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; 3bbc: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 3bc0: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3bc4: e5942004 ldr r2, [r4, #4] 3bc8: e5943000 ldr r3, [r4] 3bcc: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 3bd0: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3bd4: 1a000003 bne 3be8 rtems_termios_ttyHead = tty->forw; 3bd8: e59f1080 ldr r1, [pc, #128] ; 3c60 if ( rtems_termios_ttyHead != NULL ) { 3bdc: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3be0: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3be4: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 3be8: e5940014 ldr r0, [r4, #20] 3bec: eb000376 bl 49cc rtems_semaphore_delete (tty->osem); 3bf0: e5940018 ldr r0, [r4, #24] 3bf4: eb000374 bl 49cc rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 3bf8: e594008c ldr r0, [r4, #140] ; 0x8c 3bfc: eb000372 bl 49cc if ((tty->device.pollRead == NULL) || 3c00: e59430a0 ldr r3, [r4, #160] ; 0xa0 3c04: e3530000 cmp r3, #0 3c08: 0a000002 beq 3c18 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 3c0c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3c10: e3530002 cmp r3, #2 3c14: 1a000001 bne 3c20 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3c18: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3c1c: eb00036a bl 49cc <== NOT EXECUTED free (tty->rawInBuf.theBuf); 3c20: e5940058 ldr r0, [r4, #88] ; 0x58 3c24: ebfff747 bl 1948 free (tty->rawOutBuf.theBuf); 3c28: e594007c ldr r0, [r4, #124] ; 0x7c 3c2c: ebfff745 bl 1948 free (tty->cbuf); 3c30: e594001c ldr r0, [r4, #28] 3c34: ebfff743 bl 1948 free (tty); 3c38: e1a00004 mov r0, r4 3c3c: ebfff741 bl 1948 } rtems_semaphore_release (rtems_termios_ttyMutex); 3c40: e59f300c ldr r3, [pc, #12] ; 3c54 3c44: e5930000 ldr r0, [r3] 3c48: eb0003cc bl 4b80 return RTEMS_SUCCESSFUL; } 3c4c: e3a00000 mov r0, #0 3c50: e8bd8030 pop {r4, r5, pc} 000028c4 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 28c4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 28c8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 28cc: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 28d0: 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) { 28d4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 28d8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 28dc: 1a000005 bne 28f8 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 28e0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 28e4: e1a01002 mov r1, r2 <== NOT EXECUTED 28e8: eb00074a bl 4618 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 28ec: e3500000 cmp r0, #0 <== NOT EXECUTED 28f0: 0a00000c beq 2928 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 28f4: eb0009ef bl 50b8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 28f8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 28fc: e3530005 cmp r3, #5 <== NOT EXECUTED 2900: 1a000006 bne 2920 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2904: e59f3024 ldr r3, [pc, #36] ; 2930 <== NOT EXECUTED 2908: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 290c: e3530000 cmp r3, #0 <== NOT EXECUTED 2910: 0a000004 beq 2928 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2914: e1a0e00f mov lr, pc <== NOT EXECUTED 2918: e12fff13 bx r3 <== NOT EXECUTED 291c: ea000001 b 2928 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2920: 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); 2924: eaffff6d b 26e0 <== NOT EXECUTED } } 2928: e3a00000 mov r0, #0 <== NOT EXECUTED 292c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00002934 : * 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) { 2934: 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) { 2938: e59f32b8 ldr r3, [pc, #696] ; 2bf8 <== 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) { 293c: 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) { 2940: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2944: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2948: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 294c: e3560000 cmp r6, #0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 2950: e1a0b001 mov fp, r1 <== 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); 2954: 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); 2958: 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); 295c: 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) { 2960: 1a00000e bne 29a0 <== 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); 2964: e1a08002 mov r8, r2 <== NOT EXECUTED 2968: 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, 296c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 2970: 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); 2974: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2978: e1a09006 mov r9, r6 <== NOT EXECUTED 297c: e1a05006 mov r5, r6 <== NOT EXECUTED 2980: ea000091 b 2bcc <== 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); 2984: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2988: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 298c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 2990: e1a0e00f mov lr, pc <== NOT EXECUTED 2994: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2998: e2866001 add r6, r6, #1 <== NOT EXECUTED 299c: 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--) { 29a0: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 29a4: 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--) { 29a8: 1afffff5 bne 2984 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 29ac: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29b0: e3530000 cmp r3, #0 <== NOT EXECUTED 29b4: 1a00008c bne 2bec <== NOT EXECUTED 29b8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 29bc: e3530000 cmp r3, #0 <== NOT EXECUTED 29c0: 0a000089 beq 2bec <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 29c4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 29c8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 29cc: e1a0e00f mov lr, pc <== NOT EXECUTED 29d0: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 29d4: e3a03001 mov r3, #1 <== NOT EXECUTED 29d8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29dc: ea000083 b 2bf0 <== 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) { 29e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 29e4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 29e8: 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) { 29ec: 0a00000f beq 2a30 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 29f0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 29f4: e152000a cmp r2, sl <== NOT EXECUTED 29f8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 29fc: 1a000007 bne 2a20 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 2a00: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 2a04: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2a08: 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; 2a0c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2a10: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2a14: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2a18: e3a09001 mov r9, #1 <== NOT EXECUTED 2a1c: ea000005 b 2a38 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2a20: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2a24: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a28: 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]) { 2a2c: 0afffff8 beq 2a14 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2a30: e3590000 cmp r9, #0 <== NOT EXECUTED 2a34: 0a000015 beq 2a90 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2a38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a3c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2a40: e3530020 cmp r3, #32 <== NOT EXECUTED 2a44: 1a00005e bne 2bc4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2a48: e10f7000 mrs r7, CPSR <== NOT EXECUTED 2a4c: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 2a50: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2a54: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2a58: 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; 2a5c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2a60: 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; 2a64: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2a68: 0a000006 beq 2a88 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 2a6c: 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, 2a70: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2a74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2a78: e0811003 add r1, r1, r3 <== NOT EXECUTED 2a7c: e3a02001 mov r2, #1 <== NOT EXECUTED 2a80: e1a0e00f mov lr, pc <== NOT EXECUTED 2a84: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2a88: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 2a8c: ea00004c b 2bc4 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2a90: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2a94: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2a98: e2800001 add r0, r0, #1 <== NOT EXECUTED 2a9c: eb004ec7 bl 165c0 <__umodsi3> <== NOT EXECUTED 2aa0: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2aa4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2aa8: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 2aac: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2ab0: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 2ab4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2ab8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 2abc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2ac0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2ac4: e0800007 add r0, r0, r7 <== NOT EXECUTED 2ac8: eb004ebc bl 165c0 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 2acc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 2ad0: e1500003 cmp r0, r3 <== NOT EXECUTED 2ad4: 9a000025 bls 2b70 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 2ad8: 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) 2adc: e3130001 tst r3, #1 <== NOT EXECUTED 2ae0: 1a000022 bne 2b70 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 2ae4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ae8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2aec: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 2af0: e59f3104 ldr r3, [pc, #260] ; 2bfc <== NOT EXECUTED 2af4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2af8: e0023003 and r3, r2, r3 <== NOT EXECUTED 2afc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2b00: 1a00000e bne 2b40 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 2b04: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b08: e3130020 tst r3, #32 <== NOT EXECUTED 2b0c: 1a000002 bne 2b1c <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2b10: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2b14: e3530000 cmp r3, #0 <== NOT EXECUTED 2b18: 1a000014 bne 2b70 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2b1c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b20: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2b24: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2b28: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2b2c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2b30: e3a02001 mov r2, #1 <== NOT EXECUTED 2b34: e1a0e00f mov lr, pc <== NOT EXECUTED 2b38: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2b3c: ea00000b b 2b70 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2b40: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b44: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2b48: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2b4c: 1a000007 bne 2b70 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2b50: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2b54: 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; 2b58: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2b5c: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2b60: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2b64: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2b68: 11a0e00f movne lr, pc <== NOT EXECUTED 2b6c: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2b74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2b78: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2b7c: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 2b80: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2b84: 0a00000e beq 2bc4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2b88: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2b8c: 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 )) { 2b90: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2b94: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2b98: 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 )) { 2b9c: 1a000008 bne 2bc4 <== NOT EXECUTED 2ba0: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2ba4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ba8: 0a000005 beq 2bc4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2bac: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2bb0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2bb4: e1a0e00f mov lr, pc <== NOT EXECUTED 2bb8: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 2bbc: e3a02001 mov r2, #1 <== NOT EXECUTED 2bc0: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 2bc4: e2866001 add r6, r6, #1 <== NOT EXECUTED 2bc8: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2bcc: e3580000 cmp r8, #0 <== NOT EXECUTED 2bd0: 1affff82 bne 29e0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 2bd4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2bd8: e0833005 add r3, r3, r5 <== NOT EXECUTED 2bdc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 2be0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2be4: eb0007e5 bl 4b80 <== NOT EXECUTED return dropped; 2be8: ea000000 b 2bf0 <== NOT EXECUTED 2bec: e3a05000 mov r5, #0 <== NOT EXECUTED } 2bf0: e1a00005 mov r0, r5 <== NOT EXECUTED 2bf4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED 00003724 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3724: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3728: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 372c: 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; 3730: e580100c str r1, [r0, #12] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3734: e5934034 ldr r4, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 3738: 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); 373c: e1a02001 mov r2, r1 3740: 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; 3744: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3748: eb0004c6 bl 4a68 if (sc != RTEMS_SUCCESSFUL) { 374c: e2506000 subs r6, r0, #0 3750: 1a0000d7 bne 3ab4 args->ioctl_return = sc; return sc; } switch (args->command) { 3754: e5953004 ldr r3, [r5, #4] 3758: e3530004 cmp r3, #4 375c: 0a0000ab beq 3a10 3760: 8a000005 bhi 377c 3764: e3530002 cmp r3, #2 3768: 0a000029 beq 3814 376c: 8a0000a0 bhi 39f4 3770: e3530001 cmp r3, #1 3774: 1a000010 bne 37bc 3778: ea00001b b 37ec 377c: e59f233c ldr r2, [pc, #828] ; 3ac0 <== NOT EXECUTED 3780: e1530002 cmp r3, r2 <== NOT EXECUTED 3784: 0a0000bd beq 3a80 <== NOT EXECUTED 3788: 8a000002 bhi 3798 <== NOT EXECUTED 378c: e3530005 cmp r3, #5 <== NOT EXECUTED 3790: 1a000009 bne 37bc <== NOT EXECUTED 3794: ea000099 b 3a00 <== NOT EXECUTED 3798: e59f2324 ldr r2, [pc, #804] ; 3ac4 <== NOT EXECUTED 379c: 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; 37a0: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 37a4: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37a8: 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) { 37ac: 0a0000be beq 3aac <== NOT EXECUTED 37b0: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 37b4: e1530002 cmp r3, r2 <== NOT EXECUTED 37b8: 0a000098 beq 3a20 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 37bc: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37c0: e59f3300 ldr r3, [pc, #768] ; 3ac8 <== NOT EXECUTED 37c4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 37c8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 37cc: e3530000 cmp r3, #0 <== NOT EXECUTED 37d0: 03a0600a moveq r6, #10 <== NOT EXECUTED 37d4: 0a0000b4 beq 3aac <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 37d8: e1a00004 mov r0, r4 <== NOT EXECUTED 37dc: e1a01005 mov r1, r5 <== NOT EXECUTED 37e0: e1a0e00f mov lr, pc <== NOT EXECUTED 37e4: e12fff13 bx r3 <== NOT EXECUTED 37e8: ea0000a2 b 3a78 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 37ec: e5957008 ldr r7, [r5, #8] 37f0: e284c030 add ip, r4, #48 ; 0x30 37f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 37f8: e1a0e007 mov lr, r7 37fc: e8ae000f stmia lr!, {r0, r1, r2, r3} 3800: e8bc000f ldm ip!, {r0, r1, r2, r3} 3804: e8ae000f stmia lr!, {r0, r1, r2, r3} 3808: e59c3000 ldr r3, [ip] 380c: e58e3000 str r3, [lr] break; 3810: ea0000a5 b 3aac case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3814: e595e008 ldr lr, [r5, #8] 3818: e8be000f ldm lr!, {r0, r1, r2, r3} 381c: e284c030 add ip, r4, #48 ; 0x30 3820: e8ac000f stmia ip!, {r0, r1, r2, r3} 3824: e8be000f ldm lr!, {r0, r1, r2, r3} 3828: 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) && 382c: 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; 3830: 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) && 3834: 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; 3838: 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) && 383c: 0a000019 beq 38a8 3840: e5943030 ldr r3, [r4, #48] ; 0x30 3844: e3130b01 tst r3, #1024 ; 0x400 3848: 1a000016 bne 38a8 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 384c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3850: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3854: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3858: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 385c: e3130020 tst r3, #32 <== NOT EXECUTED 3860: 0a000010 beq 38a8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3864: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3868: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 386c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3870: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3874: 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; 3878: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 387c: 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; 3880: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3884: 0a000006 beq 38a4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3888: 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, 388c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3890: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3894: e0811003 add r1, r1, r3 <== NOT EXECUTED 3898: e3a02001 mov r2, #1 <== NOT EXECUTED 389c: e1a0e00f mov lr, pc <== NOT EXECUTED 38a0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 38a4: 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) && 38a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38ac: e3130b01 tst r3, #1024 ; 0x400 38b0: 0a000008 beq 38d8 38b4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 38b8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 38bc: 1a000005 bne 38d8 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 38c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38c4: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 38c8: 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); 38cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38d0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 38d4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 38d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38dc: e3130c01 tst r3, #256 ; 0x100 38e0: 0a000010 beq 3928 38e4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 38e8: e3530000 cmp r3, #0 <== NOT EXECUTED 38ec: ba00000d blt 3928 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 38f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38f4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 38f8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 38fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3900: e3130004 tst r3, #4 <== NOT EXECUTED 3904: 0a000004 beq 391c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 3908: 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) && 390c: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 3910: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3914: 11a0e00f movne lr, pc <== NOT EXECUTED 3918: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 391c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3920: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3924: 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) { 3928: e5943038 ldr r3, [r4, #56] ; 0x38 392c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3930: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3934: b3833c01 orrlt r3, r3, #256 ; 0x100 3938: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 393c: e5943030 ldr r3, [r4, #48] ; 0x30 3940: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3944: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3948: 13833b01 orrne r3, r3, #1024 ; 0x400 394c: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3950: e5943030 ldr r3, [r4, #48] ; 0x30 3954: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3958: 159430b8 ldrne 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) { 395c: e594703c ldr r7, [r4, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 3960: 13833c02 orrne r3, r3, #512 ; 0x200 3964: 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) { 3968: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 396c: 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) { 3970: 1a000014 bne 39c8 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; 3974: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3978: eb0002a5 bl 4414 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 397c: e3a0100a mov r1, #10 <== NOT EXECUTED 3980: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3984: eb004a79 bl 16370 <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3988: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 398c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3990: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3994: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3998: 0a000006 beq 39b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 399c: e3520000 cmp r2, #0 <== NOT EXECUTED 39a0: 01a02000 moveq r2, r0 <== NOT EXECUTED 39a4: 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; 39a8: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 39ac: 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; 39b0: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 39b4: ea000006 b 39d4 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 39b8: 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; 39bc: 03a03001 moveq r3, #1 <== NOT EXECUTED 39c0: 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]) { 39c4: 0a000002 beq 39d4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 39c8: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 39cc: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 39d0: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 39d4: e59430a8 ldr r3, [r4, #168] ; 0xa8 39d8: e3530000 cmp r3, #0 39dc: 0a000032 beq 3aac (*tty->device.setAttributes)(tty->minor, &tty->termios); 39e0: e5940010 ldr r0, [r4, #16] 39e4: e2841030 add r1, r4, #48 ; 0x30 39e8: e1a0e00f mov lr, pc 39ec: e12fff13 bx r3 39f0: ea00002d b 3aac break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 39f4: e1a00004 mov r0, r4 39f8: ebfffe5a bl 3368 break; 39fc: ea00002a b 3aac case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3a00: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a04: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 3a08: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 3a0c: ea000026 b 3aac <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3a10: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a14: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3a18: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 3a1c: ea000022 b 3aac <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3a20: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3a24: e59f309c ldr r3, [pc, #156] ; 3ac8 <== NOT EXECUTED 3a28: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3a2c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3a30: e3530000 cmp r3, #0 <== NOT EXECUTED 3a34: 0a000003 beq 3a48 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3a38: e1a00004 mov r0, r4 <== NOT EXECUTED 3a3c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a40: e12fff13 bx r3 <== NOT EXECUTED 3a44: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3a48: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 3a4c: 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) { 3a50: e59f3070 ldr r3, [pc, #112] ; 3ac8 <== NOT EXECUTED 3a54: e7933282 ldr r3, [r3, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3a58: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3a5c: e3530000 cmp r3, #0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3a60: e58410d0 str r1, [r4, #208] ; 0xd0 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 3a64: 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) { 3a68: 0a00000f beq 3aac <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3a6c: e1a00004 mov r0, r4 <== NOT EXECUTED 3a70: e1a0e00f mov lr, pc <== NOT EXECUTED 3a74: e12fff13 bx r3 <== NOT EXECUTED 3a78: e1a06000 mov r6, r0 <== NOT EXECUTED 3a7c: ea00000a b 3aac <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3a80: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3a84: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3a88: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3a8c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 3a90: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3a94: e2842020 add r2, r4, #32 <== NOT EXECUTED 3a98: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 3a9c: e0411002 sub r1, r1, r2 <== NOT EXECUTED 3aa0: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3aa4: e0813003 add r3, r1, r3 <== NOT EXECUTED 3aa8: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 3aac: e5940018 ldr r0, [r4, #24] 3ab0: eb000432 bl 4b80 args->ioctl_return = sc; 3ab4: e585600c str r6, [r5, #12] return sc; } 3ab8: e1a00006 mov r0, r6 3abc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00003c64 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3c64: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3c68: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3c6c: e59f23e0 ldr r2, [pc, #992] ; 4054 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3c70: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3c74: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3c78: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3c7c: e5920000 ldr r0, [r2] 3c80: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3c84: e1a0b003 mov fp, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3c88: eb000376 bl 4a68 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3c8c: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3c90: 059f33c0 ldreq r3, [pc, #960] ; 4058 3c94: 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) 3c98: 0a000007 beq 3cbc 3c9c: ea0000e2 b 402c <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 3ca0: e595300c ldr r3, [r5, #12] 3ca4: e1530009 cmp r3, r9 3ca8: 1a000002 bne 3cb8 3cac: e5953010 ldr r3, [r5, #16] 3cb0: e153000a cmp r3, sl 3cb4: 0a0000bb beq 3fa8 */ 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) { 3cb8: e5955000 ldr r5, [r5] 3cbc: e3550000 cmp r5, #0 3cc0: 1afffff6 bne 3ca0 3cc4: ea0000da b 4034 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 3cc8: e59f738c ldr r7, [pc, #908] ; 405c 3ccc: e5973004 ldr r3, [r7, #4] 3cd0: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3cd4: e5950064 ldr r0, [r5, #100] ; 0x64 3cd8: ebfff7cc bl 1c10 if (tty->rawInBuf.theBuf == NULL) { 3cdc: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 3ce0: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 3ce4: 1a000006 bne 3d04 free(tty); 3ce8: e1a00005 mov r0, r5 <== NOT EXECUTED 3cec: ebfff715 bl 1948 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 3cf0: e59f335c ldr r3, [pc, #860] ; 4054 <== NOT EXECUTED 3cf4: e5930000 ldr r0, [r3] <== NOT EXECUTED 3cf8: eb0003a0 bl 4b80 <== NOT EXECUTED 3cfc: e3a0601a mov r6, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 3d00: ea0000c9 b 402c <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 3d04: e5973008 ldr r3, [r7, #8] 3d08: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3d0c: e5950088 ldr r0, [r5, #136] ; 0x88 3d10: ebfff7be bl 1c10 if (tty->rawOutBuf.theBuf == NULL) { 3d14: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3d18: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 3d1c: 0a000006 beq 3d3c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3d20: e5970000 ldr r0, [r7] 3d24: ebfff7b9 bl 1c10 if (tty->cbuf == NULL) { 3d28: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3d2c: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 3d30: 1a000004 bne 3d48 free((void *)(tty->rawOutBuf.theBuf)); 3d34: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3d38: ebfff702 bl 1948 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3d3c: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 3d40: ebfff700 bl 1948 <== NOT EXECUTED 3d44: eaffffe7 b 3ce8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3d48: e59f3308 ldr r3, [pc, #776] ; 4058 3d4c: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3d50: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3d54: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3d58: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3d5c: 15825004 strne r5, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3d60: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3d64: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3d68: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 3d6c: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 3d70: 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) 3d74: e59f32e4 ldr r3, [pc, #740] ; 4060 3d78: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3d7c: e59f72d8 ldr r7, [pc, #728] ; 405c 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) 3d80: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3d84: 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; 3d88: e59f22c8 ldr r2, [pc, #712] ; 4058 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3d8c: e5d7300c ldrb r3, [r7, #12] 3d90: e59f02cc ldr r0, [pc, #716] ; 4064 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3d94: e5824000 str r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3d98: e1830000 orr r0, r3, r0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 3d9c: e584a010 str sl, [r4, #16] tty->major = major; 3da0: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3da4: e284c014 add ip, r4, #20 3da8: e3a03000 mov r3, #0 3dac: e3a01001 mov r1, #1 3db0: e3a02054 mov r2, #84 ; 0x54 3db4: e58dc000 str ip, [sp] 3db8: eb000298 bl 4820 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) 3dbc: e2503000 subs r3, r0, #0 3dc0: 1a000095 bne 401c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3dc4: e5d7200c ldrb r2, [r7, #12] 3dc8: e59f0298 ldr r0, [pc, #664] ; 4068 3dcc: e284c018 add ip, r4, #24 3dd0: e1820000 orr r0, r2, r0 3dd4: e3a01001 mov r1, #1 3dd8: e3a02054 mov r2, #84 ; 0x54 3ddc: e58dc000 str ip, [sp] 3de0: eb00028e bl 4820 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) 3de4: e2501000 subs r1, r0, #0 3de8: 1a00008b bne 401c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 3dec: e5d7300c ldrb r3, [r7, #12] 3df0: e59f0274 ldr r0, [pc, #628] ; 406c 3df4: e284c08c add ip, r4, #140 ; 0x8c 3df8: e1830000 orr r0, r3, r0 3dfc: e3a02020 mov r2, #32 3e00: e1a03001 mov r3, r1 3e04: e58dc000 str ip, [sp] 3e08: eb000284 bl 4820 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3e0c: e250e000 subs lr, r0, #0 3e10: 1a000081 bne 401c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3e14: e8bb000f ldm fp!, {r0, r1, r2, r3} 3e18: e284c098 add ip, r4, #152 ; 0x98 3e1c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3e20: e89b000f ldm fp, {r0, r1, r2, r3} 3e24: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3e28: e59430b4 ldr r3, [r4, #180] ; 0xb4 3e2c: e3530002 cmp r3, #2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 3e30: e584e094 str lr, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3e34: 1a000017 bne 3e98 sc = rtems_task_create ( 3e38: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e3c: e59f022c ldr r0, [pc, #556] ; 4070 <== NOT EXECUTED 3e40: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3e44: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e48: e3a0100a mov r1, #10 <== NOT EXECUTED 3e4c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e50: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e54: e58de000 str lr, [sp] <== NOT EXECUTED 3e58: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e5c: eb00036e bl 4c1c <== 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) 3e60: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3e64: 1a00006c bne 401c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3e68: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e6c: e59f0200 ldr r0, [pc, #512] ; 4074 <== NOT EXECUTED 3e70: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3e74: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e78: e3a01009 mov r1, #9 <== NOT EXECUTED 3e7c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e80: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e84: e58de000 str lr, [sp] <== NOT EXECUTED 3e88: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e8c: eb000362 bl 4c1c <== 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) 3e90: e3500000 cmp r0, #0 <== NOT EXECUTED 3e94: 1a000060 bne 401c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3e98: e59430a0 ldr r3, [r4, #160] ; 0xa0 3e9c: e3530000 cmp r3, #0 3ea0: 0a000002 beq 3eb0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3ea4: e59430b4 ldr r3, [r4, #180] ; 0xb4 3ea8: e3530002 cmp r3, #2 3eac: 1a00000b bne 3ee0 sc = rtems_semaphore_create ( 3eb0: e59f31a4 ldr r3, [pc, #420] ; 405c <== NOT EXECUTED 3eb4: e59f01bc ldr r0, [pc, #444] ; 4078 <== NOT EXECUTED 3eb8: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 3ebc: e3a01000 mov r1, #0 <== NOT EXECUTED 3ec0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3ec4: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 3ec8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3ecc: e1a03001 mov r3, r1 <== NOT EXECUTED 3ed0: e58dc000 str ip, [sp] <== NOT EXECUTED 3ed4: eb000251 bl 4820 <== 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) 3ed8: e3500000 cmp r0, #0 <== NOT EXECUTED 3edc: 1a00004e bne 401c <== NOT EXECUTED 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'; 3ee0: e3a03000 mov r3, #0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 3ee4: e58430b8 str r3, [r4, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3ee8: e5941064 ldr r1, [r4, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 3eec: e594c064 ldr ip, [r4, #100] ; 0x64 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'; 3ef0: e3a02003 mov r2, #3 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; 3ef4: e0000c92 mul r0, r2, ip 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'; 3ef8: e3a0c01c mov ip, #28 3efc: e5c4c042 strb ip, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 3f00: e28cc063 add ip, ip, #99 ; 0x63 3f04: e5c4c043 strb ip, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 3f08: e3a0c015 mov ip, #21 3f0c: e5c4c044 strb ip, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 3f10: e3a0c004 mov ip, #4 3f14: e5c4c045 strb ip, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3f18: e28cc00d add ip, ip, #13 3f1c: e5c4c049 strb ip, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 3f20: e28cc002 add ip, ip, #2 3f24: e5c4c04a strb ip, [r4, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3f28: e28cc007 add ip, ip, #7 3f2c: e5c4c04b strb ip, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 3f30: e3a0c012 mov ip, #18 3f34: e5c4c04d strb ip, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3f38: e3a0c00f mov ip, #15 3f3c: e5c4c04e strb ip, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 3f40: e28cc008 add ip, ip, #8 3f44: e5c4c04f strb ip, [r4, #79] ; 0x4f tty->termios.c_cc[VLNEXT] = '\026'; 3f48: e3a0c016 mov ip, #22 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'; 3f4c: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3f50: e5c43051 strb r3, [r4, #81] ; 0x51 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'; 3f54: e5c4c050 strb ip, [r4, #80] ; 0x50 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'; 3f58: e5c42041 strb r2, [r4, #65] ; 0x41 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3f5c: e59f30f8 ldr r3, [pc, #248] ; 405c 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; 3f60: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 3f64: 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; 3f68: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3f6c: e59f0108 ldr r0, [pc, #264] ; 407c 3f70: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3f74: e59f0104 ldr r0, [pc, #260] ; 4080 3f78: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3f7c: e59f0100 ldr r0, [pc, #256] ; 4084 3f80: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3f84: e59f00fc ldr r0, [pc, #252] ; 4088 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3f88: e352007a cmp r2, #122 ; 0x7a /* 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; 3f8c: e1a010a1 lsr r1, r1, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3f90: e2822001 add r2, r2, #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; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3f94: e584003c str r0, [r4, #60] ; 0x3c /* 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; 3f98: e58410bc str r1, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3f9c: e5c3200c strb r2, [r3, #12] c = 'a'; 3fa0: 03a02061 moveq r2, #97 ; 0x61 3fa4: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 3fa8: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3fac: e5982000 ldr r2, [r8] if (!tty->refcount++) { 3fb0: e3530000 cmp r3, #0 3fb4: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3fb8: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 3fbc: e5853008 str r3, [r5, #8] 3fc0: 1a000016 bne 4020 if (tty->device.firstOpen) 3fc4: e5953098 ldr r3, [r5, #152] ; 0x98 3fc8: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 3fcc: 11a00009 movne r0, r9 3fd0: 11a0100a movne r1, sl 3fd4: 11a02008 movne r2, r8 3fd8: 11a0e00f movne lr, pc 3fdc: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3fe0: e59530b4 ldr r3, [r5, #180] ; 0xb4 3fe4: e3530002 cmp r3, #2 3fe8: 1a00000c bne 4020 sc = rtems_task_start(tty->rxTaskId, 3fec: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 3ff0: e59f1094 ldr r1, [pc, #148] ; 408c <== NOT EXECUTED 3ff4: e1a02005 mov r2, r5 <== NOT EXECUTED 3ff8: eb0003ac bl 4eb0 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3ffc: e3500000 cmp r0, #0 <== NOT EXECUTED 4000: 1a000005 bne 401c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 4004: e1a02005 mov r2, r5 <== NOT EXECUTED 4008: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 400c: e59f107c ldr r1, [pc, #124] ; 4090 <== NOT EXECUTED 4010: eb0003a6 bl 4eb0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 4014: e3500000 cmp r0, #0 <== NOT EXECUTED 4018: 0a000000 beq 4020 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 401c: eb000425 bl 50b8 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 4020: e59f302c ldr r3, [pc, #44] ; 4054 4024: e5930000 ldr r0, [r3] 4028: eb0002d4 bl 4b80 return RTEMS_SUCCESSFUL; } 402c: e1a00006 mov r0, r6 4030: e8bd8ffc pop {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)); 4034: e3a00001 mov r0, #1 4038: e3a010e8 mov r1, #232 ; 0xe8 403c: eb0013c7 bl 8f60 if (tty == NULL) { 4040: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 4044: e1a05000 mov r5, r0 4048: e1a04000 mov r4, r0 if (tty == NULL) { 404c: 1affff1d bne 3cc8 4050: eaffff26 b 3cf0 <== NOT EXECUTED 00002c00 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2c00: e59230b4 ldr r3, [r2, #180] ; 0xb4 2c04: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 2c08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2c0c: e1a04002 mov r4, r2 2c10: e1a0a000 mov sl, r0 2c14: 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) { 2c18: 1a000005 bne 2c34 (*tty->device.write)(tty->minor, (void *)buf, len); 2c1c: e1a01000 mov r1, r0 2c20: e1a02006 mov r2, r6 2c24: e5940010 ldr r0, [r4, #16] 2c28: e1a0e00f mov lr, pc 2c2c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 2c30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 2c34: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2c38: 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; 2c3c: 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; 2c40: 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) { 2c44: ea00002e b 2d04 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2c48: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2c4c: e2850001 add r0, r5, #1 <== NOT EXECUTED 2c50: eb004e5a bl 165c0 <__umodsi3> <== NOT EXECUTED 2c54: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2c58: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c5c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c60: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2c64: ea00000a b 2c94 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2c68: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2c6c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2c70: e3a01000 mov r1, #0 <== NOT EXECUTED 2c74: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2c78: e1a02001 mov r2, r1 <== NOT EXECUTED 2c7c: eb000779 bl 4a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2c80: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2c84: 1b00090b blne 50b8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2c88: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c8c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c90: 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) { 2c94: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2c98: e1550003 cmp r5, r3 <== NOT EXECUTED 2c9c: 0afffff1 beq 2c68 <== 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++; 2ca0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2ca4: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2ca8: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2cac: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 2cb0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2cb4: e3530000 cmp r3, #0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 2cb8: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2cbc: 1a00000d bne 2cf8 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2cc0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2cc4: 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; 2cc8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ccc: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 2cd0: 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)) { 2cd4: 1a000006 bne 2cf4 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 2cd8: 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, 2cdc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2ce0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2ce4: e0811003 add r1, r1, r3 <== NOT EXECUTED 2ce8: e3a02001 mov r2, #1 <== NOT EXECUTED 2cec: e1a0e00f mov lr, pc <== NOT EXECUTED 2cf0: 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; 2cf4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2cf8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 2cfc: e2466001 sub r6, r6, #1 <== NOT EXECUTED 2d00: 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) { 2d04: e3560000 cmp r6, #0 <== NOT EXECUTED 2d08: 1affffce bne 2c48 <== NOT EXECUTED 2d0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 000033d4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 33d4: 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; 33d8: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 33dc: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 33e0: 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); 33e4: 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; 33e8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 33ec: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 33f0: e1a02001 mov r2, r1 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 33f4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 33f8: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 33fc: eb000599 bl 4a68 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 3400: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3404: 1a0000c1 bne 3710 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3408: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 340c: e59f3304 ldr r3, [pc, #772] ; 3718 <== NOT EXECUTED 3410: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3414: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3418: e3530000 cmp r3, #0 <== NOT EXECUTED 341c: 0a000005 beq 3438 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3420: e1a01005 mov r1, r5 <== NOT EXECUTED 3424: e1a00004 mov r0, r4 <== NOT EXECUTED 3428: e1a0e00f mov lr, pc <== NOT EXECUTED 342c: e12fff13 bx r3 <== NOT EXECUTED 3430: e1a06000 mov r6, r0 <== NOT EXECUTED 3434: ea0000b1 b 3700 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 3438: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 343c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3440: e1520003 cmp r2, r3 <== NOT EXECUTED 3444: 1a00009a bne 36b4 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 3448: 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; 344c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 3450: 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; 3454: 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; 3458: e5846020 str r6, [r4, #32] <== NOT EXECUTED 345c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 3460: 0a00003b beq 3554 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 3464: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3468: e3530000 cmp r3, #0 <== NOT EXECUTED 346c: 1a000038 bne 3554 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3470: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3474: e3130002 tst r3, #2 <== NOT EXECUTED 3478: 0a00000d beq 34b4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 347c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3480: e1a0e00f mov lr, pc <== NOT EXECUTED 3484: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 3488: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 348c: e1a01004 mov r1, r4 <== NOT EXECUTED 3490: 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) { 3494: aa000002 bge 34a4 <== NOT EXECUTED rtems_task_wake_after (1); 3498: e3a00001 mov r0, #1 <== NOT EXECUTED 349c: eb00069b bl 4f10 <== NOT EXECUTED 34a0: eafffff5 b 347c <== NOT EXECUTED } else { if (siproc (n, tty)) 34a4: ebffff67 bl 3248 <== NOT EXECUTED 34a8: e3500000 cmp r0, #0 <== NOT EXECUTED 34ac: 0afffff2 beq 347c <== NOT EXECUTED 34b0: ea00007f b 36b4 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 34b4: eb0003de bl 4434 <== NOT EXECUTED 34b8: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 34bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 34c0: e1a0e00f mov lr, pc <== NOT EXECUTED 34c4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 34c8: e3500000 cmp r0, #0 <== NOT EXECUTED 34cc: aa000013 bge 3520 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 34d0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 34d4: e3530000 cmp r3, #0 <== NOT EXECUTED 34d8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 34dc: 0a000005 beq 34f8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 34e0: e3530000 cmp r3, #0 <== NOT EXECUTED 34e4: 0a00000a beq 3514 <== NOT EXECUTED 34e8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 34ec: e3530000 cmp r3, #0 <== NOT EXECUTED 34f0: 0a000007 beq 3514 <== NOT EXECUTED 34f4: ea000001 b 3500 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 34f8: e3530000 cmp r3, #0 <== NOT EXECUTED 34fc: 0a00006c beq 36b4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 3500: eb0003cb bl 4434 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 3504: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3508: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 350c: e1500003 cmp r0, r3 <== NOT EXECUTED 3510: 8a000067 bhi 36b4 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 3514: e3a00001 mov r0, #1 <== NOT EXECUTED 3518: eb00067c bl 4f10 <== NOT EXECUTED 351c: eaffffe6 b 34bc <== NOT EXECUTED } else { siproc (n, tty); 3520: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3524: e1a01004 mov r1, r4 <== NOT EXECUTED 3528: ebffff46 bl 3248 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 352c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3530: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3534: e1520003 cmp r2, r3 <== NOT EXECUTED 3538: aa00005d bge 36b4 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 353c: e3530000 cmp r3, #0 <== NOT EXECUTED 3540: 0affffdd beq 34bc <== NOT EXECUTED 3544: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3548: e3530000 cmp r3, #0 <== NOT EXECUTED 354c: 0affffda beq 34bc <== NOT EXECUTED 3550: eaffffd7 b 34b4 <== 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; 3554: 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, 3558: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 355c: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3560: e59f91b4 ldr r9, [pc, #436] ; 371c <== NOT EXECUTED 3564: ea000041 b 3670 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 3568: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 356c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3570: e2800001 add r0, r0, #1 <== NOT EXECUTED 3574: eb004c11 bl 165c0 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 3578: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 357c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 3580: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3584: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3588: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 358c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3590: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 3594: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3598: eb004c08 bl 165c0 <__umodsi3> <== NOT EXECUTED 359c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 35a0: e1500003 cmp r0, r3 <== NOT EXECUTED 35a4: 2a00001f bcs 3628 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 35a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 35ac: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 35b0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 35b4: e59f3164 ldr r3, [pc, #356] ; 3720 <== NOT EXECUTED 35b8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 35bc: e59f015c ldr r0, [pc, #348] ; 3720 <== NOT EXECUTED 35c0: e0023003 and r3, r2, r3 <== NOT EXECUTED 35c4: e1530000 cmp r3, r0 <== NOT EXECUTED 35c8: 1a00000b bne 35fc <== NOT EXECUTED 35cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 35d0: e3530000 cmp r3, #0 <== NOT EXECUTED 35d4: 0a000002 beq 35e4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 35d8: 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)) 35dc: e3130020 tst r3, #32 <== NOT EXECUTED 35e0: 0a000005 beq 35fc <== 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, 35e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 35e8: e1a0100b mov r1, fp <== NOT EXECUTED 35ec: e3a02001 mov r2, #1 <== NOT EXECUTED 35f0: e1a0e00f mov lr, pc <== NOT EXECUTED 35f4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 35f8: ea00000a b 3628 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 35fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3600: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3604: 0a000007 beq 3628 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 3608: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 360c: 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; 3610: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3614: 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; 3618: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 361c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3620: 11a0e00f movne lr, pc <== NOT EXECUTED 3624: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3628: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 362c: e3130002 tst r3, #2 <== NOT EXECUTED 3630: 0a000005 beq 364c <== NOT EXECUTED if (siproc (c, tty)) 3634: e1a00008 mov r0, r8 <== NOT EXECUTED 3638: e1a01004 mov r1, r4 <== NOT EXECUTED 363c: ebffff01 bl 3248 <== NOT EXECUTED 3640: e3500000 cmp r0, #0 <== NOT EXECUTED 3644: 1a000007 bne 3668 <== NOT EXECUTED 3648: ea000007 b 366c <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 364c: e1a00008 mov r0, r8 <== NOT EXECUTED 3650: e1a01004 mov r1, r4 <== NOT EXECUTED 3654: ebfffefb bl 3248 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3658: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 365c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3660: e1520003 cmp r2, r3 <== NOT EXECUTED 3664: ba000000 blt 366c <== NOT EXECUTED 3668: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 366c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3670: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3674: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3678: e1520003 cmp r2, r3 <== NOT EXECUTED 367c: 0a000004 beq 3694 <== NOT EXECUTED 3680: e5993000 ldr r3, [r9] <== NOT EXECUTED 3684: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3688: e2433001 sub r3, r3, #1 <== NOT EXECUTED 368c: e1520003 cmp r2, r3 <== NOT EXECUTED 3690: baffffb4 blt 3568 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 3694: e35a0000 cmp sl, #0 <== NOT EXECUTED 3698: 0a000005 beq 36b4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 369c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 36a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 36a4: e1a02008 mov r2, r8 <== NOT EXECUTED 36a8: eb0004ee bl 4a68 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 36ac: e3500000 cmp r0, #0 <== NOT EXECUTED 36b0: 0affffee beq 3670 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 36b4: e3a03000 mov r3, #0 <== NOT EXECUTED 36b8: ea000007 b 36dc <== 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++]; 36bc: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 36c0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 36c4: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 36c8: e2822001 add r2, r2, #1 <== NOT EXECUTED 36cc: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 36d0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 36d4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 36d8: 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)) { 36dc: e3570000 cmp r7, #0 <== NOT EXECUTED 36e0: 0a000003 beq 36f4 <== NOT EXECUTED 36e4: e2841020 add r1, r4, #32 <== NOT EXECUTED 36e8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 36ec: e1520001 cmp r2, r1 <== NOT EXECUTED 36f0: bafffff1 blt 36bc <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 36f4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 36f8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 36fc: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 3700: e3a03000 mov r3, #0 <== NOT EXECUTED 3704: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 3708: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 370c: eb00051b bl 4b80 <== NOT EXECUTED return sc; } 3710: e1a00006 mov r0, r6 <== NOT EXECUTED 3714: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 000026e0 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 26e0: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 26e4: e59f31d0 ldr r3, [pc, #464] ; 28bc <== NOT EXECUTED 26e8: e0023003 and r3, r2, r3 <== NOT EXECUTED 26ec: e59f21cc ldr r2, [pc, #460] ; 28c0 <== NOT EXECUTED 26f0: e1530002 cmp r3, r2 <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 26f4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 26f8: 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)) 26fc: 1a00000e bne 273c <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 2700: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2704: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 2708: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 270c: e1a0e00f mov lr, pc <== NOT EXECUTED 2710: 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 ( 2714: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2718: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 271c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 2720: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2724: 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--; 2728: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 272c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 2730: 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--; 2734: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 2738: ea000011 b 2784 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 273c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2740: e2033003 and r3, r3, #3 <== NOT EXECUTED 2744: e3530002 cmp r3, #2 <== NOT EXECUTED 2748: 1a000010 bne 2790 <== 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, 274c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2750: e3a02001 mov r2, #1 <== NOT EXECUTED 2754: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2758: e1a0e00f mov lr, pc <== NOT EXECUTED 275c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2760: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2764: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2768: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 276c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2770: 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--; 2774: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2778: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 277c: 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--; 2780: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2784: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2788: e3a05001 mov r5, #1 <== NOT EXECUTED 278c: ea000048 b 28b4 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2790: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2794: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 2798: e1520003 cmp r2, r3 <== NOT EXECUTED 279c: 1a000005 bne 27b8 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 27a0: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 27a4: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 27a8: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 27ac: 0b0008f3 bleq 4b80 <== NOT EXECUTED 27b0: e3a05000 mov r5, #0 <== NOT EXECUTED 27b4: ea00003e b 28b4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 27b8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 27bc: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 27c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 27c4: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 27c8: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 27cc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 27d0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 27d4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 27d8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 27dc: e0800003 add r0, r0, r3 <== NOT EXECUTED 27e0: eb004f76 bl 165c0 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 27e4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 27e8: e3530002 cmp r3, #2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 27ec: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 27f0: 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); 27f4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 27f8: 0b0008e0 bleq 4b80 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 27fc: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2800: e1560003 cmp r6, r3 <== NOT EXECUTED 2804: 1a00000a bne 2834 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2808: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 280c: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2810: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2814: 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) { 2818: 01a05003 moveq r5, r3 <== NOT EXECUTED 281c: 0a000023 beq 28b0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2820: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2824: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2828: e1a0e00f mov lr, pc <== NOT EXECUTED 282c: e12fff13 bx r3 <== NOT EXECUTED 2830: ea00001e b 28b0 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 2834: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2838: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 283c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2840: 1a00000a bne 2870 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2844: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2848: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 284c: 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; 2850: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2854: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2858: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 285c: e3a02001 mov r2, #1 <== NOT EXECUTED 2860: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2864: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2868: e3a05000 mov r5, #0 <== NOT EXECUTED 286c: ea00000f b 28b0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2870: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2874: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2878: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 287c: 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)) { 2880: 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; 2884: 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)) { 2888: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 288c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 2890: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2894: e3a03001 mov r3, #1 <== NOT EXECUTED 2898: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 289c: e0811006 add r1, r1, r6 <== NOT EXECUTED 28a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 28a4: e1a02005 mov r2, r5 <== NOT EXECUTED 28a8: e1a0e00f mov lr, pc <== NOT EXECUTED 28ac: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 28b0: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 28b4: e1a00005 mov r0, r5 <== NOT EXECUTED 28b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00004100 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 4100: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 4104: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4108: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 410c: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4110: e1a0300d mov r3, sp <== NOT EXECUTED 4114: e3a01002 mov r1, #2 <== NOT EXECUTED 4118: e3a02000 mov r2, #0 <== NOT EXECUTED 411c: e3a00003 mov r0, #3 <== NOT EXECUTED 4120: eb0000e0 bl 44a8 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 4124: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4128: e3130001 tst r3, #1 <== NOT EXECUTED 412c: 0a000003 beq 4140 <== NOT EXECUTED tty->rxTaskId = 0; 4130: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4134: e1a00005 mov r0, r5 <== NOT EXECUTED 4138: eb000309 bl 4d64 <== NOT EXECUTED 413c: eafffff3 b 4110 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 4140: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4144: e1a0e00f mov lr, pc <== NOT EXECUTED 4148: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 414c: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 4150: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 4154: 0affffed beq 4110 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4158: e1a00004 mov r0, r4 <== NOT EXECUTED 415c: e1a01006 mov r1, r6 <== NOT EXECUTED 4160: 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; 4164: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 4168: ebfff9f1 bl 2934 <== NOT EXECUTED 416c: eaffffe7 b 4110 <== NOT EXECUTED 000026d4 : 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); 26d4: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 26d8: e3a01002 mov r1, #2 <== NOT EXECUTED 26dc: ea0007cd b 4618 <== NOT EXECUTED 00004094 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 4094: 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) { 4098: e59f705c ldr r7, [pc, #92] ; 40fc <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 409c: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40a0: e3a05000 mov r5, #0 <== NOT EXECUTED 40a4: e1a0300d mov r3, sp <== NOT EXECUTED 40a8: e3a01002 mov r1, #2 <== NOT EXECUTED 40ac: e3a02000 mov r2, #0 <== NOT EXECUTED 40b0: e3a00003 mov r0, #3 <== NOT EXECUTED 40b4: eb0000fb bl 44a8 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 40bc: e3130001 tst r3, #1 <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 40c0: 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) { 40c4: 0a000003 beq 40d8 <== NOT EXECUTED tty->txTaskId = 0; 40c8: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40cc: e1a00005 mov r0, r5 <== NOT EXECUTED 40d0: eb000323 bl 4d64 <== NOT EXECUTED 40d4: eafffff2 b 40a4 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40d8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 40dc: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 40e0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 40e4: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40e8: 11a0e00f movne lr, pc <== NOT EXECUTED 40ec: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40f0: e1a00004 mov r0, r4 <== NOT EXECUTED 40f4: ebfff979 bl 26e0 <== NOT EXECUTED 40f8: eaffffe9 b 40a4 <== NOT EXECUTED 000032a8 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32a8: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 32ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32b0: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32b4: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 32b8: 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); 32bc: e1a02001 mov r2, r1 32c0: e5950018 ldr r0, [r5, #24] 32c4: eb0005e7 bl 4a68 if (sc != RTEMS_SUCCESSFUL) 32c8: e2506000 subs r6, r0, #0 32cc: 1a000022 bne 335c return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 32d0: e59520cc ldr r2, [r5, #204] ; 0xcc 32d4: e59f3088 ldr r3, [pc, #136] ; 3364 32d8: e0833282 add r3, r3, r2, lsl #5 32dc: e593300c ldr r3, [r3, #12] 32e0: e3530000 cmp r3, #0 32e4: 0a000005 beq 3300 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 32e8: e1a01004 mov r1, r4 <== NOT EXECUTED 32ec: e1a00005 mov r0, r5 <== NOT EXECUTED 32f0: e1a0e00f mov lr, pc <== NOT EXECUTED 32f4: e12fff13 bx r3 <== NOT EXECUTED 32f8: e1a06000 mov r6, r0 <== NOT EXECUTED 32fc: ea000014 b 3354 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 3300: e5953034 ldr r3, [r5, #52] ; 0x34 3304: e3130001 tst r3, #1 uint32_t count = args->count; 3308: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 330c: 1594a00c ldrne sl, [r4, #12] 3310: 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) { 3314: 1a000004 bne 332c 3318: ea000007 b 333c <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 331c: e7da0007 ldrb r0, [sl, r7] 3320: ebfffe7a bl 2d10 3324: e2877001 add r7, r7, #1 3328: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 332c: e3580000 cmp r8, #0 oproc (*buffer++, tty); 3330: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3334: 1afffff8 bne 331c 3338: ea000003 b 334c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 333c: e284000c add r0, r4, #12 <== NOT EXECUTED 3340: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3344: e1a02005 mov r2, r5 <== NOT EXECUTED 3348: ebfffe2c bl 2c00 <== NOT EXECUTED args->bytes_moved = args->count; 334c: e5943010 ldr r3, [r4, #16] 3350: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 3354: e5950018 ldr r0, [r5, #24] 3358: eb000608 bl 4b80 return sc; } 335c: e1a00006 mov r0, r6 3360: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 00006378 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 6378: 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) 637c: 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 ) { 6380: e1a06000 mov r6, r0 <== NOT EXECUTED 6384: e1a09001 mov r9, r1 <== NOT EXECUTED 6388: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 638c: 0a00000d beq 63c8 <== NOT EXECUTED { if (rtems_panic_in_progress++) 6390: e59f3160 ldr r3, [pc, #352] ; 64f8 <== NOT EXECUTED 6394: e5932000 ldr r2, [r3] <== NOT EXECUTED 6398: e3520000 cmp r2, #0 <== NOT EXECUTED 639c: e2822001 add r2, r2, #1 <== NOT EXECUTED 63a0: e5832000 str r2, [r3] <== NOT EXECUTED 63a4: 0a000003 beq 63b8 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 63a8: e59f314c ldr r3, [pc, #332] ; 64fc <== NOT EXECUTED 63ac: e5932000 ldr r2, [r3] <== NOT EXECUTED 63b0: e2822001 add r2, r2, #1 <== NOT EXECUTED 63b4: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 63b8: e59f3138 ldr r3, [pc, #312] ; 64f8 <== NOT EXECUTED 63bc: e5933000 ldr r3, [r3] <== NOT EXECUTED 63c0: e3530002 cmp r3, #2 <== NOT EXECUTED 63c4: ca000049 bgt 64f0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 63c8: e59f3130 ldr r3, [pc, #304] ; 6500 <== NOT EXECUTED 63cc: e5933000 ldr r3, [r3] <== NOT EXECUTED 63d0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 63d4: eb0034c7 bl 136f8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 63d8: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 63dc: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 63e0: 0a000001 beq 63ec <== NOT EXECUTED local_errno = errno; 63e4: eb0033d0 bl 1332c <__errno> <== NOT EXECUTED 63e8: 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); 63ec: e59fa10c ldr sl, [pc, #268] ; 6500 <== NOT EXECUTED 63f0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 63f4: e1a02004 mov r2, r4 <== NOT EXECUTED 63f8: e1a01009 mov r1, r9 <== NOT EXECUTED 63fc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6400: eb004cfd bl 197fc <== NOT EXECUTED if (status) 6404: 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); 6408: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 640c: 0a000008 beq 6434 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6410: e59a3000 ldr r3, [sl] <== NOT EXECUTED 6414: e1a00008 mov r0, r8 <== NOT EXECUTED 6418: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 641c: ebffffd1 bl 6368 <== NOT EXECUTED 6420: e59f10dc ldr r1, [pc, #220] ; 6504 <== NOT EXECUTED 6424: e1a02000 mov r2, r0 <== NOT EXECUTED 6428: e1a00008 mov r0, r8 <== NOT EXECUTED 642c: eb00356f bl 139f0 <== NOT EXECUTED 6430: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 6434: e3550000 cmp r5, #0 <== NOT EXECUTED 6438: 0a000015 beq 6494 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 643c: da00000d ble 6478 <== NOT EXECUTED 6440: e1a00005 mov r0, r5 <== NOT EXECUTED 6444: eb00387c bl 1463c <== NOT EXECUTED 6448: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 644c: e3530000 cmp r3, #0 <== NOT EXECUTED 6450: 0a000008 beq 6478 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6454: e59f30a4 ldr r3, [pc, #164] ; 6500 <== NOT EXECUTED 6458: e5933000 ldr r3, [r3] <== NOT EXECUTED 645c: e1a00005 mov r0, r5 <== NOT EXECUTED 6460: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 6464: eb003874 bl 1463c <== NOT EXECUTED 6468: e59f1098 ldr r1, [pc, #152] ; 6508 <== NOT EXECUTED 646c: e1a02000 mov r2, r0 <== NOT EXECUTED 6470: e1a00008 mov r0, r8 <== NOT EXECUTED 6474: ea000004 b 648c <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 6478: e59f3080 ldr r3, [pc, #128] ; 6500 <== NOT EXECUTED 647c: e5933000 ldr r3, [r3] <== NOT EXECUTED 6480: e59f1084 ldr r1, [pc, #132] ; 650c <== NOT EXECUTED 6484: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6488: e1a02005 mov r2, r5 <== NOT EXECUTED 648c: eb003557 bl 139f0 <== NOT EXECUTED 6490: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 6494: e59f8064 ldr r8, [pc, #100] ; 6500 <== NOT EXECUTED 6498: e5983000 ldr r3, [r8] <== NOT EXECUTED 649c: e59f106c ldr r1, [pc, #108] ; 6510 <== NOT EXECUTED 64a0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64a4: eb003551 bl 139f0 <== NOT EXECUTED (void) fflush(stderr); 64a8: 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"); 64ac: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 64b0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64b4: eb00348f bl 136f8 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 64b8: 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"); 64bc: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 64c0: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 64c4: e3570000 cmp r7, #0 <== NOT EXECUTED 64c8: 0a000004 beq 64e0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 64cc: e3a00000 mov r0, #0 <== NOT EXECUTED 64d0: e59f103c ldr r1, [pc, #60] ; 6514 <== NOT EXECUTED 64d4: eb00001b bl 6548 <== NOT EXECUTED _exit(local_errno); 64d8: e1a00005 mov r0, r5 <== NOT EXECUTED 64dc: eb0002cf bl 7020 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 64e0: e59f1030 ldr r1, [pc, #48] ; 6518 <== NOT EXECUTED 64e4: e1a00007 mov r0, r7 <== NOT EXECUTED 64e8: eb000016 bl 6548 <== NOT EXECUTED abort(); 64ec: eb003385 bl 13308 <== NOT EXECUTED 64f0: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 64f4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 00022338 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 22338: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 2233c: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 22340: e59fb0d4 ldr fp, [pc, #212] ; 2241c limit++; continue; } sign = 1; } if (!isdigit(c)) 22344: e59f90d4 ldr r9, [pc, #212] ; 22420 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 22348: e58d1000 str r1, [sp] 2234c: e1a05000 mov r5, r0 22350: e3e08102 mvn r8, #-2147483648 ; 0x80000000 22354: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 22358: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2235c: e5953004 ldr r3, [r5, #4] 22360: e2433001 sub r3, r3, #1 22364: e3530000 cmp r3, #0 22368: e5853004 str r3, [r5, #4] 2236c: a5953000 ldrge r3, [r5] 22370: a4d36001 ldrbge r6, [r3], #1 22374: a5853000 strge r3, [r5] 22378: aa000003 bge 2238c 2237c: e59b0000 ldr r0, [fp] <== NOT EXECUTED 22380: e1a01005 mov r1, r5 <== NOT EXECUTED 22384: eb00717a bl 3e974 <__srget_r> <== NOT EXECUTED 22388: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 2238c: e356003a cmp r6, #58 ; 0x3a 22390: 0a000019 beq 223fc break; if (sign == 0) { 22394: e3540000 cmp r4, #0 22398: 1a000004 bne 223b0 if (c == '-') { 2239c: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 223a0: 02888001 addeq r8, r8, #1 223a4: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 223a8: 0affffeb beq 2235c sign = -1; limit++; continue; 223ac: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 223b0: e5993000 ldr r3, [r9] 223b4: e0833006 add r3, r3, r6 223b8: e5d33001 ldrb r3, [r3, #1] 223bc: e3130004 tst r3, #4 223c0: 0a000013 beq 22414 return 0; d = c - '0'; if ((i > (limit / 10)) 223c4: e1a00008 mov r0, r8 223c8: e3a0100a mov r1, #10 223cc: eb00bc2c bl 51484 <__aeabi_uidiv> 223d0: e1570000 cmp r7, r0 223d4: 8a00000e bhi 22414 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 223d8: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 223dc: 1a000004 bne 223f4 223e0: e1a00008 mov r0, r8 <== NOT EXECUTED 223e4: e3a0100a mov r1, #10 <== NOT EXECUTED 223e8: eb00bcb9 bl 516d4 <__umodsi3> <== NOT EXECUTED 223ec: e1560000 cmp r6, r0 <== NOT EXECUTED 223f0: 8a000007 bhi 22414 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 223f4: e027679a mla r7, sl, r7, r6 223f8: eaffffd7 b 2235c } if (sign == 0) 223fc: e3540000 cmp r4, #0 return 0; *val = i * sign; 22400: 10030497 mulne r3, r7, r4 22404: 159d2000 ldrne r2, [sp] 22408: 13a00001 movne r0, #1 2240c: 15823000 strne r3, [r2] return 1; 22410: 1a000000 bne 22418 22414: e3a00000 mov r0, #0 <== NOT EXECUTED } 22418: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 00022424 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 22424: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22428: e1a04002 mov r4, r2 int c; *name = *bufp; 2242c: 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) { 22430: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; 22434: e5812000 str r2, [r1] for (;;) { c = getc(fp); 22438: e59f70c0 ldr r7, [pc, #192] ; 22500 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2243c: e1a05000 mov r5, r0 22440: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 22444: e5953004 ldr r3, [r5, #4] 22448: e2433001 sub r3, r3, #1 2244c: e3530000 cmp r3, #0 22450: e5853004 str r3, [r5, #4] 22454: a5953000 ldrge r3, [r5] 22458: a4d30001 ldrbge r0, [r3], #1 2245c: a5853000 strge r3, [r5] 22460: b5970000 ldrlt r0, [r7] 22464: b1a01005 movlt r1, r5 22468: bb007141 bllt 3e974 <__srget_r> if (c == ':') { 2246c: e350003a cmp r0, #58 ; 0x3a 22470: 1a000002 bne 22480 if (nlFlag) 22474: e3560000 cmp r6, #0 22478: 0a000013 beq 224cc 2247c: ea00001d b 224f8 <== NOT EXECUTED return 0; break; } if (c == '\n') { 22480: e350000a cmp r0, #10 22484: 1a000002 bne 22494 if (!nlFlag) 22488: e3560000 cmp r6, #0 2248c: 1a00000e bne 224cc 22490: ea000018 b 224f8 <== NOT EXECUTED return 0; break; } if (c == EOF) 22494: e3700001 cmn r0, #1 22498: 0a000016 beq 224f8 return 0; if (*nleft < 2) 2249c: e5983000 ldr r3, [r8] 224a0: e3530001 cmp r3, #1 224a4: 9a000013 bls 224f8 return 0; **bufp = c; 224a8: e5943000 ldr r3, [r4] 224ac: e5c30000 strb r0, [r3] ++(*bufp); 224b0: e5942000 ldr r2, [r4] --(*nleft); 224b4: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 224b8: e2822001 add r2, r2, #1 --(*nleft); 224bc: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 224c0: e5842000 str r2, [r4] --(*nleft); 224c4: e5883000 str r3, [r8] } 224c8: eaffffdd b 22444 **bufp = '\0'; 224cc: e5943000 ldr r3, [r4] 224d0: e3a02000 mov r2, #0 224d4: e5c32000 strb r2, [r3] ++(*bufp); 224d8: e5942000 ldr r2, [r4] --(*nleft); 224dc: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 224e0: e2822001 add r2, r2, #1 --(*nleft); 224e4: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 224e8: e5842000 str r2, [r4] --(*nleft); 224ec: e5883000 str r3, [r8] 224f0: e3a00001 mov r0, #1 return 1; 224f4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 224f8: e3a00000 mov r0, #0 <== NOT EXECUTED } 224fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 00022504 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22504: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22508: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2250c: e28d6008 add r6, sp, #8 22510: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22514: e58d2008 str r2, [sp, #8] 22518: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2251c: e3a08000 mov r8, #0 22520: e1a02006 mov r2, r6 22524: e1a03005 mov r3, r5 22528: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2252c: e1a07000 mov r7, r0 22530: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22534: ebffffba bl 22424 22538: e1500008 cmp r0, r8 2253c: 0a00003b beq 22630 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 22540: e1a00007 mov r0, r7 22544: e2841004 add r1, r4, #4 22548: e1a02006 mov r2, r6 2254c: e1a03005 mov r3, r5 22550: e58d8000 str r8, [sp] 22554: ebffffb2 bl 22424 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22558: e1500008 cmp r0, r8 2255c: 0a000033 beq 22630 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 22560: e1a00007 mov r0, r7 22564: e28d1010 add r1, sp, #16 22568: ebffff72 bl 22338 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2256c: e1500008 cmp r0, r8 22570: 0a00002e beq 22630 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 22574: e1a03005 mov r3, r5 22578: e28d100c add r1, sp, #12 2257c: e1a00007 mov r0, r7 22580: e1a02006 mov r2, r6 22584: e3a05001 mov r5, #1 22588: e58d5000 str r5, [sp] 2258c: ebffffa4 bl 22424 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22590: 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; 22594: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22598: 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; 2259c: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 225a0: 1a000003 bne 225b4 225a4: ea000021 b 22630 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 225a8: e352002c cmp r2, #44 ; 0x2c memcount++; 225ac: 02855001 addeq r5, r5, #1 225b0: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 225b4: e7d12008 ldrb r2, [r1, r8] 225b8: e3520000 cmp r2, #0 225bc: 1afffff9 bne 225a8 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 225c0: e1a05105 lsl r5, r5, #2 225c4: e59d3004 ldr r3, [sp, #4] 225c8: e2855013 add r5, r5, #19 225cc: e1530005 cmp r3, r5 225d0: 3a000016 bcc 22630 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 225d4: e59d3008 ldr r3, [sp, #8] 225d8: e283300f add r3, r3, #15 225dc: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 225e0: e5831000 str r1, [r3] /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 225e4: e584300c str r3, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 225e8: e59d300c ldr r3, [sp, #12] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 225ec: e1a00002 mov r0, r2 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 225f0: e2833001 add r3, r3, #1 225f4: e2822001 add r2, r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 225f8: ea000005 b 22614 if(*cp == ',') { 225fc: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 22600: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 22604: 0594100c ldreq r1, [r4, #12] 22608: 07813102 streq r3, [r1, r2, lsl #2] 2260c: 02822001 addeq r2, r2, #1 22610: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22614: e5531001 ldrb r1, [r3, #-1] 22618: e3510000 cmp r1, #0 2261c: 1afffff6 bne 225fc if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 22620: e594300c ldr r3, [r4, #12] 22624: e3a00001 mov r0, #1 22628: e7831102 str r1, [r3, r2, lsl #2] return 1; 2262c: ea000000 b 22634 22630: e3a00000 mov r0, #0 <== NOT EXECUTED } 22634: e28dd014 add sp, sp, #20 22638: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022678 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22678: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2267c: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22680: e28d7008 add r7, sp, #8 22684: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22688: e58d2008 str r2, [sp, #8] 2268c: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22690: e3a08000 mov r8, #0 22694: e1a02007 mov r2, r7 22698: e1a03006 mov r3, r6 2269c: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 226a0: e1a05000 mov r5, r0 226a4: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 226a8: ebffff5d bl 22424 226ac: e1500008 cmp r0, r8 226b0: 0a000038 beq 22798 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 226b4: e1a00005 mov r0, r5 226b8: e2841004 add r1, r4, #4 226bc: e1a02007 mov r2, r7 226c0: e1a03006 mov r3, r6 226c4: e58d8000 str r8, [sp] 226c8: ebffff55 bl 22424 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 226cc: e1500008 cmp r0, r8 226d0: 0a000030 beq 22798 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 226d4: e1a00005 mov r0, r5 226d8: e28d1010 add r1, sp, #16 226dc: ebffff15 bl 22338 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 226e0: e1500008 cmp r0, r8 226e4: 0a00002b beq 22798 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 226e8: e1a00005 mov r0, r5 226ec: e28d100c add r1, sp, #12 226f0: ebffff10 bl 22338 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 226f4: e1500008 cmp r0, r8 226f8: 0a000026 beq 22798 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 226fc: e1a00005 mov r0, r5 22700: e284100c add r1, r4, #12 22704: e1a02007 mov r2, r7 22708: e1a03006 mov r3, r6 2270c: e58d8000 str r8, [sp] 22710: ebffff43 bl 22424 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22714: e1500008 cmp r0, r8 22718: 0a00001e beq 22798 || !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) 2271c: e1a00005 mov r0, r5 22720: e2841010 add r1, r4, #16 22724: e1a02007 mov r2, r7 22728: e1a03006 mov r3, r6 2272c: e58d8000 str r8, [sp] 22730: ebffff3b bl 22424 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22734: e1500008 cmp r0, r8 22738: 0a000016 beq 22798 || !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) 2273c: e1a00005 mov r0, r5 22740: e2841014 add r1, r4, #20 22744: e1a02007 mov r2, r7 22748: e1a03006 mov r3, r6 2274c: e58d8000 str r8, [sp] 22750: ebffff33 bl 22424 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22754: e1500008 cmp r0, r8 22758: 0a00000e beq 22798 || !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)) 2275c: e1a00005 mov r0, r5 22760: e1a02007 mov r2, r7 22764: e1a03006 mov r3, r6 22768: e3a05001 mov r5, #1 2276c: e2841018 add r1, r4, #24 22770: e58d5000 str r5, [sp] 22774: ebffff2a bl 22424 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22778: e1500008 cmp r0, r8 2277c: 0a000005 beq 22798 || !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; 22780: e1dd30bc ldrh r3, [sp, #12] 22784: 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; 22788: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 2278c: e1a00005 mov r0, r5 || !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; 22790: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 22794: ea000000 b 2279c 22798: e3a00000 mov r0, #0 <== NOT EXECUTED } 2279c: e28dd014 add sp, sp, #20 227a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 000222e0 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 222e0: e59f300c ldr r3, [pc, #12] ; 222f4 <== NOT EXECUTED 222e4: e5933000 ldr r3, [r3] <== NOT EXECUTED 222e8: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 222ec: e3a00000 mov r0, #0 <== NOT EXECUTED 222f0: e12fff1e bx lr <== NOT EXECUTED 000228a8 : return NULL; return &grent; } void setgrent(void) { 228a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 228ac: ebffffcb bl 227e0 <== NOT EXECUTED if (group_fp != NULL) 228b0: e59f3020 ldr r3, [pc, #32] ; 228d8 <== NOT EXECUTED 228b4: e5930000 ldr r0, [r3] <== NOT EXECUTED 228b8: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 228bc: 1b005b7a blne 396ac <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 228c0: e59f0014 ldr r0, [pc, #20] ; 228dc <== NOT EXECUTED 228c4: e59f1014 ldr r1, [pc, #20] ; 228e0 <== NOT EXECUTED 228c8: eb005d9a bl 39f38 <== NOT EXECUTED 228cc: e59f3004 ldr r3, [pc, #4] ; 228d8 <== NOT EXECUTED 228d0: e5830000 str r0, [r3] <== NOT EXECUTED } 228d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00022a78 : return NULL; return &pwent; } void setpwent(void) { 22a78: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 22a7c: ebffff57 bl 227e0 <== NOT EXECUTED if (passwd_fp != NULL) 22a80: e59f3020 ldr r3, [pc, #32] ; 22aa8 <== NOT EXECUTED 22a84: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22a88: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 22a8c: 1b005b06 blne 396ac <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 22a90: e59f0014 ldr r0, [pc, #20] ; 22aac <== NOT EXECUTED 22a94: e59f1014 ldr r1, [pc, #20] ; 22ab0 <== NOT EXECUTED 22a98: eb005d26 bl 39f38 <== NOT EXECUTED 22a9c: e59f3004 ldr r3, [pc, #4] ; 22aa8 <== NOT EXECUTED 22aa0: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 22aa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00004960 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 4960: e59f300c ldr r3, [pc, #12] ; 4974 <== NOT EXECUTED 4964: e5933000 ldr r3, [r3] <== NOT EXECUTED 4968: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 496c: e3a00000 mov r0, #0 <== NOT EXECUTED 4970: e12fff1e bx lr <== NOT EXECUTED 00003248 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3248: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 324c: e59f3050 ldr r3, [pc, #80] ; 32a4 <== NOT EXECUTED 3250: e0023003 and r3, r2, r3 <== NOT EXECUTED 3254: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 3258: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 325c: e1a04001 mov r4, r1 <== NOT EXECUTED 3260: 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)) { 3264: 0a00000b beq 3298 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3268: e3a01000 mov r1, #0 <== NOT EXECUTED 326c: e1a02001 mov r2, r1 <== NOT EXECUTED 3270: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 3274: eb0005fb bl 4a68 <== NOT EXECUTED i = iproc (c, tty); 3278: e1a01004 mov r1, r4 <== NOT EXECUTED 327c: e1a00005 mov r0, r5 <== NOT EXECUTED 3280: ebffff8b bl 30b4 <== NOT EXECUTED 3284: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 3288: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 328c: eb00063b bl 4b80 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 3290: e1a00005 mov r0, r5 <== NOT EXECUTED 3294: 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); 3298: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 329c: 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); 32a0: eaffff83 b 30b4 <== NOT EXECUTED 00005ba8 : int _STAT_NAME( const char *path, struct stat *buf ) { 5ba8: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 5bac: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 5bb0: e24dd018 sub sp, sp, #24 5bb4: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 5bb8: 1a000002 bne 5bc8 rtems_set_errno_and_return_minus_one( EFAULT ); 5bbc: eb00ce6d bl 39578 <__errno> 5bc0: e3a0300e mov r3, #14 5bc4: ea000018 b 5c2c status = rtems_filesystem_evaluate_path( path, strlen( path ), 5bc8: eb00e8f5 bl 3ffa4 5bcc: e28d4004 add r4, sp, #4 5bd0: e1a01000 mov r1, r0 5bd4: e3a0c001 mov ip, #1 5bd8: e1a00006 mov r0, r6 5bdc: e3a02000 mov r2, #0 5be0: e1a03004 mov r3, r4 5be4: e58dc000 str ip, [sp] 5be8: ebfffae1 bl 4774 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 5bec: e2501000 subs r1, r0, #0 5bf0: 1a00000e bne 5c30 return -1; if ( !loc.handlers->fstat_h ){ 5bf4: e59d300c ldr r3, [sp, #12] 5bf8: e5933018 ldr r3, [r3, #24] 5bfc: e3530000 cmp r3, #0 5c00: 1a00000c bne 5c38 rtems_filesystem_freenode( &loc ); 5c04: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 5c08: e3530000 cmp r3, #0 <== NOT EXECUTED 5c0c: 0a000004 beq 5c24 <== NOT EXECUTED 5c10: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5c14: e3530000 cmp r3, #0 <== NOT EXECUTED 5c18: 11a00004 movne r0, r4 <== NOT EXECUTED 5c1c: 11a0e00f movne lr, pc <== NOT EXECUTED 5c20: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 5c24: eb00ce53 bl 39578 <__errno> <== NOT EXECUTED 5c28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5c2c: e5803000 str r3, [r0] 5c30: e3e05000 mvn r5, #0 5c34: ea000010 b 5c7c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 5c38: e3a02048 mov r2, #72 ; 0x48 5c3c: e1a00005 mov r0, r5 5c40: eb00db04 bl 3c858 status = (*loc.handlers->fstat_h)( &loc, buf ); 5c44: e1a01005 mov r1, r5 5c48: e59d300c ldr r3, [sp, #12] 5c4c: e1a00004 mov r0, r4 5c50: e1a0e00f mov lr, pc 5c54: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 5c58: e59d3010 ldr r3, [sp, #16] 5c5c: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 5c60: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 5c64: 0a000004 beq 5c7c 5c68: e593301c ldr r3, [r3, #28] 5c6c: e3530000 cmp r3, #0 5c70: 11a00004 movne r0, r4 5c74: 11a0e00f movne lr, pc 5c78: 112fff13 bxne r3 return status; } 5c7c: e1a00005 mov r0, r5 5c80: e28dd018 add sp, sp, #24 5c84: e8bd8070 pop {r4, r5, r6, pc} 00023984 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 23984: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 23988: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 2398c: e1a05001 mov r5, r1 <== NOT EXECUTED 23990: 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 ) ) 23994: eb007182 bl 3ffa4 <== NOT EXECUTED 23998: e28d4004 add r4, sp, #4 <== NOT EXECUTED 2399c: e1a01000 mov r1, r0 <== NOT EXECUTED 239a0: e3a0c001 mov ip, #1 <== NOT EXECUTED 239a4: e1a00006 mov r0, r6 <== NOT EXECUTED 239a8: e3a02000 mov r2, #0 <== NOT EXECUTED 239ac: e1a03004 mov r3, r4 <== NOT EXECUTED 239b0: e58dc000 str ip, [sp] <== NOT EXECUTED 239b4: ebff836e bl 4774 <== NOT EXECUTED 239b8: e2501000 subs r1, r0, #0 <== NOT EXECUTED 239bc: 1a000007 bne 239e0 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 239c0: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 239c4: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 239c8: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 239cc: e3530000 cmp r3, #0 <== NOT EXECUTED 239d0: 1a000004 bne 239e8 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 239d4: eb0056e7 bl 39578 <__errno> <== NOT EXECUTED 239d8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 239dc: e5803000 str r3, [r0] <== NOT EXECUTED 239e0: e3e05000 mvn r5, #0 <== NOT EXECUTED 239e4: ea000010 b 23a2c <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 239e8: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 239ec: e1a00005 mov r0, r5 <== NOT EXECUTED 239f0: eb006398 bl 3c858 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 239f4: e1a01005 mov r1, r5 <== NOT EXECUTED 239f8: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 239fc: e286001c add r0, r6, #28 <== NOT EXECUTED 23a00: e1a0e00f mov lr, pc <== NOT EXECUTED 23a04: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23a08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23a0c: e3530000 cmp r3, #0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 23a10: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23a14: 0a000004 beq 23a2c <== NOT EXECUTED 23a18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23a1c: e3530000 cmp r3, #0 <== NOT EXECUTED 23a20: 11a00004 movne r0, r4 <== NOT EXECUTED 23a24: 11a0e00f movne lr, pc <== NOT EXECUTED 23a28: 112fff13 bxne r3 <== NOT EXECUTED return result; } 23a2c: e1a00005 mov r0, r5 <== NOT EXECUTED 23a30: e28dd018 add sp, sp, #24 <== NOT EXECUTED 23a34: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00023a38 : int symlink( const char *actualpath, const char *sympath ) { 23a38: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 23a3c: e5d13000 ldrb r3, [r1] 23a40: e353002f cmp r3, #47 ; 0x2f 23a44: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 23a48: e24dd018 sub sp, sp, #24 23a4c: e1a05001 mov r5, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 23a50: 13a06000 movne r6, #0 23a54: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 23a58: 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 ); 23a5c: 0a000001 beq 23a68 23a60: e3530000 cmp r3, #0 23a64: 1a000009 bne 23a90 23a68: e59f30f0 ldr r3, [pc, #240] ; 23b60 23a6c: e593e000 ldr lr, [r3] 23a70: e28ee018 add lr, lr, #24 23a74: e8be000f ldm lr!, {r0, r1, r2, r3} 23a78: e1a0c00d mov ip, sp 23a7c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23a80: e59e3000 ldr r3, [lr] 23a84: e3a00001 mov r0, #1 23a88: e58c3000 str r3, [ip] 23a8c: ea000008 b 23ab4 23a90: e59f30c8 ldr r3, [pc, #200] ; 23b60 23a94: e593e000 ldr lr, [r3] 23a98: e28ee004 add lr, lr, #4 23a9c: e8be000f ldm lr!, {r0, r1, r2, r3} 23aa0: e1a0c00d mov ip, sp 23aa4: e8ac000f stmia ip!, {r0, r1, r2, r3} 23aa8: e59e3000 ldr r3, [lr] 23aac: e58c3000 str r3, [ip] 23ab0: e1a00006 mov r0, r6 if ( !loc.ops->evalformake_h ) { 23ab4: e59d300c ldr r3, [sp, #12] 23ab8: e5933004 ldr r3, [r3, #4] 23abc: e3530000 cmp r3, #0 23ac0: 0a000010 beq 23b08 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 23ac4: e0850000 add r0, r5, r0 23ac8: e1a0100d mov r1, sp 23acc: e28d2014 add r2, sp, #20 23ad0: e1a0e00f mov lr, pc 23ad4: e12fff13 bx r3 if ( result != 0 ) 23ad8: 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 ); 23adc: e1a0600d mov r6, sp if ( result != 0 ) 23ae0: 1a00000b bne 23b14 return -1; if ( !loc.ops->symlink_h ) { 23ae4: e59d200c ldr r2, [sp, #12] 23ae8: e5923038 ldr r3, [r2, #56] ; 0x38 23aec: e3530000 cmp r3, #0 23af0: 1a000009 bne 23b1c rtems_filesystem_freenode( &loc ); 23af4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23af8: e3530000 cmp r3, #0 <== NOT EXECUTED 23afc: 11a0000d movne r0, sp <== NOT EXECUTED 23b00: 11a0e00f movne lr, pc <== NOT EXECUTED 23b04: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23b08: eb00569a bl 39578 <__errno> <== NOT EXECUTED 23b0c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23b10: e5803000 str r3, [r0] <== NOT EXECUTED 23b14: e3e04000 mvn r4, #0 23b18: ea00000d b 23b54 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 23b1c: e1a01004 mov r1, r4 23b20: e1a0000d mov r0, sp 23b24: e59d2014 ldr r2, [sp, #20] 23b28: e1a0e00f mov lr, pc 23b2c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23b30: e59d300c ldr r3, [sp, #12] 23b34: e3530000 cmp r3, #0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 23b38: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 23b3c: 0a000004 beq 23b54 23b40: e593301c ldr r3, [r3, #28] 23b44: e3530000 cmp r3, #0 23b48: 11a0000d movne r0, sp 23b4c: 11a0e00f movne lr, pc 23b50: 112fff13 bxne r3 return result; } 23b54: e1a00004 mov r0, r4 23b58: e28dd018 add sp, sp, #24 23b5c: e8bd8070 pop {r4, r5, r6, pc} 0000fc40 : int fd, int opt, struct termios *tp ) { switch (opt) { fc40: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { fc44: e92d4030 push {r4, r5, lr} fc48: e1a04002 mov r4, r2 fc4c: e1a05000 mov r5, r0 switch (opt) { fc50: 0a00000a beq fc80 fc54: e3510001 cmp r1, #1 <== NOT EXECUTED fc58: 0a000003 beq fc6c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); fc5c: eb00135a bl 149cc <__errno> <== NOT EXECUTED fc60: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED fc64: e5803000 str r3, [r0] <== NOT EXECUTED fc68: ea000009 b fc94 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) fc6c: e3a01003 mov r1, #3 <== NOT EXECUTED fc70: e3a02000 mov r2, #0 <== NOT EXECUTED fc74: eb000dba bl 13364 <== NOT EXECUTED fc78: e3500000 cmp r0, #0 <== NOT EXECUTED fc7c: ba000004 blt fc94 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); fc80: e1a00005 mov r0, r5 fc84: e1a02004 mov r2, r4 fc88: e3a01002 mov r1, #2 } } fc8c: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); fc90: ea000db3 b 13364 } } fc94: e3e00000 mvn r0, #0 <== NOT EXECUTED fc98: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000c510 : #include int unlink( const char *path ) { c510: e92d4070 push {r4, r5, r6, lr} c514: e24dd02c sub sp, sp, #44 ; 0x2c c518: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); c51c: ebffd48e bl 175c if ( parentpathlen == 0 ) c520: e2505000 subs r5, r0, #0 c524: 1a000019 bne c590 rtems_filesystem_get_start_loc( path, &i, &parentloc ); c528: e5d63000 ldrb r3, [r6] c52c: e353002f cmp r3, #47 ; 0x2f c530: 1353005c cmpne r3, #92 ; 0x5c c534: 0a000001 beq c540 c538: e3530000 cmp r3, #0 c53c: 1a000009 bne c568 c540: e59f3248 ldr r3, [pc, #584] ; c790 c544: e593e000 ldr lr, [r3] c548: e28ee018 add lr, lr, #24 c54c: e8be000f ldm lr!, {r0, r1, r2, r3} c550: e28dc018 add ip, sp, #24 c554: e8ac000f stmia ip!, {r0, r1, r2, r3} c558: e59e3000 ldr r3, [lr] c55c: e3a04000 mov r4, #0 c560: e58c3000 str r3, [ip] c564: ea000013 b c5b8 c568: e59f3220 ldr r3, [pc, #544] ; c790 c56c: e593e000 ldr lr, [r3] c570: e28ee004 add lr, lr, #4 c574: e8be000f ldm lr!, {r0, r1, r2, r3} c578: e28dc018 add ip, sp, #24 c57c: e8ac000f stmia ip!, {r0, r1, r2, r3} c580: e59e3000 ldr r3, [lr] c584: e1a04005 mov r4, r5 c588: e58c3000 str r3, [ip] c58c: ea000009 b c5b8 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, c590: e3a0c000 mov ip, #0 c594: e1a00006 mov r0, r6 c598: e1a01005 mov r1, r5 c59c: e3a02002 mov r2, #2 c5a0: e28d3018 add r3, sp, #24 c5a4: e58dc000 str ip, [sp] c5a8: ebffd4b3 bl 187c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) c5ac: e3500000 cmp r0, #0 c5b0: 1a000072 bne c780 c5b4: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c5b8: e28de018 add lr, sp, #24 c5bc: e8be000f ldm lr!, {r0, r1, r2, r3} c5c0: e28dc004 add ip, sp, #4 c5c4: e8ac000f stmia ip!, {r0, r1, r2, r3} c5c8: e59e3000 ldr r3, [lr] name = path + parentpathlen; c5cc: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c5d0: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); c5d4: e1a00005 mov r0, r5 c5d8: eb0005d2 bl dd28 c5dc: e1a01000 mov r1, r0 c5e0: e1a00005 mov r0, r5 c5e4: ebffd450 bl 172c c5e8: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), c5ec: e1a00006 mov r0, r6 c5f0: eb0005cc bl dd28 c5f4: e28d5004 add r5, sp, #4 c5f8: e3a0c000 mov ip, #0 c5fc: e1a01000 mov r1, r0 c600: e1a0200c mov r2, ip c604: e1a00006 mov r0, r6 c608: e1a03005 mov r3, r5 c60c: e58dc000 str ip, [sp] c610: ebffd461 bl 179c 0, &loc, false ); if ( result != 0 ) { c614: e3500000 cmp r0, #0 c618: 0a00000b beq c64c if ( free_parentloc ) c61c: e3540000 cmp r4, #0 c620: 0a000056 beq c780 rtems_filesystem_freenode( &parentloc ); c624: e59d3024 ldr r3, [sp, #36] ; 0x24 c628: e3530000 cmp r3, #0 c62c: 0a000053 beq c780 c630: e593301c ldr r3, [r3, #28] c634: e3530000 cmp r3, #0 c638: 0a000050 beq c780 c63c: e28d0018 add r0, sp, #24 c640: e1a0e00f mov lr, pc c644: e12fff13 bx r3 c648: ea00004c b c780 return -1; } if ( !loc.ops->node_type_h ) { c64c: e59d2010 ldr r2, [sp, #16] c650: e5923010 ldr r3, [r2, #16] c654: e3530000 cmp r3, #0 c658: 0a00001c beq c6d0 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 ) { c65c: e1a00005 mov r0, r5 c660: e1a0e00f mov lr, pc c664: e12fff13 bx r3 c668: e3500001 cmp r0, #1 c66c: e59d2010 ldr r2, [sp, #16] c670: 1a000013 bne c6c4 rtems_filesystem_freenode( &loc ); c674: e3520000 cmp r2, #0 c678: 0a000004 beq c690 c67c: e592301c ldr r3, [r2, #28] c680: e3530000 cmp r3, #0 c684: 11a00005 movne r0, r5 c688: 11a0e00f movne lr, pc c68c: 112fff13 bxne r3 if ( free_parentloc ) c690: e3540000 cmp r4, #0 c694: 0a000007 beq c6b8 rtems_filesystem_freenode( &parentloc ); c698: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c69c: e3530000 cmp r3, #0 <== NOT EXECUTED c6a0: 0a000004 beq c6b8 <== NOT EXECUTED c6a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c6a8: e3530000 cmp r3, #0 <== NOT EXECUTED c6ac: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c6b0: 11a0e00f movne lr, pc <== NOT EXECUTED c6b4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); c6b8: eb0001a9 bl cd64 <__errno> c6bc: e3a03015 mov r3, #21 c6c0: ea000013 b c714 } if ( !loc.ops->unlink_h ) { c6c4: e592300c ldr r3, [r2, #12] c6c8: e3530000 cmp r3, #0 c6cc: 1a000012 bne c71c rtems_filesystem_freenode( &loc ); c6d0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c6d4: e3530000 cmp r3, #0 <== NOT EXECUTED c6d8: 11a00005 movne r0, r5 <== NOT EXECUTED c6dc: 11a0e00f movne lr, pc <== NOT EXECUTED c6e0: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) c6e4: e3540000 cmp r4, #0 <== NOT EXECUTED c6e8: 0a000007 beq c70c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); c6ec: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c6f0: e3530000 cmp r3, #0 <== NOT EXECUTED c6f4: 0a000004 beq c70c <== NOT EXECUTED c6f8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c6fc: e3530000 cmp r3, #0 <== NOT EXECUTED c700: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c704: 11a0e00f movne lr, pc <== NOT EXECUTED c708: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); c70c: eb000194 bl cd64 <__errno> <== NOT EXECUTED c710: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED c714: e5803000 str r3, [r0] c718: ea000018 b c780 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c71c: e28d0018 add r0, sp, #24 c720: e1a01005 mov r1, r5 c724: e1a0e00f mov lr, pc c728: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); c72c: e59d3010 ldr r3, [sp, #16] c730: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c734: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); c738: 0a000004 beq c750 c73c: e593301c ldr r3, [r3, #28] c740: e3530000 cmp r3, #0 c744: 11a00005 movne r0, r5 c748: 11a0e00f movne lr, pc c74c: 112fff13 bxne r3 if ( free_parentloc ) c750: e3540000 cmp r4, #0 c754: 0a00000a beq c784 rtems_filesystem_freenode( &parentloc ); c758: e59d3024 ldr r3, [sp, #36] ; 0x24 c75c: e3530000 cmp r3, #0 c760: 0a000007 beq c784 c764: e593301c ldr r3, [r3, #28] c768: e3530000 cmp r3, #0 c76c: 0a000004 beq c784 c770: e28d0018 add r0, sp, #24 c774: e1a0e00f mov lr, pc c778: e12fff13 bx r3 c77c: ea000000 b c784 c780: e3e06000 mvn r6, #0 return result; } c784: e1a00006 mov r0, r6 c788: e28dd02c add sp, sp, #44 ; 0x2c c78c: e8bd8070 pop {r4, r5, r6, pc} 00023c48 : */ int unmount( const char *path ) { 23c48: e92d4030 push {r4, r5, lr} 23c4c: e24dd018 sub sp, sp, #24 23c50: 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 ) ) 23c54: eb0070d2 bl 3ffa4 23c58: e28d4004 add r4, sp, #4 23c5c: e1a01000 mov r1, r0 23c60: e3a0c001 mov ip, #1 23c64: e1a00005 mov r0, r5 23c68: e3a02000 mov r2, #0 23c6c: e1a03004 mov r3, r4 23c70: e58dc000 str ip, [sp] 23c74: ebff82be bl 4774 23c78: e3500000 cmp r0, #0 23c7c: 1a000057 bne 23de0 return -1; mt_entry = loc.mt_entry; 23c80: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 23c84: e59d3004 ldr r3, [sp, #4] 23c88: e595201c ldr r2, [r5, #28] 23c8c: e1520003 cmp r2, r3 23c90: e59d3010 ldr r3, [sp, #16] 23c94: 0a000009 beq 23cc0 /* * 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 ); 23c98: e3530000 cmp r3, #0 23c9c: 0a000004 beq 23cb4 23ca0: e593301c ldr r3, [r3, #28] 23ca4: e3530000 cmp r3, #0 23ca8: 11a00004 movne r0, r4 23cac: 11a0e00f movne lr, pc 23cb0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 23cb4: eb00562f bl 39578 <__errno> 23cb8: e3a0300d mov r3, #13 23cbc: ea000023 b 23d50 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 23cc0: e3530000 cmp r3, #0 23cc4: 0a000004 beq 23cdc 23cc8: e593301c ldr r3, [r3, #28] 23ccc: e3530000 cmp r3, #0 23cd0: 11a00004 movne r0, r4 23cd4: 11a0e00f movne lr, pc 23cd8: 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; 23cdc: e5953014 ldr r3, [r5, #20] 23ce0: e5933028 ldr r3, [r3, #40] ; 0x28 23ce4: e3530000 cmp r3, #0 23ce8: 0a000003 beq 23cfc fs_root_loc = &mt_entry->mt_fs_root; 23cec: e5953028 ldr r3, [r5, #40] ; 0x28 23cf0: e593302c ldr r3, [r3, #44] ; 0x2c 23cf4: e3530000 cmp r3, #0 23cf8: 1a000002 bne 23d08 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 ); 23cfc: eb00561d bl 39578 <__errno> <== NOT EXECUTED 23d00: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23d04: ea000011 b 23d50 <== 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 ) 23d08: e59f30f0 ldr r3, [pc, #240] ; 23e00 23d0c: e5933000 ldr r3, [r3] 23d10: e5933014 ldr r3, [r3, #20] 23d14: 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; 23d18: 159f20e4 ldrne r2, [pc, #228] ; 23e04 23d1c: 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 ) 23d20: 1a000005 bne 23d3c 23d24: ea000007 b 23d48 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; 23d28: e5930018 ldr r0, [r3, #24] 23d2c: e595102c ldr r1, [r5, #44] ; 0x2c 23d30: e1500001 cmp r0, r1 23d34: 0a000003 beq 23d48 * 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 ) { 23d38: e5933000 ldr r3, [r3] 23d3c: e1530002 cmp r3, r2 23d40: 1afffff8 bne 23d28 23d44: ea000028 b 23dec * 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 ); 23d48: eb00560a bl 39578 <__errno> 23d4c: e3a03010 mov r3, #16 23d50: e5803000 str r3, [r0] 23d54: ea000021 b 23de0 * 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 ) 23d58: e5953014 ldr r3, [r5, #20] 23d5c: e1a00005 mov r0, r5 23d60: e1a0e00f mov lr, pc 23d64: e593f028 ldr pc, [r3, #40] ; 0x28 23d68: e2504000 subs r4, r0, #0 23d6c: 1a00001b bne 23de0 * 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){ 23d70: e5953028 ldr r3, [r5, #40] ; 0x28 23d74: e1a00005 mov r0, r5 23d78: e1a0e00f mov lr, pc 23d7c: e593f02c ldr pc, [r3, #44] ; 0x2c 23d80: e3500000 cmp r0, #0 23d84: 0a000007 beq 23da8 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 23d88: e1a00005 mov r0, r5 <== NOT EXECUTED 23d8c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 23d90: e1a0e00f mov lr, pc <== NOT EXECUTED 23d94: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 23d98: e3500000 cmp r0, #0 <== NOT EXECUTED 23d9c: 0a00000f beq 23de0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 23da0: e1a00004 mov r0, r4 <== NOT EXECUTED 23da4: ebff937c bl 8b9c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 23da8: e1a00005 mov r0, r5 23dac: ebff943f bl 8eb0 <_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 ); 23db0: e5953014 ldr r3, [r5, #20] 23db4: e3530000 cmp r3, #0 23db8: 0a000004 beq 23dd0 23dbc: e593301c ldr r3, [r3, #28] 23dc0: e3530000 cmp r3, #0 23dc4: 12850008 addne r0, r5, #8 23dc8: 11a0e00f movne lr, pc 23dcc: 112fff13 bxne r3 free( mt_entry ); 23dd0: e1a00005 mov r0, r5 23dd4: ebff8299 bl 4840 23dd8: e3a00000 mov r0, #0 return 0; 23ddc: ea000000 b 23de4 23de0: e3e00000 mvn r0, #0 } 23de4: e28dd018 add sp, sp, #24 23de8: 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 ) 23dec: e1a00005 mov r0, r5 23df0: ebff8340 bl 4af8 23df4: e3500001 cmp r0, #1 23df8: 1affffd6 bne 23d58 23dfc: eaffffd1 b 23d48 00023e08 : int utime( const char *path, const struct utimbuf *times ) { 23e08: e92d4070 push {r4, r5, r6, lr} 23e0c: e24dd018 sub sp, sp, #24 23e10: e1a05001 mov r5, r1 23e14: 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 ) ) 23e18: eb007061 bl 3ffa4 23e1c: e28d4004 add r4, sp, #4 23e20: e1a01000 mov r1, r0 23e24: e3a0c001 mov ip, #1 23e28: e1a00006 mov r0, r6 23e2c: e3a02000 mov r2, #0 23e30: e1a03004 mov r3, r4 23e34: e58dc000 str ip, [sp] 23e38: ebff824d bl 4774 23e3c: e3500000 cmp r0, #0 23e40: 1a00000b bne 23e74 return -1; if ( !temp_loc.ops->utime_h ){ 23e44: e59d2010 ldr r2, [sp, #16] 23e48: e5923030 ldr r3, [r2, #48] ; 0x30 23e4c: e3530000 cmp r3, #0 23e50: 1a000009 bne 23e7c rtems_filesystem_freenode( &temp_loc ); 23e54: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23e58: e3530000 cmp r3, #0 <== NOT EXECUTED 23e5c: 11a00004 movne r0, r4 <== NOT EXECUTED 23e60: 11a0e00f movne lr, pc <== NOT EXECUTED 23e64: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23e68: eb0055c2 bl 39578 <__errno> <== NOT EXECUTED 23e6c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23e70: e5803000 str r3, [r0] <== NOT EXECUTED 23e74: e3e05000 mvn r5, #0 23e78: ea00000c b 23eb0 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 23e7c: e8950006 ldm r5, {r1, r2} 23e80: e1a00004 mov r0, r4 23e84: e1a0e00f mov lr, pc 23e88: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 23e8c: e59d3010 ldr r3, [sp, #16] 23e90: e3530000 cmp r3, #0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 23e94: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 23e98: 0a000004 beq 23eb0 23e9c: e593301c ldr r3, [r3, #28] 23ea0: e3530000 cmp r3, #0 23ea4: 11a00004 movne r0, r4 23ea8: 11a0e00f movne lr, pc 23eac: 112fff13 bxne r3 return result; } 23eb0: e1a00005 mov r0, r5 23eb4: e28dd018 add sp, sp, #24 23eb8: e8bd8070 pop {r4, r5, r6, pc} 0001814c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1814c: e59f30b0 ldr r3, [pc, #176] ; 18204 18150: e5933000 ldr r3, [r3] 18154: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 18158: e92d4070 push {r4, r5, r6, lr} 1815c: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 18160: 2a000005 bcs 1817c iop = rtems_libio_iop( fd ); 18164: e59f309c ldr r3, [pc, #156] ; 18208 18168: e5934000 ldr r4, [r3] 1816c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 18170: e5943014 ldr r3, [r4, #20] 18174: e3130c01 tst r3, #256 ; 0x100 18178: 1a000002 bne 18188 1817c: ebffd2f8 bl cd64 <__errno> <== NOT EXECUTED 18180: e3a03009 mov r3, #9 <== NOT EXECUTED 18184: ea00000f b 181c8 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 18188: e3510000 cmp r1, #0 1818c: 0a000004 beq 181a4 rtems_libio_check_count( count ); 18190: e3520000 cmp r2, #0 18194: 01a00002 moveq r0, r2 18198: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1819c: e3130004 tst r3, #4 181a0: 1a000002 bne 181b0 181a4: ebffd2ee bl cd64 <__errno> <== NOT EXECUTED 181a8: e3a03016 mov r3, #22 <== NOT EXECUTED 181ac: ea000005 b 181c8 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 181b0: e594303c ldr r3, [r4, #60] ; 0x3c 181b4: e593300c ldr r3, [r3, #12] 181b8: e3530000 cmp r3, #0 181bc: 1a000004 bne 181d4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 181c0: ebffd2e7 bl cd64 <__errno> <== NOT EXECUTED 181c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 181c8: e5803000 str r3, [r0] <== NOT EXECUTED 181cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 181d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 181d4: e1a00004 mov r0, r4 181d8: e1a0e00f mov lr, pc 181dc: e12fff13 bx r3 if ( rc > 0 ) 181e0: e3500000 cmp r0, #0 181e4: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 181e8: e284600c add r6, r4, #12 181ec: e8960060 ldm r6, {r5, r6} 181f0: e0952000 adds r2, r5, r0 181f4: e0a63fc0 adc r3, r6, r0, asr #31 181f8: e584200c str r2, [r4, #12] 181fc: e5843010 str r3, [r4, #16] return rc; } 18200: e8bd8070 pop {r4, r5, r6, pc} 00005a94 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5a94: e59f3164 ldr r3, [pc, #356] ; 5c00 5a98: e5933000 ldr r3, [r3] 5a9c: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 5aa0: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5aa4: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5aa8: 2a000005 bcs 5ac4 iop = rtems_libio_iop( fd ); 5aac: e59f3150 ldr r3, [pc, #336] ; 5c04 5ab0: e5936000 ldr r6, [r3] 5ab4: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 5ab8: e5963014 ldr r3, [r6, #20] 5abc: e3130c01 tst r3, #256 ; 0x100 5ac0: 1a000002 bne 5ad0 5ac4: eb0025d4 bl f21c <__errno> 5ac8: e3a03009 mov r3, #9 5acc: ea000025 b 5b68 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5ad0: e3130004 tst r3, #4 5ad4: 0a000021 beq 5b60 /* * Argument validation on IO vector */ if ( !iov ) 5ad8: e3510000 cmp r1, #0 5adc: 0a00001f beq 5b60 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 5ae0: e3520000 cmp r2, #0 5ae4: da00001d ble 5b60 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 5ae8: e3520b01 cmp r2, #1024 ; 0x400 5aec: ca00001b bgt 5b60 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 5af0: e596303c ldr r3, [r6, #60] ; 0x3c 5af4: e593300c ldr r3, [r3, #12] 5af8: e3530000 cmp r3, #0 5afc: 1a000002 bne 5b0c rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b00: eb0025c5 bl f21c <__errno> <== NOT EXECUTED 5b04: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5b08: ea000016 b 5b68 <== NOT EXECUTED 5b0c: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5b10: e59fc0f0 ldr ip, [pc, #240] ; 5c08 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 ); 5b14: e1a05001 mov r5, r1 5b18: e1a02001 mov r2, r1 5b1c: e3a07001 mov r7, #1 5b20: 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 ) 5b24: e5921000 ldr r1, [r2] 5b28: e3510000 cmp r1, #0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 5b2c: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 5b30: 0a00000a beq 5b60 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 ) 5b34: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5b38: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 5b3c: e1510004 cmp r1, r4 5b40: a3a04000 movge r4, #0 5b44: b3a04001 movlt r4, #1 5b48: e151000c cmp r1, ip 5b4c: 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 ) 5b50: e3500000 cmp r0, #0 5b54: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5b58: e3540000 cmp r4, #0 5b5c: 0a000003 beq 5b70 rtems_set_errno_and_return_minus_one( EINVAL ); 5b60: eb0025ad bl f21c <__errno> 5b64: e3a03016 mov r3, #22 5b68: e5803000 str r3, [r0] 5b6c: ea000011 b 5bb8 * 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++ ) { 5b70: e1530008 cmp r3, r8 5b74: e2822008 add r2, r2, #8 5b78: b1a04001 movlt r4, r1 5b7c: baffffe8 blt 5b24 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 5b80: e3570000 cmp r7, #0 5b84: 1a00001b bne 5bf8 5b88: e1a04007 mov r4, r7 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b8c: e5952004 ldr r2, [r5, #4] 5b90: e3520000 cmp r2, #0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5b94: e2877001 add r7, r7, #1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b98: 0a000013 beq 5bec continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 5b9c: e5951000 ldr r1, [r5] 5ba0: e596303c ldr r3, [r6, #60] ; 0x3c 5ba4: e1a00006 mov r0, r6 5ba8: e1a0e00f mov lr, pc 5bac: e593f00c ldr pc, [r3, #12] if ( bytes < 0 ) 5bb0: e3500000 cmp r0, #0 5bb4: aa000001 bge 5bc0 5bb8: e3e04000 mvn r4, #0 5bbc: ea00000d b 5bf8 return -1; if ( bytes > 0 ) { 5bc0: 0a000006 beq 5be0 iop->offset += bytes; 5bc4: e286c00c add ip, r6, #12 5bc8: e89c1800 ldm ip, {fp, ip} 5bcc: e09b2000 adds r2, fp, r0 5bd0: e0ac3fc0 adc r3, ip, r0, asr #31 5bd4: e586200c str r2, [r6, #12] 5bd8: e5863010 str r3, [r6, #16] total += bytes; 5bdc: e0844000 add r4, r4, r0 } if (bytes != iov[ v ].iov_len) 5be0: e5953004 ldr r3, [r5, #4] 5be4: e1500003 cmp r0, r3 5be8: 1a000002 bne 5bf8 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5bec: e1570008 cmp r7, r8 5bf0: e2855008 add r5, r5, #8 5bf4: baffffe4 blt 5b8c if (bytes != iov[ v ].iov_len) break; } return total; } 5bf8: e1a00004 mov r0, r4 5bfc: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}