00007784 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 7784: e5903000 ldr r3, [r0] 7788: 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; 778c: e5903010 ldr r3, [r0, #16] switch( node->type ) { 7790: 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; 7794: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 7798: e3520006 cmp r2, #6 779c: 979ff102 ldrls pc, [pc, r2, lsl #2] 77a0: ea000010 b 77e8 <== NOT EXECUTED 77a4: 000077c0 .word 0x000077c0 <== NOT EXECUTED 77a8: 000077c8 .word 0x000077c8 <== NOT EXECUTED 77ac: 000077d0 .word 0x000077d0 <== NOT EXECUTED 77b0: 000077d0 .word 0x000077d0 <== NOT EXECUTED 77b4: 000077d8 .word 0x000077d8 <== NOT EXECUTED 77b8: 000077d8 .word 0x000077d8 <== NOT EXECUTED 77bc: 000077e0 .word 0x000077e0 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 77c0: e5933008 ldr r3, [r3, #8] 77c4: ea000006 b 77e4 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 77c8: e59f3020 ldr r3, [pc, #32] ; 77f0 77cc: ea000004 b 77e4 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 77d0: e59f301c ldr r3, [pc, #28] ; 77f4 77d4: ea000002 b 77e4 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 77d8: e5933004 ldr r3, [r3, #4] 77dc: ea000000 b 77e4 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 77e0: e59f3010 ldr r3, [pc, #16] ; 77f8 77e4: e5803008 str r3, [r0, #8] break; } return 0; } 77e8: e3a00000 mov r0, #0 77ec: e12fff1e bx lr 77f0: 00017940 .word 0x00017940 77f4: 00017978 .word 0x00017978 77f8: 000178e8 .word 0x000178e8 0000a7a8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a7a8: 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 ) a7ac: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a7b0: e1a05001 mov r5, r1 a7b4: e59d6014 ldr r6, [sp, #20] a7b8: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) a7bc: 01a07004 moveq r7, r4 a7c0: 0a000041 beq a8cc return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); a7c4: e59f2108 ldr r2, [pc, #264] ; a8d4 a7c8: e5922000 ldr r2, [r2] a7cc: e592202c ldr r2, [r2, #44] ; 0x2c a7d0: e1a00005 mov r0, r5 a7d4: e1c32002 bic r2, r3, r2 a7d8: ebffffc5 bl a6f4 if ( !node ) a7dc: e2507000 subs r7, r0, #0 a7e0: 0a000039 beq a8cc return NULL; /* * Set the type specific information */ switch (type) { a7e4: e2455001 sub r5, r5, #1 a7e8: e3550006 cmp r5, #6 a7ec: 979ff105 ldrls pc, [pc, r5, lsl #2] a7f0: ea000025 b a88c <== NOT EXECUTED a7f4: 0000a810 .word 0x0000a810 <== NOT EXECUTED a7f8: 0000a834 .word 0x0000a834 <== NOT EXECUTED a7fc: 0000a82c .word 0x0000a82c <== NOT EXECUTED a800: 0000a82c .word 0x0000a82c <== NOT EXECUTED a804: 0000a85c .word 0x0000a85c <== NOT EXECUTED a808: 0000a844 .word 0x0000a844 <== NOT EXECUTED a80c: 0000a880 .word 0x0000a880 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a810: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); a814: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a818: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; a81c: e3a02000 mov r2, #0 a820: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); a824: e5873058 str r3, [r7, #88] ; 0x58 a828: ea00001c b a8a0 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; a82c: e5963000 ldr r3, [r6] a830: ea000013 b a884 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; a834: 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; a838: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; a83c: e5872054 str r2, [r7, #84] ; 0x54 a840: ea00000f b a884 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; a844: e3a03000 mov r3, #0 <== NOT EXECUTED a848: e3a02000 mov r2, #0 <== NOT EXECUTED a84c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED a850: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; a854: e3a03000 mov r3, #0 <== NOT EXECUTED a858: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; a85c: 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; a860: e3a01000 mov r1, #0 a864: e3a02000 mov r2, #0 a868: e5871050 str r1, [r7, #80] ; 0x50 a86c: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; a870: 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; a874: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; a878: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; a87c: ea000007 b a8a0 case IMFS_FIFO: node->info.fifo.pipe = NULL; a880: e3a03000 mov r3, #0 a884: e5873050 str r3, [r7, #80] ; 0x50 break; a888: ea000004 b a8a0 default: assert(0); a88c: e59f0044 ldr r0, [pc, #68] ; a8d8 <== NOT EXECUTED a890: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED a894: e59f2040 ldr r2, [pc, #64] ; a8dc <== NOT EXECUTED a898: e59f3040 ldr r3, [pc, #64] ; a8e0 <== NOT EXECUTED a89c: ebfff735 bl 8578 <__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; a8a0: e5943010 ldr r3, [r4, #16] a8a4: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; a8a8: e5923000 ldr r3, [r2] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; a8ac: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; a8b0: e2833001 add r3, r3, #1 a8b4: e5823000 str r3, [r2] * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; a8b8: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; a8bc: 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 ); a8c0: e2800050 add r0, r0, #80 ; 0x50 a8c4: e1a01007 mov r1, r7 a8c8: ebffe89c bl 4b40 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } a8cc: e1a00007 mov r0, r7 a8d0: e8bd80f0 pop {r4, r5, r6, r7, pc} a8d4: 00017188 .word 0x00017188 a8d8: 00018151 .word 0x00018151 a8dc: 00017a88 .word 0x00017a88 a8e0: 00017f21 .word 0x00017f21 00002d08 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d08: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2d0c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2d10: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d14: 059f00a4 ldreq r0, [pc, #164] ; 2dc0 2d18: 03a01084 moveq r1, #132 ; 0x84 2d1c: 059f20a0 ldreq r2, [pc, #160] ; 2dc4 2d20: 059f30a0 ldreq r3, [pc, #160] ; 2dc8 2d24: 0a000005 beq 2d40 assert( level >= 0 ); 2d28: e3510000 cmp r1, #0 2d2c: aa000004 bge 2d44 2d30: e59f0088 ldr r0, [pc, #136] ; 2dc0 <== NOT EXECUTED 2d34: e59f2088 ldr r2, [pc, #136] ; 2dc4 <== NOT EXECUTED 2d38: e59f308c ldr r3, [pc, #140] ; 2dcc <== NOT EXECUTED 2d3c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 2d40: eb0001d7 bl 34a4 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2d44: e590304c ldr r3, [r0, #76] ; 0x4c 2d48: e3530001 cmp r3, #1 2d4c: 159f006c ldrne r0, [pc, #108] ; 2dc0 2d50: 13a01088 movne r1, #136 ; 0x88 2d54: 159f2068 ldrne r2, [pc, #104] ; 2dc4 2d58: 159f3070 ldrne r3, [pc, #112] ; 2dd0 2d5c: 1afffff7 bne 2d40 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2d60: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d64: 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, "...." ); 2d68: e59f8064 ldr r8, [pc, #100] ; 2dd4 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2d6c: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d70: ea00000f b 2db4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 2d74: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2d78: 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++ ) 2d7c: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 2d80: e5931008 ldr r1, [r3, #8] 2d84: e59f004c ldr r0, [pc, #76] ; 2dd8 2d88: eb0034a3 bl 1001c !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++ ) 2d8c: e1560005 cmp r6, r5 2d90: dafffff8 ble 2d78 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2d94: e1a00004 mov r0, r4 2d98: ebffff7e bl 2b98 if ( the_jnode->type == IMFS_DIRECTORY ) 2d9c: e594304c ldr r3, [r4, #76] ; 0x4c 2da0: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 2da4: 01a00004 moveq r0, r4 2da8: 01a01007 moveq r1, r7 2dac: 0bffffd5 bleq 2d08 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 ) { 2db0: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2db4: e154000a cmp r4, sl 2db8: 1affffed bne 2d74 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2dbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2dc0: 00021326 .word 0x00021326 2dc4: 000200bc .word 0x000200bc 2dc8: 000213dc .word 0x000213dc 2dcc: 000213ea .word 0x000213ea 2dd0: 000213f5 .word 0x000213f5 2dd4: 0001fb50 .word 0x0001fb50 2dd8: 0002141b .word 0x0002141b 00007970 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 7970: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7974: e24dd044 sub sp, sp, #68 ; 0x44 7978: e1a04003 mov r4, r3 797c: e58d0000 str r0, [sp] 7980: e1a06001 mov r6, r1 7984: e58d2004 str r2, [sp, #4] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7988: e5935000 ldr r5, [r3] 798c: e3a0b001 mov fp, #1 7990: 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 ); 7994: e28da008 add sl, sp, #8 7998: e28d8040 add r8, sp, #64 ; 0x40 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 799c: e59f9244 ldr r9, [pc, #580] ; 7be8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 79a0: ea000061 b 7b2c type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 79a4: e59d1000 ldr r1, [sp] 79a8: e1a03008 mov r3, r8 79ac: e0810007 add r0, r1, r7 79b0: e1a0200a mov r2, sl 79b4: e1a01006 mov r1, r6 79b8: eb0001f9 bl 81a4 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 79bc: e5943000 ldr r3, [r4] 79c0: 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 ); 79c4: e1a0b000 mov fp, r0 pathnamelen -= len; 79c8: e59de040 ldr lr, [sp, #64] ; 0x40 i += len; if ( !pathloc->node_access ) 79cc: 0a00004e beq 7b0c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 79d0: e3500000 cmp r0, #0 79d4: 0a000005 beq 79f0 if ( node->type == IMFS_DIRECTORY ) 79d8: e595204c ldr r2, [r5, #76] ; 0x4c 79dc: e3520001 cmp r2, #1 79e0: 1a000002 bne 79f0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 79e4: e5932030 ldr r2, [r3, #48] ; 0x30 79e8: e3120040 tst r2, #64 ; 0x40 79ec: 0a000078 beq 7bd4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 79f0: e35b0003 cmp fp, #3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 79f4: e06e6006 rsb r6, lr, r6 i += len; 79f8: e087700e add r7, r7, lr 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; 79fc: e1a05003 mov r5, r3 switch( type ) { 7a00: 0a000021 beq 7a8c 7a04: e35b0004 cmp fp, #4 7a08: 0a000044 beq 7b20 7a0c: e35b0002 cmp fp, #2 7a10: 1a000045 bne 7b2c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7a14: e5992000 ldr r2, [r9] 7a18: e5922018 ldr r2, [r2, #24] 7a1c: e1530002 cmp r3, r2 7a20: 0a000041 beq 7b2c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 7a24: e5942010 ldr r2, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 7a28: e592101c ldr r1, [r2, #28] 7a2c: e1530001 cmp r3, r1 7a30: 1a00000f bne 7a74 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 7a34: e2828008 add r8, r2, #8 7a38: e8b8000f ldm r8!, {r0, r1, r2, r3} 7a3c: e28dc02c add ip, sp, #44 ; 0x2c 7a40: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7a44: e28d502c add r5, sp, #44 ; 0x2c 7a48: e8b5000f ldm r5!, {r0, r1, r2, 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; 7a4c: e5985000 ldr r5, [r8] *pathloc = newloc; 7a50: e1a08004 mov r8, r4 7a54: e8a8000f stmia r8!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a58: e59d1000 ldr r1, [sp] 7a5c: e06e0007 rsb r0, lr, r7 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 7a60: e5885000 str r5, [r8] return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a64: e0810000 add r0, r1, r0 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 7a68: e58c5000 str r5, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a6c: e08e1006 add r1, lr, r6 7a70: ea000046 b 7b90 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 7a74: e5935008 ldr r5, [r3, #8] 7a78: e3550000 cmp r5, #0 7a7c: 1a000025 bne 7b18 rtems_set_errno_and_return_minus_one( ENOENT ); 7a80: eb000ec6 bl b5a0 <__errno> 7a84: e580b000 str fp, [r0] 7a88: ea000054 b 7be0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 7a8c: e593304c ldr r3, [r3, #76] ; 0x4c 7a90: e3530003 cmp r3, #3 7a94: 1a000006 bne 7ab4 IMFS_evaluate_hard_link( pathloc, 0 ); 7a98: e1a00004 mov r0, r4 7a9c: e3a01000 mov r1, #0 7aa0: ebffff5d bl 781c node = pathloc->node_access; 7aa4: e5945000 ldr r5, [r4] if ( !node ) 7aa8: e3550000 cmp r5, #0 7aac: 1a000008 bne 7ad4 7ab0: ea00000a b 7ae0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 7ab4: e3530004 cmp r3, #4 7ab8: 1a000005 bne 7ad4 result = IMFS_evaluate_sym_link( pathloc, 0 ); 7abc: e1a00004 mov r0, r4 7ac0: e3a01000 mov r1, #0 7ac4: ebffff6d bl 7880 node = pathloc->node_access; if ( result == -1 ) 7ac8: e3700001 cmn r0, #1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 7acc: e5945000 ldr r5, [r4] if ( result == -1 ) 7ad0: 0a00003d beq 7bcc /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7ad4: e595304c ldr r3, [r5, #76] ; 0x4c 7ad8: e3530001 cmp r3, #1 7adc: 0a000002 beq 7aec rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ae0: eb000eae bl b5a0 <__errno> 7ae4: e3a03014 mov r3, #20 7ae8: ea00003b b 7bdc /* * 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 ) { 7aec: e595e05c ldr lr, [r5, #92] ; 0x5c 7af0: e35e0000 cmp lr, #0 7af4: 1a000015 bne 7b50 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7af8: e1a00005 mov r0, r5 7afc: e1a0100a mov r1, sl 7b00: eb00017f bl 8104 if ( !node ) 7b04: e2505000 subs r5, r0, #0 7b08: 1a000002 bne 7b18 rtems_set_errno_and_return_minus_one( ENOENT ); 7b0c: eb000ea3 bl b5a0 <__errno> 7b10: e3a03002 mov r3, #2 7b14: ea000030 b 7bdc /* * Set the node access to the point we have found. */ pathloc->node_access = node; 7b18: e5845000 str r5, [r4] 7b1c: ea000002 b 7b2c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7b20: eb000e9e bl b5a0 <__errno> 7b24: e3a0305b mov r3, #91 ; 0x5b 7b28: ea00002b b 7bdc /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7b2c: e35b0004 cmp fp, #4 7b30: 135b0000 cmpne fp, #0 7b34: 1affff9a bne 79a4 * 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 ) { 7b38: e595304c ldr r3, [r5, #76] ; 0x4c 7b3c: e3530001 cmp r3, #1 7b40: 1a000018 bne 7ba8 if ( node->info.directory.mt_fs != NULL ) { 7b44: e595e05c ldr lr, [r5, #92] ; 0x5c 7b48: e35e0000 cmp lr, #0 7b4c: 0a000015 beq 7ba8 newloc = node->info.directory.mt_fs->mt_fs_root; 7b50: e28ee01c add lr, lr, #28 7b54: e8be000f ldm lr!, {r0, r1, r2, r3} 7b58: e28dc02c add ip, sp, #44 ; 0x2c 7b5c: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7b60: e28d502c add r5, sp, #44 ; 0x2c 7b64: e8b5000f ldm r5!, {r0, r1, r2, r3} 7b68: 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; 7b6c: e59ee000 ldr lr, [lr] *pathloc = newloc; 7b70: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7b74: e59d1040 ldr r1, [sp, #64] ; 0x40 7b78: e59d8000 ldr r8, [sp] 7b7c: e0610007 rsb r0, r1, r7 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 7b80: 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; 7b84: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7b88: e0880000 add r0, r8, r0 7b8c: e0861001 add r1, r6, r1 7b90: e59d2004 ldr r2, [sp, #4] 7b94: e1a03004 mov r3, r4 7b98: e594c00c ldr ip, [r4, #12] 7b9c: e1a0e00f mov lr, pc 7ba0: e59cf000 ldr pc, [ip] 7ba4: ea000008 b 7bcc flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7ba8: e1a00004 mov r0, r4 7bac: ebfffef4 bl 7784 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7bb0: e5943000 ldr r3, [r4] /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7bb4: e59d1004 ldr r1, [sp, #4] if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7bb8: e5932030 ldr r2, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7bbc: e1a03301 lsl r3, r1, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7bc0: e0032002 and r2, r3, r2 7bc4: e1520003 cmp r2, r3 7bc8: 1a000001 bne 7bd4 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7bcc: e28dd044 add sp, sp, #68 ; 0x44 7bd0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 7bd4: eb000e71 bl b5a0 <__errno> 7bd8: e3a0300d mov r3, #13 7bdc: e5803000 str r3, [r0] 7be0: e3e00000 mvn r0, #0 7be4: eafffff8 b 7bcc 7be8: 00017188 .word 0x00017188 00007ca0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7ca0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7ca4: e24dd040 sub sp, sp, #64 ; 0x40 7ca8: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7cac: 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 */ ) { 7cb0: e58d2000 str r2, [sp] 7cb4: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7cb8: eb001229 bl c564 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7cbc: e59f9238 ldr r9, [pc, #568] ; 7efc node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7cc0: e3a05000 mov r5, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 7cc4: e28db004 add fp, sp, #4 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7cc8: 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 ); 7ccc: e1a01008 mov r1, r8 7cd0: e28d303c add r3, sp, #60 ; 0x3c 7cd4: e0870005 add r0, r7, r5 7cd8: e1a0200b mov r2, fp 7cdc: eb000130 bl 81a4 pathlen -= len; i += len; if ( !pathloc->node_access ) 7ce0: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7ce4: e59da03c ldr sl, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7ce8: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7cec: e06a8008 rsb r8, sl, r8 i += len; if ( !pathloc->node_access ) 7cf0: 0a000067 beq 7e94 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7cf4: e3500000 cmp r0, #0 7cf8: 0a000005 beq 7d14 if ( node->type == IMFS_DIRECTORY ) 7cfc: e596204c ldr r2, [r6, #76] ; 0x4c 7d00: e3520001 cmp r2, #1 7d04: 1a000002 bne 7d14 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7d08: e5932030 ldr r2, [r3, #48] ; 0x30 7d0c: e3120040 tst r2, #64 ; 0x40 7d10: 0a000074 beq 7ee8 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 7d14: e085500a add r5, r5, sl 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; 7d18: e1a06003 mov r6, r3 switch( type ) { 7d1c: e3500004 cmp r0, #4 7d20: 979ff100 ldrls pc, [pc, r0, lsl #2] 7d24: eaffffe8 b 7ccc <== NOT EXECUTED 7d28: 00007e50 .word 0x00007e50 <== NOT EXECUTED 7d2c: 00007ccc .word 0x00007ccc <== NOT EXECUTED 7d30: 00007d3c .word 0x00007d3c <== NOT EXECUTED 7d34: 00007d9c .word 0x00007d9c <== NOT EXECUTED 7d38: 00007e5c .word 0x00007e5c <== 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 ) 7d3c: e5992000 ldr r2, [r9] 7d40: e5922018 ldr r2, [r2, #24] 7d44: e1530002 cmp r3, r2 7d48: 0affffdf beq 7ccc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 7d4c: e594e010 ldr lr, [r4, #16] 7d50: e59e201c ldr r2, [lr, #28] 7d54: e1530002 cmp r3, r2 7d58: 1a00000b bne 7d8c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7d5c: e28ee008 add lr, lr, #8 7d60: e8be000f ldm lr!, {r0, r1, r2, r3} 7d64: e28dc028 add ip, sp, #40 ; 0x28 7d68: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7d6c: e28d6028 add r6, sp, #40 ; 0x28 7d70: e8b6000f ldm r6!, {r0, r1, r2, r3} 7d74: e1a06004 mov r6, r4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7d78: e59ee000 ldr lr, [lr] *pathloc = newloc; 7d7c: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7d80: e06a5005 rsb r5, sl, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 7d84: e586e000 str lr, [r6] 7d88: ea000022 b 7e18 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 7d8c: e5936008 ldr r6, [r3, #8] 7d90: e3560000 cmp r6, #0 7d94: 1a00002b bne 7e48 7d98: ea00003d b 7e94 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 7d9c: e593304c ldr r3, [r3, #76] ; 0x4c 7da0: e3530003 cmp r3, #3 7da4: 0a000001 beq 7db0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 7da8: e3530004 cmp r3, #4 7dac: 1a000004 bne 7dc4 result = IMFS_evaluate_link( pathloc, 0 ); 7db0: e1a00004 mov r0, r4 7db4: e3a01000 mov r1, #0 7db8: ebffff8b bl 7bec if ( result == -1 ) 7dbc: e3700001 cmn r0, #1 7dc0: 0a000046 beq 7ee0 return -1; } node = pathloc->node_access; 7dc4: e5940000 ldr r0, [r4] if ( !node ) 7dc8: e3500000 cmp r0, #0 7dcc: 0a00003c beq 7ec4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7dd0: e590304c ldr r3, [r0, #76] ; 0x4c 7dd4: e3530001 cmp r3, #1 7dd8: 1a000039 bne 7ec4 /* * 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 ) { 7ddc: e590e05c ldr lr, [r0, #92] ; 0x5c 7de0: e35e0000 cmp lr, #0 7de4: 0a000013 beq 7e38 newloc = node->info.directory.mt_fs->mt_fs_root; 7de8: e28ee01c add lr, lr, #28 7dec: e8be000f ldm lr!, {r0, r1, r2, r3} 7df0: e28dc028 add ip, sp, #40 ; 0x28 7df4: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7df8: e28d6028 add r6, sp, #40 ; 0x28 7dfc: e8b6000f ldm r6!, {r0, r1, r2, r3} 7e00: 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; 7e04: e59ee000 ldr lr, [lr] *pathloc = newloc; 7e08: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e0c: 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; 7e10: e586e000 str lr, [r6] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e14: e0635005 rsb r5, r3, r5 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 7e18: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e1c: e0870005 add r0, r7, r5 7e20: e1a01004 mov r1, r4 7e24: e59d2000 ldr r2, [sp] 7e28: e594300c ldr r3, [r4, #12] 7e2c: e1a0e00f mov lr, pc 7e30: e593f004 ldr pc, [r3, #4] 7e34: ea000029 b 7ee0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7e38: e1a0100b mov r1, fp 7e3c: eb0000b0 bl 8104 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 7e40: e2506000 subs r6, r0, #0 7e44: 0a000007 beq 7e68 done = true; else pathloc->node_access = node; 7e48: e5846000 str r6, [r4] 7e4c: eaffff9e b 7ccc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 7e50: eb000dd2 bl b5a0 <__errno> 7e54: e3a03011 mov r3, #17 7e58: ea000024 b 7ef0 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7e5c: eb000dcf bl b5a0 <__errno> 7e60: e3a0305b mov r3, #91 ; 0x5b 7e64: ea000021 b 7ef0 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 7e68: e59d303c ldr r3, [sp, #60] ; 0x3c 7e6c: e59d2000 ldr r2, [sp] 7e70: e0633005 rsb r3, r3, r5 7e74: e0873003 add r3, r7, r3 7e78: e5823000 str r3, [r2] 7e7c: 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++) { 7e80: ea000006 b 7ea0 if ( !IMFS_is_separator( path[ i ] ) ) 7e84: e353005c cmp r3, #92 ; 0x5c 7e88: 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++) { 7e8c: e2855001 add r5, r5, #1 if ( !IMFS_is_separator( path[ i ] ) ) 7e90: 0a000002 beq 7ea0 rtems_set_errno_and_return_minus_one( ENOENT ); 7e94: eb000dc1 bl b5a0 <__errno> 7e98: e3a03002 mov r3, #2 7e9c: ea000013 b 7ef0 /* * 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++) { 7ea0: e5d53000 ldrb r3, [r5] 7ea4: e3530000 cmp r3, #0 7ea8: 1afffff5 bne 7e84 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7eac: e1a00004 mov r0, r4 7eb0: ebfffe33 bl 7784 /* * The returned node must be a directory */ node = pathloc->node_access; 7eb4: e5943000 ldr r3, [r4] if ( node->type != IMFS_DIRECTORY ) 7eb8: e593204c ldr r2, [r3, #76] ; 0x4c 7ebc: e3520001 cmp r2, #1 7ec0: 0a000002 beq 7ed0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ec4: eb000db5 bl b5a0 <__errno> 7ec8: e3a03014 mov r3, #20 7ecc: ea000007 b 7ef0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7ed0: e5933030 ldr r3, [r3, #48] ; 0x30 7ed4: e20330c0 and r3, r3, #192 ; 0xc0 7ed8: e35300c0 cmp r3, #192 ; 0xc0 7edc: 1a000001 bne 7ee8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7ee0: e28dd040 add sp, sp, #64 ; 0x40 7ee4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} */ 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 ); 7ee8: eb000dac bl b5a0 <__errno> 7eec: e3a0300d mov r3, #13 7ef0: e5803000 str r3, [r0] 7ef4: e3e00000 mvn r0, #0 7ef8: eafffff8 b 7ee0 7efc: 00017188 .word 0x00017188 0000781c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 781c: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 7820: e593204c ldr r2, [r3, #76] ; 0x4c 7824: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7828: e92d4030 push {r4, r5, lr} 782c: e1a04000 mov r4, r0 7830: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7834: 159f0040 ldrne r0, [pc, #64] ; 787c 7838: 1bfff418 blne 48a0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 783c: e5933050 ldr r3, [r3, #80] ; 0x50 7840: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 7844: ebffffce bl 7784 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7848: e5943000 ldr r3, [r4] 784c: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7850: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7854: e0053003 and r3, r5, r3 7858: e1530005 cmp r3, r5 785c: 1a000001 bne 7868 7860: e3a00000 mov r0, #0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7864: e8bd8030 pop {r4, r5, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 7868: eb000f4c bl b5a0 <__errno> <== NOT EXECUTED 786c: e3a0300d mov r3, #13 <== NOT EXECUTED 7870: e5803000 str r3, [r0] <== NOT EXECUTED 7874: e3e00000 mvn r0, #0 <== NOT EXECUTED 7878: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 787c: abcd0000 .word 0xabcd0000 000077fc : /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 77fc: e5903000 ldr r3, [r0] <== NOT EXECUTED 7800: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED 7804: e1a01301 lsl r1, r1, #6 <== NOT EXECUTED 7808: e0013003 and r3, r1, r3 <== NOT EXECUTED return 1; return 0; } 780c: e1530001 cmp r3, r1 <== NOT EXECUTED 7810: 13a00000 movne r0, #0 <== NOT EXECUTED 7814: 03a00001 moveq r0, #1 <== NOT EXECUTED 7818: e12fff1e bx lr <== NOT EXECUTED 00007880 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7880: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 7884: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 7888: e59e304c ldr r3, [lr, #76] ; 0x4c 788c: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7890: e1a04000 mov r4, r0 7894: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7898: 159f00c4 ldrne r0, [pc, #196] ; 7964 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 789c: 1a000003 bne 78b0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 78a0: e59e3008 ldr r3, [lr, #8] 78a4: e3530000 cmp r3, #0 78a8: 1a000001 bne 78b4 rtems_fatal_error_occurred( 0xBAD00000 ); 78ac: e59f00b4 ldr r0, [pc, #180] ; 7968 <== NOT EXECUTED 78b0: ebfff3fa bl 48a0 <== 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; 78b4: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 78b8: e59e3050 ldr r3, [lr, #80] ; 0x50 78bc: e5d33000 ldrb r3, [r3] 78c0: e353002f cmp r3, #47 ; 0x2f 78c4: 1353005c cmpne r3, #92 ; 0x5c 78c8: 13a06000 movne r6, #0 78cc: 03a06001 moveq r6, #1 78d0: 0a000001 beq 78dc 78d4: e3530000 cmp r3, #0 78d8: 1a000008 bne 7900 78dc: e59f3088 ldr r3, [pc, #136] ; 796c 78e0: e593c000 ldr ip, [r3] 78e4: e28cc018 add ip, ip, #24 78e8: e8bc000f ldm ip!, {r0, r1, r2, r3} 78ec: e1a06004 mov r6, r4 78f0: e8a6000f stmia r6!, {r0, r1, r2, r3} 78f4: e59c2000 ldr r2, [ip] 78f8: e5862000 str r2, [r6] 78fc: 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] ), 7900: e59e3050 ldr r3, [lr, #80] ; 0x50 7904: e0836006 add r6, r3, r6 7908: e1a00006 mov r0, r6 790c: eb001314 bl c564 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7910: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 7914: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7918: e1a03004 mov r3, r4 791c: e1a00006 mov r0, r6 7920: eb000012 bl 7970 7924: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 7928: e1a00004 mov r0, r4 792c: ebffff94 bl 7784 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7930: e5943000 ldr r3, [r4] 7934: e5933030 ldr r3, [r3, #48] ; 0x30 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7938: e1a05305 lsl r5, r5, #6 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 793c: e0053003 and r3, r5, r3 7940: e1530005 cmp r3, r5 7944: 1a000001 bne 7950 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7948: e1a00006 mov r0, r6 794c: e8bd8070 pop {r4, r5, r6, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 7950: eb000f12 bl b5a0 <__errno> <== NOT EXECUTED 7954: e3a0300d mov r3, #13 <== NOT EXECUTED 7958: e5803000 str r3, [r0] <== NOT EXECUTED 795c: e3e06000 mvn r6, #0 <== NOT EXECUTED 7960: eafffff8 b 7948 <== NOT EXECUTED 7964: abcd0000 .word 0xabcd0000 7968: bad00000 .word 0xbad00000 796c: 00017188 .word 0x00017188 00008060 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8060: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8064: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8068: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 806c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8070: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 8074: eb00088f bl a2b8 <== NOT EXECUTED if (! err) { 8078: e2506000 subs r6, r0, #0 <== NOT EXECUTED 807c: 1a00000c bne 80b4 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 8080: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8084: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 8088: 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) 808c: e1a00004 mov r0, r4 <== NOT EXECUTED 8090: eb000212 bl 88e0 <== NOT EXECUTED 8094: e3500000 cmp r0, #0 <== NOT EXECUTED 8098: 1a00000a bne 80c8 <== NOT EXECUTED 809c: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 80a0: e3530000 cmp r3, #0 <== NOT EXECUTED 80a4: 1a000007 bne 80c8 <== NOT EXECUTED free(jnode); 80a8: e1a00004 mov r0, r4 <== NOT EXECUTED 80ac: eb00017e bl 86ac <== NOT EXECUTED 80b0: ea000004 b 80c8 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 80b4: aa000003 bge 80c8 <== NOT EXECUTED 80b8: eb000d38 bl b5a0 <__errno> <== NOT EXECUTED 80bc: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 80c0: e5806000 str r6, [r0] <== NOT EXECUTED 80c4: e3e06000 mvn r6, #0 <== NOT EXECUTED } 80c8: e1a00006 mov r0, r6 <== NOT EXECUTED 80cc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00007f48 : void *buffer ) { int err; if (command == FIONBIO) { 7f48: e59f3068 ldr r3, [pc, #104] ; 7fb8 <== NOT EXECUTED 7f4c: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 7f50: e92d4010 push {r4, lr} <== NOT EXECUTED 7f54: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 7f58: 1a00000b bne 7f8c <== NOT EXECUTED if (buffer == NULL) 7f5c: e3520000 cmp r2, #0 <== NOT EXECUTED 7f60: 03e0400d mvneq r4, #13 <== NOT EXECUTED 7f64: 0a00000d beq 7fa0 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 7f68: e5924000 ldr r4, [r2] <== NOT EXECUTED 7f6c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 7f70: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 7f74: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 7f78: 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; 7f7c: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 7f80: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 7f84: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 7f88: ea000008 b 7fb0 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 7f8c: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 7f90: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7f94: eb0007e2 bl 9f24 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f98: e2504000 subs r4, r0, #0 <== NOT EXECUTED 7f9c: aa000003 bge 7fb0 <== NOT EXECUTED 7fa0: eb000d7e bl b5a0 <__errno> <== NOT EXECUTED 7fa4: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 7fa8: e5804000 str r4, [r0] <== NOT EXECUTED 7fac: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7fb0: e1a00004 mov r0, r4 <== NOT EXECUTED 7fb4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 7fb8: 8004667e .word 0x8004667e 00007f00 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 7f00: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 7f04: e58d0000 str r0, [sp] <== NOT EXECUTED 7f08: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 7f0c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7f10: eb0007e9 bl 9ebc <== NOT EXECUTED 7f14: e1a03000 mov r3, r0 <== NOT EXECUTED 7f18: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f1c: 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); 7f20: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f24: aa000004 bge 7f3c <== NOT EXECUTED 7f28: eb000d9c bl b5a0 <__errno> <== NOT EXECUTED 7f2c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 7f30: e5805000 str r5, [r0] <== NOT EXECUTED 7f34: e3e03000 mvn r3, #0 <== NOT EXECUTED 7f38: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7f3c: e1a01004 mov r1, r4 <== NOT EXECUTED 7f40: e1a00003 mov r0, r3 <== NOT EXECUTED 7f44: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 00008010 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8010: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8014: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8018: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 801c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8020: eb00083b bl a114 <== NOT EXECUTED if (err > 0) 8024: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8028: da000005 ble 8044 <== NOT EXECUTED IMFS_update_atime(jnode); 802c: e1a0000d mov r0, sp <== NOT EXECUTED 8030: e3a01000 mov r1, #0 <== NOT EXECUTED 8034: eb0001ff bl 8838 <== NOT EXECUTED 8038: e59d3000 ldr r3, [sp] <== NOT EXECUTED 803c: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 8040: ea000004 b 8058 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8044: 0a000003 beq 8058 <== NOT EXECUTED 8048: eb000d54 bl b5a0 <__errno> <== NOT EXECUTED 804c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8050: e5805000 str r5, [r0] <== NOT EXECUTED 8054: e3e05000 mvn r5, #0 <== NOT EXECUTED } 8058: e1a00005 mov r0, r5 <== NOT EXECUTED 805c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00007fbc : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 7fbc: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 7fc0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 7fc4: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 7fc8: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 7fcc: eb0007ec bl 9f84 <== NOT EXECUTED if (err > 0) { 7fd0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 7fd4: da000006 ble 7ff4 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 7fd8: e1a0000d mov r0, sp <== NOT EXECUTED 7fdc: e3a01000 mov r1, #0 <== NOT EXECUTED 7fe0: eb000214 bl 8838 <== NOT EXECUTED 7fe4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 7fe8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 7fec: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 7ff0: ea000004 b 8008 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 7ff4: 0a000003 beq 8008 <== NOT EXECUTED 7ff8: eb000d68 bl b5a0 <__errno> <== NOT EXECUTED 7ffc: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8000: e5805000 str r5, [r0] <== NOT EXECUTED 8004: e3e05000 mvn r5, #0 <== NOT EXECUTED } 8008: e1a00005 mov r0, r5 <== NOT EXECUTED 800c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000cea4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { cea4: 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; cea8: e1a0c000 mov ip, r0 ceac: 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 ) { ceb0: e1a05000 mov r5, r0 ceb4: 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; ceb8: e8bc000f ldm ip!, {r0, r1, r2, r3} cebc: e1a0e00d mov lr, sp cec0: e8ae000f stmia lr!, {r0, r1, r2, r3} cec4: e59c3000 ldr r3, [ip] cec8: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; cecc: e3a03000 mov r3, #0 ced0: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ced4: e1a0500d mov r5, sp ced8: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; cedc: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; cee0: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); cee4: ebfffd8c bl c51c if ( jnode->type != IMFS_DIRECTORY ) { cee8: e594204c ldr r2, [r4, #76] ; 0x4c ceec: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; cef0: e2843054 add r3, r4, #84 ; 0x54 cef4: 1a000002 bne cf04 cef8: e5942050 ldr r2, [r4, #80] ; 0x50 cefc: e1520003 cmp r2, r3 cf00: 1a000005 bne cf1c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); cf04: e3a00000 mov r0, #0 cf08: e1a0100d mov r1, sp cf0c: ebffd459 bl 2078 if (result != 0) cf10: e3500000 cmp r0, #0 cf14: 1a00000c bne cf4c cf18: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { cf1c: e3540000 cmp r4, #0 cf20: 0a00000b beq cf54 if ( jnode->type == IMFS_DIRECTORY ) { cf24: e594304c ldr r3, [r4, #76] ; 0x4c cf28: e3530001 cmp r3, #1 cf2c: 1affffe9 bne ced8 cf30: e5943050 ldr r3, [r4, #80] ; 0x50 cf34: e2842054 add r2, r4, #84 ; 0x54 cf38: e1530002 cmp r3, r2 cf3c: 0affffe5 beq ced8 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); cf40: e2534000 subs r4, r3, #0 cf44: 1affffe3 bne ced8 cf48: ea000001 b cf54 <== NOT EXECUTED cf4c: e3e00000 mvn r0, #0 <== NOT EXECUTED cf50: ea000000 b cf58 <== NOT EXECUTED cf54: e3a00000 mov r0, #0 return 0; } cf58: e28dd014 add sp, sp, #20 cf5c: e8bd8070 pop {r4, r5, r6, pc} 0000826c : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 826c: e59fc0c8 ldr ip, [pc, #200] ; 833c 8270: 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 ) { 8274: e92d40f0 push {r4, r5, r6, r7, lr} 8278: e1a06002 mov r6, r2 827c: e1a05003 mov r5, r3 8280: e1a04000 mov r4, r0 8284: 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, 8288: e3a02000 mov r2, #0 828c: 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) { 8290: e153000c cmp r3, ip 8294: e2822001 add r2, r2, #1 8298: 0a000003 beq 82ac 829c: e3520006 cmp r2, #6 82a0: e1a03083 lsl r3, r3, #1 82a4: 1afffff9 bne 8290 82a8: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 82ac: e59f208c ldr r2, [pc, #140] ; 8340 82b0: e5823000 str r3, [r2] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 82b4: eb00092b bl a768 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; 82b8: e59fe084 ldr lr, [pc, #132] ; 8344 /* * 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(); 82bc: 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; 82c0: e8be000f ldm lr!, {r0, r1, r2, r3} 82c4: e284c038 add ip, r4, #56 ; 0x38 82c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 82cc: e8be000f ldm lr!, {r0, r1, r2, r3} 82d0: e8ac000f stmia ip!, {r0, r1, r2, r3} 82d4: 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; 82d8: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 82dc: 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; 82e0: e5845024 str r5, [r4, #36] ; 0x24 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 82e4: e3a00001 mov r0, #1 82e8: e3a0100c mov r1, #12 82ec: eb0000b2 bl 85bc if ( !fs_info ) { 82f0: e3500000 cmp r0, #0 82f4: 1a000006 bne 8314 free(temp_mt_entry->mt_fs_root.node_access); 82f8: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 82fc: eb0000ea bl 86ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8300: eb000ca6 bl b5a0 <__errno> <== NOT EXECUTED 8304: e3a0300c mov r3, #12 <== NOT EXECUTED 8308: e5803000 str r3, [r0] <== NOT EXECUTED 830c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8310: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8314: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8318: e3a03001 mov r3, #1 831c: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8320: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8324: e5806004 str r6, [r0, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 8328: 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; 832c: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 8330: eb0006e3 bl 9ec4 8334: e3a00000 mov r0, #0 return 0; } 8338: e8bd80f0 pop {r4, r5, r6, r7, pc} 833c: 00016ff4 .word 0x00016ff4 8340: 00018520 .word 0x00018520 8344: 00017a58 .word 0x00017a58 00001d80 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1d80: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d84: 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 */ ) { 1d88: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d8c: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1d90: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1d94: 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 */ ) { 1d98: e1a05001 mov r5, r1 1d9c: 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 ) 1da0: 9a000002 bls 1db0 rtems_set_errno_and_return_minus_one( EMLINK ); 1da4: eb0039f0 bl 1056c <__errno> 1da8: e3a0301f mov r3, #31 1dac: ea000012 b 1dfc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1db0: e1a00002 mov r0, r2 1db4: eb003dc5 bl 114d0 1db8: e28d4004 add r4, sp, #4 1dbc: e1a01000 mov r1, r0 1dc0: e1a02004 mov r2, r4 1dc4: e28d3044 add r3, sp, #68 ; 0x44 1dc8: e1a00006 mov r0, r6 1dcc: eb002c8b bl d000 * 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( 1dd0: e28dc028 add ip, sp, #40 ; 0x28 1dd4: e1a00005 mov r0, r5 1dd8: e1a02004 mov r2, r4 1ddc: e3a01003 mov r1, #3 1de0: e59f3054 ldr r3, [pc, #84] ; 1e3c 1de4: e58dc000 str ip, [sp] 1de8: eb00297c bl c3e0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1dec: e3500000 cmp r0, #0 1df0: 1a000004 bne 1e08 rtems_set_errno_and_return_minus_one( ENOMEM ); 1df4: eb0039dc bl 1056c <__errno> <== NOT EXECUTED 1df8: e3a0300c mov r3, #12 <== NOT EXECUTED 1dfc: e5803000 str r3, [r0] 1e00: e3e00000 mvn r0, #0 1e04: ea00000a b 1e34 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 1e08: e59d3028 ldr r3, [sp, #40] ; 0x28 1e0c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1e10: e2822001 add r2, r2, #1 1e14: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 1e18: e28d003c add r0, sp, #60 ; 0x3c 1e1c: e3a01000 mov r1, #0 1e20: eb000240 bl 2728 1e24: e59d203c ldr r2, [sp, #60] ; 0x3c 1e28: e59d3028 ldr r3, [sp, #40] ; 0x28 1e2c: e5832048 str r2, [r3, #72] ; 0x48 1e30: e3a00000 mov r0, #0 return 0; } 1e34: e28dd048 add sp, sp, #72 ; 0x48 1e38: e8bd8070 pop {r4, r5, r6, pc} 1e3c: 0000a1ff .word 0x0000a1ff 0000f22c : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); f22c: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { f230: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); f234: 059f0060 ldreq r0, [pc, #96] ; f29c f238: 059f1060 ldreq r1, [pc, #96] ; f2a0 f23c: 059f2060 ldreq r2, [pc, #96] ; f2a4 f240: 059f3060 ldreq r3, [pc, #96] ; f2a8 f244: 0a000006 beq f264 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f248: e593304c ldr r3, [r3, #76] ; 0x4c f24c: e3530005 cmp r3, #5 f250: 0a000004 beq f268 f254: e59f0040 ldr r0, [pc, #64] ; f29c <== NOT EXECUTED f258: e59f104c ldr r1, [pc, #76] ; f2ac <== NOT EXECUTED f25c: e59f2040 ldr r2, [pc, #64] ; f2a4 <== NOT EXECUTED f260: e59f3048 ldr r3, [pc, #72] ; f2b0 <== NOT EXECUTED f264: ebfff7f2 bl d234 <__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 ); f268: e3a02001 mov r2, #1 f26c: ebfffeab bl ed20 if ( *block_entry_ptr ) f270: e5904000 ldr r4, [r0] f274: 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 ); f278: e1a05000 mov r5, r0 if ( *block_entry_ptr ) f27c: 13a00000 movne r0, #0 f280: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); f284: ebfffe98 bl ecec if ( !memory ) f288: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; f28c: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) f290: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; f294: 11a00004 movne r0, r4 return 0; } f298: e8bd8030 pop {r4, r5, pc} f29c: 0001d84f .word 0x0001d84f f2a0: 00000169 .word 0x00000169 f2a4: 0001d018 .word 0x0001d018 f2a8: 0001d895 .word 0x0001d895 f2ac: 0000016d .word 0x0000016d f2b0: 0001d89f .word 0x0001d89f 0000f2b4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { f2b4: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f2b8: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { f2bc: e1a05001 mov r5, r1 f2c0: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); f2c4: 059f0134 ldreq r0, [pc, #308] ; f400 f2c8: 059f1134 ldreq r1, [pc, #308] ; f404 f2cc: 059f2134 ldreq r2, [pc, #308] ; f408 f2d0: 059f3134 ldreq r3, [pc, #308] ; f40c f2d4: 0a000006 beq f2f4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f2d8: e594304c ldr r3, [r4, #76] ; 0x4c f2dc: e3530005 cmp r3, #5 f2e0: 0a000004 beq f2f8 f2e4: e59f0114 ldr r0, [pc, #276] ; f400 <== NOT EXECUTED f2e8: e59f1120 ldr r1, [pc, #288] ; f410 <== NOT EXECUTED f2ec: e59f2114 ldr r2, [pc, #276] ; f408 <== NOT EXECUTED f2f0: e59f311c ldr r3, [pc, #284] ; f414 <== NOT EXECUTED f2f4: ebfff7ce bl d234 <__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 ) f2f8: e59f3118 ldr r3, [pc, #280] ; f418 f2fc: e593b000 ldr fp, [r3] f300: e1a0312b lsr r3, fp, #2 f304: e2832001 add r2, r3, #1 f308: e0010293 mul r1, r3, r2 f30c: e2811001 add r1, r1, #1 f310: e0020193 mul r2, r3, r1 f314: e3a03000 mov r3, #0 f318: e1530006 cmp r3, r6 f31c: e2422001 sub r2, r2, #1 f320: e003029b mul r3, fp, r2 f324: ca000005 bgt f340 f328: 1a000001 bne f334 f32c: e1530005 cmp r3, r5 f330: 8a000002 bhi f340 rtems_set_errno_and_return_minus_one( EINVAL ); f334: eb00048c bl 1056c <__errno> <== NOT EXECUTED f338: e3a03016 mov r3, #22 <== NOT EXECUTED f33c: ea000025 b f3d8 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) f340: e5948054 ldr r8, [r4, #84] ; 0x54 f344: e1560008 cmp r6, r8 f348: e5947050 ldr r7, [r4, #80] ; 0x50 f34c: ca000002 bgt f35c f350: 1a000028 bne f3f8 f354: e1550007 cmp r5, r7 f358: 9a000026 bls f3f8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; f35c: e1a0cfcb asr ip, fp, #31 f360: e1a0300c mov r3, ip f364: e1a0200b mov r2, fp f368: e1a00005 mov r0, r5 f36c: e1a01006 mov r1, r6 f370: e58dc000 str ip, [sp] f374: eb002cdf bl 1a6f8 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; f378: e59dc000 ldr ip, [sp] f37c: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; f380: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; f384: e1a0200b mov r2, fp f388: e1a00007 mov r0, r7 f38c: e1a0300c mov r3, ip f390: eb002cd8 bl 1a6f8 <__divdi3> f394: e1a08000 mov r8, r0 f398: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { f39c: ea000011 b f3e8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { f3a0: e1a00004 mov r0, r4 f3a4: e1a01007 mov r1, r7 f3a8: ebffff9f bl f22c f3ac: e3500000 cmp r0, #0 f3b0: 0a00000b beq f3e4 f3b4: ea000003 b f3c8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); f3b8: e1a01007 mov r1, r7 <== NOT EXECUTED f3bc: e1a00004 mov r0, r4 <== NOT EXECUTED f3c0: ebfffefa bl efb0 <== 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-- ) { f3c4: e2477001 sub r7, r7, #1 <== NOT EXECUTED f3c8: e1570008 cmp r7, r8 <== NOT EXECUTED f3cc: 2afffff9 bcs f3b8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); f3d0: eb000465 bl 1056c <__errno> <== NOT EXECUTED f3d4: e3a0301c mov r3, #28 <== NOT EXECUTED f3d8: e5803000 str r3, [r0] <== NOT EXECUTED f3dc: e3e00000 mvn r0, #0 <== NOT EXECUTED f3e0: ea000005 b f3fc <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { f3e4: e2877001 add r7, r7, #1 f3e8: e157000a cmp r7, sl f3ec: 9affffeb bls f3a0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; f3f0: e5846054 str r6, [r4, #84] ; 0x54 f3f4: e5845050 str r5, [r4, #80] ; 0x50 f3f8: e3a00000 mov r0, #0 return 0; } f3fc: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} f400: 0001d84f .word 0x0001d84f f404: 00000131 .word 0x00000131 f408: 0001d030 .word 0x0001d030 f40c: 0001d895 .word 0x0001d895 f410: 00000135 .word 0x00000135 f414: 0001d89f .word 0x0001d89f f418: 0001dbe8 .word 0x0001dbe8 0000ed20 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ed20: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ed24: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ed28: e1a06001 mov r6, r1 ed2c: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); ed30: 059f01e8 ldreq r0, [pc, #488] ; ef20 ed34: 03a01fe2 moveq r1, #904 ; 0x388 ed38: 059f21e4 ldreq r2, [pc, #484] ; ef24 ed3c: 059f31e4 ldreq r3, [pc, #484] ; ef28 ed40: 0a000006 beq ed60 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ed44: e594304c ldr r3, [r4, #76] ; 0x4c ed48: e3530005 cmp r3, #5 ed4c: 0a000004 beq ed64 ed50: e59f01c8 ldr r0, [pc, #456] ; ef20 <== NOT EXECUTED ed54: e59f21c8 ldr r2, [pc, #456] ; ef24 <== NOT EXECUTED ed58: e59f31cc ldr r3, [pc, #460] ; ef2c <== NOT EXECUTED ed5c: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED ed60: ebfff933 bl d234 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ed64: e59f31c4 ldr r3, [pc, #452] ; ef30 ed68: e5935000 ldr r5, [r3] ed6c: e1a05125 lsr r5, r5, #2 ed70: e2453001 sub r3, r5, #1 ed74: e1510003 cmp r1, r3 ed78: 8a00000e bhi edb8 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { ed7c: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; ed80: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { ed84: 0a000007 beq eda8 if ( !p ) { ed88: e3500000 cmp r0, #0 ed8c: 1a000003 bne eda0 p = memfile_alloc_block(); ed90: ebffffd5 bl ecec if ( !p ) ed94: e3500000 cmp r0, #0 ed98: 0a00005e beq ef18 return 0; info->indirect = p; ed9c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; eda0: e5940058 ldr r0, [r4, #88] ; 0x58 eda4: ea000001 b edb0 } if ( !p ) eda8: e3500000 cmp r0, #0 edac: 0a000059 beq ef18 return 0; return &info->indirect[ my_block ]; edb0: e0800106 add r0, r0, r6, lsl #2 edb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { edb8: e2852001 add r2, r5, #1 <== NOT EXECUTED edbc: e0030295 mul r3, r5, r2 <== NOT EXECUTED edc0: e2432001 sub r2, r3, #1 <== NOT EXECUTED edc4: e1510002 cmp r1, r2 <== NOT EXECUTED edc8: 8a00001b bhi ee3c <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; edcc: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; edd0: e1a00006 mov r0, r6 <== NOT EXECUTED edd4: e1a01005 mov r1, r5 <== NOT EXECUTED edd8: eb002b94 bl 19c30 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; eddc: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ede0: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ede4: e1a00006 mov r0, r6 <== NOT EXECUTED ede8: eb002afc bl 199e0 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { edec: 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; edf0: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; edf4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { edf8: 0a000009 beq ee24 <== NOT EXECUTED if ( !p ) { edfc: e3530000 cmp r3, #0 <== NOT EXECUTED ee00: 1a000003 bne ee14 <== NOT EXECUTED p = memfile_alloc_block(); ee04: ebffffb8 bl ecec <== NOT EXECUTED if ( !p ) ee08: e2503000 subs r3, r0, #0 <== NOT EXECUTED ee0c: 0a000041 beq ef18 <== NOT EXECUTED return 0; info->doubly_indirect = p; ee10: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; ee14: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED ee18: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { ee1c: e3500000 cmp r0, #0 <== NOT EXECUTED ee20: ea00002e b eee0 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) ee24: e3530000 cmp r3, #0 <== NOT EXECUTED ee28: 0a00003a beq ef18 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; ee2c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) ee30: e3500000 cmp r0, #0 <== NOT EXECUTED ee34: 1a000035 bne ef10 <== NOT EXECUTED ee38: ea000036 b ef18 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ee3c: e2831001 add r1, r3, #1 <== NOT EXECUTED ee40: e0020195 mul r2, r5, r1 <== NOT EXECUTED ee44: e2422001 sub r2, r2, #1 <== NOT EXECUTED ee48: e1560002 cmp r6, r2 <== NOT EXECUTED ee4c: 8a000031 bhi ef18 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; ee50: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ee54: e1a01005 mov r1, r5 <== NOT EXECUTED ee58: e1a00006 mov r0, r6 <== NOT EXECUTED ee5c: eb002b73 bl 19c30 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ee60: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ee64: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ee68: e1a00006 mov r0, r6 <== NOT EXECUTED ee6c: eb002adb bl 199e0 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ee70: 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; ee74: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ee78: eb002ad8 bl 199e0 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ee7c: 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; ee80: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ee84: e1a00006 mov r0, r6 <== NOT EXECUTED ee88: eb002b68 bl 19c30 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { ee8c: 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; ee90: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; ee94: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { ee98: 0a000016 beq eef8 <== NOT EXECUTED if ( !p ) { ee9c: e3530000 cmp r3, #0 <== NOT EXECUTED eea0: 1a000003 bne eeb4 <== NOT EXECUTED p = memfile_alloc_block(); eea4: ebffff90 bl ecec <== NOT EXECUTED if ( !p ) eea8: e2503000 subs r3, r0, #0 <== NOT EXECUTED eeac: 0a000019 beq ef18 <== NOT EXECUTED return 0; info->triply_indirect = p; eeb0: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; eeb4: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { eeb8: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; eebc: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { eec0: 1a000003 bne eed4 <== NOT EXECUTED p1 = memfile_alloc_block(); eec4: ebffff88 bl ecec <== NOT EXECUTED if ( !p1 ) eec8: e2502000 subs r2, r0, #0 <== NOT EXECUTED eecc: 0a000011 beq ef18 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; eed0: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; eed4: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED eed8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { eedc: e3500000 cmp r0, #0 <== NOT EXECUTED eee0: 1a00000a bne ef10 <== NOT EXECUTED p2 = memfile_alloc_block(); eee4: ebffff80 bl ecec <== NOT EXECUTED if ( !p2 ) eee8: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; eeec: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) eef0: 1a000006 bne ef10 <== NOT EXECUTED eef4: ea000007 b ef18 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) eef8: e3530000 cmp r3, #0 <== NOT EXECUTED eefc: 0a000005 beq ef18 <== 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 ]; ef00: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) ef04: e3530000 cmp r3, #0 <== NOT EXECUTED ef08: 0a000002 beq ef18 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ef0c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED ef10: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED ef14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED ef18: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ef1c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED ef20: 0001d84f .word 0x0001d84f ef24: 0001cfa8 .word 0x0001cfa8 ef28: 0001d895 .word 0x0001d895 ef2c: 0001d89f .word 0x0001d89f ef30: 0001dbe8 .word 0x0001dbe8 0000f83c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { f83c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f840: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { f844: e24dd014 sub sp, sp, #20 f848: e1a06003 mov r6, r3 f84c: e1a08001 mov r8, r1 f850: e1a09002 mov r9, r2 f854: e59d7038 ldr r7, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); f858: 059f0268 ldreq r0, [pc, #616] ; fac8 f85c: 03a01f93 moveq r1, #588 ; 0x24c f860: 059f2264 ldreq r2, [pc, #612] ; facc f864: 059f3264 ldreq r3, [pc, #612] ; fad0 f868: 0a000007 beq f88c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || f86c: e594304c ldr r3, [r4, #76] ; 0x4c f870: e2432005 sub r2, r3, #5 f874: e3520001 cmp r2, #1 f878: 9a000004 bls f890 f87c: e59f0244 ldr r0, [pc, #580] ; fac8 <== NOT EXECUTED f880: e59f124c ldr r1, [pc, #588] ; fad4 <== NOT EXECUTED f884: e59f2240 ldr r2, [pc, #576] ; facc <== NOT EXECUTED f888: e59f3248 ldr r3, [pc, #584] ; fad8 <== NOT EXECUTED f88c: ebfff668 bl d234 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); f890: e3560000 cmp r6, #0 f894: 059f022c ldreq r0, [pc, #556] ; fac8 f898: 059f123c ldreq r1, [pc, #572] ; fadc f89c: 059f2228 ldreq r2, [pc, #552] ; facc f8a0: 059f3238 ldreq r3, [pc, #568] ; fae0 f8a4: 0afffff8 beq f88c /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) f8a8: e3570000 cmp r7, #0 f8ac: 1a000004 bne f8c4 rtems_set_errno_and_return_minus_one( EINVAL ); f8b0: eb00032d bl 1056c <__errno> <== NOT EXECUTED f8b4: e3a03016 mov r3, #22 <== NOT EXECUTED f8b8: e5803000 str r3, [r0] <== NOT EXECUTED f8bc: e3e07000 mvn r7, #0 <== NOT EXECUTED f8c0: ea00007d b fabc <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { f8c4: e3530006 cmp r3, #6 f8c8: 1a000012 bne f918 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) f8cc: e2843050 add r3, r4, #80 ; 0x50 <== NOT EXECUTED f8d0: e893000c ldm r3, {r2, r3} <== NOT EXECUTED f8d4: e1a00002 mov r0, r2 <== NOT EXECUTED f8d8: e1a01003 mov r1, r3 <== NOT EXECUTED f8dc: e3a0c000 mov ip, #0 <== NOT EXECUTED f8e0: e0500008 subs r0, r0, r8 <== NOT EXECUTED f8e4: e0c11009 sbc r1, r1, r9 <== NOT EXECUTED f8e8: e15c0001 cmp ip, r1 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; f8ec: e594c058 ldr ip, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) f8f0: ca000002 bgt f900 <== NOT EXECUTED f8f4: 1a000002 bne f904 <== NOT EXECUTED f8f8: e1570000 cmp r7, r0 <== NOT EXECUTED f8fc: 9a000000 bls f904 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; f900: e0687002 rsb r7, r8, r2 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); f904: e08c1008 add r1, ip, r8 <== NOT EXECUTED f908: e1a00006 mov r0, r6 <== NOT EXECUTED f90c: e1a02007 mov r2, r7 <== NOT EXECUTED f910: eb000523 bl 10da4 <== NOT EXECUTED f914: ea000063 b faa8 <== 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 ) f918: e5943054 ldr r3, [r4, #84] ; 0x54 f91c: e3a02000 mov r2, #0 f920: e1520003 cmp r2, r3 f924: 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; f928: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) f92c: e0872001 add r2, r7, r1 f930: ca000004 bgt f948 f934: 1a000001 bne f940 f938: e1520005 cmp r2, r5 f93c: 8a000001 bhi f948 f940: e1a05007 mov r5, r7 <== NOT EXECUTED f944: ea000000 b f94c <== NOT EXECUTED my_length = the_jnode->info.file.size - start; f948: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f94c: e59f3190 ldr r3, [pc, #400] ; fae4 f950: e593a000 ldr sl, [r3] f954: e1a0b00a mov fp, sl f958: e1a0cfcb asr ip, fp, #31 f95c: e1a0300c mov r3, ip f960: e1a00008 mov r0, r8 f964: e1a01009 mov r1, r9 f968: e1a0200b mov r2, fp f96c: e58dc000 str ip, [sp] f970: eb002c8a bl 1aba0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f974: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f978: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f97c: e1a01009 mov r1, r9 f980: e1a00008 mov r0, r8 f984: e1a0200b mov r2, fp f988: e1a0300c mov r3, ip f98c: eb002b59 bl 1a6f8 <__divdi3> if ( start_offset ) { f990: 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; f994: e1a08000 mov r8, r0 if ( start_offset ) { f998: 058d6008 streq r6, [sp, #8] f99c: 01a09007 moveq r9, r7 f9a0: 0a000013 beq f9f4 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 ); f9a4: e1a00004 mov r0, r4 f9a8: e1a01008 mov r1, r8 f9ac: e3a02000 mov r2, #0 f9b0: ebfffcda bl ed20 assert( block_ptr ); f9b4: e3500000 cmp r0, #0 f9b8: 059f0108 ldreq r0, [pc, #264] ; fac8 f9bc: 059f1124 ldreq r1, [pc, #292] ; fae8 f9c0: 0a000030 beq fa88 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); f9c4: 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; f9c8: e067900a rsb r9, r7, sl f9cc: e1550009 cmp r5, r9 f9d0: 31a09005 movcc r9, 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 ); f9d4: e1a00006 mov r0, r6 f9d8: e0811007 add r1, r1, r7 f9dc: e1a02009 mov r2, r9 dest += to_copy; f9e0: e0866009 add r6, r6, r9 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 ); f9e4: eb0004ee bl 10da4 dest += to_copy; f9e8: e58d6008 str r6, [sp, #8] block++; f9ec: e2888001 add r8, r8, #1 my_length -= to_copy; f9f0: e0695005 rsb r5, r9, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f9f4: e59f30e8 ldr r3, [pc, #232] ; fae4 f9f8: e3a06000 mov r6, #0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f9fc: e1a0b003 mov fp, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; fa00: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { fa04: ea00000e b fa44 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); fa08: e1a00004 mov r0, r4 fa0c: e1a01008 mov r1, r8 fa10: e3a02000 mov r2, #0 fa14: ebfffcc1 bl ed20 assert( block_ptr ); fa18: e2503000 subs r3, r0, #0 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); fa1c: e086600a add r6, r6, sl assert( block_ptr ); fa20: 059f00a0 ldreq r0, [pc, #160] ; fac8 fa24: 059f10c0 ldreq r1, [pc, #192] ; faec fa28: 0a000016 beq fa88 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); fa2c: e59d0004 ldr r0, [sp, #4] fa30: e5931000 ldr r1, [r3] fa34: e1a0200a mov r2, sl fa38: eb0004d9 bl 10da4 dest += to_copy; block++; fa3c: e2888001 add r8, r8, #1 my_length -= to_copy; fa40: e06a5005 rsb r5, sl, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { fa44: e59b3000 ldr r3, [fp] fa48: e1550003 cmp r5, r3 * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( fa4c: e59d3008 ldr r3, [sp, #8] fa50: e0833006 add r3, r3, r6 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; fa54: e0867009 add r7, r6, r9 * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( fa58: e58d3004 str r3, [sp, #4] /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { fa5c: 2affffe9 bcs fa08 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { fa60: e3550000 cmp r5, #0 fa64: 0a00000f beq faa8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); fa68: e1a01008 mov r1, r8 fa6c: e1a00004 mov r0, r4 fa70: e3a02000 mov r2, #0 fa74: ebfffca9 bl ed20 assert( block_ptr ); fa78: e2503000 subs r3, r0, #0 fa7c: 1a000004 bne fa94 fa80: e59f0040 ldr r0, [pc, #64] ; fac8 <== NOT EXECUTED fa84: e59f1064 ldr r1, [pc, #100] ; faf0 <== NOT EXECUTED fa88: e59f203c ldr r2, [pc, #60] ; facc <== NOT EXECUTED fa8c: e59f3060 ldr r3, [pc, #96] ; faf4 <== NOT EXECUTED fa90: eaffff7d b f88c <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); fa94: e59d0004 ldr r0, [sp, #4] fa98: e5931000 ldr r1, [r3] fa9c: e1a02005 mov r2, r5 faa0: eb0004bf bl 10da4 copied += my_length; faa4: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); faa8: e28d000c add r0, sp, #12 faac: e3a01000 mov r1, #0 fab0: ebffcb1c bl 2728 fab4: e59d300c ldr r3, [sp, #12] fab8: e5843040 str r3, [r4, #64] ; 0x40 return copied; } fabc: e1a00007 mov r0, r7 fac0: e28dd014 add sp, sp, #20 fac4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} fac8: 0001d84f .word 0x0001d84f facc: 0001d058 .word 0x0001d058 fad0: 0001d895 .word 0x0001d895 fad4: 00000251 .word 0x00000251 fad8: 0001d909 .word 0x0001d909 fadc: 0000025a .word 0x0000025a fae0: 0001d954 .word 0x0001d954 fae4: 0001dbe8 .word 0x0001dbe8 fae8: 00000296 .word 0x00000296 faec: 000002a7 .word 0x000002a7 faf0: 000002b9 .word 0x000002b9 faf4: 0001d8cf .word 0x0001d8cf 0000effc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { effc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f000: e2504000 subs r4, r0, #0 f004: 059f012c ldreq r0, [pc, #300] ; f138 f008: 059f112c ldreq r1, [pc, #300] ; f13c f00c: 059f212c ldreq r2, [pc, #300] ; f140 f010: 059f312c ldreq r3, [pc, #300] ; f144 f014: 0a000006 beq f034 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f018: e594304c ldr r3, [r4, #76] ; 0x4c f01c: e3530005 cmp r3, #5 f020: 0a000004 beq f038 f024: e59f010c ldr r0, [pc, #268] ; f138 <== NOT EXECUTED f028: e59f1118 ldr r1, [pc, #280] ; f148 <== NOT EXECUTED f02c: e59f210c ldr r2, [pc, #268] ; f140 <== NOT EXECUTED f030: e59f3114 ldr r3, [pc, #276] ; f14c <== NOT EXECUTED f034: ebfff87e bl d234 <__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; f038: e59f2110 ldr r2, [pc, #272] ; f150 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f03c: 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; f040: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f044: 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; f048: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); f04c: 12840058 addne r0, r4, #88 ; 0x58 f050: 11a01005 movne r1, r5 f054: 1bffffb6 blne ef34 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f058: e594305c ldr r3, [r4, #92] ; 0x5c f05c: e3530000 cmp r3, #0 f060: 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; f068: 1a000008 bne f090 f06c: ea00000d b f0a8 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { f070: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED f074: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED f078: e3520000 cmp r2, #0 <== NOT EXECUTED f07c: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( f080: 10830000 addne r0, r3, r0 <== NOT EXECUTED f084: 11a01005 movne r1, r5 <== NOT EXECUTED f088: 1bffffa9 blne ef34 <== 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 ); f09c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED f0a0: e1a01005 mov r1, r5 <== NOT EXECUTED f0a4: ebffffa2 bl ef34 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f0a8: e5943060 ldr r3, [r4, #96] ; 0x60 f0ac: e3530000 cmp r3, #0 f0b0: 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; f0b8: 1a000016 bne f118 f0bc: ea00001b b f130 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; f0c0: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED f0c4: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ f0c8: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f0cc: 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 */ f0d0: 0a000013 beq f124 <== NOT EXECUTED f0d4: e3a08000 mov r8, #0 <== NOT EXECUTED f0d8: ea000006 b f0f8 <== 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( f104: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED f108: e1a01005 mov r1, r5 <== NOT EXECUTED f10c: e0800009 add r0, r0, r9 <== NOT EXECUTED f110: ebffff87 bl ef34 <== 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( f124: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED f128: e1a01005 mov r1, r5 <== NOT EXECUTED f12c: ebffff80 bl ef34 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } f130: e3a00000 mov r0, #0 f134: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} f138: 0001d84f .word 0x0001d84f f13c: 000001ee .word 0x000001ee f140: 0001d004 .word 0x0001d004 f144: 0001d895 .word 0x0001d895 f148: 000001f2 .word 0x000001f2 f14c: 0001d89f .word 0x0001d89f f150: 0001dbe8 .word 0x0001dbe8 0000efb0 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { efb0: 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 ); efb4: e3a02000 mov r2, #0 <== NOT EXECUTED efb8: ebffff58 bl ed20 <== NOT EXECUTED assert( block_ptr ); efbc: e2503000 subs r3, r0, #0 <== NOT EXECUTED efc0: 059f0024 ldreq r0, [pc, #36] ; efec <== NOT EXECUTED efc4: 059f1024 ldreq r1, [pc, #36] ; eff0 <== NOT EXECUTED efc8: 059f2024 ldreq r2, [pc, #36] ; eff4 <== NOT EXECUTED efcc: 059f3024 ldreq r3, [pc, #36] ; eff8 <== NOT EXECUTED efd0: 0bfff897 bleq d234 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; efd4: 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; efd8: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; efdc: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); efe0: ebffff39 bl eccc <== NOT EXECUTED } return 1; } efe4: e3a00001 mov r0, #1 <== NOT EXECUTED efe8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED efec: 0001d84f .word 0x0001d84f eff0: 00000196 .word 0x00000196 eff4: 0001cfe8 .word 0x0001cfe8 eff8: 0001d8cf .word 0x0001d8cf 0000f50c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { f50c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f510: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { f514: e1a07001 mov r7, r1 f518: e1a08002 mov r8, r2 f51c: e1a06003 mov r6, r3 f520: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); f524: 059f0204 ldreq r0, [pc, #516] ; f730 f528: 059f1204 ldreq r1, [pc, #516] ; f734 f52c: 059f2204 ldreq r2, [pc, #516] ; f738 f530: 059f3204 ldreq r3, [pc, #516] ; f73c f534: 0a000006 beq f554 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f538: e594304c ldr r3, [r4, #76] ; 0x4c f53c: e3530005 cmp r3, #5 f540: 0a000004 beq f558 f544: e59f01e4 ldr r0, [pc, #484] ; f730 <== NOT EXECUTED f548: e59f11f0 ldr r1, [pc, #496] ; f740 <== NOT EXECUTED f54c: e59f21e4 ldr r2, [pc, #484] ; f738 <== NOT EXECUTED f550: e59f31ec ldr r3, [pc, #492] ; f744 <== NOT EXECUTED f554: ebfff736 bl d234 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); f558: e3560000 cmp r6, #0 f55c: 059f01cc ldreq r0, [pc, #460] ; f730 f560: 059f11e0 ldreq r1, [pc, #480] ; f748 f564: 059f21cc ldreq r2, [pc, #460] ; f738 f568: 059f31dc ldreq r3, [pc, #476] ; f74c f56c: 0afffff8 beq f554 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) f570: e3550000 cmp r5, #0 f574: 1a000002 bne f584 rtems_set_errno_and_return_minus_one( EINVAL ); f578: eb0003fb bl 1056c <__errno> <== NOT EXECUTED f57c: e3a03016 mov r3, #22 <== NOT EXECUTED f580: ea00000e b f5c0 <== 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 ) { f584: e5943054 ldr r3, [r4, #84] ; 0x54 f588: e3530000 cmp r3, #0 f58c: e0851001 add r1, r5, r1 f590: ba000003 blt f5a4 f594: 1a00000c bne f5cc f598: e5943050 ldr r3, [r4, #80] ; 0x50 f59c: e1530001 cmp r3, r1 f5a0: 2a000009 bcs f5cc status = IMFS_memfile_extend( the_jnode, last_byte ); f5a4: e1a00004 mov r0, r4 f5a8: e3a02000 mov r2, #0 f5ac: ebffff40 bl f2b4 if ( status ) f5b0: e3500000 cmp r0, #0 f5b4: 0a000004 beq f5cc rtems_set_errno_and_return_minus_one( ENOSPC ); f5b8: eb0003eb bl 1056c <__errno> <== NOT EXECUTED f5bc: e3a0301c mov r3, #28 <== NOT EXECUTED f5c0: e5803000 str r3, [r0] <== NOT EXECUTED f5c4: e3e08000 mvn r8, #0 <== NOT EXECUTED f5c8: ea000056 b f728 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f5cc: e59f317c ldr r3, [pc, #380] ; f750 f5d0: e5939000 ldr r9, [r3] f5d4: e1a0b009 mov fp, r9 f5d8: e1a0cfcb asr ip, fp, #31 f5dc: e1a0300c mov r3, ip f5e0: e1a00007 mov r0, r7 f5e4: e1a01008 mov r1, r8 f5e8: e1a0200b mov r2, fp f5ec: e58dc000 str ip, [sp] f5f0: eb002d6a bl 1aba0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f5f4: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f5f8: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f5fc: e1a01008 mov r1, r8 f600: e1a00007 mov r0, r7 f604: e1a0200b mov r2, fp f608: e1a0300c mov r3, ip f60c: eb002c39 bl 1a6f8 <__divdi3> if ( start_offset ) { f610: e35a0000 cmp sl, #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; f614: e1a07000 mov r7, r0 if ( start_offset ) { f618: 01a0800a moveq r8, sl f61c: 0a000012 beq f66c 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 ); f620: e1a01007 mov r1, r7 f624: e1a00004 mov r0, r4 f628: e3a02000 mov r2, #0 f62c: ebfffdbb bl ed20 assert( block_ptr ); f630: e3500000 cmp r0, #0 f634: 059f00f4 ldreq r0, [pc, #244] ; f730 f638: 03a01fc7 moveq r1, #796 ; 0x31c f63c: 0a00002b beq f6f0 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 ); f640: 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; f644: e06a8009 rsb r8, sl, r9 f648: e1580005 cmp r8, r5 f64c: 21a08005 movcs r8, 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 ); f650: e1a01006 mov r1, r6 f654: e080000a add r0, r0, sl f658: e1a02008 mov r2, r8 f65c: eb0005d0 bl 10da4 src += to_copy; f660: e0866008 add r6, r6, r8 block++; f664: e2877001 add r7, r7, #1 my_length -= to_copy; f668: e0685005 rsb r5, r8, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f66c: e59f30dc ldr r3, [pc, #220] ; f750 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f670: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f674: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f678: ea00000f b f6bc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f67c: e1a00004 mov r0, r4 f680: e1a01007 mov r1, r7 f684: e3a02000 mov r2, #0 f688: ebfffda4 bl ed20 assert( block_ptr ); f68c: e3500000 cmp r0, #0 f690: 059f0098 ldreq r0, [pc, #152] ; f730 f694: 03a01e33 moveq r1, #816 ; 0x330 f698: 0a000014 beq f6f0 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 ); f69c: e1a01006 mov r1, r6 f6a0: e5900000 ldr r0, [r0] f6a4: e1a0200a mov r2, sl f6a8: eb0005bd bl 10da4 src += to_copy; f6ac: e086600a add r6, r6, sl block++; f6b0: e2877001 add r7, r7, #1 my_length -= to_copy; f6b4: 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( f6b8: e088800a add r8, r8, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f6bc: e5993000 ldr r3, [r9] f6c0: e1550003 cmp r5, r3 f6c4: 2affffec bcs f67c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { f6c8: e3550000 cmp r5, #0 f6cc: 0a00000f beq f710 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f6d0: e1a01007 mov r1, r7 f6d4: e1a00004 mov r0, r4 f6d8: e3a02000 mov r2, #0 f6dc: ebfffd8f bl ed20 assert( block_ptr ); f6e0: e3500000 cmp r0, #0 f6e4: 1a000004 bne f6fc f6e8: e59f0040 ldr r0, [pc, #64] ; f730 <== NOT EXECUTED f6ec: e59f1060 ldr r1, [pc, #96] ; f754 <== NOT EXECUTED f6f0: e59f2040 ldr r2, [pc, #64] ; f738 <== NOT EXECUTED f6f4: e59f305c ldr r3, [pc, #92] ; f758 <== NOT EXECUTED f6f8: eaffff95 b f554 <== 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 ); f6fc: e5900000 ldr r0, [r0] f700: e1a01006 mov r1, r6 f704: e1a02005 mov r2, r5 f708: eb0005a5 bl 10da4 my_length = 0; copied += to_copy; f70c: e0888005 add r8, r8, r5 } IMFS_mtime_ctime_update( the_jnode ); f710: e28d0004 add r0, sp, #4 f714: e3a01000 mov r1, #0 f718: ebffcc02 bl 2728 f71c: e59d3004 ldr r3, [sp, #4] f720: e5843048 str r3, [r4, #72] ; 0x48 f724: e5843044 str r3, [r4, #68] ; 0x44 return copied; } f728: e1a00008 mov r0, r8 f72c: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} f730: 0001d84f .word 0x0001d84f f734: 000002e3 .word 0x000002e3 f738: 0001d044 .word 0x0001d044 f73c: 0001d895 .word 0x0001d895 f740: 000002e7 .word 0x000002e7 f744: 0001d89f .word 0x0001d89f f748: 000002ef .word 0x000002ef f74c: 0001d8d9 .word 0x0001d8d9 f750: 0001dbe8 .word 0x0001dbe8 f754: 00000346 .word 0x00000346 f758: 0001d8cf .word 0x0001d8cf 00008348 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8348: e92d40f0 push {r4, r5, r6, r7, lr} 834c: e24dd040 sub sp, sp, #64 ; 0x40 8350: e1a04001 mov r4, r1 8354: e1a07000 mov r7, r0 8358: e1a06002 mov r6, r2 835c: 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 ); 8360: eb00107f bl c564 8364: e28d303c add r3, sp, #60 ; 0x3c 8368: e1a01000 mov r1, r0 836c: e28d2004 add r2, sp, #4 8370: e1a00007 mov r0, r7 8374: ebffff8a bl 81a4 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8378: e2043a0f and r3, r4, #61440 ; 0xf000 837c: e3530901 cmp r3, #16384 ; 0x4000 8380: 0a00000e beq 83c0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8384: e3530902 cmp r3, #32768 ; 0x8000 8388: 03a01005 moveq r1, #5 838c: 0a00000c beq 83c4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8390: e3530a06 cmp r3, #24576 ; 0x6000 8394: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8398: 058d6028 streq r6, [sp, #40] ; 0x28 839c: 058d502c streq r5, [sp, #44] ; 0x2c 83a0: 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) ) { 83a4: 0a000006 beq 83c4 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 83a8: e3530a01 cmp r3, #4096 ; 0x1000 83ac: 03a01007 moveq r1, #7 83b0: 0a000003 beq 83c4 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 83b4: eb000c79 bl b5a0 <__errno> <== NOT EXECUTED 83b8: e3a03016 mov r3, #22 <== NOT EXECUTED 83bc: ea00000b b 83f0 <== NOT EXECUTED 83c0: 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( 83c4: e28dc028 add ip, sp, #40 ; 0x28 83c8: e59d0054 ldr r0, [sp, #84] ; 0x54 83cc: e1a03004 mov r3, r4 83d0: e28d2004 add r2, sp, #4 83d4: e58dc000 str ip, [sp] 83d8: eb0008f2 bl a7a8 new_name, mode, &info ); if ( !new_node ) 83dc: e3500000 cmp r0, #0 83e0: 13a00000 movne r0, #0 83e4: 1a000003 bne 83f8 rtems_set_errno_and_return_minus_one( ENOMEM ); 83e8: eb000c6c bl b5a0 <__errno> <== NOT EXECUTED 83ec: e3a0300c mov r3, #12 <== NOT EXECUTED 83f0: e5803000 str r3, [r0] <== NOT EXECUTED 83f4: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 83f8: e28dd040 add sp, sp, #64 ; 0x40 83fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 00001ef8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1ef8: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1efc: e593204c ldr r2, [r3, #76] ; 0x4c 1f00: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1f04: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f08: 0a000004 beq 1f20 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1f0c: eb003996 bl 1056c <__errno> <== NOT EXECUTED 1f10: e3a03014 mov r3, #20 <== NOT EXECUTED 1f14: e5803000 str r3, [r0] <== NOT EXECUTED 1f18: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f1c: 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; 1f20: e583005c str r0, [r3, #92] ; 0x5c 1f24: e3a00000 mov r0, #0 return 0; } 1f28: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00002b98 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2b98: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2b9c: e2504000 subs r4, r0, #0 2ba0: 059f0130 ldreq r0, [pc, #304] ; 2cd8 2ba4: 03a01038 moveq r1, #56 ; 0x38 2ba8: 059f212c ldreq r2, [pc, #300] ; 2cdc 2bac: 059f312c ldreq r3, [pc, #300] ; 2ce0 2bb0: 0a00002f beq 2c74 fprintf(stdout, "%s", the_jnode->name ); 2bb4: e59f5128 ldr r5, [pc, #296] ; 2ce4 2bb8: e5953000 ldr r3, [r5] 2bbc: e284000c add r0, r4, #12 2bc0: e5931008 ldr r1, [r3, #8] 2bc4: eb003514 bl 1001c switch( the_jnode->type ) { 2bc8: e594204c ldr r2, [r4, #76] ; 0x4c 2bcc: e2423001 sub r3, r2, #1 2bd0: e3530006 cmp r3, #6 2bd4: 979ff103 ldrls pc, [pc, r3, lsl #2] 2bd8: ea000034 b 2cb0 <== NOT EXECUTED 2bdc: 00002bf8 .word 0x00002bf8 <== NOT EXECUTED 2be0: 00002c0c .word 0x00002c0c <== NOT EXECUTED 2be4: 00002c54 .word 0x00002c54 <== NOT EXECUTED 2be8: 00002c78 .word 0x00002c78 <== NOT EXECUTED 2bec: 00002c3c .word 0x00002c3c <== NOT EXECUTED 2bf0: 00002c20 .word 0x00002c20 <== NOT EXECUTED 2bf4: 00002c94 .word 0x00002c94 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2bf8: e5953000 ldr r3, [r5] 2bfc: e3a0002f mov r0, #47 ; 0x2f 2c00: e5931008 ldr r1, [r3, #8] 2c04: eb0034bf bl ff08 break; 2c08: ea00002f b 2ccc case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2c0c: e5952000 ldr r2, [r5] 2c10: e5943054 ldr r3, [r4, #84] ; 0x54 2c14: e5920008 ldr r0, [r2, #8] 2c18: e59f10c8 ldr r1, [pc, #200] ; 2ce8 2c1c: ea000003 b 2c30 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2c20: e5952000 ldr r2, [r5] <== NOT EXECUTED 2c24: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2c28: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2c2c: e59f10b8 ldr r1, [pc, #184] ; 2cec <== NOT EXECUTED 2c30: e5942050 ldr r2, [r4, #80] ; 0x50 2c34: eb003497 bl fe98 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2c38: ea000023 b 2ccc the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2c3c: e5953000 ldr r3, [r5] 2c40: e5942050 ldr r2, [r4, #80] ; 0x50 2c44: e5930008 ldr r0, [r3, #8] 2c48: e59f10a0 ldr r1, [pc, #160] ; 2cf0 2c4c: eb003491 bl fe98 (uint32_t)the_jnode->info.file.size ); #endif break; 2c50: ea00001d b 2ccc case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2c54: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c58: e59f0094 ldr r0, [pc, #148] ; 2cf4 <== NOT EXECUTED 2c5c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c60: eb0034ed bl 1001c <== NOT EXECUTED assert(0); 2c64: e59f006c ldr r0, [pc, #108] ; 2cd8 <== NOT EXECUTED 2c68: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2c6c: e59f2068 ldr r2, [pc, #104] ; 2cdc <== NOT EXECUTED 2c70: e59f3080 ldr r3, [pc, #128] ; 2cf8 <== NOT EXECUTED 2c74: eb00020a bl 34a4 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2c78: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c7c: e59f0070 ldr r0, [pc, #112] ; 2cf4 <== NOT EXECUTED 2c80: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c84: eb0034e4 bl 1001c <== NOT EXECUTED assert(0); 2c88: e59f0048 ldr r0, [pc, #72] ; 2cd8 <== NOT EXECUTED 2c8c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2c90: eafffff5 b 2c6c <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2c94: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c98: e59f005c ldr r0, [pc, #92] ; 2cfc <== NOT EXECUTED 2c9c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2ca0: eb0034dd bl 1001c <== NOT EXECUTED assert(0); 2ca4: e59f002c ldr r0, [pc, #44] ; 2cd8 <== NOT EXECUTED 2ca8: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2cac: eaffffee b 2c6c <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2cb0: e5953000 ldr r3, [r5] <== NOT EXECUTED 2cb4: e59f1044 ldr r1, [pc, #68] ; 2d00 <== NOT EXECUTED 2cb8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2cbc: eb003475 bl fe98 <== NOT EXECUTED assert(0); 2cc0: e59f0010 ldr r0, [pc, #16] ; 2cd8 <== NOT EXECUTED 2cc4: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 2cc8: eaffffe7 b 2c6c <== NOT EXECUTED break; } puts(""); 2ccc: e59f0030 ldr r0, [pc, #48] ; 2d04 } 2cd0: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2cd4: ea003b9c b 11b4c 2cd8: 00021326 .word 0x00021326 2cdc: 000200a8 .word 0x000200a8 2ce0: 0002136f .word 0x0002136f 2ce4: 0001fb50 .word 0x0001fb50 2ce8: 00021379 .word 0x00021379 2cec: 0002138c .word 0x0002138c 2cf0: 0002139b .word 0x0002139b 2cf4: 000213a7 .word 0x000213a7 2cf8: 00020d0d .word 0x00020d0d 2cfc: 000213bb .word 0x000213bb 2d00: 000213ce .word 0x000213ce 2d04: 0002155f .word 0x0002155f 00001f38 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 1f38: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 1f3c: e593004c ldr r0, [r3, #76] ; 0x4c 1f40: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1f44: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 1f48: 03a00000 moveq r0, #0 1f4c: 0a000006 beq 1f6c rtems_set_errno_and_return_minus_one( EINVAL ); 1f50: eb003985 bl 1056c <__errno> <== NOT EXECUTED 1f54: e3a03016 mov r3, #22 <== NOT EXECUTED 1f58: e5803000 str r3, [r0] <== NOT EXECUTED 1f5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f60: 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]; 1f64: 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++ ) 1f68: e2800001 add r0, r0, #1 1f6c: e1500002 cmp r0, r2 1f70: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 1f74: e593c050 ldr ip, [r3, #80] ; 0x50 1f78: e7dcc000 ldrb ip, [ip, r0] 1f7c: e35c0000 cmp ip, #0 1f80: 1afffff7 bne 1f64 buf[i] = node->info.sym_link.name[i]; return i; } 1f84: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001f88 : 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 */ ) { 1f88: 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; 1f8c: 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 */ ) { 1f90: 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 ); 1f94: e1a01003 mov r1, r3 <== NOT EXECUTED 1f98: e284000c add r0, r4, #12 <== NOT EXECUTED 1f9c: e3a02020 mov r2, #32 <== NOT EXECUTED 1fa0: eb003d62 bl 11530 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 1fa4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1fa8: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1fac: 11a00004 movne r0, r4 <== NOT EXECUTED 1fb0: 1b001193 blne 6604 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1fb4: 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 ); 1fb8: e1a01004 mov r1, r4 <== NOT EXECUTED 1fbc: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 1fc0: e5843008 str r3, [r4, #8] <== NOT EXECUTED 1fc4: eb001183 bl 65d8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fc8: e1a0000d mov r0, sp <== NOT EXECUTED 1fcc: e3a01000 mov r1, #0 <== NOT EXECUTED 1fd0: eb0001d4 bl 2728 <== NOT EXECUTED 1fd4: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 1fd8: 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 ); 1fdc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 1fe0: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 000084b4 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 84b4: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 84b8: e593204c ldr r2, [r3, #76] ; 0x4c 84bc: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 84c0: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 84c4: e3520005 cmp r2, #5 84c8: 979ff102 ldrls pc, [pc, r2, lsl #2] 84cc: ea000012 b 851c <== NOT EXECUTED 84d0: 000084e8 .word 0x000084e8 <== NOT EXECUTED 84d4: 0000851c .word 0x0000851c <== NOT EXECUTED 84d8: 00008508 .word 0x00008508 <== NOT EXECUTED 84dc: 000084fc .word 0x000084fc <== NOT EXECUTED 84e0: 000084fc .word 0x000084fc <== NOT EXECUTED 84e4: 00008508 .word 0x00008508 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 84e8: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 84ec: e5932050 ldr r2, [r3, #80] ; 0x50 84f0: e581001c str r0, [r1, #28] 84f4: e5812018 str r2, [r1, #24] break; 84f8: ea00000c b 8530 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 84fc: e283c050 add ip, r3, #80 ; 0x50 8500: e89c1800 ldm ip, {fp, ip} 8504: ea000001 b 8510 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8508: e3a0b000 mov fp, #0 <== NOT EXECUTED 850c: e3a0c000 mov ip, #0 <== NOT EXECUTED 8510: e581b020 str fp, [r1, #32] 8514: e581c024 str ip, [r1, #36] ; 0x24 break; 8518: ea000004 b 8530 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 851c: eb000c1f bl b5a0 <__errno> <== NOT EXECUTED 8520: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8524: e5803000 str r3, [r0] <== NOT EXECUTED 8528: e3e00000 mvn r0, #0 <== NOT EXECUTED 852c: e8bd8800 pop {fp, pc} <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8530: e5932038 ldr r2, [r3, #56] ; 0x38 8534: 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; 8538: e5932040 ldr r2, [r3, #64] ; 0x40 853c: e5812028 str r2, [r1, #40] ; 0x28 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8540: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8544: e5932044 ldr r2, [r3, #68] ; 0x44 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8548: 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; 854c: e5812030 str r2, [r1, #48] ; 0x30 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8550: e5932030 ldr r2, [r3, #48] ; 0x30 8554: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8558: e1d323bc ldrh r2, [r3, #60] ; 0x3c 855c: 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; 8560: e5930048 ldr r0, [r3, #72] ; 0x48 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 8564: e1d333be ldrh r3, [r3, #62] ; 0x3e buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8568: 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; 856c: e1c131b4 strh r3, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8570: e3a00000 mov r0, #0 return 0; } 8574: e8bd8800 pop {fp, pc} 00001fe4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fe4: e92d40f0 push {r4, r5, r6, r7, lr} 1fe8: e1a05000 mov r5, r0 1fec: 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 ); 1ff0: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1ff4: e1a07002 mov r7, r2 1ff8: 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 ); 1ffc: eb003d33 bl 114d0 2000: e28d4004 add r4, sp, #4 2004: e1a01000 mov r1, r0 2008: e1a02004 mov r2, r4 200c: e28d303c add r3, sp, #60 ; 0x3c 2010: e1a00007 mov r0, r7 2014: eb002bf9 bl d000 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2018: e1a00006 mov r0, r6 201c: eb003d17 bl 11480 if (info.sym_link.name == NULL) { 2020: 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); 2024: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 2028: 0a00000b beq 205c * 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( 202c: e28dc028 add ip, sp, #40 ; 0x28 2030: e1a00005 mov r0, r5 2034: e1a02004 mov r2, r4 2038: e3a01004 mov r1, #4 203c: e59f3030 ldr r3, [pc, #48] ; 2074 2040: e58dc000 str ip, [sp] 2044: eb0028e5 bl c3e0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2048: e3500000 cmp r0, #0 204c: 13a00000 movne r0, #0 2050: 1a000005 bne 206c free(info.sym_link.name); 2054: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2058: eb000189 bl 2684 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 205c: eb003942 bl 1056c <__errno> <== NOT EXECUTED 2060: e3a0300c mov r3, #12 <== NOT EXECUTED 2064: e5803000 str r3, [r0] <== NOT EXECUTED 2068: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 206c: e28dd040 add sp, sp, #64 ; 0x40 2070: e8bd80f0 pop {r4, r5, r6, r7, pc} 2074: 0000a1ff .word 0x0000a1ff 00002078 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2078: 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; 207c: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2080: e595304c ldr r3, [r5, #76] ; 0x4c 2084: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2088: e24dd01c sub sp, sp, #28 208c: e1a04001 mov r4, r1 2090: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2094: 1a000025 bne 2130 if ( !node->info.hard_link.link_node ) 2098: e595e050 ldr lr, [r5, #80] ; 0x50 209c: e35e0000 cmp lr, #0 20a0: 1a000003 bne 20b4 rtems_set_errno_and_return_minus_one( EINVAL ); 20a4: eb003930 bl 1056c <__errno> <== NOT EXECUTED 20a8: e3a03016 mov r3, #22 <== NOT EXECUTED 20ac: e5803000 str r3, [r0] <== NOT EXECUTED 20b0: ea000014 b 2108 <== NOT EXECUTED the_link = *loc; 20b4: e1a07001 mov r7, r1 20b8: e8b7000f ldm r7!, {r0, r1, r2, r3} 20bc: e1a0c00d mov ip, sp 20c0: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 20c4: e28d801c add r8, sp, #28 20c8: 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; 20cc: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d0: 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; 20d4: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d8: eb00290f bl c51c /* * 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) 20dc: e5953050 ldr r3, [r5, #80] ; 0x50 20e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 20e4: e3520001 cmp r2, #1 20e8: 1a000008 bne 2110 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 20ec: e1a0100d mov r1, sp 20f0: e1a00006 mov r0, r6 20f4: e59d3008 ldr r3, [sp, #8] 20f8: e1a0e00f mov lr, pc 20fc: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 2100: e3500000 cmp r0, #0 2104: 0a000009 beq 2130 2108: e3e00000 mvn r0, #0 210c: ea00000c b 2144 return -1; } else { node->info.hard_link.link_node->st_nlink --; 2110: e2422001 sub r2, r2, #1 2114: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2118: e28d0014 add r0, sp, #20 211c: e3a01000 mov r1, #0 2120: eb000180 bl 2728 2124: e5953050 ldr r3, [r5, #80] ; 0x50 2128: e59d2014 ldr r2, [sp, #20] 212c: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2130: e1a00006 mov r0, r6 2134: e1a01004 mov r1, r4 2138: e5943008 ldr r3, [r4, #8] 213c: e1a0e00f mov lr, pc 2140: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 2144: e28dd01c add sp, sp, #28 2148: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0000214c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 214c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2150: e593204c ldr r2, [r3, #76] ; 0x4c 2154: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2158: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 215c: 0a000002 beq 216c rtems_set_errno_and_return_minus_one( ENOTDIR ); 2160: eb003901 bl 1056c <__errno> <== NOT EXECUTED 2164: e3a03014 mov r3, #20 <== NOT EXECUTED 2168: ea000004 b 2180 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 216c: e593205c ldr r2, [r3, #92] ; 0x5c 2170: e3520000 cmp r2, #0 2174: 1a000004 bne 218c rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2178: eb0038fb bl 1056c <__errno> <== NOT EXECUTED 217c: e3a03016 mov r3, #22 <== NOT EXECUTED 2180: e5803000 str r3, [r0] <== NOT EXECUTED 2184: e3e00000 mvn r0, #0 <== NOT EXECUTED 2188: 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; 218c: e3a00000 mov r0, #0 2190: e583005c str r0, [r3, #92] ; 0x5c return 0; } 2194: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000140c : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 140c: e59f30c8 ldr r3, [pc, #200] ; 14dc 1410: e5933000 ldr r3, [r3] 1414: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1418: e92d4070 push {r4, r5, r6, lr} 141c: e1a04000 mov r4, r0 1420: e1a05001 mov r5, r1 1424: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 1428: 11a0e00f movne lr, pc 142c: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1430: eb001dc9 bl 8b5c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1434: e59f30a4 ldr r3, [pc, #164] ; 14e0 1438: e5933000 ldr r3, [r3] 143c: e3530000 cmp r3, #0 1440: 0a000006 beq 1460 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1444: e1a00004 mov r0, r4 <== NOT EXECUTED 1448: e1a01006 mov r1, r6 <== NOT EXECUTED 144c: e1a0e00f mov lr, pc <== NOT EXECUTED 1450: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1454: e0845005 add r5, r4, r5 <== NOT EXECUTED 1458: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 145c: 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 ( 1460: e59f307c ldr r3, [pc, #124] ; 14e4 1464: e5d31000 ldrb r1, [r3] 1468: e3510000 cmp r1, #0 146c: 1a000005 bne 1488 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1470: e59f3070 ldr r3, [pc, #112] ; 14e8 1474: e5d33028 ldrb r3, [r3, #40] ; 0x28 1478: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 147c: 11a00004 movne r0, r4 1480: 11a02005 movne r2, r5 1484: 1b002a8f blne bec8 * 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 ) { 1488: e59f3054 ldr r3, [pc, #84] ; 14e4 148c: e5d33000 ldrb r3, [r3] 1490: e3530000 cmp r3, #0 1494: 1a000008 bne 14bc void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1498: e59f304c ldr r3, [pc, #76] ; 14ec 149c: e1a01004 mov r1, r4 14a0: e5930000 ldr r0, [r3] 14a4: e1a02005 mov r2, r5 14a8: e3a03004 mov r3, #4 14ac: eb000ec1 bl 4fb8 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 14b0: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 14b4: 0280001a addeq r0, r0, #26 14b8: 0b000cf8 bleq 48a0 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 14bc: e59f3028 ldr r3, [pc, #40] ; 14ec 14c0: e59f4028 ldr r4, [pc, #40] ; 14f0 14c4: e5930000 ldr r0, [r3] 14c8: e5945000 ldr r5, [r4] 14cc: eb00116e bl 5a8c <_Protected_heap_Get_size> 14d0: e0800005 add r0, r0, r5 14d4: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 14d8: e8bd8070 pop {r4, r5, r6, pc} 14dc: 00018408 .word 0x00018408 14e0: 0001840c .word 0x0001840c 14e4: 00018405 .word 0x00018405 14e8: 000170a4 .word 0x000170a4 14ec: 00016ffc .word 0x00016ffc 14f0: 000185b4 .word 0x000185b4 00003780 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 3780: 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 ) 3784: e250a000 subs sl, r0, #0 <== NOT EXECUTED 3788: 0a000043 beq 389c <== NOT EXECUTED return; if ( !print_handler ) 378c: e59f310c ldr r3, [pc, #268] ; 38a0 <== NOT EXECUTED 3790: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 3794: e3570000 cmp r7, #0 <== NOT EXECUTED 3798: 0a00003f beq 389c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 379c: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 37a0: 159a60f0 ldrne r6, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 37a4: 128a40c0 addne r4, sl, #192 ; 0xc0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37a8: 1a000005 bne 37c4 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 37ac: e59f40f0 ldr r4, [pc, #240] ; 38a4 <== NOT EXECUTED 37b0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 37b4: e3530000 cmp r3, #0 <== NOT EXECUTED 37b8: 13a06000 movne r6, #0 <== NOT EXECUTED 37bc: 11a0a006 movne sl, r6 <== NOT EXECUTED 37c0: 0a000035 beq 389c <== 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); 37c4: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 37c8: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 37cc: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 37d0: e1a00009 mov r0, r9 <== NOT EXECUTED 37d4: e1a01005 mov r1, r5 <== NOT EXECUTED 37d8: ebffffda bl 3748 <== NOT EXECUTED if ( high_water_mark ) 37dc: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 37e0: 10899005 addne r9, r9, r5 <== NOT EXECUTED 37e4: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 37e8: e35a0000 cmp sl, #0 <== NOT EXECUTED 37ec: e59f30ac ldr r3, [pc, #172] ; 38a0 <== NOT EXECUTED 37f0: 0a00000c beq 3828 <== NOT EXECUTED (*print_handler)( 37f4: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 37f8: e28d2008 add r2, sp, #8 <== NOT EXECUTED 37fc: e1a0000a mov r0, sl <== NOT EXECUTED 3800: e3a01005 mov r1, #5 <== NOT EXECUTED 3804: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 3808: eb00166e bl 91c8 <== NOT EXECUTED 380c: e1a0200a mov r2, sl <== NOT EXECUTED 3810: e1a03000 mov r3, r0 <== NOT EXECUTED 3814: e59f108c ldr r1, [pc, #140] ; 38a8 <== NOT EXECUTED 3818: e1a00009 mov r0, r9 <== NOT EXECUTED 381c: e1a0e00f mov lr, pc <== NOT EXECUTED 3820: e12fff17 bx r7 <== NOT EXECUTED 3824: ea000004 b 383c <== 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 ); 3828: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 382c: e59f1078 ldr r1, [pc, #120] ; 38ac <== NOT EXECUTED 3830: e3e02000 mvn r2, #0 <== NOT EXECUTED 3834: e1a0e00f mov lr, pc <== NOT EXECUTED 3838: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 383c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3840: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3844: e59f4054 ldr r4, [pc, #84] ; 38a0 <== NOT EXECUTED 3848: e58d6000 str r6, [sp] <== NOT EXECUTED 384c: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 3850: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3854: e0823003 add r3, r2, r3 <== NOT EXECUTED 3858: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 385c: e59f104c ldr r1, [pc, #76] ; 38b0 <== NOT EXECUTED 3860: e1a0e00f mov lr, pc <== NOT EXECUTED 3864: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 3868: e5943000 ldr r3, [r4] <== NOT EXECUTED 386c: e3530000 cmp r3, #0 <== NOT EXECUTED 3870: 1a000004 bne 3888 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 3874: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3878: e59f1034 ldr r1, [pc, #52] ; 38b4 <== NOT EXECUTED 387c: e1a0e00f mov lr, pc <== NOT EXECUTED 3880: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 3884: ea000004 b 389c <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 3888: e1a02008 mov r2, r8 <== NOT EXECUTED 388c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3890: e59f1020 ldr r1, [pc, #32] ; 38b8 <== NOT EXECUTED 3894: e1a0e00f mov lr, pc <== NOT EXECUTED 3898: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 389c: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 38a0: 0005c9d4 .word 0x0005c9d4 38a4: 0005f4c0 .word 0x0005f4c0 38a8: 000563d1 .word 0x000563d1 38ac: 000563de .word 0x000563de 38b0: 000563ec .word 0x000563ec 38b4: 0005640a .word 0x0005640a 38b8: 00056417 .word 0x00056417 00003748 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 3748: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 374c: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 3750: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 3754: e59f3020 ldr r3, [pc, #32] ; 377c <== 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++) 3758: ea000003 b 376c <== NOT EXECUTED if (*base != U32_PATTERN) 375c: e5902000 ldr r2, [r0] <== NOT EXECUTED 3760: e1520003 cmp r2, r3 <== NOT EXECUTED 3764: 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++) 3768: e2800004 add r0, r0, #4 <== NOT EXECUTED 376c: e1500001 cmp r0, r1 <== NOT EXECUTED 3770: 3afffff9 bcc 375c <== NOT EXECUTED 3774: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 3778: e12fff1e bx lr <== NOT EXECUTED 377c: a5a5a5a5 .word 0xa5a5a5a5 0000927c <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 927c: e59f3120 ldr r3, [pc, #288] ; 93a4 <_CORE_mutex_Seize_interrupt_trylock+0x128> 9280: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9284: e3a02000 mov r2, #0 9288: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 928c: e590c050 ldr ip, [r0, #80] ; 0x50 9290: e15c0002 cmp ip, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9294: e52de004 push {lr} ; (str lr, [sp, #-4]!) 9298: 0a00002c beq 9350 <_CORE_mutex_Seize_interrupt_trylock+0xd4> the_mutex->lock = CORE_MUTEX_LOCKED; 929c: e5802050 str r2, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 92a0: e5902048 ldr r2, [r0, #72] ; 0x48 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 92a4: e593c008 ldr ip, [r3, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 92a8: e3520002 cmp r2, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 92ac: e580c060 str ip, [r0, #96] ; 0x60 the_mutex->nest_count = 1; 92b0: e3a0c001 mov ip, #1 92b4: e580c054 str ip, [r0, #84] ; 0x54 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 92b8: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 92bc: 0a000001 beq 92c8 <_CORE_mutex_Seize_interrupt_trylock+0x4c> 92c0: e3520003 cmp r2, #3 92c4: 1a000004 bne 92dc <_CORE_mutex_Seize_interrupt_trylock+0x60> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 92c8: e593c01c ldr ip, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 92cc: e3520003 cmp r2, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 92d0: e28c2001 add r2, ip, #1 92d4: e583201c str r2, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 92d8: 0a000000 beq 92e0 <_CORE_mutex_Seize_interrupt_trylock+0x64> _ISR_Enable( *level_p ); 92dc: ea00002a b 938c <_CORE_mutex_Seize_interrupt_trylock+0x110> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 92e0: e590204c ldr r2, [r0, #76] ; 0x4c current = executing->current_priority; 92e4: e593c014 ldr ip, [r3, #20] if ( current == ceiling ) { 92e8: e15c0002 cmp ip, r2 92ec: 1a000000 bne 92f4 <_CORE_mutex_Seize_interrupt_trylock+0x78> _ISR_Enable( *level_p ); 92f0: ea000025 b 938c <_CORE_mutex_Seize_interrupt_trylock+0x110> return 0; } if ( current > ceiling ) { 92f4: 9a00000b bls 9328 <_CORE_mutex_Seize_interrupt_trylock+0xac> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 92f8: e59f30a8 ldr r3, [pc, #168] ; 93a8 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 92fc: e5932000 ldr r2, [r3] 9300: e2822001 add r2, r2, #1 9304: e5832000 str r2, [r3] 9308: e5913000 ldr r3, [r1] 930c: e129f003 msr CPSR_fc, r3 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9310: e3a02000 mov r2, #0 9314: e590104c ldr r1, [r0, #76] ; 0x4c 9318: e590005c ldr r0, [r0, #92] ; 0x5c 931c: ebfff1ef bl 5ae0 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9320: ebfff34f bl 6064 <_Thread_Enable_dispatch> 9324: ea00001a b 9394 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9328: e3a02006 mov r2, #6 932c: e5832034 str r2, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9330: e3a02000 mov r2, #0 9334: e5802054 str r2, [r0, #84] ; 0x54 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 9338: e2822001 add r2, r2, #1 933c: e5802050 str r2, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9340: e593201c ldr r2, [r3, #28] 9344: e2422001 sub r2, r2, #1 9348: e583201c str r2, [r3, #28] _ISR_Enable( *level_p ); 934c: ea00000e b 938c <_CORE_mutex_Seize_interrupt_trylock+0x110> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9350: e590205c ldr r2, [r0, #92] ; 0x5c 9354: e1520003 cmp r2, r3 9358: 1a00000f bne 939c <_CORE_mutex_Seize_interrupt_trylock+0x120> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 935c: e5903040 ldr r3, [r0, #64] ; 0x40 9360: e3530000 cmp r3, #0 9364: 0a000002 beq 9374 <_CORE_mutex_Seize_interrupt_trylock+0xf8> 9368: e3530001 cmp r3, #1 936c: 1a00000a bne 939c <_CORE_mutex_Seize_interrupt_trylock+0x120> 9370: ea000003 b 9384 <_CORE_mutex_Seize_interrupt_trylock+0x108> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9374: e5903054 ldr r3, [r0, #84] ; 0x54 9378: e2833001 add r3, r3, #1 937c: e5803054 str r3, [r0, #84] ; 0x54 _ISR_Enable( *level_p ); 9380: ea000001 b 938c <_CORE_mutex_Seize_interrupt_trylock+0x110> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9384: e3a03002 mov r3, #2 <== NOT EXECUTED 9388: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED 938c: e5913000 ldr r3, [r1] 9390: e129f003 msr CPSR_fc, r3 9394: e3a00000 mov r0, #0 9398: e49df004 pop {pc} ; (ldr pc, [sp], #4) 939c: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 93a0: e49df004 pop {pc} ; (ldr pc, [sp], #4) 93a4: 000187c0 .word 0x000187c0 93a8: 0001870c .word 0x0001870c 000065c0 <_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 ) { 65c0: 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; 65c4: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 65c8: e281503c add r5, r1, #60 ; 0x3c 65cc: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 65d0: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 65d4: 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 ) ) 65d8: 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 ]; 65dc: 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; 65e0: e581503c str r5, [r1, #60] ; 0x3c 65e4: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 65e8: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 65ec: 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 ]; 65f0: 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; 65f4: 159f8154 ldrne r8, [pc, #340] ; 6750 <_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 ) ) 65f8: 1a000023 bne 668c <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 65fc: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6600: e10f5000 mrs r5, CPSR 6604: e3854080 orr r4, r5, #128 ; 0x80 6608: 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; 660c: e3e06000 mvn r6, #0 6610: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6614: ea00000b b 6648 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 6618: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 661c: e1530006 cmp r3, r6 6620: 9a00000a bls 6650 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6624: e10fa000 mrs sl, CPSR 6628: e129f005 msr CPSR_fc, r5 662c: 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) ) { 6630: e594a010 ldr sl, [r4, #16] 6634: e117000a tst r7, sl 6638: 1a000001 bne 6644 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 663c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6640: eaffffee b 6600 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 6644: 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 ) ) { 6648: e1540008 cmp r4, r8 664c: 1afffff1 bne 6618 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6650: e590c030 ldr ip, [r0, #48] ; 0x30 6654: 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 ) ) { 6658: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 665c: 1a000038 bne 6744 <_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 ) 6660: 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; 6664: e3a03000 mov r3, #0 6668: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 666c: 0a00002a beq 671c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6670: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6674: e5814000 str r4, [r1] the_node->previous = previous_node; 6678: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 667c: 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; 6680: e5831000 str r1, [r3] search_node->previous = the_node; 6684: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6688: ea000021 b 6714 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 668c: e5d86000 ldrb r6, [r8] 6690: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6694: e10f5000 mrs r5, CPSR 6698: e3854080 orr r4, r5, #128 ; 0x80 669c: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 66a0: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 66a4: ea00000b b 66d8 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 66a8: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 66ac: e1530006 cmp r3, r6 66b0: 2a00000a bcs 66e0 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 66b4: e10fa000 mrs sl, CPSR 66b8: e129f005 msr CPSR_fc, r5 66bc: 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) ) { 66c0: e594a010 ldr sl, [r4, #16] 66c4: e117000a tst r7, sl 66c8: 1a000001 bne 66d4 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 66cc: e129f005 msr CPSR_fc, r5 66d0: eaffffed b 668c <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 66d4: 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 ) ) { 66d8: e154000c cmp r4, ip 66dc: 1afffff1 bne 66a8 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 66e0: e590c030 ldr ip, [r0, #48] ; 0x30 66e4: 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 ) ) { 66e8: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 66ec: 1a000014 bne 6744 <_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 ) 66f0: 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; 66f4: e3a03000 mov r3, #0 66f8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 66fc: 0a000006 beq 671c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6700: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6704: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6708: 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; 670c: e5841000 str r1, [r4] next_node->previous = the_node; 6710: e5831004 str r1, [r3, #4] 6714: e129f005 msr CPSR_fc, r5 6718: ea000007 b 673c <_Thread_queue_Enqueue_priority+0x17c> 671c: 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; 6720: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6724: e5814000 str r4, [r1] the_node->previous = previous_node; 6728: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 672c: 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; 6730: e5831000 str r1, [r3] search_node->previous = the_node; 6734: e5841004 str r1, [r4, #4] 6738: e129f00c msr CPSR_fc, ip 673c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6740: 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; 6744: e582c000 str ip, [r2] return the_thread_queue->sync_state; 6748: e5900030 ldr r0, [r0, #48] ; 0x30 } 674c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 6750: 000170a0 .word 0x000170a0 00013ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13ce8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13cec: e24dd020 sub sp, sp, #32 13cf0: e28d3014 add r3, sp, #20 13cf4: 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; 13cf8: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13cfc: e283a004 add sl, r3, #4 13d00: 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); 13d04: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d08: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d0c: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d10: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 13d14: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d18: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 13d1c: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 13d20: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d24: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d28: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13d2c: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d30: 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 ); 13d34: 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; 13d38: e28d2014 add r2, sp, #20 13d3c: 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; 13d40: e59f2168 ldr r2, [pc, #360] ; 13eb0 <_Timer_server_Body+0x1c8> 13d44: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 13d48: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d4c: e1a02005 mov r2, r5 13d50: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 13d54: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d58: e1a0000b mov r0, fp 13d5c: eb000fdb bl 17cd0 <_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(); 13d60: e59f314c ldr r3, [pc, #332] ; 13eb4 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 13d64: 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(); 13d68: 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 ) { 13d6c: e1560002 cmp r6, r2 13d70: 9a000004 bls 13d88 <_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 ); 13d74: e0621006 rsb r1, r2, r6 13d78: e1a00007 mov r0, r7 13d7c: e1a02005 mov r2, r5 13d80: eb000fd2 bl 17cd0 <_Watchdog_Adjust_to_chain> 13d84: ea000003 b 13d98 <_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 ); 13d88: 30662002 rsbcc r2, r6, r2 13d8c: 31a00007 movcc r0, r7 13d90: 33a01001 movcc r1, #1 13d94: 3b000fa5 blcc 17c30 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 13d98: 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 ); 13d9c: e5940078 ldr r0, [r4, #120] ; 0x78 13da0: eb000228 bl 14648 <_Chain_Get> if ( timer == NULL ) { 13da4: e2501000 subs r1, r0, #0 13da8: 0a00000a beq 13dd8 <_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 ) { 13dac: e5913038 ldr r3, [r1, #56] ; 0x38 13db0: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 13db4: 02811010 addeq r1, r1, #16 13db8: 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 ) { 13dbc: 0a000003 beq 13dd0 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 13dc0: e3530003 cmp r3, #3 13dc4: 1afffff4 bne 13d9c <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 13dc8: e2811010 add r1, r1, #16 13dcc: e1a00007 mov r0, r7 13dd0: eb000feb bl 17d84 <_Watchdog_Insert> 13dd4: eafffff0 b 13d9c <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13dd8: e10f3000 mrs r3, CPSR 13ddc: e3832080 orr r2, r3, #128 ; 0x80 13de0: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 13de4: e59d2014 ldr r2, [sp, #20] 13de8: e152000a cmp r2, sl 13dec: 1a000005 bne 13e08 <_Timer_server_Body+0x120> ts->insert_chain = NULL; 13df0: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13df4: 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 ) ) { 13df8: e59d3008 ldr r3, [sp, #8] 13dfc: e1530008 cmp r3, r8 13e00: 1a000002 bne 13e10 <_Timer_server_Body+0x128> 13e04: ea000015 b 13e60 <_Timer_server_Body+0x178> 13e08: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 13e0c: eaffffcb b 13d40 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13e10: e10f2000 mrs r2, CPSR 13e14: e3823080 orr r3, r2, #128 ; 0x80 13e18: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 13e1c: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 13e20: e1530008 cmp r3, r8 13e24: 0a00000b beq 13e58 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 13e28: 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 ) { 13e2c: e3530000 cmp r3, #0 the_chain->first = new_first; 13e30: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 13e34: e5815004 str r5, [r1, #4] 13e38: 0a000006 beq 13e58 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 13e3c: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13e40: 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 ); 13e44: e2830020 add r0, r3, #32 13e48: e8900003 ldm r0, {r0, r1} 13e4c: e1a0e00f mov lr, pc 13e50: e593f01c ldr pc, [r3, #28] } 13e54: eaffffed b 13e10 <_Timer_server_Body+0x128> 13e58: e129f002 msr CPSR_fc, r2 13e5c: eaffffb5 b 13d38 <_Timer_server_Body+0x50> } else { ts->active = false; 13e60: e5c4907c strb r9, [r4, #124] ; 0x7c 13e64: e59f304c ldr r3, [pc, #76] ; 13eb8 <_Timer_server_Body+0x1d0> 13e68: e5932000 ldr r2, [r3] 13e6c: e2822001 add r2, r2, #1 13e70: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 13e74: e3a01008 mov r1, #8 13e78: e5940000 ldr r0, [r4] 13e7c: eb000d20 bl 17304 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 13e80: e1a00004 mov r0, r4 13e84: ebffff6b bl 13c38 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 13e88: e1a00004 mov r0, r4 13e8c: ebffff7f bl 13c90 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 13e90: eb000a8c bl 168c8 <_Thread_Enable_dispatch> ts->active = true; 13e94: e3a03001 mov r3, #1 13e98: 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 ); 13e9c: e59d0004 ldr r0, [sp, #4] 13ea0: eb001010 bl 17ee8 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13ea4: e59d0000 ldr r0, [sp] 13ea8: eb00100e bl 17ee8 <_Watchdog_Remove> 13eac: eaffffa1 b 13d38 <_Timer_server_Body+0x50> 13eb0: 00037c44 .word 0x00037c44 13eb4: 00037b74 .word 0x00037b74 13eb8: 00037aec .word 0x00037aec 00020438 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 20438: e3a00000 mov r0, #0 <== NOT EXECUTED 2043c: e12fff1e bx lr <== NOT EXECUTED 00016710 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 16710: e1a04000 mov r4, r0 16714: eb000229 bl 16fc0 <___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(); 16718: ebffffe0 bl 166a0 rtems_shutdown_executive(status); 1671c: e1a00004 mov r0, r4 16720: eb00003b bl 16814 16724: eafffffe b 16724 <_exit+0x14> <== NOT EXECUTED 00032dd0 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 32dd0: e1a00001 mov r0, r1 <== NOT EXECUTED 32dd4: e1a01002 mov r1, r2 <== NOT EXECUTED 32dd8: e1a02003 mov r2, r3 <== NOT EXECUTED 32ddc: eaffff8b b 32c10 <== NOT EXECUTED 00020418 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 20418: e3a00001 mov r0, #1 <== NOT EXECUTED 2041c: e12fff1e bx lr <== NOT EXECUTED 00008890 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 8890: eaffffe8 b 8838 <== NOT EXECUTED 00020430 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 20430: e3a00000 mov r0, #0 <== NOT EXECUTED 20434: e12fff1e bx lr <== NOT EXECUTED 00022cbc <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 22cbc: e1a00001 mov r0, r1 <== NOT EXECUTED 22cc0: e1a01002 mov r1, r2 <== NOT EXECUTED 22cc4: eaffff68 b 22a6c <== NOT EXECUTED 00022eb8 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 22eb8: e1a00001 mov r0, r1 <== NOT EXECUTED 22ebc: e1a01002 mov r1, r2 <== NOT EXECUTED 22ec0: eaffffc4 b 22dd8 <== NOT EXECUTED 000167f8 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 167f8: e1a00001 mov r0, r1 <== NOT EXECUTED 167fc: e1a01002 mov r1, r2 <== NOT EXECUTED 16800: ea00000e b 16840 <== NOT EXECUTED 000517fc <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 517fc: 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 ); 51800: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 51804: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 51808: e1a05001 mov r5, r1 <== NOT EXECUTED 5180c: 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 ); 51810: ebfece01 bl 501c <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 51814: e2507000 subs r7, r0, #0 <== NOT EXECUTED 51818: 1a000019 bne 51884 <_rename_r+0x88> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5181c: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 51820: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 51824: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 51828: 0a000001 beq 51834 <_rename_r+0x38> <== NOT EXECUTED 5182c: e3530000 cmp r3, #0 <== NOT EXECUTED 51830: 1a000009 bne 5185c <_rename_r+0x60> <== NOT EXECUTED 51834: e59f33ac ldr r3, [pc, #940] ; 51be8 <_rename_r+0x3ec> <== NOT EXECUTED 51838: e593e000 ldr lr, [r3] <== NOT EXECUTED 5183c: e28ee018 add lr, lr, #24 <== NOT EXECUTED 51840: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51844: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51848: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5184c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51850: e3a04000 mov r4, #0 <== NOT EXECUTED 51854: e58c3000 str r3, [ip] <== NOT EXECUTED 51858: ea000013 b 518ac <_rename_r+0xb0> <== NOT EXECUTED 5185c: e59f3384 ldr r3, [pc, #900] ; 51be8 <_rename_r+0x3ec> <== NOT EXECUTED 51860: e593e000 ldr lr, [r3] <== NOT EXECUTED 51864: e28ee004 add lr, lr, #4 <== NOT EXECUTED 51868: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5186c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51870: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51874: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51878: e1a04007 mov r4, r7 <== NOT EXECUTED 5187c: e58c3000 str r3, [ip] <== NOT EXECUTED 51880: ea000009 b 518ac <_rename_r+0xb0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 51884: e3a0c000 mov ip, #0 <== NOT EXECUTED 51888: e1a00005 mov r0, r5 <== NOT EXECUTED 5188c: e1a01007 mov r1, r7 <== NOT EXECUTED 51890: e3a02002 mov r2, #2 <== NOT EXECUTED 51894: e28d3018 add r3, sp, #24 <== NOT EXECUTED 51898: e58dc000 str ip, [sp] <== NOT EXECUTED 5189c: ebfece26 bl 513c <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 518a0: e3500000 cmp r0, #0 <== NOT EXECUTED 518a4: 03a04001 moveq r4, #1 <== NOT EXECUTED 518a8: 1a000025 bne 51944 <_rename_r+0x148> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 518ac: e28de018 add lr, sp, #24 <== NOT EXECUTED 518b0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 518b4: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 518b8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 518bc: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 518c0: 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; 518c4: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 518c8: 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; 518cc: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 518d0: ebffb34a bl 3e600 <== NOT EXECUTED 518d4: e1a01000 mov r1, r0 <== NOT EXECUTED 518d8: e1a00005 mov r0, r5 <== NOT EXECUTED 518dc: ebfecdc2 bl 4fec <== NOT EXECUTED 518e0: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 518e4: 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 ) ); 518e8: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 518ec: ebffb343 bl 3e600 <== NOT EXECUTED 518f0: e3a0c000 mov ip, #0 <== NOT EXECUTED 518f4: e1a01000 mov r1, r0 <== NOT EXECUTED 518f8: e1a0200c mov r2, ip <== NOT EXECUTED 518fc: e1a00005 mov r0, r5 <== NOT EXECUTED 51900: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 51904: e58dc000 str ip, [sp] <== NOT EXECUTED 51908: ebfecdd3 bl 505c <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 5190c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 51910: 0a00000d beq 5194c <_rename_r+0x150> <== NOT EXECUTED if ( free_old_parentloc ) 51914: e3540000 cmp r4, #0 <== NOT EXECUTED 51918: 0a000007 beq 5193c <_rename_r+0x140> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5191c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51920: e3530000 cmp r3, #0 <== NOT EXECUTED 51924: 0a000004 beq 5193c <_rename_r+0x140> <== NOT EXECUTED 51928: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5192c: e3530000 cmp r3, #0 <== NOT EXECUTED 51930: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51934: 11a0e00f movne lr, pc <== NOT EXECUTED 51938: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 5193c: ebff98b5 bl 37c18 <__errno> <== NOT EXECUTED 51940: e5805000 str r5, [r0] <== NOT EXECUTED 51944: e3e06000 mvn r6, #0 <== NOT EXECUTED 51948: ea0000a3 b 51bdc <_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 ); 5194c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 51950: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 51954: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 51958: 13a05000 movne r5, #0 <== NOT EXECUTED 5195c: 03a05001 moveq r5, #1 <== NOT EXECUTED 51960: 0a000001 beq 5196c <_rename_r+0x170> <== NOT EXECUTED 51964: e3530000 cmp r3, #0 <== NOT EXECUTED 51968: 1a000009 bne 51994 <_rename_r+0x198> <== NOT EXECUTED 5196c: e59f3274 ldr r3, [pc, #628] ; 51be8 <_rename_r+0x3ec> <== NOT EXECUTED 51970: e593e000 ldr lr, [r3] <== NOT EXECUTED 51974: e28ee018 add lr, lr, #24 <== NOT EXECUTED 51978: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5197c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 51980: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51984: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51988: e3a00001 mov r0, #1 <== NOT EXECUTED 5198c: e58c3000 str r3, [ip] <== NOT EXECUTED 51990: ea000008 b 519b8 <_rename_r+0x1bc> <== NOT EXECUTED 51994: e59f324c ldr r3, [pc, #588] ; 51be8 <_rename_r+0x3ec> <== NOT EXECUTED 51998: e593e000 ldr lr, [r3] <== NOT EXECUTED 5199c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 519a0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 519a4: e28dc004 add ip, sp, #4 <== NOT EXECUTED 519a8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 519ac: e59e3000 ldr r3, [lr] <== NOT EXECUTED 519b0: e58c3000 str r3, [ip] <== NOT EXECUTED 519b4: e1a00005 mov r0, r5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 519b8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 519bc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 519c0: e3530000 cmp r3, #0 <== NOT EXECUTED 519c4: 0a00004d beq 51b00 <_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 ); 519c8: e28d5004 add r5, sp, #4 <== NOT EXECUTED 519cc: e0860000 add r0, r6, r0 <== NOT EXECUTED 519d0: e1a01005 mov r1, r5 <== NOT EXECUTED 519d4: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 519d8: e1a0e00f mov lr, pc <== NOT EXECUTED 519dc: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 519e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 519e4: 0a00001c beq 51a5c <_rename_r+0x260> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 519e8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 519ec: e3530000 cmp r3, #0 <== NOT EXECUTED 519f0: 0a000004 beq 51a08 <_rename_r+0x20c> <== NOT EXECUTED 519f4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 519f8: e3530000 cmp r3, #0 <== NOT EXECUTED 519fc: 11a00005 movne r0, r5 <== NOT EXECUTED 51a00: 11a0e00f movne lr, pc <== NOT EXECUTED 51a04: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51a08: e3540000 cmp r4, #0 <== NOT EXECUTED 51a0c: 0a000007 beq 51a30 <_rename_r+0x234> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51a10: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51a14: e3530000 cmp r3, #0 <== NOT EXECUTED 51a18: 0a000004 beq 51a30 <_rename_r+0x234> <== NOT EXECUTED 51a1c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a20: e3530000 cmp r3, #0 <== NOT EXECUTED 51a24: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51a28: 11a0e00f movne lr, pc <== NOT EXECUTED 51a2c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51a30: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51a34: e3530000 cmp r3, #0 <== NOT EXECUTED 51a38: 0a000004 beq 51a50 <_rename_r+0x254> <== NOT EXECUTED 51a3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a40: e3530000 cmp r3, #0 <== NOT EXECUTED 51a44: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51a48: 11a0e00f movne lr, pc <== NOT EXECUTED 51a4c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 51a50: ebff9870 bl 37c18 <__errno> <== NOT EXECUTED 51a54: e5806000 str r6, [r0] <== NOT EXECUTED 51a58: eaffffb9 b 51944 <_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 ) { 51a5c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 51a60: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 51a64: e1520003 cmp r2, r3 <== NOT EXECUTED 51a68: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 51a6c: 0a00001b beq 51ae0 <_rename_r+0x2e4> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51a70: e3530000 cmp r3, #0 <== NOT EXECUTED 51a74: 0a000004 beq 51a8c <_rename_r+0x290> <== NOT EXECUTED 51a78: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a7c: e3530000 cmp r3, #0 <== NOT EXECUTED 51a80: 11a00005 movne r0, r5 <== NOT EXECUTED 51a84: 11a0e00f movne lr, pc <== NOT EXECUTED 51a88: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51a8c: e3540000 cmp r4, #0 <== NOT EXECUTED 51a90: 0a000007 beq 51ab4 <_rename_r+0x2b8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51a94: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51a98: e3530000 cmp r3, #0 <== NOT EXECUTED 51a9c: 0a000004 beq 51ab4 <_rename_r+0x2b8> <== NOT EXECUTED 51aa0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51aa4: e3530000 cmp r3, #0 <== NOT EXECUTED 51aa8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51aac: 11a0e00f movne lr, pc <== NOT EXECUTED 51ab0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51ab4: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51ab8: e3530000 cmp r3, #0 <== NOT EXECUTED 51abc: 0a000004 beq 51ad4 <_rename_r+0x2d8> <== NOT EXECUTED 51ac0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51ac4: e3530000 cmp r3, #0 <== NOT EXECUTED 51ac8: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51acc: 11a0e00f movne lr, pc <== NOT EXECUTED 51ad0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 51ad4: ebff984f bl 37c18 <__errno> <== NOT EXECUTED 51ad8: e3a03012 mov r3, #18 <== NOT EXECUTED 51adc: ea00001b b 51b50 <_rename_r+0x354> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 51ae0: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 51ae4: e35c0000 cmp ip, #0 <== NOT EXECUTED 51ae8: 1a00001a bne 51b58 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51aec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51af0: e3530000 cmp r3, #0 <== NOT EXECUTED 51af4: 11a00005 movne r0, r5 <== NOT EXECUTED 51af8: 11a0e00f movne lr, pc <== NOT EXECUTED 51afc: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51b00: e3540000 cmp r4, #0 <== NOT EXECUTED 51b04: 0a000007 beq 51b28 <_rename_r+0x32c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51b08: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51b0c: e3530000 cmp r3, #0 <== NOT EXECUTED 51b10: 0a000004 beq 51b28 <_rename_r+0x32c> <== NOT EXECUTED 51b14: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b18: e3530000 cmp r3, #0 <== NOT EXECUTED 51b1c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51b20: 11a0e00f movne lr, pc <== NOT EXECUTED 51b24: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51b28: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51b2c: e3530000 cmp r3, #0 <== NOT EXECUTED 51b30: 0a000004 beq 51b48 <_rename_r+0x34c> <== NOT EXECUTED 51b34: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b38: e3530000 cmp r3, #0 <== NOT EXECUTED 51b3c: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51b40: 11a0e00f movne lr, pc <== NOT EXECUTED 51b44: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 51b48: ebff9832 bl 37c18 <__errno> <== NOT EXECUTED 51b4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 51b50: e5803000 str r3, [r0] <== NOT EXECUTED 51b54: eaffff7a b 51944 <_rename_r+0x148> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 51b58: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 51b5c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 51b60: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 51b64: e1a02005 mov r2, r5 <== NOT EXECUTED 51b68: e1a0e00f mov lr, pc <== NOT EXECUTED 51b6c: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51b70: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 51b74: 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 ); 51b78: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51b7c: 0a000004 beq 51b94 <_rename_r+0x398> <== NOT EXECUTED 51b80: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b84: e3530000 cmp r3, #0 <== NOT EXECUTED 51b88: 11a00005 movne r0, r5 <== NOT EXECUTED 51b8c: 11a0e00f movne lr, pc <== NOT EXECUTED 51b90: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51b94: e3540000 cmp r4, #0 <== NOT EXECUTED 51b98: 0a000007 beq 51bbc <_rename_r+0x3c0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51b9c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51ba0: e3530000 cmp r3, #0 <== NOT EXECUTED 51ba4: 0a000004 beq 51bbc <_rename_r+0x3c0> <== NOT EXECUTED 51ba8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51bac: e3530000 cmp r3, #0 <== NOT EXECUTED 51bb0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51bb4: 11a0e00f movne lr, pc <== NOT EXECUTED 51bb8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51bbc: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51bc0: e3530000 cmp r3, #0 <== NOT EXECUTED 51bc4: 0a000004 beq 51bdc <_rename_r+0x3e0> <== NOT EXECUTED 51bc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51bcc: e3530000 cmp r3, #0 <== NOT EXECUTED 51bd0: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51bd4: 11a0e00f movne lr, pc <== NOT EXECUTED 51bd8: 112fff13 bxne r3 <== NOT EXECUTED return result; } 51bdc: e1a00006 mov r0, r6 <== NOT EXECUTED 51be0: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 51be4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 51be8: 00052008 .word 0x00052008 000068e8 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 68e8: e1a00001 mov r0, r1 <== NOT EXECUTED 68ec: e1a01002 mov r1, r2 <== NOT EXECUTED 68f0: eaffffc4 b 6808 <== NOT EXECUTED 0000b514 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); b514: e1a00001 mov r0, r1 <== NOT EXECUTED b518: eaffff5c b b290 <== NOT EXECUTED 00021838 : #include int chdir( const char *pathname ) { 21838: e92d4030 push {r4, r5, lr} 2183c: e24dd018 sub sp, sp, #24 21840: e1a05000 mov r5, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 21844: eb00736d bl 3e600 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 21848: e28d4004 add r4, sp, #4 2184c: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 21850: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 21854: e1a0200c mov r2, ip 21858: e1a00005 mov r0, r5 2185c: e1a03004 mov r3, r4 21860: e58dc000 str ip, [sp] 21864: ebff8e34 bl 513c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 21868: e3500000 cmp r0, #0 2186c: 1a00000b bne 218a0 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 21870: e59d2010 ldr r2, [sp, #16] 21874: e5923010 ldr r3, [r2, #16] 21878: e3530000 cmp r3, #0 2187c: 1a000009 bne 218a8 rtems_filesystem_freenode( &loc ); 21880: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21884: e3530000 cmp r3, #0 <== NOT EXECUTED 21888: 11a00004 movne r0, r4 <== NOT EXECUTED 2188c: 11a0e00f movne lr, pc <== NOT EXECUTED 21890: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21894: eb0058df bl 37c18 <__errno> <== NOT EXECUTED 21898: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2189c: e5803000 str r3, [r0] 218a0: e3e00000 mvn r0, #0 218a4: ea000022 b 21934 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 218a8: e1a00004 mov r0, r4 218ac: e1a0e00f mov lr, pc 218b0: e12fff13 bx r3 218b4: e3500001 cmp r0, #1 218b8: 0a00000a beq 218e8 rtems_filesystem_freenode( &loc ); 218bc: e59d3010 ldr r3, [sp, #16] 218c0: e3530000 cmp r3, #0 218c4: 0a000004 beq 218dc 218c8: e593301c ldr r3, [r3, #28] 218cc: e3530000 cmp r3, #0 218d0: 11a00004 movne r0, r4 218d4: 11a0e00f movne lr, pc 218d8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 218dc: eb0058cd bl 37c18 <__errno> 218e0: e3a03014 mov r3, #20 218e4: eaffffec b 2189c } rtems_filesystem_freenode( &rtems_filesystem_current ); 218e8: e59f304c ldr r3, [pc, #76] ; 2193c 218ec: e5930000 ldr r0, [r3] 218f0: e5903010 ldr r3, [r0, #16] 218f4: e3530000 cmp r3, #0 218f8: 0a000004 beq 21910 218fc: e593301c ldr r3, [r3, #28] 21900: e3530000 cmp r3, #0 21904: 12800004 addne r0, r0, #4 21908: 11a0e00f movne lr, pc 2190c: 112fff13 bxne r3 rtems_filesystem_current = loc; 21910: e59f3024 ldr r3, [pc, #36] ; 2193c 21914: e28d4004 add r4, sp, #4 21918: e593c000 ldr ip, [r3] 2191c: e8b4000f ldm r4!, {r0, r1, r2, r3} 21920: e28cc004 add ip, ip, #4 21924: e8ac000f stmia ip!, {r0, r1, r2, r3} 21928: e5943000 ldr r3, [r4] 2192c: e58c3000 str r3, [ip] 21930: e3a00000 mov r0, #0 return 0; } 21934: e28dd018 add sp, sp, #24 21938: e8bd8030 pop {r4, r5, pc} 2193c: 00052008 .word 0x00052008 00004e54 : int chmod( const char *path, mode_t mode ) { 4e54: e92d4070 push {r4, r5, r6, lr} 4e58: e24dd018 sub sp, sp, #24 4e5c: e1a05001 mov r5, r1 4e60: 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 ); 4e64: eb00e5e5 bl 3e600 4e68: e28d4004 add r4, sp, #4 4e6c: e1a01000 mov r1, r0 4e70: e3a0c001 mov ip, #1 4e74: e1a00006 mov r0, r6 4e78: e3a02000 mov r2, #0 4e7c: e1a03004 mov r3, r4 4e80: e58dc000 str ip, [sp] 4e84: eb0000ac bl 513c if ( status != 0 ) 4e88: e3500000 cmp r0, #0 4e8c: 1a00000d bne 4ec8 return -1; if ( !loc.handlers ){ 4e90: e59d300c ldr r3, [sp, #12] 4e94: e3530000 cmp r3, #0 4e98: 1a00000c bne 4ed0 rtems_filesystem_freenode( &loc ); 4e9c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ea0: e3530000 cmp r3, #0 <== NOT EXECUTED 4ea4: 0a000004 beq 4ebc <== NOT EXECUTED 4ea8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4eac: e3530000 cmp r3, #0 <== NOT EXECUTED 4eb0: 11a00004 movne r0, r4 <== NOT EXECUTED 4eb4: 11a0e00f movne lr, pc <== NOT EXECUTED 4eb8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4ebc: eb00cb55 bl 37c18 <__errno> <== NOT EXECUTED 4ec0: e3a03009 mov r3, #9 <== NOT EXECUTED 4ec4: e5803000 str r3, [r0] <== NOT EXECUTED 4ec8: e3e05000 mvn r5, #0 4ecc: ea00001a b 4f3c } if ( !loc.handlers->fchmod_h ){ 4ed0: e593301c ldr r3, [r3, #28] 4ed4: e3530000 cmp r3, #0 4ed8: 1a00000a bne 4f08 rtems_filesystem_freenode( &loc ); 4edc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ee0: e3530000 cmp r3, #0 <== NOT EXECUTED 4ee4: 0a000004 beq 4efc <== NOT EXECUTED 4ee8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4eec: e3530000 cmp r3, #0 <== NOT EXECUTED 4ef0: 11a00004 movne r0, r4 <== NOT EXECUTED 4ef4: 11a0e00f movne lr, pc <== NOT EXECUTED 4ef8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4efc: eb00cb45 bl 37c18 <__errno> <== NOT EXECUTED 4f00: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4f04: eaffffee b 4ec4 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4f08: e1a01005 mov r1, r5 4f0c: e1a00004 mov r0, r4 4f10: e1a0e00f mov lr, pc 4f14: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 4f18: e59d3010 ldr r3, [sp, #16] 4f1c: 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 ); 4f20: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 4f24: 0a000004 beq 4f3c 4f28: e593301c ldr r3, [r3, #28] 4f2c: e3530000 cmp r3, #0 4f30: 11a00004 movne r0, r4 4f34: 11a0e00f movne lr, pc 4f38: 112fff13 bxne r3 return result; } 4f3c: e1a00005 mov r0, r5 4f40: e28dd018 add sp, sp, #24 4f44: e8bd8070 pop {r4, r5, r6, pc} 00021940 : int chown( const char *path, uid_t owner, gid_t group ) { 21940: e92d40f0 push {r4, r5, r6, r7, lr} 21944: e1a01801 lsl r1, r1, #16 21948: e24dd018 sub sp, sp, #24 2194c: e1a02802 lsl r2, r2, #16 21950: e1a06821 lsr r6, r1, #16 21954: e1a05822 lsr r5, r2, #16 21958: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 2195c: eb007327 bl 3e600 21960: e28d4004 add r4, sp, #4 21964: e1a01000 mov r1, r0 21968: e3a0c001 mov ip, #1 2196c: e1a00007 mov r0, r7 21970: e3a02000 mov r2, #0 21974: e1a03004 mov r3, r4 21978: e58dc000 str ip, [sp] 2197c: ebff8dee bl 513c 21980: e3500000 cmp r0, #0 21984: 1a00000b bne 219b8 return -1; if ( !loc.ops->chown_h ) { 21988: e59d2010 ldr r2, [sp, #16] 2198c: e5923018 ldr r3, [r2, #24] 21990: e3530000 cmp r3, #0 21994: 1a000009 bne 219c0 rtems_filesystem_freenode( &loc ); 21998: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2199c: e3530000 cmp r3, #0 <== NOT EXECUTED 219a0: 11a00004 movne r0, r4 <== NOT EXECUTED 219a4: 11a0e00f movne lr, pc <== NOT EXECUTED 219a8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 219ac: eb005899 bl 37c18 <__errno> <== NOT EXECUTED 219b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 219b4: e5803000 str r3, [r0] <== NOT EXECUTED 219b8: e3e05000 mvn r5, #0 219bc: ea00000d b 219f8 } result = (*loc.ops->chown_h)( &loc, owner, group ); 219c0: e1a02005 mov r2, r5 219c4: e1a01006 mov r1, r6 219c8: e1a00004 mov r0, r4 219cc: e1a0e00f mov lr, pc 219d0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 219d4: e59d3010 ldr r3, [sp, #16] 219d8: 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 ); 219dc: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 219e0: 0a000004 beq 219f8 219e4: e593301c ldr r3, [r3, #28] 219e8: e3530000 cmp r3, #0 219ec: 11a00004 movne r0, r4 219f0: 11a0e00f movne lr, pc 219f4: 112fff13 bxne r3 return result; } 219f8: e1a00005 mov r0, r5 219fc: e28dd018 add sp, sp, #24 21a00: e8bd80f0 pop {r4, r5, r6, r7, pc} 00021a04 : #include int chroot( const char *pathname ) { 21a04: 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) { 21a08: e59f50d4 ldr r5, [pc, #212] ; 21ae4 21a0c: e59f30d4 ldr r3, [pc, #212] ; 21ae8 21a10: e5954000 ldr r4, [r5] 21a14: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 21a18: e24dd018 sub sp, sp, #24 21a1c: 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) { 21a20: 1a000007 bne 21a44 rtems_libio_set_private_env(); /* try to set a new private env*/ 21a24: eb0005d8 bl 2318c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 21a28: e5953000 ldr r3, [r5] 21a2c: e1530004 cmp r3, r4 21a30: 1a000003 bne 21a44 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21a34: eb005877 bl 37c18 <__errno> <== NOT EXECUTED 21a38: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21a3c: e5803000 str r3, [r0] <== NOT EXECUTED 21a40: ea000008 b 21a68 <== NOT EXECUTED } result = chdir(pathname); 21a44: e1a00006 mov r0, r6 21a48: ebffff7a bl 21838 if (result) { 21a4c: e250c000 subs ip, r0, #0 21a50: 0a000006 beq 21a70 rtems_set_errno_and_return_minus_one( errno ); 21a54: eb00586f bl 37c18 <__errno> <== NOT EXECUTED 21a58: e1a04000 mov r4, r0 <== NOT EXECUTED 21a5c: eb00586d bl 37c18 <__errno> <== NOT EXECUTED 21a60: e5903000 ldr r3, [r0] <== NOT EXECUTED 21a64: e5843000 str r3, [r4] <== NOT EXECUTED 21a68: e3e00000 mvn r0, #0 <== NOT EXECUTED 21a6c: ea00001a b 21adc <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 21a70: e1a0200c mov r2, ip 21a74: e59f0070 ldr r0, [pc, #112] ; 21aec 21a78: e3a01001 mov r1, #1 21a7c: e28d3004 add r3, sp, #4 21a80: e58dc000 str ip, [sp] 21a84: ebff8dac bl 513c 21a88: e3500000 cmp r0, #0 21a8c: 1afffff0 bne 21a54 /* 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); 21a90: e59f304c ldr r3, [pc, #76] ; 21ae4 21a94: e5930000 ldr r0, [r3] 21a98: e5903024 ldr r3, [r0, #36] ; 0x24 21a9c: e3530000 cmp r3, #0 21aa0: 0a000004 beq 21ab8 21aa4: e593301c ldr r3, [r3, #28] 21aa8: e3530000 cmp r3, #0 21aac: 12800018 addne r0, r0, #24 21ab0: 11a0e00f movne lr, pc 21ab4: 112fff13 bxne r3 rtems_filesystem_root = loc; 21ab8: e59f3024 ldr r3, [pc, #36] ; 21ae4 21abc: e28d4004 add r4, sp, #4 21ac0: e593c000 ldr ip, [r3] 21ac4: e8b4000f ldm r4!, {r0, r1, r2, r3} 21ac8: e28cc018 add ip, ip, #24 21acc: e8ac000f stmia ip!, {r0, r1, r2, r3} 21ad0: e5943000 ldr r3, [r4] 21ad4: e58c3000 str r3, [ip] 21ad8: e3a00000 mov r0, #0 return 0; } 21adc: e28dd018 add sp, sp, #24 21ae0: e8bd8070 pop {r4, r5, r6, pc} 21ae4: 00052008 .word 0x00052008 21ae8: 0005f524 .word 0x0005f524 21aec: 00057595 .word 0x00057595 000075f8 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 75f8: 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; 75fc: e5935000 ldr r5, [r3] if (!device_name_table) 7600: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 7604: e1a04003 mov r4, r3 7608: e1a09000 mov r9, r0 760c: 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) 7610: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 7614: 159fa090 ldrne sl, [pc, #144] ; 76ac 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) 7618: 1a000019 bne 7684 rtems_set_errno_and_return_minus_one( EFAULT ); 761c: eb0006c9 bl 9148 <__errno> <== NOT EXECUTED 7620: e3a0300e mov r3, #14 <== NOT EXECUTED 7624: e5803000 str r3, [r0] <== NOT EXECUTED 7628: e3e00000 mvn r0, #0 <== NOT EXECUTED 762c: 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) 7630: e5957000 ldr r7, [r5] 7634: e2571000 subs r1, r7, #0 7638: 0a00000f beq 767c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 763c: eb000a77 bl a020 7640: e3500000 cmp r0, #0 7644: 1a00000c bne 767c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 7648: e7d70008 ldrb r0, [r7, r8] 764c: e3500000 cmp r0, #0 7650: 1a000009 bne 767c /* 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; 7654: e59f3054 ldr r3, [pc, #84] ; 76b0 7658: e5933000 ldr r3, [r3] 765c: e5933028 ldr r3, [r3, #40] ; 0x28 7660: 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; 7664: e59f3048 ldr r3, [pc, #72] ; 76b4 7668: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 766c: e59f3044 ldr r3, [pc, #68] ; 76b8 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 7670: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 7674: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 7678: 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++) { 767c: e2866001 add r6, r6, #1 7680: e2855014 add r5, r5, #20 7684: e59a3000 ldr r3, [sl] 7688: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 768c: e1a00009 mov r0, r9 7690: 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++) { 7694: 3affffe5 bcc 7630 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 7698: eb0006aa bl 9148 <__errno> 769c: e3a03002 mov r3, #2 76a0: e5803000 str r3, [r0] 76a4: e3e00000 mvn r0, #0 } 76a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 76ac: 0000bc84 .word 0x0000bc84 76b0: 0000be6c .word 0x0000be6c 76b4: 0000bdd8 .word 0x0000bdd8 76b8: 0000be10 .word 0x0000be10 00000b60 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b60: 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( b64: e59f7058 ldr r7, [pc, #88] ; bc4 b68: e5973000 ldr r3, [r7] b6c: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b70: 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( b74: e0000396 mul r0, r6, r3 b78: eb001972 bl 7148 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) b7c: e2505000 subs r5, r0, #0 b80: 1a000004 bne b98 rtems_set_errno_and_return_minus_one( ENOMEM ); b84: eb00216f bl 9148 <__errno> <== NOT EXECUTED b88: e3a0300c mov r3, #12 <== NOT EXECUTED b8c: e5803000 str r3, [r0] <== NOT EXECUTED b90: e3e00000 mvn r0, #0 <== NOT EXECUTED b94: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( b98: e5972000 ldr r2, [r7] b9c: e3a01000 mov r1, #0 ba0: e0020296 mul r2, r6, r2 ba4: eb002395 bl 9a00 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; ba8: e59f3018 ldr r3, [pc, #24] ; bc8 temp_mt_entry->mt_fs_root.ops = &devFS_ops; bac: 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; bb0: 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; bb4: 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; bb8: 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; bbc: e3a00000 mov r0, #0 return 0; } bc0: e8bd80f0 pop {r4, r5, r6, r7, pc} bc4: 0000bc84 .word 0x0000bc84 bc8: 0000bdd8 .word 0x0000bdd8 00000bcc : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bcc: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} bd0: 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') && bd4: e5d00000 ldrb r0, [r0] bd8: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bdc: e1a05001 mov r5, r1 be0: e58d2000 str r2, [sp] be4: 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') && be8: 1a000008 bne c10 bec: e5d43001 ldrb r3, [r4, #1] bf0: e3530065 cmp r3, #101 ; 0x65 bf4: 1a000005 bne c10 (path[2] == 'v') && (path[3] == '\0')) bf8: e5d43002 ldrb r3, [r4, #2] bfc: e3530076 cmp r3, #118 ; 0x76 c00: 1a000002 bne c10 c04: e5d40003 ldrb r0, [r4, #3] c08: e3500000 cmp r0, #0 c0c: 0a000039 beq cf8 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) c10: e205aa0f and sl, r5, #61440 ; 0xf000 c14: e35a0a02 cmp sl, #8192 ; 0x2000 c18: 135a0a06 cmpne sl, #24576 ; 0x6000 c1c: 03a0a000 moveq sl, #0 c20: 13a0a001 movne sl, #1 c24: 0a000002 beq c34 rtems_set_errno_and_return_minus_one( EINVAL ); c28: eb002146 bl 9148 <__errno> <== NOT EXECUTED c2c: e3a03016 mov r3, #22 <== NOT EXECUTED c30: ea000008 b c58 <== 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; c34: e59d3028 ldr r3, [sp, #40] ; 0x28 c38: e5936000 ldr r6, [r3] if (!device_name_table) c3c: e3560000 cmp r6, #0 c40: 13e07000 mvnne r7, #0 c44: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c48: 159fb0ac ldrne fp, [pc, #172] ; cfc c4c: 1a000010 bne c94 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 ); c50: eb00213c bl 9148 <__errno> <== NOT EXECUTED c54: e3a0300e mov r3, #14 <== NOT EXECUTED c58: e5803000 str r3, [r0] <== NOT EXECUTED c5c: e3e00000 mvn r0, #0 <== NOT EXECUTED c60: ea000024 b cf8 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) c64: e796300a ldr r3, [r6, sl] c68: e2531000 subs r1, r3, #0 c6c: 0a000005 beq c88 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) c70: eb00240a bl 9ca0 <== NOT EXECUTED c74: e3500000 cmp r0, #0 <== NOT EXECUTED c78: 1a000003 bne c8c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); c7c: eb002131 bl 9148 <__errno> <== NOT EXECUTED c80: e3a03011 mov r3, #17 <== NOT EXECUTED c84: eafffff3 b c58 <== NOT EXECUTED c88: 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++){ c8c: e2888001 add r8, r8, #1 c90: e28aa014 add sl, sl, #20 c94: e59b3000 ldr r3, [fp] c98: 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) c9c: 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++){ ca0: 3affffef bcc c64 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ca4: e3770001 cmn r7, #1 ca8: 1a000004 bne cc0 rtems_set_errno_and_return_minus_one( ENOMEM ); cac: eb002125 bl 9148 <__errno> <== NOT EXECUTED cb0: e3a0300c mov r3, #12 <== NOT EXECUTED cb4: e5803000 str r3, [r0] <== NOT EXECUTED cb8: e1a00007 mov r0, r7 <== NOT EXECUTED cbc: ea00000d b cf8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( cc0: e10f8000 mrs r8, CPSR cc4: e3883080 orr r3, r8, #128 ; 0x80 cc8: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ccc: e3a02014 mov r2, #20 cd0: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); cd4: 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; cd8: e7864003 str r4, [r6, r3] cdc: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); ce0: eb0024b6 bl 9fc0 device_name_table[slot].major = major; ce4: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; ce8: 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); cec: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( cf0: e129f008 msr CPSR_fc, r8 cf4: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } cf8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} cfc: 0000bc84 .word 0x0000bc84 00000d7c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { d7c: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED d80: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d84: 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; d88: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; d8c: e3a02000 mov r2, #0 <== NOT EXECUTED d90: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d94: 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; d98: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; d9c: e283c00c add ip, r3, #12 <== NOT EXECUTED da0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; da4: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( da8: e2820008 add r0, r2, #8 <== NOT EXECUTED dac: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED db0: 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; db4: 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; db8: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dbc: eb000ed3 bl 4910 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) dc0: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; dc4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dc8: 1b001a3b blne 76bc <== NOT EXECUTED return (ssize_t) args.bytes_moved; } dcc: e28dd01c add sp, sp, #28 <== NOT EXECUTED dd0: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00000dd4 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; dd4: e5903000 ldr r3, [r0] if (!the_dev) dd8: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ddc: 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) de0: 1a000004 bne df8 rtems_set_errno_and_return_minus_one( EFAULT ); de4: eb0020d7 bl 9148 <__errno> <== NOT EXECUTED de8: e3a0300e mov r3, #14 <== NOT EXECUTED dec: e5803000 str r3, [r0] <== NOT EXECUTED df0: e3e00000 mvn r0, #0 <== NOT EXECUTED df4: 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; df8: 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 ); dfc: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; e00: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; e04: 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 ); e08: e5813018 str r3, [r1, #24] e0c: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; e10: e3a00000 mov r0, #0 return 0; } e14: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00009e04 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9e04: 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; 9e08: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 9e0c: e280c00c add ip, r0, #12 <== NOT EXECUTED 9e10: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; 9e14: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 9e18: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 9e1c: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 9e20: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 9e24: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 9e28: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 9e2c: 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; 9e30: 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( 9e34: e1a0200d mov r2, sp <== NOT EXECUTED 9e38: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED 9e3c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 9e40: eb0003eb bl adf4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 9e44: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 9e48: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 9e4c: 1b0004fb blne b240 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 9e50: e28dd01c add sp, sp, #28 <== NOT EXECUTED 9e54: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00002b54 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b54: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b58: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b5c: e92d4030 push {r4, r5, lr} 2b60: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b64: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b68: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2b6c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2b70: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b74: 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) { 2b78: ea00000a b 2ba8 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2b7c: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b80: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2b84: e3a01000 mov r1, #0 <== NOT EXECUTED 2b88: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b8c: e1a02001 mov r2, r1 <== NOT EXECUTED 2b90: eb0005af bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b94: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b98: 1b000740 blne 48a0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b9c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ba0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ba4: 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) { 2ba8: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 2bac: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 2bb0: e1510002 cmp r1, r2 <== NOT EXECUTED 2bb4: 1afffff0 bne 2b7c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2bb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2bbc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001f38 : int dup2( int fildes, int fildes2 ) { 1f38: e92d4070 push {r4, r5, r6, lr} 1f3c: e24dd048 sub sp, sp, #72 ; 0x48 1f40: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f44: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 1f48: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f4c: eb00019b bl 25c0 if ( status == -1 ) 1f50: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f54: e1a0500d mov r5, sp if ( status == -1 ) 1f58: 0a000009 beq 1f84 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 1f5c: e1a0100d mov r1, sp 1f60: e1a00004 mov r0, r4 1f64: eb000195 bl 25c0 if ( status == -1 ) 1f68: e3700001 cmn r0, #1 1f6c: 0a000004 beq 1f84 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 1f70: e1a00006 mov r0, r6 <== NOT EXECUTED 1f74: e1a02004 mov r2, r4 <== NOT EXECUTED 1f78: e3a01000 mov r1, #0 <== NOT EXECUTED 1f7c: eb00008d bl 21b8 <== NOT EXECUTED 1f80: ea000000 b 1f88 <== NOT EXECUTED 1f84: e3e00000 mvn r0, #0 } 1f88: e28dd048 add sp, sp, #72 ; 0x48 1f8c: e8bd8070 pop {r4, r5, r6, pc} 00002654 : * 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')) { 2654: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2658: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 265c: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2660: e1a04001 mov r4, r1 <== NOT EXECUTED 2664: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2668: 0a000015 beq 26c4 <== NOT EXECUTED 266c: e59f305c ldr r3, [pc, #92] ; 26d0 <== NOT EXECUTED 2670: e5933000 ldr r3, [r3] <== NOT EXECUTED 2674: e0833000 add r3, r3, r0 <== NOT EXECUTED 2678: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 267c: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2680: 13a03001 movne r3, #1 <== NOT EXECUTED 2684: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2688: 0a00000d beq 26c4 <== NOT EXECUTED 268c: e350000a cmp r0, #10 <== NOT EXECUTED 2690: 0a00000b beq 26c4 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2694: 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] = '^'; 2698: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 269c: e1a0000d mov r0, sp <== NOT EXECUTED 26a0: e3a01002 mov r1, #2 <== NOT EXECUTED 26a4: 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; 26a8: 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] = '^'; 26ac: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26b0: ebffff4d bl 23ec <== NOT EXECUTED tty->column += 2; 26b4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 26b8: e2833002 add r3, r3, #2 <== NOT EXECUTED 26bc: 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')) { 26c0: ea000001 b 26cc <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 26c4: e1a01004 mov r1, r4 <== NOT EXECUTED 26c8: ebffff8b bl 24fc <== NOT EXECUTED } } 26cc: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 26d0: 000171ec .word 0x000171ec 00022098 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 22098: e59f300c ldr r3, [pc, #12] ; 220ac <== NOT EXECUTED 2209c: e5930000 ldr r0, [r3] <== NOT EXECUTED 220a0: e3500000 cmp r0, #0 <== NOT EXECUTED 220a4: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 220a8: ea005727 b 37d4c <== NOT EXECUTED 220ac: 0005f1dc .word 0x0005f1dc 000220b0 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 220b0: e59f300c ldr r3, [pc, #12] ; 220c4 <== NOT EXECUTED 220b4: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 220b8: e3500000 cmp r0, #0 <== NOT EXECUTED 220bc: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 220c0: ea005721 b 37d4c <== NOT EXECUTED 220c4: 0005f1dc .word 0x0005f1dc 000026d4 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 26d4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 26d8: 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) { 26dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 26e0: e1a04000 mov r4, r0 <== NOT EXECUTED 26e4: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 26e8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 26ec: e3510000 cmp r1, #0 <== NOT EXECUTED 26f0: 0a000062 beq 2880 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 26f4: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 26f8: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 26fc: 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)) { 2700: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2704: e2133010 ands r3, r3, #16 <== NOT EXECUTED 2708: 1a00005c bne 2880 <== NOT EXECUTED tty->ccount = 0; 270c: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2710: e1a01004 mov r1, r4 <== NOT EXECUTED 2714: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 2718: ebffffcd bl 2654 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 271c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2720: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 2724: 11a01004 movne r1, r4 <== NOT EXECUTED 2728: 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) 272c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2730: ea00000c b 2768 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2734: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2738: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 273c: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2740: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2744: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2748: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 274c: 0a000048 beq 2874 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2750: e3570000 cmp r7, #0 <== NOT EXECUTED 2754: 1a000005 bne 2770 <== NOT EXECUTED 2758: e3130010 tst r3, #16 <== NOT EXECUTED 275c: 1a000003 bne 2770 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2760: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2764: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2768: 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); 276c: eaffffb8 b 2654 <== NOT EXECUTED } else if (c == '\t') { 2770: e3550009 cmp r5, #9 <== NOT EXECUTED 2774: 1a000020 bne 27fc <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2778: 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; 277c: 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)) { 2780: e596c000 ldr ip, [r6] <== NOT EXECUTED 2784: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2788: ea00000d b 27c4 <== NOT EXECUTED c = tty->cbuf[i++]; 278c: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2790: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2794: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2798: 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; 279c: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 27a0: 0a000005 beq 27bc <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 27a4: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 27a8: e3100020 tst r0, #32 <== NOT EXECUTED 27ac: 0a000002 beq 27bc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 27b0: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 27b4: 12855002 addne r5, r5, #2 <== NOT EXECUTED 27b8: ea000000 b 27c0 <== NOT EXECUTED } else { col++; 27bc: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 27c0: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 27c4: e1520001 cmp r2, r1 <== NOT EXECUTED 27c8: 1affffef bne 278c <== NOT EXECUTED 27cc: ea000006 b 27ec <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 27d0: e59f00bc ldr r0, [pc, #188] ; 2894 <== NOT EXECUTED 27d4: e3a01001 mov r1, #1 <== NOT EXECUTED 27d8: e1a02004 mov r2, r4 <== NOT EXECUTED 27dc: ebffff02 bl 23ec <== NOT EXECUTED tty->column--; 27e0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27e4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 27e8: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 27ec: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27f0: e1530005 cmp r3, r5 <== NOT EXECUTED 27f4: cafffff5 bgt 27d0 <== NOT EXECUTED 27f8: ea00001d b 2874 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 27fc: e5962000 ldr r2, [r6] <== NOT EXECUTED 2800: e2855001 add r5, r5, #1 <== NOT EXECUTED 2804: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 2808: e3120020 tst r2, #32 <== NOT EXECUTED 280c: 0a000009 beq 2838 <== NOT EXECUTED 2810: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2814: 0a000007 beq 2838 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2818: e59f0078 ldr r0, [pc, #120] ; 2898 <== NOT EXECUTED 281c: e3a01003 mov r1, #3 <== NOT EXECUTED 2820: e1a02004 mov r2, r4 <== NOT EXECUTED 2824: ebfffef0 bl 23ec <== NOT EXECUTED if (tty->column) 2828: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 282c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2830: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2834: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2838: e5963000 ldr r3, [r6] <== NOT EXECUTED 283c: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2840: e3130020 tst r3, #32 <== NOT EXECUTED 2844: 0a000002 beq 2854 <== NOT EXECUTED 2848: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 284c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2850: 0a000007 beq 2874 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2854: e59f003c ldr r0, [pc, #60] ; 2898 <== NOT EXECUTED 2858: e3a01003 mov r1, #3 <== NOT EXECUTED 285c: e1a02004 mov r2, r4 <== NOT EXECUTED 2860: ebfffee1 bl 23ec <== NOT EXECUTED if (tty->column) 2864: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2868: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 286c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2870: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 2874: e3570000 cmp r7, #0 <== NOT EXECUTED 2878: 1a000001 bne 2884 <== NOT EXECUTED 287c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2880: e59f6014 ldr r6, [pc, #20] ; 289c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2884: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 2888: e3510000 cmp r1, #0 <== NOT EXECUTED 288c: 1affffa8 bne 2734 <== NOT EXECUTED 2890: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2894: 00017f37 .word 0x00017f37 2898: 00017f35 .word 0x00017f35 289c: 000171ec .word 0x000171ec 00032a98 : #include int fchdir( int fd ) { 32a98: 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 ); 32a9c: e59f315c ldr r3, [pc, #348] ; 32c00 <== NOT EXECUTED 32aa0: e5933000 ldr r3, [r3] <== NOT EXECUTED 32aa4: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 32aa8: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 32aac: 2a000005 bcs 32ac8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 32ab0: e59f314c ldr r3, [pc, #332] ; 32c04 <== NOT EXECUTED 32ab4: e5934000 ldr r4, [r3] <== NOT EXECUTED 32ab8: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 32abc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 32ac0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 32ac4: 1a000002 bne 32ad4 <== NOT EXECUTED 32ac8: eb001452 bl 37c18 <__errno> <== NOT EXECUTED 32acc: e3a03009 mov r3, #9 <== NOT EXECUTED 32ad0: ea000016 b 32b30 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 32ad4: e3130002 tst r3, #2 <== NOT EXECUTED 32ad8: 1a000002 bne 32ae8 <== NOT EXECUTED 32adc: eb00144d bl 37c18 <__errno> <== NOT EXECUTED 32ae0: e3a03016 mov r3, #22 <== NOT EXECUTED 32ae4: ea000011 b 32b30 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 32ae8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 32aec: e3530000 cmp r3, #0 <== NOT EXECUTED 32af0: 0a000002 beq 32b00 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 32af4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 32af8: e3530000 cmp r3, #0 <== NOT EXECUTED 32afc: 1a000002 bne 32b0c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 32b00: eb001444 bl 37c18 <__errno> <== NOT EXECUTED 32b04: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 32b08: ea000008 b 32b30 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 32b0c: e2844018 add r4, r4, #24 <== NOT EXECUTED 32b10: e1a00004 mov r0, r4 <== NOT EXECUTED 32b14: e1a0e00f mov lr, pc <== NOT EXECUTED 32b18: e12fff13 bx r3 <== NOT EXECUTED 32b1c: e3500001 cmp r0, #1 <== NOT EXECUTED 32b20: e1a06000 mov r6, r0 <== NOT EXECUTED 32b24: 0a000003 beq 32b38 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 32b28: eb00143a bl 37c18 <__errno> <== NOT EXECUTED 32b2c: e3a03014 mov r3, #20 <== NOT EXECUTED 32b30: e5803000 str r3, [r0] <== NOT EXECUTED 32b34: ea00001c b 32bac <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 32b38: e59f50c8 ldr r5, [pc, #200] ; 32c08 <== NOT EXECUTED 32b3c: e5957000 ldr r7, [r5] <== NOT EXECUTED 32b40: e287c004 add ip, r7, #4 <== NOT EXECUTED 32b44: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32b48: e28de004 add lr, sp, #4 <== NOT EXECUTED 32b4c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 32b50: e59c3000 ldr r3, [ip] <== NOT EXECUTED 32b54: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 32b58: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32b5c: e287e004 add lr, r7, #4 <== NOT EXECUTED 32b60: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 32b64: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 32b68: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 32b6c: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 32b70: e1a01006 mov r1, r6 <== NOT EXECUTED 32b74: e1a0200e mov r2, lr <== NOT EXECUTED 32b78: e59f008c ldr r0, [pc, #140] ; 32c0c <== NOT EXECUTED 32b7c: e28d3018 add r3, sp, #24 <== NOT EXECUTED 32b80: e58de000 str lr, [sp] <== NOT EXECUTED 32b84: ebff496c bl 513c <== NOT EXECUTED 32b88: e3500000 cmp r0, #0 <== NOT EXECUTED 32b8c: 0a000008 beq 32bb4 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 32b90: e595c000 ldr ip, [r5] <== NOT EXECUTED 32b94: e28d4004 add r4, sp, #4 <== NOT EXECUTED 32b98: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32b9c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 32ba0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32ba4: e5943000 ldr r3, [r4] <== NOT EXECUTED 32ba8: e58c3000 str r3, [ip] <== NOT EXECUTED 32bac: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 32bb0: ea000010 b 32bf8 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 32bb4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 32bb8: e3530000 cmp r3, #0 <== NOT EXECUTED 32bbc: 0a000004 beq 32bd4 <== NOT EXECUTED 32bc0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 32bc4: e3530000 cmp r3, #0 <== NOT EXECUTED 32bc8: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 32bcc: 11a0e00f movne lr, pc <== NOT EXECUTED 32bd0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 32bd4: e59f302c ldr r3, [pc, #44] ; 32c08 <== NOT EXECUTED 32bd8: e28d4018 add r4, sp, #24 <== NOT EXECUTED 32bdc: e593c000 ldr ip, [r3] <== NOT EXECUTED 32be0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32be4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 32be8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32bec: e5943000 ldr r3, [r4] <== NOT EXECUTED 32bf0: e58c3000 str r3, [ip] <== NOT EXECUTED 32bf4: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 32bf8: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 32bfc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 32c00: 00051d30 .word 0x00051d30 32c04: 0005f4c8 .word 0x0005f4c8 32c08: 00052008 .word 0x00052008 32c0c: 00057595 .word 0x00057595 00021cf8 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21cf8: e59f307c ldr r3, [pc, #124] ; 21d7c <== NOT EXECUTED 21cfc: e5932000 ldr r2, [r3] <== NOT EXECUTED 21d00: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 21d04: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d08: 2a000005 bcs 21d24 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21d0c: e59f306c ldr r3, [pc, #108] ; 21d80 <== NOT EXECUTED 21d10: e5933000 ldr r3, [r3] <== NOT EXECUTED 21d14: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21d18: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21d1c: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21d20: 1a000002 bne 21d30 <== NOT EXECUTED 21d24: eb0057bb bl 37c18 <__errno> <== NOT EXECUTED 21d28: e3a03009 mov r3, #9 <== NOT EXECUTED 21d2c: ea00000a b 21d5c <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21d30: e3120004 tst r2, #4 <== NOT EXECUTED 21d34: 1a000002 bne 21d44 <== NOT EXECUTED 21d38: eb0057b6 bl 37c18 <__errno> <== NOT EXECUTED 21d3c: e3a03016 mov r3, #22 <== NOT EXECUTED 21d40: ea000005 b 21d5c <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 21d44: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21d48: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21d4c: e3520000 cmp r2, #0 <== NOT EXECUTED 21d50: 1a000004 bne 21d68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21d54: eb0057af bl 37c18 <__errno> <== NOT EXECUTED 21d58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21d5c: e5803000 str r3, [r0] <== NOT EXECUTED 21d60: e3e00000 mvn r0, #0 <== NOT EXECUTED 21d64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 21d68: e2830018 add r0, r3, #24 <== NOT EXECUTED 21d6c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21d70: e1a0e00f mov lr, pc <== NOT EXECUTED 21d74: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 21d78: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21d7c: 00051d30 .word 0x00051d30 21d80: 0005f4c8 .word 0x0005f4c8 00021d84 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d84: e59f3088 ldr r3, [pc, #136] ; 21e14 <== NOT EXECUTED 21d88: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21d8c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21d90: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d94: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21d98: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21d9c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 21da0: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21da4: 2a000005 bcs 21dc0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21da8: e59f3068 ldr r3, [pc, #104] ; 21e18 <== NOT EXECUTED 21dac: e5933000 ldr r3, [r3] <== NOT EXECUTED 21db0: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21db4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 21db8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 21dbc: 1a000002 bne 21dcc <== NOT EXECUTED 21dc0: eb005794 bl 37c18 <__errno> <== NOT EXECUTED 21dc4: e3a03009 mov r3, #9 <== NOT EXECUTED 21dc8: ea00000a b 21df8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21dcc: e3130004 tst r3, #4 <== NOT EXECUTED 21dd0: 1a000002 bne 21de0 <== NOT EXECUTED 21dd4: eb00578f bl 37c18 <__errno> <== NOT EXECUTED 21dd8: e3a03016 mov r3, #22 <== NOT EXECUTED 21ddc: ea000005 b 21df8 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 21de0: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 21de4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 21de8: e3530000 cmp r3, #0 <== NOT EXECUTED 21dec: 1a000004 bne 21e04 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21df0: eb005788 bl 37c18 <__errno> <== NOT EXECUTED 21df4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21df8: e5803000 str r3, [r0] <== NOT EXECUTED 21dfc: e3e00000 mvn r0, #0 <== NOT EXECUTED 21e00: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 21e04: e2800018 add r0, r0, #24 <== NOT EXECUTED 21e08: e1a0e00f mov lr, pc <== NOT EXECUTED 21e0c: e12fff13 bx r3 <== NOT EXECUTED } 21e10: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21e14: 00051d30 .word 0x00051d30 21e18: 0005f4c8 .word 0x0005f4c8 00032c10 : int fcntl( int fd, int cmd, ... ) { 32c10: e92d000e push {r1, r2, r3} 32c14: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c18: e59f31a4 ldr r3, [pc, #420] ; 32dc4 32c1c: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 32c20: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c24: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 32c28: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 32c2c: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c30: 2a000005 bcs 32c4c iop = rtems_libio_iop( fd ); 32c34: e59f118c ldr r1, [pc, #396] ; 32dc8 32c38: e591c000 ldr ip, [r1] 32c3c: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 32c40: e5940014 ldr r0, [r4, #20] 32c44: e3100c01 tst r0, #256 ; 0x100 32c48: 1a000002 bne 32c58 32c4c: eb0013f1 bl 37c18 <__errno> <== NOT EXECUTED 32c50: e3a03009 mov r3, #9 <== NOT EXECUTED 32c54: ea000045 b 32d70 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 32c58: e3570009 cmp r7, #9 32c5c: 979ff107 ldrls pc, [pc, r7, lsl #2] 32c60: ea000040 b 32d68 32c64: 00032c8c .word 0x00032c8c <== NOT EXECUTED 32c68: 00032cf8 .word 0x00032cf8 <== NOT EXECUTED 32c6c: 00032d04 .word 0x00032d04 <== NOT EXECUTED 32c70: 00032d24 .word 0x00032d24 <== NOT EXECUTED 32c74: 00032d30 .word 0x00032d30 <== NOT EXECUTED 32c78: 00032d5c .word 0x00032d5c <== NOT EXECUTED 32c7c: 00032d5c .word 0x00032d5c <== NOT EXECUTED 32c80: 00032d5c .word 0x00032d5c <== NOT EXECUTED 32c84: 00032d5c .word 0x00032d5c <== NOT EXECUTED 32c88: 00032d5c .word 0x00032d5c <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 32c8c: e5922000 ldr r2, [r2] if ( fd2 ) 32c90: e3520000 cmp r2, #0 32c94: 0a000003 beq 32ca8 diop = rtems_libio_iop( fd2 ); 32c98: e1520003 cmp r2, r3 <== NOT EXECUTED 32c9c: 23a0c000 movcs ip, #0 <== NOT EXECUTED 32ca0: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 32ca4: ea000002 b 32cb4 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 32ca8: ebff4a3c bl 55a0 if ( diop == 0 ) { 32cac: e250c000 subs ip, r0, #0 32cb0: 0a00003e beq 32db0 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32cb4: e2846018 add r6, r4, #24 32cb8: e8b6000f ldm r6!, {r0, r1, r2, r3} 32cbc: e28c5018 add r5, ip, #24 32cc0: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 32cc4: e59f30fc ldr r3, [pc, #252] ; 32dc8 32cc8: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32ccc: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 32cd0: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 32cd4: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 32cd8: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 32cdc: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32ce0: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 32ce4: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 32ce8: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 32cec: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 32cf0: e1a05343 asr r5, r3, #6 32cf4: ea00001f b 32d78 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 32cf8: e1a055a0 lsr r5, r0, #11 32cfc: e2055001 and r5, r5, #1 32d00: ea00001e b 32d80 * 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 ) ) 32d04: e5925000 ldr r5, [r2] 32d08: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 32d0c: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 32d10: 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; 32d14: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 32d18: 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 ) ) 32d1c: 0a000017 beq 32d80 32d20: ea00000b b 32d54 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 32d24: ebff49b4 bl 53fc 32d28: e1a05000 mov r5, r0 32d2c: ea000011 b 32d78 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 32d30: e5920000 ldr r0, [r2] 32d34: ebff4a46 bl 5654 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 32d38: e5943014 ldr r3, [r4, #20] 32d3c: e59f2088 ldr r2, [pc, #136] ; 32dcc 32d40: e3c33c02 bic r3, r3, #512 ; 0x200 32d44: e0002002 and r2, r0, r2 32d48: e3c33001 bic r3, r3, #1 32d4c: e1823003 orr r3, r2, r3 32d50: e5843014 str r3, [r4, #20] 32d54: e3a05000 mov r5, #0 32d58: ea000008 b 32d80 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 32d5c: eb0013ad bl 37c18 <__errno> 32d60: e3a03086 mov r3, #134 ; 0x86 32d64: ea000001 b 32d70 ret = -1; break; default: errno = EINVAL; 32d68: eb0013aa bl 37c18 <__errno> 32d6c: e3a03016 mov r3, #22 32d70: e5803000 str r3, [r0] 32d74: ea00000d b 32db0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 32d78: e3550000 cmp r5, #0 32d7c: ba00000c blt 32db4 if (iop->handlers->fcntl_h) { 32d80: e594303c ldr r3, [r4, #60] ; 0x3c 32d84: e5933030 ldr r3, [r3, #48] ; 0x30 32d88: e3530000 cmp r3, #0 32d8c: 0a000008 beq 32db4 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 32d90: e1a01004 mov r1, r4 32d94: e1a00007 mov r0, r7 32d98: e1a0e00f mov lr, pc 32d9c: e12fff13 bx r3 if (err) { 32da0: e2504000 subs r4, r0, #0 32da4: 0a000002 beq 32db4 errno = err; 32da8: eb00139a bl 37c18 <__errno> <== NOT EXECUTED 32dac: e5804000 str r4, [r0] <== NOT EXECUTED 32db0: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 32db4: e1a00005 mov r0, r5 32db8: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 32dbc: e28dd00c add sp, sp, #12 32dc0: e12fff1e bx lr 32dc4: 00051d30 .word 0x00051d30 32dc8: 0005f4c8 .word 0x0005f4c8 32dcc: 00000201 .word 0x00000201 0000a3b4 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3b4: e59f3324 ldr r3, [pc, #804] ; a6e0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a3b8: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} a3bc: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3c0: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a3c4: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3c8: e1a02001 mov r2, r1 a3cc: e5930000 ldr r0, [r3] a3d0: ebffe79f bl 4254 a3d4: e250a000 subs sl, r0, #0 a3d8: 13e06003 mvnne r6, #3 a3dc: 1a0000bd bne a6d8 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; a3e0: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { a3e4: e3540000 cmp r4, #0 <== NOT EXECUTED a3e8: 1a00003e bne a4e8 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a3ec: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED a3f0: ebfff9ed bl 8bac <== NOT EXECUTED if (pipe == NULL) a3f4: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a3f8: e1a05000 mov r5, r0 <== NOT EXECUTED a3fc: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) a400: 03e0600b mvneq r6, #11 <== NOT EXECUTED a404: 0a000045 beq a520 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); a408: e1a0100a mov r1, sl <== NOT EXECUTED a40c: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED a410: eb0006ac bl bec8 <== NOT EXECUTED pipe->Size = PIPE_BUF; a414: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); a418: 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; a41c: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); a420: ebfff9e1 bl 8bac <== NOT EXECUTED if (! pipe->Buffer) a424: 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); a428: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) a42c: 03e0600b mvneq r6, #11 <== NOT EXECUTED a430: 0a000029 beq a4dc <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( a434: e59f62a8 ldr r6, [pc, #680] ; a6e4 <== NOT EXECUTED a438: e59f02a8 ldr r0, [pc, #680] ; a6e8 <== NOT EXECUTED a43c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a440: e1a0100a mov r1, sl <== NOT EXECUTED a444: e1830000 orr r0, r3, r0 <== NOT EXECUTED a448: e1a0200a mov r2, sl <== NOT EXECUTED a44c: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED a450: eb000164 bl a9e8 <== NOT EXECUTED a454: e2501000 subs r1, r0, #0 <== NOT EXECUTED a458: 1a00001c bne a4d0 <== 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( a45c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a460: e59f0284 ldr r0, [pc, #644] ; a6ec <== NOT EXECUTED a464: e1a02001 mov r2, r1 <== NOT EXECUTED a468: e1830000 orr r0, r3, r0 <== NOT EXECUTED a46c: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED a470: eb00015c bl a9e8 <== NOT EXECUTED a474: e2503000 subs r3, r0, #0 <== NOT EXECUTED a478: 1a000012 bne a4c8 <== 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( a47c: e5d62000 ldrb r2, [r6] <== NOT EXECUTED a480: e59f0268 ldr r0, [pc, #616] ; a6f0 <== NOT EXECUTED a484: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED a488: e1820000 orr r0, r2, r0 <== NOT EXECUTED a48c: e3a01001 mov r1, #1 <== NOT EXECUTED a490: e3a02010 mov r2, #16 <== NOT EXECUTED a494: e58dc000 str ip, [sp] <== NOT EXECUTED a498: ebffe6db bl 400c <== NOT EXECUTED a49c: e3500000 cmp r0, #0 <== NOT EXECUTED a4a0: 1a000006 bne a4c0 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a4a4: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a4a8: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED a4ac: e2833001 add r3, r3, #1 <== NOT EXECUTED a4b0: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; a4b4: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED a4b8: 05c63000 strbeq r3, [r6] <== NOT EXECUTED a4bc: ea000009 b a4e8 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); a4c0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED a4c4: eb000175 bl aaa0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); a4c8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED a4cc: eb000173 bl aaa0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); a4d0: e5950000 ldr r0, [r5] <== NOT EXECUTED a4d4: ebfff874 bl 86ac <== NOT EXECUTED a4d8: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); a4dc: e1a00005 mov r0, r5 <== NOT EXECUTED a4e0: ebfff871 bl 86ac <== NOT EXECUTED a4e4: ea00000d b a520 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a4e8: e3a01000 mov r1, #0 <== NOT EXECUTED a4ec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a4f0: e1a02001 mov r2, r1 <== NOT EXECUTED a4f4: ebffe756 bl 4254 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { a4f8: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a4fc: e3500000 cmp r0, #0 <== NOT EXECUTED a500: 01a06000 moveq r6, r0 <== NOT EXECUTED a504: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { a508: e3530000 cmp r3, #0 <== NOT EXECUTED a50c: 1a000003 bne a520 <== NOT EXECUTED if (err) a510: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; a514: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); a518: 11a00004 movne r0, r4 <== NOT EXECUTED a51c: 1bffff58 blne a284 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); a520: e59f31b8 ldr r3, [pc, #440] ; a6e0 <== NOT EXECUTED a524: e5930000 ldr r0, [r3] <== NOT EXECUTED a528: ebffe78f bl 436c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) a52c: e3560000 cmp r6, #0 <== NOT EXECUTED a530: 1a000068 bne a6d8 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { a534: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED a538: e2023006 and r3, r2, #6 <== NOT EXECUTED a53c: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; a540: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { a544: 0a000024 beq a5dc <== NOT EXECUTED a548: e3530006 cmp r3, #6 <== NOT EXECUTED a54c: 0a000046 beq a66c <== NOT EXECUTED a550: e3530002 cmp r3, #2 <== NOT EXECUTED a554: 1a000058 bne a6bc <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a558: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a55c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a560: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a564: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) a568: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a56c: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a570: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a574: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED a578: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a57c: 0b00015f bleq ab00 <== NOT EXECUTED if (pipe->Writers == 0) { a580: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a584: e3530000 cmp r3, #0 <== NOT EXECUTED a588: 1a00004b bne a6bc <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) a58c: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED a590: e3130001 tst r3, #1 <== NOT EXECUTED a594: 1a000048 bne a6bc <== NOT EXECUTED break; prevCounter = pipe->writerCounter; a598: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); a59c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a5a0: ebffe771 bl 436c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a5a4: e3a01000 mov r1, #0 <== NOT EXECUTED a5a8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a5ac: eb000169 bl ab58 <== NOT EXECUTED a5b0: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a5b4: 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)) a5b8: 1a000042 bne a6c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a5bc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a5c0: ebffe723 bl 4254 <== NOT EXECUTED a5c4: e3500000 cmp r0, #0 <== NOT EXECUTED a5c8: 1a00003e bne a6c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); a5cc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED a5d0: e1550003 cmp r5, r3 <== NOT EXECUTED a5d4: 0afffff0 beq a59c <== NOT EXECUTED a5d8: ea000037 b a6bc <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a5dc: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a5e0: e3530000 cmp r3, #0 <== NOT EXECUTED a5e4: 1a000002 bne a5f4 <== NOT EXECUTED a5e8: e3120001 tst r2, #1 <== NOT EXECUTED a5ec: 13e06005 mvnne r6, #5 <== NOT EXECUTED a5f0: 1a000035 bne a6cc <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) a5f4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a5f8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a5fc: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a600: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) a604: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a608: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a60c: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a610: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED a614: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a618: 0b000138 bleq ab00 <== NOT EXECUTED if (pipe->Readers == 0) { a61c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a620: e3530000 cmp r3, #0 <== NOT EXECUTED a624: 1a000024 bne a6bc <== NOT EXECUTED prevCounter = pipe->readerCounter; a628: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); a62c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a630: ebffe74d bl 436c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) a634: e3a01000 mov r1, #0 <== NOT EXECUTED a638: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a63c: eb000145 bl ab58 <== NOT EXECUTED a640: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a644: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) a648: 1a00001e bne a6c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a64c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a650: ebffe6ff bl 4254 <== NOT EXECUTED a654: e3500000 cmp r0, #0 <== NOT EXECUTED a658: 1a00001a bne a6c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); a65c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED a660: e1550003 cmp r5, r3 <== NOT EXECUTED a664: 0afffff0 beq a62c <== NOT EXECUTED a668: ea000013 b a6bc <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a66c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a670: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a674: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a678: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) a67c: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a680: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a684: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a688: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED a68c: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a690: 0b00011a bleq ab00 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) a694: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a698: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a69c: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a6a0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) a6a4: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a6a8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a6ac: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a6b0: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED a6b4: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a6b8: 0b000110 bleq ab00 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); a6bc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a6c0: ebffe729 bl 436c <== NOT EXECUTED return 0; a6c4: ea000003 b a6d8 <== NOT EXECUTED a6c8: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); a6cc: e1a00007 mov r0, r7 <== NOT EXECUTED a6d0: e1a01008 mov r1, r8 <== NOT EXECUTED a6d4: ebfffef7 bl a2b8 <== NOT EXECUTED return err; } a6d8: e1a00006 mov r0, r6 a6dc: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} a6e0: 00018524 .word 0x00018524 a6e4: 000171d8 .word 0x000171d8 a6e8: 50497200 .word 0x50497200 a6ec: 50497700 .word 0x50497700 a6f0: 50497300 .word 0x50497300 00008684 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8684: e59f3030 ldr r3, [pc, #48] ; 86bc <== NOT EXECUTED 8688: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 868c: ea000006 b 86ac <== 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 ) { 8690: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 8694: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8698: e15c0000 cmp ip, r0 <== NOT EXECUTED 869c: 1a000001 bne 86a8 <== NOT EXECUTED 86a0: e3a00001 mov r0, #1 <== NOT EXECUTED 86a4: 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 ) { 86a8: e5922000 ldr r2, [r2] <== NOT EXECUTED 86ac: e1520003 cmp r2, r3 <== NOT EXECUTED 86b0: 1afffff6 bne 8690 <== NOT EXECUTED 86b4: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 86b8: e12fff1e bx lr <== NOT EXECUTED 86bc: 0005f50c .word 0x0005f50c 0000240c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 240c: e59f3100 ldr r3, [pc, #256] ; 2514 2410: e5933000 ldr r3, [r3] 2414: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2418: 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); 241c: 2a000005 bcs 2438 iop = rtems_libio_iop(fd); 2420: e59f30f0 ldr r3, [pc, #240] ; 2518 2424: e5933000 ldr r3, [r3] 2428: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 242c: e5903014 ldr r3, [r0, #20] 2430: e3130c01 tst r3, #256 ; 0x100 2434: 1a000002 bne 2444 2438: eb002de3 bl dbcc <__errno> 243c: e3a03009 mov r3, #9 2440: ea000003 b 2454 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2444: e3130002 tst r3, #2 2448: 1a000004 bne 2460 244c: eb002dde bl dbcc <__errno> <== NOT EXECUTED 2450: e3a03016 mov r3, #22 <== NOT EXECUTED 2454: e5803000 str r3, [r0] 2458: e3e00000 mvn r0, #0 245c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2460: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2464: e351000b cmp r1, #11 2468: 979ff101 ldrls pc, [pc, r1, lsl #2] 246c: ea000023 b 2500 2470: 000024a0 .word 0x000024a0 <== NOT EXECUTED 2474: 000024a8 .word 0x000024a8 <== NOT EXECUTED 2478: 000024b0 .word 0x000024b0 <== NOT EXECUTED 247c: 000024b8 .word 0x000024b8 <== NOT EXECUTED 2480: 000024c0 .word 0x000024c0 <== NOT EXECUTED 2484: 000024c8 .word 0x000024c8 <== NOT EXECUTED 2488: 000024d0 .word 0x000024d0 <== NOT EXECUTED 248c: 000024d8 .word 0x000024d8 <== NOT EXECUTED 2490: 000024e0 .word 0x000024e0 <== NOT EXECUTED 2494: 000024e8 .word 0x000024e8 <== NOT EXECUTED 2498: 000024f0 .word 0x000024f0 <== NOT EXECUTED 249c: 000024f8 .word 0x000024f8 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 24a0: e5930038 ldr r0, [r3, #56] ; 0x38 break; 24a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 24a8: e593003c ldr r0, [r3, #60] ; 0x3c break; 24ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 24b0: e5930040 ldr r0, [r3, #64] ; 0x40 break; 24b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 24b8: e5930044 ldr r0, [r3, #68] ; 0x44 break; 24bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 24c0: e5930048 ldr r0, [r3, #72] ; 0x48 break; 24c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 24c8: e593004c ldr r0, [r3, #76] ; 0x4c break; 24cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 24d0: e5930054 ldr r0, [r3, #84] ; 0x54 break; 24d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 24d8: e5930058 ldr r0, [r3, #88] ; 0x58 break; 24dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 24e0: e5930064 ldr r0, [r3, #100] ; 0x64 break; 24e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 24e8: e5930050 ldr r0, [r3, #80] ; 0x50 break; 24ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 24f0: e593005c ldr r0, [r3, #92] ; 0x5c break; 24f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 24f8: e5930060 ldr r0, [r3, #96] ; 0x60 break; 24fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2500: eb002db1 bl dbcc <__errno> 2504: e3a03016 mov r3, #22 2508: e5803000 str r3, [r0] 250c: e3e00000 mvn r0, #0 break; } return return_value; } 2510: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2514: 0001a9d0 .word 0x0001a9d0 2518: 0001c2f0 .word 0x0001c2f0 000086ac : void free( void *ptr ) { MSBUMP(free_calls, 1); 86ac: e59f3088 ldr r3, [pc, #136] ; 873c 86b0: e593200c ldr r2, [r3, #12] 86b4: e92d4030 push {r4, r5, lr} 86b8: e2822001 add r2, r2, #1 if ( !ptr ) 86bc: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 86c0: e583200c str r2, [r3, #12] if ( !ptr ) 86c4: 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()) && 86c8: e59f3070 ldr r3, [pc, #112] ; 8740 86cc: e5933000 ldr r3, [r3] 86d0: e3530003 cmp r3, #3 86d4: 1a000005 bne 86f0 86d8: eb000113 bl 8b2c 86dc: e3500000 cmp r0, #0 86e0: 1a000002 bne 86f0 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 86e4: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 86e8: 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); 86ec: ea000121 b 8b78 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 86f0: e59f304c ldr r3, [pc, #76] ; 8744 86f4: e5933000 ldr r3, [r3] 86f8: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 86fc: 11a00004 movne r0, r4 8700: 11a0e00f movne lr, pc 8704: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 8708: e59f5038 ldr r5, [pc, #56] ; 8748 870c: e1a01004 mov r1, r4 8710: e5950000 ldr r0, [r5] 8714: eb000472 bl 98e4 <_Protected_heap_Free> 8718: e3500000 cmp r0, #0 871c: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 8720: 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", 8724: e59f0020 ldr r0, [pc, #32] ; 874c <== NOT EXECUTED 8728: e2822018 add r2, r2, #24 <== NOT EXECUTED 872c: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 8730: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8734: 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", 8738: eaffe5c2 b 1e48 <== NOT EXECUTED 873c: 000185b4 .word 0x000185b4 8740: 000188b0 .word 0x000188b0 8744: 00018408 .word 0x00018408 8748: 00016ffc .word 0x00016ffc 874c: 000180f2 .word 0x000180f2 00023084 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23084: e59f3058 ldr r3, [pc, #88] ; 230e4 <== NOT EXECUTED 23088: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2308c: e92d4010 push {r4, lr} <== NOT EXECUTED 23090: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23094: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 23098: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 2309c: e3530000 cmp r3, #0 <== NOT EXECUTED 230a0: 0a000004 beq 230b8 <== NOT EXECUTED 230a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 230a8: e3530000 cmp r3, #0 <== NOT EXECUTED 230ac: 12800004 addne r0, r0, #4 <== NOT EXECUTED 230b0: 11a0e00f movne lr, pc <== NOT EXECUTED 230b4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 230b8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 230bc: e3530000 cmp r3, #0 <== NOT EXECUTED 230c0: 0a000004 beq 230d8 <== NOT EXECUTED 230c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 230c8: e3530000 cmp r3, #0 <== NOT EXECUTED 230cc: 12840018 addne r0, r4, #24 <== NOT EXECUTED 230d0: 11a0e00f movne lr, pc <== NOT EXECUTED 230d4: 112fff13 bxne r3 <== NOT EXECUTED free(env); 230d8: e1a00004 mov r0, r4 <== NOT EXECUTED } } 230dc: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 230e0: eaff8848 b 5208 <== NOT EXECUTED 230e4: 0005f524 .word 0x0005f524 000164cc : int fstat( int fd, struct stat *sbuf ) { 164cc: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 164d0: e2515000 subs r5, r1, #0 164d4: 1a000002 bne 164e4 rtems_set_errno_and_return_minus_one( EFAULT ); 164d8: ebffd430 bl b5a0 <__errno> 164dc: e3a0300e mov r3, #14 164e0: ea000014 b 16538 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 164e4: e59f3080 ldr r3, [pc, #128] ; 1656c 164e8: e5933000 ldr r3, [r3] 164ec: e1500003 cmp r0, r3 164f0: 2a000008 bcs 16518 164f4: e59f3074 ldr r3, [pc, #116] ; 16570 164f8: e5934000 ldr r4, [r3] 164fc: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 16500: e5943014 ldr r3, [r4, #20] 16504: e3130c01 tst r3, #256 ; 0x100 16508: 0a000002 beq 16518 if ( !iop->handlers ) 1650c: e594303c ldr r3, [r4, #60] ; 0x3c 16510: e3530000 cmp r3, #0 16514: 1a000002 bne 16524 rtems_set_errno_and_return_minus_one( EBADF ); 16518: ebffd420 bl b5a0 <__errno> 1651c: e3a03009 mov r3, #9 16520: ea000004 b 16538 if ( !iop->handlers->fstat_h ) 16524: e5933018 ldr r3, [r3, #24] 16528: e3530000 cmp r3, #0 1652c: 1a000004 bne 16544 rtems_set_errno_and_return_minus_one( ENOTSUP ); 16530: ebffd41a bl b5a0 <__errno> <== NOT EXECUTED 16534: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16538: e5803000 str r3, [r0] 1653c: e3e00000 mvn r0, #0 16540: 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) ); 16544: e3a01000 mov r1, #0 16548: e3a02048 mov r2, #72 ; 0x48 1654c: e1a00005 mov r0, r5 16550: ebffd65c bl bec8 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 16554: e2840018 add r0, r4, #24 16558: e1a01005 mov r1, r5 1655c: e594303c ldr r3, [r4, #60] ; 0x3c 16560: e1a0e00f mov lr, pc 16564: e593f018 ldr pc, [r3, #24] } 16568: e8bd8030 pop {r4, r5, pc} 1656c: 00016ff0 .word 0x00016ff0 16570: 000185a8 .word 0x000185a8 00021ed0 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21ed0: e59f307c ldr r3, [pc, #124] ; 21f54 21ed4: e5933000 ldr r3, [r3] 21ed8: e1500003 cmp r0, r3 #include int fsync( int fd ) { 21edc: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21ee0: 2a00000d bcs 21f1c iop = rtems_libio_iop( fd ); 21ee4: e59f306c ldr r3, [pc, #108] ; 21f58 21ee8: e5933000 ldr r3, [r3] 21eec: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 21ef0: e5903014 ldr r3, [r0, #20] 21ef4: e3130c01 tst r3, #256 ; 0x100 21ef8: 0a000007 beq 21f1c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21efc: e3130004 tst r3, #4 21f00: 1a000002 bne 21f10 21f04: eb005743 bl 37c18 <__errno> 21f08: e3a03016 mov r3, #22 21f0c: ea00000a b 21f3c /* * Now process the fsync(). */ if ( !iop->handlers ) 21f10: e590303c ldr r3, [r0, #60] ; 0x3c 21f14: e3530000 cmp r3, #0 21f18: 1a000002 bne 21f28 rtems_set_errno_and_return_minus_one( EBADF ); 21f1c: eb00573d bl 37c18 <__errno> <== NOT EXECUTED 21f20: e3a03009 mov r3, #9 <== NOT EXECUTED 21f24: ea000004 b 21f3c <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 21f28: e5933028 ldr r3, [r3, #40] ; 0x28 21f2c: e3530000 cmp r3, #0 21f30: 1a000004 bne 21f48 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21f34: eb005737 bl 37c18 <__errno> 21f38: e3a03086 mov r3, #134 ; 0x86 21f3c: e5803000 str r3, [r0] 21f40: e3e00000 mvn r0, #0 21f44: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 21f48: e1a0e00f mov lr, pc 21f4c: e12fff13 bx r3 } 21f50: e49df004 pop {pc} ; (ldr pc, [sp], #4) 21f54: 00051d30 .word 0x00051d30 21f58: 0005f4c8 .word 0x0005f4c8 00008750 : int ftruncate( int fd, off_t length ) { 8750: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8754: e59f30d4 ldr r3, [pc, #212] ; 8830 8758: e5933000 ldr r3, [r3] 875c: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 8760: e24dd014 sub sp, sp, #20 8764: e1a05001 mov r5, r1 8768: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 876c: 2a000005 bcs 8788 iop = rtems_libio_iop( fd ); 8770: e59f30bc ldr r3, [pc, #188] ; 8834 8774: e5934000 ldr r4, [r3] 8778: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 877c: e5943014 ldr r3, [r4, #20] 8780: e3130c01 tst r3, #256 ; 0x100 8784: 1a000002 bne 8794 8788: eb000b84 bl b5a0 <__errno> <== NOT EXECUTED 878c: e3a03009 mov r3, #9 <== NOT EXECUTED 8790: ea00001c b 8808 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8794: e284e018 add lr, r4, #24 8798: e8be000f ldm lr!, {r0, r1, r2, r3} 879c: e1a0c00d mov ip, sp 87a0: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 87a4: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 87a8: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 87ac: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 87b0: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 87b4: 0a000011 beq 8800 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 87b8: e1a0000d mov r0, sp 87bc: e1a0e00f mov lr, pc 87c0: e12fff13 bx r3 87c4: e3500001 cmp r0, #1 87c8: 1a000002 bne 87d8 rtems_set_errno_and_return_minus_one( EISDIR ); 87cc: eb000b73 bl b5a0 <__errno> 87d0: e3a03015 mov r3, #21 87d4: ea00000b b 8808 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 87d8: e5943014 ldr r3, [r4, #20] 87dc: e3130004 tst r3, #4 87e0: 1a000002 bne 87f0 87e4: eb000b6d bl b5a0 <__errno> <== NOT EXECUTED 87e8: e3a03016 mov r3, #22 <== NOT EXECUTED 87ec: ea000005 b 8808 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 87f0: e594303c ldr r3, [r4, #60] ; 0x3c 87f4: e5933020 ldr r3, [r3, #32] 87f8: e3530000 cmp r3, #0 87fc: 1a000004 bne 8814 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8800: eb000b66 bl b5a0 <__errno> <== NOT EXECUTED 8804: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8808: e5803000 str r3, [r0] 880c: e3e00000 mvn r0, #0 8810: ea000004 b 8828 return (*iop->handlers->ftruncate_h)( iop, length ); 8814: e1a00004 mov r0, r4 8818: e1a01005 mov r1, r5 881c: e1a02006 mov r2, r6 8820: e1a0e00f mov lr, pc 8824: e12fff13 bx r3 } 8828: e28dd014 add sp, sp, #20 882c: e8bd8070 pop {r4, r5, r6, pc} 8830: 00016ff0 .word 0x00016ff0 8834: 000185a8 .word 0x000185a8 00051700 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 51700: e59f30a8 ldr r3, [pc, #168] ; 517b0 51704: e5933000 ldr r3, [r3] 51708: e1500003 cmp r0, r3 5170c: 359f30a0 ldrcc r3, [pc, #160] ; 517b4 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 51710: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 51714: 35934000 ldrcc r4, [r3] 51718: 23a04000 movcs r4, #0 5171c: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51720: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 51724: e24dd014 sub sp, sp, #20 51728: e1a06001 mov r6, r1 5172c: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51730: e8be000f ldm lr!, {r0, r1, r2, r3} 51734: e1a0c00d mov ip, sp 51738: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 5173c: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51740: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 51744: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51748: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 5174c: 0a00000d beq 51788 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 51750: e1a0000d mov r0, sp 51754: e1a0e00f mov lr, pc 51758: e12fff13 bx r3 5175c: e3500001 cmp r0, #1 51760: 0a000004 beq 51778 rtems_set_errno_and_return_minus_one( ENOTDIR ); 51764: ebff992b bl 37c18 <__errno> 51768: e3a03014 mov r3, #20 5176c: e5803000 str r3, [r0] 51770: e3e00000 mvn r0, #0 51774: ea00000b b 517a8 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 51778: e594303c ldr r3, [r4, #60] ; 0x3c 5177c: e5933008 ldr r3, [r3, #8] 51780: e3530000 cmp r3, #0 51784: 1a000002 bne 51794 rtems_set_errno_and_return_minus_one( ENOTSUP ); 51788: ebff9922 bl 37c18 <__errno> <== NOT EXECUTED 5178c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 51790: eafffff5 b 5176c <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 51794: e1a00004 mov r0, r4 51798: e1a01006 mov r1, r6 5179c: e1a02005 mov r2, r5 517a0: e1a0e00f mov lr, pc 517a4: e12fff13 bx r3 } 517a8: e28dd014 add sp, sp, #20 517ac: e8bd8070 pop {r4, r5, r6, pc} 517b0: 00051d30 .word 0x00051d30 517b4: 0005f4c8 .word 0x0005f4c8 0002206c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 2206c: e59f3008 ldr r3, [pc, #8] ; 2207c <== NOT EXECUTED 22070: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 22074: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 22078: e12fff1e bx lr <== NOT EXECUTED 2207c: 00052008 .word 0x00052008 00022674 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 22674: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22678: e59da01c ldr sl, [sp, #28] 2267c: e1a06000 mov r6, r0 22680: e1a07001 mov r7, r1 22684: e1a04002 mov r4, r2 22688: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 2268c: ebffffb7 bl 22570 if ((fp = fopen("/etc/group", "r")) == NULL) { 22690: e59f00a4 ldr r0, [pc, #164] ; 2273c 22694: e59f10a4 ldr r1, [pc, #164] ; 22740 22698: eb0057ce bl 385d8 2269c: e2505000 subs r5, r0, #0 226a0: 1a000003 bne 226b4 errno = EINVAL; 226a4: eb00555b bl 37c18 <__errno> <== NOT EXECUTED 226a8: e3a03016 mov r3, #22 <== NOT EXECUTED 226ac: e5803000 str r3, [r0] <== NOT EXECUTED 226b0: ea00000c b 226e8 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 226b4: e1a01004 mov r1, r4 226b8: e1a02008 mov r2, r8 226bc: e1a0300a mov r3, sl 226c0: e1a00005 mov r0, r5 226c4: ebfffef2 bl 22294 226c8: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 226cc: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 226d0: 1a000006 bne 226f0 errno = EINVAL; 226d4: eb00554f bl 37c18 <__errno> <== NOT EXECUTED 226d8: e3a03016 mov r3, #22 <== NOT EXECUTED 226dc: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 226e0: e1a00005 mov r0, r5 <== NOT EXECUTED 226e4: eb005598 bl 37d4c <== NOT EXECUTED 226e8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 226ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 226f0: e3560000 cmp r6, #0 226f4: 0a000004 beq 2270c match = (strcmp(grp->gr_name, name) == 0); 226f8: e5940000 ldr r0, [r4] 226fc: eb006d57 bl 3dc60 22700: e2700001 rsbs r0, r0, #1 22704: 33a00000 movcc r0, #0 22708: ea000003 b 2271c } else { match = (grp->gr_gid == gid); 2270c: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22710: e1500007 cmp r0, r7 <== NOT EXECUTED 22714: 13a00000 movne r0, #0 <== NOT EXECUTED 22718: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 2271c: e3500000 cmp r0, #0 22720: 0affffe3 beq 226b4 fclose(fp); 22724: e1a00005 mov r0, r5 22728: eb005587 bl 37d4c *result = grp; 2272c: e59d3020 ldr r3, [sp, #32] 22730: e3a00000 mov r0, #0 22734: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22738: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2273c: 00055f98 .word 0x00055f98 22740: 00056d10 .word 0x00056d10 000223cc : return NULL; return p; } struct group *getgrent(void) { 223cc: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 223d0: e59f402c ldr r4, [pc, #44] ; 22404 <== NOT EXECUTED 223d4: e5940000 ldr r0, [r4] <== NOT EXECUTED 223d8: e3500000 cmp r0, #0 <== NOT EXECUTED 223dc: 0a000006 beq 223fc <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 223e0: e2841008 add r1, r4, #8 <== NOT EXECUTED 223e4: e2842018 add r2, r4, #24 <== NOT EXECUTED 223e8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 223ec: ebffffa8 bl 22294 <== NOT EXECUTED 223f0: e3500000 cmp r0, #0 <== NOT EXECUTED 223f4: 12840008 addne r0, r4, #8 <== NOT EXECUTED 223f8: 18bd8010 popne {r4, pc} <== NOT EXECUTED 223fc: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 22400: e8bd8010 pop {r4, pc} <== NOT EXECUTED 22404: 0005f1dc .word 0x0005f1dc 00022778 : struct group *getgrgid( gid_t gid ) { 22778: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2277c: e59f1028 ldr r1, [pc, #40] ; 227ac <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 22780: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22784: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22788: e2812010 add r2, r1, #16 <== NOT EXECUTED 2278c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22790: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22794: e58dc000 str ip, [sp] <== NOT EXECUTED 22798: ebffffe9 bl 22744 <== NOT EXECUTED 2279c: e3500000 cmp r0, #0 <== NOT EXECUTED 227a0: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 227a4: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 227a8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 227ac: 0005f1e4 .word 0x0005f1e4 00022744 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 22744: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22748: e1a0c002 mov ip, r2 <== NOT EXECUTED 2274c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 22750: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 22754: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 22758: e1a0300c mov r3, ip <== NOT EXECUTED 2275c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22760: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22764: e1a0200e mov r2, lr <== NOT EXECUTED 22768: e3a00000 mov r0, #0 <== NOT EXECUTED 2276c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22770: ebffffbf bl 22674 <== NOT EXECUTED } 22774: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00020410 : */ pid_t getpid( void ) { return _Objects_Local_node; } 20410: e3a00001 mov r0, #1 <== NOT EXECUTED 20414: e12fff1e bx lr <== NOT EXECUTED 00022844 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22844: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22848: e59da01c ldr sl, [sp, #28] 2284c: e1a06000 mov r6, r0 22850: e1a07001 mov r7, r1 22854: e1a04002 mov r4, r2 22858: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 2285c: ebffff43 bl 22570 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 22860: e59f00a4 ldr r0, [pc, #164] ; 2290c 22864: e59f10a4 ldr r1, [pc, #164] ; 22910 22868: eb00575a bl 385d8 2286c: e2505000 subs r5, r0, #0 22870: 1a000003 bne 22884 errno = EINVAL; 22874: eb0054e7 bl 37c18 <__errno> <== NOT EXECUTED 22878: e3a03016 mov r3, #22 <== NOT EXECUTED 2287c: e5803000 str r3, [r0] <== NOT EXECUTED 22880: ea00000c b 228b8 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22884: e1a01004 mov r1, r4 22888: e1a02008 mov r2, r8 2288c: e1a0300a mov r3, sl 22890: e1a00005 mov r0, r5 22894: ebfffedb bl 22408 22898: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 2289c: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 228a0: 1a000006 bne 228c0 errno = EINVAL; 228a4: eb0054db bl 37c18 <__errno> <== NOT EXECUTED 228a8: e3a03016 mov r3, #22 <== NOT EXECUTED 228ac: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 228b0: e1a00005 mov r0, r5 <== NOT EXECUTED 228b4: eb005524 bl 37d4c <== NOT EXECUTED 228b8: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 228bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 228c0: e3560000 cmp r6, #0 228c4: 0a000004 beq 228dc match = (strcmp(pwd->pw_name, name) == 0); 228c8: e5940000 ldr r0, [r4] 228cc: eb006ce3 bl 3dc60 228d0: e2700001 rsbs r0, r0, #1 228d4: 33a00000 movcc r0, #0 228d8: ea000003 b 228ec } else { match = (pwd->pw_uid == uid); 228dc: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 228e0: e1500007 cmp r0, r7 <== NOT EXECUTED 228e4: 13a00000 movne r0, #0 <== NOT EXECUTED 228e8: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 228ec: e3500000 cmp r0, #0 228f0: 0affffe3 beq 22884 fclose(fp); 228f4: e1a00005 mov r0, r5 228f8: eb005513 bl 37d4c *result = pwd; 228fc: e59d3020 ldr r3, [sp, #32] 22900: e3a00000 mov r0, #0 22904: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22908: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2290c: 00055eea .word 0x00055eea 22910: 00056d10 .word 0x00056d10 00022534 : return NULL; return p; } struct passwd *getpwent(void) { 22534: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 22538: e59f402c ldr r4, [pc, #44] ; 2256c <== NOT EXECUTED 2253c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 22540: e3500000 cmp r0, #0 <== NOT EXECUTED 22544: 0a000006 beq 22564 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 22548: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 2254c: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 22550: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22554: ebffffab bl 22408 <== NOT EXECUTED 22558: e3500000 cmp r0, #0 <== NOT EXECUTED 2255c: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 22560: 18bd8010 popne {r4, pc} <== NOT EXECUTED 22564: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 22568: e8bd8010 pop {r4, pc} <== NOT EXECUTED 2256c: 0005f1dc .word 0x0005f1dc 00022948 : struct passwd *getpwuid( uid_t uid ) { 22948: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 2294c: e59f1028 ldr r1, [pc, #40] ; 2297c <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 22950: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22954: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22958: e281201c add r2, r1, #28 <== NOT EXECUTED 2295c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22960: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22964: e58dc000 str ip, [sp] <== NOT EXECUTED 22968: ebffffe9 bl 22914 <== NOT EXECUTED 2296c: e3500000 cmp r0, #0 <== NOT EXECUTED 22970: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22974: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22978: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 2297c: 0005f2bc .word 0x0005f2bc 00022914 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22914: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22918: e1a0c002 mov ip, r2 <== NOT EXECUTED 2291c: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22920: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22924: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22928: e1a0300c mov r3, ip <== NOT EXECUTED 2292c: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22930: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22934: e1a0200e mov r2, lr <== NOT EXECUTED 22938: e3a00000 mov r0, #0 <== NOT EXECUTED 2293c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22940: ebffffbf bl 22844 <== NOT EXECUTED } 22944: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00008838 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8838: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 883c: e2504000 subs r4, r0, #0 8840: 1a000004 bne 8858 errno = EFAULT; 8844: eb000b55 bl b5a0 <__errno> <== NOT EXECUTED 8848: e3a0300e mov r3, #14 <== NOT EXECUTED 884c: e5803000 str r3, [r0] <== NOT EXECUTED 8850: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 8854: ea00000c b 888c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 8858: e10f5000 mrs r5, CPSR 885c: e3853080 orr r3, r5, #128 ; 0x80 8860: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 8864: e1a0000d mov r0, sp 8868: eb0002cf bl 93ac <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 886c: 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; 8870: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8874: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 8878: 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; 887c: e5843000 str r3, [r4] time->tv_usec = useconds; 8880: eb0030fd bl 14c7c <__aeabi_idiv> 8884: e5840004 str r0, [r4, #4] 8888: 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; } 888c: e8bd803c pop {r2, r3, r4, r5, pc} 00005314 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 5314: e59f3008 ldr r3, [pc, #8] ; 5324 <== NOT EXECUTED 5318: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 531c: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 5320: e12fff1e bx lr <== NOT EXECUTED 5324: 00052008 .word 0x00052008 00004ac4 : int ioctl( int fd, ioctl_command_t command, ... ) { 4ac4: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ac8: e59f3080 ldr r3, [pc, #128] ; 4b50 4acc: e5933000 ldr r3, [r3] 4ad0: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 4ad4: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ad8: 2a00000b bcs 4b0c iop = rtems_libio_iop( fd ); 4adc: e59f3070 ldr r3, [pc, #112] ; 4b54 4ae0: e5933000 ldr r3, [r3] 4ae4: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 4ae8: e5903014 ldr r3, [r0, #20] 4aec: e3130c01 tst r3, #256 ; 0x100 4af0: 0a000005 beq 4b0c /* * Now process the ioctl(). */ if ( !iop->handlers ) 4af4: 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 *); 4af8: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4afc: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4b00: e58d2000 str r2, [sp] 4b04: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4b08: 1a000002 bne 4b18 rtems_set_errno_and_return_minus_one( EBADF ); 4b0c: eb002f8f bl 10950 <__errno> 4b10: e3a03009 mov r3, #9 4b14: ea000004 b 4b2c if ( !iop->handlers->ioctl_h ) 4b18: e5933010 ldr r3, [r3, #16] 4b1c: e3530000 cmp r3, #0 4b20: 1a000004 bne 4b38 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b24: eb002f89 bl 10950 <__errno> <== NOT EXECUTED 4b28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4b2c: e5803000 str r3, [r0] 4b30: e3e00000 mvn r0, #0 4b34: ea000002 b 4b44 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4b38: e59d1008 ldr r1, [sp, #8] 4b3c: e1a0e00f mov lr, pc 4b40: e12fff13 bx r3 return rc; } 4b44: e8bd4008 pop {r3, lr} 4b48: e28dd00c add sp, sp, #12 4b4c: e12fff1e bx lr 4b50: 0001c860 .word 0x0001c860 4b54: 0001e238 .word 0x0001e238 000028a0 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 28a0: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 28a4: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28a8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 28ac: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 28b0: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 28b4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28b8: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 28bc: 0a000007 beq 28e0 <== NOT EXECUTED c = tolower (c); 28c0: e59f2164 ldr r2, [pc, #356] ; 2a2c <== NOT EXECUTED 28c4: e5922000 ldr r2, [r2] <== NOT EXECUTED 28c8: e0822005 add r2, r2, r5 <== NOT EXECUTED 28cc: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 28d0: e2022003 and r2, r2, #3 <== NOT EXECUTED 28d4: e3520001 cmp r2, #1 <== NOT EXECUTED 28d8: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 28dc: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 28e0: e355000d cmp r5, #13 <== NOT EXECUTED 28e4: 1a000005 bne 2900 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 28e8: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 28ec: 1a00004c bne 2a24 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 28f0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 28f4: 03a0500d moveq r5, #13 <== NOT EXECUTED 28f8: 13a0500a movne r5, #10 <== NOT EXECUTED 28fc: ea000007 b 2920 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2900: e355000a cmp r5, #10 <== NOT EXECUTED 2904: 1a000003 bne 2918 <== NOT EXECUTED 2908: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 290c: 03a0500a moveq r5, #10 <== NOT EXECUTED 2910: 13a0500d movne r5, #13 <== NOT EXECUTED 2914: ea000001 b 2920 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2918: e3550000 cmp r5, #0 <== NOT EXECUTED 291c: 0a00002e beq 29dc <== NOT EXECUTED 2920: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2924: e3130002 tst r3, #2 <== NOT EXECUTED 2928: 0a00002b beq 29dc <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 292c: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 2930: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 2934: 01a00004 moveq r0, r4 <== NOT EXECUTED 2938: 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]) { 293c: 0a000004 beq 2954 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2940: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 2944: e1520005 cmp r2, r5 <== NOT EXECUTED 2948: 1a000003 bne 295c <== NOT EXECUTED erase (tty, 1); 294c: e1a00004 mov r0, r4 <== NOT EXECUTED 2950: e3a01001 mov r1, #1 <== NOT EXECUTED 2954: ebffff5e bl 26d4 <== NOT EXECUTED 2958: ea00002f b 2a1c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 295c: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 2960: e1520005 cmp r2, r5 <== NOT EXECUTED 2964: 0a00001a beq 29d4 <== NOT EXECUTED return 1; } else if (c == '\n') { 2968: e355000a cmp r5, #10 <== NOT EXECUTED 296c: 1a000009 bne 2998 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2970: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2974: 11a00005 movne r0, r5 <== NOT EXECUTED 2978: 11a01004 movne r1, r4 <== NOT EXECUTED 297c: 1bffff34 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2980: e284101c add r1, r4, #28 <== NOT EXECUTED 2984: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2988: e3a0000a mov r0, #10 <== NOT EXECUTED 298c: e2832001 add r2, r3, #1 <== NOT EXECUTED 2990: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 2994: ea00000d b 29d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 2998: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 299c: e1520005 cmp r2, r5 <== NOT EXECUTED 29a0: 0a000002 beq 29b0 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 29a4: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 29a8: e1520005 cmp r2, r5 <== NOT EXECUTED 29ac: 1a00000a bne 29dc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29b0: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29b4: 11a00005 movne r0, r5 <== NOT EXECUTED 29b8: 11a01004 movne r1, r4 <== NOT EXECUTED 29bc: 1bffff24 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 29c0: e284101c add r1, r4, #28 <== NOT EXECUTED 29c4: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 29c8: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 29cc: e2832001 add r2, r3, #1 <== NOT EXECUTED 29d0: e5842020 str r2, [r4, #32] <== NOT EXECUTED 29d4: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 29d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 29dc: e59f304c ldr r3, [pc, #76] ; 2a30 <== NOT EXECUTED 29e0: e5933000 ldr r3, [r3] <== NOT EXECUTED 29e4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 29e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 29ec: e1520003 cmp r2, r3 <== NOT EXECUTED 29f0: aa00000b bge 2a24 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29f4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 29f8: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29fc: 11a00005 movne r0, r5 <== NOT EXECUTED 2a00: 11a01004 movne r1, r4 <== NOT EXECUTED 2a04: 1bffff12 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a08: e284101c add r1, r4, #28 <== NOT EXECUTED 2a0c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2a10: e2832001 add r2, r3, #1 <== NOT EXECUTED 2a14: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 2a18: e5842020 str r2, [r4, #32] <== NOT EXECUTED 2a1c: e3a00000 mov r0, #0 <== NOT EXECUTED 2a20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a24: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 2a28: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a2c: 000171ec .word 0x000171ec 2a30: 00017174 .word 0x00017174 00020428 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 20428: e3a00000 mov r0, #0 <== NOT EXECUTED 2042c: e12fff1e bx lr <== NOT EXECUTED 00022a6c : int link( const char *existing, const char *new ) { 22a6c: e92d4030 push {r4, r5, lr} 22a70: e24dd030 sub sp, sp, #48 ; 0x30 22a74: e1a04001 mov r4, r1 22a78: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 22a7c: eb006edf bl 3e600 22a80: e3a0c001 mov ip, #1 22a84: e1a01000 mov r1, r0 22a88: e3a02000 mov r2, #0 22a8c: e1a00005 mov r0, r5 22a90: e28d3018 add r3, sp, #24 22a94: e58dc000 str ip, [sp] 22a98: ebff89a7 bl 513c 0, &existing_loc, true ); if ( result != 0 ) 22a9c: e3500000 cmp r0, #0 22aa0: 1a00002a bne 22b50 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 22aa4: e5d43000 ldrb r3, [r4] 22aa8: e353002f cmp r3, #47 ; 0x2f 22aac: 1353005c cmpne r3, #92 ; 0x5c 22ab0: 13a05000 movne r5, #0 22ab4: 03a05001 moveq r5, #1 22ab8: 0a000001 beq 22ac4 22abc: e3530000 cmp r3, #0 22ac0: 1a000009 bne 22aec 22ac4: e59f31ec ldr r3, [pc, #492] ; 22cb8 22ac8: e593e000 ldr lr, [r3] 22acc: e28ee018 add lr, lr, #24 22ad0: e8be000f ldm lr!, {r0, r1, r2, r3} 22ad4: e28dc004 add ip, sp, #4 22ad8: e8ac000f stmia ip!, {r0, r1, r2, r3} 22adc: e59e3000 ldr r3, [lr] 22ae0: e3a00001 mov r0, #1 22ae4: e58c3000 str r3, [ip] 22ae8: ea000008 b 22b10 22aec: e59f31c4 ldr r3, [pc, #452] ; 22cb8 22af0: e593e000 ldr lr, [r3] 22af4: e28ee004 add lr, lr, #4 22af8: e8be000f ldm lr!, {r0, r1, r2, r3} 22afc: e28dc004 add ip, sp, #4 22b00: e8ac000f stmia ip!, {r0, r1, r2, r3} 22b04: e59e3000 ldr r3, [lr] 22b08: e58c3000 str r3, [ip] 22b0c: e1a00005 mov r0, r5 if ( !parent_loc.ops->evalformake_h ) { 22b10: e59d3010 ldr r3, [sp, #16] 22b14: e5933004 ldr r3, [r3, #4] 22b18: e3530000 cmp r3, #0 22b1c: 1a00000d bne 22b58 rtems_filesystem_freenode( &existing_loc ); 22b20: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22b24: e3530000 cmp r3, #0 <== NOT EXECUTED 22b28: 0a000005 beq 22b44 <== NOT EXECUTED 22b2c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22b30: e3530000 cmp r3, #0 <== NOT EXECUTED 22b34: 0a000002 beq 22b44 <== NOT EXECUTED 22b38: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22b3c: e1a0e00f mov lr, pc <== NOT EXECUTED 22b40: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22b44: eb005433 bl 37c18 <__errno> <== NOT EXECUTED 22b48: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22b4c: e5803000 str r3, [r0] 22b50: e3e05000 mvn r5, #0 22b54: ea000054 b 22cac } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 22b58: e28d5004 add r5, sp, #4 22b5c: e0840000 add r0, r4, r0 22b60: e1a01005 mov r1, r5 22b64: e28d202c add r2, sp, #44 ; 0x2c 22b68: e1a0e00f mov lr, pc 22b6c: e12fff13 bx r3 if ( result != 0 ) { 22b70: e2504000 subs r4, r0, #0 22b74: 0a00000a beq 22ba4 rtems_filesystem_freenode( &existing_loc ); 22b78: e59d3024 ldr r3, [sp, #36] ; 0x24 22b7c: e3530000 cmp r3, #0 22b80: 0a000004 beq 22b98 22b84: e593301c ldr r3, [r3, #28] 22b88: e3530000 cmp r3, #0 22b8c: 128d0018 addne r0, sp, #24 22b90: 11a0e00f movne lr, pc 22b94: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 22b98: eb00541e bl 37c18 <__errno> 22b9c: e5804000 str r4, [r0] 22ba0: eaffffea b 22b50 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 22ba4: e59d3028 ldr r3, [sp, #40] ; 0x28 22ba8: e59d2014 ldr r2, [sp, #20] 22bac: e1520003 cmp r2, r3 22bb0: 0a000012 beq 22c00 rtems_filesystem_freenode( &existing_loc ); 22bb4: e59d3024 ldr r3, [sp, #36] ; 0x24 22bb8: e3530000 cmp r3, #0 22bbc: 0a000004 beq 22bd4 22bc0: e593301c ldr r3, [r3, #28] 22bc4: e3530000 cmp r3, #0 22bc8: 128d0018 addne r0, sp, #24 22bcc: 11a0e00f movne lr, pc 22bd0: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22bd4: e59d3010 ldr r3, [sp, #16] 22bd8: e3530000 cmp r3, #0 22bdc: 0a000004 beq 22bf4 22be0: e593301c ldr r3, [r3, #28] 22be4: e3530000 cmp r3, #0 22be8: 128d0004 addne r0, sp, #4 22bec: 11a0e00f movne lr, pc 22bf0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 22bf4: eb005407 bl 37c18 <__errno> 22bf8: e3a03012 mov r3, #18 22bfc: eaffffd2 b 22b4c } if ( !parent_loc.ops->link_h ) { 22c00: e59d3010 ldr r3, [sp, #16] 22c04: e5933008 ldr r3, [r3, #8] 22c08: e3530000 cmp r3, #0 22c0c: 1a00000f bne 22c50 rtems_filesystem_freenode( &existing_loc ); 22c10: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22c14: e3530000 cmp r3, #0 <== NOT EXECUTED 22c18: 0a000004 beq 22c30 <== NOT EXECUTED 22c1c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22c20: e3530000 cmp r3, #0 <== NOT EXECUTED 22c24: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22c28: 11a0e00f movne lr, pc <== NOT EXECUTED 22c2c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 22c30: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22c34: e3530000 cmp r3, #0 <== NOT EXECUTED 22c38: 0affffc1 beq 22b44 <== NOT EXECUTED 22c3c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22c40: e3530000 cmp r3, #0 <== NOT EXECUTED 22c44: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22c48: 1affffbb bne 22b3c <== NOT EXECUTED 22c4c: eaffffbc b 22b44 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22c50: e28d4018 add r4, sp, #24 22c54: e1a01005 mov r1, r5 22c58: e1a00004 mov r0, r4 22c5c: e59d202c ldr r2, [sp, #44] ; 0x2c 22c60: e1a0e00f mov lr, pc 22c64: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 22c68: e59d3024 ldr r3, [sp, #36] ; 0x24 22c6c: 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 ); 22c70: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 22c74: 0a000004 beq 22c8c 22c78: e593301c ldr r3, [r3, #28] 22c7c: e3530000 cmp r3, #0 22c80: 11a00004 movne r0, r4 22c84: 11a0e00f movne lr, pc 22c88: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22c8c: e59d3010 ldr r3, [sp, #16] 22c90: e3530000 cmp r3, #0 22c94: 0a000004 beq 22cac 22c98: e593301c ldr r3, [r3, #28] 22c9c: e3530000 cmp r3, #0 22ca0: 128d0004 addne r0, sp, #4 22ca4: 11a0e00f movne lr, pc 22ca8: 112fff13 bxne r3 return result; } 22cac: e1a00005 mov r0, r5 22cb0: e28dd030 add sp, sp, #48 ; 0x30 22cb4: e8bd8030 pop {r4, r5, pc} 22cb8: 00052008 .word 0x00052008 00016588 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 16588: e59fc0ec ldr ip, [pc, #236] ; 1667c 1658c: e59cc000 ldr ip, [ip] 16590: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 16594: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 16598: 2a000005 bcs 165b4 iop = rtems_libio_iop( fd ); 1659c: e59fc0dc ldr ip, [pc, #220] ; 16680 165a0: e59c4000 ldr r4, [ip] 165a4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 165a8: e5940014 ldr r0, [r4, #20] 165ac: e3100c01 tst r0, #256 ; 0x100 165b0: 1a000002 bne 165c0 165b4: ebffd3f9 bl b5a0 <__errno> 165b8: e3a03009 mov r3, #9 165bc: ea00001c b 16634 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 165c0: e594003c ldr r0, [r4, #60] ; 0x3c 165c4: e5900014 ldr r0, [r0, #20] 165c8: e3500000 cmp r0, #0 165cc: 1a000002 bne 165dc rtems_set_errno_and_return_minus_one( ENOTSUP ); 165d0: ebffd3f2 bl b5a0 <__errno> <== NOT EXECUTED 165d4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 165d8: ea000015 b 16634 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 165dc: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 165e0: e284600c add r6, r4, #12 165e4: e8960060 ldm r6, {r5, r6} switch ( whence ) { 165e8: 0a000006 beq 16608 165ec: e3530002 cmp r3, #2 165f0: 0a000007 beq 16614 165f4: e3530000 cmp r3, #0 165f8: 1a00000b bne 1662c case SEEK_SET: iop->offset = offset; 165fc: e584100c str r1, [r4, #12] 16600: e5842010 str r2, [r4, #16] break; 16604: ea00000e b 16644 case SEEK_CUR: iop->offset += offset; 16608: e091b005 adds fp, r1, r5 1660c: e0a2c006 adc ip, r2, r6 16610: ea000002 b 16620 break; case SEEK_END: iop->offset = iop->size + offset; 16614: e9941800 ldmib r4, {fp, ip} 16618: e09bb001 adds fp, fp, r1 1661c: e0acc002 adc ip, ip, r2 16620: e584b00c str fp, [r4, #12] 16624: e584c010 str ip, [r4, #16] break; 16628: ea000005 b 16644 default: rtems_set_errno_and_return_minus_one( EINVAL ); 1662c: ebffd3db bl b5a0 <__errno> 16630: e3a03016 mov r3, #22 16634: e5803000 str r3, [r0] 16638: e3e02000 mvn r2, #0 1663c: e3e03000 mvn r3, #0 16640: ea00000a b 16670 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 16644: e594c03c ldr ip, [r4, #60] ; 0x3c 16648: e1a00004 mov r0, r4 1664c: e1a0e00f mov lr, pc 16650: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 16654: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 16658: e1a02000 mov r2, r0 1665c: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 16660: 1a000002 bne 16670 16664: e3710001 cmn r1, #1 iop->offset = old_offset; 16668: 0584500c streq r5, [r4, #12] 1666c: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 16670: e1a01003 mov r1, r3 16674: e1a00002 mov r0, r2 16678: e8bd8870 pop {r4, r5, r6, fp, pc} 1667c: 00016ff0 .word 0x00016ff0 16680: 000185a8 .word 0x000185a8 00022dd8 : int _STAT_NAME( const char *path, struct stat *buf ) { 22dd8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22ddc: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 22de0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 22de4: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22de8: 1a000002 bne 22df8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 22dec: eb005389 bl 37c18 <__errno> <== NOT EXECUTED 22df0: e3a0300e mov r3, #14 <== NOT EXECUTED 22df4: ea000018 b 22e5c <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 22df8: eb006e00 bl 3e600 <== NOT EXECUTED 22dfc: e28d4004 add r4, sp, #4 <== NOT EXECUTED 22e00: e3a0c000 mov ip, #0 <== NOT EXECUTED 22e04: e1a01000 mov r1, r0 <== NOT EXECUTED 22e08: e1a0200c mov r2, ip <== NOT EXECUTED 22e0c: e1a00006 mov r0, r6 <== NOT EXECUTED 22e10: e1a03004 mov r3, r4 <== NOT EXECUTED 22e14: e58dc000 str ip, [sp] <== NOT EXECUTED 22e18: ebff88c7 bl 513c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 22e1c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22e20: 1a00000e bne 22e60 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 22e24: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22e28: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22e2c: e3530000 cmp r3, #0 <== NOT EXECUTED 22e30: 1a00000c bne 22e68 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e34: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22e38: e3530000 cmp r3, #0 <== NOT EXECUTED 22e3c: 0a000004 beq 22e54 <== NOT EXECUTED 22e40: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22e44: e3530000 cmp r3, #0 <== NOT EXECUTED 22e48: 11a00004 movne r0, r4 <== NOT EXECUTED 22e4c: 11a0e00f movne lr, pc <== NOT EXECUTED 22e50: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22e54: eb00536f bl 37c18 <__errno> <== NOT EXECUTED 22e58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22e5c: e5803000 str r3, [r0] <== NOT EXECUTED 22e60: e3e05000 mvn r5, #0 <== NOT EXECUTED 22e64: ea000010 b 22eac <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 22e68: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 22e6c: e1a00005 mov r0, r5 <== NOT EXECUTED 22e70: eb006020 bl 3aef8 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 22e74: e1a01005 mov r1, r5 <== NOT EXECUTED 22e78: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22e7c: e1a00004 mov r0, r4 <== NOT EXECUTED 22e80: e1a0e00f mov lr, pc <== NOT EXECUTED 22e84: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e88: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22e8c: 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 ); 22e90: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e94: 0a000004 beq 22eac <== NOT EXECUTED 22e98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22e9c: e3530000 cmp r3, #0 <== NOT EXECUTED 22ea0: 11a00004 movne r0, r4 <== NOT EXECUTED 22ea4: 11a0e00f movne lr, pc <== NOT EXECUTED 22ea8: 112fff13 bxne r3 <== NOT EXECUTED return status; } 22eac: e1a00005 mov r0, r5 <== NOT EXECUTED 22eb0: e28dd018 add sp, sp, #24 <== NOT EXECUTED 22eb4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00008bac : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8bac: e59f30d8 ldr r3, [pc, #216] ; 8c8c 8bb0: e5932004 ldr r2, [r3, #4] 8bb4: e2822001 add r2, r2, #1 8bb8: e92d4070 push {r4, r5, r6, lr} 8bbc: e5832004 str r2, [r3, #4] 8bc0: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8bc4: ebffffef bl 8b88 /* * Validate the parameters */ if ( !size ) 8bc8: e3540000 cmp r4, #0 8bcc: 0a00002b beq 8c80 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8bd0: e59f30b8 ldr r3, [pc, #184] ; 8c90 8bd4: e5933000 ldr r3, [r3] 8bd8: e3530003 cmp r3, #3 8bdc: 1a000002 bne 8bec 8be0: ebffffd1 bl 8b2c 8be4: e3500000 cmp r0, #0 8be8: 0a000024 beq 8c80 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8bec: e59f30a0 ldr r3, [pc, #160] ; 8c94 8bf0: e3a02000 mov r2, #0 8bf4: e5930000 ldr r0, [r3] 8bf8: e1a01004 mov r1, r4 8bfc: e1a03002 mov r3, r2 8c00: eb000324 bl 9898 <_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 ) { 8c04: 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; 8c08: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 8c0c: 1a00000c bne 8c44 if (rtems_malloc_sbrk_helpers) 8c10: e59f3080 ldr r3, [pc, #128] ; 8c98 8c14: e5933000 ldr r3, [r3] 8c18: e3530000 cmp r3, #0 8c1c: 0a000004 beq 8c34 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8c20: e1a00004 mov r0, r4 <== NOT EXECUTED 8c24: e1a0e00f mov lr, pc <== NOT EXECUTED 8c28: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 8c2c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8c30: 1a000003 bne 8c44 <== NOT EXECUTED errno = ENOMEM; 8c34: eb000a59 bl b5a0 <__errno> 8c38: e3a0300c mov r3, #12 8c3c: e5803000 str r3, [r0] return (void *) 0; 8c40: ea00000f b 8c84 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8c44: e59f3050 ldr r3, [pc, #80] ; 8c9c 8c48: e5933000 ldr r3, [r3] 8c4c: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 8c50: 11a01004 movne r1, r4 8c54: 11a00005 movne r0, r5 8c58: 11a0e00f movne lr, pc 8c5c: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8c60: e59f3038 ldr r3, [pc, #56] ; 8ca0 8c64: e5933000 ldr r3, [r3] 8c68: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8c6c: 11a00005 movne r0, r5 8c70: 11a0e00f movne lr, pc 8c74: 1593f004 ldrne pc, [r3, #4] 8c78: e1a06005 mov r6, r5 8c7c: ea000000 b 8c84 8c80: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8c84: e1a00006 mov r0, r6 8c88: e8bd8070 pop {r4, r5, r6, pc} 8c8c: 000185b4 .word 0x000185b4 8c90: 000188b0 .word 0x000188b0 8c94: 00016ffc .word 0x00016ffc 8c98: 0001840c .word 0x0001840c 8c9c: 00018410 .word 0x00018410 8ca0: 00018408 .word 0x00018408 00008b78 : } void malloc_deferred_free( void *pointer ) { 8b78: e1a01000 mov r1, r0 <== NOT EXECUTED 8b7c: e59f0000 ldr r0, [pc, #0] ; 8b84 <== NOT EXECUTED 8b80: eaffefee b 4b40 <_Chain_Append> <== NOT EXECUTED 8b84: 00018900 .word 0x00018900 00008b88 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8b88: 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) 8b8c: ea000000 b 8b94 free(to_be_freed); 8b90: ebfffec5 bl 86ac <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8b94: e59f000c ldr r0, [pc, #12] ; 8ba8 8b98: eb00019b bl 920c <_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) 8b9c: e3500000 cmp r0, #0 8ba0: 1afffffa bne 8b90 free(to_be_freed); } 8ba4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 8ba8: 00018900 .word 0x00018900 0000f41c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { f41c: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f420: 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 ) f424: e5943054 ldr r3, [r4, #84] ; 0x54 f428: e1530002 cmp r3, r2 f42c: ba000003 blt f440 f430: 1a000005 bne f44c f434: e5943050 ldr r3, [r4, #80] ; 0x50 f438: e1530001 cmp r3, r1 f43c: 2a000002 bcs f44c return IMFS_memfile_extend( the_jnode, length ); f440: e1a00004 mov r0, r4 <== NOT EXECUTED f444: ebffff9a bl f2b4 <== NOT EXECUTED f448: ea000008 b f470 <== 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; f44c: e5841050 str r1, [r4, #80] ; 0x50 f450: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; f454: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); f458: e3a01000 mov r1, #0 f45c: e1a0000d mov r0, sp f460: ebffccb0 bl 2728 f464: e59d3000 ldr r3, [sp] f468: e5843040 str r3, [r4, #64] ; 0x40 f46c: e3a00000 mov r0, #0 return 0; } f470: e8bd801c pop {r2, r3, r4, pc} 0000f474 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { f474: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f478: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { f47c: e595304c ldr r3, [r5, #76] ; 0x4c f480: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { f484: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { f488: 1a00000b bne f4bc if (iop->offset > the_jnode->info.linearfile.size) f48c: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED f490: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED f494: e1520003 cmp r2, r3 <== NOT EXECUTED f498: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED f49c: ca000003 bgt f4b0 <== NOT EXECUTED f4a0: 1a000014 bne f4f8 <== NOT EXECUTED f4a4: e590100c ldr r1, [r0, #12] <== NOT EXECUTED f4a8: e1510002 cmp r1, r2 <== NOT EXECUTED f4ac: 9a000011 bls f4f8 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; f4b0: e584200c str r2, [r4, #12] <== NOT EXECUTED f4b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED f4b8: ea00000e b f4f8 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) f4bc: e1a00005 mov r0, r5 f4c0: e284200c add r2, r4, #12 f4c4: e8920006 ldm r2, {r1, r2} f4c8: ebffff79 bl f2b4 f4cc: e3500000 cmp r0, #0 f4d0: 0a000005 beq f4ec rtems_set_errno_and_return_minus_one( ENOSPC ); f4d4: eb000424 bl 1056c <__errno> <== NOT EXECUTED f4d8: e3a0301c mov r3, #28 <== NOT EXECUTED f4dc: e5803000 str r3, [r0] <== NOT EXECUTED f4e0: e3e04000 mvn r4, #0 <== NOT EXECUTED f4e4: e3e03000 mvn r3, #0 <== NOT EXECUTED f4e8: ea000004 b f500 <== NOT EXECUTED iop->size = the_jnode->info.file.size; f4ec: e2853050 add r3, r5, #80 ; 0x50 f4f0: e893000c ldm r3, {r2, r3} f4f4: e984000c stmib r4, {r2, r3} } return iop->offset; f4f8: e284400c add r4, r4, #12 f4fc: e8940018 ldm r4, {r3, r4} } f500: e1a01004 mov r1, r4 f504: e1a00003 mov r0, r3 f508: e8bd8030 pop {r4, r5, pc} 0000f798 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) f798: e5903014 ldr r3, [r0, #20] f79c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { f7a0: e92d4031 push {r0, r4, r5, lr} f7a4: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f7a8: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) f7ac: 0a000017 beq f810 && (the_jnode->type == IMFS_LINEAR_FILE)) { f7b0: e594304c ldr r3, [r4, #76] ; 0x4c f7b4: e3530006 cmp r3, #6 f7b8: 1a000014 bne f810 uint32_t count = the_jnode->info.linearfile.size; f7bc: 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; f7c0: 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; f7c4: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; f7c8: e3a00000 mov r0, #0 <== NOT EXECUTED f7cc: 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) f7d0: 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; f7d4: 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; f7d8: 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; f7dc: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; f7e0: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED f7e4: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; f7e8: 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; f7ec: 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) f7f0: 0a000006 beq f810 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) f7f4: e1a02001 mov r2, r1 <== NOT EXECUTED f7f8: e1a01000 mov r1, r0 <== NOT EXECUTED f7fc: e1a00004 mov r0, r4 <== NOT EXECUTED f800: e58dc000 str ip, [sp] <== NOT EXECUTED f804: ebffff40 bl f50c <== 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) f808: e3700001 cmn r0, #1 <== NOT EXECUTED f80c: 0a000009 beq f838 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) f810: e5953014 ldr r3, [r5, #20] f814: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; f818: 12843050 addne r3, r4, #80 ; 0x50 f81c: 1893000c ldmne r3, {r2, r3} f820: 1585200c strne r2, [r5, #12] f824: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; f828: e2844050 add r4, r4, #80 ; 0x50 f82c: e8940018 ldm r4, {r3, r4} f830: e9850018 stmib r5, {r3, r4} f834: e3a00000 mov r0, #0 return 0; } f838: e8bd8038 pop {r3, r4, r5, pc} 00001504 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1504: 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) ) ) 1508: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 150c: e24dd01c sub sp, sp, #28 1510: e1a05001 mov r5, r1 1514: e1a06000 mov r6, r0 1518: e1a07002 mov r7, r2 151c: 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) ) ) 1520: 1a000002 bne 1530 rtems_set_errno_and_return_minus_one( EINVAL ); 1524: eb00281d bl b5a0 <__errno> <== NOT EXECUTED 1528: e3a03016 mov r3, #22 <== NOT EXECUTED 152c: ea000020 b 15b4 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1530: e5d03000 ldrb r3, [r0] 1534: e353002f cmp r3, #47 ; 0x2f 1538: 1353005c cmpne r3, #92 ; 0x5c 153c: 13a04000 movne r4, #0 1540: 03a04001 moveq r4, #1 1544: 0a000001 beq 1550 1548: e3530000 cmp r3, #0 154c: 1a000009 bne 1578 1550: e59f3100 ldr r3, [pc, #256] ; 1658 1554: e593e000 ldr lr, [r3] 1558: e28ee018 add lr, lr, #24 155c: e8be000f ldm lr!, {r0, r1, r2, r3} 1560: e28dc004 add ip, sp, #4 1564: e8ac000f stmia ip!, {r0, r1, r2, r3} 1568: e59e3000 ldr r3, [lr] 156c: e3a00001 mov r0, #1 1570: e58c3000 str r3, [ip] 1574: ea000008 b 159c 1578: e59f30d8 ldr r3, [pc, #216] ; 1658 157c: e593e000 ldr lr, [r3] 1580: e28ee004 add lr, lr, #4 1584: e8be000f ldm lr!, {r0, r1, r2, r3} 1588: e28dc004 add ip, sp, #4 158c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1590: e59e3000 ldr r3, [lr] 1594: e58c3000 str r3, [ip] 1598: e1a00004 mov r0, r4 if ( !temp_loc.ops->evalformake_h ) { 159c: e59d3010 ldr r3, [sp, #16] 15a0: e5933004 ldr r3, [r3, #4] 15a4: e3530000 cmp r3, #0 15a8: 1a000004 bne 15c0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 15ac: eb0027fb bl b5a0 <__errno> <== NOT EXECUTED 15b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 15b4: e5803000 str r3, [r0] <== NOT EXECUTED 15b8: e3e05000 mvn r5, #0 15bc: ea000022 b 164c } result = (*temp_loc.ops->evalformake_h)( 15c0: e28d4004 add r4, sp, #4 15c4: e0860000 add r0, r6, r0 15c8: e1a01004 mov r1, r4 15cc: e28d2018 add r2, sp, #24 15d0: e1a0e00f mov lr, pc 15d4: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 15d8: e3500000 cmp r0, #0 15dc: 1afffff5 bne 15b8 return -1; if ( !temp_loc.ops->mknod_h ) { 15e0: e59d3010 ldr r3, [sp, #16] 15e4: e593c014 ldr ip, [r3, #20] 15e8: e35c0000 cmp ip, #0 15ec: 1a000006 bne 160c rtems_filesystem_freenode( &temp_loc ); 15f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 15f4: e3530000 cmp r3, #0 <== NOT EXECUTED 15f8: 0affffeb beq 15ac <== NOT EXECUTED 15fc: e1a00004 mov r0, r4 <== NOT EXECUTED 1600: e1a0e00f mov lr, pc <== NOT EXECUTED 1604: e12fff13 bx r3 <== NOT EXECUTED 1608: eaffffe7 b 15ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 160c: e1a01005 mov r1, r5 1610: e1a03008 mov r3, r8 1614: e58d4000 str r4, [sp] 1618: e1a02007 mov r2, r7 161c: e59d0018 ldr r0, [sp, #24] 1620: e1a0e00f mov lr, pc 1624: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1628: e59d3010 ldr r3, [sp, #16] 162c: 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 ); 1630: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1634: 0a000004 beq 164c 1638: e593301c ldr r3, [r3, #28] 163c: e3530000 cmp r3, #0 1640: 11a00004 movne r0, r4 1644: 11a0e00f movne lr, pc 1648: 112fff13 bxne r3 return result; } 164c: e1a00005 mov r0, r5 1650: e28dd01c add sp, sp, #28 1654: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 1658: 00017188 .word 0x00017188 00001678 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1678: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 167c: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1680: e24dd018 sub sp, sp, #24 1684: e1a06000 mov r6, r0 1688: e1a09002 mov r9, r2 168c: e1a0b003 mov fp, r3 1690: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1694: 0a000001 beq 16a0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 1698: e3520001 cmp r2, #1 169c: 9a000002 bls 16ac options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 16a0: eb0027be bl b5a0 <__errno> 16a4: e3a03016 mov r3, #22 16a8: ea000014 b 1700 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 16ac: e5975024 ldr r5, [r7, #36] ; 0x24 16b0: e3550000 cmp r5, #0 16b4: 1a000004 bne 16cc errno = ENOTSUP; 16b8: eb0027b8 bl b5a0 <__errno> <== NOT EXECUTED 16bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16c0: e5803000 str r3, [r0] <== NOT EXECUTED 16c4: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 16c8: ea00006d b 1884 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 16cc: e3530000 cmp r3, #0 16d0: 03a0006c moveq r0, #108 ; 0x6c 16d4: 0a000002 beq 16e4 size += strlen( device ) + 1; 16d8: e1a00003 mov r0, r3 <== NOT EXECUTED 16dc: eb002ba0 bl c564 <== NOT EXECUTED 16e0: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 16e4: eb001d30 bl 8bac if ( !temp_mt_entry ) { 16e8: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 16ec: e1a04000 mov r4, r0 16f0: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 16f4: 1a000003 bne 1708 errno = ENOMEM; 16f8: eb0027a8 bl b5a0 <__errno> <== NOT EXECUTED 16fc: e3a0300c mov r3, #12 <== NOT EXECUTED 1700: e5803000 str r3, [r0] 1704: ea00006a b 18b4 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 1708: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 170c: 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; 1710: 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; 1714: 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 ); 1718: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 171c: 11a00003 movne r0, r3 1720: 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 = 1724: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 1728: 1b002b51 blne c474 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 172c: e35a0000 cmp sl, #0 1730: 0a000035 beq 180c if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1734: e1a0000a mov r0, sl 1738: eb002b89 bl c564 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 173c: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1740: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1744: e3a0c001 mov ip, #1 1748: e1a0000a mov r0, sl 174c: e3a02007 mov r2, #7 1750: e1a03005 mov r3, r5 1754: e58dc000 str ip, [sp] 1758: ebfffec9 bl 1284 175c: e3700001 cmn r0, #1 1760: 0a000046 beq 1880 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1764: e59d3010 ldr r3, [sp, #16] 1768: e5933010 ldr r3, [r3, #16] 176c: e3530000 cmp r3, #0 1770: 1a000002 bne 1780 errno = ENOTSUP; 1774: eb002789 bl b5a0 <__errno> <== NOT EXECUTED 1778: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 177c: ea000006 b 179c <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1780: e1a00005 mov r0, r5 1784: e1a0e00f mov lr, pc 1788: e12fff13 bx r3 178c: e3500001 cmp r0, #1 1790: 0a000003 beq 17a4 errno = ENOTDIR; 1794: eb002781 bl b5a0 <__errno> 1798: e3a03014 mov r3, #20 179c: e5803000 str r3, [r0] goto cleanup_and_bail; 17a0: ea000037 b 1884 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17a4: e59f2140 ldr r2, [pc, #320] ; 18ec !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 ) 17a8: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17ac: e4923004 ldr r3, [r2], #4 17b0: ea000003 b 17c4 !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 ) 17b4: e593001c ldr r0, [r3, #28] 17b8: e1500001 cmp r0, r1 17bc: 0a000003 beq 17d0 * 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 ) { 17c0: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 17c4: e1530002 cmp r3, r2 17c8: 1afffff9 bne 17b4 17cc: ea00003b b 18c0 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 17d0: eb002772 bl b5a0 <__errno> 17d4: e3a03010 mov r3, #16 17d8: ea000001 b 17e4 * 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; 17dc: eb00276f bl b5a0 <__errno> <== NOT EXECUTED 17e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17e4: e5803000 str r3, [r0] 17e8: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 17ec: ea000024 b 1884 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 17f0: e1a00004 mov r0, r4 17f4: e1a0e00f mov lr, pc 17f8: e12fff13 bx r3 17fc: e3500000 cmp r0, #0 1800: e28d5004 add r5, sp, #4 1804: 0a000008 beq 182c 1808: ea00001d b 1884 <== 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; 180c: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 1810: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 1814: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 1818: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 181c: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 1820: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 1824: e584a018 str sl, [r4, #24] 1828: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 182c: e1a00004 mov r0, r4 1830: e1a0e00f mov lr, pc 1834: e597f024 ldr pc, [r7, #36] ; 0x24 1838: e2507000 subs r7, r0, #0 183c: 0a000007 beq 1860 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 1840: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1844: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 1848: e3530000 cmp r3, #0 <== NOT EXECUTED 184c: 0a00000c beq 1884 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1850: e1a00004 mov r0, r4 <== NOT EXECUTED 1854: e1a0e00f mov lr, pc <== NOT EXECUTED 1858: e12fff13 bx r3 <== NOT EXECUTED 185c: ea000008 b 1884 <== 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 ); 1860: e59f0084 ldr r0, [pc, #132] ; 18ec 1864: e1a01004 mov r1, r4 1868: eb000cb4 bl 4b40 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 186c: e3560000 cmp r6, #0 1870: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 1874: 15864000 strne r4, [r6] 1878: 11a00007 movne r0, r7 187c: ea00000d b 18b8 1880: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1884: e1a00008 mov r0, r8 1888: eb001b87 bl 86ac if ( loc_to_free ) 188c: e3550000 cmp r5, #0 1890: 0a000007 beq 18b4 rtems_filesystem_freenode( loc_to_free ); 1894: e595300c ldr r3, [r5, #12] 1898: e3530000 cmp r3, #0 189c: 0a000004 beq 18b4 18a0: e593301c ldr r3, [r3, #28] 18a4: e3530000 cmp r3, #0 18a8: 11a00005 movne r0, r5 18ac: 11a0e00f movne lr, pc 18b0: 112fff13 bxne r3 18b4: e3e00000 mvn r0, #0 return -1; } 18b8: e28dd018 add sp, sp, #24 18bc: 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; 18c0: 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; 18c4: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 18c8: 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 ){ 18cc: 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; 18d0: 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; 18d4: 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 ){ 18d8: 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; 18dc: 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; 18e0: 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 ){ 18e4: 1affffc1 bne 17f0 18e8: eaffffbb b 17dc <== NOT EXECUTED 18ec: 000185e0 .word 0x000185e0 00001960 : */ int newlib_free_buffers( FILE *fp ) { 1960: e92d4010 push {r4, lr} 1964: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1968: eb00280b bl b99c 196c: e3500002 cmp r0, #2 1970: 8a00000b bhi 19a4 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1974: e1d430bc ldrh r3, [r4, #12] 1978: e3130080 tst r3, #128 ; 0x80 197c: 0a00000a beq 19ac free( fp->_bf._base ); 1980: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 1984: eb001b48 bl 86ac <== NOT EXECUTED fp->_flags &= ~__SMBF; 1988: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 198c: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1990: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1994: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1998: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 199c: e5843000 str r3, [r4] <== NOT EXECUTED 19a0: ea000001 b 19ac <== NOT EXECUTED } break; default: fclose(fp); 19a4: e1a00004 mov r0, r4 <== NOT EXECUTED 19a8: eb002749 bl b6d4 <== NOT EXECUTED } return 0; } 19ac: e3a00000 mov r0, #0 19b0: e8bd8010 pop {r4, pc} 00001bd4 : int open( const char *pathname, int flags, ... ) { 1bd4: e92d000e push {r1, r2, r3} 1bd8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1bdc: e24dd01c sub sp, sp, #28 1be0: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1be4: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 1be8: e2138001 ands r8, r3, #1 1bec: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1bf0: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1bf4: 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; 1bf8: 13888002 orrne r8, r8, #2 int open( const char *pathname, int flags, ... ) { 1bfc: e1a06000 mov r6, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1c00: e58d3018 str r3, [sp, #24] 1c04: 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(); 1c08: eb001b8d bl 8a44 if ( iop == 0 ) { 1c0c: e2504000 subs r4, r0, #0 1c10: 03a05017 moveq r5, #23 1c14: 0a000077 beq 1df8 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 1c18: e1a00006 mov r0, r6 1c1c: eb002a50 bl c564 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c20: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 1c24: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c28: e1a02008 mov r2, r8 1c2c: e1a00006 mov r0, r6 1c30: e3a08001 mov r8, #1 1c34: e1a03007 mov r3, r7 1c38: e58d8000 str r8, [sp] 1c3c: ebfffd90 bl 1284 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1c40: e3700001 cmn r0, #1 1c44: 1a00001f bne 1cc8 if ( errno != ENOENT ) { 1c48: eb002654 bl b5a0 <__errno> 1c4c: e5903000 ldr r3, [r0] 1c50: e3530002 cmp r3, #2 1c54: 1a00000a bne 1c84 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c58: e215ac02 ands sl, r5, #512 ; 0x200 1c5c: 01a0700a moveq r7, sl 1c60: 01a05003 moveq r5, r3 1c64: 0a000056 beq 1dc4 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c68: e1a00006 mov r0, r6 1c6c: e3891902 orr r1, r9, #32768 ; 0x8000 1c70: e3a02000 mov r2, #0 1c74: e3a03000 mov r3, #0 1c78: ebfffe21 bl 1504 if ( rc ) { 1c7c: e250a000 subs sl, r0, #0 1c80: 0a000003 beq 1c94 rc = errno; 1c84: eb002645 bl b5a0 <__errno> 1c88: e3a07000 mov r7, #0 1c8c: e5905000 ldr r5, [r0] goto done; 1c90: ea000049 b 1dbc } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1c94: e1a00006 mov r0, r6 1c98: eb002a31 bl c564 1c9c: e1a03007 mov r3, r7 1ca0: e1a01000 mov r1, r0 1ca4: e1a0200a mov r2, sl 1ca8: e1a00006 mov r0, r6 1cac: e58d8000 str r8, [sp] 1cb0: ebfffd73 bl 1284 if ( status != 0 ) { /* The file did not exist */ 1cb4: e3500000 cmp r0, #0 1cb8: 11a0700a movne r7, sl 1cbc: 13a0500d movne r5, #13 1cc0: 1a00003f bne 1dc4 1cc4: ea000003 b 1cd8 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1cc8: e2053c0a and r3, r5, #2560 ; 0xa00 1ccc: e3530c0a cmp r3, #2560 ; 0xa00 1cd0: 03a05011 moveq r5, #17 1cd4: 0a00003a beq 1dc4 * 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; 1cd8: e28d701c add r7, sp, #28 1cdc: e5373018 ldr r3, [r7, #-24]! 1ce0: 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; 1ce4: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1ce8: e1a00005 mov r0, r5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1cec: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cf0: e5948014 ldr r8, [r4, #20] 1cf4: eb001b7f bl 8af8 1cf8: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 1cfc: e8b7000f ldm r7!, {r0, r1, r2, r3} 1d00: e284c018 add ip, r4, #24 1d04: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 1d08: 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; 1d0c: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 1d10: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1d14: 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 ); 1d18: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 1d1c: 0a000041 beq 1e28 1d20: e593c000 ldr ip, [r3] 1d24: e35c0000 cmp ip, #0 1d28: 0a00003e beq 1e28 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1d2c: e1a01006 mov r1, r6 1d30: e1a03009 mov r3, r9 1d34: e1a00004 mov r0, r4 1d38: e1a02005 mov r2, r5 1d3c: e1a0e00f mov lr, pc 1d40: e12fff1c bx ip if ( rc ) { 1d44: e3500000 cmp r0, #0 1d48: 0a000003 beq 1d5c rc = errno; 1d4c: eb002613 bl b5a0 <__errno> 1d50: e28d7004 add r7, sp, #4 1d54: e5905000 ldr r5, [r0] goto done; 1d58: ea000017 b 1dbc /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1d5c: e3150b01 tst r5, #1024 ; 0x400 1d60: 0a000028 beq 1e08 rc = ftruncate( iop - rtems_libio_iops, 0 ); 1d64: e59f30c8 ldr r3, [pc, #200] ; 1e34 1d68: e5930000 ldr r0, [r3] 1d6c: e0600004 rsb r0, r0, r4 1d70: e1a00340 asr r0, r0, #6 1d74: e3a01000 mov r1, #0 1d78: e3a02000 mov r2, #0 1d7c: eb001a73 bl 8750 if ( rc ) { 1d80: e2505000 subs r5, r0, #0 1d84: 0a00001f beq 1e08 if(errno) rc = errno; 1d88: eb002604 bl b5a0 <__errno> <== NOT EXECUTED 1d8c: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d90: e3530000 cmp r3, #0 <== NOT EXECUTED 1d94: 0a000001 beq 1da0 <== NOT EXECUTED 1d98: eb002600 bl b5a0 <__errno> <== NOT EXECUTED 1d9c: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 1da0: e59f308c ldr r3, [pc, #140] ; 1e34 <== NOT EXECUTED 1da4: e5933000 ldr r3, [r3] <== NOT EXECUTED 1da8: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 1dac: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 1db0: eb001a14 bl 8608 <== NOT EXECUTED 1db4: e3a04000 mov r4, #0 <== NOT EXECUTED 1db8: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1dbc: e3550000 cmp r5, #0 1dc0: 0a000010 beq 1e08 if ( iop ) 1dc4: e3540000 cmp r4, #0 rtems_libio_free( iop ); 1dc8: 11a00004 movne r0, r4 1dcc: 1b001b05 blne 89e8 if ( loc_to_free ) 1dd0: e3570000 cmp r7, #0 1dd4: 0a000007 beq 1df8 rtems_filesystem_freenode( loc_to_free ); 1dd8: e597300c ldr r3, [r7, #12] 1ddc: e3530000 cmp r3, #0 1de0: 0a000004 beq 1df8 1de4: e593301c ldr r3, [r3, #28] 1de8: e3530000 cmp r3, #0 1dec: 11a00007 movne r0, r7 1df0: 11a0e00f movne lr, pc 1df4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1df8: eb0025e8 bl b5a0 <__errno> 1dfc: e5805000 str r5, [r0] 1e00: e3e00000 mvn r0, #0 1e04: ea000003 b 1e18 } return iop - rtems_libio_iops; 1e08: e59f3024 ldr r3, [pc, #36] ; 1e34 1e0c: e5930000 ldr r0, [r3] 1e10: e0604004 rsb r4, r0, r4 1e14: e1a00344 asr r0, r4, #6 } 1e18: e28dd01c add sp, sp, #28 1e1c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1e20: e28dd00c add sp, sp, #12 1e24: 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; 1e28: e28d7004 add r7, sp, #4 <== NOT EXECUTED 1e2c: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 1e30: eaffffe3 b 1dc4 <== NOT EXECUTED 1e34: 000185a8 .word 0x000185a8 00001b70 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1b70: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1b74: 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) { 1b78: e59f0048 ldr r0, [pc, #72] ; 1bc8 1b7c: e1a02001 mov r2, r1 1b80: eb000013 bl 1bd4 1b84: e3700001 cmn r0, #1 1b88: 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) 1b8c: e59f0034 ldr r0, [pc, #52] ; 1bc8 1b90: e3a01001 mov r1, #1 1b94: e3a02000 mov r2, #0 1b98: eb00000d bl 1bd4 1b9c: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 1ba0: 059f0024 ldreq r0, [pc, #36] ; 1bcc /* * 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) 1ba4: 0a000006 beq 1bc4 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1ba8: e59f0018 ldr r0, [pc, #24] ; 1bc8 1bac: e3a01001 mov r1, #1 1bb0: e3a02000 mov r2, #0 1bb4: eb000006 bl 1bd4 1bb8: e3700001 cmn r0, #1 1bbc: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 1bc0: e59f0008 ldr r0, [pc, #8] ; 1bd0 <== NOT EXECUTED 1bc4: eb000b35 bl 48a0 <== NOT EXECUTED 1bc8: 00017eeb .word 0x00017eeb 1bcc: 55544431 .word 0x55544431 1bd0: 55544432 .word 0x55544432 000024fc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 24fc: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2500: e5913034 ldr r3, [r1, #52] ; 0x34 2504: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2508: e1a04001 mov r4, r1 250c: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2510: 0a000047 beq 2634 switch (c) { 2514: e5dd2000 ldrb r2, [sp] 2518: e2421008 sub r1, r2, #8 251c: e3510005 cmp r1, #5 2520: 979ff101 ldrls pc, [pc, r1, lsl #2] 2524: ea00002e b 25e4 2528: 000025d0 .word 0x000025d0 <== NOT EXECUTED 252c: 000025a4 .word 0x000025a4 <== NOT EXECUTED 2530: 00002540 .word 0x00002540 <== NOT EXECUTED 2534: 000025e4 .word 0x000025e4 <== NOT EXECUTED 2538: 000025e4 .word 0x000025e4 <== NOT EXECUTED 253c: 0000256c .word 0x0000256c <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2540: e3130020 tst r3, #32 tty->column = 0; 2544: 13a03000 movne r3, #0 2548: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 254c: e5943034 ldr r3, [r4, #52] ; 0x34 2550: e3130004 tst r3, #4 2554: 0a000036 beq 2634 rtems_termios_puts ("\r", 1, tty); 2558: e59f00e8 ldr r0, [pc, #232] ; 2648 255c: e3a01001 mov r1, #1 2560: e1a02004 mov r2, r4 2564: ebffffa0 bl 23ec 2568: ea00000b b 259c tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 256c: e3130010 tst r3, #16 <== NOT EXECUTED 2570: 0a000002 beq 2580 <== NOT EXECUTED 2574: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2578: e3520000 cmp r2, #0 <== NOT EXECUTED 257c: 0a000030 beq 2644 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2580: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 2584: 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) { 2588: 0a000029 beq 2634 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 258c: 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'; 2590: e3a0300a mov r3, #10 <== NOT EXECUTED 2594: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2598: 0a000025 beq 2634 <== NOT EXECUTED tty->column = 0; 259c: e3a03000 mov r3, #0 25a0: ea000022 b 2630 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25a4: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25a8: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25ac: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25b0: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b4: e2611008 rsb r1, r1, #8 25b8: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25bc: 1a00001b bne 2630 tty->column += i; 25c0: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 25c4: e1a02004 mov r2, r4 25c8: e59f007c ldr r0, [pc, #124] ; 264c 25cc: ea00001b b 2640 } tty->column += i; break; case '\b': if (tty->column > 0) 25d0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 25d4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 25d8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 25dc: ca000013 bgt 2630 <== NOT EXECUTED 25e0: ea000013 b 2634 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 25e4: e3130002 tst r3, #2 25e8: 0a000007 beq 260c c = toupper(c); 25ec: e59f305c ldr r3, [pc, #92] ; 2650 <== NOT EXECUTED 25f0: e5933000 ldr r3, [r3] <== NOT EXECUTED 25f4: e0833002 add r3, r3, r2 <== NOT EXECUTED 25f8: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 25fc: e2033003 and r3, r3, #3 <== NOT EXECUTED 2600: e3530002 cmp r3, #2 <== NOT EXECUTED 2604: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 2608: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 260c: e59f303c ldr r3, [pc, #60] ; 2650 2610: e5932000 ldr r2, [r3] 2614: e5dd3000 ldrb r3, [sp] 2618: e0823003 add r3, r2, r3 261c: e5d33001 ldrb r3, [r3, #1] 2620: e3130020 tst r3, #32 2624: 1a000002 bne 2634 tty->column++; 2628: e5943028 ldr r3, [r4, #40] ; 0x28 262c: e2833001 add r3, r3, #1 2630: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2634: e1a02004 mov r2, r4 2638: e1a0000d mov r0, sp 263c: e3a01001 mov r1, #1 2640: ebffff69 bl 23ec } 2644: e8bd8018 pop {r3, r4, pc} 2648: 0001805b .word 0x0001805b 264c: 00017f2c .word 0x00017f2c 2650: 000171ec .word 0x000171ec 0000b0c4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { b0c4: e92d4070 push {r4, r5, r6, lr} b0c8: 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) b0cc: e28d5004 add r5, sp, #4 b0d0: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { b0d4: 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) b0d8: e3a01003 mov r1, #3 b0dc: e59f0140 ldr r0, [pc, #320] ; b224 b0e0: e3a02007 mov r2, #7 b0e4: e1a03005 mov r3, r5 b0e8: e58dc000 str ip, [sp] b0ec: ebffd864 bl 1284 b0f0: e3500000 cmp r0, #0 b0f4: 0a000009 beq b120 != 0) { if (errno != ENOENT) b0f8: eb000128 bl b5a0 <__errno> b0fc: e5903000 ldr r3, [r0] b100: e3530002 cmp r3, #2 b104: 1a000043 bne b218 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) b108: e59f0114 ldr r0, [pc, #276] ; b224 b10c: e59f1114 ldr r1, [pc, #276] ; b228 b110: ebffd8f7 bl 14f4 b114: e3500000 cmp r0, #0 b118: 0a000008 beq b140 b11c: ea00003d b b218 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); b120: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED b124: e3530000 cmp r3, #0 <== NOT EXECUTED b128: 0a000004 beq b140 <== NOT EXECUTED b12c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b130: e3530000 cmp r3, #0 <== NOT EXECUTED b134: 11a00005 movne r0, r5 <== NOT EXECUTED b138: 11a0e00f movne lr, pc <== NOT EXECUTED b13c: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); b140: e28d5018 add r5, sp, #24 b144: e59f10e0 ldr r1, [pc, #224] ; b22c b148: e3a0200a mov r2, #10 b14c: e1a00005 mov r0, r5 b150: eb000320 bl bdd8 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); b154: e59f30d4 ldr r3, [pc, #212] ; b230 b158: e1d3c0b0 ldrh ip, [r3] b15c: e1a0200c mov r2, ip b160: e28cc001 add ip, ip, #1 b164: e59f10c8 ldr r1, [pc, #200] ; b234 b168: e1c3c0b0 strh ip, [r3] b16c: e285000a add r0, r5, #10 b170: eb0003be bl c070 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { b174: e1a00005 mov r0, r5 b178: e3a01d06 mov r1, #384 ; 0x180 b17c: eb00003f bl b280 b180: e2506000 subs r6, r0, #0 b184: 0a000001 beq b190 if (errno != EEXIST){ b188: eb000104 bl b5a0 <__errno> <== NOT EXECUTED b18c: ea000021 b b218 <== 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); b190: e1a00005 mov r0, r5 b194: e3a01901 mov r1, #16384 ; 0x4000 b198: ebffda8d bl 1bd4 if (filsdes[0] < 0) { b19c: 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); b1a0: e5840000 str r0, [r4] if (filsdes[0] < 0) { b1a4: aa000003 bge b1b8 err = errno; b1a8: eb0000fc bl b5a0 <__errno> b1ac: 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); b1b0: e1a00005 mov r0, r5 b1b4: ea000014 b b20c } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); b1b8: e59f3078 ldr r3, [pc, #120] ; b238 <== NOT EXECUTED b1bc: e5933000 ldr r3, [r3] <== NOT EXECUTED b1c0: e1500003 cmp r0, r3 <== NOT EXECUTED b1c4: 359f3070 ldrcc r3, [pc, #112] ; b23c <== NOT EXECUTED b1c8: 35936000 ldrcc r6, [r3] <== NOT EXECUTED b1cc: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; b1d0: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED b1d4: e3c33001 bic r3, r3, #1 <== NOT EXECUTED b1d8: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); b1dc: e28d0018 add r0, sp, #24 <== NOT EXECUTED b1e0: e3a01001 mov r1, #1 <== NOT EXECUTED b1e4: ebffda7a bl 1bd4 <== NOT EXECUTED if (filsdes[1] < 0) { b1e8: 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); b1ec: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { b1f0: a3a06000 movge r6, #0 <== NOT EXECUTED b1f4: aa000003 bge b208 <== NOT EXECUTED err = errno; b1f8: eb0000e8 bl b5a0 <__errno> <== NOT EXECUTED b1fc: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); b200: e5940000 ldr r0, [r4] <== NOT EXECUTED b204: ebfff4ff bl 8608 <== NOT EXECUTED } unlink(fifopath); b208: e28d0018 add r0, sp, #24 <== NOT EXECUTED b20c: eb00001f bl b290 } rtems_set_errno_and_return_minus_one(err); b210: eb0000e2 bl b5a0 <__errno> b214: e5806000 str r6, [r0] } b218: e3e00000 mvn r0, #0 b21c: e28dd028 add sp, sp, #40 ; 0x28 b220: e8bd8070 pop {r4, r5, r6, pc} b224: 000181a4 .word 0x000181a4 b228: 000003ff .word 0x000003ff b22c: 000181a9 .word 0x000181a9 b230: 0001852a .word 0x0001852a b234: 000181b4 .word 0x000181b4 b238: 00016ff0 .word 0x00016ff0 b23c: 000185a8 .word 0x000185a8 0000a284 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { a284: e92d4010 push {r4, lr} <== NOT EXECUTED a288: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); a28c: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED a290: eb000202 bl aaa0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); a294: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a298: eb000200 bl aaa0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); a29c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a2a0: ebffe7c4 bl 41b8 <== NOT EXECUTED free(pipe->Buffer); a2a4: e5940000 ldr r0, [r4] <== NOT EXECUTED a2a8: ebfff8ff bl 86ac <== NOT EXECUTED free(pipe); a2ac: e1a00004 mov r0, r4 <== NOT EXECUTED } a2b0: 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); a2b4: eafff8fc b 86ac <== NOT EXECUTED 00009f24 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 9f24: e59f3054 ldr r3, [pc, #84] ; 9f80 <== NOT EXECUTED 9f28: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 9f2c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 9f30: e1a04000 mov r4, r0 <== NOT EXECUTED 9f34: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { 9f38: 13e00015 mvnne r0, #21 <== NOT EXECUTED 9f3c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) 9f40: e3520000 cmp r2, #0 <== NOT EXECUTED 9f44: 03e0000d mvneq r0, #13 <== NOT EXECUTED 9f48: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 9f4c: e3a01000 mov r1, #0 <== NOT EXECUTED 9f50: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 9f54: e1a02001 mov r2, r1 <== NOT EXECUTED 9f58: ebffe8bd bl 4254 <== NOT EXECUTED 9f5c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 9f60: 13e00003 mvnne r0, #3 <== NOT EXECUTED 9f64: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 9f68: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); 9f6c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 9f70: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); 9f74: ebffe8fc bl 436c <== NOT EXECUTED 9f78: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } 9f7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 9f80: 4004667f .word 0x4004667f 00009ebc : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 9ebc: e3e0001c mvn r0, #28 <== NOT EXECUTED 9ec0: e12fff1e bx lr <== NOT EXECUTED 0000a114 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a114: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a118: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a11c: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a120: e1a04000 mov r4, r0 <== NOT EXECUTED a124: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a128: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a12c: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a130: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a134: ebffe846 bl 4254 <== NOT EXECUTED a138: e2506000 subs r6, r0, #0 <== NOT EXECUTED a13c: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a140: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a144: 0a000045 beq a260 <== NOT EXECUTED a148: ea00004b b a27c <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a14c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a150: e3530000 cmp r3, #0 <== NOT EXECUTED a154: 0a000043 beq a268 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { a158: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED a15c: e2177001 ands r7, r7, #1 <== NOT EXECUTED a160: 13e0700a mvnne r7, #10 <== NOT EXECUTED a164: 1a000040 bne a26c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a168: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a16c: e2833001 add r3, r3, #1 <== NOT EXECUTED a170: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); a174: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a178: ebffe87b bl 436c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a17c: e1a01007 mov r1, r7 <== NOT EXECUTED a180: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a184: eb000273 bl ab58 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a188: e1a01007 mov r1, r7 <== NOT EXECUTED a18c: 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)) a190: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a194: 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)) a198: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a19c: ebffe82c bl 4254 <== NOT EXECUTED a1a0: e3500000 cmp r0, #0 <== NOT EXECUTED a1a4: 13e07003 mvnne r7, #3 <== NOT EXECUTED a1a8: 1a000031 bne a274 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a1ac: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a1b0: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a1b4: e2433001 sub r3, r3, #1 <== NOT EXECUTED a1b8: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a1bc: 1a00002a bne a26c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a1c0: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a1c4: e3520000 cmp r2, #0 <== NOT EXECUTED a1c8: 0affffdf beq a14c <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; a1cc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a1d0: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a1d4: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a1d8: e1520007 cmp r2, r7 <== NOT EXECUTED a1dc: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; a1e0: e0638008 rsb r8, r3, r8 <== NOT EXECUTED a1e4: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { a1e8: e1570008 cmp r7, r8 <== NOT EXECUTED a1ec: 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); a1f0: d0811003 addle r1, r1, r3 <== NOT EXECUTED a1f4: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { a1f8: da000006 ble a218 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); a1fc: e0811003 add r1, r1, r3 <== NOT EXECUTED a200: e1a02008 mov r2, r8 <== NOT EXECUTED a204: eb0006f3 bl bdd8 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); a208: e0860008 add r0, r6, r8 <== NOT EXECUTED a20c: e5941000 ldr r1, [r4] <== NOT EXECUTED a210: e0890000 add r0, r9, r0 <== NOT EXECUTED a214: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); a218: eb0006ee bl bdd8 <== NOT EXECUTED pipe->Start += chunk; a21c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a220: e0870000 add r0, r7, r0 <== NOT EXECUTED a224: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; a228: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED a22c: eb002ae2 bl 14dbc <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; a230: e594300c ldr r3, [r4, #12] <== NOT EXECUTED a234: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) a238: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; a23c: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; a240: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; a244: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) a248: e594301c ldr r3, [r4, #28] <== NOT EXECUTED a24c: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a250: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED a254: 11a0100d movne r1, sp <== NOT EXECUTED a258: 1b000228 blne ab00 <== NOT EXECUTED read += chunk; a25c: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { a260: e1560005 cmp r6, r5 <== NOT EXECUTED a264: 3affffd5 bcc a1c0 <== NOT EXECUTED a268: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); a26c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a270: ebffe83d bl 436c <== NOT EXECUTED out_nolock: if (read > 0) a274: e3560000 cmp r6, #0 <== NOT EXECUTED a278: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } a27c: e1a00006 mov r0, r6 <== NOT EXECUTED a280: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000a2b8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2b8: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; a2bc: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2c0: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, a2c4: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2c8: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, a2cc: e1a02001 mov r2, r1 <== NOT EXECUTED a2d0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a2d4: ebffe7de bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) a2d8: e3500000 cmp r0, #0 <== NOT EXECUTED a2dc: 1a000010 bne a324 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); a2e0: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) a2e4: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; a2e8: 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); a2ec: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; a2f0: 12433001 subne r3, r3, #1 <== NOT EXECUTED a2f4: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) a2f8: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; a2fc: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED a300: 12433001 subne r3, r3, #1 <== NOT EXECUTED a304: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, a308: e59f30a0 ldr r3, [pc, #160] ; a3b0 <== NOT EXECUTED a30c: e3a01000 mov r1, #0 <== NOT EXECUTED a310: e5930000 ldr r0, [r3] <== NOT EXECUTED a314: e1a02001 mov r2, r1 <== NOT EXECUTED a318: ebffe7cd bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) a31c: e3500000 cmp r0, #0 <== NOT EXECUTED a320: 0a000000 beq a328 <== NOT EXECUTED rtems_fatal_error_occurred(sc); a324: ebffe95d bl 48a0 <== NOT EXECUTED PIPE_UNLOCK(pipe); a328: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a32c: ebffe80e bl 436c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { a330: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a334: e3530000 cmp r3, #0 <== NOT EXECUTED a338: 1a000006 bne a358 <== NOT EXECUTED a33c: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED a340: e3570000 cmp r7, #0 <== NOT EXECUTED a344: 1a000003 bne a358 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); a348: e1a00004 mov r0, r4 <== NOT EXECUTED a34c: ebffffcc bl a284 <== NOT EXECUTED *pipep = NULL; a350: 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) { a354: ea000010 b a39c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) a358: e2552004 subs r2, r5, #4 <== NOT EXECUTED a35c: 13a02001 movne r2, #1 <== NOT EXECUTED a360: e3530000 cmp r3, #0 <== NOT EXECUTED a364: 13a02000 movne r2, #0 <== NOT EXECUTED a368: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); a36c: 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) a370: 1a000007 bne a394 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) a374: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED a378: e2553002 subs r3, r5, #2 <== NOT EXECUTED a37c: 13a03001 movne r3, #1 <== NOT EXECUTED a380: e3520000 cmp r2, #0 <== NOT EXECUTED a384: 13a03000 movne r3, #0 <== NOT EXECUTED a388: e3530000 cmp r3, #0 <== NOT EXECUTED a38c: 0a000002 beq a39c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a390: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a394: e1a0100d mov r1, sp <== NOT EXECUTED a398: eb0001d8 bl ab00 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); a39c: e59f300c ldr r3, [pc, #12] ; a3b0 <== NOT EXECUTED a3a0: e5930000 ldr r0, [r3] <== NOT EXECUTED a3a4: ebffe7f0 bl 436c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } a3a8: e3a00000 mov r0, #0 <== NOT EXECUTED a3ac: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED a3b0: 00018524 .word 0x00018524 00009f84 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 9f84: 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) 9f88: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 9f8c: e1a04000 mov r4, r0 <== NOT EXECUTED 9f90: e1a0b001 mov fp, r1 <== NOT EXECUTED 9f94: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 9f98: 01a06005 moveq r6, r5 <== NOT EXECUTED 9f9c: 0a00005a beq a10c <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 9fa0: e3a01000 mov r1, #0 <== NOT EXECUTED 9fa4: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 9fa8: e1a02001 mov r2, r1 <== NOT EXECUTED 9fac: ebffe8a8 bl 4254 <== NOT EXECUTED 9fb0: e3500000 cmp r0, #0 <== NOT EXECUTED 9fb4: 13e06003 mvnne r6, #3 <== NOT EXECUTED 9fb8: 1a000053 bne a10c <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 9fbc: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED 9fc0: e3560000 cmp r6, #0 <== NOT EXECUTED 9fc4: 0a000022 beq a054 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 9fc8: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED 9fcc: e1550009 cmp r5, r9 <== NOT EXECUTED 9fd0: 91a09005 movls r9, r5 <== NOT EXECUTED 9fd4: 83a09001 movhi r9, #1 <== NOT EXECUTED 9fd8: e1a06000 mov r6, r0 <== NOT EXECUTED 9fdc: ea000043 b a0f0 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 9fe0: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED 9fe4: e2177001 ands r7, r7, #1 <== NOT EXECUTED 9fe8: 13e0700a mvnne r7, #10 <== NOT EXECUTED 9fec: 1a000042 bne a0fc <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 9ff0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 9ff4: e2833001 add r3, r3, #1 <== NOT EXECUTED 9ff8: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); 9ffc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a000: ebffe8d9 bl 436c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) a004: e1a01007 mov r1, r7 <== NOT EXECUTED a008: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a00c: eb0002d1 bl ab58 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a010: e1a01007 mov r1, r7 <== NOT EXECUTED a014: 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)) a018: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a01c: 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)) a020: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a024: ebffe88a bl 4254 <== NOT EXECUTED a028: e3500000 cmp r0, #0 <== NOT EXECUTED a02c: 13e07003 mvnne r7, #3 <== NOT EXECUTED a030: 1a000033 bne a104 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a034: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) a038: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a03c: e2433001 sub r3, r3, #1 <== NOT EXECUTED a040: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) a044: 1a00002c bne a0fc <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { a048: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a04c: e3530000 cmp r3, #0 <== NOT EXECUTED a050: 1a000001 bne a05c <== NOT EXECUTED a054: e3e0701f mvn r7, #31 <== NOT EXECUTED a058: ea000027 b a0fc <== 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) { a05c: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED a060: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a064: e062300a rsb r3, r2, sl <== NOT EXECUTED a068: e1530009 cmp r3, r9 <== NOT EXECUTED a06c: 3affffdb bcc 9fe0 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a070: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a074: e1a0100a mov r1, sl <== NOT EXECUTED a078: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a07c: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a080: e1530007 cmp r3, r7 <== NOT EXECUTED a084: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); a088: eb002b4b bl 14dbc <__umodsi3> <== NOT EXECUTED a08c: e5943000 ldr r3, [r4] <== NOT EXECUTED a090: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { a094: e157000a cmp r7, sl <== NOT EXECUTED a098: 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); a09c: d0830000 addle r0, r3, r0 <== NOT EXECUTED a0a0: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { a0a4: da000006 ble a0c4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); a0a8: e1a0200a mov r2, sl <== NOT EXECUTED a0ac: e0830000 add r0, r3, r0 <== NOT EXECUTED a0b0: eb000748 bl bdd8 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); a0b4: e08a1006 add r1, sl, r6 <== NOT EXECUTED a0b8: e5940000 ldr r0, [r4] <== NOT EXECUTED a0bc: e08b1001 add r1, fp, r1 <== NOT EXECUTED a0c0: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); a0c4: eb000743 bl bdd8 <== NOT EXECUTED pipe->Length += chunk; a0c8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) a0cc: 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; a0d0: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) a0d4: 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; a0d8: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); a0dc: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED a0e0: 11a0100d movne r1, sp <== NOT EXECUTED a0e4: 1b000285 blne ab00 <== NOT EXECUTED written += chunk; a0e8: e0866007 add r6, r6, r7 <== NOT EXECUTED a0ec: 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) { a0f0: e1560005 cmp r6, r5 <== NOT EXECUTED a0f4: 3affffd8 bcc a05c <== NOT EXECUTED a0f8: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); a0fc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a100: ebffe899 bl 436c <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) a104: e3560000 cmp r6, #0 <== NOT EXECUTED a108: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } a10c: e1a00006 mov r0, r6 <== NOT EXECUTED a110: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00016728 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16728: e59f30b0 ldr r3, [pc, #176] ; 167e0 1672c: e5933000 ldr r3, [r3] 16730: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 16734: e92d4070 push {r4, r5, r6, lr} 16738: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1673c: 2a000005 bcs 16758 iop = rtems_libio_iop( fd ); 16740: e59f309c ldr r3, [pc, #156] ; 167e4 16744: e5934000 ldr r4, [r3] 16748: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 1674c: e5943014 ldr r3, [r4, #20] 16750: e3130c01 tst r3, #256 ; 0x100 16754: 1a000002 bne 16764 16758: ebffd390 bl b5a0 <__errno> 1675c: e3a03009 mov r3, #9 16760: ea00000f b 167a4 rtems_libio_check_buffer( buffer ); 16764: e3510000 cmp r1, #0 16768: 0a000004 beq 16780 rtems_libio_check_count( count ); 1676c: e3520000 cmp r2, #0 16770: 01a00002 moveq r0, r2 16774: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 16778: e3130002 tst r3, #2 1677c: 1a000002 bne 1678c 16780: ebffd386 bl b5a0 <__errno> <== NOT EXECUTED 16784: e3a03016 mov r3, #22 <== NOT EXECUTED 16788: ea000005 b 167a4 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 1678c: e594303c ldr r3, [r4, #60] ; 0x3c 16790: e5933008 ldr r3, [r3, #8] 16794: e3530000 cmp r3, #0 16798: 1a000004 bne 167b0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1679c: ebffd37f bl b5a0 <__errno> <== NOT EXECUTED 167a0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 167a4: e5803000 str r3, [r0] 167a8: e3e00000 mvn r0, #0 167ac: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 167b0: e1a00004 mov r0, r4 167b4: e1a0e00f mov lr, pc 167b8: e12fff13 bx r3 if ( rc > 0 ) 167bc: e3500000 cmp r0, #0 167c0: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 167c4: e284600c add r6, r4, #12 167c8: e8960060 ldm r6, {r5, r6} 167cc: e0952000 adds r2, r5, r0 167d0: e0a63fc0 adc r3, r6, r0, asr #31 167d4: e584200c str r2, [r4, #12] 167d8: e5843010 str r3, [r4, #16] return rc; } 167dc: e8bd8070 pop {r4, r5, r6, pc} 167e0: 00016ff0 .word 0x00016ff0 167e4: 000185a8 .word 0x000185a8 000232cc : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 232cc: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 232d0: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 232d4: e24dd018 sub sp, sp, #24 232d8: e1a05002 mov r5, r2 232dc: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 232e0: 1a000002 bne 232f0 rtems_set_errno_and_return_minus_one( EFAULT ); 232e4: eb00524b bl 37c18 <__errno> <== NOT EXECUTED 232e8: e3a0300e mov r3, #14 <== NOT EXECUTED 232ec: ea000028 b 23394 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 232f0: eb006cc2 bl 3e600 232f4: e28d4004 add r4, sp, #4 232f8: e3a0c000 mov ip, #0 232fc: e1a01000 mov r1, r0 23300: e1a0200c mov r2, ip 23304: e1a00007 mov r0, r7 23308: e1a03004 mov r3, r4 2330c: e58dc000 str ip, [sp] 23310: ebff8789 bl 513c 0, &loc, false ); if ( result != 0 ) 23314: e3500000 cmp r0, #0 23318: 1a00001e bne 23398 return -1; if ( !loc.ops->node_type_h ){ 2331c: e59d2010 ldr r2, [sp, #16] 23320: e5923010 ldr r3, [r2, #16] 23324: e3530000 cmp r3, #0 23328: 0a000012 beq 23378 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 2332c: e1a00004 mov r0, r4 23330: e1a0e00f mov lr, pc 23334: e12fff13 bx r3 23338: e3500004 cmp r0, #4 2333c: e59d2010 ldr r2, [sp, #16] 23340: 0a000009 beq 2336c rtems_filesystem_freenode( &loc ); 23344: e3520000 cmp r2, #0 23348: 0a000004 beq 23360 2334c: e592301c ldr r3, [r2, #28] 23350: e3530000 cmp r3, #0 23354: 11a00004 movne r0, r4 23358: 11a0e00f movne lr, pc 2335c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 23360: eb00522c bl 37c18 <__errno> 23364: e3a03016 mov r3, #22 23368: ea000009 b 23394 } if ( !loc.ops->readlink_h ){ 2336c: e592303c ldr r3, [r2, #60] ; 0x3c 23370: e3530000 cmp r3, #0 23374: 1a000009 bne 233a0 rtems_filesystem_freenode( &loc ); 23378: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2337c: e3530000 cmp r3, #0 <== NOT EXECUTED 23380: 11a00004 movne r0, r4 <== NOT EXECUTED 23384: 11a0e00f movne lr, pc <== NOT EXECUTED 23388: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2338c: eb005221 bl 37c18 <__errno> <== NOT EXECUTED 23390: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23394: e5803000 str r3, [r0] 23398: e3e05000 mvn r5, #0 2339c: ea00000d b 233d8 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 233a0: e1a02005 mov r2, r5 233a4: e1a01006 mov r1, r6 233a8: e1a00004 mov r0, r4 233ac: e1a0e00f mov lr, pc 233b0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 233b4: e59d3010 ldr r3, [sp, #16] 233b8: 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 ); 233bc: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 233c0: 0a000004 beq 233d8 233c4: e593301c ldr r3, [r3, #28] 233c8: e3530000 cmp r3, #0 233cc: 11a00004 movne r0, r4 233d0: 11a0e00f movne lr, pc 233d4: 112fff13 bxne r3 return result; } 233d8: e1a00005 mov r0, r5 233dc: e28dd018 add sp, sp, #24 233e0: e8bd80f0 pop {r4, r5, r6, r7, pc} 0000331c : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 331c: e59f3138 ldr r3, [pc, #312] ; 345c 3320: e5933000 ldr r3, [r3] 3324: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 3328: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 332c: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3330: 2a000005 bcs 334c iop = rtems_libio_iop( fd ); 3334: e59f3124 ldr r3, [pc, #292] ; 3460 3338: e5936000 ldr r6, [r3] 333c: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3340: e5963014 ldr r3, [r6, #20] 3344: e3130c01 tst r3, #256 ; 0x100 3348: 1a000002 bne 3358 334c: eb0029b5 bl da28 <__errno> <== NOT EXECUTED 3350: e3a03009 mov r3, #9 <== NOT EXECUTED 3354: ea00001e b 33d4 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3358: e3130002 tst r3, #2 335c: 0a00001a beq 33cc /* * Argument validation on IO vector */ if ( !iov ) 3360: e3510000 cmp r1, #0 3364: 0a000018 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3368: e3520000 cmp r2, #0 336c: da000016 ble 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3370: e3520b01 cmp r2, #1024 ; 0x400 3374: ca000014 bgt 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 3378: e596303c ldr r3, [r6, #60] ; 0x3c 337c: e5933008 ldr r3, [r3, #8] 3380: e3530000 cmp r3, #0 3384: 1a000002 bne 3394 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3388: eb0029a6 bl da28 <__errno> <== NOT EXECUTED 338c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3390: ea00000f b 33d4 <== NOT EXECUTED 3394: e3a03000 mov r3, #0 3398: e1a05001 mov r5, r1 339c: e1a02001 mov r2, r1 33a0: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 33a4: e5920000 ldr r0, [r2] 33a8: 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++ ) { 33ac: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 33b0: 0a000005 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33b4: e592c004 ldr ip, [r2, #4] 33b8: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 33bc: e081000c add r0, r1, ip ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33c0: 0a000001 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 33c4: e1500001 cmp r0, r1 33c8: aa000003 bge 33dc rtems_set_errno_and_return_minus_one( EINVAL ); 33cc: eb002995 bl da28 <__errno> 33d0: e3a03016 mov r3, #22 33d4: e5803000 str r3, [r0] 33d8: ea00000d b 3414 * 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++ ) { 33dc: e1530008 cmp r3, r8 33e0: e2822008 add r2, r2, #8 33e4: b1a01000 movlt r1, r0 33e8: baffffed blt 33a4 33ec: e3a07000 mov r7, #0 33f0: 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 ); 33f4: e8950006 ldm r5, {r1, r2} 33f8: e596303c ldr r3, [r6, #60] ; 0x3c 33fc: e1a00006 mov r0, r6 3400: e1a0e00f mov lr, pc 3404: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 3408: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 340c: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3410: aa000001 bge 341c 3414: e3e04000 mvn r4, #0 3418: ea00000d b 3454 return -1; if ( bytes > 0 ) { 341c: 0a000006 beq 343c iop->offset += bytes; 3420: e286c00c add ip, r6, #12 <== NOT EXECUTED 3424: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 3428: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 342c: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 3430: e586200c str r2, [r6, #12] <== NOT EXECUTED 3434: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 3438: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 343c: e5953004 ldr r3, [r5, #4] 3440: e1500003 cmp r0, r3 3444: 1a000002 bne 3454 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3448: e1570008 cmp r7, r8 <== NOT EXECUTED 344c: e2855008 add r5, r5, #8 <== NOT EXECUTED 3450: baffffe7 blt 33f4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 3454: e1a00004 mov r0, r4 3458: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 345c: 0001acd0 .word 0x0001acd0 3460: 0001d6bc .word 0x0001d6bc 00016840 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 16840: e59f310c ldr r3, [pc, #268] ; 16954 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 16844: e59f210c ldr r2, [pc, #268] ; 16958 16848: e592c000 ldr ip, [r2] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 1684c: 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())) { 16850: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 16854: e2822001 add r2, r2, #1 16858: e92d40f1 push {r0, r4, r5, r6, r7, lr} 1685c: e5832010 str r2, [r3, #16] 16860: e1a04000 mov r4, r0 16864: 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())) { 16868: 1a000007 bne 1688c if (_Thread_Dispatch_disable_level > 0) 1686c: e59f30e8 ldr r3, [pc, #232] ; 1695c 16870: e5933000 ldr r3, [r3] 16874: e3530000 cmp r3, #0 16878: 1a000032 bne 16948 return (void *) 0; if (_ISR_Nest_level > 0) 1687c: e59f30dc ldr r3, [pc, #220] ; 16960 16880: e5933000 ldr r3, [r3] 16884: e3530000 cmp r3, #0 16888: 1a00002e bne 16948 } /* * Continue with realloc(). */ if ( !ptr ) 1688c: e3540000 cmp r4, #0 16890: 1a000003 bne 168a4 return malloc( size ); 16894: e1a00005 mov r0, r5 16898: ebffc8c3 bl 8bac 1689c: e1a04000 mov r4, r0 168a0: ea000029 b 1694c if ( !size ) { 168a4: e3550000 cmp r5, #0 168a8: 1a000003 bne 168bc free( ptr ); 168ac: e1a00004 mov r0, r4 <== NOT EXECUTED 168b0: ebffc77d bl 86ac <== NOT EXECUTED 168b4: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 168b8: ea000023 b 1694c <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 168bc: e59f60a0 ldr r6, [pc, #160] ; 16964 168c0: e1a01004 mov r1, r4 168c4: e5960000 ldr r0, [r6] 168c8: e1a0200d mov r2, sp 168cc: eb000055 bl 16a28 <_Protected_heap_Get_block_size> 168d0: e2507000 subs r7, r0, #0 168d4: 1a000004 bne 168ec errno = EINVAL; 168d8: ebffd330 bl b5a0 <__errno> 168dc: e3a03016 mov r3, #22 168e0: e5803000 str r3, [r0] 168e4: e1a04007 mov r4, r7 return (void *) 0; 168e8: ea000017 b 1694c #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 ) ) { 168ec: e5960000 ldr r0, [r6] 168f0: e1a01004 mov r1, r4 168f4: e1a02005 mov r2, r5 168f8: eb00005b bl 16a6c <_Protected_heap_Resize_block> 168fc: e3500000 cmp r0, #0 16900: 1a000011 bne 1694c * 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 ); 16904: e1a00005 mov r0, r5 16908: ebffc8a7 bl 8bac MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1690c: e59f3040 ldr r3, [pc, #64] ; 16954 16910: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 16914: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 16918: e2422001 sub r2, r2, #1 1691c: e5832004 str r2, [r3, #4] if ( !new_area ) { 16920: 0a000008 beq 16948 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 16924: e59d2000 ldr r2, [sp] 16928: e1a01004 mov r1, r4 1692c: e1550002 cmp r5, r2 16930: 31a02005 movcc r2, r5 16934: ebffd527 bl bdd8 free( ptr ); 16938: e1a00004 mov r0, r4 1693c: ebffc75a bl 86ac 16940: e1a04006 mov r4, r6 return new_area; 16944: ea000000 b 1694c 16948: e3a04000 mov r4, #0 } 1694c: e1a00004 mov r0, r4 16950: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 16954: 000185b4 .word 0x000185b4 16958: 000188b0 .word 0x000188b0 1695c: 0001870c .word 0x0001870c 16960: 0001879c .word 0x0001879c 16964: 00016ffc .word 0x00016ffc 00006570 : #include int rmdir( const char *pathname ) { 6570: e92d4070 push {r4, r5, r6, lr} 6574: e24dd02c sub sp, sp, #44 ; 0x2c 6578: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 657c: ebfffaa6 bl 501c if ( parentpathlen == 0 ) 6580: e2505000 subs r5, r0, #0 6584: 1a000019 bne 65f0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6588: e5d63000 ldrb r3, [r6] 658c: e353002f cmp r3, #47 ; 0x2f 6590: 1353005c cmpne r3, #92 ; 0x5c 6594: 0a000001 beq 65a0 6598: e3530000 cmp r3, #0 <== NOT EXECUTED 659c: 1a000009 bne 65c8 <== NOT EXECUTED 65a0: e59f325c ldr r3, [pc, #604] ; 6804 65a4: e593e000 ldr lr, [r3] 65a8: e28ee018 add lr, lr, #24 65ac: e8be000f ldm lr!, {r0, r1, r2, r3} 65b0: e28dc018 add ip, sp, #24 65b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 65b8: e59e3000 ldr r3, [lr] 65bc: e3a04000 mov r4, #0 65c0: e58c3000 str r3, [ip] 65c4: ea000013 b 6618 65c8: e59f3234 ldr r3, [pc, #564] ; 6804 <== NOT EXECUTED 65cc: e593e000 ldr lr, [r3] <== NOT EXECUTED 65d0: e28ee004 add lr, lr, #4 <== NOT EXECUTED 65d4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 65d8: e28dc018 add ip, sp, #24 <== NOT EXECUTED 65dc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 65e0: e59e3000 ldr r3, [lr] <== NOT EXECUTED 65e4: e1a04005 mov r4, r5 <== NOT EXECUTED 65e8: e58c3000 str r3, [ip] <== NOT EXECUTED 65ec: ea000009 b 6618 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 65f0: e3a0c000 mov ip, #0 65f4: e1a00006 mov r0, r6 65f8: e1a01005 mov r1, r5 65fc: e3a02002 mov r2, #2 6600: e28d3018 add r3, sp, #24 6604: e58dc000 str ip, [sp] 6608: ebfffacb bl 513c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 660c: e3500000 cmp r0, #0 6610: 1a000077 bne 67f4 6614: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6618: e28de018 add lr, sp, #24 661c: e8be000f ldm lr!, {r0, r1, r2, r3} 6620: e28dc004 add ip, sp, #4 6624: e8ac000f stmia ip!, {r0, r1, r2, r3} 6628: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 662c: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6630: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6634: e1a00005 mov r0, r5 6638: eb00dff0 bl 3e600 663c: e1a01000 mov r1, r0 6640: e1a00005 mov r0, r5 6644: ebfffa68 bl 4fec 6648: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 664c: e1a00006 mov r0, r6 6650: eb00dfea bl 3e600 6654: e28d5004 add r5, sp, #4 6658: e3a0c000 mov ip, #0 665c: e1a01000 mov r1, r0 6660: e1a0200c mov r2, ip 6664: e1a00006 mov r0, r6 6668: e1a03005 mov r3, r5 666c: e58dc000 str ip, [sp] 6670: ebfffa79 bl 505c 0, &loc, false ); if ( result != 0 ) { 6674: e3500000 cmp r0, #0 6678: 0a00000b beq 66ac if ( free_parentloc ) 667c: e3540000 cmp r4, #0 6680: 0a00005b beq 67f4 rtems_filesystem_freenode( &parentloc ); 6684: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6688: e3530000 cmp r3, #0 <== NOT EXECUTED 668c: 0a000058 beq 67f4 <== NOT EXECUTED 6690: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6694: e3530000 cmp r3, #0 <== NOT EXECUTED 6698: 0a000055 beq 67f4 <== NOT EXECUTED 669c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 66a0: e1a0e00f mov lr, pc <== NOT EXECUTED 66a4: e12fff13 bx r3 <== NOT EXECUTED 66a8: ea000051 b 67f4 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66ac: e59d2010 ldr r2, [sp, #16] 66b0: e5923010 ldr r3, [r2, #16] 66b4: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 66b8: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66bc: 0a000021 beq 6748 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 ){ 66c0: e1a00005 mov r0, r5 66c4: e1a0e00f mov lr, pc 66c8: e12fff13 bx r3 66cc: e3500001 cmp r0, #1 66d0: 0a000014 beq 6728 rtems_filesystem_freenode( &loc ); 66d4: e59d3010 ldr r3, [sp, #16] 66d8: e3530000 cmp r3, #0 66dc: 0a000004 beq 66f4 66e0: e593301c ldr r3, [r3, #28] 66e4: e3530000 cmp r3, #0 66e8: 11a00005 movne r0, r5 66ec: 11a0e00f movne lr, pc 66f0: 112fff13 bxne r3 if ( free_parentloc ) 66f4: e3540000 cmp r4, #0 66f8: 0a000007 beq 671c rtems_filesystem_freenode( &parentloc ); 66fc: e59d3024 ldr r3, [sp, #36] ; 0x24 6700: e3530000 cmp r3, #0 6704: 0a000004 beq 671c 6708: e593301c ldr r3, [r3, #28] 670c: e3530000 cmp r3, #0 6710: 128d0018 addne r0, sp, #24 6714: 11a0e00f movne lr, pc 6718: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 671c: eb00c53d bl 37c18 <__errno> 6720: e3a03014 mov r3, #20 6724: ea000017 b 6788 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6728: e59d300c ldr r3, [sp, #12] 672c: e5933034 ldr r3, [r3, #52] ; 0x34 6730: e3530000 cmp r3, #0 6734: 1a000015 bne 6790 rtems_filesystem_freenode( &loc ); 6738: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 673c: e3530000 cmp r3, #0 <== NOT EXECUTED 6740: 0a000004 beq 6758 <== NOT EXECUTED 6744: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6748: e3530000 cmp r3, #0 <== NOT EXECUTED 674c: 11a00005 movne r0, r5 <== NOT EXECUTED 6750: 11a0e00f movne lr, pc <== NOT EXECUTED 6754: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 6758: e3540000 cmp r4, #0 <== NOT EXECUTED 675c: 0a000007 beq 6780 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 6760: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6764: e3530000 cmp r3, #0 <== NOT EXECUTED 6768: 0a000004 beq 6780 <== NOT EXECUTED 676c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6770: e3530000 cmp r3, #0 <== NOT EXECUTED 6774: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 6778: 11a0e00f movne lr, pc <== NOT EXECUTED 677c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6780: eb00c524 bl 37c18 <__errno> <== NOT EXECUTED 6784: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6788: e5803000 str r3, [r0] 678c: ea000018 b 67f4 } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6790: e28d0018 add r0, sp, #24 6794: e1a01005 mov r1, r5 6798: e1a0e00f mov lr, pc 679c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 67a0: e59d3010 ldr r3, [sp, #16] 67a4: 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 ); 67a8: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 67ac: 0a000004 beq 67c4 67b0: e593301c ldr r3, [r3, #28] 67b4: e3530000 cmp r3, #0 67b8: 11a00005 movne r0, r5 67bc: 11a0e00f movne lr, pc 67c0: 112fff13 bxne r3 if ( free_parentloc ) 67c4: e3540000 cmp r4, #0 67c8: 0a00000a beq 67f8 rtems_filesystem_freenode( &parentloc ); 67cc: e59d3024 ldr r3, [sp, #36] ; 0x24 67d0: e3530000 cmp r3, #0 67d4: 0a000007 beq 67f8 67d8: e593301c ldr r3, [r3, #28] 67dc: e3530000 cmp r3, #0 67e0: 0a000004 beq 67f8 67e4: e28d0018 add r0, sp, #24 67e8: e1a0e00f mov lr, pc 67ec: e12fff13 bx r3 67f0: ea000000 b 67f8 67f4: e3e06000 mvn r6, #0 return result; } 67f8: e1a00006 mov r0, r6 67fc: e28dd02c add sp, sp, #44 ; 0x2c 6800: e8bd8070 pop {r4, r5, r6, pc} 6804: 00052008 .word 0x00052008 00011804 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 11804: e59f0000 ldr r0, [pc, #0] ; 1180c <== NOT EXECUTED 11808: e12fff1e bx lr <== NOT EXECUTED 1180c: 00020b08 .word 0x00020b08 0000ea6c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ea6c: e92d4010 push {r4, lr} ea70: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ea74: eb000006 bl ea94 if (nap) ea78: e3500000 cmp r0, #0 ea7c: 0a000001 beq ea88 return nap->name; return rtems_assoc_name_bad(local_value); } ea80: e5900000 ldr r0, [r0] ea84: 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); ea88: e1a00004 mov r0, r4 <== NOT EXECUTED } ea8c: 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); ea90: ea000b5b b 11804 <== NOT EXECUTED 0000b26c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { b26c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); b270: eb0000ad bl b52c <== NOT EXECUTED if (nap) b274: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; b278: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } b27c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001148 : size_t length ) { const char *p; if ( !name ) 1148: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 114c: e92d4070 push {r4, r5, r6, lr} 1150: e1a04001 mov r4, r1 1154: e1a05002 mov r5, r2 const char *p; if ( !name ) 1158: 0a00001c beq 11d0 return NULL; if ( !value ) 115c: e3510000 cmp r1, #0 1160: 0a00001b beq 11d4 return NULL; if ( !length ) 1164: e3520000 cmp r2, #0 1168: 0a000018 beq 11d0 return NULL; value[0] = '\0'; 116c: e3a06000 mov r6, #0 1170: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 1174: eb000018 bl 11dc if ( !p ) 1178: e3500000 cmp r0, #0 117c: 0a000013 beq 11d0 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 == ' ' ) 119c: e3160001 tst r6, #1 11a0: 1a000001 bne 11ac 11a4: e3520020 cmp r2, #32 11a8: 0a000009 beq 11d4 break; value[i++] = *p++; 11ac: e7c42003 strb r2, [r4, r3] 11b0: e2833001 add r3, r3, #1 value[i] = '\0'; 11b4: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 11c4: e1530005 cmp r3, r5 11c8: 3afffff0 bcc 1190 11cc: ea000000 b 11d4 <== NOT EXECUTED 11d0: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 11d4: e1a00004 mov r0, r4 11d8: e8bd8070 pop {r4, r5, r6, pc} 00001204 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1204: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1208: e1a05000 mov r5, r0 <== NOT EXECUTED 120c: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 1210: ebffffcc bl 1148 <== NOT EXECUTED if ( !p ) 1214: e2506000 subs r6, r0, #0 <== NOT EXECUTED 1218: 0a000018 beq 1280 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 121c: e1a00005 mov r0, r5 <== NOT EXECUTED 1220: eb002cc1 bl c52c <== NOT EXECUTED if ( *rhs != '=' ) 1224: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED 1228: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 122c: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 1230: 1a000012 bne 1280 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 1234: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 1238: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 123c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 1240: 02866001 addeq r6, r6, #1 <== NOT EXECUTED 1244: e1a02004 mov r2, r4 <== NOT EXECUTED 1248: e3a0c000 mov ip, #0 <== NOT EXECUTED 124c: ea000000 b 1254 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 1250: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1254: e7d6100c ldrb r1, [r6, ip] <== NOT EXECUTED 1258: e3510000 cmp r1, #0 <== NOT EXECUTED *d++ = *rhs++; 125c: e1a03002 mov r3, r2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1260: e28cc001 add ip, ip, #1 <== NOT EXECUTED 1264: e2822001 add r2, r2, #1 <== NOT EXECUTED 1268: 1afffff8 bne 1250 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 126c: e5532001 ldrb r2, [r3, #-1] <== NOT EXECUTED 1270: e3520022 cmp r2, #34 ; 0x22 <== NOT EXECUTED 1274: 02433001 subeq r3, r3, #1 <== NOT EXECUTED d--; *d = '\0'; 1278: e5c31000 strb r1, [r3] <== NOT EXECUTED return value; 127c: ea000000 b 1284 <== NOT EXECUTED 1280: e3a04000 mov r4, #0 <== NOT EXECUTED } 1284: e1a00004 mov r0, r4 <== NOT EXECUTED 1288: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001db0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db0: 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 ) 1db4: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db8: e24dd040 sub sp, sp, #64 ; 0x40 1dbc: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1dc0: 0a000059 beq 1f2c * 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 ); 1dc4: e28d4030 add r4, sp, #48 ; 0x30 1dc8: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dcc: 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 ); 1dd0: eb001292 bl 6820 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd4: e1a01004 mov r1, r4 1dd8: e1a02005 mov r2, r5 1ddc: e59f0150 ldr r0, [pc, #336] ; 1f34 1de0: eb001b54 bl 8b38 <_Timespec_Subtract> } } } #endif (*print)( 1de4: e1a00008 mov r0, r8 1de8: e59f1148 ldr r1, [pc, #328] ; 1f38 1dec: e1a0e00f mov lr, pc 1df0: e12fff1a bx sl 1df4: e59f4140 ldr r4, [pc, #320] ; 1f3c /* * 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 ) { 1df8: e59fb140 ldr fp, [pc, #320] ; 1f40 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 1dfc: e5943004 ldr r3, [r4, #4] 1e00: e3530000 cmp r3, #0 1e04: 0a00003b beq 1ef8 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 1e08: e5936004 ldr r6, [r3, #4] if ( information ) { 1e0c: e3560000 cmp r6, #0 1e10: 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( 1e14: 128d9018 addne r9, sp, #24 1e18: 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 ) { 1e1c: 1a00002f bne 1ee0 1e20: ea000034 b 1ef8 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 1e24: e596301c ldr r3, [r6, #28] 1e28: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 1e2c: e3540000 cmp r4, #0 1e30: 0a000029 beq 1edc continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1e34: e5940008 ldr r0, [r4, #8] 1e38: eb000e09 bl 5664 (*print)( 1e3c: e28d3008 add r3, sp, #8 1e40: e5942008 ldr r2, [r4, #8] 1e44: e1a00008 mov r0, r8 1e48: e59f10f4 ldr r1, [pc, #244] ; 1f44 1e4c: e1a0e00f mov lr, pc 1e50: 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; 1e54: e2843084 add r3, r4, #132 ; 0x84 1e58: e893000c ldm r3, {r2, r3} 1e5c: e58d2020 str r2, [sp, #32] 1e60: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1e64: e59b2000 ldr r2, [fp] 1e68: e5943008 ldr r3, [r4, #8] 1e6c: e5922008 ldr r2, [r2, #8] 1e70: e1520003 cmp r2, r3 1e74: 1a000006 bne 1e94 Timestamp_Control used; _Timestamp_Subtract( 1e78: e59f00c8 ldr r0, [pc, #200] ; 1f48 1e7c: e28d1030 add r1, sp, #48 ; 0x30 1e80: e1a02009 mov r2, r9 1e84: eb001b2b bl 8b38 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1e88: e28d0020 add r0, sp, #32 1e8c: e1a01009 mov r1, r9 1e90: eb001aee bl 8a50 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1e94: e28d203c add r2, sp, #60 ; 0x3c 1e98: e28d3038 add r3, sp, #56 ; 0x38 1e9c: e28d0020 add r0, sp, #32 1ea0: e28d1028 add r1, sp, #40 ; 0x28 1ea4: eb001afd bl 8aa0 <_Timespec_Divide> /* * Print the information */ (*print)( context, 1ea8: e3a01ffa mov r1, #1000 ; 0x3e8 1eac: e59d0024 ldr r0, [sp, #36] ; 0x24 1eb0: eb005f7e bl 19cb0 <__aeabi_uidiv> 1eb4: e59d203c ldr r2, [sp, #60] ; 0x3c 1eb8: e58d2000 str r2, [sp] 1ebc: e59d2038 ldr r2, [sp, #56] ; 0x38 1ec0: e1a03000 mov r3, r0 1ec4: e58d2004 str r2, [sp, #4] 1ec8: e1a00008 mov r0, r8 1ecc: e59f1078 ldr r1, [pc, #120] ; 1f4c 1ed0: e59d2020 ldr r2, [sp, #32] 1ed4: e1a0e00f mov lr, pc 1ed8: 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++ ) { 1edc: e2877001 add r7, r7, #1 1ee0: e1d631b0 ldrh r3, [r6, #16] 1ee4: 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 ); 1ee8: e3a0100d mov r1, #13 1eec: 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++ ) { 1ef0: 9affffcb bls 1e24 1ef4: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1ef8: e59f3050 ldr r3, [pc, #80] ; 1f50 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++ ) { 1efc: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1f00: e1540003 cmp r4, r3 1f04: 1affffbc bne 1dfc } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 1f08: e3a01ffa mov r1, #1000 ; 0x3e8 1f0c: e59d002c ldr r0, [sp, #44] ; 0x2c 1f10: eb005f66 bl 19cb0 <__aeabi_uidiv> 1f14: e59f1038 ldr r1, [pc, #56] ; 1f54 1f18: e1a03000 mov r3, r0 1f1c: e59d2028 ldr r2, [sp, #40] ; 0x28 1f20: e1a00008 mov r0, r8 1f24: e1a0e00f mov lr, pc 1f28: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 1f2c: e28dd040 add sp, sp, #64 ; 0x40 1f30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 1f34: 00026860 .word 0x00026860 1f38: 0001d510 .word 0x0001d510 1f3c: 000265e8 .word 0x000265e8 1f40: 000266e0 .word 0x000266e0 1f44: 0001d682 .word 0x0001d682 1f48: 000266e8 .word 0x000266e8 1f4c: 0001d695 .word 0x0001d695 1f50: 000265f8 .word 0x000265f8 1f54: 0001d6ad .word 0x0001d6ad 0000b240 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { b240: e92d4010 push {r4, lr} <== NOT EXECUTED b244: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) b248: e59f0018 ldr r0, [pc, #24] ; b268 <== NOT EXECUTED b24c: eb000006 bl b26c <== NOT EXECUTED b250: e2504000 subs r4, r0, #0 <== NOT EXECUTED b254: 0a000001 beq b260 <== NOT EXECUTED { errno = rc; b258: eb0000d0 bl b5a0 <__errno> <== NOT EXECUTED b25c: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } b260: e3e00000 mvn r0, #0 <== NOT EXECUTED b264: e8bd8010 pop {r4, pc} <== NOT EXECUTED b268: 00017a9c .word 0x00017a9c 00005f7c : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 5f7c: e92d000e push {r1, r2, r3} <== NOT EXECUTED 5f80: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 5f84: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f88: e1a02003 mov r2, r3 <== NOT EXECUTED 5f8c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 5f90: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f94: ebffff84 bl 5dac <== NOT EXECUTED va_end(arglist); return chars_written; } 5f98: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f9c: e28dd00c add sp, sp, #12 <== NOT EXECUTED 5fa0: e12fff1e bx lr <== NOT EXECUTED 00001164 : } int rtems_filesystem_dirname( const char *pathname ) { 1164: e92d4010 push {r4, lr} 1168: e1a04000 mov r4, r0 int len = strlen( pathname ); 116c: eb002cfc bl c564 1170: e0844000 add r4, r4, r0 while ( len ) { 1174: ea000007 b 1198 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 1178: e5543001 ldrb r3, [r4, #-1] 117c: e353002f cmp r3, #47 ; 0x2f 1180: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 1184: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 1188: 08bd8010 popeq {r4, pc} 118c: e3530000 cmp r3, #0 1190: e2444001 sub r4, r4, #1 1194: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 1198: e3500000 cmp r0, #0 119c: 1afffff5 bne 1178 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 11a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001284 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1284: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 1288: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 128c: e1a07001 mov r7, r1 1290: e1a06002 mov r6, r2 1294: e1a0c003 mov ip, r3 1298: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 129c: 1a000002 bne 12ac rtems_set_errno_and_return_minus_one( EFAULT ); 12a0: eb0028be bl b5a0 <__errno> 12a4: e3a0300e mov r3, #14 12a8: ea000003 b 12bc if ( !pathloc ) 12ac: e3530000 cmp r3, #0 12b0: 1a000004 bne 12c8 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 12b4: eb0028b9 bl b5a0 <__errno> <== NOT EXECUTED 12b8: e3a03005 mov r3, #5 <== NOT EXECUTED 12bc: e5803000 str r3, [r0] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 12c0: e3e00000 mvn r0, #0 12c4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 12c8: e5d53000 ldrb r3, [r5] 12cc: e353002f cmp r3, #47 ; 0x2f 12d0: 1353005c cmpne r3, #92 ; 0x5c 12d4: 13a08000 movne r8, #0 12d8: 03a08001 moveq r8, #1 12dc: 0a000001 beq 12e8 12e0: e3530000 cmp r3, #0 12e4: 1a000009 bne 1310 12e8: e59f305c ldr r3, [pc, #92] ; 134c 12ec: e5934000 ldr r4, [r3] 12f0: e2844018 add r4, r4, #24 12f4: e8b4000f ldm r4!, {r0, r1, r2, r3} 12f8: e1a0800c mov r8, ip 12fc: e8a8000f stmia r8!, {r0, r1, r2, r3} 1300: e5942000 ldr r2, [r4] 1304: e5882000 str r2, [r8] 1308: e3a08001 mov r8, #1 130c: ea000007 b 1330 1310: e59f3034 ldr r3, [pc, #52] ; 134c 1314: e5934000 ldr r4, [r3] 1318: e2844004 add r4, r4, #4 131c: e8b4000f ldm r4!, {r0, r1, r2, r3} 1320: e1a0900c mov r9, ip 1324: e8a9000f stmia r9!, {r0, r1, r2, r3} 1328: e5942000 ldr r2, [r4] 132c: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1330: e0681007 rsb r1, r8, r7 1334: e0850008 add r0, r5, r8 1338: e1a02006 mov r2, r6 133c: e1a0300c mov r3, ip 1340: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 1344: 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], 1348: eaffff95 b 11a4 134c: 00017188 .word 0x00017188 000011a4 : /* * Verify Input parameters. */ if ( !pathname ) 11a4: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 11a8: e92d4030 push {r4, r5, lr} 11ac: e1a05002 mov r5, r2 11b0: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 11b4: 1a000002 bne 11c4 rtems_set_errno_and_return_minus_one( EFAULT ); 11b8: eb0028f8 bl b5a0 <__errno> <== NOT EXECUTED 11bc: e3a0300e mov r3, #14 <== NOT EXECUTED 11c0: ea000027 b 1264 <== NOT EXECUTED if ( !pathloc ) 11c4: e3530000 cmp r3, #0 11c8: 1a000002 bne 11d8 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 11cc: eb0028f3 bl b5a0 <__errno> <== NOT EXECUTED 11d0: e3a03005 mov r3, #5 <== NOT EXECUTED 11d4: ea000022 b 1264 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 11d8: e593c00c ldr ip, [r3, #12] 11dc: e59cc000 ldr ip, [ip] 11e0: e35c0000 cmp ip, #0 11e4: 0a00001c beq 125c rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 11e8: e1a0e00f mov lr, pc 11ec: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 11f0: e59d200c ldr r2, [sp, #12] 11f4: e2703001 rsbs r3, r0, #1 11f8: 33a03000 movcc r3, #0 11fc: e3520000 cmp r2, #0 1200: 03a03000 moveq r3, #0 1204: e3530000 cmp r3, #0 1208: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 120c: e594200c ldr r2, [r4, #12] 1210: e5923010 ldr r3, [r2, #16] 1214: e3530000 cmp r3, #0 1218: 0a00000a beq 1248 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 121c: e1a00004 mov r0, r4 1220: e1a0e00f mov lr, pc 1224: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1228: e2400003 sub r0, r0, #3 122c: e3500001 cmp r0, #1 1230: 83a00000 movhi r0, #0 1234: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1238: e594200c ldr r2, [r4, #12] 123c: e5923034 ldr r3, [r2, #52] ; 0x34 1240: e3530000 cmp r3, #0 1244: 1a000009 bne 1270 rtems_filesystem_freenode( pathloc ); 1248: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 124c: e3530000 cmp r3, #0 <== NOT EXECUTED 1250: 11a00004 movne r0, r4 <== NOT EXECUTED 1254: 11a0e00f movne lr, pc <== NOT EXECUTED 1258: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125c: eb0028cf bl b5a0 <__errno> <== NOT EXECUTED 1260: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1264: e5803000 str r3, [r0] <== NOT EXECUTED 1268: e3e00000 mvn r0, #0 <== NOT EXECUTED 126c: 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 ); 1270: e1a00004 mov r0, r4 1274: e1a01005 mov r1, r5 1278: e1a0e00f mov lr, pc 127c: e12fff13 bx r3 } } return result; } 1280: e8bd8030 pop {r4, r5, pc} 00001004 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1004: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1008: e59f6100 ldr r6, [pc, #256] ; 1110 100c: e5963000 ldr r3, [r6] 1010: e3a02012 mov r2, #18 1014: 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 ) { 1018: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 101c: eb00018e bl 165c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1020: e59f30ec ldr r3, [pc, #236] ; 1114 1024: e5933000 ldr r3, [r3] 1028: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 102c: 059f00e4 ldreq r0, [pc, #228] ; 1118 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1030: 0a000009 beq 105c rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1034: e59f30e0 ldr r3, [pc, #224] ; 111c 1038: e5932000 ldr r2, [r3] status = mount( 103c: e592300c ldr r3, [r2, #12] 1040: e58d3000 str r3, [sp] 1044: e28d0018 add r0, sp, #24 1048: e892000e ldm r2, {r1, r2, r3} 104c: eb000189 bl 1678 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1050: e3700001 cmn r0, #1 1054: 1a000001 bne 1060 rtems_fatal_error_occurred( 0xABCD0002 ); 1058: e59f00c0 ldr r0, [pc, #192] ; 1120 <== NOT EXECUTED 105c: eb000e0f bl 48a0 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1060: 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; 1064: 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; 1068: e28ee01c add lr, lr, #28 106c: e8be000f ldm lr!, {r0, r1, r2, r3} 1070: e287c018 add ip, r7, #24 1074: e8ac000f stmia ip!, {r0, r1, r2, r3} 1078: 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; 107c: 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); 1080: 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; 1084: 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; 1088: 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); 108c: e1a03004 mov r3, r4 1090: e3a01001 mov r1, #1 1094: e1a02005 mov r2, r5 1098: e59f0084 ldr r0, [pc, #132] ; 1124 rtems_filesystem_root = loc; 109c: 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); 10a0: e58d5000 str r5, [sp] 10a4: eb000076 bl 1284 rtems_filesystem_root = loc; 10a8: e596c000 ldr ip, [r6] 10ac: e8b7000f ldm r7!, {r0, r1, r2, r3} 10b0: e28cc018 add ip, ip, #24 10b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 10b8: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10bc: 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; 10c0: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c4: e3a01001 mov r1, #1 10c8: e1a03004 mov r3, r4 10cc: e59f0050 ldr r0, [pc, #80] ; 1124 10d0: e58d5000 str r5, [sp] 10d4: eb00006a bl 1284 rtems_filesystem_current = loc; 10d8: e596c000 ldr ip, [r6] 10dc: e8b4000f ldm r4!, {r0, r1, r2, r3} 10e0: e28cc004 add ip, ip, #4 10e4: e8ac000f stmia ip!, {r0, r1, r2, r3} 10e8: 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); 10ec: e59f0034 ldr r0, [pc, #52] ; 1128 /* 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; 10f0: 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); 10f4: e59f1030 ldr r1, [pc, #48] ; 112c 10f8: eb0000fd bl 14f4 if ( status != 0 ) 10fc: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 1100: 159f0028 ldrne r0, [pc, #40] ; 1130 * 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 ) 1104: 1affffd4 bne 105c * 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. */ } 1108: e28dd01c add sp, sp, #28 110c: e8bd80f0 pop {r4, r5, r6, r7, pc} 1110: 00017188 .word 0x00017188 1114: 000176fc .word 0x000176fc 1118: abcd0001 .word 0xabcd0001 111c: 00016ff8 .word 0x00016ff8 1120: abcd0002 .word 0xabcd0002 1124: 00017f23 .word 0x00017f23 1128: 00017f25 .word 0x00017f25 112c: 000001ff .word 0x000001ff 1130: abcd0003 .word 0xabcd0003 0000866c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 866c: e5903000 ldr r3, [r0] <== NOT EXECUTED 8670: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 8674: e1530000 cmp r3, r0 <== NOT EXECUTED 8678: 13a00000 movne r0, #0 <== NOT EXECUTED 867c: 03a00001 moveq r0, #1 <== NOT EXECUTED 8680: e12fff1e bx lr <== NOT EXECUTED 00000ec4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ec4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED ec8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED ecc: e1a05001 mov r5, r1 <== NOT EXECUTED ed0: 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 ); ed4: eb002da2 bl c564 <== NOT EXECUTED ed8: e28d4004 add r4, sp, #4 <== NOT EXECUTED edc: e1a01000 mov r1, r0 <== NOT EXECUTED ee0: e3a02000 mov r2, #0 <== NOT EXECUTED ee4: e1a03004 mov r3, r4 <== NOT EXECUTED ee8: e3a0c001 mov ip, #1 <== NOT EXECUTED eec: e1a00006 mov r0, r6 <== NOT EXECUTED ef0: e58dc000 str ip, [sp] <== NOT EXECUTED ef4: eb0000e2 bl 1284 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { ef8: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED efc: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED f00: 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 ); f04: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; f08: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { f0c: 1a000009 bne f38 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f10: e592301c ldr r3, [r2, #28] <== NOT EXECUTED f14: e3530000 cmp r3, #0 <== NOT EXECUTED f18: 11a00004 movne r0, r4 <== NOT EXECUTED f1c: 11a0e00f movne lr, pc <== NOT EXECUTED f20: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); f24: eb00299d bl b5a0 <__errno> <== NOT EXECUTED f28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f2c: e5803000 str r3, [r0] <== NOT EXECUTED f30: e3e00000 mvn r0, #0 <== NOT EXECUTED f34: ea000026 b fd4 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); f38: e1a00004 mov r0, r4 <== NOT EXECUTED f3c: e1a0e00f mov lr, pc <== NOT EXECUTED f40: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { f44: e3570000 cmp r7, #0 <== NOT EXECUTED f48: 03500002 cmpeq r0, #2 <== NOT EXECUTED f4c: 03a0a000 moveq sl, #0 <== NOT EXECUTED f50: 13a0a001 movne sl, #1 <== NOT EXECUTED f54: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED f58: 0a000008 beq f80 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f5c: e3570000 cmp r7, #0 <== NOT EXECUTED f60: 0a000018 beq fc8 <== NOT EXECUTED f64: e597301c ldr r3, [r7, #28] <== NOT EXECUTED f68: e3530000 cmp r3, #0 <== NOT EXECUTED f6c: 0a000015 beq fc8 <== NOT EXECUTED f70: e1a00004 mov r0, r4 <== NOT EXECUTED f74: e1a0e00f mov lr, pc <== NOT EXECUTED f78: e12fff13 bx r3 <== NOT EXECUTED f7c: ea000011 b fc8 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; f80: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); f84: e1a00006 mov r0, r6 <== NOT EXECUTED f88: eb002d75 bl c564 <== NOT EXECUTED f8c: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; f90: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED f94: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; f98: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f9c: 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; fa0: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa4: 0a000009 beq fd0 <== NOT EXECUTED fa8: e597301c ldr r3, [r7, #28] <== NOT EXECUTED fac: e3530000 cmp r3, #0 <== NOT EXECUTED fb0: 0a000006 beq fd0 <== NOT EXECUTED fb4: e1a00004 mov r0, r4 <== NOT EXECUTED fb8: e1a0e00f mov lr, pc <== NOT EXECUTED fbc: e12fff13 bx r3 <== NOT EXECUTED fc0: e1a0000a mov r0, sl <== NOT EXECUTED fc4: ea000002 b fd4 <== NOT EXECUTED fc8: e3a0000d mov r0, #13 <== NOT EXECUTED fcc: ea000000 b fd4 <== NOT EXECUTED fd0: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } fd4: e28dd018 add sp, sp, #24 <== NOT EXECUTED fd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00001350 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1350: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1354: e59f4098 ldr r4, [pc, #152] ; 13f4 1358: e5940000 ldr r0, [r4] 135c: e3500000 cmp r0, #0 1360: 0a000013 beq 13b4 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1364: e3a01040 mov r1, #64 ; 0x40 1368: eb001c93 bl 85bc 136c: e59f3084 ldr r3, [pc, #132] ; 13f8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1370: 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, 1374: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1378: 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) 137c: 0a000015 beq 13d8 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1380: e59f3074 ldr r3, [pc, #116] ; 13fc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1384: 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; 1388: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 138c: e3a03000 mov r3, #0 1390: ea000000 b 1398 iop->data1 = iop + 1; 1394: 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++) 1398: e2833001 add r3, r3, #1 139c: e1530001 cmp r3, r1 iop->data1 = iop + 1; 13a0: 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++) 13a4: e2800040 add r0, r0, #64 ; 0x40 13a8: 3afffff9 bcc 1394 iop->data1 = iop + 1; iop->data1 = NULL; 13ac: e3a03000 mov r3, #0 13b0: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 13b4: e59fc044 ldr ip, [pc, #68] ; 1400 13b8: e59f0044 ldr r0, [pc, #68] ; 1404 13bc: e3a01001 mov r1, #1 13c0: e3a02054 mov r2, #84 ; 0x54 13c4: e3a03000 mov r3, #0 13c8: e58dc000 str ip, [sp] 13cc: eb000b0e bl 400c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 13d0: e3500000 cmp r0, #0 13d4: 0a000000 beq 13dc rtems_fatal_error_occurred( rc ); 13d8: eb000d30 bl 48a0 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 13dc: e59f3024 ldr r3, [pc, #36] ; 1408 13e0: e5933000 ldr r3, [r3] 13e4: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 13e8: 11a0e00f movne lr, pc 13ec: 112fff13 bxne r3 } 13f0: e8bd8018 pop {r3, r4, pc} 13f4: 00016ff0 .word 0x00016ff0 13f8: 000185a8 .word 0x000185a8 13fc: 000185ac .word 0x000185ac 1400: 000185b0 .word 0x000185b0 1404: 4c42494f .word 0x4c42494f 1408: 00016fec .word 0x00016fec 0002318c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 2318c: 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); 23190: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23194: 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); 23198: e1a01000 mov r1, r0 2319c: e28d2018 add r2, sp, #24 231a0: eb000423 bl 24234 if (sc != RTEMS_SUCCESSFUL) return sc; 231a4: e2508000 subs r8, r0, #0 231a8: 1a00003f bne 232ac /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 231ac: e59f4104 ldr r4, [pc, #260] ; 232b8 231b0: e59f3104 ldr r3, [pc, #260] ; 232bc 231b4: e5942000 ldr r2, [r4] 231b8: e1520003 cmp r2, r3 231bc: 1a00000f bne 23200 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 231c0: e2800048 add r0, r0, #72 ; 0x48 231c4: ebff8991 bl 5810 if (!tmp) 231c8: e2505000 subs r5, r0, #0 231cc: 03a0801a moveq r8, #26 231d0: 0a000035 beq 232ac #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); 231d4: e1a00008 mov r0, r8 231d8: e1a01004 mov r1, r4 231dc: e59f20dc ldr r2, [pc, #220] ; 232c0 231e0: eb00050a bl 24610 if (sc != RTEMS_SUCCESSFUL) { 231e4: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 231e8: 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) { 231ec: 0a000003 beq 23200 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 231f0: e1a00005 mov r0, r5 <== NOT EXECUTED 231f4: ebff8803 bl 5208 <== NOT EXECUTED 231f8: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 231fc: ea00002a b 232ac <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 23200: e59f60b0 ldr r6, [pc, #176] ; 232b8 23204: e5964000 ldr r4, [r6] 23208: e59f10ac ldr r1, [pc, #172] ; 232bc 2320c: e3a02048 mov r2, #72 ; 0x48 23210: e1a00004 mov r0, r4 23214: eb005eb0 bl 3acdc rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23218: e59f30a4 ldr r3, [pc, #164] ; 232c4 2321c: 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*/ 23220: e59d3018 ldr r3, [sp, #24] 23224: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23228: 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*/ 2322c: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23230: e8be000f ldm lr!, {r0, r1, r2, r3} 23234: e8ac000f stmia ip!, {r0, r1, r2, r3} 23238: 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); 2323c: e28d4004 add r4, sp, #4 23240: 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; 23244: 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); 23248: e3a01001 mov r1, #1 2324c: e1a03004 mov r3, r4 23250: e1a02005 mov r2, r5 23254: e59f006c ldr r0, [pc, #108] ; 232c8 rtems_filesystem_root = loc; 23258: 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); 2325c: e58d5000 str r5, [sp] 23260: ebff87b5 bl 513c rtems_filesystem_root = loc; 23264: e596c000 ldr ip, [r6] 23268: e8b7000f ldm r7!, {r0, r1, r2, r3} 2326c: e28cc018 add ip, ip, #24 23270: e8ac000f stmia ip!, {r0, r1, r2, r3} 23274: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23278: 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; 2327c: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23280: e3a01001 mov r1, #1 23284: e1a03004 mov r3, r4 23288: e59f0038 ldr r0, [pc, #56] ; 232c8 2328c: e58d5000 str r5, [sp] 23290: ebff87a9 bl 513c rtems_filesystem_current = loc; 23294: e596c000 ldr ip, [r6] 23298: e8b4000f ldm r4!, {r0, r1, r2, r3} 2329c: e28cc004 add ip, ip, #4 232a0: e8ac000f stmia ip!, {r0, r1, r2, r3} 232a4: e5973000 ldr r3, [r7] 232a8: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 232ac: e1a00008 mov r0, r8 232b0: e28dd01c add sp, sp, #28 232b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 232b8: 00052008 .word 0x00052008 232bc: 0005f524 .word 0x0005f524 232c0: 00023084 .word 0x00023084 232c4: 0005f50c .word 0x0005f50c 232c8: 000565db .word 0x000565db 000230e8 : * 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) { 230e8: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 230ec: 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); 230f0: e3a00000 mov r0, #0 <== NOT EXECUTED 230f4: e1a01000 mov r1, r0 <== NOT EXECUTED 230f8: e1a0200d mov r2, sp <== NOT EXECUTED 230fc: eb00044c bl 24234 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 23100: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23104: 1a00001b bne 23178 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 23108: e59f1070 ldr r1, [pc, #112] ; 23180 <== NOT EXECUTED 2310c: e5914000 ldr r4, [r1] <== NOT EXECUTED 23110: e59d3000 ldr r3, [sp] <== NOT EXECUTED 23114: e5942000 ldr r2, [r4] <== NOT EXECUTED 23118: e1520003 cmp r2, r3 <== NOT EXECUTED 2311c: 1a000004 bne 23134 <== 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); 23120: eb000563 bl 246b4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 23124: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23128: 1a000012 bne 23178 <== NOT EXECUTED free_user_env(tmp); 2312c: e1a00004 mov r0, r4 <== NOT EXECUTED 23130: ebffffd3 bl 23084 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 23134: e59f4044 ldr r4, [pc, #68] ; 23180 <== NOT EXECUTED 23138: e1a00005 mov r0, r5 <== NOT EXECUTED 2313c: e1a01004 mov r1, r4 <== NOT EXECUTED 23140: e28d2004 add r2, sp, #4 <== NOT EXECUTED 23144: eb000577 bl 24728 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 23148: e2503000 subs r3, r0, #0 <== NOT EXECUTED 2314c: 1a000006 bne 2316c <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 23150: e59f202c ldr r2, [pc, #44] ; 23184 <== NOT EXECUTED 23154: e1a01004 mov r1, r4 <== NOT EXECUTED 23158: eb00052c bl 24610 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2315c: 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; 23160: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 23164: 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) 23168: 0a000002 beq 23178 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 2316c: e59f1014 ldr r1, [pc, #20] ; 23188 <== NOT EXECUTED 23170: e59f2008 ldr r2, [pc, #8] ; 23180 <== NOT EXECUTED 23174: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 23178: e1a00003 mov r0, r3 <== NOT EXECUTED 2317c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 23180: 00052008 .word 0x00052008 23184: 00023084 .word 0x00023084 23188: 0005f524 .word 0x0005f524 00005908 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5908: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 590c: e59f3038 ldr r3, [pc, #56] ; 594c <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5910: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5914: e1a0200d mov r2, sp <== NOT EXECUTED 5918: e5930000 ldr r0, [r3] <== NOT EXECUTED 591c: eb00153a bl ae0c <_Protected_heap_Get_block_size> <== NOT EXECUTED 5920: e3500000 cmp r0, #0 <== NOT EXECUTED 5924: 0a000007 beq 5948 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 5928: e59f3020 ldr r3, [pc, #32] ; 5950 <== NOT EXECUTED 592c: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5930: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 5934: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5938: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 593c: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5940: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 5944: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 5948: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 594c: 00051d3c .word 0x00051d3c 5950: 0005f4e0 .word 0x0005f4e0 00005954 : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 5954: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5958: 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 ) 595c: 0a000013 beq 59b0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 5960: e28d2004 add r2, sp, #4 <== NOT EXECUTED 5964: e3a03000 mov r3, #0 <== NOT EXECUTED 5968: 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); 596c: e59f3040 ldr r3, [pc, #64] ; 59b4 <== NOT EXECUTED 5970: e1a0200d mov r2, sp <== NOT EXECUTED 5974: e5930000 ldr r0, [r3] <== NOT EXECUTED 5978: eb001523 bl ae0c <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 597c: e59f3034 ldr r3, [pc, #52] ; 59b8 <== NOT EXECUTED 5980: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5984: e283c01c add ip, r3, #28 <== NOT EXECUTED 5988: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 598c: 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); 5990: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 5994: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 5998: 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); 599c: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (current_depth > s->max_depth) 59a0: 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); 59a4: e583001c str r0, [r3, #28] <== NOT EXECUTED 59a8: 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; 59ac: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 59b0: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 59b4: 00051d3c .word 0x00051d3c 59b8: 0005f4e0 .word 0x0005f4e0 000059bc : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 59bc: e59f0008 ldr r0, [pc, #8] ; 59cc <== NOT EXECUTED 59c0: e3a01000 mov r1, #0 <== NOT EXECUTED 59c4: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 59c8: ea00d54a b 3aef8 <== NOT EXECUTED 59cc: 0005f4e0 .word 0x0005f4e0 00005f50 : void rtems_panic( const char *printf_format, ... ) { 5f50: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 5f54: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 5f58: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5f5c: e1a02003 mov r2, r3 <== NOT EXECUTED 5f60: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 5f64: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 5f68: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5f6c: ebffff8e bl 5dac <== NOT EXECUTED va_end(arglist); } 5f70: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f74: e28dd010 add sp, sp, #16 <== NOT EXECUTED 5f78: e12fff1e bx lr <== NOT EXECUTED 00009ec4 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) 9ec4: e59f3048 ldr r3, [pc, #72] ; 9f14 9ec8: e5d33000 ldrb r3, [r3] 9ecc: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 9ed0: e92d4001 push {r0, lr} if (!rtems_pipe_configured) 9ed4: 0a00000d beq 9f10 return; if (rtems_pipe_semaphore) 9ed8: e59fc038 ldr ip, [pc, #56] ; 9f18 <== NOT EXECUTED 9edc: e59c3000 ldr r3, [ip] <== NOT EXECUTED 9ee0: e3530000 cmp r3, #0 <== NOT EXECUTED 9ee4: 1a000009 bne 9f10 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 9ee8: e59f002c ldr r0, [pc, #44] ; 9f1c <== NOT EXECUTED 9eec: e3a01001 mov r1, #1 <== NOT EXECUTED 9ef0: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED 9ef4: e58dc000 str ip, [sp] <== NOT EXECUTED 9ef8: ebffe843 bl 400c <== 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) 9efc: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 9f00: 1bffea66 blne 48a0 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 9f04: ebffe745 bl 3c20 <== NOT EXECUTED rtems_pipe_no = now; 9f08: e59f3010 ldr r3, [pc, #16] ; 9f20 <== NOT EXECUTED 9f0c: e1c300b0 strh r0, [r3] <== NOT EXECUTED } 9f10: e8bd8008 pop {r3, pc} 9f14: 00018404 .word 0x00018404 9f18: 00018524 .word 0x00018524 9f1c: 50495045 .word 0x50495045 9f20: 0001852a .word 0x0001852a 000039dc : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39dc: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 39e0: e59f307c ldr r3, [pc, #124] ; 3a64 39e4: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39e8: e59300c4 ldr r0, [r3, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39ec: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39f0: e15b0000 cmp fp, r0 39f4: 33a04000 movcc r4, #0 39f8: 3a000004 bcc 3a10 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 39fc: e59340c0 ldr r4, [r3, #192] ; 0xc0 3a00: e0804004 add r4, r0, r4 3a04: e15b0004 cmp fp, r4 3a08: 83a04000 movhi r4, #0 3a0c: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3a10: e59f3050 ldr r3, [pc, #80] ; 3a68 3a14: e5933000 ldr r3, [r3] 3a18: e3530000 cmp r3, #0 3a1c: 03a01001 moveq r1, #1 3a20: 0a000005 beq 3a3c pattern_ok = (!memcmp( 3a24: e59f1040 ldr r1, [pc, #64] ; 3a6c 3a28: e2800008 add r0, r0, #8 3a2c: e3a02010 mov r2, #16 3a30: eb00dc7f bl 3ac34 3a34: e2701001 rsbs r1, r0, #1 3a38: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3a3c: e3540000 cmp r4, #0 3a40: 0a000002 beq 3a50 3a44: e3510000 cmp r1, #0 3a48: 13a00000 movne r0, #0 3a4c: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3a50: e59f300c ldr r3, [pc, #12] ; 3a64 <== NOT EXECUTED 3a54: e5930000 ldr r0, [r3] <== NOT EXECUTED 3a58: ebffffb4 bl 3930 <== NOT EXECUTED 3a5c: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3a60: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 3a64: 0005f700 .word 0x0005f700 3a68: 0005c9d4 .word 0x0005c9d4 3a6c: 0005f4b0 .word 0x0005f4b0 00003920 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 3920: e59f1004 ldr r1, [pc, #4] ; 392c <== NOT EXECUTED 3924: e3a00000 mov r0, #0 <== NOT EXECUTED 3928: eaffffe3 b 38bc <== NOT EXECUTED 392c: 0000634c .word 0x0000634c 000038bc : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38bc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 38c0: e59f4048 ldr r4, [pc, #72] ; 3910 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c4: e1a05001 mov r5, r1 <== NOT EXECUTED 38c8: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 38cc: 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; 38d0: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 38d4: e59f1038 ldr r1, [pc, #56] ; 3914 <== NOT EXECUTED 38d8: e1a0e00f mov lr, pc <== NOT EXECUTED 38dc: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 38e0: e59f1030 ldr r1, [pc, #48] ; 3918 <== NOT EXECUTED 38e4: e1a00006 mov r0, r6 <== NOT EXECUTED 38e8: e1a0e00f mov lr, pc <== NOT EXECUTED 38ec: 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 ); 38f0: e59f0024 ldr r0, [pc, #36] ; 391c <== NOT EXECUTED 38f4: eb001b3d bl a5f0 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 38f8: e3e00000 mvn r0, #0 <== NOT EXECUTED 38fc: ebffff9f bl 3780 <== NOT EXECUTED print_context = NULL; 3900: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 3904: 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; 3908: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 390c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3910: 0005c9d4 .word 0x0005c9d4 3914: 0005641d .word 0x0005641d 3918: 00056434 .word 0x00056434 391c: 00003780 .word 0x00003780 0000a2b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a2b0: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a2b4: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a2b8: e1a07000 mov r7, r0 <== NOT EXECUTED a2bc: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a2c0: 03a00009 moveq r0, #9 <== NOT EXECUTED a2c4: 0a00001e beq a344 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; a2c8: eb000848 bl c3f0 <__errno> <== NOT EXECUTED a2cc: e3a03000 mov r3, #0 <== NOT EXECUTED a2d0: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; a2d4: e3a02000 mov r2, #0 <== NOT EXECUTED a2d8: e3a03000 mov r3, #0 <== NOT EXECUTED a2dc: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a2e0: e1a00007 mov r0, r7 <== NOT EXECUTED a2e4: e1a0100d mov r1, sp <== NOT EXECUTED a2e8: eb0013b7 bl f1cc <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) a2ec: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; a2f0: 159d3000 ldrne r3, [sp] <== NOT EXECUTED a2f4: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) a2f8: e59d3000 ldr r3, [sp] <== NOT EXECUTED a2fc: e1530007 cmp r3, r7 <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a300: e1a05000 mov r5, r0 <== NOT EXECUTED a304: e1a06001 mov r6, r1 <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a308: 03a0000b moveq r0, #11 <== NOT EXECUTED a30c: 0a00000c beq a344 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a310: e1a00005 mov r0, r5 <== NOT EXECUTED a314: e59f202c ldr r2, [pc, #44] ; a348 <== NOT EXECUTED a318: e3e03000 mvn r3, #0 <== NOT EXECUTED a31c: ebffe22d bl 2bd8 <__gedf2> <== NOT EXECUTED a320: e3500000 cmp r0, #0 <== NOT EXECUTED a324: da000004 ble a33c <== NOT EXECUTED a328: eb000830 bl c3f0 <__errno> <== NOT EXECUTED a32c: e5903000 ldr r3, [r0] <== NOT EXECUTED a330: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a334: 03a0000a moveq r0, #10 <== NOT EXECUTED a338: 0a000001 beq a344 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a33c: e8840060 stm r4, {r5, r6} <== NOT EXECUTED a340: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } a344: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED a348: 7fefffff .word 0x7fefffff 0000a34c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a34c: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a350: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a354: e1a05000 mov r5, r0 a358: e1a07002 mov r7, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a35c: 03a00009 moveq r0, #9 a360: 0a00001b beq a3d4 return RTEMS_INVALID_ADDRESS; errno = 0; a364: eb000821 bl c3f0 <__errno> a368: e3a03000 mov r3, #0 a36c: e5803000 str r3, [r0] *n = 0; a370: e3a03000 mov r3, #0 a374: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a378: e1a00005 mov r0, r5 a37c: e1a0100d mov r1, sp a380: eb00137e bl f180 #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 ) a384: e3570000 cmp r7, #0 *endptr = end; a388: 159d3000 ldrne r3, [sp] a38c: 15873000 strne r3, [r7] /* nothing was converted */ if ( end == s ) a390: e59d3000 ldr r3, [sp] a394: e1530005 cmp r3, r5 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a398: e1a06000 mov r6, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a39c: 03a0000b moveq r0, #11 a3a0: 0a00000b beq a3d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a3a4: e1a00006 mov r0, r6 a3a8: e59f1028 ldr r1, [pc, #40] ; a3d8 a3ac: ebffe254 bl 2d04 <__gesf2> a3b0: e3500000 cmp r0, #0 a3b4: da000004 ble a3cc a3b8: eb00080c bl c3f0 <__errno> <== NOT EXECUTED a3bc: e5903000 ldr r3, [r0] <== NOT EXECUTED a3c0: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a3c4: 03a0000a moveq r0, #10 <== NOT EXECUTED a3c8: 0a000001 beq a3d4 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a3cc: e5846000 str r6, [r4] a3d0: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } a3d4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} a3d8: 7f7fffff .word 0x7f7fffff 00019c9c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19c9c: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19ca0: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19ca4: e1a05000 mov r5, r0 19ca8: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19cac: 03a00009 moveq r0, #9 19cb0: 0a000018 beq 19d18 return RTEMS_INVALID_ADDRESS; errno = 0; 19cb4: eb0077d7 bl 37c18 <__errno> 19cb8: e3a03000 mov r3, #0 19cbc: e5803000 str r3, [r0] *n = 0; 19cc0: 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 ); 19cc4: e1a00005 mov r0, r5 19cc8: e1a0100d mov r1, sp 19ccc: e3a02010 mov r2, #16 19cd0: eb009766 bl 3fa70 #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 ) 19cd4: e3560000 cmp r6, #0 *endptr = end; 19cd8: 159d3000 ldrne r3, [sp] 19cdc: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 19ce0: e59d3000 ldr r3, [sp] 19ce4: 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 ); 19ce8: 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 ) 19cec: 03a0000b moveq r0, #11 19cf0: 0a000008 beq 19d18 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 19cf4: e3770001 cmn r7, #1 19cf8: 1a000004 bne 19d10 19cfc: eb0077c5 bl 37c18 <__errno> <== NOT EXECUTED 19d00: e5903000 ldr r3, [r0] <== NOT EXECUTED 19d04: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 19d08: 03a0000a moveq r0, #10 <== NOT EXECUTED 19d0c: 0a000001 beq 19d18 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 19d10: e5847000 str r7, [r4] 19d14: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 19d18: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00003380 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3380: e3500009 cmp r0, #9 3384: 012fff1e bxeq lr 3388: ca000016 bgt 33e8 338c: e3500004 cmp r0, #4 3390: 012fff1e bxeq lr 3394: ca00000a bgt 33c4 3398: e3500001 cmp r0, #1 339c: 012fff1e bxeq lr 33a0: ca000002 bgt 33b0 33a4: e3500000 cmp r0, #0 33a8: 012fff1e bxeq lr 33ac: ea000030 b 3474 33b0: e3500002 cmp r0, #2 <== NOT EXECUTED 33b4: 012fff1e bxeq lr <== NOT EXECUTED 33b8: e3500003 cmp r0, #3 <== NOT EXECUTED 33bc: 1a00002c bne 3474 <== NOT EXECUTED 33c0: e12fff1e bx lr <== NOT EXECUTED 33c4: e3500006 cmp r0, #6 <== NOT EXECUTED 33c8: 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; 33cc: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 33d0: b12fff1e bxlt lr <== NOT EXECUTED 33d4: e3500007 cmp r0, #7 <== NOT EXECUTED 33d8: 012fff1e bxeq lr <== NOT EXECUTED 33dc: e3500008 cmp r0, #8 <== NOT EXECUTED 33e0: 1a000023 bne 3474 <== NOT EXECUTED 33e4: e12fff1e bx lr <== NOT EXECUTED 33e8: e350000e cmp r0, #14 <== NOT EXECUTED 33ec: 012fff1e bxeq lr <== NOT EXECUTED 33f0: ca000008 bgt 3418 <== NOT EXECUTED 33f4: e350000b cmp r0, #11 <== NOT EXECUTED 33f8: 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; 33fc: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3400: b12fff1e bxlt lr <== NOT EXECUTED 3404: e350000c cmp r0, #12 <== NOT EXECUTED 3408: 012fff1e bxeq lr <== NOT EXECUTED 340c: e350000d cmp r0, #13 <== NOT EXECUTED 3410: 1a000017 bne 3474 <== NOT EXECUTED 3414: e12fff1e bx lr <== NOT EXECUTED 3418: e59f305c ldr r3, [pc, #92] ; 347c <== NOT EXECUTED 341c: 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; 3420: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3424: 012fff1e bxeq lr <== NOT EXECUTED 3428: ca000005 bgt 3444 <== NOT EXECUTED 342c: e350000f cmp r0, #15 <== NOT EXECUTED 3430: 012fff1e bxeq lr <== NOT EXECUTED 3434: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3438: e1500003 cmp r0, r3 <== NOT EXECUTED 343c: 1a00000c bne 3474 <== NOT EXECUTED 3440: ea000007 b 3464 <== NOT EXECUTED 3444: e59f3034 ldr r3, [pc, #52] ; 3480 <== NOT EXECUTED 3448: 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; 344c: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3450: 012fff1e bxeq lr <== NOT EXECUTED 3454: e2833001 add r3, r3, #1 <== NOT EXECUTED 3458: e1500003 cmp r0, r3 <== NOT EXECUTED 345c: 1a000004 bne 3474 <== NOT EXECUTED 3460: ea000001 b 346c <== 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; 3464: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 3468: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 346c: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3470: e12fff1e bx lr <== NOT EXECUTED 3474: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 3478: e12fff1e bx lr 347c: 00001002 .word 0x00001002 3480: 00001003 .word 0x00001003 00001eac : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 1eac: e59f3008 ldr r3, [pc, #8] ; 1ebc <== NOT EXECUTED 1eb0: 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; } 1eb4: e3a00000 mov r0, #0 <== NOT EXECUTED 1eb8: e12fff1e bx lr <== NOT EXECUTED 1ebc: 00017174 .word 0x00017174 000032b8 : { 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); 32b8: e59f2180 ldr r2, [pc, #384] ; 3440 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32bc: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32c0: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 32c4: e92d4030 push {r4, r5, lr} 32c8: 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); 32cc: e5920000 ldr r0, [r2] 32d0: 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; 32d4: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32d8: eb0003dd bl 4254 if (sc != RTEMS_SUCCESSFUL) 32dc: e3500000 cmp r0, #0 32e0: 1a000022 bne 3370 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 32e4: e5943008 ldr r3, [r4, #8] 32e8: e2433001 sub r3, r3, #1 32ec: e3530000 cmp r3, #0 32f0: e5843008 str r3, [r4, #8] 32f4: 1a00004c bne 342c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 32f8: e59420cc ldr r2, [r4, #204] ; 0xcc 32fc: e59f3140 ldr r3, [pc, #320] ; 3444 3300: e0833282 add r3, r3, r2, lsl #5 3304: e5931004 ldr r1, [r3, #4] 3308: e3510000 cmp r1, #0 330c: 0a000003 beq 3320 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3310: e1a00004 mov r0, r4 <== NOT EXECUTED 3314: e1a0e00f mov lr, pc <== NOT EXECUTED 3318: e12fff11 bx r1 <== NOT EXECUTED 331c: ea000006 b 333c <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3320: e5940018 ldr r0, [r4, #24] 3324: e1a02001 mov r2, r1 3328: eb0003c9 bl 4254 if (sc != RTEMS_SUCCESSFUL) { 332c: e3500000 cmp r0, #0 3330: 1a00000e bne 3370 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3334: e1a00004 mov r0, r4 3338: ebfffe05 bl 2b54 } if (tty->device.outputUsesInterrupts 333c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3340: e3530002 cmp r3, #2 3344: 1a00000a bne 3374 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 3348: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 334c: e3a01001 mov r1, #1 <== NOT EXECUTED 3350: eb0002ab bl 3e04 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3354: e3500000 cmp r0, #0 <== NOT EXECUTED 3358: 1a000004 bne 3370 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 335c: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3360: e3a01001 mov r1, #1 <== NOT EXECUTED 3364: eb0002a6 bl 3e04 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3368: e3500000 cmp r0, #0 <== NOT EXECUTED 336c: 0a000000 beq 3374 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3370: eb00054a bl 48a0 <== NOT EXECUTED } if (tty->device.lastClose) 3374: e594309c ldr r3, [r4, #156] ; 0x9c 3378: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 337c: 11a02005 movne r2, r5 3380: 1284000c addne r0, r4, #12 3384: 18900003 ldmne r0, {r0, r1} 3388: 11a0e00f movne lr, pc 338c: 112fff13 bxne r3 if (tty->forw == NULL) { 3390: e894000c ldm r4, {r2, r3} 3394: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3398: 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) { 339c: 1a000003 bne 33b0 rtems_termios_ttyTail = tty->back; 33a0: e59f10a0 ldr r1, [pc, #160] ; 3448 if ( rtems_termios_ttyTail != NULL ) { 33a4: 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; 33a8: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 33ac: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33b0: e5942004 ldr r2, [r4, #4] 33b4: e5943000 ldr r3, [r4] 33b8: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 33bc: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33c0: 1a000003 bne 33d4 rtems_termios_ttyHead = tty->forw; 33c4: e59f1080 ldr r1, [pc, #128] ; 344c if ( rtems_termios_ttyHead != NULL ) { 33c8: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 33cc: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 33d0: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 33d4: e5940014 ldr r0, [r4, #20] 33d8: eb000376 bl 41b8 rtems_semaphore_delete (tty->osem); 33dc: e5940018 ldr r0, [r4, #24] 33e0: eb000374 bl 41b8 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 33e4: e594008c ldr r0, [r4, #140] ; 0x8c 33e8: eb000372 bl 41b8 if ((tty->device.pollRead == NULL) || 33ec: e59430a0 ldr r3, [r4, #160] ; 0xa0 33f0: e3530000 cmp r3, #0 33f4: 0a000002 beq 3404 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 33f8: e59430b4 ldr r3, [r4, #180] ; 0xb4 33fc: e3530002 cmp r3, #2 3400: 1a000001 bne 340c rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3404: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3408: eb00036a bl 41b8 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 340c: e5940058 ldr r0, [r4, #88] ; 0x58 3410: eb0014a5 bl 86ac free (tty->rawOutBuf.theBuf); 3414: e594007c ldr r0, [r4, #124] ; 0x7c 3418: eb0014a3 bl 86ac free (tty->cbuf); 341c: e594001c ldr r0, [r4, #28] 3420: eb0014a1 bl 86ac free (tty); 3424: e1a00004 mov r0, r4 3428: eb00149f bl 86ac } rtems_semaphore_release (rtems_termios_ttyMutex); 342c: e59f300c ldr r3, [pc, #12] ; 3440 3430: e5930000 ldr r0, [r3] 3434: eb0003cc bl 436c return RTEMS_SUCCESSFUL; } 3438: e3a00000 mov r0, #0 343c: e8bd8030 pop {r4, r5, pc} 3440: 000185ec .word 0x000185ec 3444: 00018418 .word 0x00018418 3448: 000185f0 .word 0x000185f0 344c: 000185f4 .word 0x000185f4 000020b0 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b0: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20b4: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b8: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20bc: 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) { 20c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20c4: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20c8: 1a000005 bne 20e4 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 20cc: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 20d0: e1a01002 mov r1, r2 <== NOT EXECUTED 20d4: eb00074a bl 3e04 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 20d8: e3500000 cmp r0, #0 <== NOT EXECUTED 20dc: 0a00000c beq 2114 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20e0: eb0009ee bl 48a0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 20e4: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 20e8: e3530005 cmp r3, #5 <== NOT EXECUTED 20ec: 1a000006 bne 210c <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 20f0: e59f3024 ldr r3, [pc, #36] ; 211c <== NOT EXECUTED 20f4: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 20f8: e3530000 cmp r3, #0 <== NOT EXECUTED 20fc: 0a000004 beq 2114 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2100: e1a0e00f mov lr, pc <== NOT EXECUTED 2104: e12fff13 bx r3 <== NOT EXECUTED 2108: ea000001 b 2114 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 210c: 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); 2110: eaffff6d b 1ecc <== NOT EXECUTED } } 2114: e3a00000 mov r0, #0 <== NOT EXECUTED 2118: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 211c: 00018418 .word 0x00018418 00002120 : * 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) { 2120: 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) { 2124: e59f32b8 ldr r3, [pc, #696] ; 23e4 <== 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) { 2128: 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) { 212c: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2130: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2134: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 2138: 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) { 213c: 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); 2140: 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); 2144: 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); 2148: 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) { 214c: 1a00000e bne 218c <== 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); 2150: e1a08002 mov r8, r2 <== NOT EXECUTED 2154: 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, 2158: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 215c: 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); 2160: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2164: e1a09006 mov r9, r6 <== NOT EXECUTED 2168: e1a05006 mov r5, r6 <== NOT EXECUTED 216c: ea000091 b 23b8 <== 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); 2170: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2174: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 2178: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 217c: e1a0e00f mov lr, pc <== NOT EXECUTED 2180: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2184: e2866001 add r6, r6, #1 <== NOT EXECUTED 2188: 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--) { 218c: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2190: 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--) { 2194: 1afffff5 bne 2170 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2198: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 219c: e3530000 cmp r3, #0 <== NOT EXECUTED 21a0: 1a00008c bne 23d8 <== NOT EXECUTED 21a4: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 21a8: e3530000 cmp r3, #0 <== NOT EXECUTED 21ac: 0a000089 beq 23d8 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 21b0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 21b4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 21b8: e1a0e00f mov lr, pc <== NOT EXECUTED 21bc: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 21c0: e3a03001 mov r3, #1 <== NOT EXECUTED 21c4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21c8: ea000083 b 23dc <== 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) { 21cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 21d0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 21d4: 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) { 21d8: 0a00000f beq 221c <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 21dc: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 21e0: e152000a cmp r2, sl <== NOT EXECUTED 21e4: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 21e8: 1a000007 bne 220c <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 21ec: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 21f0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21f4: 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; 21f8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21fc: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2200: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2204: e3a09001 mov r9, #1 <== NOT EXECUTED 2208: ea000005 b 2224 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 220c: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2210: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2214: 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]) { 2218: 0afffff8 beq 2200 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 221c: e3590000 cmp r9, #0 <== NOT EXECUTED 2220: 0a000015 beq 227c <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2224: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2228: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 222c: e3530020 cmp r3, #32 <== NOT EXECUTED 2230: 1a00005e bne 23b0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2234: e10f7000 mrs r7, CPSR <== NOT EXECUTED 2238: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 223c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2240: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2244: 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; 2248: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 224c: 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; 2250: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2254: 0a000006 beq 2274 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 2258: 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, 225c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2260: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2264: e0811003 add r1, r1, r3 <== NOT EXECUTED 2268: e3a02001 mov r2, #1 <== NOT EXECUTED 226c: e1a0e00f mov lr, pc <== NOT EXECUTED 2270: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2274: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 2278: ea00004c b 23b0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 227c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2280: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2284: e2800001 add r0, r0, #1 <== NOT EXECUTED 2288: eb004acb bl 14dbc <__umodsi3> <== NOT EXECUTED 228c: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2290: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2294: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 2298: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 229c: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 22a0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 22a4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22a8: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 22ac: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 22b0: e0800007 add r0, r0, r7 <== NOT EXECUTED 22b4: eb004ac0 bl 14dbc <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 22b8: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 22bc: e1500003 cmp r0, r3 <== NOT EXECUTED 22c0: 9a000025 bls 235c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 22c4: 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) 22c8: e3130001 tst r3, #1 <== NOT EXECUTED 22cc: 1a000022 bne 235c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 22d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22d4: e3833001 orr r3, r3, #1 <== NOT EXECUTED 22d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 22dc: e59f3104 ldr r3, [pc, #260] ; 23e8 <== NOT EXECUTED 22e0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 22e4: e0023003 and r3, r2, r3 <== NOT EXECUTED 22e8: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22ec: 1a00000e bne 232c <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 22f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22f4: e3130020 tst r3, #32 <== NOT EXECUTED 22f8: 1a000002 bne 2308 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 22fc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2300: e3530000 cmp r3, #0 <== NOT EXECUTED 2304: 1a000014 bne 235c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2308: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 230c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2310: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2314: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2318: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 231c: e3a02001 mov r2, #1 <== NOT EXECUTED 2320: e1a0e00f mov lr, pc <== NOT EXECUTED 2324: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2328: ea00000b b 235c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 232c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2330: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2334: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2338: 1a000007 bne 235c <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 233c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2340: 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; 2344: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2348: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 234c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2350: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2354: 11a0e00f movne lr, pc <== NOT EXECUTED 2358: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 235c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2360: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2364: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2368: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 236c: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2370: 0a00000e beq 23b0 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2374: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2378: 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 )) { 237c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2380: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2384: 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 )) { 2388: 1a000008 bne 23b0 <== NOT EXECUTED 238c: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2390: e3530000 cmp r3, #0 <== NOT EXECUTED 2394: 0a000005 beq 23b0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2398: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 239c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 23a0: e1a0e00f mov lr, pc <== NOT EXECUTED 23a4: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 23a8: e3a02001 mov r2, #1 <== NOT EXECUTED 23ac: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 23b0: e2866001 add r6, r6, #1 <== NOT EXECUTED 23b4: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 23b8: e3580000 cmp r8, #0 <== NOT EXECUTED 23bc: 1affff82 bne 21cc <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 23c0: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 23c4: e0833005 add r3, r3, r5 <== NOT EXECUTED 23c8: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 23cc: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 23d0: eb0007e5 bl 436c <== NOT EXECUTED return dropped; 23d4: ea000000 b 23dc <== NOT EXECUTED 23d8: e3a05000 mov r5, #0 <== NOT EXECUTED } 23dc: e1a00005 mov r0, r5 <== NOT EXECUTED 23e0: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 23e4: 00018418 .word 0x00018418 23e8: 00000402 .word 0x00000402 00002f10 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2f10: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2f14: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f18: 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; 2f1c: 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; 2f20: e5934034 ldr r4, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f24: 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); 2f28: e1a02001 mov r2, r1 2f2c: 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; 2f30: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2f34: eb0004c6 bl 4254 if (sc != RTEMS_SUCCESSFUL) { 2f38: e2506000 subs r6, r0, #0 2f3c: 1a0000d7 bne 32a0 args->ioctl_return = sc; return sc; } switch (args->command) { 2f40: e5953004 ldr r3, [r5, #4] 2f44: e3530004 cmp r3, #4 2f48: 0a0000ab beq 31fc 2f4c: 8a000005 bhi 2f68 2f50: e3530002 cmp r3, #2 2f54: 0a000029 beq 3000 2f58: 8a0000a0 bhi 31e0 2f5c: e3530001 cmp r3, #1 2f60: 1a000010 bne 2fa8 2f64: ea00001b b 2fd8 2f68: e59f233c ldr r2, [pc, #828] ; 32ac <== NOT EXECUTED 2f6c: e1530002 cmp r3, r2 <== NOT EXECUTED 2f70: 0a0000bd beq 326c <== NOT EXECUTED 2f74: 8a000002 bhi 2f84 <== NOT EXECUTED 2f78: e3530005 cmp r3, #5 <== NOT EXECUTED 2f7c: 1a000009 bne 2fa8 <== NOT EXECUTED 2f80: ea000099 b 31ec <== NOT EXECUTED 2f84: e59f2324 ldr r2, [pc, #804] ; 32b0 <== NOT EXECUTED 2f88: 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; 2f8c: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 2f90: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2f94: 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) { 2f98: 0a0000be beq 3298 <== NOT EXECUTED 2f9c: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 2fa0: e1530002 cmp r3, r2 <== NOT EXECUTED 2fa4: 0a000098 beq 320c <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2fa8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2fac: e59f3300 ldr r3, [pc, #768] ; 32b4 <== NOT EXECUTED 2fb0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2fb4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 2fbc: 03a0600a moveq r6, #10 <== NOT EXECUTED 2fc0: 0a0000b4 beq 3298 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 2fc4: e1a00004 mov r0, r4 <== NOT EXECUTED 2fc8: e1a01005 mov r1, r5 <== NOT EXECUTED 2fcc: e1a0e00f mov lr, pc <== NOT EXECUTED 2fd0: e12fff13 bx r3 <== NOT EXECUTED 2fd4: ea0000a2 b 3264 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 2fd8: e5957008 ldr r7, [r5, #8] 2fdc: e284c030 add ip, r4, #48 ; 0x30 2fe0: e8bc000f ldm ip!, {r0, r1, r2, r3} 2fe4: e1a0e007 mov lr, r7 2fe8: e8ae000f stmia lr!, {r0, r1, r2, r3} 2fec: e8bc000f ldm ip!, {r0, r1, r2, r3} 2ff0: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff4: e59c3000 ldr r3, [ip] 2ff8: e58e3000 str r3, [lr] break; 2ffc: ea0000a5 b 3298 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3000: e595e008 ldr lr, [r5, #8] 3004: e8be000f ldm lr!, {r0, r1, r2, r3} 3008: e284c030 add ip, r4, #48 ; 0x30 300c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3010: e8be000f ldm lr!, {r0, r1, r2, r3} 3014: 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) && 3018: 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; 301c: 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) && 3020: 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; 3024: 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) && 3028: 0a000019 beq 3094 302c: e5943030 ldr r3, [r4, #48] ; 0x30 3030: e3130b01 tst r3, #1024 ; 0x400 3034: 1a000016 bne 3094 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3038: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 303c: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3040: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3044: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3048: e3130020 tst r3, #32 <== NOT EXECUTED 304c: 0a000010 beq 3094 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3050: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3054: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 3058: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 305c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3060: 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; 3064: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3068: 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; 306c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3070: 0a000006 beq 3090 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3074: 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, 3078: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 307c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3080: e0811003 add r1, r1, r3 <== NOT EXECUTED 3084: e3a02001 mov r2, #1 <== NOT EXECUTED 3088: e1a0e00f mov lr, pc <== NOT EXECUTED 308c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3090: 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) && 3094: e59430b8 ldr r3, [r4, #184] ; 0xb8 3098: e3130b01 tst r3, #1024 ; 0x400 309c: 0a000008 beq 30c4 30a0: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30a4: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30a8: 1a000005 bne 30c4 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30b0: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30b4: 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); 30b8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30bc: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30c0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 30c8: e3130c01 tst r3, #256 ; 0x100 30cc: 0a000010 beq 3114 30d0: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30d4: e3530000 cmp r3, #0 <== NOT EXECUTED 30d8: ba00000d blt 3114 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30e0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30e4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 30e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30ec: e3130004 tst r3, #4 <== NOT EXECUTED 30f0: 0a000004 beq 3108 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 30f4: 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) && 30f8: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 30fc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3100: 11a0e00f movne lr, pc <== NOT EXECUTED 3104: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3108: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 310c: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3110: 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) { 3114: e5943038 ldr r3, [r4, #56] ; 0x38 3118: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 311c: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3120: b3833c01 orrlt r3, r3, #256 ; 0x100 3124: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3128: e5943030 ldr r3, [r4, #48] ; 0x30 312c: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3130: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3134: 13833b01 orrne r3, r3, #1024 ; 0x400 3138: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 313c: e5943030 ldr r3, [r4, #48] ; 0x30 3140: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3144: 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) { 3148: 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; 314c: 13833c02 orrne r3, r3, #512 ; 0x200 3150: 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) { 3154: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3158: 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) { 315c: 1a000014 bne 31b4 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; 3160: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3164: eb0002a5 bl 3c00 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3168: e3a0100a mov r1, #10 <== NOT EXECUTED 316c: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3170: eb00467d bl 14b6c <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3174: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3178: 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] * 317c: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3180: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3184: 0a000006 beq 31a4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3188: e3520000 cmp r2, #0 <== NOT EXECUTED 318c: 01a02000 moveq r2, r0 <== NOT EXECUTED 3190: 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; 3194: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3198: 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; 319c: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 31a0: ea000006 b 31c0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 31a4: 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; 31a8: 03a03001 moveq r3, #1 <== NOT EXECUTED 31ac: 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]) { 31b0: 0a000002 beq 31c0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 31b4: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 31b8: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 31bc: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 31c0: e59430a8 ldr r3, [r4, #168] ; 0xa8 31c4: e3530000 cmp r3, #0 31c8: 0a000032 beq 3298 (*tty->device.setAttributes)(tty->minor, &tty->termios); 31cc: e5940010 ldr r0, [r4, #16] 31d0: e2841030 add r1, r4, #48 ; 0x30 31d4: e1a0e00f mov lr, pc 31d8: e12fff13 bx r3 31dc: ea00002d b 3298 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 31e0: e1a00004 mov r0, r4 31e4: ebfffe5a bl 2b54 break; 31e8: ea00002a b 3298 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 31ec: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 31f0: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 31f4: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 31f8: ea000026 b 3298 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 31fc: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3200: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3204: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 3208: ea000022 b 3298 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 320c: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3210: e59f309c ldr r3, [pc, #156] ; 32b4 <== NOT EXECUTED 3214: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3218: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 321c: e3530000 cmp r3, #0 <== NOT EXECUTED 3220: 0a000003 beq 3234 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3224: e1a00004 mov r0, r4 <== NOT EXECUTED 3228: e1a0e00f mov lr, pc <== NOT EXECUTED 322c: e12fff13 bx r3 <== NOT EXECUTED 3230: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3234: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 3238: 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) { 323c: e59f3070 ldr r3, [pc, #112] ; 32b4 <== NOT EXECUTED 3240: 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 */ 3244: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3248: 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 */ 324c: 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); 3250: 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) { 3254: 0a00000f beq 3298 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3258: e1a00004 mov r0, r4 <== NOT EXECUTED 325c: e1a0e00f mov lr, pc <== NOT EXECUTED 3260: e12fff13 bx r3 <== NOT EXECUTED 3264: e1a06000 mov r6, r0 <== NOT EXECUTED 3268: ea00000a b 3298 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 326c: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3270: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3274: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3278: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 327c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3280: e2842020 add r2, r4, #32 <== NOT EXECUTED 3284: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 3288: e0411002 sub r1, r1, r2 <== NOT EXECUTED 328c: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3290: e0813003 add r3, r1, r3 <== NOT EXECUTED 3294: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 3298: e5940018 ldr r0, [r4, #24] 329c: eb000432 bl 436c args->ioctl_return = sc; 32a0: e585600c str r6, [r5, #12] return sc; } 32a4: e1a00006 mov r0, r6 32a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 32ac: 4004667f .word 0x4004667f 32b0: 4004741a .word 0x4004741a 32b4: 00018418 .word 0x00018418 00003450 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3450: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3454: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3458: e59f23e0 ldr r2, [pc, #992] ; 3840 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 345c: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3460: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3464: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3468: e5920000 ldr r0, [r2] 346c: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3470: e1a0b003 mov fp, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3474: eb000376 bl 4254 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3478: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 347c: 059f33c0 ldreq r3, [pc, #960] ; 3844 3480: 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) 3484: 0a000007 beq 34a8 3488: ea0000e2 b 3818 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 348c: e595300c ldr r3, [r5, #12] 3490: e1530009 cmp r3, r9 3494: 1a000002 bne 34a4 3498: e5953010 ldr r3, [r5, #16] 349c: e153000a cmp r3, sl 34a0: 0a0000bb beq 3794 */ 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) { 34a4: e5955000 ldr r5, [r5] 34a8: e3550000 cmp r5, #0 34ac: 1afffff6 bne 348c 34b0: ea0000da b 3820 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 34b4: e59f738c ldr r7, [pc, #908] ; 3848 34b8: e5973004 ldr r3, [r7, #4] 34bc: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34c0: e5950064 ldr r0, [r5, #100] ; 0x64 34c4: eb0015b8 bl 8bac if (tty->rawInBuf.theBuf == NULL) { 34c8: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34cc: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 34d0: 1a000006 bne 34f0 free(tty); 34d4: e1a00005 mov r0, r5 <== NOT EXECUTED 34d8: eb001473 bl 86ac <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 34dc: e59f335c ldr r3, [pc, #860] ; 3840 <== NOT EXECUTED 34e0: e5930000 ldr r0, [r3] <== NOT EXECUTED 34e4: eb0003a0 bl 436c <== NOT EXECUTED 34e8: e3a0601a mov r6, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 34ec: ea0000c9 b 3818 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 34f0: e5973008 ldr r3, [r7, #8] 34f4: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 34f8: e5950088 ldr r0, [r5, #136] ; 0x88 34fc: eb0015aa bl 8bac if (tty->rawOutBuf.theBuf == NULL) { 3500: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3504: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 3508: 0a000006 beq 3528 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 350c: e5970000 ldr r0, [r7] 3510: eb0015a5 bl 8bac if (tty->cbuf == NULL) { 3514: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3518: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 351c: 1a000004 bne 3534 free((void *)(tty->rawOutBuf.theBuf)); 3520: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3524: eb001460 bl 86ac <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3528: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 352c: eb00145e bl 86ac <== NOT EXECUTED 3530: eaffffe7 b 34d4 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3534: e59f3308 ldr r3, [pc, #776] ; 3844 3538: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 353c: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3540: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3544: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3548: 15825004 strne r5, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 354c: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3550: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3554: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 3558: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 355c: 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) 3560: e59f32e4 ldr r3, [pc, #740] ; 384c 3564: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3568: e59f72d8 ldr r7, [pc, #728] ; 3848 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) 356c: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3570: 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; 3574: e59f22c8 ldr r2, [pc, #712] ; 3844 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3578: e5d7300c ldrb r3, [r7, #12] 357c: e59f02cc ldr r0, [pc, #716] ; 3850 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3580: e5824000 str r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3584: 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; 3588: e584a010 str sl, [r4, #16] tty->major = major; 358c: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3590: e284c014 add ip, r4, #20 3594: e3a03000 mov r3, #0 3598: e3a01001 mov r1, #1 359c: e3a02054 mov r2, #84 ; 0x54 35a0: e58dc000 str ip, [sp] 35a4: eb000298 bl 400c 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) 35a8: e2503000 subs r3, r0, #0 35ac: 1a000095 bne 3808 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35b0: e5d7200c ldrb r2, [r7, #12] 35b4: e59f0298 ldr r0, [pc, #664] ; 3854 35b8: e284c018 add ip, r4, #24 35bc: e1820000 orr r0, r2, r0 35c0: e3a01001 mov r1, #1 35c4: e3a02054 mov r2, #84 ; 0x54 35c8: e58dc000 str ip, [sp] 35cc: eb00028e bl 400c 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) 35d0: e2501000 subs r1, r0, #0 35d4: 1a00008b bne 3808 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35d8: e5d7300c ldrb r3, [r7, #12] 35dc: e59f0274 ldr r0, [pc, #628] ; 3858 35e0: e284c08c add ip, r4, #140 ; 0x8c 35e4: e1830000 orr r0, r3, r0 35e8: e3a02020 mov r2, #32 35ec: e1a03001 mov r3, r1 35f0: e58dc000 str ip, [sp] 35f4: eb000284 bl 400c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 35f8: e250e000 subs lr, r0, #0 35fc: 1a000081 bne 3808 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3600: e8bb000f ldm fp!, {r0, r1, r2, r3} 3604: e284c098 add ip, r4, #152 ; 0x98 3608: e8ac000f stmia ip!, {r0, r1, r2, r3} 360c: e89b000f ldm fp, {r0, r1, r2, r3} 3610: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3614: e59430b4 ldr r3, [r4, #180] ; 0xb4 3618: 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; 361c: e584e094 str lr, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3620: 1a000017 bne 3684 sc = rtems_task_create ( 3624: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3628: e59f022c ldr r0, [pc, #556] ; 385c <== NOT EXECUTED 362c: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3630: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3634: e3a0100a mov r1, #10 <== NOT EXECUTED 3638: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 363c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3640: e58de000 str lr, [sp] <== NOT EXECUTED 3644: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3648: eb00036e bl 4408 <== 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) 364c: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3650: 1a00006c bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3654: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3658: e59f0200 ldr r0, [pc, #512] ; 3860 <== NOT EXECUTED 365c: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3660: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3664: e3a01009 mov r1, #9 <== NOT EXECUTED 3668: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 366c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3670: e58de000 str lr, [sp] <== NOT EXECUTED 3674: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3678: eb000362 bl 4408 <== 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) 367c: e3500000 cmp r0, #0 <== NOT EXECUTED 3680: 1a000060 bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3684: e59430a0 ldr r3, [r4, #160] ; 0xa0 3688: e3530000 cmp r3, #0 368c: 0a000002 beq 369c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3690: e59430b4 ldr r3, [r4, #180] ; 0xb4 3694: e3530002 cmp r3, #2 3698: 1a00000b bne 36cc sc = rtems_semaphore_create ( 369c: e59f31a4 ldr r3, [pc, #420] ; 3848 <== NOT EXECUTED 36a0: e59f01bc ldr r0, [pc, #444] ; 3864 <== NOT EXECUTED 36a4: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 36a8: e3a01000 mov r1, #0 <== NOT EXECUTED 36ac: e1830000 orr r0, r3, r0 <== NOT EXECUTED 36b0: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 36b4: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 36b8: e1a03001 mov r3, r1 <== NOT EXECUTED 36bc: e58dc000 str ip, [sp] <== NOT EXECUTED 36c0: eb000251 bl 400c <== 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) 36c4: e3500000 cmp r0, #0 <== NOT EXECUTED 36c8: 1a00004e bne 3808 <== 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'; 36cc: 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; 36d0: e58430b8 str r3, [r4, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 36d4: e5941064 ldr r1, [r4, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 36d8: 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'; 36dc: 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; 36e0: 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'; 36e4: e3a0c01c mov ip, #28 36e8: e5c4c042 strb ip, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 36ec: e28cc063 add ip, ip, #99 ; 0x63 36f0: e5c4c043 strb ip, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 36f4: e3a0c015 mov ip, #21 36f8: e5c4c044 strb ip, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 36fc: e3a0c004 mov ip, #4 3700: e5c4c045 strb ip, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3704: e28cc00d add ip, ip, #13 3708: e5c4c049 strb ip, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 370c: e28cc002 add ip, ip, #2 3710: e5c4c04a strb ip, [r4, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3714: e28cc007 add ip, ip, #7 3718: e5c4c04b strb ip, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 371c: e3a0c012 mov ip, #18 3720: e5c4c04d strb ip, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3724: e3a0c00f mov ip, #15 3728: e5c4c04e strb ip, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 372c: e28cc008 add ip, ip, #8 3730: e5c4c04f strb ip, [r4, #79] ; 0x4f tty->termios.c_cc[VLNEXT] = '\026'; 3734: 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'; 3738: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 373c: 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'; 3740: 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'; 3744: 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') 3748: e59f30f8 ldr r3, [pc, #248] ; 3848 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; 374c: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 3750: 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; 3754: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3758: e59f0108 ldr r0, [pc, #264] ; 3868 375c: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3760: e59f0104 ldr r0, [pc, #260] ; 386c 3764: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3768: e59f0100 ldr r0, [pc, #256] ; 3870 376c: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3770: e59f00fc ldr r0, [pc, #252] ; 3874 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3774: 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; 3778: e1a010a1 lsr r1, r1, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 377c: 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; 3780: 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; 3784: e58410bc str r1, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3788: e5c3200c strb r2, [r3, #12] c = 'a'; 378c: 03a02061 moveq r2, #97 ; 0x61 3790: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 3794: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3798: e5982000 ldr r2, [r8] if (!tty->refcount++) { 379c: e3530000 cmp r3, #0 37a0: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 37a4: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 37a8: e5853008 str r3, [r5, #8] 37ac: 1a000016 bne 380c if (tty->device.firstOpen) 37b0: e5953098 ldr r3, [r5, #152] ; 0x98 37b4: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 37b8: 11a00009 movne r0, r9 37bc: 11a0100a movne r1, sl 37c0: 11a02008 movne r2, r8 37c4: 11a0e00f movne lr, pc 37c8: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 37cc: e59530b4 ldr r3, [r5, #180] ; 0xb4 37d0: e3530002 cmp r3, #2 37d4: 1a00000c bne 380c sc = rtems_task_start(tty->rxTaskId, 37d8: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 37dc: e59f1094 ldr r1, [pc, #148] ; 3878 <== NOT EXECUTED 37e0: e1a02005 mov r2, r5 <== NOT EXECUTED 37e4: eb0003ac bl 469c <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 37e8: e3500000 cmp r0, #0 <== NOT EXECUTED 37ec: 1a000005 bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 37f0: e1a02005 mov r2, r5 <== NOT EXECUTED 37f4: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 37f8: e59f107c ldr r1, [pc, #124] ; 387c <== NOT EXECUTED 37fc: eb0003a6 bl 469c <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3800: e3500000 cmp r0, #0 <== NOT EXECUTED 3804: 0a000000 beq 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3808: eb000424 bl 48a0 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 380c: e59f302c ldr r3, [pc, #44] ; 3840 3810: e5930000 ldr r0, [r3] 3814: eb0002d4 bl 436c return RTEMS_SUCCESSFUL; } 3818: e1a00006 mov r0, r6 381c: 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)); 3820: e3a00001 mov r0, #1 3824: e3a010e8 mov r1, #232 ; 0xe8 3828: eb001363 bl 85bc if (tty == NULL) { 382c: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3830: e1a05000 mov r5, r0 3834: e1a04000 mov r4, r0 if (tty == NULL) { 3838: 1affff1d bne 34b4 383c: eaffff26 b 34dc <== NOT EXECUTED 3840: 000185ec .word 0x000185ec 3844: 000185f4 .word 0x000185f4 3848: 00017174 .word 0x00017174 384c: 000185f0 .word 0x000185f0 3850: 54526900 .word 0x54526900 3854: 54526f00 .word 0x54526f00 3858: 54527800 .word 0x54527800 385c: 54785400 .word 0x54785400 3860: 52785400 .word 0x52785400 3864: 54527200 .word 0x54527200 3868: 00002502 .word 0x00002502 386c: 00001805 .word 0x00001805 3870: 000008bd .word 0x000008bd 3874: 0000823b .word 0x0000823b 3878: 000038ec .word 0x000038ec 387c: 00003880 .word 0x00003880 000023ec : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 23ec: e59230b4 ldr r3, [r2, #180] ; 0xb4 23f0: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 23f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 23f8: e1a04002 mov r4, r2 23fc: e1a0a000 mov sl, r0 2400: 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) { 2404: 1a000005 bne 2420 (*tty->device.write)(tty->minor, (void *)buf, len); 2408: e1a01000 mov r1, r0 240c: e1a02006 mov r2, r6 2410: e5940010 ldr r0, [r4, #16] 2414: e1a0e00f mov lr, pc 2418: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 241c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 2420: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2424: 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; 2428: 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; 242c: 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) { 2430: ea00002e b 24f0 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2434: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2438: e2850001 add r0, r5, #1 <== NOT EXECUTED 243c: eb004a5e bl 14dbc <__umodsi3> <== NOT EXECUTED 2440: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2444: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2448: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 244c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2450: ea00000a b 2480 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2454: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2458: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 245c: e3a01000 mov r1, #0 <== NOT EXECUTED 2460: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2464: e1a02001 mov r2, r1 <== NOT EXECUTED 2468: eb000779 bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 246c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2470: 1b00090a blne 48a0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2474: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2478: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 247c: 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) { 2480: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2484: e1550003 cmp r5, r3 <== NOT EXECUTED 2488: 0afffff1 beq 2454 <== 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++; 248c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2490: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2494: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2498: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 249c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 24a0: 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; 24a4: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 24a8: 1a00000d bne 24e4 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 24ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b0: 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; 24b4: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b8: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 24bc: 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)) { 24c0: 1a000006 bne 24e0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 24c4: 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, 24c8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 24cc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 24d0: e0811003 add r1, r1, r3 <== NOT EXECUTED 24d4: e3a02001 mov r2, #1 <== NOT EXECUTED 24d8: e1a0e00f mov lr, pc <== NOT EXECUTED 24dc: 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; 24e0: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 24e4: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 24e8: e2466001 sub r6, r6, #1 <== NOT EXECUTED 24ec: 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) { 24f0: e3560000 cmp r6, #0 <== NOT EXECUTED 24f4: 1affffce bne 2434 <== NOT EXECUTED 24f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002bc0 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc0: 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; 2bc4: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc8: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2bcc: 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); 2bd0: 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; 2bd4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bd8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2bdc: 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; 2be0: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 2be4: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2be8: eb000599 bl 4254 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2bec: e2506000 subs r6, r0, #0 <== NOT EXECUTED 2bf0: 1a0000c1 bne 2efc <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2bf4: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2bf8: e59f3304 ldr r3, [pc, #772] ; 2f04 <== NOT EXECUTED 2bfc: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2c00: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2c04: e3530000 cmp r3, #0 <== NOT EXECUTED 2c08: 0a000005 beq 2c24 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2c0c: e1a01005 mov r1, r5 <== NOT EXECUTED 2c10: e1a00004 mov r0, r4 <== NOT EXECUTED 2c14: e1a0e00f mov lr, pc <== NOT EXECUTED 2c18: e12fff13 bx r3 <== NOT EXECUTED 2c1c: e1a06000 mov r6, r0 <== NOT EXECUTED 2c20: ea0000b1 b 2eec <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2c24: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 2c28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2c2c: e1520003 cmp r2, r3 <== NOT EXECUTED 2c30: 1a00009a bne 2ea0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c34: 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; 2c38: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 2c3c: 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; 2c40: 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; 2c44: e5846020 str r6, [r4, #32] <== NOT EXECUTED 2c48: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c4c: 0a00003b beq 2d40 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2c50: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 2c54: e3530000 cmp r3, #0 <== NOT EXECUTED 2c58: 1a000038 bne 2d40 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2c5c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2c60: e3130002 tst r3, #2 <== NOT EXECUTED 2c64: 0a00000d beq 2ca0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2c68: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2c6c: e1a0e00f mov lr, pc <== NOT EXECUTED 2c70: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2c74: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2c78: e1a01004 mov r1, r4 <== NOT EXECUTED 2c7c: 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) { 2c80: aa000002 bge 2c90 <== NOT EXECUTED rtems_task_wake_after (1); 2c84: e3a00001 mov r0, #1 <== NOT EXECUTED 2c88: eb00069b bl 46fc <== NOT EXECUTED 2c8c: eafffff5 b 2c68 <== NOT EXECUTED } else { if (siproc (n, tty)) 2c90: ebffff67 bl 2a34 <== NOT EXECUTED 2c94: e3500000 cmp r0, #0 <== NOT EXECUTED 2c98: 0afffff2 beq 2c68 <== NOT EXECUTED 2c9c: ea00007f b 2ea0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 2ca0: eb0003de bl 3c20 <== NOT EXECUTED 2ca4: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2ca8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2cac: e1a0e00f mov lr, pc <== NOT EXECUTED 2cb0: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2cb4: e3500000 cmp r0, #0 <== NOT EXECUTED 2cb8: aa000013 bge 2d0c <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2cbc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2cc0: e3530000 cmp r3, #0 <== NOT EXECUTED 2cc4: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2cc8: 0a000005 beq 2ce4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2ccc: e3530000 cmp r3, #0 <== NOT EXECUTED 2cd0: 0a00000a beq 2d00 <== NOT EXECUTED 2cd4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2cd8: e3530000 cmp r3, #0 <== NOT EXECUTED 2cdc: 0a000007 beq 2d00 <== NOT EXECUTED 2ce0: ea000001 b 2cec <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2ce4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ce8: 0a00006c beq 2ea0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 2cec: eb0003cb bl 3c20 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2cf0: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 2cf4: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 2cf8: e1500003 cmp r0, r3 <== NOT EXECUTED 2cfc: 8a000067 bhi 2ea0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2d00: e3a00001 mov r0, #1 <== NOT EXECUTED 2d04: eb00067c bl 46fc <== NOT EXECUTED 2d08: eaffffe6 b 2ca8 <== NOT EXECUTED } else { siproc (n, tty); 2d0c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 2d10: e1a01004 mov r1, r4 <== NOT EXECUTED 2d14: ebffff46 bl 2a34 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2d18: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2d1c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2d20: e1520003 cmp r2, r3 <== NOT EXECUTED 2d24: aa00005d bge 2ea0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2d28: e3530000 cmp r3, #0 <== NOT EXECUTED 2d2c: 0affffdd beq 2ca8 <== NOT EXECUTED 2d30: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2d34: e3530000 cmp r3, #0 <== NOT EXECUTED 2d38: 0affffda beq 2ca8 <== NOT EXECUTED 2d3c: eaffffd7 b 2ca0 <== 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; 2d40: 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, 2d44: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 2d48: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2d4c: e59f91b4 ldr r9, [pc, #436] ; 2f08 <== NOT EXECUTED 2d50: ea000041 b 2e5c <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 2d54: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2d58: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d5c: e2800001 add r0, r0, #1 <== NOT EXECUTED 2d60: eb004815 bl 14dbc <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2d64: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2d68: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2d6c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2d70: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2d74: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 2d78: e0823003 add r3, r2, r3 <== NOT EXECUTED 2d7c: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 2d80: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d84: eb00480c bl 14dbc <__umodsi3> <== NOT EXECUTED 2d88: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 2d8c: e1500003 cmp r0, r3 <== NOT EXECUTED 2d90: 2a00001f bcs 2e14 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2d94: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d98: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2d9c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2da0: e59f3164 ldr r3, [pc, #356] ; 2f0c <== NOT EXECUTED 2da4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2da8: e59f015c ldr r0, [pc, #348] ; 2f0c <== NOT EXECUTED 2dac: e0023003 and r3, r2, r3 <== NOT EXECUTED 2db0: e1530000 cmp r3, r0 <== NOT EXECUTED 2db4: 1a00000b bne 2de8 <== NOT EXECUTED 2db8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2dbc: e3530000 cmp r3, #0 <== NOT EXECUTED 2dc0: 0a000002 beq 2dd0 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 2dc4: 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)) 2dc8: e3130020 tst r3, #32 <== NOT EXECUTED 2dcc: 0a000005 beq 2de8 <== 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, 2dd0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2dd4: e1a0100b mov r1, fp <== NOT EXECUTED 2dd8: e3a02001 mov r2, #1 <== NOT EXECUTED 2ddc: e1a0e00f mov lr, pc <== NOT EXECUTED 2de0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2de4: ea00000a b 2e14 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2de8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dec: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2df0: 0a000007 beq 2e14 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2df4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2df8: 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; 2dfc: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2e00: 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; 2e04: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 2e08: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2e0c: 11a0e00f movne lr, pc <== NOT EXECUTED 2e10: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2e14: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2e18: e3130002 tst r3, #2 <== NOT EXECUTED 2e1c: 0a000005 beq 2e38 <== NOT EXECUTED if (siproc (c, tty)) 2e20: e1a00008 mov r0, r8 <== NOT EXECUTED 2e24: e1a01004 mov r1, r4 <== NOT EXECUTED 2e28: ebffff01 bl 2a34 <== NOT EXECUTED 2e2c: e3500000 cmp r0, #0 <== NOT EXECUTED 2e30: 1a000007 bne 2e54 <== NOT EXECUTED 2e34: ea000007 b 2e58 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 2e38: e1a00008 mov r0, r8 <== NOT EXECUTED 2e3c: e1a01004 mov r1, r4 <== NOT EXECUTED 2e40: ebfffefb bl 2a34 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2e44: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2e48: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e4c: e1520003 cmp r2, r3 <== NOT EXECUTED 2e50: ba000000 blt 2e58 <== NOT EXECUTED 2e54: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2e58: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2e5c: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 2e60: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2e64: e1520003 cmp r2, r3 <== NOT EXECUTED 2e68: 0a000004 beq 2e80 <== NOT EXECUTED 2e6c: e5993000 ldr r3, [r9] <== NOT EXECUTED 2e70: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e74: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e78: e1520003 cmp r2, r3 <== NOT EXECUTED 2e7c: baffffb4 blt 2d54 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2e80: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e84: 0a000005 beq 2ea0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2e88: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 2e8c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2e90: e1a02008 mov r2, r8 <== NOT EXECUTED 2e94: eb0004ee bl 4254 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2e98: e3500000 cmp r0, #0 <== NOT EXECUTED 2e9c: 0affffee beq 2e5c <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2ea0: e3a03000 mov r3, #0 <== NOT EXECUTED 2ea4: ea000007 b 2ec8 <== 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++]; 2ea8: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 2eac: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2eb0: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 2eb4: e2822001 add r2, r2, #1 <== NOT EXECUTED 2eb8: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 2ebc: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 2ec0: e2477001 sub r7, r7, #1 <== NOT EXECUTED 2ec4: 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)) { 2ec8: e3570000 cmp r7, #0 <== NOT EXECUTED 2ecc: 0a000003 beq 2ee0 <== NOT EXECUTED 2ed0: e2841020 add r1, r4, #32 <== NOT EXECUTED 2ed4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2ed8: e1520001 cmp r2, r1 <== NOT EXECUTED 2edc: bafffff1 blt 2ea8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2ee0: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 2ee4: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 2ee8: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2eec: e3a03000 mov r3, #0 <== NOT EXECUTED 2ef0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2ef4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2ef8: eb00051b bl 436c <== NOT EXECUTED return sc; } 2efc: e1a00006 mov r0, r6 <== NOT EXECUTED 2f00: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2f04: 00018418 .word 0x00018418 2f08: 00017174 .word 0x00017174 2f0c: 00000202 .word 0x00000202 00001ecc : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1ecc: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 1ed0: e59f31d0 ldr r3, [pc, #464] ; 20a8 <== NOT EXECUTED 1ed4: e0023003 and r3, r2, r3 <== NOT EXECUTED 1ed8: e59f21cc ldr r2, [pc, #460] ; 20ac <== NOT EXECUTED 1edc: 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) { 1ee0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1ee4: 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)) 1ee8: 1a00000e bne 1f28 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1eec: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 1ef0: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 1ef4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1ef8: e1a0e00f mov lr, pc <== NOT EXECUTED 1efc: 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 ( 1f00: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f04: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f08: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f0c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f10: 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--; 1f14: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f18: e3811002 orr r1, r1, #2 <== NOT EXECUTED 1f1c: 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--; 1f20: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 1f24: ea000011 b 1f70 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1f28: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 1f2c: e2033003 and r3, r3, #3 <== NOT EXECUTED 1f30: e3530002 cmp r3, #2 <== NOT EXECUTED 1f34: 1a000010 bne 1f7c <== 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, 1f38: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 1f3c: e3a02001 mov r2, #1 <== NOT EXECUTED 1f40: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1f44: e1a0e00f mov lr, pc <== NOT EXECUTED 1f48: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 1f4c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f50: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f54: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f58: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f5c: 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--; 1f60: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f64: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 1f68: 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--; 1f6c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1f70: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 1f74: e3a05001 mov r5, #1 <== NOT EXECUTED 1f78: ea000048 b 20a0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1f7c: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 1f80: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 1f84: e1520003 cmp r2, r3 <== NOT EXECUTED 1f88: 1a000005 bne 1fa4 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 1f8c: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 1f90: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1f94: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 1f98: 0b0008f3 bleq 436c <== NOT EXECUTED 1f9c: e3a05000 mov r5, #0 <== NOT EXECUTED 1fa0: ea00003e b 20a0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1fa4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1fa8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1fac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 1fb0: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 1fb4: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 1fb8: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1fbc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 1fc0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 1fc4: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 1fc8: e0800003 add r0, r0, r3 <== NOT EXECUTED 1fcc: eb004b7a bl 14dbc <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 1fd0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 1fd4: 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; 1fd8: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 1fdc: 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); 1fe0: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 1fe4: 0b0008e0 bleq 436c <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 1fe8: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 1fec: e1560003 cmp r6, r3 <== NOT EXECUTED 1ff0: 1a00000a bne 2020 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ff4: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 1ff8: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ffc: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2000: 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) { 2004: 01a05003 moveq r5, r3 <== NOT EXECUTED 2008: 0a000023 beq 209c <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 200c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2010: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2014: e1a0e00f mov lr, pc <== NOT EXECUTED 2018: e12fff13 bx r3 <== NOT EXECUTED 201c: ea00001e b 209c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 2020: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2024: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 2028: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 202c: 1a00000a bne 205c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2030: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2034: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2038: 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; 203c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2040: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2044: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2048: e3a02001 mov r2, #1 <== NOT EXECUTED 204c: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2050: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2054: e3a05000 mov r5, #0 <== NOT EXECUTED 2058: ea00000f b 209c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 205c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2060: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2064: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 2068: 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)) { 206c: 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; 2070: 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)) { 2074: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 2078: 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)) { 207c: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2080: e3a03001 mov r3, #1 <== NOT EXECUTED 2084: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2088: e0811006 add r1, r1, r6 <== NOT EXECUTED 208c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2090: e1a02005 mov r2, r5 <== NOT EXECUTED 2094: e1a0e00f mov lr, pc <== NOT EXECUTED 2098: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 209c: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 20a0: e1a00005 mov r0, r5 <== NOT EXECUTED 20a4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 20a8: 00000403 .word 0x00000403 20ac: 00000401 .word 0x00000401 000038ec : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 38ec: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 38f0: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38f4: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 38f8: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38fc: e1a0300d mov r3, sp <== NOT EXECUTED 3900: e3a01002 mov r1, #2 <== NOT EXECUTED 3904: e3a02000 mov r2, #0 <== NOT EXECUTED 3908: e3a00003 mov r0, #3 <== NOT EXECUTED 390c: eb0000e0 bl 3c94 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3910: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3914: e3130001 tst r3, #1 <== NOT EXECUTED 3918: 0a000003 beq 392c <== NOT EXECUTED tty->rxTaskId = 0; 391c: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3920: e1a00005 mov r0, r5 <== NOT EXECUTED 3924: eb000309 bl 4550 <== NOT EXECUTED 3928: eafffff3 b 38fc <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 392c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3930: e1a0e00f mov lr, pc <== NOT EXECUTED 3934: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 3938: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 393c: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3940: 0affffed beq 38fc <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3944: e1a00004 mov r0, r4 <== NOT EXECUTED 3948: e1a01006 mov r1, r6 <== NOT EXECUTED 394c: 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; 3950: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3954: ebfff9f1 bl 2120 <== NOT EXECUTED 3958: eaffffe7 b 38fc <== NOT EXECUTED 00001ec0 : 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); 1ec0: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 1ec4: e3a01002 mov r1, #2 <== NOT EXECUTED 1ec8: ea0007cd b 3e04 <== NOT EXECUTED 00003880 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3880: 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) { 3884: e59f705c ldr r7, [pc, #92] ; 38e8 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3888: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 388c: e3a05000 mov r5, #0 <== NOT EXECUTED 3890: e1a0300d mov r3, sp <== NOT EXECUTED 3894: e3a01002 mov r1, #2 <== NOT EXECUTED 3898: e3a02000 mov r2, #0 <== NOT EXECUTED 389c: e3a00003 mov r0, #3 <== NOT EXECUTED 38a0: eb0000fb bl 3c94 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 38a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 38a8: 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); 38ac: 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) { 38b0: 0a000003 beq 38c4 <== NOT EXECUTED tty->txTaskId = 0; 38b4: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 38b8: e1a00005 mov r0, r5 <== NOT EXECUTED 38bc: eb000323 bl 4550 <== NOT EXECUTED 38c0: eafffff2 b 3890 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 38c4: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 38c8: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 38cc: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 38d0: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 38d4: 11a0e00f movne lr, pc <== NOT EXECUTED 38d8: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 38dc: e1a00004 mov r0, r4 <== NOT EXECUTED 38e0: ebfff979 bl 1ecc <== NOT EXECUTED 38e4: eaffffe9 b 3890 <== NOT EXECUTED 38e8: 00018418 .word 0x00018418 00002a94 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a94: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2a98: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a9c: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2aa0: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2aa4: 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); 2aa8: e1a02001 mov r2, r1 2aac: e5950018 ldr r0, [r5, #24] 2ab0: eb0005e7 bl 4254 if (sc != RTEMS_SUCCESSFUL) 2ab4: e2506000 subs r6, r0, #0 2ab8: 1a000022 bne 2b48 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2abc: e59520cc ldr r2, [r5, #204] ; 0xcc 2ac0: e59f3088 ldr r3, [pc, #136] ; 2b50 2ac4: e0833282 add r3, r3, r2, lsl #5 2ac8: e593300c ldr r3, [r3, #12] 2acc: e3530000 cmp r3, #0 2ad0: 0a000005 beq 2aec sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2ad4: e1a01004 mov r1, r4 <== NOT EXECUTED 2ad8: e1a00005 mov r0, r5 <== NOT EXECUTED 2adc: e1a0e00f mov lr, pc <== NOT EXECUTED 2ae0: e12fff13 bx r3 <== NOT EXECUTED 2ae4: e1a06000 mov r6, r0 <== NOT EXECUTED 2ae8: ea000014 b 2b40 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2aec: e5953034 ldr r3, [r5, #52] ; 0x34 2af0: e3130001 tst r3, #1 uint32_t count = args->count; 2af4: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 2af8: 1594a00c ldrne sl, [r4, #12] 2afc: 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) { 2b00: 1a000004 bne 2b18 2b04: ea000007 b 2b28 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 2b08: e7da0007 ldrb r0, [sl, r7] 2b0c: ebfffe7a bl 24fc 2b10: e2877001 add r7, r7, #1 2b14: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b18: e3580000 cmp r8, #0 oproc (*buffer++, tty); 2b1c: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b20: 1afffff8 bne 2b08 2b24: ea000003 b 2b38 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2b28: e284000c add r0, r4, #12 <== NOT EXECUTED 2b2c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2b30: e1a02005 mov r2, r5 <== NOT EXECUTED 2b34: ebfffe2c bl 23ec <== NOT EXECUTED args->bytes_moved = args->count; 2b38: e5943010 ldr r3, [r4, #16] 2b3c: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 2b40: e5950018 ldr r0, [r5, #24] 2b44: eb000608 bl 436c return sc; } 2b48: e1a00006 mov r0, r6 2b4c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2b50: 00018418 .word 0x00018418 00005dac : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 5dac: 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) 5db0: 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 ) { 5db4: e1a06000 mov r6, r0 <== NOT EXECUTED 5db8: e1a09001 mov r9, r1 <== NOT EXECUTED 5dbc: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 5dc0: 0a00000d beq 5dfc <== NOT EXECUTED { if (rtems_panic_in_progress++) 5dc4: e59f3160 ldr r3, [pc, #352] ; 5f2c <== NOT EXECUTED 5dc8: e5932000 ldr r2, [r3] <== NOT EXECUTED 5dcc: e3520000 cmp r2, #0 <== NOT EXECUTED 5dd0: e2822001 add r2, r2, #1 <== NOT EXECUTED 5dd4: e5832000 str r2, [r3] <== NOT EXECUTED 5dd8: 0a000003 beq 5dec <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5ddc: e59f314c ldr r3, [pc, #332] ; 5f30 <== NOT EXECUTED 5de0: e5932000 ldr r2, [r3] <== NOT EXECUTED 5de4: e2822001 add r2, r2, #1 <== NOT EXECUTED 5de8: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 5dec: e59f3138 ldr r3, [pc, #312] ; 5f2c <== NOT EXECUTED 5df0: e5933000 ldr r3, [r3] <== NOT EXECUTED 5df4: e3530002 cmp r3, #2 <== NOT EXECUTED 5df8: ca000049 bgt 5f24 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 5dfc: e59f3130 ldr r3, [pc, #304] ; 5f34 <== NOT EXECUTED 5e00: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e04: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 5e08: eb00304f bl 11f4c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5e0c: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 5e10: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5e14: 0a000001 beq 5e20 <== NOT EXECUTED local_errno = errno; 5e18: eb002f58 bl 11b80 <__errno> <== NOT EXECUTED 5e1c: 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); 5e20: e59fa10c ldr sl, [pc, #268] ; 5f34 <== NOT EXECUTED 5e24: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5e28: e1a02004 mov r2, r4 <== NOT EXECUTED 5e2c: e1a01009 mov r1, r9 <== NOT EXECUTED 5e30: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e34: eb004865 bl 17fd0 <== NOT EXECUTED if (status) 5e38: 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); 5e3c: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 5e40: 0a000008 beq 5e68 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 5e44: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5e48: e1a00008 mov r0, r8 <== NOT EXECUTED 5e4c: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e50: ebffffd1 bl 5d9c <== NOT EXECUTED 5e54: e59f10dc ldr r1, [pc, #220] ; 5f38 <== NOT EXECUTED 5e58: e1a02000 mov r2, r0 <== NOT EXECUTED 5e5c: e1a00008 mov r0, r8 <== NOT EXECUTED 5e60: eb0030f7 bl 12244 <== NOT EXECUTED 5e64: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 5e68: e3550000 cmp r5, #0 <== NOT EXECUTED 5e6c: 0a000015 beq 5ec8 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 5e70: da00000d ble 5eac <== NOT EXECUTED 5e74: e1a00005 mov r0, r5 <== NOT EXECUTED 5e78: eb003404 bl 12e90 <== NOT EXECUTED 5e7c: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 5e80: e3530000 cmp r3, #0 <== NOT EXECUTED 5e84: 0a000008 beq 5eac <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 5e88: e59f30a4 ldr r3, [pc, #164] ; 5f34 <== NOT EXECUTED 5e8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e90: e1a00005 mov r0, r5 <== NOT EXECUTED 5e94: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e98: eb0033fc bl 12e90 <== NOT EXECUTED 5e9c: e59f1098 ldr r1, [pc, #152] ; 5f3c <== NOT EXECUTED 5ea0: e1a02000 mov r2, r0 <== NOT EXECUTED 5ea4: e1a00008 mov r0, r8 <== NOT EXECUTED 5ea8: ea000004 b 5ec0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 5eac: e59f3080 ldr r3, [pc, #128] ; 5f34 <== NOT EXECUTED 5eb0: e5933000 ldr r3, [r3] <== NOT EXECUTED 5eb4: e59f1084 ldr r1, [pc, #132] ; 5f40 <== NOT EXECUTED 5eb8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ebc: e1a02005 mov r2, r5 <== NOT EXECUTED 5ec0: eb0030df bl 12244 <== NOT EXECUTED 5ec4: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 5ec8: e59f8064 ldr r8, [pc, #100] ; 5f34 <== NOT EXECUTED 5ecc: e5983000 ldr r3, [r8] <== NOT EXECUTED 5ed0: e59f106c ldr r1, [pc, #108] ; 5f44 <== NOT EXECUTED 5ed4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ed8: eb0030d9 bl 12244 <== NOT EXECUTED (void) fflush(stderr); 5edc: 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"); 5ee0: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 5ee4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ee8: eb003017 bl 11f4c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5eec: 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"); 5ef0: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5ef4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 5ef8: e3570000 cmp r7, #0 <== NOT EXECUTED 5efc: 0a000004 beq 5f14 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 5f00: e3a00000 mov r0, #0 <== NOT EXECUTED 5f04: e59f103c ldr r1, [pc, #60] ; 5f48 <== NOT EXECUTED 5f08: eb00001b bl 5f7c <== NOT EXECUTED _exit(local_errno); 5f0c: e1a00005 mov r0, r5 <== NOT EXECUTED 5f10: eb0002cf bl 6a54 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 5f14: e59f1030 ldr r1, [pc, #48] ; 5f4c <== NOT EXECUTED 5f18: e1a00007 mov r0, r7 <== NOT EXECUTED 5f1c: eb000016 bl 5f7c <== NOT EXECUTED abort(); 5f20: eb002f0d bl 11b5c <== NOT EXECUTED 5f24: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 5f28: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 5f2c: 00023480 .word 0x00023480 5f30: 0002360c .word 0x0002360c 5f34: 00020b44 .word 0x00020b44 5f38: 000222d7 .word 0x000222d7 5f3c: 000222e5 .word 0x000222e5 5f40: 000222f2 .word 0x000222f2 5f44: 000222c4 .word 0x000222c4 5f48: 00022306 .word 0x00022306 5f4c: 0002231b .word 0x0002231b 000220c8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 220c8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 220cc: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 220d0: e59fb0d4 ldr fp, [pc, #212] ; 221ac limit++; continue; } sign = 1; } if (!isdigit(c)) 220d4: e59f90d4 ldr r9, [pc, #212] ; 221b0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 220d8: e58d1000 str r1, [sp] 220dc: e1a05000 mov r5, r0 220e0: e3e08102 mvn r8, #-2147483648 ; 0x80000000 220e4: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 220e8: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 220ec: e5953004 ldr r3, [r5, #4] 220f0: e2433001 sub r3, r3, #1 220f4: e3530000 cmp r3, #0 220f8: e5853004 str r3, [r5, #4] 220fc: a5953000 ldrge r3, [r5] 22100: a4d36001 ldrbge r6, [r3], #1 22104: a5853000 strge r3, [r5] 22108: aa000003 bge 2211c 2210c: e59b0000 ldr r0, [fp] <== NOT EXECUTED 22110: e1a01005 mov r1, r5 <== NOT EXECUTED 22114: eb006bbe bl 3d014 <__srget_r> <== NOT EXECUTED 22118: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 2211c: e356003a cmp r6, #58 ; 0x3a 22120: 0a000019 beq 2218c break; if (sign == 0) { 22124: e3540000 cmp r4, #0 22128: 1a000004 bne 22140 if (c == '-') { 2212c: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 22130: 02888001 addeq r8, r8, #1 22134: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 22138: 0affffeb beq 220ec sign = -1; limit++; continue; 2213c: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 22140: e5993000 ldr r3, [r9] 22144: e0833006 add r3, r3, r6 22148: e5d33001 ldrb r3, [r3, #1] 2214c: e3130004 tst r3, #4 22150: 0a000013 beq 221a4 return 0; d = c - '0'; if ((i > (limit / 10)) 22154: e1a00008 mov r0, r8 22158: e3a0100a mov r1, #10 2215c: eb00b63b bl 4fa50 <__aeabi_uidiv> 22160: e1570000 cmp r7, r0 22164: 8a00000e bhi 221a4 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 22168: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 2216c: 1a000004 bne 22184 22170: e1a00008 mov r0, r8 <== NOT EXECUTED 22174: e3a0100a mov r1, #10 <== NOT EXECUTED 22178: eb00b6c8 bl 4fca0 <__umodsi3> <== NOT EXECUTED 2217c: e1560000 cmp r6, r0 <== NOT EXECUTED 22180: 8a000007 bhi 221a4 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 22184: e027679a mla r7, sl, r7, r6 22188: eaffffd7 b 220ec } if (sign == 0) 2218c: e3540000 cmp r4, #0 return 0; *val = i * sign; 22190: 10030497 mulne r3, r7, r4 22194: 159d2000 ldrne r2, [sp] 22198: 13a00001 movne r0, #1 2219c: 15823000 strne r3, [r2] return 1; 221a0: 1a000000 bne 221a8 221a4: e3a00000 mov r0, #0 <== NOT EXECUTED } 221a8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 221ac: 000527dc .word 0x000527dc 221b0: 000527d0 .word 0x000527d0 000221b4 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 221b4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 221b8: e1a04002 mov r4, r2 int c; *name = *bufp; 221bc: 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) { 221c0: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; 221c4: e5812000 str r2, [r1] for (;;) { c = getc(fp); 221c8: e59f70c0 ldr r7, [pc, #192] ; 22290 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 221cc: e1a05000 mov r5, r0 221d0: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 221d4: e5953004 ldr r3, [r5, #4] 221d8: e2433001 sub r3, r3, #1 221dc: e3530000 cmp r3, #0 221e0: e5853004 str r3, [r5, #4] 221e4: a5953000 ldrge r3, [r5] 221e8: a4d30001 ldrbge r0, [r3], #1 221ec: a5853000 strge r3, [r5] 221f0: b5970000 ldrlt r0, [r7] 221f4: b1a01005 movlt r1, r5 221f8: bb006b85 bllt 3d014 <__srget_r> if (c == ':') { 221fc: e350003a cmp r0, #58 ; 0x3a 22200: 1a000002 bne 22210 if (nlFlag) 22204: e3560000 cmp r6, #0 22208: 0a000013 beq 2225c 2220c: ea00001d b 22288 <== NOT EXECUTED return 0; break; } if (c == '\n') { 22210: e350000a cmp r0, #10 22214: 1a000002 bne 22224 if (!nlFlag) 22218: e3560000 cmp r6, #0 2221c: 1a00000e bne 2225c 22220: ea000018 b 22288 <== NOT EXECUTED return 0; break; } if (c == EOF) 22224: e3700001 cmn r0, #1 22228: 0a000016 beq 22288 return 0; if (*nleft < 2) 2222c: e5983000 ldr r3, [r8] 22230: e3530001 cmp r3, #1 22234: 9a000013 bls 22288 return 0; **bufp = c; 22238: e5943000 ldr r3, [r4] 2223c: e5c30000 strb r0, [r3] ++(*bufp); 22240: e5942000 ldr r2, [r4] --(*nleft); 22244: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 22248: e2822001 add r2, r2, #1 --(*nleft); 2224c: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 22250: e5842000 str r2, [r4] --(*nleft); 22254: e5883000 str r3, [r8] } 22258: eaffffdd b 221d4 **bufp = '\0'; 2225c: e5943000 ldr r3, [r4] 22260: e3a02000 mov r2, #0 22264: e5c32000 strb r2, [r3] ++(*bufp); 22268: e5942000 ldr r2, [r4] --(*nleft); 2226c: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22270: e2822001 add r2, r2, #1 --(*nleft); 22274: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22278: e5842000 str r2, [r4] --(*nleft); 2227c: e5883000 str r3, [r8] 22280: e3a00001 mov r0, #1 return 1; 22284: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 22288: e3a00000 mov r0, #0 <== NOT EXECUTED } 2228c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 22290: 000527dc .word 0x000527dc 00022294 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22294: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22298: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2229c: e28d6008 add r6, sp, #8 222a0: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 222a4: e58d2008 str r2, [sp, #8] 222a8: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222ac: e3a08000 mov r8, #0 222b0: e1a02006 mov r2, r6 222b4: e1a03005 mov r3, r5 222b8: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 222bc: e1a07000 mov r7, r0 222c0: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222c4: ebffffba bl 221b4 222c8: e1500008 cmp r0, r8 222cc: 0a00003b beq 223c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 222d0: e1a00007 mov r0, r7 222d4: e2841004 add r1, r4, #4 222d8: e1a02006 mov r2, r6 222dc: e1a03005 mov r3, r5 222e0: e58d8000 str r8, [sp] 222e4: ebffffb2 bl 221b4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222e8: e1500008 cmp r0, r8 222ec: 0a000033 beq 223c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 222f0: e1a00007 mov r0, r7 222f4: e28d1010 add r1, sp, #16 222f8: ebffff72 bl 220c8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222fc: e1500008 cmp r0, r8 22300: 0a00002e beq 223c0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 22304: e1a03005 mov r3, r5 22308: e28d100c add r1, sp, #12 2230c: e1a00007 mov r0, r7 22310: e1a02006 mov r2, r6 22314: e3a05001 mov r5, #1 22318: e58d5000 str r5, [sp] 2231c: ebffffa4 bl 221b4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22320: 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; 22324: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22328: 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; 2232c: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22330: 1a000003 bne 22344 22334: ea000021 b 223c0 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 22338: e352002c cmp r2, #44 ; 0x2c memcount++; 2233c: 02855001 addeq r5, r5, #1 22340: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22344: e7d12008 ldrb r2, [r1, r8] 22348: e3520000 cmp r2, #0 2234c: 1afffff9 bne 22338 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 22350: e1a05105 lsl r5, r5, #2 22354: e59d3004 ldr r3, [sp, #4] 22358: e2855013 add r5, r5, #19 2235c: e1530005 cmp r3, r5 22360: 3a000016 bcc 223c0 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 22364: e59d3008 ldr r3, [sp, #8] 22368: e283300f add r3, r3, #15 2236c: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22370: 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); 22374: e584300c str r3, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22378: e59d300c ldr r3, [sp, #12] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 2237c: e1a00002 mov r0, r2 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22380: e2833001 add r3, r3, #1 22384: e2822001 add r2, r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22388: ea000005 b 223a4 if(*cp == ',') { 2238c: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 22390: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 22394: 0594100c ldreq r1, [r4, #12] 22398: 07813102 streq r3, [r1, r2, lsl #2] 2239c: 02822001 addeq r2, r2, #1 223a0: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 223a4: e5531001 ldrb r1, [r3, #-1] 223a8: e3510000 cmp r1, #0 223ac: 1afffff6 bne 2238c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 223b0: e594300c ldr r3, [r4, #12] 223b4: e3a00001 mov r0, #1 223b8: e7831102 str r1, [r3, r2, lsl #2] return 1; 223bc: ea000000 b 223c4 223c0: e3a00000 mov r0, #0 <== NOT EXECUTED } 223c4: e28dd014 add sp, sp, #20 223c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022408 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22408: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2240c: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22410: e28d7008 add r7, sp, #8 22414: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22418: e58d2008 str r2, [sp, #8] 2241c: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22420: e3a08000 mov r8, #0 22424: e1a02007 mov r2, r7 22428: e1a03006 mov r3, r6 2242c: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22430: e1a05000 mov r5, r0 22434: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22438: ebffff5d bl 221b4 2243c: e1500008 cmp r0, r8 22440: 0a000038 beq 22528 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 22444: e1a00005 mov r0, r5 22448: e2841004 add r1, r4, #4 2244c: e1a02007 mov r2, r7 22450: e1a03006 mov r3, r6 22454: e58d8000 str r8, [sp] 22458: ebffff55 bl 221b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2245c: e1500008 cmp r0, r8 22460: 0a000030 beq 22528 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 22464: e1a00005 mov r0, r5 22468: e28d1010 add r1, sp, #16 2246c: ebffff15 bl 220c8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22470: e1500008 cmp r0, r8 22474: 0a00002b beq 22528 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 22478: e1a00005 mov r0, r5 2247c: e28d100c add r1, sp, #12 22480: ebffff10 bl 220c8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22484: e1500008 cmp r0, r8 22488: 0a000026 beq 22528 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 2248c: e1a00005 mov r0, r5 22490: e284100c add r1, r4, #12 22494: e1a02007 mov r2, r7 22498: e1a03006 mov r3, r6 2249c: e58d8000 str r8, [sp] 224a0: ebffff43 bl 221b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 224a4: e1500008 cmp r0, r8 224a8: 0a00001e beq 22528 || !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) 224ac: e1a00005 mov r0, r5 224b0: e2841010 add r1, r4, #16 224b4: e1a02007 mov r2, r7 224b8: e1a03006 mov r3, r6 224bc: e58d8000 str r8, [sp] 224c0: ebffff3b bl 221b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 224c4: e1500008 cmp r0, r8 224c8: 0a000016 beq 22528 || !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) 224cc: e1a00005 mov r0, r5 224d0: e2841014 add r1, r4, #20 224d4: e1a02007 mov r2, r7 224d8: e1a03006 mov r3, r6 224dc: e58d8000 str r8, [sp] 224e0: ebffff33 bl 221b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 224e4: e1500008 cmp r0, r8 224e8: 0a00000e beq 22528 || !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)) 224ec: e1a00005 mov r0, r5 224f0: e1a02007 mov r2, r7 224f4: e1a03006 mov r3, r6 224f8: e3a05001 mov r5, #1 224fc: e2841018 add r1, r4, #24 22500: e58d5000 str r5, [sp] 22504: ebffff2a bl 221b4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22508: e1500008 cmp r0, r8 2250c: 0a000005 beq 22528 || !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; 22510: e1dd30bc ldrh r3, [sp, #12] 22514: 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; 22518: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 2251c: 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; 22520: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 22524: ea000000 b 2252c 22528: e3a00000 mov r0, #0 <== NOT EXECUTED } 2252c: e28dd014 add sp, sp, #20 22530: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022080 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 22080: e59f300c ldr r3, [pc, #12] ; 22094 <== NOT EXECUTED 22084: e5933000 ldr r3, [r3] <== NOT EXECUTED 22088: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 2208c: e3a00000 mov r0, #0 <== NOT EXECUTED 22090: e12fff1e bx lr <== NOT EXECUTED 22094: 00052008 .word 0x00052008 00022638 : return NULL; return &grent; } void setgrent(void) { 22638: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 2263c: ebffffcb bl 22570 <== NOT EXECUTED if (group_fp != NULL) 22640: e59f3020 ldr r3, [pc, #32] ; 22668 <== NOT EXECUTED 22644: e5930000 ldr r0, [r3] <== NOT EXECUTED 22648: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 2264c: 1b0055be blne 37d4c <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 22650: e59f0014 ldr r0, [pc, #20] ; 2266c <== NOT EXECUTED 22654: e59f1014 ldr r1, [pc, #20] ; 22670 <== NOT EXECUTED 22658: eb0057de bl 385d8 <== NOT EXECUTED 2265c: e59f3004 ldr r3, [pc, #4] ; 22668 <== NOT EXECUTED 22660: e5830000 str r0, [r3] <== NOT EXECUTED } 22664: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 22668: 0005f1dc .word 0x0005f1dc 2266c: 00055f98 .word 0x00055f98 22670: 00056d10 .word 0x00056d10 00022808 : return NULL; return &pwent; } void setpwent(void) { 22808: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 2280c: ebffff57 bl 22570 <== NOT EXECUTED if (passwd_fp != NULL) 22810: e59f3020 ldr r3, [pc, #32] ; 22838 <== NOT EXECUTED 22814: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22818: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 2281c: 1b00554a blne 37d4c <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 22820: e59f0014 ldr r0, [pc, #20] ; 2283c <== NOT EXECUTED 22824: e59f1014 ldr r1, [pc, #20] ; 22840 <== NOT EXECUTED 22828: eb00576a bl 385d8 <== NOT EXECUTED 2282c: e59f3004 ldr r3, [pc, #4] ; 22838 <== NOT EXECUTED 22830: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 22834: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 22838: 0005f1dc .word 0x0005f1dc 2283c: 00055eea .word 0x00055eea 22840: 00056d10 .word 0x00056d10 00005328 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 5328: e59f300c ldr r3, [pc, #12] ; 533c <== NOT EXECUTED 532c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5330: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 5334: e3a00000 mov r0, #0 <== NOT EXECUTED 5338: e12fff1e bx lr <== NOT EXECUTED 533c: 00052008 .word 0x00052008 00002a34 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2a34: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 2a38: e59f3050 ldr r3, [pc, #80] ; 2a90 <== NOT EXECUTED 2a3c: e0023003 and r3, r2, r3 <== NOT EXECUTED 2a40: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2a44: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2a48: e1a04001 mov r4, r1 <== NOT EXECUTED 2a4c: 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)) { 2a50: 0a00000b beq 2a84 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2a54: e3a01000 mov r1, #0 <== NOT EXECUTED 2a58: e1a02001 mov r2, r1 <== NOT EXECUTED 2a5c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a60: eb0005fb bl 4254 <== NOT EXECUTED i = iproc (c, tty); 2a64: e1a01004 mov r1, r4 <== NOT EXECUTED 2a68: e1a00005 mov r0, r5 <== NOT EXECUTED 2a6c: ebffff8b bl 28a0 <== NOT EXECUTED 2a70: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2a74: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a78: eb00063b bl 436c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2a7c: e1a00005 mov r0, r5 <== NOT EXECUTED 2a80: 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); 2a84: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 2a88: 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); 2a8c: eaffff83 b 28a0 <== NOT EXECUTED 2a90: 00000e78 .word 0x00000e78 00006808 : int _STAT_NAME( const char *path, struct stat *buf ) { 6808: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 680c: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 6810: e24dd018 sub sp, sp, #24 6814: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6818: 1a000002 bne 6828 rtems_set_errno_and_return_minus_one( EFAULT ); 681c: eb00c4fd bl 37c18 <__errno> 6820: e3a0300e mov r3, #14 6824: ea000018 b 688c status = rtems_filesystem_evaluate_path( path, strlen( path ), 6828: eb00df74 bl 3e600 682c: e28d4004 add r4, sp, #4 6830: e1a01000 mov r1, r0 6834: e3a0c001 mov ip, #1 6838: e1a00006 mov r0, r6 683c: e3a02000 mov r2, #0 6840: e1a03004 mov r3, r4 6844: e58dc000 str ip, [sp] 6848: ebfffa3b bl 513c 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 684c: e2501000 subs r1, r0, #0 6850: 1a00000e bne 6890 return -1; if ( !loc.handlers->fstat_h ){ 6854: e59d300c ldr r3, [sp, #12] 6858: e5933018 ldr r3, [r3, #24] 685c: e3530000 cmp r3, #0 6860: 1a00000c bne 6898 rtems_filesystem_freenode( &loc ); 6864: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6868: e3530000 cmp r3, #0 <== NOT EXECUTED 686c: 0a000004 beq 6884 <== NOT EXECUTED 6870: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6874: e3530000 cmp r3, #0 <== NOT EXECUTED 6878: 11a00004 movne r0, r4 <== NOT EXECUTED 687c: 11a0e00f movne lr, pc <== NOT EXECUTED 6880: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6884: eb00c4e3 bl 37c18 <__errno> <== NOT EXECUTED 6888: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 688c: e5803000 str r3, [r0] 6890: e3e05000 mvn r5, #0 6894: ea000010 b 68dc /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6898: e3a02048 mov r2, #72 ; 0x48 689c: e1a00005 mov r0, r5 68a0: eb00d194 bl 3aef8 status = (*loc.handlers->fstat_h)( &loc, buf ); 68a4: e1a01005 mov r1, r5 68a8: e59d300c ldr r3, [sp, #12] 68ac: e1a00004 mov r0, r4 68b0: e1a0e00f mov lr, pc 68b4: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 68b8: e59d3010 ldr r3, [sp, #16] 68bc: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 68c0: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 68c4: 0a000004 beq 68dc 68c8: e593301c ldr r3, [r3, #28] 68cc: e3530000 cmp r3, #0 68d0: 11a00004 movne r0, r4 68d4: 11a0e00f movne lr, pc 68d8: 112fff13 bxne r3 return status; } 68dc: e1a00005 mov r0, r5 68e0: e28dd018 add sp, sp, #24 68e4: e8bd8070 pop {r4, r5, r6, pc} 0002347c : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 2347c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 23480: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 23484: e1a05001 mov r5, r1 <== NOT EXECUTED 23488: 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 ) ) 2348c: eb006c5b bl 3e600 <== NOT EXECUTED 23490: e28d4004 add r4, sp, #4 <== NOT EXECUTED 23494: e1a01000 mov r1, r0 <== NOT EXECUTED 23498: e3a0c001 mov ip, #1 <== NOT EXECUTED 2349c: e1a00006 mov r0, r6 <== NOT EXECUTED 234a0: e3a02000 mov r2, #0 <== NOT EXECUTED 234a4: e1a03004 mov r3, r4 <== NOT EXECUTED 234a8: e58dc000 str ip, [sp] <== NOT EXECUTED 234ac: ebff8722 bl 513c <== NOT EXECUTED 234b0: e2501000 subs r1, r0, #0 <== NOT EXECUTED 234b4: 1a000007 bne 234d8 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 234b8: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 234bc: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 234c0: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 234c4: e3530000 cmp r3, #0 <== NOT EXECUTED 234c8: 1a000004 bne 234e0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 234cc: eb0051d1 bl 37c18 <__errno> <== NOT EXECUTED 234d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 234d4: e5803000 str r3, [r0] <== NOT EXECUTED 234d8: e3e05000 mvn r5, #0 <== NOT EXECUTED 234dc: ea000010 b 23524 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 234e0: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 234e4: e1a00005 mov r0, r5 <== NOT EXECUTED 234e8: eb005e82 bl 3aef8 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 234ec: e1a01005 mov r1, r5 <== NOT EXECUTED 234f0: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 234f4: e286001c add r0, r6, #28 <== NOT EXECUTED 234f8: e1a0e00f mov lr, pc <== NOT EXECUTED 234fc: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23500: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23504: 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 ); 23508: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2350c: 0a000004 beq 23524 <== NOT EXECUTED 23510: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23514: e3530000 cmp r3, #0 <== NOT EXECUTED 23518: 11a00004 movne r0, r4 <== NOT EXECUTED 2351c: 11a0e00f movne lr, pc <== NOT EXECUTED 23520: 112fff13 bxne r3 <== NOT EXECUTED return result; } 23524: e1a00005 mov r0, r5 <== NOT EXECUTED 23528: e28dd018 add sp, sp, #24 <== NOT EXECUTED 2352c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00023530 : int symlink( const char *actualpath, const char *sympath ) { 23530: 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 ); 23534: e5d13000 ldrb r3, [r1] 23538: e353002f cmp r3, #47 ; 0x2f 2353c: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 23540: e24dd018 sub sp, sp, #24 23544: 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 ); 23548: 13a06000 movne r6, #0 2354c: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 23550: 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 ); 23554: 0a000001 beq 23560 23558: e3530000 cmp r3, #0 2355c: 1a000009 bne 23588 23560: e59f30f0 ldr r3, [pc, #240] ; 23658 23564: e593e000 ldr lr, [r3] 23568: e28ee018 add lr, lr, #24 2356c: e8be000f ldm lr!, {r0, r1, r2, r3} 23570: e1a0c00d mov ip, sp 23574: e8ac000f stmia ip!, {r0, r1, r2, r3} 23578: e59e3000 ldr r3, [lr] 2357c: e3a00001 mov r0, #1 23580: e58c3000 str r3, [ip] 23584: ea000008 b 235ac 23588: e59f30c8 ldr r3, [pc, #200] ; 23658 2358c: e593e000 ldr lr, [r3] 23590: e28ee004 add lr, lr, #4 23594: e8be000f ldm lr!, {r0, r1, r2, r3} 23598: e1a0c00d mov ip, sp 2359c: e8ac000f stmia ip!, {r0, r1, r2, r3} 235a0: e59e3000 ldr r3, [lr] 235a4: e58c3000 str r3, [ip] 235a8: e1a00006 mov r0, r6 if ( !loc.ops->evalformake_h ) { 235ac: e59d300c ldr r3, [sp, #12] 235b0: e5933004 ldr r3, [r3, #4] 235b4: e3530000 cmp r3, #0 235b8: 0a000010 beq 23600 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 235bc: e0850000 add r0, r5, r0 235c0: e1a0100d mov r1, sp 235c4: e28d2014 add r2, sp, #20 235c8: e1a0e00f mov lr, pc 235cc: e12fff13 bx r3 if ( result != 0 ) 235d0: 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 ); 235d4: e1a0600d mov r6, sp if ( result != 0 ) 235d8: 1a00000b bne 2360c return -1; if ( !loc.ops->symlink_h ) { 235dc: e59d200c ldr r2, [sp, #12] 235e0: e5923038 ldr r3, [r2, #56] ; 0x38 235e4: e3530000 cmp r3, #0 235e8: 1a000009 bne 23614 rtems_filesystem_freenode( &loc ); 235ec: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 235f0: e3530000 cmp r3, #0 <== NOT EXECUTED 235f4: 11a0000d movne r0, sp <== NOT EXECUTED 235f8: 11a0e00f movne lr, pc <== NOT EXECUTED 235fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23600: eb005184 bl 37c18 <__errno> <== NOT EXECUTED 23604: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23608: e5803000 str r3, [r0] <== NOT EXECUTED 2360c: e3e04000 mvn r4, #0 23610: ea00000d b 2364c } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 23614: e1a01004 mov r1, r4 23618: e1a0000d mov r0, sp 2361c: e59d2014 ldr r2, [sp, #20] 23620: e1a0e00f mov lr, pc 23624: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23628: e59d300c ldr r3, [sp, #12] 2362c: 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); 23630: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 23634: 0a000004 beq 2364c 23638: e593301c ldr r3, [r3, #28] 2363c: e3530000 cmp r3, #0 23640: 11a0000d movne r0, sp 23644: 11a0e00f movne lr, pc 23648: 112fff13 bxne r3 return result; } 2364c: e1a00004 mov r0, r4 23650: e28dd018 add sp, sp, #24 23654: e8bd8070 pop {r4, r5, r6, pc} 23658: 00052008 .word 0x00052008 0000f51c : int fd, int opt, struct termios *tp ) { switch (opt) { f51c: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { f520: e92d4030 push {r4, r5, lr} f524: e1a04002 mov r4, r2 f528: e1a05000 mov r5, r0 switch (opt) { f52c: 0a00000a beq f55c f530: e3510001 cmp r1, #1 <== NOT EXECUTED f534: 0a000003 beq f548 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); f538: eb000ec7 bl 1305c <__errno> <== NOT EXECUTED f53c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f540: e5803000 str r3, [r0] <== NOT EXECUTED f544: ea000009 b f570 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) f548: e3a01003 mov r1, #3 <== NOT EXECUTED f54c: e3a02000 mov r2, #0 <== NOT EXECUTED f550: eb000b7d bl 1234c <== NOT EXECUTED f554: e3500000 cmp r0, #0 <== NOT EXECUTED f558: ba000004 blt f570 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f55c: e1a00005 mov r0, r5 f560: e1a02004 mov r2, r4 f564: e3a01002 mov r1, #2 } } f568: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f56c: ea000b76 b 1234c } } f570: e3e00000 mvn r0, #0 <== NOT EXECUTED f574: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000b290 : #include int unlink( const char *path ) { b290: e92d4070 push {r4, r5, r6, lr} b294: e24dd02c sub sp, sp, #44 ; 0x2c b298: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); b29c: ebffd7b0 bl 1164 if ( parentpathlen == 0 ) b2a0: e2505000 subs r5, r0, #0 b2a4: 1a000019 bne b310 rtems_filesystem_get_start_loc( path, &i, &parentloc ); b2a8: e5d63000 ldrb r3, [r6] b2ac: e353002f cmp r3, #47 ; 0x2f b2b0: 1353005c cmpne r3, #92 ; 0x5c b2b4: 0a000001 beq b2c0 b2b8: e3530000 cmp r3, #0 <== NOT EXECUTED b2bc: 1a000009 bne b2e8 <== NOT EXECUTED b2c0: e59f3248 ldr r3, [pc, #584] ; b510 b2c4: e593e000 ldr lr, [r3] b2c8: e28ee018 add lr, lr, #24 b2cc: e8be000f ldm lr!, {r0, r1, r2, r3} b2d0: e28dc018 add ip, sp, #24 b2d4: e8ac000f stmia ip!, {r0, r1, r2, r3} b2d8: e59e3000 ldr r3, [lr] b2dc: e3a04000 mov r4, #0 b2e0: e58c3000 str r3, [ip] b2e4: ea000013 b b338 b2e8: e59f3220 ldr r3, [pc, #544] ; b510 <== NOT EXECUTED b2ec: e593e000 ldr lr, [r3] <== NOT EXECUTED b2f0: e28ee004 add lr, lr, #4 <== NOT EXECUTED b2f4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED b2f8: e28dc018 add ip, sp, #24 <== NOT EXECUTED b2fc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED b300: e59e3000 ldr r3, [lr] <== NOT EXECUTED b304: e1a04005 mov r4, r5 <== NOT EXECUTED b308: e58c3000 str r3, [ip] <== NOT EXECUTED b30c: ea000009 b b338 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, b310: e3a0c000 mov ip, #0 b314: e1a00006 mov r0, r6 b318: e1a01005 mov r1, r5 b31c: e3a02002 mov r2, #2 b320: e28d3018 add r3, sp, #24 b324: e58dc000 str ip, [sp] b328: ebffd7d5 bl 1284 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) b32c: e3500000 cmp r0, #0 b330: 1a000072 bne b500 b334: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; b338: e28de018 add lr, sp, #24 b33c: e8be000f ldm lr!, {r0, r1, r2, r3} b340: e28dc004 add ip, sp, #4 b344: e8ac000f stmia ip!, {r0, r1, r2, r3} b348: e59e3000 ldr r3, [lr] name = path + parentpathlen; b34c: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; b350: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); b354: e1a00005 mov r0, r5 b358: eb000481 bl c564 b35c: e1a01000 mov r1, r0 b360: e1a00005 mov r0, r5 b364: ebffd772 bl 1134 b368: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), b36c: e1a00006 mov r0, r6 b370: eb00047b bl c564 b374: e28d5004 add r5, sp, #4 b378: e3a0c000 mov ip, #0 b37c: e1a01000 mov r1, r0 b380: e1a0200c mov r2, ip b384: e1a00006 mov r0, r6 b388: e1a03005 mov r3, r5 b38c: e58dc000 str ip, [sp] b390: ebffd783 bl 11a4 0, &loc, false ); if ( result != 0 ) { b394: e3500000 cmp r0, #0 b398: 0a00000b beq b3cc if ( free_parentloc ) b39c: e3540000 cmp r4, #0 b3a0: 0a000056 beq b500 rtems_filesystem_freenode( &parentloc ); b3a4: e59d3024 ldr r3, [sp, #36] ; 0x24 b3a8: e3530000 cmp r3, #0 b3ac: 0a000053 beq b500 b3b0: e593301c ldr r3, [r3, #28] b3b4: e3530000 cmp r3, #0 b3b8: 0a000050 beq b500 b3bc: e28d0018 add r0, sp, #24 b3c0: e1a0e00f mov lr, pc b3c4: e12fff13 bx r3 b3c8: ea00004c b b500 return -1; } if ( !loc.ops->node_type_h ) { b3cc: e59d2010 ldr r2, [sp, #16] b3d0: e5923010 ldr r3, [r2, #16] b3d4: e3530000 cmp r3, #0 b3d8: 0a00001c beq b450 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 ) { b3dc: e1a00005 mov r0, r5 b3e0: e1a0e00f mov lr, pc b3e4: e12fff13 bx r3 b3e8: e3500001 cmp r0, #1 b3ec: e59d2010 ldr r2, [sp, #16] b3f0: 1a000013 bne b444 rtems_filesystem_freenode( &loc ); b3f4: e3520000 cmp r2, #0 b3f8: 0a000004 beq b410 b3fc: e592301c ldr r3, [r2, #28] b400: e3530000 cmp r3, #0 b404: 11a00005 movne r0, r5 b408: 11a0e00f movne lr, pc b40c: 112fff13 bxne r3 if ( free_parentloc ) b410: e3540000 cmp r4, #0 b414: 0a000007 beq b438 rtems_filesystem_freenode( &parentloc ); b418: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED b41c: e3530000 cmp r3, #0 <== NOT EXECUTED b420: 0a000004 beq b438 <== NOT EXECUTED b424: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b428: e3530000 cmp r3, #0 <== NOT EXECUTED b42c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED b430: 11a0e00f movne lr, pc <== NOT EXECUTED b434: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); b438: eb000058 bl b5a0 <__errno> b43c: e3a03015 mov r3, #21 b440: ea000013 b b494 } if ( !loc.ops->unlink_h ) { b444: e592300c ldr r3, [r2, #12] b448: e3530000 cmp r3, #0 b44c: 1a000012 bne b49c rtems_filesystem_freenode( &loc ); b450: e592301c ldr r3, [r2, #28] <== NOT EXECUTED b454: e3530000 cmp r3, #0 <== NOT EXECUTED b458: 11a00005 movne r0, r5 <== NOT EXECUTED b45c: 11a0e00f movne lr, pc <== NOT EXECUTED b460: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) b464: e3540000 cmp r4, #0 <== NOT EXECUTED b468: 0a000007 beq b48c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); b46c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED b470: e3530000 cmp r3, #0 <== NOT EXECUTED b474: 0a000004 beq b48c <== NOT EXECUTED b478: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b47c: e3530000 cmp r3, #0 <== NOT EXECUTED b480: 128d0018 addne r0, sp, #24 <== NOT EXECUTED b484: 11a0e00f movne lr, pc <== NOT EXECUTED b488: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); b48c: eb000043 bl b5a0 <__errno> <== NOT EXECUTED b490: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED b494: e5803000 str r3, [r0] b498: ea000018 b b500 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); b49c: e28d0018 add r0, sp, #24 b4a0: e1a01005 mov r1, r5 b4a4: e1a0e00f mov lr, pc b4a8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); b4ac: e59d3010 ldr r3, [sp, #16] b4b0: 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 ); b4b4: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); b4b8: 0a000004 beq b4d0 b4bc: e593301c ldr r3, [r3, #28] b4c0: e3530000 cmp r3, #0 b4c4: 11a00005 movne r0, r5 b4c8: 11a0e00f movne lr, pc b4cc: 112fff13 bxne r3 if ( free_parentloc ) b4d0: e3540000 cmp r4, #0 b4d4: 0a00000a beq b504 rtems_filesystem_freenode( &parentloc ); b4d8: e59d3024 ldr r3, [sp, #36] ; 0x24 b4dc: e3530000 cmp r3, #0 b4e0: 0a000007 beq b504 b4e4: e593301c ldr r3, [r3, #28] b4e8: e3530000 cmp r3, #0 b4ec: 0a000004 beq b504 b4f0: e28d0018 add r0, sp, #24 b4f4: e1a0e00f mov lr, pc b4f8: e12fff13 bx r3 b4fc: ea000000 b b504 b500: e3e06000 mvn r6, #0 return result; } b504: e1a00006 mov r0, r6 b508: e28dd02c add sp, sp, #44 ; 0x2c b50c: e8bd8070 pop {r4, r5, r6, pc} b510: 00017188 .word 0x00017188 000086c0 : */ int unmount( const char *path ) { 86c0: e92d4030 push {r4, r5, lr} 86c4: e24dd018 sub sp, sp, #24 86c8: 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 ) ) 86cc: eb00d7cb bl 3e600 86d0: e28d4004 add r4, sp, #4 86d4: e1a01000 mov r1, r0 86d8: e3a0c001 mov ip, #1 86dc: e1a00005 mov r0, r5 86e0: e3a02000 mov r2, #0 86e4: e1a03004 mov r3, r4 86e8: e58dc000 str ip, [sp] 86ec: ebfff292 bl 513c 86f0: e3500000 cmp r0, #0 86f4: 1a000057 bne 8858 return -1; mt_entry = loc.mt_entry; 86f8: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 86fc: e59d3004 ldr r3, [sp, #4] 8700: e595201c ldr r2, [r5, #28] 8704: e1520003 cmp r2, r3 8708: e59d3010 ldr r3, [sp, #16] 870c: 0a000009 beq 8738 /* * 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 ); 8710: e3530000 cmp r3, #0 8714: 0a000004 beq 872c 8718: e593301c ldr r3, [r3, #28] 871c: e3530000 cmp r3, #0 8720: 11a00004 movne r0, r4 8724: 11a0e00f movne lr, pc 8728: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 872c: eb00bd39 bl 37c18 <__errno> 8730: e3a0300d mov r3, #13 8734: ea000023 b 87c8 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8738: e3530000 cmp r3, #0 873c: 0a000004 beq 8754 8740: e593301c ldr r3, [r3, #28] 8744: e3530000 cmp r3, #0 8748: 11a00004 movne r0, r4 874c: 11a0e00f movne lr, pc 8750: 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; 8754: e5953014 ldr r3, [r5, #20] 8758: e5933028 ldr r3, [r3, #40] ; 0x28 875c: e3530000 cmp r3, #0 8760: 0a000003 beq 8774 fs_root_loc = &mt_entry->mt_fs_root; 8764: e5953028 ldr r3, [r5, #40] ; 0x28 8768: e593302c ldr r3, [r3, #44] ; 0x2c 876c: e3530000 cmp r3, #0 8770: 1a000002 bne 8780 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 ); 8774: eb00bd27 bl 37c18 <__errno> <== NOT EXECUTED 8778: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 877c: ea000011 b 87c8 <== 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 ) 8780: e59f30f0 ldr r3, [pc, #240] ; 8878 8784: e5933000 ldr r3, [r3] 8788: e5933014 ldr r3, [r3, #20] 878c: 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; 8790: 159f20e4 ldrne r2, [pc, #228] ; 887c 8794: 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 ) 8798: 1a000005 bne 87b4 879c: ea000007 b 87c0 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; 87a0: e5930018 ldr r0, [r3, #24] 87a4: e595102c ldr r1, [r5, #44] ; 0x2c 87a8: e1500001 cmp r0, r1 87ac: 0a000003 beq 87c0 * 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 ) { 87b0: e5933000 ldr r3, [r3] 87b4: e1530002 cmp r3, r2 87b8: 1afffff8 bne 87a0 87bc: ea000028 b 8864 * 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 ); 87c0: eb00bd14 bl 37c18 <__errno> 87c4: e3a03010 mov r3, #16 87c8: e5803000 str r3, [r0] 87cc: ea000021 b 8858 * 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 ) 87d0: e5953014 ldr r3, [r5, #20] 87d4: e1a00005 mov r0, r5 87d8: e1a0e00f mov lr, pc 87dc: e593f028 ldr pc, [r3, #40] ; 0x28 87e0: e2504000 subs r4, r0, #0 87e4: 1a00001b bne 8858 * 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){ 87e8: e5953028 ldr r3, [r5, #40] ; 0x28 87ec: e1a00005 mov r0, r5 87f0: e1a0e00f mov lr, pc 87f4: e593f02c ldr pc, [r3, #44] ; 0x2c 87f8: e3500000 cmp r0, #0 87fc: 0a000007 beq 8820 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 8800: e1a00005 mov r0, r5 <== NOT EXECUTED 8804: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8808: e1a0e00f mov lr, pc <== NOT EXECUTED 880c: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 8810: e3500000 cmp r0, #0 <== NOT EXECUTED 8814: 0a00000f beq 8858 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8818: e1a00004 mov r0, r4 <== NOT EXECUTED 881c: eb00047a bl 9a0c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8820: e1a00005 mov r0, r5 8824: eb00052b bl 9cd8 <_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 ); 8828: e5953014 ldr r3, [r5, #20] 882c: e3530000 cmp r3, #0 8830: 0a000004 beq 8848 8834: e593301c ldr r3, [r3, #28] 8838: e3530000 cmp r3, #0 883c: 12850008 addne r0, r5, #8 8840: 11a0e00f movne lr, pc 8844: 112fff13 bxne r3 free( mt_entry ); 8848: e1a00005 mov r0, r5 884c: ebfff26d bl 5208 8850: e3a00000 mov r0, #0 return 0; 8854: ea000000 b 885c 8858: e3e00000 mvn r0, #0 } 885c: e28dd018 add sp, sp, #24 8860: 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 ) 8864: e1a00005 mov r0, r5 8868: ebfff314 bl 54c0 886c: e3500001 cmp r0, #1 8870: 1affffd6 bne 87d0 8874: eaffffd1 b 87c0 8878: 00052008 .word 0x00052008 887c: 0005f50c .word 0x0005f50c 000236ec : int utime( const char *path, const struct utimbuf *times ) { 236ec: e92d4070 push {r4, r5, r6, lr} 236f0: e24dd018 sub sp, sp, #24 236f4: e1a05001 mov r5, r1 236f8: 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 ) ) 236fc: eb006bbf bl 3e600 23700: e28d4004 add r4, sp, #4 23704: e1a01000 mov r1, r0 23708: e3a0c001 mov ip, #1 2370c: e1a00006 mov r0, r6 23710: e3a02000 mov r2, #0 23714: e1a03004 mov r3, r4 23718: e58dc000 str ip, [sp] 2371c: ebff8686 bl 513c 23720: e3500000 cmp r0, #0 23724: 1a00000b bne 23758 return -1; if ( !temp_loc.ops->utime_h ){ 23728: e59d2010 ldr r2, [sp, #16] 2372c: e5923030 ldr r3, [r2, #48] ; 0x30 23730: e3530000 cmp r3, #0 23734: 1a000009 bne 23760 rtems_filesystem_freenode( &temp_loc ); 23738: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2373c: e3530000 cmp r3, #0 <== NOT EXECUTED 23740: 11a00004 movne r0, r4 <== NOT EXECUTED 23744: 11a0e00f movne lr, pc <== NOT EXECUTED 23748: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2374c: eb005131 bl 37c18 <__errno> <== NOT EXECUTED 23750: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23754: e5803000 str r3, [r0] <== NOT EXECUTED 23758: e3e05000 mvn r5, #0 2375c: ea00000c b 23794 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 23760: e8950006 ldm r5, {r1, r2} 23764: e1a00004 mov r0, r4 23768: e1a0e00f mov lr, pc 2376c: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 23770: e59d3010 ldr r3, [sp, #16] 23774: 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 ); 23778: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 2377c: 0a000004 beq 23794 23780: e593301c ldr r3, [r3, #28] 23784: e3530000 cmp r3, #0 23788: 11a00004 movne r0, r4 2378c: 11a0e00f movne lr, pc 23790: 112fff13 bxne r3 return result; } 23794: e1a00005 mov r0, r5 23798: e28dd018 add sp, sp, #24 2379c: e8bd8070 pop {r4, r5, r6, pc} 00016968 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16968: e59f30b0 ldr r3, [pc, #176] ; 16a20 1696c: e5933000 ldr r3, [r3] 16970: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 16974: e92d4070 push {r4, r5, r6, lr} 16978: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1697c: 2a000005 bcs 16998 iop = rtems_libio_iop( fd ); 16980: e59f309c ldr r3, [pc, #156] ; 16a24 16984: e5934000 ldr r4, [r3] 16988: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 1698c: e5943014 ldr r3, [r4, #20] 16990: e3130c01 tst r3, #256 ; 0x100 16994: 1a000002 bne 169a4 16998: ebffd300 bl b5a0 <__errno> <== NOT EXECUTED 1699c: e3a03009 mov r3, #9 <== NOT EXECUTED 169a0: ea00000f b 169e4 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 169a4: e3510000 cmp r1, #0 169a8: 0a000004 beq 169c0 rtems_libio_check_count( count ); 169ac: e3520000 cmp r2, #0 169b0: 01a00002 moveq r0, r2 169b4: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 169b8: e3130004 tst r3, #4 169bc: 1a000002 bne 169cc 169c0: ebffd2f6 bl b5a0 <__errno> <== NOT EXECUTED 169c4: e3a03016 mov r3, #22 <== NOT EXECUTED 169c8: ea000005 b 169e4 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 169cc: e594303c ldr r3, [r4, #60] ; 0x3c 169d0: e593300c ldr r3, [r3, #12] 169d4: e3530000 cmp r3, #0 169d8: 1a000004 bne 169f0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 169dc: ebffd2ef bl b5a0 <__errno> <== NOT EXECUTED 169e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 169e4: e5803000 str r3, [r0] <== NOT EXECUTED 169e8: e3e00000 mvn r0, #0 <== NOT EXECUTED 169ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 169f0: e1a00004 mov r0, r4 169f4: e1a0e00f mov lr, pc 169f8: e12fff13 bx r3 if ( rc > 0 ) 169fc: e3500000 cmp r0, #0 16a00: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 16a04: e284600c add r6, r4, #12 16a08: e8960060 ldm r6, {r5, r6} 16a0c: e0952000 adds r2, r5, r0 16a10: e0a63fc0 adc r3, r6, r0, asr #31 16a14: e584200c str r2, [r4, #12] 16a18: e5843010 str r3, [r4, #16] return rc; } 16a1c: e8bd8070 pop {r4, r5, r6, pc} 16a20: 00016ff0 .word 0x00016ff0 16a24: 000185a8 .word 0x000185a8 00005480 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5480: e59f3164 ldr r3, [pc, #356] ; 55ec 5484: e5933000 ldr r3, [r3] 5488: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 548c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5490: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5494: 2a000005 bcs 54b0 iop = rtems_libio_iop( fd ); 5498: e59f3150 ldr r3, [pc, #336] ; 55f0 549c: e5936000 ldr r6, [r3] 54a0: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 54a4: e5963014 ldr r3, [r6, #20] 54a8: e3130c01 tst r3, #256 ; 0x100 54ac: 1a000002 bne 54bc 54b0: eb00215c bl da28 <__errno> 54b4: e3a03009 mov r3, #9 54b8: ea000025 b 5554 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 54bc: e3130004 tst r3, #4 54c0: 0a000021 beq 554c /* * Argument validation on IO vector */ if ( !iov ) 54c4: e3510000 cmp r1, #0 54c8: 0a00001f beq 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 54cc: e3520000 cmp r2, #0 54d0: da00001d ble 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 54d4: e3520b01 cmp r2, #1024 ; 0x400 54d8: ca00001b bgt 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 54dc: e596303c ldr r3, [r6, #60] ; 0x3c 54e0: e593300c ldr r3, [r3, #12] 54e4: e3530000 cmp r3, #0 54e8: 1a000002 bne 54f8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 54ec: eb00214d bl da28 <__errno> <== NOT EXECUTED 54f0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 54f4: ea000016 b 5554 <== NOT EXECUTED 54f8: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 54fc: e59fc0f0 ldr ip, [pc, #240] ; 55f4 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 ); 5500: e1a05001 mov r5, r1 5504: e1a02001 mov r2, r1 5508: e3a07001 mov r7, #1 550c: 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 ) 5510: e5921000 ldr r1, [r2] 5514: 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++ ) { 5518: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 551c: 0a00000a beq 554c 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 ) 5520: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5524: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 5528: e1510004 cmp r1, r4 552c: a3a04000 movge r4, #0 5530: b3a04001 movlt r4, #1 5534: e151000c cmp r1, ip 5538: 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 ) 553c: e3500000 cmp r0, #0 5540: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5544: e3540000 cmp r4, #0 5548: 0a000003 beq 555c rtems_set_errno_and_return_minus_one( EINVAL ); 554c: eb002135 bl da28 <__errno> 5550: e3a03016 mov r3, #22 5554: e5803000 str r3, [r0] 5558: ea000011 b 55a4 * 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++ ) { 555c: e1530008 cmp r3, r8 5560: e2822008 add r2, r2, #8 5564: b1a04001 movlt r4, r1 5568: baffffe8 blt 5510 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 556c: e3570000 cmp r7, #0 <== NOT EXECUTED 5570: 1a00001b bne 55e4 <== NOT EXECUTED 5574: e1a04007 mov r4, r7 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5578: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 557c: e3520000 cmp r2, #0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5580: e2877001 add r7, r7, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5584: 0a000013 beq 55d8 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 5588: e5951000 ldr r1, [r5] <== NOT EXECUTED 558c: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 5590: e1a00006 mov r0, r6 <== NOT EXECUTED 5594: e1a0e00f mov lr, pc <== NOT EXECUTED 5598: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 559c: e3500000 cmp r0, #0 <== NOT EXECUTED 55a0: aa000001 bge 55ac <== NOT EXECUTED 55a4: e3e04000 mvn r4, #0 55a8: ea00000d b 55e4 return -1; if ( bytes > 0 ) { 55ac: 0a000006 beq 55cc <== NOT EXECUTED iop->offset += bytes; 55b0: e286c00c add ip, r6, #12 <== NOT EXECUTED 55b4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 55b8: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 55bc: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 55c0: e586200c str r2, [r6, #12] <== NOT EXECUTED 55c4: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 55c8: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 55cc: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 55d0: e1500003 cmp r0, r3 <== NOT EXECUTED 55d4: 1a000002 bne 55e4 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 55d8: e1570008 cmp r7, r8 <== NOT EXECUTED 55dc: e2855008 add r5, r5, #8 <== NOT EXECUTED 55e0: baffffe4 blt 5578 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 55e4: e1a00004 mov r0, r4 55e8: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 55ec: 0001acd0 .word 0x0001acd0 55f0: 0001d6bc .word 0x0001d6bc 55f4: 00007fff .word 0x00007fff