00007788 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 7788: e5903000 ldr r3, [r0] 778c: 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; 7790: e5903010 ldr r3, [r0, #16] switch( node->type ) { 7794: 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; 7798: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 779c: e3520006 cmp r2, #6 77a0: 979ff102 ldrls pc, [pc, r2, lsl #2] 77a4: ea000010 b 77ec <== NOT EXECUTED 77a8: 000077c4 .word 0x000077c4 <== NOT EXECUTED 77ac: 000077cc .word 0x000077cc <== NOT EXECUTED 77b0: 000077d4 .word 0x000077d4 <== NOT EXECUTED 77b4: 000077d4 .word 0x000077d4 <== NOT EXECUTED 77b8: 000077dc .word 0x000077dc <== NOT EXECUTED 77bc: 000077dc .word 0x000077dc <== NOT EXECUTED 77c0: 000077e4 .word 0x000077e4 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 77c4: e5933008 ldr r3, [r3, #8] 77c8: ea000006 b 77e8 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 77cc: e59f3020 ldr r3, [pc, #32] ; 77f4 77d0: ea000004 b 77e8 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 77d4: e59f301c ldr r3, [pc, #28] ; 77f8 77d8: ea000002 b 77e8 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 77dc: e5933004 ldr r3, [r3, #4] 77e0: ea000000 b 77e8 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 77e4: e59f3010 ldr r3, [pc, #16] ; 77fc 77e8: e5803008 str r3, [r0, #8] break; } return 0; } 77ec: e3a00000 mov r0, #0 77f0: e12fff1e bx lr 77f4: 00017940 .word 0x00017940 77f8: 00017978 .word 0x00017978 77fc: 000178e8 .word 0x000178e8 0000a7ac : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a7ac: 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 ) a7b0: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a7b4: e1a05001 mov r5, r1 a7b8: e59d6014 ldr r6, [sp, #20] a7bc: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) a7c0: 01a07004 moveq r7, r4 a7c4: 0a000041 beq a8d0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); a7c8: e59f2108 ldr r2, [pc, #264] ; a8d8 a7cc: e5922000 ldr r2, [r2] a7d0: e592202c ldr r2, [r2, #44] ; 0x2c a7d4: e1a00005 mov r0, r5 a7d8: e1c32002 bic r2, r3, r2 a7dc: ebffffc5 bl a6f8 if ( !node ) a7e0: e2507000 subs r7, r0, #0 a7e4: 0a000039 beq a8d0 return NULL; /* * Set the type specific information */ switch (type) { a7e8: e2455001 sub r5, r5, #1 a7ec: e3550006 cmp r5, #6 a7f0: 979ff105 ldrls pc, [pc, r5, lsl #2] a7f4: ea000025 b a890 <== NOT EXECUTED a7f8: 0000a814 .word 0x0000a814 <== NOT EXECUTED a7fc: 0000a838 .word 0x0000a838 <== NOT EXECUTED a800: 0000a830 .word 0x0000a830 <== NOT EXECUTED a804: 0000a830 .word 0x0000a830 <== NOT EXECUTED a808: 0000a860 .word 0x0000a860 <== NOT EXECUTED a80c: 0000a848 .word 0x0000a848 <== NOT EXECUTED a810: 0000a884 .word 0x0000a884 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a814: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); a818: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a81c: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; a820: e3a02000 mov r2, #0 a824: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); a828: e5873058 str r3, [r7, #88] ; 0x58 a82c: ea00001c b a8a4 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; a830: e5963000 ldr r3, [r6] a834: ea000013 b a888 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; a838: 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; a83c: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; a840: e5872054 str r2, [r7, #84] ; 0x54 a844: ea00000f b a888 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; a848: e3a03000 mov r3, #0 <== NOT EXECUTED a84c: e3a02000 mov r2, #0 <== NOT EXECUTED a850: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED a854: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; a858: e3a03000 mov r3, #0 <== NOT EXECUTED a85c: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; a860: 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; a864: e3a01000 mov r1, #0 a868: e3a02000 mov r2, #0 a86c: e5871050 str r1, [r7, #80] ; 0x50 a870: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; a874: 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; a878: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; a87c: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; a880: ea000007 b a8a4 case IMFS_FIFO: node->info.fifo.pipe = NULL; a884: e3a03000 mov r3, #0 a888: e5873050 str r3, [r7, #80] ; 0x50 break; a88c: ea000004 b a8a4 default: assert(0); a890: e59f0044 ldr r0, [pc, #68] ; a8dc <== NOT EXECUTED a894: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED a898: e59f2040 ldr r2, [pc, #64] ; a8e0 <== NOT EXECUTED a89c: e59f3040 ldr r3, [pc, #64] ; a8e4 <== NOT EXECUTED a8a0: ebfff735 bl 857c <__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; a8a4: e5943010 ldr r3, [r4, #16] a8a8: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; a8ac: e5923000 ldr r3, [r2] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; a8b0: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; a8b4: e2833001 add r3, r3, #1 a8b8: 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; a8bc: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; a8c0: 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 ); a8c4: e2800050 add r0, r0, #80 ; 0x50 a8c8: e1a01007 mov r1, r7 a8cc: ebffe89c bl 4b44 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } a8d0: e1a00007 mov r0, r7 a8d4: e8bd80f0 pop {r4, r5, r6, r7, pc} a8d8: 00017188 .word 0x00017188 a8dc: 00018151 .word 0x00018151 a8e0: 00017a88 .word 0x00017a88 a8e4: 00017f21 .word 0x00017f21 00002d0c : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d0c: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2d10: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2d14: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d18: 059f00a4 ldreq r0, [pc, #164] ; 2dc4 2d1c: 03a01084 moveq r1, #132 ; 0x84 2d20: 059f20a0 ldreq r2, [pc, #160] ; 2dc8 2d24: 059f30a0 ldreq r3, [pc, #160] ; 2dcc 2d28: 0a000005 beq 2d44 assert( level >= 0 ); 2d2c: e3510000 cmp r1, #0 2d30: aa000004 bge 2d48 2d34: e59f0088 ldr r0, [pc, #136] ; 2dc4 <== NOT EXECUTED 2d38: e59f2088 ldr r2, [pc, #136] ; 2dc8 <== NOT EXECUTED 2d3c: e59f308c ldr r3, [pc, #140] ; 2dd0 <== NOT EXECUTED 2d40: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 2d44: eb0001d7 bl 34a8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2d48: e590304c ldr r3, [r0, #76] ; 0x4c 2d4c: e3530001 cmp r3, #1 2d50: 159f006c ldrne r0, [pc, #108] ; 2dc4 2d54: 13a01088 movne r1, #136 ; 0x88 2d58: 159f2068 ldrne r2, [pc, #104] ; 2dc8 2d5c: 159f3070 ldrne r3, [pc, #112] ; 2dd4 2d60: 1afffff7 bne 2d44 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2d64: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d68: 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, "...." ); 2d6c: e59f8064 ldr r8, [pc, #100] ; 2dd8 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2d70: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d74: ea00000f b 2db8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 2d78: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2d7c: 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++ ) 2d80: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 2d84: e5931008 ldr r1, [r3, #8] 2d88: e59f004c ldr r0, [pc, #76] ; 2ddc 2d8c: eb00349b bl 10000 !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++ ) 2d90: e1560005 cmp r6, r5 2d94: dafffff8 ble 2d7c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2d98: e1a00004 mov r0, r4 2d9c: ebffff7e bl 2b9c if ( the_jnode->type == IMFS_DIRECTORY ) 2da0: e594304c ldr r3, [r4, #76] ; 0x4c 2da4: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 2da8: 01a00004 moveq r0, r4 2dac: 01a01007 moveq r1, r7 2db0: 0bffffd5 bleq 2d0c 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 ) { 2db4: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2db8: e154000a cmp r4, sl 2dbc: 1affffed bne 2d78 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2dc0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2dc4: 00021306 .word 0x00021306 2dc8: 0002009c .word 0x0002009c 2dcc: 000213bc .word 0x000213bc 2dd0: 000213ca .word 0x000213ca 2dd4: 000213d5 .word 0x000213d5 2dd8: 0001fb30 .word 0x0001fb30 2ddc: 000213fb .word 0x000213fb 00007974 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 7974: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7978: e24dd044 sub sp, sp, #68 ; 0x44 797c: e1a04003 mov r4, r3 7980: e58d0000 str r0, [sp] 7984: e1a06001 mov r6, r1 7988: e58d2004 str r2, [sp, #4] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 798c: e5935000 ldr r5, [r3] 7990: e3a0b001 mov fp, #1 7994: 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 ); 7998: e28da008 add sl, sp, #8 799c: 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 ) 79a0: e59f9244 ldr r9, [pc, #580] ; 7bec /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 79a4: ea000061 b 7b30 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 79a8: e59d1000 ldr r1, [sp] 79ac: e1a03008 mov r3, r8 79b0: e0810007 add r0, r1, r7 79b4: e1a0200a mov r2, sl 79b8: e1a01006 mov r1, r6 79bc: eb0001f9 bl 81a8 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 79c0: e5943000 ldr r3, [r4] 79c4: 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 ); 79c8: e1a0b000 mov fp, r0 pathnamelen -= len; 79cc: e59de040 ldr lr, [sp, #64] ; 0x40 i += len; if ( !pathloc->node_access ) 79d0: 0a00004e beq 7b10 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 79d4: e3500000 cmp r0, #0 79d8: 0a000005 beq 79f4 if ( node->type == IMFS_DIRECTORY ) 79dc: e595204c ldr r2, [r5, #76] ; 0x4c 79e0: e3520001 cmp r2, #1 79e4: 1a000002 bne 79f4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 79e8: e5932030 ldr r2, [r3, #48] ; 0x30 79ec: e3120040 tst r2, #64 ; 0x40 79f0: 0a000078 beq 7bd8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 79f4: 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; 79f8: e06e6006 rsb r6, lr, r6 i += len; 79fc: 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; 7a00: e1a05003 mov r5, r3 switch( type ) { 7a04: 0a000021 beq 7a90 7a08: e35b0004 cmp fp, #4 7a0c: 0a000044 beq 7b24 7a10: e35b0002 cmp fp, #2 7a14: 1a000045 bne 7b30 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7a18: e5992000 ldr r2, [r9] 7a1c: e5922018 ldr r2, [r2, #24] 7a20: e1530002 cmp r3, r2 7a24: 0a000041 beq 7b30 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 7a28: e5942010 ldr r2, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 7a2c: e592101c ldr r1, [r2, #28] 7a30: e1530001 cmp r3, r1 7a34: 1a00000f bne 7a78 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 7a38: e2828008 add r8, r2, #8 7a3c: e8b8000f ldm r8!, {r0, r1, r2, r3} 7a40: e28dc02c add ip, sp, #44 ; 0x2c 7a44: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7a48: e28d502c add r5, sp, #44 ; 0x2c 7a4c: 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; 7a50: e5985000 ldr r5, [r8] *pathloc = newloc; 7a54: e1a08004 mov r8, r4 7a58: e8a8000f stmia r8!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a5c: e59d1000 ldr r1, [sp] 7a60: 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; 7a64: e5885000 str r5, [r8] return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a68: 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; 7a6c: e58c5000 str r5, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 7a70: e08e1006 add r1, lr, r6 7a74: ea000046 b 7b94 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 7a78: e5935008 ldr r5, [r3, #8] 7a7c: e3550000 cmp r5, #0 7a80: 1a000025 bne 7b1c rtems_set_errno_and_return_minus_one( ENOENT ); 7a84: eb000ec6 bl b5a4 <__errno> 7a88: e580b000 str fp, [r0] 7a8c: ea000054 b 7be4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 7a90: e593304c ldr r3, [r3, #76] ; 0x4c 7a94: e3530003 cmp r3, #3 7a98: 1a000006 bne 7ab8 IMFS_evaluate_hard_link( pathloc, 0 ); 7a9c: e1a00004 mov r0, r4 7aa0: e3a01000 mov r1, #0 7aa4: ebffff5d bl 7820 node = pathloc->node_access; 7aa8: e5945000 ldr r5, [r4] if ( !node ) 7aac: e3550000 cmp r5, #0 7ab0: 1a000008 bne 7ad8 7ab4: ea00000a b 7ae4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 7ab8: e3530004 cmp r3, #4 7abc: 1a000005 bne 7ad8 result = IMFS_evaluate_sym_link( pathloc, 0 ); 7ac0: e1a00004 mov r0, r4 7ac4: e3a01000 mov r1, #0 7ac8: ebffff6d bl 7884 node = pathloc->node_access; if ( result == -1 ) 7acc: e3700001 cmn r0, #1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 7ad0: e5945000 ldr r5, [r4] if ( result == -1 ) 7ad4: 0a00003d beq 7bd0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7ad8: e595304c ldr r3, [r5, #76] ; 0x4c 7adc: e3530001 cmp r3, #1 7ae0: 0a000002 beq 7af0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ae4: eb000eae bl b5a4 <__errno> 7ae8: e3a03014 mov r3, #20 7aec: ea00003b b 7be0 /* * 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 ) { 7af0: e595e05c ldr lr, [r5, #92] ; 0x5c 7af4: e35e0000 cmp lr, #0 7af8: 1a000015 bne 7b54 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7afc: e1a00005 mov r0, r5 7b00: e1a0100a mov r1, sl 7b04: eb00017f bl 8108 if ( !node ) 7b08: e2505000 subs r5, r0, #0 7b0c: 1a000002 bne 7b1c rtems_set_errno_and_return_minus_one( ENOENT ); 7b10: eb000ea3 bl b5a4 <__errno> 7b14: e3a03002 mov r3, #2 7b18: ea000030 b 7be0 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 7b1c: e5845000 str r5, [r4] 7b20: ea000002 b 7b30 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7b24: eb000e9e bl b5a4 <__errno> 7b28: e3a0305b mov r3, #91 ; 0x5b 7b2c: ea00002b b 7be0 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7b30: e35b0004 cmp fp, #4 7b34: 135b0000 cmpne fp, #0 7b38: 1affff9a bne 79a8 * 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 ) { 7b3c: e595304c ldr r3, [r5, #76] ; 0x4c 7b40: e3530001 cmp r3, #1 7b44: 1a000018 bne 7bac if ( node->info.directory.mt_fs != NULL ) { 7b48: e595e05c ldr lr, [r5, #92] ; 0x5c 7b4c: e35e0000 cmp lr, #0 7b50: 0a000015 beq 7bac newloc = node->info.directory.mt_fs->mt_fs_root; 7b54: e28ee01c add lr, lr, #28 7b58: e8be000f ldm lr!, {r0, r1, r2, r3} 7b5c: e28dc02c add ip, sp, #44 ; 0x2c 7b60: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7b64: e28d502c add r5, sp, #44 ; 0x2c 7b68: e8b5000f ldm r5!, {r0, r1, r2, r3} 7b6c: 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; 7b70: e59ee000 ldr lr, [lr] *pathloc = newloc; 7b74: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7b78: e59d1040 ldr r1, [sp, #64] ; 0x40 7b7c: e59d8000 ldr r8, [sp] 7b80: 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; 7b84: 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; 7b88: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7b8c: e0880000 add r0, r8, r0 7b90: e0861001 add r1, r6, r1 7b94: e59d2004 ldr r2, [sp, #4] 7b98: e1a03004 mov r3, r4 7b9c: e594c00c ldr ip, [r4, #12] 7ba0: e1a0e00f mov lr, pc 7ba4: e59cf000 ldr pc, [ip] 7ba8: ea000008 b 7bd0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7bac: e1a00004 mov r0, r4 7bb0: ebfffef4 bl 7788 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7bb4: 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 ) 7bb8: 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; 7bbc: 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 ) 7bc0: 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; 7bc4: e0032002 and r2, r3, r2 7bc8: e1520003 cmp r2, r3 7bcc: 1a000001 bne 7bd8 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7bd0: e28dd044 add sp, sp, #68 ; 0x44 7bd4: 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 ); 7bd8: eb000e71 bl b5a4 <__errno> 7bdc: e3a0300d mov r3, #13 7be0: e5803000 str r3, [r0] 7be4: e3e00000 mvn r0, #0 7be8: eafffff8 b 7bd0 7bec: 00017188 .word 0x00017188 00007ca4 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7ca4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7ca8: e24dd040 sub sp, sp, #64 ; 0x40 7cac: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7cb0: 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 */ ) { 7cb4: e58d2000 str r2, [sp] 7cb8: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7cbc: eb001229 bl c568 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7cc0: e59f9238 ldr r9, [pc, #568] ; 7f00 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7cc4: 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 ); 7cc8: e28db004 add fp, sp, #4 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7ccc: 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 ); 7cd0: e1a01008 mov r1, r8 7cd4: e28d303c add r3, sp, #60 ; 0x3c 7cd8: e0870005 add r0, r7, r5 7cdc: e1a0200b mov r2, fp 7ce0: eb000130 bl 81a8 pathlen -= len; i += len; if ( !pathloc->node_access ) 7ce4: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7ce8: e59da03c ldr sl, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7cec: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7cf0: e06a8008 rsb r8, sl, r8 i += len; if ( !pathloc->node_access ) 7cf4: 0a000067 beq 7e98 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7cf8: e3500000 cmp r0, #0 7cfc: 0a000005 beq 7d18 if ( node->type == IMFS_DIRECTORY ) 7d00: e596204c ldr r2, [r6, #76] ; 0x4c 7d04: e3520001 cmp r2, #1 7d08: 1a000002 bne 7d18 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7d0c: e5932030 ldr r2, [r3, #48] ; 0x30 7d10: e3120040 tst r2, #64 ; 0x40 7d14: 0a000074 beq 7eec while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 7d18: 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; 7d1c: e1a06003 mov r6, r3 switch( type ) { 7d20: e3500004 cmp r0, #4 7d24: 979ff100 ldrls pc, [pc, r0, lsl #2] 7d28: eaffffe8 b 7cd0 <== NOT EXECUTED 7d2c: 00007e54 .word 0x00007e54 <== NOT EXECUTED 7d30: 00007cd0 .word 0x00007cd0 <== NOT EXECUTED 7d34: 00007d40 .word 0x00007d40 <== NOT EXECUTED 7d38: 00007da0 .word 0x00007da0 <== NOT EXECUTED 7d3c: 00007e60 .word 0x00007e60 <== 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 ) 7d40: e5992000 ldr r2, [r9] 7d44: e5922018 ldr r2, [r2, #24] 7d48: e1530002 cmp r3, r2 7d4c: 0affffdf beq 7cd0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 7d50: e594e010 ldr lr, [r4, #16] 7d54: e59e201c ldr r2, [lr, #28] 7d58: e1530002 cmp r3, r2 7d5c: 1a00000b bne 7d90 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7d60: e28ee008 add lr, lr, #8 7d64: e8be000f ldm lr!, {r0, r1, r2, r3} 7d68: e28dc028 add ip, sp, #40 ; 0x28 7d6c: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7d70: e28d6028 add r6, sp, #40 ; 0x28 7d74: e8b6000f ldm r6!, {r0, r1, r2, r3} 7d78: e1a06004 mov r6, r4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7d7c: e59ee000 ldr lr, [lr] *pathloc = newloc; 7d80: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7d84: 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; 7d88: e586e000 str lr, [r6] 7d8c: ea000022 b 7e1c return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 7d90: e5936008 ldr r6, [r3, #8] 7d94: e3560000 cmp r6, #0 7d98: 1a00002b bne 7e4c 7d9c: ea00003d b 7e98 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 7da0: e593304c ldr r3, [r3, #76] ; 0x4c 7da4: e3530003 cmp r3, #3 7da8: 0a000001 beq 7db4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 7dac: e3530004 cmp r3, #4 7db0: 1a000004 bne 7dc8 result = IMFS_evaluate_link( pathloc, 0 ); 7db4: e1a00004 mov r0, r4 7db8: e3a01000 mov r1, #0 7dbc: ebffff8b bl 7bf0 if ( result == -1 ) 7dc0: e3700001 cmn r0, #1 7dc4: 0a000046 beq 7ee4 return -1; } node = pathloc->node_access; 7dc8: e5940000 ldr r0, [r4] if ( !node ) 7dcc: e3500000 cmp r0, #0 7dd0: 0a00003c beq 7ec8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7dd4: e590304c ldr r3, [r0, #76] ; 0x4c 7dd8: e3530001 cmp r3, #1 7ddc: 1a000039 bne 7ec8 /* * 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 ) { 7de0: e590e05c ldr lr, [r0, #92] ; 0x5c 7de4: e35e0000 cmp lr, #0 7de8: 0a000013 beq 7e3c newloc = node->info.directory.mt_fs->mt_fs_root; 7dec: e28ee01c add lr, lr, #28 7df0: e8be000f ldm lr!, {r0, r1, r2, r3} 7df4: e28dc028 add ip, sp, #40 ; 0x28 7df8: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7dfc: e28d6028 add r6, sp, #40 ; 0x28 7e00: e8b6000f ldm r6!, {r0, r1, r2, r3} 7e04: 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; 7e08: e59ee000 ldr lr, [lr] *pathloc = newloc; 7e0c: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e10: 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; 7e14: e586e000 str lr, [r6] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e18: 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; 7e1c: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7e20: e0870005 add r0, r7, r5 7e24: e1a01004 mov r1, r4 7e28: e59d2000 ldr r2, [sp] 7e2c: e594300c ldr r3, [r4, #12] 7e30: e1a0e00f mov lr, pc 7e34: e593f004 ldr pc, [r3, #4] 7e38: ea000029 b 7ee4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7e3c: e1a0100b mov r1, fp 7e40: eb0000b0 bl 8108 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 7e44: e2506000 subs r6, r0, #0 7e48: 0a000007 beq 7e6c done = true; else pathloc->node_access = node; 7e4c: e5846000 str r6, [r4] 7e50: eaffff9e b 7cd0 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 7e54: eb000dd2 bl b5a4 <__errno> 7e58: e3a03011 mov r3, #17 7e5c: ea000024 b 7ef4 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7e60: eb000dcf bl b5a4 <__errno> 7e64: e3a0305b mov r3, #91 ; 0x5b 7e68: ea000021 b 7ef4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 7e6c: e59d303c ldr r3, [sp, #60] ; 0x3c 7e70: e59d2000 ldr r2, [sp] 7e74: e0633005 rsb r3, r3, r5 7e78: e0873003 add r3, r7, r3 7e7c: e5823000 str r3, [r2] 7e80: 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++) { 7e84: ea000006 b 7ea4 if ( !IMFS_is_separator( path[ i ] ) ) 7e88: e353005c cmp r3, #92 ; 0x5c 7e8c: 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++) { 7e90: e2855001 add r5, r5, #1 if ( !IMFS_is_separator( path[ i ] ) ) 7e94: 0a000002 beq 7ea4 rtems_set_errno_and_return_minus_one( ENOENT ); 7e98: eb000dc1 bl b5a4 <__errno> 7e9c: e3a03002 mov r3, #2 7ea0: ea000013 b 7ef4 /* * 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++) { 7ea4: e5d53000 ldrb r3, [r5] 7ea8: e3530000 cmp r3, #0 7eac: 1afffff5 bne 7e88 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7eb0: e1a00004 mov r0, r4 7eb4: ebfffe33 bl 7788 /* * The returned node must be a directory */ node = pathloc->node_access; 7eb8: e5943000 ldr r3, [r4] if ( node->type != IMFS_DIRECTORY ) 7ebc: e593204c ldr r2, [r3, #76] ; 0x4c 7ec0: e3520001 cmp r2, #1 7ec4: 0a000002 beq 7ed4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ec8: eb000db5 bl b5a4 <__errno> 7ecc: e3a03014 mov r3, #20 7ed0: ea000007 b 7ef4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7ed4: e5933030 ldr r3, [r3, #48] ; 0x30 7ed8: e20330c0 and r3, r3, #192 ; 0xc0 7edc: e35300c0 cmp r3, #192 ; 0xc0 7ee0: 1a000001 bne 7eec if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7ee4: e28dd040 add sp, sp, #64 ; 0x40 7ee8: 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 ); 7eec: eb000dac bl b5a4 <__errno> 7ef0: e3a0300d mov r3, #13 7ef4: e5803000 str r3, [r0] 7ef8: e3e00000 mvn r0, #0 7efc: eafffff8 b 7ee4 7f00: 00017188 .word 0x00017188 00007820 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 7820: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 7824: e593204c ldr r2, [r3, #76] ; 0x4c 7828: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 782c: e92d4030 push {r4, r5, lr} 7830: e1a04000 mov r4, r0 7834: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7838: 159f0040 ldrne r0, [pc, #64] ; 7880 783c: 1bfff418 blne 48a4 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 7840: e5933050 ldr r3, [r3, #80] ; 0x50 7844: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 7848: ebffffce bl 7788 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 784c: e5943000 ldr r3, [r4] 7850: 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 ) 7854: 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; 7858: e0053003 and r3, r5, r3 785c: e1530005 cmp r3, r5 7860: 1a000001 bne 786c 7864: e3a00000 mov r0, #0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 7868: 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 ); 786c: eb000f4c bl b5a4 <__errno> <== NOT EXECUTED 7870: e3a0300d mov r3, #13 <== NOT EXECUTED 7874: e5803000 str r3, [r0] <== NOT EXECUTED 7878: e3e00000 mvn r0, #0 <== NOT EXECUTED 787c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 7880: abcd0000 .word 0xabcd0000 00007800 : /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 7800: e5903000 ldr r3, [r0] <== NOT EXECUTED 7804: e5933030 ldr r3, [r3, #48] ; 0x30 <== NOT EXECUTED 7808: e1a01301 lsl r1, r1, #6 <== NOT EXECUTED 780c: e0013003 and r3, r1, r3 <== NOT EXECUTED return 1; return 0; } 7810: e1530001 cmp r3, r1 <== NOT EXECUTED 7814: 13a00000 movne r0, #0 <== NOT EXECUTED 7818: 03a00001 moveq r0, #1 <== NOT EXECUTED 781c: e12fff1e bx lr <== NOT EXECUTED 00007884 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7884: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 7888: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 788c: e59e304c ldr r3, [lr, #76] ; 0x4c 7890: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7894: e1a04000 mov r4, r0 7898: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 789c: 159f00c4 ldrne r0, [pc, #196] ; 7968 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 78a0: 1a000003 bne 78b4 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 78a4: e59e3008 ldr r3, [lr, #8] 78a8: e3530000 cmp r3, #0 78ac: 1a000001 bne 78b8 rtems_fatal_error_occurred( 0xBAD00000 ); 78b0: e59f00b4 ldr r0, [pc, #180] ; 796c <== NOT EXECUTED 78b4: ebfff3fa bl 48a4 <== 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; 78b8: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 78bc: e59e3050 ldr r3, [lr, #80] ; 0x50 78c0: e5d33000 ldrb r3, [r3] 78c4: e353002f cmp r3, #47 ; 0x2f 78c8: 1353005c cmpne r3, #92 ; 0x5c 78cc: 13a06000 movne r6, #0 78d0: 03a06001 moveq r6, #1 78d4: 0a000001 beq 78e0 78d8: e3530000 cmp r3, #0 78dc: 1a000008 bne 7904 78e0: e59f3088 ldr r3, [pc, #136] ; 7970 78e4: e593c000 ldr ip, [r3] 78e8: e28cc018 add ip, ip, #24 78ec: e8bc000f ldm ip!, {r0, r1, r2, r3} 78f0: e1a06004 mov r6, r4 78f4: e8a6000f stmia r6!, {r0, r1, r2, r3} 78f8: e59c2000 ldr r2, [ip] 78fc: e5862000 str r2, [r6] 7900: 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] ), 7904: e59e3050 ldr r3, [lr, #80] ; 0x50 7908: e0836006 add r6, r3, r6 790c: e1a00006 mov r0, r6 7910: eb001314 bl c568 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7914: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 7918: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 791c: e1a03004 mov r3, r4 7920: e1a00006 mov r0, r6 7924: eb000012 bl 7974 7928: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 792c: e1a00004 mov r0, r4 7930: ebffff94 bl 7788 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 7934: e5943000 ldr r3, [r4] 7938: 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 ) 793c: 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; 7940: e0053003 and r3, r5, r3 7944: e1530005 cmp r3, r5 7948: 1a000001 bne 7954 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 794c: e1a00006 mov r0, r6 7950: 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 ); 7954: eb000f12 bl b5a4 <__errno> <== NOT EXECUTED 7958: e3a0300d mov r3, #13 <== NOT EXECUTED 795c: e5803000 str r3, [r0] <== NOT EXECUTED 7960: e3e06000 mvn r6, #0 <== NOT EXECUTED 7964: eafffff8 b 794c <== NOT EXECUTED 7968: abcd0000 .word 0xabcd0000 796c: bad00000 .word 0xbad00000 7970: 00017188 .word 0x00017188 00008064 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8064: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8068: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 806c: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8070: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8074: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 8078: eb00088f bl a2bc <== NOT EXECUTED if (! err) { 807c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 8080: 1a00000c bne 80b8 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 8084: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8088: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 808c: 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) 8090: e1a00004 mov r0, r4 <== NOT EXECUTED 8094: eb000212 bl 88e4 <== NOT EXECUTED 8098: e3500000 cmp r0, #0 <== NOT EXECUTED 809c: 1a00000a bne 80cc <== NOT EXECUTED 80a0: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 80a4: e3530000 cmp r3, #0 <== NOT EXECUTED 80a8: 1a000007 bne 80cc <== NOT EXECUTED free(jnode); 80ac: e1a00004 mov r0, r4 <== NOT EXECUTED 80b0: eb00017e bl 86b0 <== NOT EXECUTED 80b4: ea000004 b 80cc <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 80b8: aa000003 bge 80cc <== NOT EXECUTED 80bc: eb000d38 bl b5a4 <__errno> <== NOT EXECUTED 80c0: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 80c4: e5806000 str r6, [r0] <== NOT EXECUTED 80c8: e3e06000 mvn r6, #0 <== NOT EXECUTED } 80cc: e1a00006 mov r0, r6 <== NOT EXECUTED 80d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00007f4c : void *buffer ) { int err; if (command == FIONBIO) { 7f4c: e59f3068 ldr r3, [pc, #104] ; 7fbc <== NOT EXECUTED 7f50: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 7f54: e92d4010 push {r4, lr} <== NOT EXECUTED 7f58: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 7f5c: 1a00000b bne 7f90 <== NOT EXECUTED if (buffer == NULL) 7f60: e3520000 cmp r2, #0 <== NOT EXECUTED 7f64: 03e0400d mvneq r4, #13 <== NOT EXECUTED 7f68: 0a00000d beq 7fa4 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 7f6c: e5924000 ldr r4, [r2] <== NOT EXECUTED 7f70: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 7f74: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 7f78: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 7f7c: 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; 7f80: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 7f84: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 7f88: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 7f8c: ea000008 b 7fb4 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 7f90: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 7f94: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7f98: eb0007e2 bl 9f28 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f9c: e2504000 subs r4, r0, #0 <== NOT EXECUTED 7fa0: aa000003 bge 7fb4 <== NOT EXECUTED 7fa4: eb000d7e bl b5a4 <__errno> <== NOT EXECUTED 7fa8: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 7fac: e5804000 str r4, [r0] <== NOT EXECUTED 7fb0: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7fb4: e1a00004 mov r0, r4 <== NOT EXECUTED 7fb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 7fbc: 8004667e .word 0x8004667e 00007f04 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 7f04: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 7f08: e58d0000 str r0, [sp] <== NOT EXECUTED 7f0c: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 7f10: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7f14: eb0007e9 bl 9ec0 <== NOT EXECUTED 7f18: e1a03000 mov r3, r0 <== NOT EXECUTED 7f1c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f20: 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); 7f24: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7f28: aa000004 bge 7f40 <== NOT EXECUTED 7f2c: eb000d9c bl b5a4 <__errno> <== NOT EXECUTED 7f30: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 7f34: e5805000 str r5, [r0] <== NOT EXECUTED 7f38: e3e03000 mvn r3, #0 <== NOT EXECUTED 7f3c: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7f40: e1a01004 mov r1, r4 <== NOT EXECUTED 7f44: e1a00003 mov r0, r3 <== NOT EXECUTED 7f48: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 00008014 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8014: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8018: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 801c: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 8020: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8024: eb00083b bl a118 <== NOT EXECUTED if (err > 0) 8028: e2505000 subs r5, r0, #0 <== NOT EXECUTED 802c: da000005 ble 8048 <== NOT EXECUTED IMFS_update_atime(jnode); 8030: e1a0000d mov r0, sp <== NOT EXECUTED 8034: e3a01000 mov r1, #0 <== NOT EXECUTED 8038: eb0001ff bl 883c <== NOT EXECUTED 803c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8040: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 8044: ea000004 b 805c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8048: 0a000003 beq 805c <== NOT EXECUTED 804c: eb000d54 bl b5a4 <__errno> <== NOT EXECUTED 8050: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8054: e5805000 str r5, [r0] <== NOT EXECUTED 8058: e3e05000 mvn r5, #0 <== NOT EXECUTED } 805c: e1a00005 mov r0, r5 <== NOT EXECUTED 8060: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00007fc0 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 7fc0: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 7fc4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 7fc8: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 7fcc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 7fd0: eb0007ec bl 9f88 <== NOT EXECUTED if (err > 0) { 7fd4: e2505000 subs r5, r0, #0 <== NOT EXECUTED 7fd8: da000006 ble 7ff8 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 7fdc: e1a0000d mov r0, sp <== NOT EXECUTED 7fe0: e3a01000 mov r1, #0 <== NOT EXECUTED 7fe4: eb000214 bl 883c <== NOT EXECUTED 7fe8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 7fec: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 7ff0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 7ff4: ea000004 b 800c <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 7ff8: 0a000003 beq 800c <== NOT EXECUTED 7ffc: eb000d68 bl b5a4 <__errno> <== NOT EXECUTED 8000: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 8004: e5805000 str r5, [r0] <== NOT EXECUTED 8008: e3e05000 mvn r5, #0 <== NOT EXECUTED } 800c: e1a00005 mov r0, r5 <== NOT EXECUTED 8010: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000ce30 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ce30: 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; ce34: e1a0c000 mov ip, r0 ce38: 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 ) { ce3c: e1a05000 mov r5, r0 ce40: 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; ce44: e8bc000f ldm ip!, {r0, r1, r2, r3} ce48: e1a0e00d mov lr, sp ce4c: e8ae000f stmia lr!, {r0, r1, r2, r3} ce50: e59c3000 ldr r3, [ip] ce54: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ce58: e3a03000 mov r3, #0 ce5c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ce60: e1a0500d mov r5, sp ce64: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; ce68: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ce6c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ce70: ebfffd8c bl c4a8 if ( jnode->type != IMFS_DIRECTORY ) { ce74: e594204c ldr r2, [r4, #76] ; 0x4c ce78: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ce7c: e2843054 add r3, r4, #84 ; 0x54 ce80: 1a000002 bne ce90 ce84: e5942050 ldr r2, [r4, #80] ; 0x50 ce88: e1520003 cmp r2, r3 ce8c: 1a000005 bne cea8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ce90: e3a00000 mov r0, #0 ce94: e1a0100d mov r1, sp ce98: ebffd474 bl 2070 if (result != 0) ce9c: e3500000 cmp r0, #0 cea0: 1a00000c bne ced8 cea4: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { cea8: e3540000 cmp r4, #0 ceac: 0a00000b beq cee0 if ( jnode->type == IMFS_DIRECTORY ) { ceb0: e594304c ldr r3, [r4, #76] ; 0x4c ceb4: e3530001 cmp r3, #1 ceb8: 1affffe9 bne ce64 cebc: e5943050 ldr r3, [r4, #80] ; 0x50 cec0: e2842054 add r2, r4, #84 ; 0x54 cec4: e1530002 cmp r3, r2 cec8: 0affffe5 beq ce64 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); cecc: e2534000 subs r4, r3, #0 ced0: 1affffe3 bne ce64 ced4: ea000001 b cee0 <== NOT EXECUTED ced8: e3e00000 mvn r0, #0 <== NOT EXECUTED cedc: ea000000 b cee4 <== NOT EXECUTED cee0: e3a00000 mov r0, #0 return 0; } cee4: e28dd014 add sp, sp, #20 cee8: e8bd8070 pop {r4, r5, r6, pc} 00008270 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8270: e59fc0c8 ldr ip, [pc, #200] ; 8340 8274: 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 ) { 8278: e92d40f0 push {r4, r5, r6, r7, lr} 827c: e1a06002 mov r6, r2 8280: e1a05003 mov r5, r3 8284: e1a04000 mov r4, r0 8288: 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, 828c: e3a02000 mov r2, #0 8290: 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) { 8294: e153000c cmp r3, ip 8298: e2822001 add r2, r2, #1 829c: 0a000003 beq 82b0 82a0: e3520006 cmp r2, #6 82a4: e1a03083 lsl r3, r3, #1 82a8: 1afffff9 bne 8294 82ac: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 82b0: e59f208c ldr r2, [pc, #140] ; 8344 82b4: 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(); 82b8: eb00092b bl a76c 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; 82bc: e59fe084 ldr lr, [pc, #132] ; 8348 /* * 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(); 82c0: 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; 82c4: e8be000f ldm lr!, {r0, r1, r2, r3} 82c8: e284c038 add ip, r4, #56 ; 0x38 82cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 82d0: e8be000f ldm lr!, {r0, r1, r2, r3} 82d4: e8ac000f stmia ip!, {r0, r1, r2, r3} 82d8: 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; 82dc: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 82e0: 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; 82e4: 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 ) ); 82e8: e3a00001 mov r0, #1 82ec: e3a0100c mov r1, #12 82f0: eb0000b2 bl 85c0 if ( !fs_info ) { 82f4: e3500000 cmp r0, #0 82f8: 1a000006 bne 8318 free(temp_mt_entry->mt_fs_root.node_access); 82fc: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 8300: eb0000ea bl 86b0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8304: eb000ca6 bl b5a4 <__errno> <== NOT EXECUTED 8308: e3a0300c mov r3, #12 <== NOT EXECUTED 830c: e5803000 str r3, [r0] <== NOT EXECUTED 8310: e3e00000 mvn r0, #0 <== NOT EXECUTED 8314: 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; 8318: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 831c: e3a03001 mov r3, #1 8320: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8324: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8328: 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; 832c: 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; 8330: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 8334: eb0006e3 bl 9ec8 8338: e3a00000 mov r0, #0 return 0; } 833c: e8bd80f0 pop {r4, r5, r6, r7, pc} 8340: 00016ff4 .word 0x00016ff4 8344: 00018520 .word 0x00018520 8348: 00017a58 .word 0x00017a58 00001d78 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1d78: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d7c: 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 */ ) { 1d80: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d84: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1d88: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1d8c: 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 */ ) { 1d90: e1a05001 mov r5, r1 1d94: 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 ) 1d98: 9a000002 bls 1da8 rtems_set_errno_and_return_minus_one( EMLINK ); 1d9c: eb0039cd bl 104d8 <__errno> 1da0: e3a0301f mov r3, #31 1da4: ea000012 b 1df4 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1da8: e1a00002 mov r0, r2 1dac: eb003da2 bl 1143c 1db0: e28d4004 add r4, sp, #4 1db4: e1a01000 mov r1, r0 1db8: e1a02004 mov r2, r4 1dbc: e28d3044 add r3, sp, #68 ; 0x44 1dc0: e1a00006 mov r0, r6 1dc4: eb002c70 bl cf8c * 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( 1dc8: e28dc028 add ip, sp, #40 ; 0x28 1dcc: e1a00005 mov r0, r5 1dd0: e1a02004 mov r2, r4 1dd4: e3a01003 mov r1, #3 1dd8: e59f3054 ldr r3, [pc, #84] ; 1e34 1ddc: e58dc000 str ip, [sp] 1de0: eb002961 bl c36c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1de4: e3500000 cmp r0, #0 1de8: 1a000004 bne 1e00 rtems_set_errno_and_return_minus_one( ENOMEM ); 1dec: eb0039b9 bl 104d8 <__errno> <== NOT EXECUTED 1df0: e3a0300c mov r3, #12 <== NOT EXECUTED 1df4: e5803000 str r3, [r0] 1df8: e3e00000 mvn r0, #0 1dfc: ea00000a b 1e2c /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 1e00: e59d3028 ldr r3, [sp, #40] ; 0x28 1e04: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1e08: e2822001 add r2, r2, #1 1e0c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 1e10: e28d003c add r0, sp, #60 ; 0x3c 1e14: e3a01000 mov r1, #0 1e18: eb000240 bl 2720 1e1c: e59d203c ldr r2, [sp, #60] ; 0x3c 1e20: e59d3028 ldr r3, [sp, #40] ; 0x28 1e24: e5832048 str r2, [r3, #72] ; 0x48 1e28: e3a00000 mov r0, #0 return 0; } 1e2c: e28dd048 add sp, sp, #72 ; 0x48 1e30: e8bd8070 pop {r4, r5, r6, pc} 1e34: 0000a1ff .word 0x0000a1ff 0000f1b8 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); f1b8: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { f1bc: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); f1c0: 059f0060 ldreq r0, [pc, #96] ; f228 f1c4: 059f1060 ldreq r1, [pc, #96] ; f22c f1c8: 059f2060 ldreq r2, [pc, #96] ; f230 f1cc: 059f3060 ldreq r3, [pc, #96] ; f234 f1d0: 0a000006 beq f1f0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f1d4: e593304c ldr r3, [r3, #76] ; 0x4c f1d8: e3530005 cmp r3, #5 f1dc: 0a000004 beq f1f4 f1e0: e59f0040 ldr r0, [pc, #64] ; f228 <== NOT EXECUTED f1e4: e59f104c ldr r1, [pc, #76] ; f238 <== NOT EXECUTED f1e8: e59f2040 ldr r2, [pc, #64] ; f230 <== NOT EXECUTED f1ec: e59f3048 ldr r3, [pc, #72] ; f23c <== NOT EXECUTED f1f0: ebfff7f2 bl d1c0 <__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 ); f1f4: e3a02001 mov r2, #1 f1f8: ebfffeab bl ecac if ( *block_entry_ptr ) f1fc: e5904000 ldr r4, [r0] f200: 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 ); f204: e1a05000 mov r5, r0 if ( *block_entry_ptr ) f208: 13a00000 movne r0, #0 f20c: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); f210: ebfffe98 bl ec78 if ( !memory ) f214: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; f218: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) f21c: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; f220: 11a00004 movne r0, r4 return 0; } f224: e8bd8030 pop {r4, r5, pc} f228: 0001d7bf .word 0x0001d7bf f22c: 00000169 .word 0x00000169 f230: 0001cf88 .word 0x0001cf88 f234: 0001d805 .word 0x0001d805 f238: 0000016d .word 0x0000016d f23c: 0001d80f .word 0x0001d80f 0000f240 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { f240: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f244: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { f248: e1a05001 mov r5, r1 f24c: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); f250: 059f0134 ldreq r0, [pc, #308] ; f38c f254: 059f1134 ldreq r1, [pc, #308] ; f390 f258: 059f2134 ldreq r2, [pc, #308] ; f394 f25c: 059f3134 ldreq r3, [pc, #308] ; f398 f260: 0a000006 beq f280 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f264: e594304c ldr r3, [r4, #76] ; 0x4c f268: e3530005 cmp r3, #5 f26c: 0a000004 beq f284 f270: e59f0114 ldr r0, [pc, #276] ; f38c <== NOT EXECUTED f274: e59f1120 ldr r1, [pc, #288] ; f39c <== NOT EXECUTED f278: e59f2114 ldr r2, [pc, #276] ; f394 <== NOT EXECUTED f27c: e59f311c ldr r3, [pc, #284] ; f3a0 <== NOT EXECUTED f280: ebfff7ce bl d1c0 <__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 ) f284: e59f3118 ldr r3, [pc, #280] ; f3a4 f288: e593b000 ldr fp, [r3] f28c: e1a0312b lsr r3, fp, #2 f290: e2832001 add r2, r3, #1 f294: e0010293 mul r1, r3, r2 f298: e2811001 add r1, r1, #1 f29c: e0020193 mul r2, r3, r1 f2a0: e3a03000 mov r3, #0 f2a4: e1530006 cmp r3, r6 f2a8: e2422001 sub r2, r2, #1 f2ac: e003029b mul r3, fp, r2 f2b0: ca000005 bgt f2cc f2b4: 1a000001 bne f2c0 f2b8: e1530005 cmp r3, r5 f2bc: 8a000002 bhi f2cc rtems_set_errno_and_return_minus_one( EINVAL ); f2c0: eb000484 bl 104d8 <__errno> <== NOT EXECUTED f2c4: e3a03016 mov r3, #22 <== NOT EXECUTED f2c8: ea000025 b f364 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) f2cc: e5948054 ldr r8, [r4, #84] ; 0x54 f2d0: e1560008 cmp r6, r8 f2d4: e5947050 ldr r7, [r4, #80] ; 0x50 f2d8: ca000002 bgt f2e8 f2dc: 1a000028 bne f384 f2e0: e1550007 cmp r5, r7 f2e4: 9a000026 bls f384 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; f2e8: e1a0cfcb asr ip, fp, #31 f2ec: e1a0300c mov r3, ip f2f0: e1a0200b mov r2, fp f2f4: e1a00005 mov r0, r5 f2f8: e1a01006 mov r1, r6 f2fc: e58dc000 str ip, [sp] f300: eb002cd7 bl 1a664 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; f304: e59dc000 ldr ip, [sp] f308: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; f30c: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; f310: e1a0200b mov r2, fp f314: e1a00007 mov r0, r7 f318: e1a0300c mov r3, ip f31c: eb002cd0 bl 1a664 <__divdi3> f320: e1a08000 mov r8, r0 f324: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { f328: ea000011 b f374 if ( IMFS_memfile_addblock( the_jnode, block ) ) { f32c: e1a00004 mov r0, r4 f330: e1a01007 mov r1, r7 f334: ebffff9f bl f1b8 f338: e3500000 cmp r0, #0 f33c: 0a00000b beq f370 f340: ea000003 b f354 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); f344: e1a01007 mov r1, r7 <== NOT EXECUTED f348: e1a00004 mov r0, r4 <== NOT EXECUTED f34c: ebfffefa bl ef3c <== 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-- ) { f350: e2477001 sub r7, r7, #1 <== NOT EXECUTED f354: e1570008 cmp r7, r8 <== NOT EXECUTED f358: 2afffff9 bcs f344 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); f35c: eb00045d bl 104d8 <__errno> <== NOT EXECUTED f360: e3a0301c mov r3, #28 <== NOT EXECUTED f364: e5803000 str r3, [r0] <== NOT EXECUTED f368: e3e00000 mvn r0, #0 <== NOT EXECUTED f36c: ea000005 b f388 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { f370: e2877001 add r7, r7, #1 f374: e157000a cmp r7, sl f378: 9affffeb bls f32c /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; f37c: e5846054 str r6, [r4, #84] ; 0x54 f380: e5845050 str r5, [r4, #80] ; 0x50 f384: e3a00000 mov r0, #0 return 0; } f388: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} f38c: 0001d7bf .word 0x0001d7bf f390: 00000131 .word 0x00000131 f394: 0001cfa0 .word 0x0001cfa0 f398: 0001d805 .word 0x0001d805 f39c: 00000135 .word 0x00000135 f3a0: 0001d80f .word 0x0001d80f f3a4: 0001db48 .word 0x0001db48 0000ecac : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ecac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ecb0: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ecb4: e1a06001 mov r6, r1 ecb8: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); ecbc: 059f01e8 ldreq r0, [pc, #488] ; eeac ecc0: 03a01fe2 moveq r1, #904 ; 0x388 ecc4: 059f21e4 ldreq r2, [pc, #484] ; eeb0 ecc8: 059f31e4 ldreq r3, [pc, #484] ; eeb4 eccc: 0a000006 beq ecec if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ecd0: e594304c ldr r3, [r4, #76] ; 0x4c ecd4: e3530005 cmp r3, #5 ecd8: 0a000004 beq ecf0 ecdc: e59f01c8 ldr r0, [pc, #456] ; eeac <== NOT EXECUTED ece0: e59f21c8 ldr r2, [pc, #456] ; eeb0 <== NOT EXECUTED ece4: e59f31cc ldr r3, [pc, #460] ; eeb8 <== NOT EXECUTED ece8: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED ecec: ebfff933 bl d1c0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ecf0: e59f31c4 ldr r3, [pc, #452] ; eebc ecf4: e5935000 ldr r5, [r3] ecf8: e1a05125 lsr r5, r5, #2 ecfc: e2453001 sub r3, r5, #1 ed00: e1510003 cmp r1, r3 ed04: 8a00000e bhi ed44 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { ed08: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; ed0c: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { ed10: 0a000007 beq ed34 if ( !p ) { ed14: e3500000 cmp r0, #0 ed18: 1a000003 bne ed2c p = memfile_alloc_block(); ed1c: ebffffd5 bl ec78 if ( !p ) ed20: e3500000 cmp r0, #0 ed24: 0a00005e beq eea4 return 0; info->indirect = p; ed28: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; ed2c: e5940058 ldr r0, [r4, #88] ; 0x58 ed30: ea000001 b ed3c } if ( !p ) ed34: e3500000 cmp r0, #0 ed38: 0a000059 beq eea4 return 0; return &info->indirect[ my_block ]; ed3c: e0800106 add r0, r0, r6, lsl #2 ed40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ed44: e2852001 add r2, r5, #1 <== NOT EXECUTED ed48: e0030295 mul r3, r5, r2 <== NOT EXECUTED ed4c: e2432001 sub r2, r3, #1 <== NOT EXECUTED ed50: e1510002 cmp r1, r2 <== NOT EXECUTED ed54: 8a00001b bhi edc8 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; ed58: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ed5c: e1a00006 mov r0, r6 <== NOT EXECUTED ed60: e1a01005 mov r1, r5 <== NOT EXECUTED ed64: eb002b8c bl 19b9c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ed68: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ed6c: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ed70: e1a00006 mov r0, r6 <== NOT EXECUTED ed74: eb002af4 bl 1994c <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { ed78: 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; ed7c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; ed80: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { ed84: 0a000009 beq edb0 <== NOT EXECUTED if ( !p ) { ed88: e3530000 cmp r3, #0 <== NOT EXECUTED ed8c: 1a000003 bne eda0 <== NOT EXECUTED p = memfile_alloc_block(); ed90: ebffffb8 bl ec78 <== NOT EXECUTED if ( !p ) ed94: e2503000 subs r3, r0, #0 <== NOT EXECUTED ed98: 0a000041 beq eea4 <== NOT EXECUTED return 0; info->doubly_indirect = p; ed9c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; eda0: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED eda4: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { eda8: e3500000 cmp r0, #0 <== NOT EXECUTED edac: ea00002e b ee6c <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) edb0: e3530000 cmp r3, #0 <== NOT EXECUTED edb4: 0a00003a beq eea4 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; edb8: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) edbc: e3500000 cmp r0, #0 <== NOT EXECUTED edc0: 1a000035 bne ee9c <== NOT EXECUTED edc4: ea000036 b eea4 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { edc8: e2831001 add r1, r3, #1 <== NOT EXECUTED edcc: e0020195 mul r2, r5, r1 <== NOT EXECUTED edd0: e2422001 sub r2, r2, #1 <== NOT EXECUTED edd4: e1560002 cmp r6, r2 <== NOT EXECUTED edd8: 8a000031 bhi eea4 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; eddc: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ede0: e1a01005 mov r1, r5 <== NOT EXECUTED ede4: e1a00006 mov r0, r6 <== NOT EXECUTED ede8: eb002b6b bl 19b9c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; edec: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; edf0: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; edf4: e1a00006 mov r0, r6 <== NOT EXECUTED edf8: eb002ad3 bl 1994c <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; edfc: 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; ee00: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ee04: eb002ad0 bl 1994c <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ee08: 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; ee0c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ee10: e1a00006 mov r0, r6 <== NOT EXECUTED ee14: eb002b60 bl 19b9c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { ee18: 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; ee1c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; ee20: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { ee24: 0a000016 beq ee84 <== NOT EXECUTED if ( !p ) { ee28: e3530000 cmp r3, #0 <== NOT EXECUTED ee2c: 1a000003 bne ee40 <== NOT EXECUTED p = memfile_alloc_block(); ee30: ebffff90 bl ec78 <== NOT EXECUTED if ( !p ) ee34: e2503000 subs r3, r0, #0 <== NOT EXECUTED ee38: 0a000019 beq eea4 <== NOT EXECUTED return 0; info->triply_indirect = p; ee3c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; ee40: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { ee44: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ee48: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { ee4c: 1a000003 bne ee60 <== NOT EXECUTED p1 = memfile_alloc_block(); ee50: ebffff88 bl ec78 <== NOT EXECUTED if ( !p1 ) ee54: e2502000 subs r2, r0, #0 <== NOT EXECUTED ee58: 0a000011 beq eea4 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; ee5c: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; ee60: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED ee64: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { ee68: e3500000 cmp r0, #0 <== NOT EXECUTED ee6c: 1a00000a bne ee9c <== NOT EXECUTED p2 = memfile_alloc_block(); ee70: ebffff80 bl ec78 <== NOT EXECUTED if ( !p2 ) ee74: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; ee78: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ee7c: 1a000006 bne ee9c <== NOT EXECUTED ee80: ea000007 b eea4 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ee84: e3530000 cmp r3, #0 <== NOT EXECUTED ee88: 0a000005 beq eea4 <== 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 ]; ee8c: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) ee90: e3530000 cmp r3, #0 <== NOT EXECUTED ee94: 0a000002 beq eea4 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ee98: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED ee9c: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED eea0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED eea4: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } eea8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED eeac: 0001d7bf .word 0x0001d7bf eeb0: 0001cf18 .word 0x0001cf18 eeb4: 0001d805 .word 0x0001d805 eeb8: 0001d80f .word 0x0001d80f eebc: 0001db48 .word 0x0001db48 0000f7c8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { f7c8: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f7cc: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { f7d0: e1a06003 mov r6, r3 f7d4: e1a08001 mov r8, r1 f7d8: e1a09002 mov r9, r2 f7dc: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); f7e0: 059f024c ldreq r0, [pc, #588] ; fa34 f7e4: 03a01f93 moveq r1, #588 ; 0x24c f7e8: 059f2248 ldreq r2, [pc, #584] ; fa38 f7ec: 059f3248 ldreq r3, [pc, #584] ; fa3c f7f0: 0a000007 beq f814 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || f7f4: e594304c ldr r3, [r4, #76] ; 0x4c f7f8: e2432005 sub r2, r3, #5 f7fc: e3520001 cmp r2, #1 f800: 9a000004 bls f818 f804: e59f0228 ldr r0, [pc, #552] ; fa34 <== NOT EXECUTED f808: e59f1230 ldr r1, [pc, #560] ; fa40 <== NOT EXECUTED f80c: e59f2224 ldr r2, [pc, #548] ; fa38 <== NOT EXECUTED f810: e59f322c ldr r3, [pc, #556] ; fa44 <== NOT EXECUTED f814: ebfff669 bl d1c0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); f818: e3560000 cmp r6, #0 f81c: 059f0210 ldreq r0, [pc, #528] ; fa34 f820: 059f1220 ldreq r1, [pc, #544] ; fa48 f824: 059f220c ldreq r2, [pc, #524] ; fa38 f828: 059f321c ldreq r3, [pc, #540] ; fa4c f82c: 0afffff8 beq f814 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) f830: e3570000 cmp r7, #0 f834: 1a000004 bne f84c rtems_set_errno_and_return_minus_one( EINVAL ); f838: eb000326 bl 104d8 <__errno> <== NOT EXECUTED f83c: e3a03016 mov r3, #22 <== NOT EXECUTED f840: e5803000 str r3, [r0] <== NOT EXECUTED f844: e3e07000 mvn r7, #0 <== NOT EXECUTED f848: ea000077 b fa2c <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { f84c: e3530006 cmp r3, #6 f850: 1a000012 bne f8a0 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) f854: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED f858: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED f85c: e1a0200a mov r2, sl <== NOT EXECUTED f860: e1a0300b mov r3, fp <== NOT EXECUTED f864: e3a01000 mov r1, #0 <== NOT EXECUTED f868: e0522008 subs r2, r2, r8 <== NOT EXECUTED f86c: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED f870: e1510003 cmp r1, r3 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; f874: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) f878: ca000002 bgt f888 <== NOT EXECUTED f87c: 1a000002 bne f88c <== NOT EXECUTED f880: e1570002 cmp r7, r2 <== NOT EXECUTED f884: 9a000000 bls f88c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; f888: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); f88c: e0811008 add r1, r1, r8 <== NOT EXECUTED f890: e1a00006 mov r0, r6 <== NOT EXECUTED f894: e1a02007 mov r2, r7 <== NOT EXECUTED f898: eb00051c bl 10d10 <== NOT EXECUTED f89c: ea00005d b fa18 <== 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 ) f8a0: e5943054 ldr r3, [r4, #84] ; 0x54 f8a4: e3a02000 mov r2, #0 f8a8: e1520003 cmp r2, r3 f8ac: 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; f8b0: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) f8b4: e0872001 add r2, r7, r1 f8b8: ca000004 bgt f8d0 f8bc: 1a000001 bne f8c8 f8c0: e1520005 cmp r2, r5 f8c4: 8a000001 bhi f8d0 f8c8: e1a05007 mov r5, r7 <== NOT EXECUTED f8cc: ea000000 b f8d4 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; f8d0: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f8d4: e59f3174 ldr r3, [pc, #372] ; fa50 f8d8: e593a000 ldr sl, [r3] f8dc: e1a0b00a mov fp, sl f8e0: e1a0cfcb asr ip, fp, #31 f8e4: e1a0300c mov r3, ip f8e8: e1a00008 mov r0, r8 f8ec: e1a0200b mov r2, fp f8f0: e1a01009 mov r1, r9 f8f4: e58dc000 str ip, [sp] f8f8: eb002c83 bl 1ab0c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f8fc: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f900: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f904: e1a01009 mov r1, r9 f908: e1a00008 mov r0, r8 f90c: e1a0200b mov r2, fp f910: e1a0300c mov r3, ip f914: eb002b52 bl 1a664 <__divdi3> if ( start_offset ) { f918: 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; f91c: e1a08000 mov r8, r0 if ( start_offset ) { f920: 0a000013 beq f974 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 ); f924: e1a00004 mov r0, r4 f928: e1a01008 mov r1, r8 f92c: e3a02000 mov r2, #0 f930: ebfffcdd bl ecac assert( block_ptr ); f934: e3500000 cmp r0, #0 f938: 059f00f4 ldreq r0, [pc, #244] ; fa34 f93c: 059f1110 ldreq r1, [pc, #272] ; fa54 f940: 0a00002c beq f9f8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); f944: 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; f948: e067a00a rsb sl, r7, sl f94c: e155000a cmp r5, sl f950: 31a0a005 movcc sl, r5 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); f954: e0811007 add r1, r1, r7 f958: e1a00006 mov r0, r6 f95c: e1a0200a mov r2, sl f960: eb0004ea bl 10d10 dest += to_copy; f964: e086600a add r6, r6, sl block++; f968: e2888001 add r8, r8, #1 my_length -= to_copy; f96c: e06a5005 rsb r5, sl, r5 f970: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f974: e59f30d4 ldr r3, [pc, #212] ; fa50 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f978: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f97c: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f980: ea00000f b f9c4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f984: e1a00004 mov r0, r4 f988: e1a01008 mov r1, r8 f98c: e3a02000 mov r2, #0 f990: ebfffcc5 bl ecac assert( block_ptr ); f994: e3500000 cmp r0, #0 f998: 059f0094 ldreq r0, [pc, #148] ; fa34 f99c: 059f10b4 ldreq r1, [pc, #180] ; fa58 f9a0: 0a000014 beq f9f8 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); f9a4: e5901000 ldr r1, [r0] f9a8: e1a0200a mov r2, sl f9ac: e1a00006 mov r0, r6 f9b0: eb0004d6 bl 10d10 dest += to_copy; f9b4: e086600a add r6, r6, sl block++; f9b8: e2888001 add r8, r8, #1 my_length -= to_copy; f9bc: e06a5005 rsb r5, sl, r5 copied += to_copy; f9c0: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f9c4: e5993000 ldr r3, [r9] f9c8: e1550003 cmp r5, r3 f9cc: 2affffec bcs f984 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { f9d0: e3550000 cmp r5, #0 f9d4: 0a00000f beq fa18 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f9d8: e1a01008 mov r1, r8 f9dc: e1a00004 mov r0, r4 f9e0: e3a02000 mov r2, #0 f9e4: ebfffcb0 bl ecac assert( block_ptr ); f9e8: e2503000 subs r3, r0, #0 f9ec: 1a000004 bne fa04 f9f0: e59f003c ldr r0, [pc, #60] ; fa34 <== NOT EXECUTED f9f4: e59f1060 ldr r1, [pc, #96] ; fa5c <== NOT EXECUTED f9f8: e59f2038 ldr r2, [pc, #56] ; fa38 <== NOT EXECUTED f9fc: e59f305c ldr r3, [pc, #92] ; fa60 <== NOT EXECUTED fa00: eaffff83 b f814 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); fa04: e1a00006 mov r0, r6 fa08: e5931000 ldr r1, [r3] fa0c: e1a02005 mov r2, r5 fa10: eb0004be bl 10d10 copied += my_length; fa14: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); fa18: e28d0004 add r0, sp, #4 fa1c: e3a01000 mov r1, #0 fa20: ebffcb3e bl 2720 fa24: e59d3004 ldr r3, [sp, #4] fa28: e5843040 str r3, [r4, #64] ; 0x40 return copied; } fa2c: e1a00007 mov r0, r7 fa30: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} fa34: 0001d7bf .word 0x0001d7bf fa38: 0001cfc8 .word 0x0001cfc8 fa3c: 0001d805 .word 0x0001d805 fa40: 00000251 .word 0x00000251 fa44: 0001d879 .word 0x0001d879 fa48: 0000025a .word 0x0000025a fa4c: 0001d8c4 .word 0x0001d8c4 fa50: 0001db48 .word 0x0001db48 fa54: 00000296 .word 0x00000296 fa58: 000002a7 .word 0x000002a7 fa5c: 000002b9 .word 0x000002b9 fa60: 0001d83f .word 0x0001d83f 0000ef88 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ef88: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ef8c: e2504000 subs r4, r0, #0 ef90: 059f012c ldreq r0, [pc, #300] ; f0c4 ef94: 059f112c ldreq r1, [pc, #300] ; f0c8 ef98: 059f212c ldreq r2, [pc, #300] ; f0cc ef9c: 059f312c ldreq r3, [pc, #300] ; f0d0 efa0: 0a000006 beq efc0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); efa4: e594304c ldr r3, [r4, #76] ; 0x4c efa8: e3530005 cmp r3, #5 efac: 0a000004 beq efc4 efb0: e59f010c ldr r0, [pc, #268] ; f0c4 <== NOT EXECUTED efb4: e59f1118 ldr r1, [pc, #280] ; f0d4 <== NOT EXECUTED efb8: e59f210c ldr r2, [pc, #268] ; f0cc <== NOT EXECUTED efbc: e59f3114 ldr r3, [pc, #276] ; f0d8 <== NOT EXECUTED efc0: ebfff87e bl d1c0 <__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; efc4: e59f2110 ldr r2, [pc, #272] ; f0dc * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; efc8: 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; efcc: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; efd0: 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; efd4: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); efd8: 12840058 addne r0, r4, #88 ; 0x58 efdc: 11a01005 movne r1, r5 efe0: 1bffffb6 blne eec0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; efe4: e594305c ldr r3, [r4, #92] ; 0x5c efe8: e3530000 cmp r3, #0 efec: 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; eff4: 1a000008 bne f01c eff8: ea00000d b f034 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { effc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED f000: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED f004: e3520000 cmp r2, #0 <== NOT EXECUTED f008: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( f00c: 10830000 addne r0, r3, r0 <== NOT EXECUTED f010: 11a01005 movne r1, r5 <== NOT EXECUTED f014: 1bffffa9 blne eec0 <== 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 ); f028: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED f02c: e1a01005 mov r1, r5 <== NOT EXECUTED f030: ebffffa2 bl eec0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f034: e5943060 ldr r3, [r4, #96] ; 0x60 f038: e3530000 cmp r3, #0 f03c: 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; f044: 1a000016 bne f0a4 f048: ea00001b b f0bc } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; f04c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED f050: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ f054: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f058: 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 */ f05c: 0a000013 beq f0b0 <== NOT EXECUTED f060: e3a08000 mov r8, #0 <== NOT EXECUTED f064: ea000006 b f084 <== 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( f090: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED f094: e1a01005 mov r1, r5 <== NOT EXECUTED f098: e0800009 add r0, r0, r9 <== NOT EXECUTED f09c: ebffff87 bl eec0 <== 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( f0b0: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED f0b4: e1a01005 mov r1, r5 <== NOT EXECUTED f0b8: ebffff80 bl eec0 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } f0bc: e3a00000 mov r0, #0 f0c0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} f0c4: 0001d7bf .word 0x0001d7bf f0c8: 000001ee .word 0x000001ee f0cc: 0001cf74 .word 0x0001cf74 f0d0: 0001d805 .word 0x0001d805 f0d4: 000001f2 .word 0x000001f2 f0d8: 0001d80f .word 0x0001d80f f0dc: 0001db48 .word 0x0001db48 0000ef3c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ef3c: 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 ); ef40: e3a02000 mov r2, #0 <== NOT EXECUTED ef44: ebffff58 bl ecac <== NOT EXECUTED assert( block_ptr ); ef48: e2503000 subs r3, r0, #0 <== NOT EXECUTED ef4c: 059f0024 ldreq r0, [pc, #36] ; ef78 <== NOT EXECUTED ef50: 059f1024 ldreq r1, [pc, #36] ; ef7c <== NOT EXECUTED ef54: 059f2024 ldreq r2, [pc, #36] ; ef80 <== NOT EXECUTED ef58: 059f3024 ldreq r3, [pc, #36] ; ef84 <== NOT EXECUTED ef5c: 0bfff897 bleq d1c0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; ef60: 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; ef64: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; ef68: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); ef6c: ebffff39 bl ec58 <== NOT EXECUTED } return 1; } ef70: e3a00001 mov r0, #1 <== NOT EXECUTED ef74: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED ef78: 0001d7bf .word 0x0001d7bf ef7c: 00000196 .word 0x00000196 ef80: 0001cf58 .word 0x0001cf58 ef84: 0001d83f .word 0x0001d83f 0000f498 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { f498: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f49c: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { f4a0: e1a08001 mov r8, r1 f4a4: e1a0a002 mov sl, r2 f4a8: e1a06003 mov r6, r3 f4ac: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); f4b0: 059f0204 ldreq r0, [pc, #516] ; f6bc f4b4: 059f1204 ldreq r1, [pc, #516] ; f6c0 f4b8: 059f2204 ldreq r2, [pc, #516] ; f6c4 f4bc: 059f3204 ldreq r3, [pc, #516] ; f6c8 f4c0: 0a000006 beq f4e0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f4c4: e594304c ldr r3, [r4, #76] ; 0x4c f4c8: e3530005 cmp r3, #5 f4cc: 0a000004 beq f4e4 f4d0: e59f01e4 ldr r0, [pc, #484] ; f6bc <== NOT EXECUTED f4d4: e59f11f0 ldr r1, [pc, #496] ; f6cc <== NOT EXECUTED f4d8: e59f21e4 ldr r2, [pc, #484] ; f6c4 <== NOT EXECUTED f4dc: e59f31ec ldr r3, [pc, #492] ; f6d0 <== NOT EXECUTED f4e0: ebfff736 bl d1c0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); f4e4: e3560000 cmp r6, #0 f4e8: 059f01cc ldreq r0, [pc, #460] ; f6bc f4ec: 059f11e0 ldreq r1, [pc, #480] ; f6d4 f4f0: 059f21cc ldreq r2, [pc, #460] ; f6c4 f4f4: 059f31dc ldreq r3, [pc, #476] ; f6d8 f4f8: 0afffff8 beq f4e0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) f4fc: e3550000 cmp r5, #0 f500: 1a000002 bne f510 rtems_set_errno_and_return_minus_one( EINVAL ); f504: eb0003f3 bl 104d8 <__errno> <== NOT EXECUTED f508: e3a03016 mov r3, #22 <== NOT EXECUTED f50c: ea00000e b f54c <== 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 ) { f510: e5943054 ldr r3, [r4, #84] ; 0x54 f514: e3530000 cmp r3, #0 f518: e0851001 add r1, r5, r1 f51c: ba000003 blt f530 f520: 1a00000c bne f558 f524: e5943050 ldr r3, [r4, #80] ; 0x50 f528: e1530001 cmp r3, r1 f52c: 2a000009 bcs f558 status = IMFS_memfile_extend( the_jnode, last_byte ); f530: e1a00004 mov r0, r4 f534: e3a02000 mov r2, #0 f538: ebffff40 bl f240 if ( status ) f53c: e3500000 cmp r0, #0 f540: 0a000004 beq f558 rtems_set_errno_and_return_minus_one( ENOSPC ); f544: eb0003e3 bl 104d8 <__errno> <== NOT EXECUTED f548: e3a0301c mov r3, #28 <== NOT EXECUTED f54c: e5803000 str r3, [r0] <== NOT EXECUTED f550: e3e07000 mvn r7, #0 <== NOT EXECUTED f554: ea000056 b f6b4 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f558: e59f317c ldr r3, [pc, #380] ; f6dc f55c: e5939000 ldr r9, [r3] f560: e1a0b009 mov fp, r9 f564: e1a0cfcb asr ip, fp, #31 f568: e1a0300c mov r3, ip f56c: e1a00008 mov r0, r8 f570: e1a0200b mov r2, fp f574: e1a0100a mov r1, sl f578: e58dc000 str ip, [sp] f57c: eb002d62 bl 1ab0c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f580: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; f584: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; f588: e1a0100a mov r1, sl f58c: e1a00008 mov r0, r8 f590: e1a0200b mov r2, fp f594: e1a0300c mov r3, ip f598: eb002c31 bl 1a664 <__divdi3> if ( start_offset ) { f59c: 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; f5a0: e1a08000 mov r8, r0 if ( start_offset ) { f5a4: 0a000013 beq f5f8 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 ); f5a8: e1a01008 mov r1, r8 f5ac: e1a00004 mov r0, r4 f5b0: e3a02000 mov r2, #0 f5b4: ebfffdbc bl ecac assert( block_ptr ); f5b8: e3500000 cmp r0, #0 f5bc: 059f00f8 ldreq r0, [pc, #248] ; f6bc f5c0: 03a01fc7 moveq r1, #796 ; 0x31c f5c4: 0a00002c beq f67c 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 ); f5c8: 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; f5cc: e067a009 rsb sl, r7, r9 f5d0: e15a0005 cmp sl, r5 f5d4: 21a0a005 movcs sl, r5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); f5d8: e0800007 add r0, r0, r7 f5dc: e1a01006 mov r1, r6 f5e0: e1a0200a mov r2, sl f5e4: eb0005c9 bl 10d10 src += to_copy; f5e8: e086600a add r6, r6, sl block++; f5ec: e2888001 add r8, r8, #1 my_length -= to_copy; f5f0: e06a5005 rsb r5, sl, r5 copied += to_copy; f5f4: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f5f8: e59f30dc ldr r3, [pc, #220] ; f6dc while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f5fc: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; f600: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f604: ea00000f b f648 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f608: e1a00004 mov r0, r4 f60c: e1a01008 mov r1, r8 f610: e3a02000 mov r2, #0 f614: ebfffda4 bl ecac assert( block_ptr ); f618: e3500000 cmp r0, #0 f61c: 059f0098 ldreq r0, [pc, #152] ; f6bc f620: 03a01e33 moveq r1, #816 ; 0x330 f624: 0a000014 beq f67c 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 ); f628: e1a01006 mov r1, r6 f62c: e5900000 ldr r0, [r0] f630: e1a0200a mov r2, sl f634: eb0005b5 bl 10d10 src += to_copy; f638: e086600a add r6, r6, sl block++; f63c: e2888001 add r8, r8, #1 my_length -= to_copy; f640: 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( f644: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { f648: e5993000 ldr r3, [r9] f64c: e1550003 cmp r5, r3 f650: 2affffec bcs f608 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { f654: e3550000 cmp r5, #0 f658: 0a00000f beq f69c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); f65c: e1a01008 mov r1, r8 f660: e1a00004 mov r0, r4 f664: e3a02000 mov r2, #0 f668: ebfffd8f bl ecac assert( block_ptr ); f66c: e3500000 cmp r0, #0 f670: 1a000004 bne f688 f674: e59f0040 ldr r0, [pc, #64] ; f6bc <== NOT EXECUTED f678: e59f1060 ldr r1, [pc, #96] ; f6e0 <== NOT EXECUTED f67c: e59f2040 ldr r2, [pc, #64] ; f6c4 <== NOT EXECUTED f680: e59f305c ldr r3, [pc, #92] ; f6e4 <== NOT EXECUTED f684: eaffff95 b f4e0 <== 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 ); f688: e5900000 ldr r0, [r0] f68c: e1a01006 mov r1, r6 f690: e1a02005 mov r2, r5 f694: eb00059d bl 10d10 my_length = 0; copied += to_copy; f698: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); f69c: e28d0004 add r0, sp, #4 f6a0: e3a01000 mov r1, #0 f6a4: ebffcc1d bl 2720 f6a8: e59d3004 ldr r3, [sp, #4] f6ac: e5843048 str r3, [r4, #72] ; 0x48 f6b0: e5843044 str r3, [r4, #68] ; 0x44 return copied; } f6b4: e1a00007 mov r0, r7 f6b8: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} f6bc: 0001d7bf .word 0x0001d7bf f6c0: 000002e3 .word 0x000002e3 f6c4: 0001cfb4 .word 0x0001cfb4 f6c8: 0001d805 .word 0x0001d805 f6cc: 000002e7 .word 0x000002e7 f6d0: 0001d80f .word 0x0001d80f f6d4: 000002ef .word 0x000002ef f6d8: 0001d849 .word 0x0001d849 f6dc: 0001db48 .word 0x0001db48 f6e0: 00000346 .word 0x00000346 f6e4: 0001d83f .word 0x0001d83f 0000834c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 834c: e92d40f0 push {r4, r5, r6, r7, lr} 8350: e24dd040 sub sp, sp, #64 ; 0x40 8354: e1a04001 mov r4, r1 8358: e1a07000 mov r7, r0 835c: e1a06002 mov r6, r2 8360: 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 ); 8364: eb00107f bl c568 8368: e28d303c add r3, sp, #60 ; 0x3c 836c: e1a01000 mov r1, r0 8370: e28d2004 add r2, sp, #4 8374: e1a00007 mov r0, r7 8378: ebffff8a bl 81a8 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 837c: e2043a0f and r3, r4, #61440 ; 0xf000 8380: e3530901 cmp r3, #16384 ; 0x4000 8384: 0a00000e beq 83c4 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8388: e3530902 cmp r3, #32768 ; 0x8000 838c: 03a01005 moveq r1, #5 8390: 0a00000c beq 83c8 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8394: e3530a06 cmp r3, #24576 ; 0x6000 8398: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 839c: 058d6028 streq r6, [sp, #40] ; 0x28 83a0: 058d502c streq r5, [sp, #44] ; 0x2c 83a4: 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) ) { 83a8: 0a000006 beq 83c8 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 83ac: e3530a01 cmp r3, #4096 ; 0x1000 83b0: 03a01007 moveq r1, #7 83b4: 0a000003 beq 83c8 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 83b8: eb000c79 bl b5a4 <__errno> <== NOT EXECUTED 83bc: e3a03016 mov r3, #22 <== NOT EXECUTED 83c0: ea00000b b 83f4 <== NOT EXECUTED 83c4: 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( 83c8: e28dc028 add ip, sp, #40 ; 0x28 83cc: e59d0054 ldr r0, [sp, #84] ; 0x54 83d0: e1a03004 mov r3, r4 83d4: e28d2004 add r2, sp, #4 83d8: e58dc000 str ip, [sp] 83dc: eb0008f2 bl a7ac new_name, mode, &info ); if ( !new_node ) 83e0: e3500000 cmp r0, #0 83e4: 13a00000 movne r0, #0 83e8: 1a000003 bne 83fc rtems_set_errno_and_return_minus_one( ENOMEM ); 83ec: eb000c6c bl b5a4 <__errno> <== NOT EXECUTED 83f0: e3a0300c mov r3, #12 <== NOT EXECUTED 83f4: e5803000 str r3, [r0] <== NOT EXECUTED 83f8: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 83fc: e28dd040 add sp, sp, #64 ; 0x40 8400: e8bd80f0 pop {r4, r5, r6, r7, pc} 00001ef0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1ef0: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1ef4: e593204c ldr r2, [r3, #76] ; 0x4c 1ef8: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1efc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f00: 0a000004 beq 1f18 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1f04: eb003973 bl 104d8 <__errno> <== NOT EXECUTED 1f08: e3a03014 mov r3, #20 <== NOT EXECUTED 1f0c: e5803000 str r3, [r0] <== NOT EXECUTED 1f10: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f14: 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; 1f18: e583005c str r0, [r3, #92] ; 0x5c 1f1c: e3a00000 mov r0, #0 return 0; } 1f20: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00002b9c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2b9c: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2ba0: e2504000 subs r4, r0, #0 2ba4: 059f0130 ldreq r0, [pc, #304] ; 2cdc 2ba8: 03a01038 moveq r1, #56 ; 0x38 2bac: 059f212c ldreq r2, [pc, #300] ; 2ce0 2bb0: 059f312c ldreq r3, [pc, #300] ; 2ce4 2bb4: 0a00002f beq 2c78 fprintf(stdout, "%s", the_jnode->name ); 2bb8: e59f5128 ldr r5, [pc, #296] ; 2ce8 2bbc: e5953000 ldr r3, [r5] 2bc0: e284000c add r0, r4, #12 2bc4: e5931008 ldr r1, [r3, #8] 2bc8: eb00350c bl 10000 switch( the_jnode->type ) { 2bcc: e594204c ldr r2, [r4, #76] ; 0x4c 2bd0: e2423001 sub r3, r2, #1 2bd4: e3530006 cmp r3, #6 2bd8: 979ff103 ldrls pc, [pc, r3, lsl #2] 2bdc: ea000034 b 2cb4 <== NOT EXECUTED 2be0: 00002bfc .word 0x00002bfc <== NOT EXECUTED 2be4: 00002c10 .word 0x00002c10 <== NOT EXECUTED 2be8: 00002c58 .word 0x00002c58 <== NOT EXECUTED 2bec: 00002c7c .word 0x00002c7c <== NOT EXECUTED 2bf0: 00002c40 .word 0x00002c40 <== NOT EXECUTED 2bf4: 00002c24 .word 0x00002c24 <== NOT EXECUTED 2bf8: 00002c98 .word 0x00002c98 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2bfc: e5953000 ldr r3, [r5] 2c00: e3a0002f mov r0, #47 ; 0x2f 2c04: e5931008 ldr r1, [r3, #8] 2c08: eb0034b7 bl feec break; 2c0c: ea00002f b 2cd0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2c10: e5952000 ldr r2, [r5] 2c14: e5943054 ldr r3, [r4, #84] ; 0x54 2c18: e5920008 ldr r0, [r2, #8] 2c1c: e59f10c8 ldr r1, [pc, #200] ; 2cec 2c20: ea000003 b 2c34 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2c24: e5952000 ldr r2, [r5] <== NOT EXECUTED 2c28: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2c2c: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2c30: e59f10b8 ldr r1, [pc, #184] ; 2cf0 <== NOT EXECUTED 2c34: e5942050 ldr r2, [r4, #80] ; 0x50 2c38: eb00348f bl fe7c (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2c3c: ea000023 b 2cd0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2c40: e5953000 ldr r3, [r5] 2c44: e5942050 ldr r2, [r4, #80] ; 0x50 2c48: e5930008 ldr r0, [r3, #8] 2c4c: e59f10a0 ldr r1, [pc, #160] ; 2cf4 2c50: eb003489 bl fe7c (uint32_t)the_jnode->info.file.size ); #endif break; 2c54: ea00001d b 2cd0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2c58: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c5c: e59f0094 ldr r0, [pc, #148] ; 2cf8 <== NOT EXECUTED 2c60: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c64: eb0034e5 bl 10000 <== NOT EXECUTED assert(0); 2c68: e59f006c ldr r0, [pc, #108] ; 2cdc <== NOT EXECUTED 2c6c: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2c70: e59f2068 ldr r2, [pc, #104] ; 2ce0 <== NOT EXECUTED 2c74: e59f3080 ldr r3, [pc, #128] ; 2cfc <== NOT EXECUTED 2c78: eb00020a bl 34a8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2c7c: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c80: e59f0070 ldr r0, [pc, #112] ; 2cf8 <== NOT EXECUTED 2c84: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c88: eb0034dc bl 10000 <== NOT EXECUTED assert(0); 2c8c: e59f0048 ldr r0, [pc, #72] ; 2cdc <== NOT EXECUTED 2c90: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2c94: eafffff5 b 2c70 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2c98: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c9c: e59f005c ldr r0, [pc, #92] ; 2d00 <== NOT EXECUTED 2ca0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2ca4: eb0034d5 bl 10000 <== NOT EXECUTED assert(0); 2ca8: e59f002c ldr r0, [pc, #44] ; 2cdc <== NOT EXECUTED 2cac: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2cb0: eaffffee b 2c70 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2cb4: e5953000 ldr r3, [r5] <== NOT EXECUTED 2cb8: e59f1044 ldr r1, [pc, #68] ; 2d04 <== NOT EXECUTED 2cbc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2cc0: eb00346d bl fe7c <== NOT EXECUTED assert(0); 2cc4: e59f0010 ldr r0, [pc, #16] ; 2cdc <== NOT EXECUTED 2cc8: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 2ccc: eaffffe7 b 2c70 <== NOT EXECUTED break; } puts(""); 2cd0: e59f0030 ldr r0, [pc, #48] ; 2d08 } 2cd4: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2cd8: ea003b94 b 11b30 2cdc: 00021306 .word 0x00021306 2ce0: 00020088 .word 0x00020088 2ce4: 0002134f .word 0x0002134f 2ce8: 0001fb30 .word 0x0001fb30 2cec: 00021359 .word 0x00021359 2cf0: 0002136c .word 0x0002136c 2cf4: 0002137b .word 0x0002137b 2cf8: 00021387 .word 0x00021387 2cfc: 00020ced .word 0x00020ced 2d00: 0002139b .word 0x0002139b 2d04: 000213ae .word 0x000213ae 2d08: 0002153f .word 0x0002153f 00001f30 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 1f30: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 1f34: e593004c ldr r0, [r3, #76] ; 0x4c 1f38: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1f3c: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 1f40: 03a00000 moveq r0, #0 1f44: 0a000006 beq 1f64 rtems_set_errno_and_return_minus_one( EINVAL ); 1f48: eb003962 bl 104d8 <__errno> <== NOT EXECUTED 1f4c: e3a03016 mov r3, #22 <== NOT EXECUTED 1f50: e5803000 str r3, [r0] <== NOT EXECUTED 1f54: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f58: 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]; 1f5c: 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++ ) 1f60: e2800001 add r0, r0, #1 1f64: e1500002 cmp r0, r2 1f68: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 1f6c: e593c050 ldr ip, [r3, #80] ; 0x50 1f70: e7dcc000 ldrb ip, [ip, r0] 1f74: e35c0000 cmp ip, #0 1f78: 1afffff7 bne 1f5c buf[i] = node->info.sym_link.name[i]; return i; } 1f7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001f80 : 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 */ ) { 1f80: 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; 1f84: 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 */ ) { 1f88: 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 ); 1f8c: e1a01003 mov r1, r3 <== NOT EXECUTED 1f90: e284000c add r0, r4, #12 <== NOT EXECUTED 1f94: e3a02020 mov r2, #32 <== NOT EXECUTED 1f98: eb003d3f bl 1149c <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 1f9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1fa0: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1fa4: 11a00004 movne r0, r4 <== NOT EXECUTED 1fa8: 1b001193 blne 65fc <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1fac: 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 ); 1fb0: e1a01004 mov r1, r4 <== NOT EXECUTED 1fb4: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 1fb8: e5843008 str r3, [r4, #8] <== NOT EXECUTED 1fbc: eb001183 bl 65d0 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fc0: e1a0000d mov r0, sp <== NOT EXECUTED 1fc4: e3a01000 mov r1, #0 <== NOT EXECUTED 1fc8: eb0001d4 bl 2720 <== NOT EXECUTED 1fcc: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 1fd0: 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 ); 1fd4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 1fd8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 000084b8 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 84b8: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 84bc: e593204c ldr r2, [r3, #76] ; 0x4c 84c0: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 84c4: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 84c8: e3520005 cmp r2, #5 84cc: 979ff102 ldrls pc, [pc, r2, lsl #2] 84d0: ea000012 b 8520 <== NOT EXECUTED 84d4: 000084ec .word 0x000084ec <== NOT EXECUTED 84d8: 00008520 .word 0x00008520 <== NOT EXECUTED 84dc: 0000850c .word 0x0000850c <== NOT EXECUTED 84e0: 00008500 .word 0x00008500 <== NOT EXECUTED 84e4: 00008500 .word 0x00008500 <== NOT EXECUTED 84e8: 0000850c .word 0x0000850c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 84ec: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 84f0: e5932050 ldr r2, [r3, #80] ; 0x50 84f4: e581001c str r0, [r1, #28] 84f8: e5812018 str r2, [r1, #24] break; 84fc: ea00000c b 8534 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8500: e283c050 add ip, r3, #80 ; 0x50 8504: e89c1800 ldm ip, {fp, ip} 8508: ea000001 b 8514 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 850c: e3a0b000 mov fp, #0 <== NOT EXECUTED 8510: e3a0c000 mov ip, #0 <== NOT EXECUTED 8514: e581b020 str fp, [r1, #32] 8518: e581c024 str ip, [r1, #36] ; 0x24 break; 851c: ea000004 b 8534 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8520: eb000c1f bl b5a4 <__errno> <== NOT EXECUTED 8524: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8528: e5803000 str r3, [r0] <== NOT EXECUTED 852c: e3e00000 mvn r0, #0 <== NOT EXECUTED 8530: 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; 8534: e5932038 ldr r2, [r3, #56] ; 0x38 8538: 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; 853c: e5932040 ldr r2, [r3, #64] ; 0x40 8540: 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; 8544: 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; 8548: 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; 854c: 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; 8550: e5812030 str r2, [r1, #48] ; 0x30 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8554: e5932030 ldr r2, [r3, #48] ; 0x30 8558: 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; 855c: e1d323bc ldrh r2, [r3, #60] ; 0x3c 8560: 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; 8564: 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; 8568: 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; 856c: 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; 8570: 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; 8574: e3a00000 mov r0, #0 return 0; } 8578: e8bd8800 pop {fp, pc} 00001fdc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fdc: e92d40f0 push {r4, r5, r6, r7, lr} 1fe0: e1a05000 mov r5, r0 1fe4: 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 ); 1fe8: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fec: e1a07002 mov r7, r2 1ff0: 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 ); 1ff4: eb003d10 bl 1143c 1ff8: e28d4004 add r4, sp, #4 1ffc: e1a01000 mov r1, r0 2000: e1a02004 mov r2, r4 2004: e28d303c add r3, sp, #60 ; 0x3c 2008: e1a00007 mov r0, r7 200c: eb002bde bl cf8c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2010: e1a00006 mov r0, r6 2014: eb003cf4 bl 113ec if (info.sym_link.name == NULL) { 2018: 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); 201c: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 2020: 0a00000b beq 2054 * 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( 2024: e28dc028 add ip, sp, #40 ; 0x28 2028: e1a00005 mov r0, r5 202c: e1a02004 mov r2, r4 2030: e3a01004 mov r1, #4 2034: e59f3030 ldr r3, [pc, #48] ; 206c 2038: e58dc000 str ip, [sp] 203c: eb0028ca bl c36c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2040: e3500000 cmp r0, #0 2044: 13a00000 movne r0, #0 2048: 1a000005 bne 2064 free(info.sym_link.name); 204c: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2050: eb000189 bl 267c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2054: eb00391f bl 104d8 <__errno> <== NOT EXECUTED 2058: e3a0300c mov r3, #12 <== NOT EXECUTED 205c: e5803000 str r3, [r0] <== NOT EXECUTED 2060: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 2064: e28dd040 add sp, sp, #64 ; 0x40 2068: e8bd80f0 pop {r4, r5, r6, r7, pc} 206c: 0000a1ff .word 0x0000a1ff 00002070 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2070: 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; 2074: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2078: e595304c ldr r3, [r5, #76] ; 0x4c 207c: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2080: e24dd01c sub sp, sp, #28 2084: e1a04001 mov r4, r1 2088: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 208c: 1a000025 bne 2128 if ( !node->info.hard_link.link_node ) 2090: e595e050 ldr lr, [r5, #80] ; 0x50 2094: e35e0000 cmp lr, #0 2098: 1a000003 bne 20ac rtems_set_errno_and_return_minus_one( EINVAL ); 209c: eb00390d bl 104d8 <__errno> <== NOT EXECUTED 20a0: e3a03016 mov r3, #22 <== NOT EXECUTED 20a4: e5803000 str r3, [r0] <== NOT EXECUTED 20a8: ea000014 b 2100 <== NOT EXECUTED the_link = *loc; 20ac: e1a07001 mov r7, r1 20b0: e8b7000f ldm r7!, {r0, r1, r2, r3} 20b4: e1a0c00d mov ip, sp 20b8: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 20bc: e28d801c add r8, sp, #28 20c0: 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; 20c4: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20c8: 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; 20cc: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d0: eb0028f4 bl c4a8 /* * 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) 20d4: e5953050 ldr r3, [r5, #80] ; 0x50 20d8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 20dc: e3520001 cmp r2, #1 20e0: 1a000008 bne 2108 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 20e4: e1a0100d mov r1, sp 20e8: e1a00006 mov r0, r6 20ec: e59d3008 ldr r3, [sp, #8] 20f0: e1a0e00f mov lr, pc 20f4: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 20f8: e3500000 cmp r0, #0 20fc: 0a000009 beq 2128 2100: e3e00000 mvn r0, #0 2104: ea00000c b 213c return -1; } else { node->info.hard_link.link_node->st_nlink --; 2108: e2422001 sub r2, r2, #1 210c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2110: e28d0014 add r0, sp, #20 2114: e3a01000 mov r1, #0 2118: eb000180 bl 2720 211c: e5953050 ldr r3, [r5, #80] ; 0x50 2120: e59d2014 ldr r2, [sp, #20] 2124: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2128: e1a00006 mov r0, r6 212c: e1a01004 mov r1, r4 2130: e5943008 ldr r3, [r4, #8] 2134: e1a0e00f mov lr, pc 2138: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 213c: e28dd01c add sp, sp, #28 2140: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00002144 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2144: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2148: e593204c ldr r2, [r3, #76] ; 0x4c 214c: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2150: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2154: 0a000002 beq 2164 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2158: eb0038de bl 104d8 <__errno> <== NOT EXECUTED 215c: e3a03014 mov r3, #20 <== NOT EXECUTED 2160: ea000004 b 2178 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2164: e593205c ldr r2, [r3, #92] ; 0x5c 2168: e3520000 cmp r2, #0 216c: 1a000004 bne 2184 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2170: eb0038d8 bl 104d8 <__errno> <== NOT EXECUTED 2174: e3a03016 mov r3, #22 <== NOT EXECUTED 2178: e5803000 str r3, [r0] <== NOT EXECUTED 217c: e3e00000 mvn r0, #0 <== NOT EXECUTED 2180: 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; 2184: e3a00000 mov r0, #0 2188: e583005c str r0, [r3, #92] ; 0x5c return 0; } 218c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001410 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1410: e59f30c8 ldr r3, [pc, #200] ; 14e0 1414: e5933000 ldr r3, [r3] 1418: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 141c: e92d4070 push {r4, r5, r6, lr} 1420: e1a04000 mov r4, r0 1424: e1a05001 mov r5, r1 1428: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 142c: 11a0e00f movne lr, pc 1430: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1434: eb001dc9 bl 8b60 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1438: e59f30a4 ldr r3, [pc, #164] ; 14e4 143c: e5933000 ldr r3, [r3] 1440: e3530000 cmp r3, #0 1444: 0a000006 beq 1464 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1448: e1a00004 mov r0, r4 <== NOT EXECUTED 144c: e1a01006 mov r1, r6 <== NOT EXECUTED 1450: e1a0e00f mov lr, pc <== NOT EXECUTED 1454: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1458: e0845005 add r5, r4, r5 <== NOT EXECUTED 145c: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 1460: 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 ( 1464: e59f307c ldr r3, [pc, #124] ; 14e8 1468: e5d31000 ldrb r1, [r3] 146c: e3510000 cmp r1, #0 1470: 1a000005 bne 148c !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1474: e59f3070 ldr r3, [pc, #112] ; 14ec 1478: e5d33028 ldrb r3, [r3, #40] ; 0x28 147c: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 1480: 11a00004 movne r0, r4 1484: 11a02005 movne r2, r5 1488: 1b002a8f blne becc * 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 ) { 148c: e59f3054 ldr r3, [pc, #84] ; 14e8 1490: e5d33000 ldrb r3, [r3] 1494: e3530000 cmp r3, #0 1498: 1a000008 bne 14c0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 149c: e59f304c ldr r3, [pc, #76] ; 14f0 14a0: e1a01004 mov r1, r4 14a4: e5930000 ldr r0, [r3] 14a8: e1a02005 mov r2, r5 14ac: e3a03004 mov r3, #4 14b0: eb000ec1 bl 4fbc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 14b4: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 14b8: 0280001a addeq r0, r0, #26 14bc: 0b000cf8 bleq 48a4 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 14c0: e59f3028 ldr r3, [pc, #40] ; 14f0 14c4: e59f4028 ldr r4, [pc, #40] ; 14f4 14c8: e5930000 ldr r0, [r3] 14cc: e5945000 ldr r5, [r4] 14d0: eb00116e bl 5a90 <_Protected_heap_Get_size> 14d4: e0800005 add r0, r0, r5 14d8: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 14dc: e8bd8070 pop {r4, r5, r6, pc} 14e0: 00018408 .word 0x00018408 14e4: 0001840c .word 0x0001840c 14e8: 00018405 .word 0x00018405 14ec: 000170a4 .word 0x000170a4 14f0: 00016ffc .word 0x00016ffc 14f4: 000185b4 .word 0x000185b4 00003784 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 3784: 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 ) 3788: e250a000 subs sl, r0, #0 <== NOT EXECUTED 378c: 0a000043 beq 38a0 <== NOT EXECUTED return; if ( !print_handler ) 3790: e59f310c ldr r3, [pc, #268] ; 38a4 <== NOT EXECUTED 3794: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 3798: e3570000 cmp r7, #0 <== NOT EXECUTED 379c: 0a00003f beq 38a0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37a0: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 37a4: 159a60f0 ldrne r6, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 37a8: 128a40c0 addne r4, sl, #192 ; 0xc0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37ac: 1a000005 bne 37c8 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 37b0: e59f40f0 ldr r4, [pc, #240] ; 38a8 <== NOT EXECUTED 37b4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 37b8: e3530000 cmp r3, #0 <== NOT EXECUTED 37bc: 13a06000 movne r6, #0 <== NOT EXECUTED 37c0: 11a0a006 movne sl, r6 <== NOT EXECUTED 37c4: 0a000035 beq 38a0 <== 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); 37c8: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 37cc: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 37d0: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 37d4: e1a00009 mov r0, r9 <== NOT EXECUTED 37d8: e1a01005 mov r1, r5 <== NOT EXECUTED 37dc: ebffffda bl 374c <== NOT EXECUTED if ( high_water_mark ) 37e0: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 37e4: 10899005 addne r9, r9, r5 <== NOT EXECUTED 37e8: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 37ec: e35a0000 cmp sl, #0 <== NOT EXECUTED 37f0: e59f30ac ldr r3, [pc, #172] ; 38a4 <== NOT EXECUTED 37f4: 0a00000c beq 382c <== NOT EXECUTED (*print_handler)( 37f8: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 37fc: e28d2008 add r2, sp, #8 <== NOT EXECUTED 3800: e1a0000a mov r0, sl <== NOT EXECUTED 3804: e3a01005 mov r1, #5 <== NOT EXECUTED 3808: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 380c: eb00166b bl 91c0 <== NOT EXECUTED 3810: e1a0200a mov r2, sl <== NOT EXECUTED 3814: e1a03000 mov r3, r0 <== NOT EXECUTED 3818: e59f108c ldr r1, [pc, #140] ; 38ac <== NOT EXECUTED 381c: e1a00009 mov r0, r9 <== NOT EXECUTED 3820: e1a0e00f mov lr, pc <== NOT EXECUTED 3824: e12fff17 bx r7 <== NOT EXECUTED 3828: ea000004 b 3840 <== 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 ); 382c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3830: e59f1078 ldr r1, [pc, #120] ; 38b0 <== NOT EXECUTED 3834: e3e02000 mvn r2, #0 <== NOT EXECUTED 3838: e1a0e00f mov lr, pc <== NOT EXECUTED 383c: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 3840: e5943000 ldr r3, [r4] <== NOT EXECUTED 3844: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3848: e59f4054 ldr r4, [pc, #84] ; 38a4 <== NOT EXECUTED 384c: e58d6000 str r6, [sp] <== NOT EXECUTED 3850: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 3854: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3858: e0823003 add r3, r2, r3 <== NOT EXECUTED 385c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3860: e59f104c ldr r1, [pc, #76] ; 38b4 <== NOT EXECUTED 3864: e1a0e00f mov lr, pc <== NOT EXECUTED 3868: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 386c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3870: e3530000 cmp r3, #0 <== NOT EXECUTED 3874: 1a000004 bne 388c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 3878: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 387c: e59f1034 ldr r1, [pc, #52] ; 38b8 <== NOT EXECUTED 3880: e1a0e00f mov lr, pc <== NOT EXECUTED 3884: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 3888: ea000004 b 38a0 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 388c: e1a02008 mov r2, r8 <== NOT EXECUTED 3890: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3894: e59f1020 ldr r1, [pc, #32] ; 38bc <== NOT EXECUTED 3898: e1a0e00f mov lr, pc <== NOT EXECUTED 389c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 38a0: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 38a4: 0005c9d4 .word 0x0005c9d4 38a8: 0005f4c0 .word 0x0005f4c0 38ac: 000563c9 .word 0x000563c9 38b0: 000563d6 .word 0x000563d6 38b4: 000563e4 .word 0x000563e4 38b8: 00056402 .word 0x00056402 38bc: 0005640f .word 0x0005640f 0000374c : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 374c: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 3750: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 3754: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 3758: e59f3020 ldr r3, [pc, #32] ; 3780 <== 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++) 375c: ea000003 b 3770 <== NOT EXECUTED if (*base != U32_PATTERN) 3760: e5902000 ldr r2, [r0] <== NOT EXECUTED 3764: e1520003 cmp r2, r3 <== NOT EXECUTED 3768: 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++) 376c: e2800004 add r0, r0, #4 <== NOT EXECUTED 3770: e1500001 cmp r0, r1 <== NOT EXECUTED 3774: 3afffff9 bcc 3760 <== NOT EXECUTED 3778: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 377c: e12fff1e bx lr <== NOT EXECUTED 3780: a5a5a5a5 .word 0xa5a5a5a5 00009280 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9280: e59f3120 ldr r3, [pc, #288] ; 93a8 <_CORE_mutex_Seize_interrupt_trylock+0x128> 9284: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9288: e3a02000 mov r2, #0 928c: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9290: e590c050 ldr ip, [r0, #80] ; 0x50 9294: 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 ) { 9298: e52de004 push {lr} ; (str lr, [sp, #-4]!) 929c: 0a00002c beq 9354 <_CORE_mutex_Seize_interrupt_trylock+0xd4> the_mutex->lock = CORE_MUTEX_LOCKED; 92a0: 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; 92a4: 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; 92a8: e593c008 ldr ip, [r3, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 92ac: 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; 92b0: e580c060 str ip, [r0, #96] ; 0x60 the_mutex->nest_count = 1; 92b4: e3a0c001 mov ip, #1 92b8: 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; 92bc: 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 ) || 92c0: 0a000001 beq 92cc <_CORE_mutex_Seize_interrupt_trylock+0x4c> 92c4: e3520003 cmp r2, #3 92c8: 1a000004 bne 92e0 <_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++; 92cc: e593c01c ldr ip, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 92d0: 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++; 92d4: e28c2001 add r2, ip, #1 92d8: e583201c str r2, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 92dc: 0a000000 beq 92e4 <_CORE_mutex_Seize_interrupt_trylock+0x64> _ISR_Enable( *level_p ); 92e0: ea00002a b 9390 <_CORE_mutex_Seize_interrupt_trylock+0x110> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 92e4: e590204c ldr r2, [r0, #76] ; 0x4c current = executing->current_priority; 92e8: e593c014 ldr ip, [r3, #20] if ( current == ceiling ) { 92ec: e15c0002 cmp ip, r2 92f0: 1a000000 bne 92f8 <_CORE_mutex_Seize_interrupt_trylock+0x78> _ISR_Enable( *level_p ); 92f4: ea000025 b 9390 <_CORE_mutex_Seize_interrupt_trylock+0x110> return 0; } if ( current > ceiling ) { 92f8: 9a00000b bls 932c <_CORE_mutex_Seize_interrupt_trylock+0xac> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 92fc: e59f30a8 ldr r3, [pc, #168] ; 93ac <_CORE_mutex_Seize_interrupt_trylock+0x12c> 9300: e5932000 ldr r2, [r3] 9304: e2822001 add r2, r2, #1 9308: e5832000 str r2, [r3] 930c: e5913000 ldr r3, [r1] 9310: e129f003 msr CPSR_fc, r3 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9314: e3a02000 mov r2, #0 9318: e590104c ldr r1, [r0, #76] ; 0x4c 931c: e590005c ldr r0, [r0, #92] ; 0x5c 9320: ebfff1ef bl 5ae4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9324: ebfff34f bl 6068 <_Thread_Enable_dispatch> 9328: ea00001a b 9398 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 932c: e3a02006 mov r2, #6 9330: e5832034 str r2, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9334: e3a02000 mov r2, #0 9338: 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; 933c: e2822001 add r2, r2, #1 9340: e5802050 str r2, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9344: e593201c ldr r2, [r3, #28] 9348: e2422001 sub r2, r2, #1 934c: e583201c str r2, [r3, #28] _ISR_Enable( *level_p ); 9350: ea00000e b 9390 <_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 ) ) { 9354: e590205c ldr r2, [r0, #92] ; 0x5c 9358: e1520003 cmp r2, r3 935c: 1a00000f bne 93a0 <_CORE_mutex_Seize_interrupt_trylock+0x120> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9360: e5903040 ldr r3, [r0, #64] ; 0x40 9364: e3530000 cmp r3, #0 9368: 0a000002 beq 9378 <_CORE_mutex_Seize_interrupt_trylock+0xf8> 936c: e3530001 cmp r3, #1 9370: 1a00000a bne 93a0 <_CORE_mutex_Seize_interrupt_trylock+0x120> 9374: ea000003 b 9388 <_CORE_mutex_Seize_interrupt_trylock+0x108> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9378: e5903054 ldr r3, [r0, #84] ; 0x54 937c: e2833001 add r3, r3, #1 9380: e5803054 str r3, [r0, #84] ; 0x54 _ISR_Enable( *level_p ); 9384: ea000001 b 9390 <_CORE_mutex_Seize_interrupt_trylock+0x110> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9388: e3a03002 mov r3, #2 <== NOT EXECUTED 938c: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED 9390: e5913000 ldr r3, [r1] 9394: e129f003 msr CPSR_fc, r3 9398: e3a00000 mov r0, #0 939c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 93a0: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 93a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 93a8: 000187c0 .word 0x000187c0 93ac: 0001870c .word 0x0001870c 000065c4 <_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 ) { 65c4: 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; 65c8: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 65cc: e281503c add r5, r1, #60 ; 0x3c 65d0: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 65d4: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 65d8: 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 ) ) 65dc: 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 ]; 65e0: 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; 65e4: e581503c str r5, [r1, #60] ; 0x3c 65e8: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 65ec: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 65f0: 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 ]; 65f4: 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; 65f8: 159f8154 ldrne r8, [pc, #340] ; 6754 <_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 ) ) 65fc: 1a000023 bne 6690 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6600: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6604: e10f5000 mrs r5, CPSR 6608: e3854080 orr r4, r5, #128 ; 0x80 660c: 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; 6610: e3e06000 mvn r6, #0 6614: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6618: ea00000b b 664c <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 661c: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 6620: e1530006 cmp r3, r6 6624: 9a00000a bls 6654 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6628: e10fa000 mrs sl, CPSR 662c: e129f005 msr CPSR_fc, r5 6630: 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) ) { 6634: e594a010 ldr sl, [r4, #16] 6638: e117000a tst r7, sl 663c: 1a000001 bne 6648 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6640: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6644: eaffffee b 6604 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 6648: 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 ) ) { 664c: e1540008 cmp r4, r8 6650: 1afffff1 bne 661c <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6654: e590c030 ldr ip, [r0, #48] ; 0x30 6658: 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 ) ) { 665c: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6660: 1a000038 bne 6748 <_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 ) 6664: 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; 6668: e3a03000 mov r3, #0 666c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6670: 0a00002a beq 6720 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6674: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6678: e5814000 str r4, [r1] the_node->previous = previous_node; 667c: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6680: 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; 6684: e5831000 str r1, [r3] search_node->previous = the_node; 6688: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 668c: ea000021 b 6718 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6690: e5d86000 ldrb r6, [r8] 6694: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6698: e10f5000 mrs r5, CPSR 669c: e3854080 orr r4, r5, #128 ; 0x80 66a0: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 66a4: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 66a8: ea00000b b 66dc <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 66ac: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 66b0: e1530006 cmp r3, r6 66b4: 2a00000a bcs 66e4 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 66b8: e10fa000 mrs sl, CPSR 66bc: e129f005 msr CPSR_fc, r5 66c0: 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) ) { 66c4: e594a010 ldr sl, [r4, #16] 66c8: e117000a tst r7, sl 66cc: 1a000001 bne 66d8 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 66d0: e129f005 msr CPSR_fc, r5 66d4: eaffffed b 6690 <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 66d8: 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 ) ) { 66dc: e154000c cmp r4, ip 66e0: 1afffff1 bne 66ac <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 66e4: e590c030 ldr ip, [r0, #48] ; 0x30 66e8: 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 ) ) { 66ec: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 66f0: 1a000014 bne 6748 <_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 ) 66f4: 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; 66f8: e3a03000 mov r3, #0 66fc: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6700: 0a000006 beq 6720 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6704: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6708: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 670c: 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; 6710: e5841000 str r1, [r4] next_node->previous = the_node; 6714: e5831004 str r1, [r3, #4] 6718: e129f005 msr CPSR_fc, r5 671c: ea000007 b 6740 <_Thread_queue_Enqueue_priority+0x17c> 6720: 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; 6724: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6728: e5814000 str r4, [r1] the_node->previous = previous_node; 672c: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6730: 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; 6734: e5831000 str r1, [r3] search_node->previous = the_node; 6738: e5841004 str r1, [r4, #4] 673c: e129f00c msr CPSR_fc, ip 6740: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6744: 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; 6748: e582c000 str ip, [r2] return the_thread_queue->sync_state; 674c: e5900030 ldr r0, [r0, #48] ; 0x30 } 6750: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 6754: 000170a0 .word 0x000170a0 00013cec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13cec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13cf0: e24dd020 sub sp, sp, #32 13cf4: e28d3014 add r3, sp, #20 13cf8: 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; 13cfc: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13d00: e283a004 add sl, r3, #4 13d04: 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); 13d08: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d0c: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d10: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d14: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 13d18: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d1c: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 13d20: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 13d24: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d28: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d2c: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13d30: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d34: 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 ); 13d38: 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; 13d3c: e28d2014 add r2, sp, #20 13d40: 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; 13d44: e59f2168 ldr r2, [pc, #360] ; 13eb4 <_Timer_server_Body+0x1c8> 13d48: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 13d4c: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d50: e1a02005 mov r2, r5 13d54: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 13d58: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d5c: e1a0000b mov r0, fp 13d60: eb000fdb bl 17cd4 <_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(); 13d64: e59f314c ldr r3, [pc, #332] ; 13eb8 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 13d68: 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(); 13d6c: 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 ) { 13d70: e1560002 cmp r6, r2 13d74: 9a000004 bls 13d8c <_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 ); 13d78: e0621006 rsb r1, r2, r6 13d7c: e1a00007 mov r0, r7 13d80: e1a02005 mov r2, r5 13d84: eb000fd2 bl 17cd4 <_Watchdog_Adjust_to_chain> 13d88: ea000003 b 13d9c <_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 ); 13d8c: 30662002 rsbcc r2, r6, r2 13d90: 31a00007 movcc r0, r7 13d94: 33a01001 movcc r1, #1 13d98: 3b000fa5 blcc 17c34 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 13d9c: 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 ); 13da0: e5940078 ldr r0, [r4, #120] ; 0x78 13da4: eb000228 bl 1464c <_Chain_Get> if ( timer == NULL ) { 13da8: e2501000 subs r1, r0, #0 13dac: 0a00000a beq 13ddc <_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 ) { 13db0: e5913038 ldr r3, [r1, #56] ; 0x38 13db4: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 13db8: 02811010 addeq r1, r1, #16 13dbc: 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 ) { 13dc0: 0a000003 beq 13dd4 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 13dc4: e3530003 cmp r3, #3 13dc8: 1afffff4 bne 13da0 <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 13dcc: e2811010 add r1, r1, #16 13dd0: e1a00007 mov r0, r7 13dd4: eb000feb bl 17d88 <_Watchdog_Insert> 13dd8: eafffff0 b 13da0 <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13ddc: e10f3000 mrs r3, CPSR 13de0: e3832080 orr r2, r3, #128 ; 0x80 13de4: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 13de8: e59d2014 ldr r2, [sp, #20] 13dec: e152000a cmp r2, sl 13df0: 1a000005 bne 13e0c <_Timer_server_Body+0x120> ts->insert_chain = NULL; 13df4: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13df8: 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 ) ) { 13dfc: e59d3008 ldr r3, [sp, #8] 13e00: e1530008 cmp r3, r8 13e04: 1a000002 bne 13e14 <_Timer_server_Body+0x128> 13e08: ea000015 b 13e64 <_Timer_server_Body+0x178> 13e0c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 13e10: eaffffcb b 13d44 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13e14: e10f2000 mrs r2, CPSR 13e18: e3823080 orr r3, r2, #128 ; 0x80 13e1c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 13e20: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 13e24: e1530008 cmp r3, r8 13e28: 0a00000b beq 13e5c <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 13e2c: 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 ) { 13e30: e3530000 cmp r3, #0 the_chain->first = new_first; 13e34: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 13e38: e5815004 str r5, [r1, #4] 13e3c: 0a000006 beq 13e5c <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 13e40: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13e44: 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 ); 13e48: e2830020 add r0, r3, #32 13e4c: e8900003 ldm r0, {r0, r1} 13e50: e1a0e00f mov lr, pc 13e54: e593f01c ldr pc, [r3, #28] } 13e58: eaffffed b 13e14 <_Timer_server_Body+0x128> 13e5c: e129f002 msr CPSR_fc, r2 13e60: eaffffb5 b 13d3c <_Timer_server_Body+0x50> } else { ts->active = false; 13e64: e5c4907c strb r9, [r4, #124] ; 0x7c 13e68: e59f304c ldr r3, [pc, #76] ; 13ebc <_Timer_server_Body+0x1d0> 13e6c: e5932000 ldr r2, [r3] 13e70: e2822001 add r2, r2, #1 13e74: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 13e78: e3a01008 mov r1, #8 13e7c: e5940000 ldr r0, [r4] 13e80: eb000d20 bl 17308 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 13e84: e1a00004 mov r0, r4 13e88: ebffff6b bl 13c3c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 13e8c: e1a00004 mov r0, r4 13e90: ebffff7f bl 13c94 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 13e94: eb000a8c bl 168cc <_Thread_Enable_dispatch> ts->active = true; 13e98: e3a03001 mov r3, #1 13e9c: 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 ); 13ea0: e59d0004 ldr r0, [sp, #4] 13ea4: eb001010 bl 17eec <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13ea8: e59d0000 ldr r0, [sp] 13eac: eb00100e bl 17eec <_Watchdog_Remove> 13eb0: eaffffa1 b 13d3c <_Timer_server_Body+0x50> 13eb4: 00037c44 .word 0x00037c44 13eb8: 00037b74 .word 0x00037b74 13ebc: 00037aec .word 0x00037aec 000203a4 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 203a4: e3a00000 mov r0, #0 <== NOT EXECUTED 203a8: e12fff1e bx lr <== NOT EXECUTED 00016714 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 16714: e1a04000 mov r4, r0 16718: eb000228 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(); 1671c: ebffffe0 bl 166a4 rtems_shutdown_executive(status); 16720: e1a00004 mov r0, r4 16724: eb00003b bl 16818 16728: eafffffe b 16728 <_exit+0x14> <== NOT EXECUTED 00032de8 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 32de8: e1a00001 mov r0, r1 <== NOT EXECUTED 32dec: e1a01002 mov r1, r2 <== NOT EXECUTED 32df0: e1a02003 mov r2, r3 <== NOT EXECUTED 32df4: eaffff8b b 32c28 <== NOT EXECUTED 00020384 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 20384: e3a00001 mov r0, #1 <== NOT EXECUTED 20388: e12fff1e bx lr <== NOT EXECUTED 00008894 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 8894: eaffffe8 b 883c <== NOT EXECUTED 0002039c <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 2039c: e3a00000 mov r0, #0 <== NOT EXECUTED 203a0: e12fff1e bx lr <== NOT EXECUTED 00022cb4 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 22cb4: e1a00001 mov r0, r1 <== NOT EXECUTED 22cb8: e1a01002 mov r1, r2 <== NOT EXECUTED 22cbc: eaffff68 b 22a64 <== NOT EXECUTED 00022eb0 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 22eb0: e1a00001 mov r0, r1 <== NOT EXECUTED 22eb4: e1a01002 mov r1, r2 <== NOT EXECUTED 22eb8: eaffffc4 b 22dd0 <== NOT EXECUTED 000167fc <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 167fc: e1a00001 mov r0, r1 <== NOT EXECUTED 16800: e1a01002 mov r1, r2 <== NOT EXECUTED 16804: ea00000e b 16844 <== NOT EXECUTED 000517e4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 517e4: 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 ); 517e8: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 517ec: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 517f0: e1a05001 mov r5, r1 <== NOT EXECUTED 517f4: 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 ); 517f8: ebfece05 bl 5014 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 517fc: e2507000 subs r7, r0, #0 <== NOT EXECUTED 51800: 1a000019 bne 5186c <_rename_r+0x88> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 51804: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 51808: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 5180c: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 51810: 0a000001 beq 5181c <_rename_r+0x38> <== NOT EXECUTED 51814: e3530000 cmp r3, #0 <== NOT EXECUTED 51818: 1a000009 bne 51844 <_rename_r+0x60> <== NOT EXECUTED 5181c: e59f33ac ldr r3, [pc, #940] ; 51bd0 <_rename_r+0x3ec> <== NOT EXECUTED 51820: e593e000 ldr lr, [r3] <== NOT EXECUTED 51824: e28ee018 add lr, lr, #24 <== NOT EXECUTED 51828: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5182c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51830: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51834: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51838: e3a04000 mov r4, #0 <== NOT EXECUTED 5183c: e58c3000 str r3, [ip] <== NOT EXECUTED 51840: ea000013 b 51894 <_rename_r+0xb0> <== NOT EXECUTED 51844: e59f3384 ldr r3, [pc, #900] ; 51bd0 <_rename_r+0x3ec> <== NOT EXECUTED 51848: e593e000 ldr lr, [r3] <== NOT EXECUTED 5184c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 51850: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51854: e28dc018 add ip, sp, #24 <== NOT EXECUTED 51858: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5185c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51860: e1a04007 mov r4, r7 <== NOT EXECUTED 51864: e58c3000 str r3, [ip] <== NOT EXECUTED 51868: ea000009 b 51894 <_rename_r+0xb0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 5186c: e3a0c000 mov ip, #0 <== NOT EXECUTED 51870: e1a00005 mov r0, r5 <== NOT EXECUTED 51874: e1a01007 mov r1, r7 <== NOT EXECUTED 51878: e3a02002 mov r2, #2 <== NOT EXECUTED 5187c: e28d3018 add r3, sp, #24 <== NOT EXECUTED 51880: e58dc000 str ip, [sp] <== NOT EXECUTED 51884: ebfece2a bl 5134 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 51888: e3500000 cmp r0, #0 <== NOT EXECUTED 5188c: 03a04001 moveq r4, #1 <== NOT EXECUTED 51890: 1a000025 bne 5192c <_rename_r+0x148> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 51894: e28de018 add lr, sp, #24 <== NOT EXECUTED 51898: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5189c: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 518a0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 518a4: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 518a8: 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; 518ac: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 518b0: 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; 518b4: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 518b8: ebffb354 bl 3e610 <== NOT EXECUTED 518bc: e1a01000 mov r1, r0 <== NOT EXECUTED 518c0: e1a00005 mov r0, r5 <== NOT EXECUTED 518c4: ebfecdc6 bl 4fe4 <== NOT EXECUTED 518c8: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 518cc: 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 ) ); 518d0: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 518d4: ebffb34d bl 3e610 <== NOT EXECUTED 518d8: e3a0c000 mov ip, #0 <== NOT EXECUTED 518dc: e1a01000 mov r1, r0 <== NOT EXECUTED 518e0: e1a0200c mov r2, ip <== NOT EXECUTED 518e4: e1a00005 mov r0, r5 <== NOT EXECUTED 518e8: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 518ec: e58dc000 str ip, [sp] <== NOT EXECUTED 518f0: ebfecdd7 bl 5054 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 518f4: e2505000 subs r5, r0, #0 <== NOT EXECUTED 518f8: 0a00000d beq 51934 <_rename_r+0x150> <== NOT EXECUTED if ( free_old_parentloc ) 518fc: e3540000 cmp r4, #0 <== NOT EXECUTED 51900: 0a000007 beq 51924 <_rename_r+0x140> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51904: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51908: e3530000 cmp r3, #0 <== NOT EXECUTED 5190c: 0a000004 beq 51924 <_rename_r+0x140> <== NOT EXECUTED 51910: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51914: e3530000 cmp r3, #0 <== NOT EXECUTED 51918: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 5191c: 11a0e00f movne lr, pc <== NOT EXECUTED 51920: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 51924: ebff98bf bl 37c28 <__errno> <== NOT EXECUTED 51928: e5805000 str r5, [r0] <== NOT EXECUTED 5192c: e3e06000 mvn r6, #0 <== NOT EXECUTED 51930: ea0000a3 b 51bc4 <_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 ); 51934: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 51938: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 5193c: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 51940: 13a05000 movne r5, #0 <== NOT EXECUTED 51944: 03a05001 moveq r5, #1 <== NOT EXECUTED 51948: 0a000001 beq 51954 <_rename_r+0x170> <== NOT EXECUTED 5194c: e3530000 cmp r3, #0 <== NOT EXECUTED 51950: 1a000009 bne 5197c <_rename_r+0x198> <== NOT EXECUTED 51954: e59f3274 ldr r3, [pc, #628] ; 51bd0 <_rename_r+0x3ec> <== NOT EXECUTED 51958: e593e000 ldr lr, [r3] <== NOT EXECUTED 5195c: e28ee018 add lr, lr, #24 <== NOT EXECUTED 51960: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 51964: e28dc004 add ip, sp, #4 <== NOT EXECUTED 51968: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5196c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51970: e3a00001 mov r0, #1 <== NOT EXECUTED 51974: e58c3000 str r3, [ip] <== NOT EXECUTED 51978: ea000008 b 519a0 <_rename_r+0x1bc> <== NOT EXECUTED 5197c: e59f324c ldr r3, [pc, #588] ; 51bd0 <_rename_r+0x3ec> <== NOT EXECUTED 51980: e593e000 ldr lr, [r3] <== NOT EXECUTED 51984: e28ee004 add lr, lr, #4 <== NOT EXECUTED 51988: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5198c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 51990: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 51994: e59e3000 ldr r3, [lr] <== NOT EXECUTED 51998: e58c3000 str r3, [ip] <== NOT EXECUTED 5199c: e1a00005 mov r0, r5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 519a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 519a4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 519a8: e3530000 cmp r3, #0 <== NOT EXECUTED 519ac: 0a00004d beq 51ae8 <_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 ); 519b0: e28d5004 add r5, sp, #4 <== NOT EXECUTED 519b4: e0860000 add r0, r6, r0 <== NOT EXECUTED 519b8: e1a01005 mov r1, r5 <== NOT EXECUTED 519bc: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 519c0: e1a0e00f mov lr, pc <== NOT EXECUTED 519c4: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 519c8: e2506000 subs r6, r0, #0 <== NOT EXECUTED 519cc: 0a00001c beq 51a44 <_rename_r+0x260> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 519d0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 519d4: e3530000 cmp r3, #0 <== NOT EXECUTED 519d8: 0a000004 beq 519f0 <_rename_r+0x20c> <== NOT EXECUTED 519dc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 519e0: e3530000 cmp r3, #0 <== NOT EXECUTED 519e4: 11a00005 movne r0, r5 <== NOT EXECUTED 519e8: 11a0e00f movne lr, pc <== NOT EXECUTED 519ec: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 519f0: e3540000 cmp r4, #0 <== NOT EXECUTED 519f4: 0a000007 beq 51a18 <_rename_r+0x234> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 519f8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 519fc: e3530000 cmp r3, #0 <== NOT EXECUTED 51a00: 0a000004 beq 51a18 <_rename_r+0x234> <== NOT EXECUTED 51a04: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a08: e3530000 cmp r3, #0 <== NOT EXECUTED 51a0c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51a10: 11a0e00f movne lr, pc <== NOT EXECUTED 51a14: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51a18: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51a1c: e3530000 cmp r3, #0 <== NOT EXECUTED 51a20: 0a000004 beq 51a38 <_rename_r+0x254> <== NOT EXECUTED 51a24: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a28: e3530000 cmp r3, #0 <== NOT EXECUTED 51a2c: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51a30: 11a0e00f movne lr, pc <== NOT EXECUTED 51a34: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 51a38: ebff987a bl 37c28 <__errno> <== NOT EXECUTED 51a3c: e5806000 str r6, [r0] <== NOT EXECUTED 51a40: eaffffb9 b 5192c <_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 ) { 51a44: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 51a48: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 51a4c: e1520003 cmp r2, r3 <== NOT EXECUTED 51a50: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 51a54: 0a00001b beq 51ac8 <_rename_r+0x2e4> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51a58: e3530000 cmp r3, #0 <== NOT EXECUTED 51a5c: 0a000004 beq 51a74 <_rename_r+0x290> <== NOT EXECUTED 51a60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a64: e3530000 cmp r3, #0 <== NOT EXECUTED 51a68: 11a00005 movne r0, r5 <== NOT EXECUTED 51a6c: 11a0e00f movne lr, pc <== NOT EXECUTED 51a70: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51a74: e3540000 cmp r4, #0 <== NOT EXECUTED 51a78: 0a000007 beq 51a9c <_rename_r+0x2b8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51a7c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51a80: e3530000 cmp r3, #0 <== NOT EXECUTED 51a84: 0a000004 beq 51a9c <_rename_r+0x2b8> <== NOT EXECUTED 51a88: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51a8c: e3530000 cmp r3, #0 <== NOT EXECUTED 51a90: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51a94: 11a0e00f movne lr, pc <== NOT EXECUTED 51a98: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51a9c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51aa0: e3530000 cmp r3, #0 <== NOT EXECUTED 51aa4: 0a000004 beq 51abc <_rename_r+0x2d8> <== NOT EXECUTED 51aa8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51aac: e3530000 cmp r3, #0 <== NOT EXECUTED 51ab0: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51ab4: 11a0e00f movne lr, pc <== NOT EXECUTED 51ab8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 51abc: ebff9859 bl 37c28 <__errno> <== NOT EXECUTED 51ac0: e3a03012 mov r3, #18 <== NOT EXECUTED 51ac4: ea00001b b 51b38 <_rename_r+0x354> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 51ac8: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 51acc: e35c0000 cmp ip, #0 <== NOT EXECUTED 51ad0: 1a00001a bne 51b40 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51ad4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51ad8: e3530000 cmp r3, #0 <== NOT EXECUTED 51adc: 11a00005 movne r0, r5 <== NOT EXECUTED 51ae0: 11a0e00f movne lr, pc <== NOT EXECUTED 51ae4: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51ae8: e3540000 cmp r4, #0 <== NOT EXECUTED 51aec: 0a000007 beq 51b10 <_rename_r+0x32c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51af0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51af4: e3530000 cmp r3, #0 <== NOT EXECUTED 51af8: 0a000004 beq 51b10 <_rename_r+0x32c> <== NOT EXECUTED 51afc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b00: e3530000 cmp r3, #0 <== NOT EXECUTED 51b04: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51b08: 11a0e00f movne lr, pc <== NOT EXECUTED 51b0c: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51b10: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51b14: e3530000 cmp r3, #0 <== NOT EXECUTED 51b18: 0a000004 beq 51b30 <_rename_r+0x34c> <== NOT EXECUTED 51b1c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b20: e3530000 cmp r3, #0 <== NOT EXECUTED 51b24: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51b28: 11a0e00f movne lr, pc <== NOT EXECUTED 51b2c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 51b30: ebff983c bl 37c28 <__errno> <== NOT EXECUTED 51b34: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 51b38: e5803000 str r3, [r0] <== NOT EXECUTED 51b3c: eaffff7a b 5192c <_rename_r+0x148> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 51b40: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 51b44: e28d0018 add r0, sp, #24 <== NOT EXECUTED 51b48: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 51b4c: e1a02005 mov r2, r5 <== NOT EXECUTED 51b50: e1a0e00f mov lr, pc <== NOT EXECUTED 51b54: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51b58: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 51b5c: 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 ); 51b60: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 51b64: 0a000004 beq 51b7c <_rename_r+0x398> <== NOT EXECUTED 51b68: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b6c: e3530000 cmp r3, #0 <== NOT EXECUTED 51b70: 11a00005 movne r0, r5 <== NOT EXECUTED 51b74: 11a0e00f movne lr, pc <== NOT EXECUTED 51b78: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 51b7c: e3540000 cmp r4, #0 <== NOT EXECUTED 51b80: 0a000007 beq 51ba4 <_rename_r+0x3c0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 51b84: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 51b88: e3530000 cmp r3, #0 <== NOT EXECUTED 51b8c: 0a000004 beq 51ba4 <_rename_r+0x3c0> <== NOT EXECUTED 51b90: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51b94: e3530000 cmp r3, #0 <== NOT EXECUTED 51b98: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 51b9c: 11a0e00f movne lr, pc <== NOT EXECUTED 51ba0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 51ba4: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 51ba8: e3530000 cmp r3, #0 <== NOT EXECUTED 51bac: 0a000004 beq 51bc4 <_rename_r+0x3e0> <== NOT EXECUTED 51bb0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 51bb4: e3530000 cmp r3, #0 <== NOT EXECUTED 51bb8: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 51bbc: 11a0e00f movne lr, pc <== NOT EXECUTED 51bc0: 112fff13 bxne r3 <== NOT EXECUTED return result; } 51bc4: e1a00006 mov r0, r6 <== NOT EXECUTED 51bc8: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 51bcc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 51bd0: 00051fe8 .word 0x00051fe8 000068e0 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 68e0: e1a00001 mov r0, r1 <== NOT EXECUTED 68e4: e1a01002 mov r1, r2 <== NOT EXECUTED 68e8: eaffffc4 b 6800 <== NOT EXECUTED 0000b518 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); b518: e1a00001 mov r0, r1 <== NOT EXECUTED b51c: eaffff5c b b294 <== NOT EXECUTED 00021830 : #include int chdir( const char *pathname ) { 21830: e92d4030 push {r4, r5, lr} 21834: e24dd018 sub sp, sp, #24 21838: 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 ); 2183c: eb007373 bl 3e610 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 21840: e28d4004 add r4, sp, #4 21844: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 21848: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 2184c: e1a0200c mov r2, ip 21850: e1a00005 mov r0, r5 21854: e1a03004 mov r3, r4 21858: e58dc000 str ip, [sp] 2185c: ebff8e34 bl 5134 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 21860: e3500000 cmp r0, #0 21864: 1a00000b bne 21898 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 21868: e59d2010 ldr r2, [sp, #16] 2186c: e5923010 ldr r3, [r2, #16] 21870: e3530000 cmp r3, #0 21874: 1a000009 bne 218a0 rtems_filesystem_freenode( &loc ); 21878: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2187c: e3530000 cmp r3, #0 <== NOT EXECUTED 21880: 11a00004 movne r0, r4 <== NOT EXECUTED 21884: 11a0e00f movne lr, pc <== NOT EXECUTED 21888: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2188c: eb0058e5 bl 37c28 <__errno> <== NOT EXECUTED 21890: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21894: e5803000 str r3, [r0] 21898: e3e00000 mvn r0, #0 2189c: ea000022 b 2192c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 218a0: e1a00004 mov r0, r4 218a4: e1a0e00f mov lr, pc 218a8: e12fff13 bx r3 218ac: e3500001 cmp r0, #1 218b0: 0a00000a beq 218e0 rtems_filesystem_freenode( &loc ); 218b4: e59d3010 ldr r3, [sp, #16] 218b8: e3530000 cmp r3, #0 218bc: 0a000004 beq 218d4 218c0: e593301c ldr r3, [r3, #28] 218c4: e3530000 cmp r3, #0 218c8: 11a00004 movne r0, r4 218cc: 11a0e00f movne lr, pc 218d0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 218d4: eb0058d3 bl 37c28 <__errno> 218d8: e3a03014 mov r3, #20 218dc: eaffffec b 21894 } rtems_filesystem_freenode( &rtems_filesystem_current ); 218e0: e59f304c ldr r3, [pc, #76] ; 21934 218e4: e5930000 ldr r0, [r3] 218e8: e5903010 ldr r3, [r0, #16] 218ec: e3530000 cmp r3, #0 218f0: 0a000004 beq 21908 218f4: e593301c ldr r3, [r3, #28] 218f8: e3530000 cmp r3, #0 218fc: 12800004 addne r0, r0, #4 21900: 11a0e00f movne lr, pc 21904: 112fff13 bxne r3 rtems_filesystem_current = loc; 21908: e59f3024 ldr r3, [pc, #36] ; 21934 2190c: e28d4004 add r4, sp, #4 21910: e593c000 ldr ip, [r3] 21914: e8b4000f ldm r4!, {r0, r1, r2, r3} 21918: e28cc004 add ip, ip, #4 2191c: e8ac000f stmia ip!, {r0, r1, r2, r3} 21920: e5943000 ldr r3, [r4] 21924: e58c3000 str r3, [ip] 21928: e3a00000 mov r0, #0 return 0; } 2192c: e28dd018 add sp, sp, #24 21930: e8bd8030 pop {r4, r5, pc} 21934: 00051fe8 .word 0x00051fe8 00004e4c : int chmod( const char *path, mode_t mode ) { 4e4c: e92d4070 push {r4, r5, r6, lr} 4e50: e24dd018 sub sp, sp, #24 4e54: e1a05001 mov r5, r1 4e58: 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 ); 4e5c: eb00e5eb bl 3e610 4e60: e28d4004 add r4, sp, #4 4e64: e1a01000 mov r1, r0 4e68: e3a0c001 mov ip, #1 4e6c: e1a00006 mov r0, r6 4e70: e3a02000 mov r2, #0 4e74: e1a03004 mov r3, r4 4e78: e58dc000 str ip, [sp] 4e7c: eb0000ac bl 5134 if ( status != 0 ) 4e80: e3500000 cmp r0, #0 4e84: 1a00000d bne 4ec0 return -1; if ( !loc.handlers ){ 4e88: e59d300c ldr r3, [sp, #12] 4e8c: e3530000 cmp r3, #0 4e90: 1a00000c bne 4ec8 rtems_filesystem_freenode( &loc ); 4e94: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4e98: e3530000 cmp r3, #0 <== NOT EXECUTED 4e9c: 0a000004 beq 4eb4 <== NOT EXECUTED 4ea0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 4ea8: 11a00004 movne r0, r4 <== NOT EXECUTED 4eac: 11a0e00f movne lr, pc <== NOT EXECUTED 4eb0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4eb4: eb00cb5b bl 37c28 <__errno> <== NOT EXECUTED 4eb8: e3a03009 mov r3, #9 <== NOT EXECUTED 4ebc: e5803000 str r3, [r0] <== NOT EXECUTED 4ec0: e3e05000 mvn r5, #0 4ec4: ea00001a b 4f34 } if ( !loc.handlers->fchmod_h ){ 4ec8: e593301c ldr r3, [r3, #28] 4ecc: e3530000 cmp r3, #0 4ed0: 1a00000a bne 4f00 rtems_filesystem_freenode( &loc ); 4ed4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ed8: e3530000 cmp r3, #0 <== NOT EXECUTED 4edc: 0a000004 beq 4ef4 <== NOT EXECUTED 4ee0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4ee4: e3530000 cmp r3, #0 <== NOT EXECUTED 4ee8: 11a00004 movne r0, r4 <== NOT EXECUTED 4eec: 11a0e00f movne lr, pc <== NOT EXECUTED 4ef0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ef4: eb00cb4b bl 37c28 <__errno> <== NOT EXECUTED 4ef8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4efc: eaffffee b 4ebc <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4f00: e1a01005 mov r1, r5 4f04: e1a00004 mov r0, r4 4f08: e1a0e00f mov lr, pc 4f0c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 4f10: e59d3010 ldr r3, [sp, #16] 4f14: 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 ); 4f18: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 4f1c: 0a000004 beq 4f34 4f20: e593301c ldr r3, [r3, #28] 4f24: e3530000 cmp r3, #0 4f28: 11a00004 movne r0, r4 4f2c: 11a0e00f movne lr, pc 4f30: 112fff13 bxne r3 return result; } 4f34: e1a00005 mov r0, r5 4f38: e28dd018 add sp, sp, #24 4f3c: e8bd8070 pop {r4, r5, r6, pc} 00021938 : int chown( const char *path, uid_t owner, gid_t group ) { 21938: e92d40f0 push {r4, r5, r6, r7, lr} 2193c: e1a01801 lsl r1, r1, #16 21940: e24dd018 sub sp, sp, #24 21944: e1a02802 lsl r2, r2, #16 21948: e1a06821 lsr r6, r1, #16 2194c: e1a05822 lsr r5, r2, #16 21950: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 21954: eb00732d bl 3e610 21958: e28d4004 add r4, sp, #4 2195c: e1a01000 mov r1, r0 21960: e3a0c001 mov ip, #1 21964: e1a00007 mov r0, r7 21968: e3a02000 mov r2, #0 2196c: e1a03004 mov r3, r4 21970: e58dc000 str ip, [sp] 21974: ebff8dee bl 5134 21978: e3500000 cmp r0, #0 2197c: 1a00000b bne 219b0 return -1; if ( !loc.ops->chown_h ) { 21980: e59d2010 ldr r2, [sp, #16] 21984: e5923018 ldr r3, [r2, #24] 21988: e3530000 cmp r3, #0 2198c: 1a000009 bne 219b8 rtems_filesystem_freenode( &loc ); 21990: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21994: e3530000 cmp r3, #0 <== NOT EXECUTED 21998: 11a00004 movne r0, r4 <== NOT EXECUTED 2199c: 11a0e00f movne lr, pc <== NOT EXECUTED 219a0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 219a4: eb00589f bl 37c28 <__errno> <== NOT EXECUTED 219a8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 219ac: e5803000 str r3, [r0] <== NOT EXECUTED 219b0: e3e05000 mvn r5, #0 219b4: ea00000d b 219f0 } result = (*loc.ops->chown_h)( &loc, owner, group ); 219b8: e1a02005 mov r2, r5 219bc: e1a01006 mov r1, r6 219c0: e1a00004 mov r0, r4 219c4: e1a0e00f mov lr, pc 219c8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 219cc: e59d3010 ldr r3, [sp, #16] 219d0: 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 ); 219d4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 219d8: 0a000004 beq 219f0 219dc: e593301c ldr r3, [r3, #28] 219e0: e3530000 cmp r3, #0 219e4: 11a00004 movne r0, r4 219e8: 11a0e00f movne lr, pc 219ec: 112fff13 bxne r3 return result; } 219f0: e1a00005 mov r0, r5 219f4: e28dd018 add sp, sp, #24 219f8: e8bd80f0 pop {r4, r5, r6, r7, pc} 000219fc : #include int chroot( const char *pathname ) { 219fc: 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) { 21a00: e59f50d4 ldr r5, [pc, #212] ; 21adc 21a04: e59f30d4 ldr r3, [pc, #212] ; 21ae0 21a08: e5954000 ldr r4, [r5] 21a0c: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 21a10: e24dd018 sub sp, sp, #24 21a14: 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) { 21a18: 1a000007 bne 21a3c rtems_libio_set_private_env(); /* try to set a new private env*/ 21a1c: eb0005d8 bl 23184 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 21a20: e5953000 ldr r3, [r5] 21a24: e1530004 cmp r3, r4 21a28: 1a000003 bne 21a3c rtems_set_errno_and_return_minus_one( ENOTSUP ); 21a2c: eb00587d bl 37c28 <__errno> <== NOT EXECUTED 21a30: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21a34: e5803000 str r3, [r0] <== NOT EXECUTED 21a38: ea000008 b 21a60 <== NOT EXECUTED } result = chdir(pathname); 21a3c: e1a00006 mov r0, r6 21a40: ebffff7a bl 21830 if (result) { 21a44: e250c000 subs ip, r0, #0 21a48: 0a000006 beq 21a68 rtems_set_errno_and_return_minus_one( errno ); 21a4c: eb005875 bl 37c28 <__errno> <== NOT EXECUTED 21a50: e1a04000 mov r4, r0 <== NOT EXECUTED 21a54: eb005873 bl 37c28 <__errno> <== NOT EXECUTED 21a58: e5903000 ldr r3, [r0] <== NOT EXECUTED 21a5c: e5843000 str r3, [r4] <== NOT EXECUTED 21a60: e3e00000 mvn r0, #0 <== NOT EXECUTED 21a64: ea00001a b 21ad4 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 21a68: e1a0200c mov r2, ip 21a6c: e59f0070 ldr r0, [pc, #112] ; 21ae4 21a70: e3a01001 mov r1, #1 21a74: e28d3004 add r3, sp, #4 21a78: e58dc000 str ip, [sp] 21a7c: ebff8dac bl 5134 21a80: e3500000 cmp r0, #0 21a84: 1afffff0 bne 21a4c /* 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); 21a88: e59f304c ldr r3, [pc, #76] ; 21adc 21a8c: e5930000 ldr r0, [r3] 21a90: e5903024 ldr r3, [r0, #36] ; 0x24 21a94: e3530000 cmp r3, #0 21a98: 0a000004 beq 21ab0 21a9c: e593301c ldr r3, [r3, #28] 21aa0: e3530000 cmp r3, #0 21aa4: 12800018 addne r0, r0, #24 21aa8: 11a0e00f movne lr, pc 21aac: 112fff13 bxne r3 rtems_filesystem_root = loc; 21ab0: e59f3024 ldr r3, [pc, #36] ; 21adc 21ab4: e28d4004 add r4, sp, #4 21ab8: e593c000 ldr ip, [r3] 21abc: e8b4000f ldm r4!, {r0, r1, r2, r3} 21ac0: e28cc018 add ip, ip, #24 21ac4: e8ac000f stmia ip!, {r0, r1, r2, r3} 21ac8: e5943000 ldr r3, [r4] 21acc: e58c3000 str r3, [ip] 21ad0: e3a00000 mov r0, #0 return 0; } 21ad4: e28dd018 add sp, sp, #24 21ad8: e8bd8070 pop {r4, r5, r6, pc} 21adc: 00051fe8 .word 0x00051fe8 21ae0: 0005f524 .word 0x0005f524 21ae4: 0005758d .word 0x0005758d 000075fc : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 75fc: 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; 7600: e5935000 ldr r5, [r3] if (!device_name_table) 7604: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 7608: e1a04003 mov r4, r3 760c: e1a09000 mov r9, r0 7610: 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) 7614: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 7618: 159fa090 ldrne sl, [pc, #144] ; 76b0 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) 761c: 1a000019 bne 7688 rtems_set_errno_and_return_minus_one( EFAULT ); 7620: eb0006c9 bl 914c <__errno> <== NOT EXECUTED 7624: e3a0300e mov r3, #14 <== NOT EXECUTED 7628: e5803000 str r3, [r0] <== NOT EXECUTED 762c: e3e00000 mvn r0, #0 <== NOT EXECUTED 7630: 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) 7634: e5957000 ldr r7, [r5] 7638: e2571000 subs r1, r7, #0 763c: 0a00000f beq 7680 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7640: eb000a77 bl a024 7644: e3500000 cmp r0, #0 7648: 1a00000c bne 7680 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 764c: e7d70008 ldrb r0, [r7, r8] 7650: e3500000 cmp r0, #0 7654: 1a000009 bne 7680 /* 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; 7658: e59f3054 ldr r3, [pc, #84] ; 76b4 765c: e5933000 ldr r3, [r3] 7660: e5933028 ldr r3, [r3, #40] ; 0x28 7664: 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; 7668: e59f3048 ldr r3, [pc, #72] ; 76b8 766c: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 7670: e59f3044 ldr r3, [pc, #68] ; 76bc if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 7674: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 7678: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 767c: 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++) { 7680: e2866001 add r6, r6, #1 7684: e2855014 add r5, r5, #20 7688: e59a3000 ldr r3, [sl] 768c: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7690: e1a00009 mov r0, r9 7694: 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++) { 7698: 3affffe5 bcc 7634 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 769c: eb0006aa bl 914c <__errno> 76a0: e3a03002 mov r3, #2 76a4: e5803000 str r3, [r0] 76a8: e3e00000 mvn r0, #0 } 76ac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 76b0: 0000bc84 .word 0x0000bc84 76b4: 0000be6c .word 0x0000be6c 76b8: 0000bdd8 .word 0x0000bdd8 76bc: 0000be10 .word 0x0000be10 00000b64 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b64: 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( b68: e59f7058 ldr r7, [pc, #88] ; bc8 b6c: e5973000 ldr r3, [r7] b70: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b74: 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( b78: e0000396 mul r0, r6, r3 b7c: eb001972 bl 714c <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) b80: e2505000 subs r5, r0, #0 b84: 1a000004 bne b9c rtems_set_errno_and_return_minus_one( ENOMEM ); b88: eb00216f bl 914c <__errno> <== NOT EXECUTED b8c: e3a0300c mov r3, #12 <== NOT EXECUTED b90: e5803000 str r3, [r0] <== NOT EXECUTED b94: e3e00000 mvn r0, #0 <== NOT EXECUTED b98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( b9c: e5972000 ldr r2, [r7] ba0: e3a01000 mov r1, #0 ba4: e0020296 mul r2, r6, r2 ba8: eb002395 bl 9a04 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; bac: e59f3018 ldr r3, [pc, #24] ; bcc temp_mt_entry->mt_fs_root.ops = &devFS_ops; bb0: 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; bb4: 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; bb8: 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; bbc: 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; bc0: e3a00000 mov r0, #0 return 0; } bc4: e8bd80f0 pop {r4, r5, r6, r7, pc} bc8: 0000bc84 .word 0x0000bc84 bcc: 0000bdd8 .word 0x0000bdd8 00000bd0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bd0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} bd4: 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') && bd8: e5d00000 ldrb r0, [r0] bdc: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { be0: e1a05001 mov r5, r1 be4: e58d2000 str r2, [sp] be8: 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') && bec: 1a000008 bne c14 bf0: e5d43001 ldrb r3, [r4, #1] bf4: e3530065 cmp r3, #101 ; 0x65 bf8: 1a000005 bne c14 (path[2] == 'v') && (path[3] == '\0')) bfc: e5d43002 ldrb r3, [r4, #2] c00: e3530076 cmp r3, #118 ; 0x76 c04: 1a000002 bne c14 c08: e5d40003 ldrb r0, [r4, #3] c0c: e3500000 cmp r0, #0 c10: 0a000039 beq cfc return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) c14: e205aa0f and sl, r5, #61440 ; 0xf000 c18: e35a0a02 cmp sl, #8192 ; 0x2000 c1c: 135a0a06 cmpne sl, #24576 ; 0x6000 c20: 03a0a000 moveq sl, #0 c24: 13a0a001 movne sl, #1 c28: 0a000002 beq c38 rtems_set_errno_and_return_minus_one( EINVAL ); c2c: eb002146 bl 914c <__errno> <== NOT EXECUTED c30: e3a03016 mov r3, #22 <== NOT EXECUTED c34: ea000008 b c5c <== 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; c38: e59d3028 ldr r3, [sp, #40] ; 0x28 c3c: e5936000 ldr r6, [r3] if (!device_name_table) c40: e3560000 cmp r6, #0 c44: 13e07000 mvnne r7, #0 c48: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c4c: 159fb0ac ldrne fp, [pc, #172] ; d00 c50: 1a000010 bne c98 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 ); c54: eb00213c bl 914c <__errno> <== NOT EXECUTED c58: e3a0300e mov r3, #14 <== NOT EXECUTED c5c: e5803000 str r3, [r0] <== NOT EXECUTED c60: e3e00000 mvn r0, #0 <== NOT EXECUTED c64: ea000024 b cfc <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) c68: e796300a ldr r3, [r6, sl] c6c: e2531000 subs r1, r3, #0 c70: 0a000005 beq c8c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) c74: eb00240a bl 9ca4 <== NOT EXECUTED c78: e3500000 cmp r0, #0 <== NOT EXECUTED c7c: 1a000003 bne c90 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); c80: eb002131 bl 914c <__errno> <== NOT EXECUTED c84: e3a03011 mov r3, #17 <== NOT EXECUTED c88: eafffff3 b c5c <== NOT EXECUTED c8c: 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++){ c90: e2888001 add r8, r8, #1 c94: e28aa014 add sl, sl, #20 c98: e59b3000 ldr r3, [fp] c9c: 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) ca0: 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++){ ca4: 3affffef bcc c68 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ca8: e3770001 cmn r7, #1 cac: 1a000004 bne cc4 rtems_set_errno_and_return_minus_one( ENOMEM ); cb0: eb002125 bl 914c <__errno> <== NOT EXECUTED cb4: e3a0300c mov r3, #12 <== NOT EXECUTED cb8: e5803000 str r3, [r0] <== NOT EXECUTED cbc: e1a00007 mov r0, r7 <== NOT EXECUTED cc0: ea00000d b cfc <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( cc4: e10f8000 mrs r8, CPSR cc8: e3883080 orr r3, r8, #128 ; 0x80 ccc: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; cd0: e3a02014 mov r2, #20 cd4: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); cd8: 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; cdc: e7864003 str r4, [r6, r3] ce0: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); ce4: eb0024b6 bl 9fc4 device_name_table[slot].major = major; ce8: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; cec: 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); cf0: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( cf4: e129f008 msr CPSR_fc, r8 cf8: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } cfc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} d00: 0000bc84 .word 0x0000bc84 00000d80 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { d80: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED d84: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d88: 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; d8c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; d90: e3a02000 mov r2, #0 <== NOT EXECUTED d94: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d98: 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; d9c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; da0: e283c00c add ip, r3, #12 <== NOT EXECUTED da4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; da8: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dac: e2820008 add r0, r2, #8 <== NOT EXECUTED db0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED db4: 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; db8: 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; dbc: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dc0: eb000ed3 bl 4914 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) dc4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; dc8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dcc: 1b001a3b blne 76c0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } dd0: e28dd01c add sp, sp, #28 <== NOT EXECUTED dd4: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00000dd8 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; dd8: e5903000 ldr r3, [r0] if (!the_dev) ddc: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { de0: 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) de4: 1a000004 bne dfc rtems_set_errno_and_return_minus_one( EFAULT ); de8: eb0020d7 bl 914c <__errno> <== NOT EXECUTED dec: e3a0300e mov r3, #14 <== NOT EXECUTED df0: e5803000 str r3, [r0] <== NOT EXECUTED df4: e3e00000 mvn r0, #0 <== NOT EXECUTED df8: 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; dfc: 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 ); e00: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; e04: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; e08: 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 ); e0c: e5813018 str r3, [r1, #24] e10: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; e14: e3a00000 mov r0, #0 return 0; } e18: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00009e08 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9e08: 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; 9e0c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 9e10: e280c00c add ip, r0, #12 <== NOT EXECUTED 9e14: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; 9e18: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 9e1c: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 9e20: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 9e24: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 9e28: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 9e2c: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 9e30: 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; 9e34: 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( 9e38: e1a0200d mov r2, sp <== NOT EXECUTED 9e3c: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED 9e40: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 9e44: eb0003eb bl adf8 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 9e48: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 9e4c: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 9e50: 1b0004fb blne b244 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 9e54: e28dd01c add sp, sp, #28 <== NOT EXECUTED 9e58: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00002b58 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b58: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b5c: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b60: e92d4030 push {r4, r5, lr} 2b64: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b68: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b6c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2b70: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2b74: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b78: 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) { 2b7c: ea00000a b 2bac <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2b80: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b84: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2b88: e3a01000 mov r1, #0 <== NOT EXECUTED 2b8c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b90: e1a02001 mov r2, r1 <== NOT EXECUTED 2b94: eb0005af bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b98: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b9c: 1b000740 blne 48a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2ba0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ba4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ba8: 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) { 2bac: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 2bb0: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 2bb4: e1510002 cmp r1, r2 <== NOT EXECUTED 2bb8: 1afffff0 bne 2b80 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2bbc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2bc0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001f3c : int dup2( int fildes, int fildes2 ) { 1f3c: e92d4070 push {r4, r5, r6, lr} 1f40: e24dd048 sub sp, sp, #72 ; 0x48 1f44: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f48: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 1f4c: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f50: eb00019b bl 25c4 if ( status == -1 ) 1f54: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f58: e1a0500d mov r5, sp if ( status == -1 ) 1f5c: 0a000009 beq 1f88 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 1f60: e1a0100d mov r1, sp 1f64: e1a00004 mov r0, r4 1f68: eb000195 bl 25c4 if ( status == -1 ) 1f6c: e3700001 cmn r0, #1 1f70: 0a000004 beq 1f88 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 1f74: e1a00006 mov r0, r6 <== NOT EXECUTED 1f78: e1a02004 mov r2, r4 <== NOT EXECUTED 1f7c: e3a01000 mov r1, #0 <== NOT EXECUTED 1f80: eb00008d bl 21bc <== NOT EXECUTED 1f84: ea000000 b 1f8c <== NOT EXECUTED 1f88: e3e00000 mvn r0, #0 } 1f8c: e28dd048 add sp, sp, #72 ; 0x48 1f90: e8bd8070 pop {r4, r5, r6, pc} 00002658 : * 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')) { 2658: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 265c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2660: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2664: e1a04001 mov r4, r1 <== NOT EXECUTED 2668: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 266c: 0a000015 beq 26c8 <== NOT EXECUTED 2670: e59f305c ldr r3, [pc, #92] ; 26d4 <== NOT EXECUTED 2674: e5933000 ldr r3, [r3] <== NOT EXECUTED 2678: e0833000 add r3, r3, r0 <== NOT EXECUTED 267c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2680: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2684: 13a03001 movne r3, #1 <== NOT EXECUTED 2688: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 268c: 0a00000d beq 26c8 <== NOT EXECUTED 2690: e350000a cmp r0, #10 <== NOT EXECUTED 2694: 0a00000b beq 26c8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2698: 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] = '^'; 269c: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26a0: e1a0000d mov r0, sp <== NOT EXECUTED 26a4: e3a01002 mov r1, #2 <== NOT EXECUTED 26a8: 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; 26ac: 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] = '^'; 26b0: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26b4: ebffff4d bl 23f0 <== NOT EXECUTED tty->column += 2; 26b8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 26bc: e2833002 add r3, r3, #2 <== NOT EXECUTED 26c0: 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')) { 26c4: ea000001 b 26d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 26c8: e1a01004 mov r1, r4 <== NOT EXECUTED 26cc: ebffff8b bl 2500 <== NOT EXECUTED } } 26d0: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 26d4: 000171ec .word 0x000171ec 00022090 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 22090: e59f300c ldr r3, [pc, #12] ; 220a4 <== NOT EXECUTED 22094: e5930000 ldr r0, [r3] <== NOT EXECUTED 22098: e3500000 cmp r0, #0 <== NOT EXECUTED 2209c: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 220a0: ea00572d b 37d5c <== NOT EXECUTED 220a4: 0005f1dc .word 0x0005f1dc 000220a8 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 220a8: e59f300c ldr r3, [pc, #12] ; 220bc <== NOT EXECUTED 220ac: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 220b0: e3500000 cmp r0, #0 <== NOT EXECUTED 220b4: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 220b8: ea005727 b 37d5c <== NOT EXECUTED 220bc: 0005f1dc .word 0x0005f1dc 000026d8 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 26d8: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 26dc: 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) { 26e0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 26e4: e1a04000 mov r4, r0 <== NOT EXECUTED 26e8: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 26ec: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 26f0: e3510000 cmp r1, #0 <== NOT EXECUTED 26f4: 0a000062 beq 2884 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 26f8: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 26fc: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 2700: 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)) { 2704: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2708: e2133010 ands r3, r3, #16 <== NOT EXECUTED 270c: 1a00005c bne 2884 <== NOT EXECUTED tty->ccount = 0; 2710: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2714: e1a01004 mov r1, r4 <== NOT EXECUTED 2718: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 271c: ebffffcd bl 2658 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2720: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2724: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 2728: 11a01004 movne r1, r4 <== NOT EXECUTED 272c: 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) 2730: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2734: ea00000c b 276c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2738: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 273c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2740: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2744: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2748: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 274c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2750: 0a000048 beq 2878 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2754: e3570000 cmp r7, #0 <== NOT EXECUTED 2758: 1a000005 bne 2774 <== NOT EXECUTED 275c: e3130010 tst r3, #16 <== NOT EXECUTED 2760: 1a000003 bne 2774 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2764: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2768: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 276c: 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); 2770: eaffffb8 b 2658 <== NOT EXECUTED } else if (c == '\t') { 2774: e3550009 cmp r5, #9 <== NOT EXECUTED 2778: 1a000020 bne 2800 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 277c: 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; 2780: 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)) { 2784: e596c000 ldr ip, [r6] <== NOT EXECUTED 2788: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 278c: ea00000d b 27c8 <== NOT EXECUTED c = tty->cbuf[i++]; 2790: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2794: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2798: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 279c: 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; 27a0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 27a4: 0a000005 beq 27c0 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 27a8: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 27ac: e3100020 tst r0, #32 <== NOT EXECUTED 27b0: 0a000002 beq 27c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 27b4: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 27b8: 12855002 addne r5, r5, #2 <== NOT EXECUTED 27bc: ea000000 b 27c4 <== NOT EXECUTED } else { col++; 27c0: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 27c4: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 27c8: e1520001 cmp r2, r1 <== NOT EXECUTED 27cc: 1affffef bne 2790 <== NOT EXECUTED 27d0: ea000006 b 27f0 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 27d4: e59f00bc ldr r0, [pc, #188] ; 2898 <== NOT EXECUTED 27d8: e3a01001 mov r1, #1 <== NOT EXECUTED 27dc: e1a02004 mov r2, r4 <== NOT EXECUTED 27e0: ebffff02 bl 23f0 <== NOT EXECUTED tty->column--; 27e4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 27ec: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 27f0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27f4: e1530005 cmp r3, r5 <== NOT EXECUTED 27f8: cafffff5 bgt 27d4 <== NOT EXECUTED 27fc: ea00001d b 2878 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2800: e5962000 ldr r2, [r6] <== NOT EXECUTED 2804: e2855001 add r5, r5, #1 <== NOT EXECUTED 2808: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 280c: e3120020 tst r2, #32 <== NOT EXECUTED 2810: 0a000009 beq 283c <== NOT EXECUTED 2814: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2818: 0a000007 beq 283c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 281c: e59f0078 ldr r0, [pc, #120] ; 289c <== NOT EXECUTED 2820: e3a01003 mov r1, #3 <== NOT EXECUTED 2824: e1a02004 mov r2, r4 <== NOT EXECUTED 2828: ebfffef0 bl 23f0 <== NOT EXECUTED if (tty->column) 282c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2830: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2834: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2838: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 283c: e5963000 ldr r3, [r6] <== NOT EXECUTED 2840: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2844: e3130020 tst r3, #32 <== NOT EXECUTED 2848: 0a000002 beq 2858 <== NOT EXECUTED 284c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2850: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2854: 0a000007 beq 2878 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2858: e59f003c ldr r0, [pc, #60] ; 289c <== NOT EXECUTED 285c: e3a01003 mov r1, #3 <== NOT EXECUTED 2860: e1a02004 mov r2, r4 <== NOT EXECUTED 2864: ebfffee1 bl 23f0 <== NOT EXECUTED if (tty->column) 2868: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 286c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2870: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2874: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 2878: e3570000 cmp r7, #0 <== NOT EXECUTED 287c: 1a000001 bne 2888 <== NOT EXECUTED 2880: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2884: e59f6014 ldr r6, [pc, #20] ; 28a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2888: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 288c: e3510000 cmp r1, #0 <== NOT EXECUTED 2890: 1affffa8 bne 2738 <== NOT EXECUTED 2894: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2898: 00017f37 .word 0x00017f37 289c: 00017f35 .word 0x00017f35 28a0: 000171ec .word 0x000171ec 00032ab0 : #include int fchdir( int fd ) { 32ab0: 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 ); 32ab4: e59f315c ldr r3, [pc, #348] ; 32c18 <== NOT EXECUTED 32ab8: e5933000 ldr r3, [r3] <== NOT EXECUTED 32abc: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 32ac0: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 32ac4: 2a000005 bcs 32ae0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 32ac8: e59f314c ldr r3, [pc, #332] ; 32c1c <== NOT EXECUTED 32acc: e5934000 ldr r4, [r3] <== NOT EXECUTED 32ad0: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 32ad4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 32ad8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 32adc: 1a000002 bne 32aec <== NOT EXECUTED 32ae0: eb001450 bl 37c28 <__errno> <== NOT EXECUTED 32ae4: e3a03009 mov r3, #9 <== NOT EXECUTED 32ae8: ea000016 b 32b48 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 32aec: e3130002 tst r3, #2 <== NOT EXECUTED 32af0: 1a000002 bne 32b00 <== NOT EXECUTED 32af4: eb00144b bl 37c28 <__errno> <== NOT EXECUTED 32af8: e3a03016 mov r3, #22 <== NOT EXECUTED 32afc: ea000011 b 32b48 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 32b00: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 32b04: e3530000 cmp r3, #0 <== NOT EXECUTED 32b08: 0a000002 beq 32b18 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 32b0c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 32b10: e3530000 cmp r3, #0 <== NOT EXECUTED 32b14: 1a000002 bne 32b24 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 32b18: eb001442 bl 37c28 <__errno> <== NOT EXECUTED 32b1c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 32b20: ea000008 b 32b48 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 32b24: e2844018 add r4, r4, #24 <== NOT EXECUTED 32b28: e1a00004 mov r0, r4 <== NOT EXECUTED 32b2c: e1a0e00f mov lr, pc <== NOT EXECUTED 32b30: e12fff13 bx r3 <== NOT EXECUTED 32b34: e3500001 cmp r0, #1 <== NOT EXECUTED 32b38: e1a06000 mov r6, r0 <== NOT EXECUTED 32b3c: 0a000003 beq 32b50 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 32b40: eb001438 bl 37c28 <__errno> <== NOT EXECUTED 32b44: e3a03014 mov r3, #20 <== NOT EXECUTED 32b48: e5803000 str r3, [r0] <== NOT EXECUTED 32b4c: ea00001c b 32bc4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 32b50: e59f50c8 ldr r5, [pc, #200] ; 32c20 <== NOT EXECUTED 32b54: e5957000 ldr r7, [r5] <== NOT EXECUTED 32b58: e287c004 add ip, r7, #4 <== NOT EXECUTED 32b5c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32b60: e28de004 add lr, sp, #4 <== NOT EXECUTED 32b64: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 32b68: e59c3000 ldr r3, [ip] <== NOT EXECUTED 32b6c: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 32b70: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32b74: e287e004 add lr, r7, #4 <== NOT EXECUTED 32b78: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 32b7c: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 32b80: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 32b84: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 32b88: e1a01006 mov r1, r6 <== NOT EXECUTED 32b8c: e1a0200e mov r2, lr <== NOT EXECUTED 32b90: e59f008c ldr r0, [pc, #140] ; 32c24 <== NOT EXECUTED 32b94: e28d3018 add r3, sp, #24 <== NOT EXECUTED 32b98: e58de000 str lr, [sp] <== NOT EXECUTED 32b9c: ebff4964 bl 5134 <== NOT EXECUTED 32ba0: e3500000 cmp r0, #0 <== NOT EXECUTED 32ba4: 0a000008 beq 32bcc <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 32ba8: e595c000 ldr ip, [r5] <== NOT EXECUTED 32bac: e28d4004 add r4, sp, #4 <== NOT EXECUTED 32bb0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32bb4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 32bb8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32bbc: e5943000 ldr r3, [r4] <== NOT EXECUTED 32bc0: e58c3000 str r3, [ip] <== NOT EXECUTED 32bc4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 32bc8: ea000010 b 32c10 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 32bcc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 32bd0: e3530000 cmp r3, #0 <== NOT EXECUTED 32bd4: 0a000004 beq 32bec <== NOT EXECUTED 32bd8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 32bdc: e3530000 cmp r3, #0 <== NOT EXECUTED 32be0: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 32be4: 11a0e00f movne lr, pc <== NOT EXECUTED 32be8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 32bec: e59f302c ldr r3, [pc, #44] ; 32c20 <== NOT EXECUTED 32bf0: e28d4018 add r4, sp, #24 <== NOT EXECUTED 32bf4: e593c000 ldr ip, [r3] <== NOT EXECUTED 32bf8: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 32bfc: e28cc004 add ip, ip, #4 <== NOT EXECUTED 32c00: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 32c04: e5943000 ldr r3, [r4] <== NOT EXECUTED 32c08: e58c3000 str r3, [ip] <== NOT EXECUTED 32c0c: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 32c10: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 32c14: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 32c18: 00051d10 .word 0x00051d10 32c1c: 0005f4c8 .word 0x0005f4c8 32c20: 00051fe8 .word 0x00051fe8 32c24: 0005758d .word 0x0005758d 00021cf0 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21cf0: e59f307c ldr r3, [pc, #124] ; 21d74 <== NOT EXECUTED 21cf4: e5932000 ldr r2, [r3] <== NOT EXECUTED 21cf8: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 21cfc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d00: 2a000005 bcs 21d1c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21d04: e59f306c ldr r3, [pc, #108] ; 21d78 <== NOT EXECUTED 21d08: e5933000 ldr r3, [r3] <== NOT EXECUTED 21d0c: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21d10: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21d14: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21d18: 1a000002 bne 21d28 <== NOT EXECUTED 21d1c: eb0057c1 bl 37c28 <__errno> <== NOT EXECUTED 21d20: e3a03009 mov r3, #9 <== NOT EXECUTED 21d24: ea00000a b 21d54 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21d28: e3120004 tst r2, #4 <== NOT EXECUTED 21d2c: 1a000002 bne 21d3c <== NOT EXECUTED 21d30: eb0057bc bl 37c28 <__errno> <== NOT EXECUTED 21d34: e3a03016 mov r3, #22 <== NOT EXECUTED 21d38: ea000005 b 21d54 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 21d3c: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21d40: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21d44: e3520000 cmp r2, #0 <== NOT EXECUTED 21d48: 1a000004 bne 21d60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21d4c: eb0057b5 bl 37c28 <__errno> <== NOT EXECUTED 21d50: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21d54: e5803000 str r3, [r0] <== NOT EXECUTED 21d58: e3e00000 mvn r0, #0 <== NOT EXECUTED 21d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 21d60: e2830018 add r0, r3, #24 <== NOT EXECUTED 21d64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21d68: e1a0e00f mov lr, pc <== NOT EXECUTED 21d6c: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 21d70: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21d74: 00051d10 .word 0x00051d10 21d78: 0005f4c8 .word 0x0005f4c8 00021d7c : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d7c: e59f3088 ldr r3, [pc, #136] ; 21e0c <== NOT EXECUTED 21d80: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21d84: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21d88: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d8c: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21d90: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21d94: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 21d98: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21d9c: 2a000005 bcs 21db8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21da0: e59f3068 ldr r3, [pc, #104] ; 21e10 <== NOT EXECUTED 21da4: e5933000 ldr r3, [r3] <== NOT EXECUTED 21da8: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21dac: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 21db0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 21db4: 1a000002 bne 21dc4 <== NOT EXECUTED 21db8: eb00579a bl 37c28 <__errno> <== NOT EXECUTED 21dbc: e3a03009 mov r3, #9 <== NOT EXECUTED 21dc0: ea00000a b 21df0 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21dc4: e3130004 tst r3, #4 <== NOT EXECUTED 21dc8: 1a000002 bne 21dd8 <== NOT EXECUTED 21dcc: eb005795 bl 37c28 <__errno> <== NOT EXECUTED 21dd0: e3a03016 mov r3, #22 <== NOT EXECUTED 21dd4: ea000005 b 21df0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 21dd8: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 21ddc: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 21de0: e3530000 cmp r3, #0 <== NOT EXECUTED 21de4: 1a000004 bne 21dfc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21de8: eb00578e bl 37c28 <__errno> <== NOT EXECUTED 21dec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21df0: e5803000 str r3, [r0] <== NOT EXECUTED 21df4: e3e00000 mvn r0, #0 <== NOT EXECUTED 21df8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 21dfc: e2800018 add r0, r0, #24 <== NOT EXECUTED 21e00: e1a0e00f mov lr, pc <== NOT EXECUTED 21e04: e12fff13 bx r3 <== NOT EXECUTED } 21e08: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21e0c: 00051d10 .word 0x00051d10 21e10: 0005f4c8 .word 0x0005f4c8 00032c28 : int fcntl( int fd, int cmd, ... ) { 32c28: e92d000e push {r1, r2, r3} 32c2c: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c30: e59f31a4 ldr r3, [pc, #420] ; 32ddc 32c34: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 32c38: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c3c: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 32c40: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 32c44: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 32c48: 2a000005 bcs 32c64 iop = rtems_libio_iop( fd ); 32c4c: e59f118c ldr r1, [pc, #396] ; 32de0 32c50: e591c000 ldr ip, [r1] 32c54: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 32c58: e5940014 ldr r0, [r4, #20] 32c5c: e3100c01 tst r0, #256 ; 0x100 32c60: 1a000002 bne 32c70 32c64: eb0013ef bl 37c28 <__errno> <== NOT EXECUTED 32c68: e3a03009 mov r3, #9 <== NOT EXECUTED 32c6c: ea000045 b 32d88 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 32c70: e3570009 cmp r7, #9 32c74: 979ff107 ldrls pc, [pc, r7, lsl #2] 32c78: ea000040 b 32d80 32c7c: 00032ca4 .word 0x00032ca4 <== NOT EXECUTED 32c80: 00032d10 .word 0x00032d10 <== NOT EXECUTED 32c84: 00032d1c .word 0x00032d1c <== NOT EXECUTED 32c88: 00032d3c .word 0x00032d3c <== NOT EXECUTED 32c8c: 00032d48 .word 0x00032d48 <== NOT EXECUTED 32c90: 00032d74 .word 0x00032d74 <== NOT EXECUTED 32c94: 00032d74 .word 0x00032d74 <== NOT EXECUTED 32c98: 00032d74 .word 0x00032d74 <== NOT EXECUTED 32c9c: 00032d74 .word 0x00032d74 <== NOT EXECUTED 32ca0: 00032d74 .word 0x00032d74 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 32ca4: e5922000 ldr r2, [r2] if ( fd2 ) 32ca8: e3520000 cmp r2, #0 32cac: 0a000003 beq 32cc0 diop = rtems_libio_iop( fd2 ); 32cb0: e1520003 cmp r2, r3 <== NOT EXECUTED 32cb4: 23a0c000 movcs ip, #0 <== NOT EXECUTED 32cb8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 32cbc: ea000002 b 32ccc <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 32cc0: ebff4a34 bl 5598 if ( diop == 0 ) { 32cc4: e250c000 subs ip, r0, #0 32cc8: 0a00003e beq 32dc8 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32ccc: e2846018 add r6, r4, #24 32cd0: e8b6000f ldm r6!, {r0, r1, r2, r3} 32cd4: e28c5018 add r5, ip, #24 32cd8: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 32cdc: e59f30fc ldr r3, [pc, #252] ; 32de0 32ce0: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32ce4: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 32ce8: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 32cec: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 32cf0: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 32cf4: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 32cf8: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 32cfc: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 32d00: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 32d04: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 32d08: e1a05343 asr r5, r3, #6 32d0c: ea00001f b 32d90 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 32d10: e1a055a0 lsr r5, r0, #11 32d14: e2055001 and r5, r5, #1 32d18: ea00001e b 32d98 * 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: e5925000 ldr r5, [r2] 32d20: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 32d24: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 32d28: 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; 32d2c: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 32d30: 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 ) ) 32d34: 0a000017 beq 32d98 32d38: ea00000b b 32d6c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 32d3c: ebff49ac bl 53f4 32d40: e1a05000 mov r5, r0 32d44: ea000011 b 32d90 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 32d48: e5920000 ldr r0, [r2] 32d4c: ebff4a3e bl 564c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 32d50: e5943014 ldr r3, [r4, #20] 32d54: e59f2088 ldr r2, [pc, #136] ; 32de4 32d58: e3c33c02 bic r3, r3, #512 ; 0x200 32d5c: e0002002 and r2, r0, r2 32d60: e3c33001 bic r3, r3, #1 32d64: e1823003 orr r3, r2, r3 32d68: e5843014 str r3, [r4, #20] 32d6c: e3a05000 mov r5, #0 32d70: ea000008 b 32d98 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 32d74: eb0013ab bl 37c28 <__errno> 32d78: e3a03086 mov r3, #134 ; 0x86 32d7c: ea000001 b 32d88 ret = -1; break; default: errno = EINVAL; 32d80: eb0013a8 bl 37c28 <__errno> 32d84: e3a03016 mov r3, #22 32d88: e5803000 str r3, [r0] 32d8c: ea00000d b 32dc8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 32d90: e3550000 cmp r5, #0 32d94: ba00000c blt 32dcc if (iop->handlers->fcntl_h) { 32d98: e594303c ldr r3, [r4, #60] ; 0x3c 32d9c: e5933030 ldr r3, [r3, #48] ; 0x30 32da0: e3530000 cmp r3, #0 32da4: 0a000008 beq 32dcc int err = (*iop->handlers->fcntl_h)( cmd, iop ); 32da8: e1a01004 mov r1, r4 32dac: e1a00007 mov r0, r7 32db0: e1a0e00f mov lr, pc 32db4: e12fff13 bx r3 if (err) { 32db8: e2504000 subs r4, r0, #0 32dbc: 0a000002 beq 32dcc errno = err; 32dc0: eb001398 bl 37c28 <__errno> <== NOT EXECUTED 32dc4: e5804000 str r4, [r0] <== NOT EXECUTED 32dc8: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 32dcc: e1a00005 mov r0, r5 32dd0: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 32dd4: e28dd00c add sp, sp, #12 32dd8: e12fff1e bx lr 32ddc: 00051d10 .word 0x00051d10 32de0: 0005f4c8 .word 0x0005f4c8 32de4: 00000201 .word 0x00000201 0000a3b8 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3b8: e59f3324 ldr r3, [pc, #804] ; a6e4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a3bc: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} a3c0: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3c4: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a3c8: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, a3cc: e1a02001 mov r2, r1 a3d0: e5930000 ldr r0, [r3] a3d4: ebffe79f bl 4258 a3d8: e250a000 subs sl, r0, #0 a3dc: 13e06003 mvnne r6, #3 a3e0: 1a0000bd bne a6dc RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; a3e4: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { a3e8: e3540000 cmp r4, #0 <== NOT EXECUTED a3ec: 1a00003e bne a4ec <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a3f0: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED a3f4: ebfff9ed bl 8bb0 <== NOT EXECUTED if (pipe == NULL) a3f8: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a3fc: e1a05000 mov r5, r0 <== NOT EXECUTED a400: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) a404: 03e0600b mvneq r6, #11 <== NOT EXECUTED a408: 0a000045 beq a524 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); a40c: e1a0100a mov r1, sl <== NOT EXECUTED a410: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED a414: eb0006ac bl becc <== NOT EXECUTED pipe->Size = PIPE_BUF; a418: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); a41c: 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; a420: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); a424: ebfff9e1 bl 8bb0 <== NOT EXECUTED if (! pipe->Buffer) a428: 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); a42c: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) a430: 03e0600b mvneq r6, #11 <== NOT EXECUTED a434: 0a000029 beq a4e0 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( a438: e59f62a8 ldr r6, [pc, #680] ; a6e8 <== NOT EXECUTED a43c: e59f02a8 ldr r0, [pc, #680] ; a6ec <== NOT EXECUTED a440: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a444: e1a0100a mov r1, sl <== NOT EXECUTED a448: e1830000 orr r0, r3, r0 <== NOT EXECUTED a44c: e1a0200a mov r2, sl <== NOT EXECUTED a450: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED a454: eb000164 bl a9ec <== NOT EXECUTED a458: e2501000 subs r1, r0, #0 <== NOT EXECUTED a45c: 1a00001c bne a4d4 <== 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( a460: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a464: e59f0284 ldr r0, [pc, #644] ; a6f0 <== NOT EXECUTED a468: e1a02001 mov r2, r1 <== NOT EXECUTED a46c: e1830000 orr r0, r3, r0 <== NOT EXECUTED a470: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED a474: eb00015c bl a9ec <== NOT EXECUTED a478: e2503000 subs r3, r0, #0 <== NOT EXECUTED a47c: 1a000012 bne a4cc <== 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( a480: e5d62000 ldrb r2, [r6] <== NOT EXECUTED a484: e59f0268 ldr r0, [pc, #616] ; a6f4 <== NOT EXECUTED a488: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED a48c: e1820000 orr r0, r2, r0 <== NOT EXECUTED a490: e3a01001 mov r1, #1 <== NOT EXECUTED a494: e3a02010 mov r2, #16 <== NOT EXECUTED a498: e58dc000 str ip, [sp] <== NOT EXECUTED a49c: ebffe6db bl 4010 <== NOT EXECUTED a4a0: e3500000 cmp r0, #0 <== NOT EXECUTED a4a4: 1a000006 bne a4c4 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a4a8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED a4ac: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED a4b0: e2833001 add r3, r3, #1 <== NOT EXECUTED a4b4: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; a4b8: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED a4bc: 05c63000 strbeq r3, [r6] <== NOT EXECUTED a4c0: ea000009 b a4ec <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); a4c4: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED a4c8: eb000175 bl aaa4 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); a4cc: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED a4d0: eb000173 bl aaa4 <== NOT EXECUTED err_rbar: free(pipe->Buffer); a4d4: e5950000 ldr r0, [r5] <== NOT EXECUTED a4d8: ebfff874 bl 86b0 <== NOT EXECUTED a4dc: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); a4e0: e1a00005 mov r0, r5 <== NOT EXECUTED a4e4: ebfff871 bl 86b0 <== NOT EXECUTED a4e8: ea00000d b a524 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a4ec: e3a01000 mov r1, #0 <== NOT EXECUTED a4f0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a4f4: e1a02001 mov r2, r1 <== NOT EXECUTED a4f8: ebffe756 bl 4258 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { a4fc: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a500: e3500000 cmp r0, #0 <== NOT EXECUTED a504: 01a06000 moveq r6, r0 <== NOT EXECUTED a508: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { a50c: e3530000 cmp r3, #0 <== NOT EXECUTED a510: 1a000003 bne a524 <== NOT EXECUTED if (err) a514: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; a518: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); a51c: 11a00004 movne r0, r4 <== NOT EXECUTED a520: 1bffff58 blne a288 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); a524: e59f31b8 ldr r3, [pc, #440] ; a6e4 <== NOT EXECUTED a528: e5930000 ldr r0, [r3] <== NOT EXECUTED a52c: ebffe78f bl 4370 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) a530: e3560000 cmp r6, #0 <== NOT EXECUTED a534: 1a000068 bne a6dc <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { a538: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED a53c: e2023006 and r3, r2, #6 <== NOT EXECUTED a540: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; a544: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { a548: 0a000024 beq a5e0 <== NOT EXECUTED a54c: e3530006 cmp r3, #6 <== NOT EXECUTED a550: 0a000046 beq a670 <== NOT EXECUTED a554: e3530002 cmp r3, #2 <== NOT EXECUTED a558: 1a000058 bne a6c0 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a55c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a560: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a564: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a568: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) a56c: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; a570: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a574: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a578: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED a57c: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a580: 0b00015f bleq ab04 <== NOT EXECUTED if (pipe->Writers == 0) { a584: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a588: e3530000 cmp r3, #0 <== NOT EXECUTED a58c: 1a00004b bne a6c0 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) a590: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED a594: e3130001 tst r3, #1 <== NOT EXECUTED a598: 1a000048 bne a6c0 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; a59c: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); a5a0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a5a4: ebffe771 bl 4370 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a5a8: e3a01000 mov r1, #0 <== NOT EXECUTED a5ac: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a5b0: eb000169 bl ab5c <== NOT EXECUTED a5b4: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a5b8: 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)) a5bc: 1a000042 bne a6cc <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a5c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a5c4: ebffe723 bl 4258 <== NOT EXECUTED a5c8: e3500000 cmp r0, #0 <== NOT EXECUTED a5cc: 1a00003e bne a6cc <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); a5d0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED a5d4: e1550003 cmp r5, r3 <== NOT EXECUTED a5d8: 0afffff0 beq a5a0 <== NOT EXECUTED a5dc: ea000037 b a6c0 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a5e0: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a5e4: e3530000 cmp r3, #0 <== NOT EXECUTED a5e8: 1a000002 bne a5f8 <== NOT EXECUTED a5ec: e3120001 tst r2, #1 <== NOT EXECUTED a5f0: 13e06005 mvnne r6, #5 <== NOT EXECUTED a5f4: 1a000035 bne a6d0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) a5f8: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a5fc: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a600: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a604: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) a608: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; a60c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a610: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a614: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED a618: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a61c: 0b000138 bleq ab04 <== NOT EXECUTED if (pipe->Readers == 0) { a620: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a624: e3530000 cmp r3, #0 <== NOT EXECUTED a628: 1a000024 bne a6c0 <== NOT EXECUTED prevCounter = pipe->readerCounter; a62c: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); a630: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a634: ebffe74d bl 4370 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) a638: e3a01000 mov r1, #0 <== NOT EXECUTED a63c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a640: eb000145 bl ab5c <== NOT EXECUTED a644: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a648: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) a64c: 1a00001e bne a6cc <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) a650: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a654: ebffe6ff bl 4258 <== NOT EXECUTED a658: e3500000 cmp r0, #0 <== NOT EXECUTED a65c: 1a00001a bne a6cc <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); a660: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED a664: e1550003 cmp r5, r3 <== NOT EXECUTED a668: 0afffff0 beq a630 <== NOT EXECUTED a66c: ea000013 b a6c0 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) a670: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a674: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a678: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a67c: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) a680: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a684: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) a688: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a68c: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED a690: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a694: 0b00011a bleq ab04 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) a698: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a69c: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a6a0: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a6a4: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) a6a8: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; a6ac: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) a6b0: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a6b4: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED a6b8: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED a6bc: 0b000110 bleq ab04 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); a6c0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a6c4: ebffe729 bl 4370 <== NOT EXECUTED return 0; a6c8: ea000003 b a6dc <== NOT EXECUTED a6cc: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); a6d0: e1a00007 mov r0, r7 <== NOT EXECUTED a6d4: e1a01008 mov r1, r8 <== NOT EXECUTED a6d8: ebfffef7 bl a2bc <== NOT EXECUTED return err; } a6dc: e1a00006 mov r0, r6 a6e0: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} a6e4: 00018524 .word 0x00018524 a6e8: 000171d8 .word 0x000171d8 a6ec: 50497200 .word 0x50497200 a6f0: 50497700 .word 0x50497700 a6f4: 50497300 .word 0x50497300 0000867c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 867c: e59f3030 ldr r3, [pc, #48] ; 86b4 <== NOT EXECUTED 8680: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 8684: ea000006 b 86a4 <== 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 ) { 8688: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 868c: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8690: e15c0000 cmp ip, r0 <== NOT EXECUTED 8694: 1a000001 bne 86a0 <== NOT EXECUTED 8698: e3a00001 mov r0, #1 <== NOT EXECUTED 869c: 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 ) { 86a0: e5922000 ldr r2, [r2] <== NOT EXECUTED 86a4: e1520003 cmp r2, r3 <== NOT EXECUTED 86a8: 1afffff6 bne 8688 <== NOT EXECUTED 86ac: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 86b0: e12fff1e bx lr <== NOT EXECUTED 86b4: 0005f50c .word 0x0005f50c 00002410 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2410: e59f3100 ldr r3, [pc, #256] ; 2518 2414: e5933000 ldr r3, [r3] 2418: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 241c: 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); 2420: 2a000005 bcs 243c iop = rtems_libio_iop(fd); 2424: e59f30f0 ldr r3, [pc, #240] ; 251c 2428: e5933000 ldr r3, [r3] 242c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2430: e5903014 ldr r3, [r0, #20] 2434: e3130c01 tst r3, #256 ; 0x100 2438: 1a000002 bne 2448 243c: eb002ddb bl dbb0 <__errno> 2440: e3a03009 mov r3, #9 2444: ea000003 b 2458 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2448: e3130002 tst r3, #2 244c: 1a000004 bne 2464 2450: eb002dd6 bl dbb0 <__errno> <== NOT EXECUTED 2454: e3a03016 mov r3, #22 <== NOT EXECUTED 2458: e5803000 str r3, [r0] 245c: e3e00000 mvn r0, #0 2460: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2464: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2468: e351000b cmp r1, #11 246c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2470: ea000023 b 2504 2474: 000024a4 .word 0x000024a4 <== NOT EXECUTED 2478: 000024ac .word 0x000024ac <== NOT EXECUTED 247c: 000024b4 .word 0x000024b4 <== NOT EXECUTED 2480: 000024bc .word 0x000024bc <== NOT EXECUTED 2484: 000024c4 .word 0x000024c4 <== NOT EXECUTED 2488: 000024cc .word 0x000024cc <== NOT EXECUTED 248c: 000024d4 .word 0x000024d4 <== NOT EXECUTED 2490: 000024dc .word 0x000024dc <== NOT EXECUTED 2494: 000024e4 .word 0x000024e4 <== NOT EXECUTED 2498: 000024ec .word 0x000024ec <== NOT EXECUTED 249c: 000024f4 .word 0x000024f4 <== NOT EXECUTED 24a0: 000024fc .word 0x000024fc <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 24a4: e5930038 ldr r0, [r3, #56] ; 0x38 break; 24a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 24ac: e593003c ldr r0, [r3, #60] ; 0x3c break; 24b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 24b4: e5930040 ldr r0, [r3, #64] ; 0x40 break; 24b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 24bc: e5930044 ldr r0, [r3, #68] ; 0x44 break; 24c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 24c4: e5930048 ldr r0, [r3, #72] ; 0x48 break; 24c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 24cc: e593004c ldr r0, [r3, #76] ; 0x4c break; 24d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 24d4: e5930054 ldr r0, [r3, #84] ; 0x54 break; 24d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 24dc: e5930058 ldr r0, [r3, #88] ; 0x58 break; 24e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 24e4: e5930064 ldr r0, [r3, #100] ; 0x64 break; 24e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 24ec: e5930050 ldr r0, [r3, #80] ; 0x50 break; 24f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 24f4: e593005c ldr r0, [r3, #92] ; 0x5c break; 24f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 24fc: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2500: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2504: eb002da9 bl dbb0 <__errno> 2508: e3a03016 mov r3, #22 250c: e5803000 str r3, [r0] 2510: e3e00000 mvn r0, #0 break; } return return_value; } 2514: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2518: 0001a9c0 .word 0x0001a9c0 251c: 0001c2f0 .word 0x0001c2f0 000086b0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 86b0: e59f3088 ldr r3, [pc, #136] ; 8740 86b4: e593200c ldr r2, [r3, #12] 86b8: e92d4030 push {r4, r5, lr} 86bc: e2822001 add r2, r2, #1 if ( !ptr ) 86c0: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 86c4: e583200c str r2, [r3, #12] if ( !ptr ) 86c8: 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()) && 86cc: e59f3070 ldr r3, [pc, #112] ; 8744 86d0: e5933000 ldr r3, [r3] 86d4: e3530003 cmp r3, #3 86d8: 1a000005 bne 86f4 86dc: eb000113 bl 8b30 86e0: e3500000 cmp r0, #0 86e4: 1a000002 bne 86f4 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 86e8: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 86ec: 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); 86f0: ea000121 b 8b7c <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 86f4: e59f304c ldr r3, [pc, #76] ; 8748 86f8: e5933000 ldr r3, [r3] 86fc: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 8700: 11a00004 movne r0, r4 8704: 11a0e00f movne lr, pc 8708: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 870c: e59f5038 ldr r5, [pc, #56] ; 874c 8710: e1a01004 mov r1, r4 8714: e5950000 ldr r0, [r5] 8718: eb000472 bl 98e8 <_Protected_heap_Free> 871c: e3500000 cmp r0, #0 8720: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 8724: 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", 8728: e59f0020 ldr r0, [pc, #32] ; 8750 <== NOT EXECUTED 872c: e2822018 add r2, r2, #24 <== NOT EXECUTED 8730: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 8734: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8738: 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", 873c: eaffe5c2 b 1e4c <== NOT EXECUTED 8740: 000185b4 .word 0x000185b4 8744: 000188b0 .word 0x000188b0 8748: 00018408 .word 0x00018408 874c: 00016ffc .word 0x00016ffc 8750: 000180f2 .word 0x000180f2 0002307c : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2307c: e59f3058 ldr r3, [pc, #88] ; 230dc <== NOT EXECUTED 23080: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 23084: e92d4010 push {r4, lr} <== NOT EXECUTED 23088: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2308c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 23090: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 23094: e3530000 cmp r3, #0 <== NOT EXECUTED 23098: 0a000004 beq 230b0 <== NOT EXECUTED 2309c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 230a0: e3530000 cmp r3, #0 <== NOT EXECUTED 230a4: 12800004 addne r0, r0, #4 <== NOT EXECUTED 230a8: 11a0e00f movne lr, pc <== NOT EXECUTED 230ac: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 230b0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 230b4: e3530000 cmp r3, #0 <== NOT EXECUTED 230b8: 0a000004 beq 230d0 <== NOT EXECUTED 230bc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 230c0: e3530000 cmp r3, #0 <== NOT EXECUTED 230c4: 12840018 addne r0, r4, #24 <== NOT EXECUTED 230c8: 11a0e00f movne lr, pc <== NOT EXECUTED 230cc: 112fff13 bxne r3 <== NOT EXECUTED free(env); 230d0: e1a00004 mov r0, r4 <== NOT EXECUTED } } 230d4: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 230d8: eaff8848 b 5200 <== NOT EXECUTED 230dc: 0005f524 .word 0x0005f524 000164d0 : int fstat( int fd, struct stat *sbuf ) { 164d0: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 164d4: e2515000 subs r5, r1, #0 164d8: 1a000002 bne 164e8 rtems_set_errno_and_return_minus_one( EFAULT ); 164dc: ebffd430 bl b5a4 <__errno> 164e0: e3a0300e mov r3, #14 164e4: ea000014 b 1653c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 164e8: e59f3080 ldr r3, [pc, #128] ; 16570 164ec: e5933000 ldr r3, [r3] 164f0: e1500003 cmp r0, r3 164f4: 2a000008 bcs 1651c 164f8: e59f3074 ldr r3, [pc, #116] ; 16574 164fc: e5934000 ldr r4, [r3] 16500: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 16504: e5943014 ldr r3, [r4, #20] 16508: e3130c01 tst r3, #256 ; 0x100 1650c: 0a000002 beq 1651c if ( !iop->handlers ) 16510: e594303c ldr r3, [r4, #60] ; 0x3c 16514: e3530000 cmp r3, #0 16518: 1a000002 bne 16528 rtems_set_errno_and_return_minus_one( EBADF ); 1651c: ebffd420 bl b5a4 <__errno> 16520: e3a03009 mov r3, #9 16524: ea000004 b 1653c if ( !iop->handlers->fstat_h ) 16528: e5933018 ldr r3, [r3, #24] 1652c: e3530000 cmp r3, #0 16530: 1a000004 bne 16548 rtems_set_errno_and_return_minus_one( ENOTSUP ); 16534: ebffd41a bl b5a4 <__errno> <== NOT EXECUTED 16538: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1653c: e5803000 str r3, [r0] 16540: e3e00000 mvn r0, #0 16544: 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) ); 16548: e3a01000 mov r1, #0 1654c: e3a02048 mov r2, #72 ; 0x48 16550: e1a00005 mov r0, r5 16554: ebffd65c bl becc return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 16558: e2840018 add r0, r4, #24 1655c: e1a01005 mov r1, r5 16560: e594303c ldr r3, [r4, #60] ; 0x3c 16564: e1a0e00f mov lr, pc 16568: e593f018 ldr pc, [r3, #24] } 1656c: e8bd8030 pop {r4, r5, pc} 16570: 00016ff0 .word 0x00016ff0 16574: 000185a8 .word 0x000185a8 00021ec8 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21ec8: e59f307c ldr r3, [pc, #124] ; 21f4c 21ecc: e5933000 ldr r3, [r3] 21ed0: e1500003 cmp r0, r3 #include int fsync( int fd ) { 21ed4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21ed8: 2a00000d bcs 21f14 iop = rtems_libio_iop( fd ); 21edc: e59f306c ldr r3, [pc, #108] ; 21f50 21ee0: e5933000 ldr r3, [r3] 21ee4: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 21ee8: e5903014 ldr r3, [r0, #20] 21eec: e3130c01 tst r3, #256 ; 0x100 21ef0: 0a000007 beq 21f14 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21ef4: e3130004 tst r3, #4 21ef8: 1a000002 bne 21f08 21efc: eb005749 bl 37c28 <__errno> 21f00: e3a03016 mov r3, #22 21f04: ea00000a b 21f34 /* * Now process the fsync(). */ if ( !iop->handlers ) 21f08: e590303c ldr r3, [r0, #60] ; 0x3c 21f0c: e3530000 cmp r3, #0 21f10: 1a000002 bne 21f20 rtems_set_errno_and_return_minus_one( EBADF ); 21f14: eb005743 bl 37c28 <__errno> <== NOT EXECUTED 21f18: e3a03009 mov r3, #9 <== NOT EXECUTED 21f1c: ea000004 b 21f34 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 21f20: e5933028 ldr r3, [r3, #40] ; 0x28 21f24: e3530000 cmp r3, #0 21f28: 1a000004 bne 21f40 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21f2c: eb00573d bl 37c28 <__errno> 21f30: e3a03086 mov r3, #134 ; 0x86 21f34: e5803000 str r3, [r0] 21f38: e3e00000 mvn r0, #0 21f3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 21f40: e1a0e00f mov lr, pc 21f44: e12fff13 bx r3 } 21f48: e49df004 pop {pc} ; (ldr pc, [sp], #4) 21f4c: 00051d10 .word 0x00051d10 21f50: 0005f4c8 .word 0x0005f4c8 00008754 : int ftruncate( int fd, off_t length ) { 8754: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8758: e59f30d4 ldr r3, [pc, #212] ; 8834 875c: e5933000 ldr r3, [r3] 8760: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 8764: e24dd014 sub sp, sp, #20 8768: e1a05001 mov r5, r1 876c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8770: 2a000005 bcs 878c iop = rtems_libio_iop( fd ); 8774: e59f30bc ldr r3, [pc, #188] ; 8838 8778: e5934000 ldr r4, [r3] 877c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 8780: e5943014 ldr r3, [r4, #20] 8784: e3130c01 tst r3, #256 ; 0x100 8788: 1a000002 bne 8798 878c: eb000b84 bl b5a4 <__errno> <== NOT EXECUTED 8790: e3a03009 mov r3, #9 <== NOT EXECUTED 8794: ea00001c b 880c <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8798: e284e018 add lr, r4, #24 879c: e8be000f ldm lr!, {r0, r1, r2, r3} 87a0: e1a0c00d mov ip, sp 87a4: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 87a8: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 87ac: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 87b0: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 87b4: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 87b8: 0a000011 beq 8804 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 87bc: e1a0000d mov r0, sp 87c0: e1a0e00f mov lr, pc 87c4: e12fff13 bx r3 87c8: e3500001 cmp r0, #1 87cc: 1a000002 bne 87dc rtems_set_errno_and_return_minus_one( EISDIR ); 87d0: eb000b73 bl b5a4 <__errno> 87d4: e3a03015 mov r3, #21 87d8: ea00000b b 880c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 87dc: e5943014 ldr r3, [r4, #20] 87e0: e3130004 tst r3, #4 87e4: 1a000002 bne 87f4 87e8: eb000b6d bl b5a4 <__errno> <== NOT EXECUTED 87ec: e3a03016 mov r3, #22 <== NOT EXECUTED 87f0: ea000005 b 880c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 87f4: e594303c ldr r3, [r4, #60] ; 0x3c 87f8: e5933020 ldr r3, [r3, #32] 87fc: e3530000 cmp r3, #0 8800: 1a000004 bne 8818 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8804: eb000b66 bl b5a4 <__errno> <== NOT EXECUTED 8808: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 880c: e5803000 str r3, [r0] 8810: e3e00000 mvn r0, #0 8814: ea000004 b 882c return (*iop->handlers->ftruncate_h)( iop, length ); 8818: e1a00004 mov r0, r4 881c: e1a01005 mov r1, r5 8820: e1a02006 mov r2, r6 8824: e1a0e00f mov lr, pc 8828: e12fff13 bx r3 } 882c: e28dd014 add sp, sp, #20 8830: e8bd8070 pop {r4, r5, r6, pc} 8834: 00016ff0 .word 0x00016ff0 8838: 000185a8 .word 0x000185a8 000516e8 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 516e8: e59f30a8 ldr r3, [pc, #168] ; 51798 516ec: e5933000 ldr r3, [r3] 516f0: e1500003 cmp r0, r3 516f4: 359f30a0 ldrcc r3, [pc, #160] ; 5179c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 516f8: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 516fc: 35934000 ldrcc r4, [r3] 51700: 23a04000 movcs r4, #0 51704: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51708: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5170c: e24dd014 sub sp, sp, #20 51710: e1a06001 mov r6, r1 51714: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51718: e8be000f ldm lr!, {r0, r1, r2, r3} 5171c: e1a0c00d mov ip, sp 51720: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 51724: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51728: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 5172c: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 51730: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 51734: 0a00000d beq 51770 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 51738: e1a0000d mov r0, sp 5173c: e1a0e00f mov lr, pc 51740: e12fff13 bx r3 51744: e3500001 cmp r0, #1 51748: 0a000004 beq 51760 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5174c: ebff9935 bl 37c28 <__errno> 51750: e3a03014 mov r3, #20 51754: e5803000 str r3, [r0] 51758: e3e00000 mvn r0, #0 5175c: ea00000b b 51790 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 51760: e594303c ldr r3, [r4, #60] ; 0x3c 51764: e5933008 ldr r3, [r3, #8] 51768: e3530000 cmp r3, #0 5176c: 1a000002 bne 5177c rtems_set_errno_and_return_minus_one( ENOTSUP ); 51770: ebff992c bl 37c28 <__errno> <== NOT EXECUTED 51774: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 51778: eafffff5 b 51754 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5177c: e1a00004 mov r0, r4 51780: e1a01006 mov r1, r6 51784: e1a02005 mov r2, r5 51788: e1a0e00f mov lr, pc 5178c: e12fff13 bx r3 } 51790: e28dd014 add sp, sp, #20 51794: e8bd8070 pop {r4, r5, r6, pc} 51798: 00051d10 .word 0x00051d10 5179c: 0005f4c8 .word 0x0005f4c8 00022064 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 22064: e59f3008 ldr r3, [pc, #8] ; 22074 <== NOT EXECUTED 22068: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 2206c: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 22070: e12fff1e bx lr <== NOT EXECUTED 22074: 00051fe8 .word 0x00051fe8 0002266c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2266c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22670: e59da01c ldr sl, [sp, #28] 22674: e1a06000 mov r6, r0 22678: e1a07001 mov r7, r1 2267c: e1a04002 mov r4, r2 22680: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 22684: ebffffb7 bl 22568 if ((fp = fopen("/etc/group", "r")) == NULL) { 22688: e59f00a4 ldr r0, [pc, #164] ; 22734 2268c: e59f10a4 ldr r1, [pc, #164] ; 22738 22690: eb0057d4 bl 385e8 22694: e2505000 subs r5, r0, #0 22698: 1a000003 bne 226ac errno = EINVAL; 2269c: eb005561 bl 37c28 <__errno> <== NOT EXECUTED 226a0: e3a03016 mov r3, #22 <== NOT EXECUTED 226a4: e5803000 str r3, [r0] <== NOT EXECUTED 226a8: ea00000c b 226e0 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 226ac: e1a01004 mov r1, r4 226b0: e1a02008 mov r2, r8 226b4: e1a0300a mov r3, sl 226b8: e1a00005 mov r0, r5 226bc: ebfffef2 bl 2228c 226c0: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 226c4: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 226c8: 1a000006 bne 226e8 errno = EINVAL; 226cc: eb005555 bl 37c28 <__errno> <== NOT EXECUTED 226d0: e3a03016 mov r3, #22 <== NOT EXECUTED 226d4: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 226d8: e1a00005 mov r0, r5 <== NOT EXECUTED 226dc: eb00559e bl 37d5c <== NOT EXECUTED 226e0: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 226e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 226e8: e3560000 cmp r6, #0 226ec: 0a000004 beq 22704 match = (strcmp(grp->gr_name, name) == 0); 226f0: e5940000 ldr r0, [r4] 226f4: eb006d5d bl 3dc70 226f8: e2700001 rsbs r0, r0, #1 226fc: 33a00000 movcc r0, #0 22700: ea000003 b 22714 } else { match = (grp->gr_gid == gid); 22704: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22708: e1500007 cmp r0, r7 <== NOT EXECUTED 2270c: 13a00000 movne r0, #0 <== NOT EXECUTED 22710: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 22714: e3500000 cmp r0, #0 22718: 0affffe3 beq 226ac fclose(fp); 2271c: e1a00005 mov r0, r5 22720: eb00558d bl 37d5c *result = grp; 22724: e59d3020 ldr r3, [sp, #32] 22728: e3a00000 mov r0, #0 2272c: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22730: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 22734: 00055f90 .word 0x00055f90 22738: 00056d08 .word 0x00056d08 000223c4 : return NULL; return p; } struct group *getgrent(void) { 223c4: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 223c8: e59f402c ldr r4, [pc, #44] ; 223fc <== NOT EXECUTED 223cc: e5940000 ldr r0, [r4] <== NOT EXECUTED 223d0: e3500000 cmp r0, #0 <== NOT EXECUTED 223d4: 0a000006 beq 223f4 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 223d8: e2841008 add r1, r4, #8 <== NOT EXECUTED 223dc: e2842018 add r2, r4, #24 <== NOT EXECUTED 223e0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 223e4: ebffffa8 bl 2228c <== NOT EXECUTED 223e8: e3500000 cmp r0, #0 <== NOT EXECUTED 223ec: 12840008 addne r0, r4, #8 <== NOT EXECUTED 223f0: 18bd8010 popne {r4, pc} <== NOT EXECUTED 223f4: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 223f8: e8bd8010 pop {r4, pc} <== NOT EXECUTED 223fc: 0005f1dc .word 0x0005f1dc 00022770 : struct group *getgrgid( gid_t gid ) { 22770: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22774: e59f1028 ldr r1, [pc, #40] ; 227a4 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 22778: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 2277c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22780: e2812010 add r2, r1, #16 <== NOT EXECUTED 22784: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22788: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 2278c: e58dc000 str ip, [sp] <== NOT EXECUTED 22790: ebffffe9 bl 2273c <== NOT EXECUTED 22794: e3500000 cmp r0, #0 <== NOT EXECUTED 22798: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 2279c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 227a0: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 227a4: 0005f1e4 .word 0x0005f1e4 0002273c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2273c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22740: e1a0c002 mov ip, r2 <== NOT EXECUTED 22744: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 22748: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2274c: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 22750: e1a0300c mov r3, ip <== NOT EXECUTED 22754: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22758: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2275c: e1a0200e mov r2, lr <== NOT EXECUTED 22760: e3a00000 mov r0, #0 <== NOT EXECUTED 22764: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22768: ebffffbf bl 2266c <== NOT EXECUTED } 2276c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 0002037c : */ pid_t getpid( void ) { return _Objects_Local_node; } 2037c: e3a00001 mov r0, #1 <== NOT EXECUTED 20380: e12fff1e bx lr <== NOT EXECUTED 0002283c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2283c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22840: e59da01c ldr sl, [sp, #28] 22844: e1a06000 mov r6, r0 22848: e1a07001 mov r7, r1 2284c: e1a04002 mov r4, r2 22850: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 22854: ebffff43 bl 22568 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 22858: e59f00a4 ldr r0, [pc, #164] ; 22904 2285c: e59f10a4 ldr r1, [pc, #164] ; 22908 22860: eb005760 bl 385e8 22864: e2505000 subs r5, r0, #0 22868: 1a000003 bne 2287c errno = EINVAL; 2286c: eb0054ed bl 37c28 <__errno> <== NOT EXECUTED 22870: e3a03016 mov r3, #22 <== NOT EXECUTED 22874: e5803000 str r3, [r0] <== NOT EXECUTED 22878: ea00000c b 228b0 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 2287c: e1a01004 mov r1, r4 22880: e1a02008 mov r2, r8 22884: e1a0300a mov r3, sl 22888: e1a00005 mov r0, r5 2288c: ebfffedb bl 22400 22890: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 22894: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22898: 1a000006 bne 228b8 errno = EINVAL; 2289c: eb0054e1 bl 37c28 <__errno> <== NOT EXECUTED 228a0: e3a03016 mov r3, #22 <== NOT EXECUTED 228a4: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 228a8: e1a00005 mov r0, r5 <== NOT EXECUTED 228ac: eb00552a bl 37d5c <== NOT EXECUTED 228b0: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 228b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 228b8: e3560000 cmp r6, #0 228bc: 0a000004 beq 228d4 match = (strcmp(pwd->pw_name, name) == 0); 228c0: e5940000 ldr r0, [r4] 228c4: eb006ce9 bl 3dc70 228c8: e2700001 rsbs r0, r0, #1 228cc: 33a00000 movcc r0, #0 228d0: ea000003 b 228e4 } else { match = (pwd->pw_uid == uid); 228d4: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 228d8: e1500007 cmp r0, r7 <== NOT EXECUTED 228dc: 13a00000 movne r0, #0 <== NOT EXECUTED 228e0: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 228e4: e3500000 cmp r0, #0 228e8: 0affffe3 beq 2287c fclose(fp); 228ec: e1a00005 mov r0, r5 228f0: eb005519 bl 37d5c *result = pwd; 228f4: e59d3020 ldr r3, [sp, #32] 228f8: e3a00000 mov r0, #0 228fc: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22900: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 22904: 00055ee2 .word 0x00055ee2 22908: 00056d08 .word 0x00056d08 0002252c : return NULL; return p; } struct passwd *getpwent(void) { 2252c: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 22530: e59f402c ldr r4, [pc, #44] ; 22564 <== NOT EXECUTED 22534: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 22538: e3500000 cmp r0, #0 <== NOT EXECUTED 2253c: 0a000006 beq 2255c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 22540: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 22544: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 22548: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2254c: ebffffab bl 22400 <== NOT EXECUTED 22550: e3500000 cmp r0, #0 <== NOT EXECUTED 22554: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 22558: 18bd8010 popne {r4, pc} <== NOT EXECUTED 2255c: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 22560: e8bd8010 pop {r4, pc} <== NOT EXECUTED 22564: 0005f1dc .word 0x0005f1dc 00022940 : struct passwd *getpwuid( uid_t uid ) { 22940: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22944: e59f1028 ldr r1, [pc, #40] ; 22974 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 22948: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 2294c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22950: e281201c add r2, r1, #28 <== NOT EXECUTED 22954: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22958: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 2295c: e58dc000 str ip, [sp] <== NOT EXECUTED 22960: ebffffe9 bl 2290c <== NOT EXECUTED 22964: e3500000 cmp r0, #0 <== NOT EXECUTED 22968: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 2296c: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22970: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 22974: 0005f2bc .word 0x0005f2bc 0002290c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2290c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22910: e1a0c002 mov ip, r2 <== NOT EXECUTED 22914: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22918: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2291c: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22920: e1a0300c mov r3, ip <== NOT EXECUTED 22924: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22928: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2292c: e1a0200e mov r2, lr <== NOT EXECUTED 22930: e3a00000 mov r0, #0 <== NOT EXECUTED 22934: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22938: ebffffbf bl 2283c <== NOT EXECUTED } 2293c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 0000883c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 883c: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 8840: e2504000 subs r4, r0, #0 8844: 1a000004 bne 885c errno = EFAULT; 8848: eb000b55 bl b5a4 <__errno> <== NOT EXECUTED 884c: e3a0300e mov r3, #14 <== NOT EXECUTED 8850: e5803000 str r3, [r0] <== NOT EXECUTED 8854: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 8858: ea00000c b 8890 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 885c: e10f5000 mrs r5, CPSR 8860: e3853080 orr r3, r5, #128 ; 0x80 8864: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 8868: e1a0000d mov r0, sp 886c: eb0002cf bl 93b0 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 8870: 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; 8874: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8878: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 887c: 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; 8880: e5843000 str r3, [r4] time->tv_usec = useconds; 8884: eb0030fd bl 14c80 <__aeabi_idiv> 8888: e5840004 str r0, [r4, #4] 888c: 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; } 8890: e8bd803c pop {r2, r3, r4, r5, pc} 0000530c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 530c: e59f3008 ldr r3, [pc, #8] ; 531c <== NOT EXECUTED 5310: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 5314: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 5318: e12fff1e bx lr <== NOT EXECUTED 531c: 00051fe8 .word 0x00051fe8 00004abc : int ioctl( int fd, ioctl_command_t command, ... ) { 4abc: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ac0: e59f3080 ldr r3, [pc, #128] ; 4b48 4ac4: e5933000 ldr r3, [r3] 4ac8: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 4acc: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ad0: 2a00000b bcs 4b04 iop = rtems_libio_iop( fd ); 4ad4: e59f3070 ldr r3, [pc, #112] ; 4b4c 4ad8: e5933000 ldr r3, [r3] 4adc: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 4ae0: e5903014 ldr r3, [r0, #20] 4ae4: e3130c01 tst r3, #256 ; 0x100 4ae8: 0a000005 beq 4b04 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4aec: 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 *); 4af0: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4af4: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4af8: e58d2000 str r2, [sp] 4afc: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4b00: 1a000002 bne 4b10 rtems_set_errno_and_return_minus_one( EBADF ); 4b04: eb002f6c bl 108bc <__errno> 4b08: e3a03009 mov r3, #9 4b0c: ea000004 b 4b24 if ( !iop->handlers->ioctl_h ) 4b10: e5933010 ldr r3, [r3, #16] 4b14: e3530000 cmp r3, #0 4b18: 1a000004 bne 4b30 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b1c: eb002f66 bl 108bc <__errno> <== NOT EXECUTED 4b20: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4b24: e5803000 str r3, [r0] 4b28: e3e00000 mvn r0, #0 4b2c: ea000002 b 4b3c rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4b30: e59d1008 ldr r1, [sp, #8] 4b34: e1a0e00f mov lr, pc 4b38: e12fff13 bx r3 return rc; } 4b3c: e8bd4008 pop {r3, lr} 4b40: e28dd00c add sp, sp, #12 4b44: e12fff1e bx lr 4b48: 0001c7d0 .word 0x0001c7d0 4b4c: 0001e1b8 .word 0x0001e1b8 000028a4 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 28a4: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 28a8: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 28b0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 28b4: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 28b8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28bc: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 28c0: 0a000007 beq 28e4 <== NOT EXECUTED c = tolower (c); 28c4: e59f2164 ldr r2, [pc, #356] ; 2a30 <== NOT EXECUTED 28c8: e5922000 ldr r2, [r2] <== NOT EXECUTED 28cc: e0822005 add r2, r2, r5 <== NOT EXECUTED 28d0: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 28d4: e2022003 and r2, r2, #3 <== NOT EXECUTED 28d8: e3520001 cmp r2, #1 <== NOT EXECUTED 28dc: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 28e0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 28e4: e355000d cmp r5, #13 <== NOT EXECUTED 28e8: 1a000005 bne 2904 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 28ec: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 28f0: 1a00004c bne 2a28 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 28f4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 28f8: 03a0500d moveq r5, #13 <== NOT EXECUTED 28fc: 13a0500a movne r5, #10 <== NOT EXECUTED 2900: ea000007 b 2924 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2904: e355000a cmp r5, #10 <== NOT EXECUTED 2908: 1a000003 bne 291c <== NOT EXECUTED 290c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 2910: 03a0500a moveq r5, #10 <== NOT EXECUTED 2914: 13a0500d movne r5, #13 <== NOT EXECUTED 2918: ea000001 b 2924 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 291c: e3550000 cmp r5, #0 <== NOT EXECUTED 2920: 0a00002e beq 29e0 <== NOT EXECUTED 2924: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2928: e3130002 tst r3, #2 <== NOT EXECUTED 292c: 0a00002b beq 29e0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2930: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 2934: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 2938: 01a00004 moveq r0, r4 <== NOT EXECUTED 293c: 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]) { 2940: 0a000004 beq 2958 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2944: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 2948: e1520005 cmp r2, r5 <== NOT EXECUTED 294c: 1a000003 bne 2960 <== NOT EXECUTED erase (tty, 1); 2950: e1a00004 mov r0, r4 <== NOT EXECUTED 2954: e3a01001 mov r1, #1 <== NOT EXECUTED 2958: ebffff5e bl 26d8 <== NOT EXECUTED 295c: ea00002f b 2a20 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2960: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 2964: e1520005 cmp r2, r5 <== NOT EXECUTED 2968: 0a00001a beq 29d8 <== NOT EXECUTED return 1; } else if (c == '\n') { 296c: e355000a cmp r5, #10 <== NOT EXECUTED 2970: 1a000009 bne 299c <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2974: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2978: 11a00005 movne r0, r5 <== NOT EXECUTED 297c: 11a01004 movne r1, r4 <== NOT EXECUTED 2980: 1bffff34 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2984: e284101c add r1, r4, #28 <== NOT EXECUTED 2988: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 298c: e3a0000a mov r0, #10 <== NOT EXECUTED 2990: e2832001 add r2, r3, #1 <== NOT EXECUTED 2994: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 2998: ea00000d b 29d4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 299c: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 29a0: e1520005 cmp r2, r5 <== NOT EXECUTED 29a4: 0a000002 beq 29b4 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 29a8: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 29ac: e1520005 cmp r2, r5 <== NOT EXECUTED 29b0: 1a00000a bne 29e0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29b4: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29b8: 11a00005 movne r0, r5 <== NOT EXECUTED 29bc: 11a01004 movne r1, r4 <== NOT EXECUTED 29c0: 1bffff24 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 29c4: e284101c add r1, r4, #28 <== NOT EXECUTED 29c8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 29cc: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 29d0: e2832001 add r2, r3, #1 <== NOT EXECUTED 29d4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 29d8: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 29dc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 29e0: e59f304c ldr r3, [pc, #76] ; 2a34 <== NOT EXECUTED 29e4: e5933000 ldr r3, [r3] <== NOT EXECUTED 29e8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 29ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED 29f0: e1520003 cmp r2, r3 <== NOT EXECUTED 29f4: aa00000b bge 2a28 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29f8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 29fc: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 2a00: 11a00005 movne r0, r5 <== NOT EXECUTED 2a04: 11a01004 movne r1, r4 <== NOT EXECUTED 2a08: 1bffff12 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a0c: e284101c add r1, r4, #28 <== NOT EXECUTED 2a10: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2a14: e2832001 add r2, r3, #1 <== NOT EXECUTED 2a18: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 2a1c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 2a20: e3a00000 mov r0, #0 <== NOT EXECUTED 2a24: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a28: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 2a2c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a30: 000171ec .word 0x000171ec 2a34: 00017174 .word 0x00017174 00020394 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 20394: e3a00000 mov r0, #0 <== NOT EXECUTED 20398: e12fff1e bx lr <== NOT EXECUTED 00022a64 : int link( const char *existing, const char *new ) { 22a64: e92d4030 push {r4, r5, lr} 22a68: e24dd030 sub sp, sp, #48 ; 0x30 22a6c: e1a04001 mov r4, r1 22a70: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 22a74: eb006ee5 bl 3e610 22a78: e3a0c001 mov ip, #1 22a7c: e1a01000 mov r1, r0 22a80: e3a02000 mov r2, #0 22a84: e1a00005 mov r0, r5 22a88: e28d3018 add r3, sp, #24 22a8c: e58dc000 str ip, [sp] 22a90: ebff89a7 bl 5134 0, &existing_loc, true ); if ( result != 0 ) 22a94: e3500000 cmp r0, #0 22a98: 1a00002a bne 22b48 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 22a9c: e5d43000 ldrb r3, [r4] 22aa0: e353002f cmp r3, #47 ; 0x2f 22aa4: 1353005c cmpne r3, #92 ; 0x5c 22aa8: 13a05000 movne r5, #0 22aac: 03a05001 moveq r5, #1 22ab0: 0a000001 beq 22abc 22ab4: e3530000 cmp r3, #0 22ab8: 1a000009 bne 22ae4 22abc: e59f31ec ldr r3, [pc, #492] ; 22cb0 22ac0: e593e000 ldr lr, [r3] 22ac4: e28ee018 add lr, lr, #24 22ac8: e8be000f ldm lr!, {r0, r1, r2, r3} 22acc: e28dc004 add ip, sp, #4 22ad0: e8ac000f stmia ip!, {r0, r1, r2, r3} 22ad4: e59e3000 ldr r3, [lr] 22ad8: e3a00001 mov r0, #1 22adc: e58c3000 str r3, [ip] 22ae0: ea000008 b 22b08 22ae4: e59f31c4 ldr r3, [pc, #452] ; 22cb0 22ae8: e593e000 ldr lr, [r3] 22aec: e28ee004 add lr, lr, #4 22af0: e8be000f ldm lr!, {r0, r1, r2, r3} 22af4: e28dc004 add ip, sp, #4 22af8: e8ac000f stmia ip!, {r0, r1, r2, r3} 22afc: e59e3000 ldr r3, [lr] 22b00: e58c3000 str r3, [ip] 22b04: e1a00005 mov r0, r5 if ( !parent_loc.ops->evalformake_h ) { 22b08: e59d3010 ldr r3, [sp, #16] 22b0c: e5933004 ldr r3, [r3, #4] 22b10: e3530000 cmp r3, #0 22b14: 1a00000d bne 22b50 rtems_filesystem_freenode( &existing_loc ); 22b18: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22b1c: e3530000 cmp r3, #0 <== NOT EXECUTED 22b20: 0a000005 beq 22b3c <== NOT EXECUTED 22b24: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22b28: e3530000 cmp r3, #0 <== NOT EXECUTED 22b2c: 0a000002 beq 22b3c <== NOT EXECUTED 22b30: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22b34: e1a0e00f mov lr, pc <== NOT EXECUTED 22b38: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22b3c: eb005439 bl 37c28 <__errno> <== NOT EXECUTED 22b40: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22b44: e5803000 str r3, [r0] 22b48: e3e05000 mvn r5, #0 22b4c: ea000054 b 22ca4 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 22b50: e28d5004 add r5, sp, #4 22b54: e0840000 add r0, r4, r0 22b58: e1a01005 mov r1, r5 22b5c: e28d202c add r2, sp, #44 ; 0x2c 22b60: e1a0e00f mov lr, pc 22b64: e12fff13 bx r3 if ( result != 0 ) { 22b68: e2504000 subs r4, r0, #0 22b6c: 0a00000a beq 22b9c rtems_filesystem_freenode( &existing_loc ); 22b70: e59d3024 ldr r3, [sp, #36] ; 0x24 22b74: e3530000 cmp r3, #0 22b78: 0a000004 beq 22b90 22b7c: e593301c ldr r3, [r3, #28] 22b80: e3530000 cmp r3, #0 22b84: 128d0018 addne r0, sp, #24 22b88: 11a0e00f movne lr, pc 22b8c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 22b90: eb005424 bl 37c28 <__errno> 22b94: e5804000 str r4, [r0] 22b98: eaffffea b 22b48 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 22b9c: e59d3028 ldr r3, [sp, #40] ; 0x28 22ba0: e59d2014 ldr r2, [sp, #20] 22ba4: e1520003 cmp r2, r3 22ba8: 0a000012 beq 22bf8 rtems_filesystem_freenode( &existing_loc ); 22bac: e59d3024 ldr r3, [sp, #36] ; 0x24 22bb0: e3530000 cmp r3, #0 22bb4: 0a000004 beq 22bcc 22bb8: e593301c ldr r3, [r3, #28] 22bbc: e3530000 cmp r3, #0 22bc0: 128d0018 addne r0, sp, #24 22bc4: 11a0e00f movne lr, pc 22bc8: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22bcc: e59d3010 ldr r3, [sp, #16] 22bd0: e3530000 cmp r3, #0 22bd4: 0a000004 beq 22bec 22bd8: e593301c ldr r3, [r3, #28] 22bdc: e3530000 cmp r3, #0 22be0: 128d0004 addne r0, sp, #4 22be4: 11a0e00f movne lr, pc 22be8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 22bec: eb00540d bl 37c28 <__errno> 22bf0: e3a03012 mov r3, #18 22bf4: eaffffd2 b 22b44 } if ( !parent_loc.ops->link_h ) { 22bf8: e59d3010 ldr r3, [sp, #16] 22bfc: e5933008 ldr r3, [r3, #8] 22c00: e3530000 cmp r3, #0 22c04: 1a00000f bne 22c48 rtems_filesystem_freenode( &existing_loc ); 22c08: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22c0c: e3530000 cmp r3, #0 <== NOT EXECUTED 22c10: 0a000004 beq 22c28 <== NOT EXECUTED 22c14: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22c18: e3530000 cmp r3, #0 <== NOT EXECUTED 22c1c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22c20: 11a0e00f movne lr, pc <== NOT EXECUTED 22c24: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 22c28: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22c2c: e3530000 cmp r3, #0 <== NOT EXECUTED 22c30: 0affffc1 beq 22b3c <== NOT EXECUTED 22c34: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22c38: e3530000 cmp r3, #0 <== NOT EXECUTED 22c3c: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22c40: 1affffbb bne 22b34 <== NOT EXECUTED 22c44: eaffffbc b 22b3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22c48: e28d4018 add r4, sp, #24 22c4c: e1a01005 mov r1, r5 22c50: e1a00004 mov r0, r4 22c54: e59d202c ldr r2, [sp, #44] ; 0x2c 22c58: e1a0e00f mov lr, pc 22c5c: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 22c60: e59d3024 ldr r3, [sp, #36] ; 0x24 22c64: 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 ); 22c68: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 22c6c: 0a000004 beq 22c84 22c70: e593301c ldr r3, [r3, #28] 22c74: e3530000 cmp r3, #0 22c78: 11a00004 movne r0, r4 22c7c: 11a0e00f movne lr, pc 22c80: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22c84: e59d3010 ldr r3, [sp, #16] 22c88: e3530000 cmp r3, #0 22c8c: 0a000004 beq 22ca4 22c90: e593301c ldr r3, [r3, #28] 22c94: e3530000 cmp r3, #0 22c98: 128d0004 addne r0, sp, #4 22c9c: 11a0e00f movne lr, pc 22ca0: 112fff13 bxne r3 return result; } 22ca4: e1a00005 mov r0, r5 22ca8: e28dd030 add sp, sp, #48 ; 0x30 22cac: e8bd8030 pop {r4, r5, pc} 22cb0: 00051fe8 .word 0x00051fe8 0001658c : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1658c: e59fc0ec ldr ip, [pc, #236] ; 16680 16590: e59cc000 ldr ip, [ip] 16594: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 16598: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1659c: 2a000005 bcs 165b8 iop = rtems_libio_iop( fd ); 165a0: e59fc0dc ldr ip, [pc, #220] ; 16684 165a4: e59c4000 ldr r4, [ip] 165a8: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 165ac: e5940014 ldr r0, [r4, #20] 165b0: e3100c01 tst r0, #256 ; 0x100 165b4: 1a000002 bne 165c4 165b8: ebffd3f9 bl b5a4 <__errno> 165bc: e3a03009 mov r3, #9 165c0: ea00001c b 16638 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 165c4: e594003c ldr r0, [r4, #60] ; 0x3c 165c8: e5900014 ldr r0, [r0, #20] 165cc: e3500000 cmp r0, #0 165d0: 1a000002 bne 165e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 165d4: ebffd3f2 bl b5a4 <__errno> <== NOT EXECUTED 165d8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 165dc: ea000015 b 16638 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 165e0: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 165e4: e284600c add r6, r4, #12 165e8: e8960060 ldm r6, {r5, r6} switch ( whence ) { 165ec: 0a000006 beq 1660c 165f0: e3530002 cmp r3, #2 165f4: 0a000007 beq 16618 165f8: e3530000 cmp r3, #0 165fc: 1a00000b bne 16630 case SEEK_SET: iop->offset = offset; 16600: e584100c str r1, [r4, #12] 16604: e5842010 str r2, [r4, #16] break; 16608: ea00000e b 16648 case SEEK_CUR: iop->offset += offset; 1660c: e091b005 adds fp, r1, r5 16610: e0a2c006 adc ip, r2, r6 16614: ea000002 b 16624 break; case SEEK_END: iop->offset = iop->size + offset; 16618: e9941800 ldmib r4, {fp, ip} 1661c: e09bb001 adds fp, fp, r1 16620: e0acc002 adc ip, ip, r2 16624: e584b00c str fp, [r4, #12] 16628: e584c010 str ip, [r4, #16] break; 1662c: ea000005 b 16648 default: rtems_set_errno_and_return_minus_one( EINVAL ); 16630: ebffd3db bl b5a4 <__errno> 16634: e3a03016 mov r3, #22 16638: e5803000 str r3, [r0] 1663c: e3e02000 mvn r2, #0 16640: e3e03000 mvn r3, #0 16644: ea00000a b 16674 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 16648: e594c03c ldr ip, [r4, #60] ; 0x3c 1664c: e1a00004 mov r0, r4 16650: e1a0e00f mov lr, pc 16654: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 16658: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1665c: e1a02000 mov r2, r0 16660: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 16664: 1a000002 bne 16674 16668: e3710001 cmn r1, #1 iop->offset = old_offset; 1666c: 0584500c streq r5, [r4, #12] 16670: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 16674: e1a01003 mov r1, r3 16678: e1a00002 mov r0, r2 1667c: e8bd8870 pop {r4, r5, r6, fp, pc} 16680: 00016ff0 .word 0x00016ff0 16684: 000185a8 .word 0x000185a8 00022dd0 : int _STAT_NAME( const char *path, struct stat *buf ) { 22dd0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22dd4: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 22dd8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 22ddc: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22de0: 1a000002 bne 22df0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 22de4: eb00538f bl 37c28 <__errno> <== NOT EXECUTED 22de8: e3a0300e mov r3, #14 <== NOT EXECUTED 22dec: ea000018 b 22e54 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 22df0: eb006e06 bl 3e610 <== NOT EXECUTED 22df4: e28d4004 add r4, sp, #4 <== NOT EXECUTED 22df8: e3a0c000 mov ip, #0 <== NOT EXECUTED 22dfc: e1a01000 mov r1, r0 <== NOT EXECUTED 22e00: e1a0200c mov r2, ip <== NOT EXECUTED 22e04: e1a00006 mov r0, r6 <== NOT EXECUTED 22e08: e1a03004 mov r3, r4 <== NOT EXECUTED 22e0c: e58dc000 str ip, [sp] <== NOT EXECUTED 22e10: ebff88c7 bl 5134 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 22e14: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22e18: 1a00000e bne 22e58 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 22e1c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22e20: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22e24: e3530000 cmp r3, #0 <== NOT EXECUTED 22e28: 1a00000c bne 22e60 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e2c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22e30: e3530000 cmp r3, #0 <== NOT EXECUTED 22e34: 0a000004 beq 22e4c <== NOT EXECUTED 22e38: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22e3c: e3530000 cmp r3, #0 <== NOT EXECUTED 22e40: 11a00004 movne r0, r4 <== NOT EXECUTED 22e44: 11a0e00f movne lr, pc <== NOT EXECUTED 22e48: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22e4c: eb005375 bl 37c28 <__errno> <== NOT EXECUTED 22e50: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22e54: e5803000 str r3, [r0] <== NOT EXECUTED 22e58: e3e05000 mvn r5, #0 <== NOT EXECUTED 22e5c: ea000010 b 22ea4 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 22e60: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 22e64: e1a00005 mov r0, r5 <== NOT EXECUTED 22e68: eb006026 bl 3af08 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 22e6c: e1a01005 mov r1, r5 <== NOT EXECUTED 22e70: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22e74: e1a00004 mov r0, r4 <== NOT EXECUTED 22e78: e1a0e00f mov lr, pc <== NOT EXECUTED 22e7c: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e80: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22e84: 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 ); 22e88: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22e8c: 0a000004 beq 22ea4 <== NOT EXECUTED 22e90: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22e94: e3530000 cmp r3, #0 <== NOT EXECUTED 22e98: 11a00004 movne r0, r4 <== NOT EXECUTED 22e9c: 11a0e00f movne lr, pc <== NOT EXECUTED 22ea0: 112fff13 bxne r3 <== NOT EXECUTED return status; } 22ea4: e1a00005 mov r0, r5 <== NOT EXECUTED 22ea8: e28dd018 add sp, sp, #24 <== NOT EXECUTED 22eac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00008bb0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8bb0: e59f30d8 ldr r3, [pc, #216] ; 8c90 8bb4: e5932004 ldr r2, [r3, #4] 8bb8: e2822001 add r2, r2, #1 8bbc: e92d4070 push {r4, r5, r6, lr} 8bc0: e5832004 str r2, [r3, #4] 8bc4: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8bc8: ebffffef bl 8b8c /* * Validate the parameters */ if ( !size ) 8bcc: e3540000 cmp r4, #0 8bd0: 0a00002b beq 8c84 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8bd4: e59f30b8 ldr r3, [pc, #184] ; 8c94 8bd8: e5933000 ldr r3, [r3] 8bdc: e3530003 cmp r3, #3 8be0: 1a000002 bne 8bf0 8be4: ebffffd1 bl 8b30 8be8: e3500000 cmp r0, #0 8bec: 0a000024 beq 8c84 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8bf0: e59f30a0 ldr r3, [pc, #160] ; 8c98 8bf4: e3a02000 mov r2, #0 8bf8: e5930000 ldr r0, [r3] 8bfc: e1a01004 mov r1, r4 8c00: e1a03002 mov r3, r2 8c04: eb000324 bl 989c <_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 ) { 8c08: 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; 8c0c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 8c10: 1a00000c bne 8c48 if (rtems_malloc_sbrk_helpers) 8c14: e59f3080 ldr r3, [pc, #128] ; 8c9c 8c18: e5933000 ldr r3, [r3] 8c1c: e3530000 cmp r3, #0 8c20: 0a000004 beq 8c38 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8c24: e1a00004 mov r0, r4 <== NOT EXECUTED 8c28: e1a0e00f mov lr, pc <== NOT EXECUTED 8c2c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 8c30: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8c34: 1a000003 bne 8c48 <== NOT EXECUTED errno = ENOMEM; 8c38: eb000a59 bl b5a4 <__errno> 8c3c: e3a0300c mov r3, #12 8c40: e5803000 str r3, [r0] return (void *) 0; 8c44: ea00000f b 8c88 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8c48: e59f3050 ldr r3, [pc, #80] ; 8ca0 8c4c: e5933000 ldr r3, [r3] 8c50: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 8c54: 11a01004 movne r1, r4 8c58: 11a00005 movne r0, r5 8c5c: 11a0e00f movne lr, pc 8c60: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8c64: e59f3038 ldr r3, [pc, #56] ; 8ca4 8c68: e5933000 ldr r3, [r3] 8c6c: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8c70: 11a00005 movne r0, r5 8c74: 11a0e00f movne lr, pc 8c78: 1593f004 ldrne pc, [r3, #4] 8c7c: e1a06005 mov r6, r5 8c80: ea000000 b 8c88 8c84: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8c88: e1a00006 mov r0, r6 8c8c: e8bd8070 pop {r4, r5, r6, pc} 8c90: 000185b4 .word 0x000185b4 8c94: 000188b0 .word 0x000188b0 8c98: 00016ffc .word 0x00016ffc 8c9c: 0001840c .word 0x0001840c 8ca0: 00018410 .word 0x00018410 8ca4: 00018408 .word 0x00018408 00008b7c : } void malloc_deferred_free( void *pointer ) { 8b7c: e1a01000 mov r1, r0 <== NOT EXECUTED 8b80: e59f0000 ldr r0, [pc, #0] ; 8b88 <== NOT EXECUTED 8b84: eaffefee b 4b44 <_Chain_Append> <== NOT EXECUTED 8b88: 00018900 .word 0x00018900 00008b8c : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8b8c: 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) 8b90: ea000000 b 8b98 free(to_be_freed); 8b94: ebfffec5 bl 86b0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8b98: e59f000c ldr r0, [pc, #12] ; 8bac 8b9c: eb00019b bl 9210 <_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) 8ba0: e3500000 cmp r0, #0 8ba4: 1afffffa bne 8b94 free(to_be_freed); } 8ba8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 8bac: 00018900 .word 0x00018900 0000f3a8 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { f3a8: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f3ac: 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 ) f3b0: e5943054 ldr r3, [r4, #84] ; 0x54 f3b4: e1530002 cmp r3, r2 f3b8: ba000003 blt f3cc f3bc: 1a000005 bne f3d8 f3c0: e5943050 ldr r3, [r4, #80] ; 0x50 f3c4: e1530001 cmp r3, r1 f3c8: 2a000002 bcs f3d8 return IMFS_memfile_extend( the_jnode, length ); f3cc: e1a00004 mov r0, r4 <== NOT EXECUTED f3d0: ebffff9a bl f240 <== NOT EXECUTED f3d4: ea000008 b f3fc <== 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; f3d8: e5841050 str r1, [r4, #80] ; 0x50 f3dc: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; f3e0: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); f3e4: e3a01000 mov r1, #0 f3e8: e1a0000d mov r0, sp f3ec: ebffcccb bl 2720 f3f0: e59d3000 ldr r3, [sp] f3f4: e5843040 str r3, [r4, #64] ; 0x40 f3f8: e3a00000 mov r0, #0 return 0; } f3fc: e8bd801c pop {r2, r3, r4, pc} 0000f400 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { f400: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f404: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { f408: e595304c ldr r3, [r5, #76] ; 0x4c f40c: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { f410: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { f414: 1a00000b bne f448 if (iop->offset > the_jnode->info.linearfile.size) f418: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED f41c: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED f420: e1520003 cmp r2, r3 <== NOT EXECUTED f424: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED f428: ca000003 bgt f43c <== NOT EXECUTED f42c: 1a000014 bne f484 <== NOT EXECUTED f430: e590100c ldr r1, [r0, #12] <== NOT EXECUTED f434: e1510002 cmp r1, r2 <== NOT EXECUTED f438: 9a000011 bls f484 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; f43c: e584200c str r2, [r4, #12] <== NOT EXECUTED f440: e5843010 str r3, [r4, #16] <== NOT EXECUTED f444: ea00000e b f484 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) f448: e1a00005 mov r0, r5 f44c: e284200c add r2, r4, #12 f450: e8920006 ldm r2, {r1, r2} f454: ebffff79 bl f240 f458: e3500000 cmp r0, #0 f45c: 0a000005 beq f478 rtems_set_errno_and_return_minus_one( ENOSPC ); f460: eb00041c bl 104d8 <__errno> <== NOT EXECUTED f464: e3a0301c mov r3, #28 <== NOT EXECUTED f468: e5803000 str r3, [r0] <== NOT EXECUTED f46c: e3e04000 mvn r4, #0 <== NOT EXECUTED f470: e3e03000 mvn r3, #0 <== NOT EXECUTED f474: ea000004 b f48c <== NOT EXECUTED iop->size = the_jnode->info.file.size; f478: e2853050 add r3, r5, #80 ; 0x50 f47c: e893000c ldm r3, {r2, r3} f480: e984000c stmib r4, {r2, r3} } return iop->offset; f484: e284400c add r4, r4, #12 f488: e8940018 ldm r4, {r3, r4} } f48c: e1a01004 mov r1, r4 f490: e1a00003 mov r0, r3 f494: e8bd8030 pop {r4, r5, pc} 0000f724 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) f724: e5903014 ldr r3, [r0, #20] f728: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { f72c: e92d4031 push {r0, r4, r5, lr} f730: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; f734: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) f738: 0a000017 beq f79c && (the_jnode->type == IMFS_LINEAR_FILE)) { f73c: e594304c ldr r3, [r4, #76] ; 0x4c f740: e3530006 cmp r3, #6 f744: 1a000014 bne f79c uint32_t count = the_jnode->info.linearfile.size; f748: 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; f74c: 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; f750: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; f754: e3a00000 mov r0, #0 <== NOT EXECUTED f758: 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) f75c: 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; f760: 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; f764: 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; f768: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; f76c: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED f770: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; f774: 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; f778: 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) f77c: 0a000006 beq f79c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) f780: e1a02001 mov r2, r1 <== NOT EXECUTED f784: e1a01000 mov r1, r0 <== NOT EXECUTED f788: e1a00004 mov r0, r4 <== NOT EXECUTED f78c: e58dc000 str ip, [sp] <== NOT EXECUTED f790: ebffff40 bl f498 <== 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) f794: e3700001 cmn r0, #1 <== NOT EXECUTED f798: 0a000009 beq f7c4 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) f79c: e5953014 ldr r3, [r5, #20] f7a0: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; f7a4: 12843050 addne r3, r4, #80 ; 0x50 f7a8: 1893000c ldmne r3, {r2, r3} f7ac: 1585200c strne r2, [r5, #12] f7b0: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; f7b4: e2844050 add r4, r4, #80 ; 0x50 f7b8: e8940018 ldm r4, {r3, r4} f7bc: e9850018 stmib r5, {r3, r4} f7c0: e3a00000 mov r0, #0 return 0; } f7c4: e8bd8038 pop {r3, r4, r5, pc} 00001508 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1508: 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) ) ) 150c: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1510: e24dd01c sub sp, sp, #28 1514: e1a05001 mov r5, r1 1518: e1a06000 mov r6, r0 151c: e1a07002 mov r7, r2 1520: 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) ) ) 1524: 1a000002 bne 1534 rtems_set_errno_and_return_minus_one( EINVAL ); 1528: eb00281d bl b5a4 <__errno> <== NOT EXECUTED 152c: e3a03016 mov r3, #22 <== NOT EXECUTED 1530: ea000020 b 15b8 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1534: e5d03000 ldrb r3, [r0] 1538: e353002f cmp r3, #47 ; 0x2f 153c: 1353005c cmpne r3, #92 ; 0x5c 1540: 13a04000 movne r4, #0 1544: 03a04001 moveq r4, #1 1548: 0a000001 beq 1554 154c: e3530000 cmp r3, #0 1550: 1a000009 bne 157c 1554: e59f3100 ldr r3, [pc, #256] ; 165c 1558: e593e000 ldr lr, [r3] 155c: e28ee018 add lr, lr, #24 1560: e8be000f ldm lr!, {r0, r1, r2, r3} 1564: e28dc004 add ip, sp, #4 1568: e8ac000f stmia ip!, {r0, r1, r2, r3} 156c: e59e3000 ldr r3, [lr] 1570: e3a00001 mov r0, #1 1574: e58c3000 str r3, [ip] 1578: ea000008 b 15a0 157c: e59f30d8 ldr r3, [pc, #216] ; 165c 1580: e593e000 ldr lr, [r3] 1584: e28ee004 add lr, lr, #4 1588: e8be000f ldm lr!, {r0, r1, r2, r3} 158c: e28dc004 add ip, sp, #4 1590: e8ac000f stmia ip!, {r0, r1, r2, r3} 1594: e59e3000 ldr r3, [lr] 1598: e58c3000 str r3, [ip] 159c: e1a00004 mov r0, r4 if ( !temp_loc.ops->evalformake_h ) { 15a0: e59d3010 ldr r3, [sp, #16] 15a4: e5933004 ldr r3, [r3, #4] 15a8: e3530000 cmp r3, #0 15ac: 1a000004 bne 15c4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 15b0: eb0027fb bl b5a4 <__errno> <== NOT EXECUTED 15b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 15b8: e5803000 str r3, [r0] <== NOT EXECUTED 15bc: e3e05000 mvn r5, #0 15c0: ea000022 b 1650 } result = (*temp_loc.ops->evalformake_h)( 15c4: e28d4004 add r4, sp, #4 15c8: e0860000 add r0, r6, r0 15cc: e1a01004 mov r1, r4 15d0: e28d2018 add r2, sp, #24 15d4: e1a0e00f mov lr, pc 15d8: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 15dc: e3500000 cmp r0, #0 15e0: 1afffff5 bne 15bc return -1; if ( !temp_loc.ops->mknod_h ) { 15e4: e59d3010 ldr r3, [sp, #16] 15e8: e593c014 ldr ip, [r3, #20] 15ec: e35c0000 cmp ip, #0 15f0: 1a000006 bne 1610 rtems_filesystem_freenode( &temp_loc ); 15f4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 15f8: e3530000 cmp r3, #0 <== NOT EXECUTED 15fc: 0affffeb beq 15b0 <== NOT EXECUTED 1600: e1a00004 mov r0, r4 <== NOT EXECUTED 1604: e1a0e00f mov lr, pc <== NOT EXECUTED 1608: e12fff13 bx r3 <== NOT EXECUTED 160c: eaffffe7 b 15b0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1610: e1a01005 mov r1, r5 1614: e1a03008 mov r3, r8 1618: e58d4000 str r4, [sp] 161c: e1a02007 mov r2, r7 1620: e59d0018 ldr r0, [sp, #24] 1624: e1a0e00f mov lr, pc 1628: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 162c: e59d3010 ldr r3, [sp, #16] 1630: 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 ); 1634: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1638: 0a000004 beq 1650 163c: e593301c ldr r3, [r3, #28] 1640: e3530000 cmp r3, #0 1644: 11a00004 movne r0, r4 1648: 11a0e00f movne lr, pc 164c: 112fff13 bxne r3 return result; } 1650: e1a00005 mov r0, r5 1654: e28dd01c add sp, sp, #28 1658: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 165c: 00017188 .word 0x00017188 0000167c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 167c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1680: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1684: e24dd018 sub sp, sp, #24 1688: e1a06000 mov r6, r0 168c: e1a09002 mov r9, r2 1690: e1a0b003 mov fp, r3 1694: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1698: 0a000001 beq 16a4 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 169c: e3520001 cmp r2, #1 16a0: 9a000002 bls 16b0 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 16a4: eb0027be bl b5a4 <__errno> 16a8: e3a03016 mov r3, #22 16ac: ea000014 b 1704 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 16b0: e5975024 ldr r5, [r7, #36] ; 0x24 16b4: e3550000 cmp r5, #0 16b8: 1a000004 bne 16d0 errno = ENOTSUP; 16bc: eb0027b8 bl b5a4 <__errno> <== NOT EXECUTED 16c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16c4: e5803000 str r3, [r0] <== NOT EXECUTED 16c8: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 16cc: ea00006d b 1888 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 16d0: e3530000 cmp r3, #0 16d4: 03a0006c moveq r0, #108 ; 0x6c 16d8: 0a000002 beq 16e8 size += strlen( device ) + 1; 16dc: e1a00003 mov r0, r3 <== NOT EXECUTED 16e0: eb002ba0 bl c568 <== NOT EXECUTED 16e4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 16e8: eb001d30 bl 8bb0 if ( !temp_mt_entry ) { 16ec: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 16f0: e1a04000 mov r4, r0 16f4: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 16f8: 1a000003 bne 170c errno = ENOMEM; 16fc: eb0027a8 bl b5a4 <__errno> <== NOT EXECUTED 1700: e3a0300c mov r3, #12 <== NOT EXECUTED 1704: e5803000 str r3, [r0] 1708: ea00006a b 18b8 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 170c: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 1710: 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; 1714: 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; 1718: 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 ); 171c: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 1720: 11a00003 movne r0, r3 1724: 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 = 1728: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 172c: 1b002b51 blne c478 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1730: e35a0000 cmp sl, #0 1734: 0a000035 beq 1810 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1738: e1a0000a mov r0, sl 173c: eb002b89 bl c568 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1740: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1744: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1748: e3a0c001 mov ip, #1 174c: e1a0000a mov r0, sl 1750: e3a02007 mov r2, #7 1754: e1a03005 mov r3, r5 1758: e58dc000 str ip, [sp] 175c: ebfffec9 bl 1288 1760: e3700001 cmn r0, #1 1764: 0a000046 beq 1884 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1768: e59d3010 ldr r3, [sp, #16] 176c: e5933010 ldr r3, [r3, #16] 1770: e3530000 cmp r3, #0 1774: 1a000002 bne 1784 errno = ENOTSUP; 1778: eb002789 bl b5a4 <__errno> <== NOT EXECUTED 177c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1780: ea000006 b 17a0 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1784: e1a00005 mov r0, r5 1788: e1a0e00f mov lr, pc 178c: e12fff13 bx r3 1790: e3500001 cmp r0, #1 1794: 0a000003 beq 17a8 errno = ENOTDIR; 1798: eb002781 bl b5a4 <__errno> 179c: e3a03014 mov r3, #20 17a0: e5803000 str r3, [r0] goto cleanup_and_bail; 17a4: ea000037 b 1888 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17a8: e59f2140 ldr r2, [pc, #320] ; 18f0 !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 ) 17ac: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17b0: e4923004 ldr r3, [r2], #4 17b4: ea000003 b 17c8 !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 ) 17b8: e593001c ldr r0, [r3, #28] 17bc: e1500001 cmp r0, r1 17c0: 0a000003 beq 17d4 * 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 ) { 17c4: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 17c8: e1530002 cmp r3, r2 17cc: 1afffff9 bne 17b8 17d0: ea00003b b 18c4 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 17d4: eb002772 bl b5a4 <__errno> 17d8: e3a03010 mov r3, #16 17dc: ea000001 b 17e8 * 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; 17e0: eb00276f bl b5a4 <__errno> <== NOT EXECUTED 17e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17e8: e5803000 str r3, [r0] 17ec: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 17f0: ea000024 b 1888 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 17f4: e1a00004 mov r0, r4 17f8: e1a0e00f mov lr, pc 17fc: e12fff13 bx r3 1800: e3500000 cmp r0, #0 1804: e28d5004 add r5, sp, #4 1808: 0a000008 beq 1830 180c: ea00001d b 1888 <== 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; 1810: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 1814: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 1818: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 181c: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 1820: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 1824: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 1828: e584a018 str sl, [r4, #24] 182c: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 1830: e1a00004 mov r0, r4 1834: e1a0e00f mov lr, pc 1838: e597f024 ldr pc, [r7, #36] ; 0x24 183c: e2507000 subs r7, r0, #0 1840: 0a000007 beq 1864 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 1844: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1848: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 184c: e3530000 cmp r3, #0 <== NOT EXECUTED 1850: 0a00000c beq 1888 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1854: e1a00004 mov r0, r4 <== NOT EXECUTED 1858: e1a0e00f mov lr, pc <== NOT EXECUTED 185c: e12fff13 bx r3 <== NOT EXECUTED 1860: ea000008 b 1888 <== 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 ); 1864: e59f0084 ldr r0, [pc, #132] ; 18f0 1868: e1a01004 mov r1, r4 186c: eb000cb4 bl 4b44 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1870: e3560000 cmp r6, #0 1874: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 1878: 15864000 strne r4, [r6] 187c: 11a00007 movne r0, r7 1880: ea00000d b 18bc 1884: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1888: e1a00008 mov r0, r8 188c: eb001b87 bl 86b0 if ( loc_to_free ) 1890: e3550000 cmp r5, #0 1894: 0a000007 beq 18b8 rtems_filesystem_freenode( loc_to_free ); 1898: e595300c ldr r3, [r5, #12] 189c: e3530000 cmp r3, #0 18a0: 0a000004 beq 18b8 18a4: e593301c ldr r3, [r3, #28] 18a8: e3530000 cmp r3, #0 18ac: 11a00005 movne r0, r5 18b0: 11a0e00f movne lr, pc 18b4: 112fff13 bxne r3 18b8: e3e00000 mvn r0, #0 return -1; } 18bc: e28dd018 add sp, sp, #24 18c0: 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; 18c4: 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; 18c8: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 18cc: 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 ){ 18d0: 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; 18d4: 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; 18d8: 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 ){ 18dc: 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; 18e0: 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; 18e4: 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 ){ 18e8: 1affffc1 bne 17f4 18ec: eaffffbb b 17e0 <== NOT EXECUTED 18f0: 000185e0 .word 0x000185e0 00001964 : */ int newlib_free_buffers( FILE *fp ) { 1964: e92d4010 push {r4, lr} 1968: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 196c: eb00280b bl b9a0 1970: e3500002 cmp r0, #2 1974: 8a00000b bhi 19a8 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1978: e1d430bc ldrh r3, [r4, #12] 197c: e3130080 tst r3, #128 ; 0x80 1980: 0a00000a beq 19b0 free( fp->_bf._base ); 1984: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 1988: eb001b48 bl 86b0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 198c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1990: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1994: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1998: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 199c: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 19a0: e5843000 str r3, [r4] <== NOT EXECUTED 19a4: ea000001 b 19b0 <== NOT EXECUTED } break; default: fclose(fp); 19a8: e1a00004 mov r0, r4 <== NOT EXECUTED 19ac: eb002749 bl b6d8 <== NOT EXECUTED } return 0; } 19b0: e3a00000 mov r0, #0 19b4: e8bd8010 pop {r4, pc} 00001bd8 : int open( const char *pathname, int flags, ... ) { 1bd8: e92d000e push {r1, r2, r3} 1bdc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1be0: e24dd01c sub sp, sp, #28 1be4: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1be8: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 1bec: e2138001 ands r8, r3, #1 1bf0: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1bf4: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1bf8: 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; 1bfc: 13888002 orrne r8, r8, #2 int open( const char *pathname, int flags, ... ) { 1c00: e1a06000 mov r6, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1c04: e58d3018 str r3, [sp, #24] 1c08: 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(); 1c0c: eb001b8d bl 8a48 if ( iop == 0 ) { 1c10: e2504000 subs r4, r0, #0 1c14: 03a05017 moveq r5, #23 1c18: 0a000077 beq 1dfc /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 1c1c: e1a00006 mov r0, r6 1c20: eb002a50 bl c568 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c24: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 1c28: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c2c: e1a02008 mov r2, r8 1c30: e1a00006 mov r0, r6 1c34: e3a08001 mov r8, #1 1c38: e1a03007 mov r3, r7 1c3c: e58d8000 str r8, [sp] 1c40: ebfffd90 bl 1288 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1c44: e3700001 cmn r0, #1 1c48: 1a00001f bne 1ccc if ( errno != ENOENT ) { 1c4c: eb002654 bl b5a4 <__errno> 1c50: e5903000 ldr r3, [r0] 1c54: e3530002 cmp r3, #2 1c58: 1a00000a bne 1c88 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c5c: e215ac02 ands sl, r5, #512 ; 0x200 1c60: 01a0700a moveq r7, sl 1c64: 01a05003 moveq r5, r3 1c68: 0a000056 beq 1dc8 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c6c: e1a00006 mov r0, r6 1c70: e3891902 orr r1, r9, #32768 ; 0x8000 1c74: e3a02000 mov r2, #0 1c78: e3a03000 mov r3, #0 1c7c: ebfffe21 bl 1508 if ( rc ) { 1c80: e250a000 subs sl, r0, #0 1c84: 0a000003 beq 1c98 rc = errno; 1c88: eb002645 bl b5a4 <__errno> 1c8c: e3a07000 mov r7, #0 1c90: e5905000 ldr r5, [r0] goto done; 1c94: ea000049 b 1dc0 } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1c98: e1a00006 mov r0, r6 1c9c: eb002a31 bl c568 1ca0: e1a03007 mov r3, r7 1ca4: e1a01000 mov r1, r0 1ca8: e1a0200a mov r2, sl 1cac: e1a00006 mov r0, r6 1cb0: e58d8000 str r8, [sp] 1cb4: ebfffd73 bl 1288 if ( status != 0 ) { /* The file did not exist */ 1cb8: e3500000 cmp r0, #0 1cbc: 11a0700a movne r7, sl 1cc0: 13a0500d movne r5, #13 1cc4: 1a00003f bne 1dc8 1cc8: ea000003 b 1cdc rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1ccc: e2053c0a and r3, r5, #2560 ; 0xa00 1cd0: e3530c0a cmp r3, #2560 ; 0xa00 1cd4: 03a05011 moveq r5, #17 1cd8: 0a00003a beq 1dc8 * 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; 1cdc: e28d701c add r7, sp, #28 1ce0: e5373018 ldr r3, [r7, #-24]! 1ce4: 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; 1ce8: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cec: e1a00005 mov r0, r5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1cf0: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cf4: e5948014 ldr r8, [r4, #20] 1cf8: eb001b7f bl 8afc 1cfc: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 1d00: e8b7000f ldm r7!, {r0, r1, r2, r3} 1d04: e284c018 add ip, r4, #24 1d08: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 1d0c: 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; 1d10: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 1d14: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1d18: 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 ); 1d1c: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 1d20: 0a000041 beq 1e2c 1d24: e593c000 ldr ip, [r3] 1d28: e35c0000 cmp ip, #0 1d2c: 0a00003e beq 1e2c rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1d30: e1a01006 mov r1, r6 1d34: e1a03009 mov r3, r9 1d38: e1a00004 mov r0, r4 1d3c: e1a02005 mov r2, r5 1d40: e1a0e00f mov lr, pc 1d44: e12fff1c bx ip if ( rc ) { 1d48: e3500000 cmp r0, #0 1d4c: 0a000003 beq 1d60 rc = errno; 1d50: eb002613 bl b5a4 <__errno> 1d54: e28d7004 add r7, sp, #4 1d58: e5905000 ldr r5, [r0] goto done; 1d5c: ea000017 b 1dc0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1d60: e3150b01 tst r5, #1024 ; 0x400 1d64: 0a000028 beq 1e0c rc = ftruncate( iop - rtems_libio_iops, 0 ); 1d68: e59f30c8 ldr r3, [pc, #200] ; 1e38 1d6c: e5930000 ldr r0, [r3] 1d70: e0600004 rsb r0, r0, r4 1d74: e1a00340 asr r0, r0, #6 1d78: e3a01000 mov r1, #0 1d7c: e3a02000 mov r2, #0 1d80: eb001a73 bl 8754 if ( rc ) { 1d84: e2505000 subs r5, r0, #0 1d88: 0a00001f beq 1e0c if(errno) rc = errno; 1d8c: eb002604 bl b5a4 <__errno> <== NOT EXECUTED 1d90: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d94: e3530000 cmp r3, #0 <== NOT EXECUTED 1d98: 0a000001 beq 1da4 <== NOT EXECUTED 1d9c: eb002600 bl b5a4 <__errno> <== NOT EXECUTED 1da0: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 1da4: e59f308c ldr r3, [pc, #140] ; 1e38 <== NOT EXECUTED 1da8: e5933000 ldr r3, [r3] <== NOT EXECUTED 1dac: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 1db0: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 1db4: eb001a14 bl 860c <== NOT EXECUTED 1db8: e3a04000 mov r4, #0 <== NOT EXECUTED 1dbc: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1dc0: e3550000 cmp r5, #0 1dc4: 0a000010 beq 1e0c if ( iop ) 1dc8: e3540000 cmp r4, #0 rtems_libio_free( iop ); 1dcc: 11a00004 movne r0, r4 1dd0: 1b001b05 blne 89ec if ( loc_to_free ) 1dd4: e3570000 cmp r7, #0 1dd8: 0a000007 beq 1dfc rtems_filesystem_freenode( loc_to_free ); 1ddc: e597300c ldr r3, [r7, #12] 1de0: e3530000 cmp r3, #0 1de4: 0a000004 beq 1dfc 1de8: e593301c ldr r3, [r3, #28] 1dec: e3530000 cmp r3, #0 1df0: 11a00007 movne r0, r7 1df4: 11a0e00f movne lr, pc 1df8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1dfc: eb0025e8 bl b5a4 <__errno> 1e00: e5805000 str r5, [r0] 1e04: e3e00000 mvn r0, #0 1e08: ea000003 b 1e1c } return iop - rtems_libio_iops; 1e0c: e59f3024 ldr r3, [pc, #36] ; 1e38 1e10: e5930000 ldr r0, [r3] 1e14: e0604004 rsb r4, r0, r4 1e18: e1a00344 asr r0, r4, #6 } 1e1c: e28dd01c add sp, sp, #28 1e20: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1e24: e28dd00c add sp, sp, #12 1e28: 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; 1e2c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 1e30: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 1e34: eaffffe3 b 1dc8 <== NOT EXECUTED 1e38: 000185a8 .word 0x000185a8 00001b74 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1b74: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1b78: 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) { 1b7c: e59f0048 ldr r0, [pc, #72] ; 1bcc 1b80: e1a02001 mov r2, r1 1b84: eb000013 bl 1bd8 1b88: e3700001 cmn r0, #1 1b8c: 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) 1b90: e59f0034 ldr r0, [pc, #52] ; 1bcc 1b94: e3a01001 mov r1, #1 1b98: e3a02000 mov r2, #0 1b9c: eb00000d bl 1bd8 1ba0: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 1ba4: 059f0024 ldreq r0, [pc, #36] ; 1bd0 /* * 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) 1ba8: 0a000006 beq 1bc8 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1bac: e59f0018 ldr r0, [pc, #24] ; 1bcc 1bb0: e3a01001 mov r1, #1 1bb4: e3a02000 mov r2, #0 1bb8: eb000006 bl 1bd8 1bbc: e3700001 cmn r0, #1 1bc0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 1bc4: e59f0008 ldr r0, [pc, #8] ; 1bd4 <== NOT EXECUTED 1bc8: eb000b35 bl 48a4 <== NOT EXECUTED 1bcc: 00017eeb .word 0x00017eeb 1bd0: 55544431 .word 0x55544431 1bd4: 55544432 .word 0x55544432 00002500 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2500: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2504: e5913034 ldr r3, [r1, #52] ; 0x34 2508: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 250c: e1a04001 mov r4, r1 2510: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2514: 0a000047 beq 2638 switch (c) { 2518: e5dd2000 ldrb r2, [sp] 251c: e2421008 sub r1, r2, #8 2520: e3510005 cmp r1, #5 2524: 979ff101 ldrls pc, [pc, r1, lsl #2] 2528: ea00002e b 25e8 252c: 000025d4 .word 0x000025d4 <== NOT EXECUTED 2530: 000025a8 .word 0x000025a8 <== NOT EXECUTED 2534: 00002544 .word 0x00002544 <== NOT EXECUTED 2538: 000025e8 .word 0x000025e8 <== NOT EXECUTED 253c: 000025e8 .word 0x000025e8 <== NOT EXECUTED 2540: 00002570 .word 0x00002570 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2544: e3130020 tst r3, #32 tty->column = 0; 2548: 13a03000 movne r3, #0 254c: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 2550: e5943034 ldr r3, [r4, #52] ; 0x34 2554: e3130004 tst r3, #4 2558: 0a000036 beq 2638 rtems_termios_puts ("\r", 1, tty); 255c: e59f00e8 ldr r0, [pc, #232] ; 264c 2560: e3a01001 mov r1, #1 2564: e1a02004 mov r2, r4 2568: ebffffa0 bl 23f0 256c: ea00000b b 25a0 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2570: e3130010 tst r3, #16 <== NOT EXECUTED 2574: 0a000002 beq 2584 <== NOT EXECUTED 2578: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 257c: e3520000 cmp r2, #0 <== NOT EXECUTED 2580: 0a000030 beq 2648 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2584: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 2588: 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) { 258c: 0a000029 beq 2638 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 2590: 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'; 2594: e3a0300a mov r3, #10 <== NOT EXECUTED 2598: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 259c: 0a000025 beq 2638 <== NOT EXECUTED tty->column = 0; 25a0: e3a03000 mov r3, #0 25a4: ea000022 b 2634 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25a8: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25ac: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b0: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25b4: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b8: e2611008 rsb r1, r1, #8 25bc: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25c0: 1a00001b bne 2634 tty->column += i; 25c4: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 25c8: e1a02004 mov r2, r4 25cc: e59f007c ldr r0, [pc, #124] ; 2650 25d0: ea00001b b 2644 } tty->column += i; break; case '\b': if (tty->column > 0) 25d4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 25d8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 25dc: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 25e0: ca000013 bgt 2634 <== NOT EXECUTED 25e4: ea000013 b 2638 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 25e8: e3130002 tst r3, #2 25ec: 0a000007 beq 2610 c = toupper(c); 25f0: e59f305c ldr r3, [pc, #92] ; 2654 <== NOT EXECUTED 25f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 25f8: e0833002 add r3, r3, r2 <== NOT EXECUTED 25fc: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 2600: e2033003 and r3, r3, #3 <== NOT EXECUTED 2604: e3530002 cmp r3, #2 <== NOT EXECUTED 2608: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 260c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 2610: e59f303c ldr r3, [pc, #60] ; 2654 2614: e5932000 ldr r2, [r3] 2618: e5dd3000 ldrb r3, [sp] 261c: e0823003 add r3, r2, r3 2620: e5d33001 ldrb r3, [r3, #1] 2624: e3130020 tst r3, #32 2628: 1a000002 bne 2638 tty->column++; 262c: e5943028 ldr r3, [r4, #40] ; 0x28 2630: e2833001 add r3, r3, #1 2634: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2638: e1a02004 mov r2, r4 263c: e1a0000d mov r0, sp 2640: e3a01001 mov r1, #1 2644: ebffff69 bl 23f0 } 2648: e8bd8018 pop {r3, r4, pc} 264c: 0001805b .word 0x0001805b 2650: 00017f2c .word 0x00017f2c 2654: 000171ec .word 0x000171ec 0000b0c8 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { b0c8: e92d4070 push {r4, r5, r6, lr} b0cc: 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) b0d0: e28d5004 add r5, sp, #4 b0d4: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { b0d8: 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) b0dc: e3a01003 mov r1, #3 b0e0: e59f0140 ldr r0, [pc, #320] ; b228 b0e4: e3a02007 mov r2, #7 b0e8: e1a03005 mov r3, r5 b0ec: e58dc000 str ip, [sp] b0f0: ebffd864 bl 1288 b0f4: e3500000 cmp r0, #0 b0f8: 0a000009 beq b124 != 0) { if (errno != ENOENT) b0fc: eb000128 bl b5a4 <__errno> b100: e5903000 ldr r3, [r0] b104: e3530002 cmp r3, #2 b108: 1a000043 bne b21c return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) b10c: e59f0114 ldr r0, [pc, #276] ; b228 b110: e59f1114 ldr r1, [pc, #276] ; b22c b114: ebffd8f7 bl 14f8 b118: e3500000 cmp r0, #0 b11c: 0a000008 beq b144 b120: ea00003d b b21c <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); b124: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED b128: e3530000 cmp r3, #0 <== NOT EXECUTED b12c: 0a000004 beq b144 <== NOT EXECUTED b130: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b134: e3530000 cmp r3, #0 <== NOT EXECUTED b138: 11a00005 movne r0, r5 <== NOT EXECUTED b13c: 11a0e00f movne lr, pc <== NOT EXECUTED b140: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); b144: e28d5018 add r5, sp, #24 b148: e59f10e0 ldr r1, [pc, #224] ; b230 b14c: e3a0200a mov r2, #10 b150: e1a00005 mov r0, r5 b154: eb000320 bl bddc sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); b158: e59f30d4 ldr r3, [pc, #212] ; b234 b15c: e1d3c0b0 ldrh ip, [r3] b160: e1a0200c mov r2, ip b164: e28cc001 add ip, ip, #1 b168: e59f10c8 ldr r1, [pc, #200] ; b238 b16c: e1c3c0b0 strh ip, [r3] b170: e285000a add r0, r5, #10 b174: eb0003be bl c074 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { b178: e1a00005 mov r0, r5 b17c: e3a01d06 mov r1, #384 ; 0x180 b180: eb00003f bl b284 b184: e2506000 subs r6, r0, #0 b188: 0a000001 beq b194 if (errno != EEXIST){ b18c: eb000104 bl b5a4 <__errno> <== NOT EXECUTED b190: ea000021 b b21c <== 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); b194: e1a00005 mov r0, r5 b198: e3a01901 mov r1, #16384 ; 0x4000 b19c: ebffda8d bl 1bd8 if (filsdes[0] < 0) { b1a0: 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); b1a4: e5840000 str r0, [r4] if (filsdes[0] < 0) { b1a8: aa000003 bge b1bc err = errno; b1ac: eb0000fc bl b5a4 <__errno> b1b0: 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); b1b4: e1a00005 mov r0, r5 b1b8: ea000014 b b210 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); b1bc: e59f3078 ldr r3, [pc, #120] ; b23c <== NOT EXECUTED b1c0: e5933000 ldr r3, [r3] <== NOT EXECUTED b1c4: e1500003 cmp r0, r3 <== NOT EXECUTED b1c8: 359f3070 ldrcc r3, [pc, #112] ; b240 <== NOT EXECUTED b1cc: 35936000 ldrcc r6, [r3] <== NOT EXECUTED b1d0: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; b1d4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED b1d8: e3c33001 bic r3, r3, #1 <== NOT EXECUTED b1dc: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); b1e0: e28d0018 add r0, sp, #24 <== NOT EXECUTED b1e4: e3a01001 mov r1, #1 <== NOT EXECUTED b1e8: ebffda7a bl 1bd8 <== NOT EXECUTED if (filsdes[1] < 0) { b1ec: 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); b1f0: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { b1f4: a3a06000 movge r6, #0 <== NOT EXECUTED b1f8: aa000003 bge b20c <== NOT EXECUTED err = errno; b1fc: eb0000e8 bl b5a4 <__errno> <== NOT EXECUTED b200: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); b204: e5940000 ldr r0, [r4] <== NOT EXECUTED b208: ebfff4ff bl 860c <== NOT EXECUTED } unlink(fifopath); b20c: e28d0018 add r0, sp, #24 <== NOT EXECUTED b210: eb00001f bl b294 } rtems_set_errno_and_return_minus_one(err); b214: eb0000e2 bl b5a4 <__errno> b218: e5806000 str r6, [r0] } b21c: e3e00000 mvn r0, #0 b220: e28dd028 add sp, sp, #40 ; 0x28 b224: e8bd8070 pop {r4, r5, r6, pc} b228: 000181a4 .word 0x000181a4 b22c: 000003ff .word 0x000003ff b230: 000181a9 .word 0x000181a9 b234: 0001852a .word 0x0001852a b238: 000181b4 .word 0x000181b4 b23c: 00016ff0 .word 0x00016ff0 b240: 000185a8 .word 0x000185a8 0000a288 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { a288: e92d4010 push {r4, lr} <== NOT EXECUTED a28c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); a290: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED a294: eb000202 bl aaa4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); a298: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a29c: eb000200 bl aaa4 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); a2a0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a2a4: ebffe7c4 bl 41bc <== NOT EXECUTED free(pipe->Buffer); a2a8: e5940000 ldr r0, [r4] <== NOT EXECUTED a2ac: ebfff8ff bl 86b0 <== NOT EXECUTED free(pipe); a2b0: e1a00004 mov r0, r4 <== NOT EXECUTED } a2b4: 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); a2b8: eafff8fc b 86b0 <== NOT EXECUTED 00009f28 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 9f28: e59f3054 ldr r3, [pc, #84] ; 9f84 <== NOT EXECUTED 9f2c: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 9f30: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 9f34: e1a04000 mov r4, r0 <== NOT EXECUTED 9f38: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { 9f3c: 13e00015 mvnne r0, #21 <== NOT EXECUTED 9f40: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) 9f44: e3520000 cmp r2, #0 <== NOT EXECUTED 9f48: 03e0000d mvneq r0, #13 <== NOT EXECUTED 9f4c: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 9f50: e3a01000 mov r1, #0 <== NOT EXECUTED 9f54: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 9f58: e1a02001 mov r2, r1 <== NOT EXECUTED 9f5c: ebffe8bd bl 4258 <== NOT EXECUTED 9f60: e2506000 subs r6, r0, #0 <== NOT EXECUTED 9f64: 13e00003 mvnne r0, #3 <== NOT EXECUTED 9f68: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 9f6c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); 9f70: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 9f74: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); 9f78: ebffe8fc bl 4370 <== NOT EXECUTED 9f7c: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } 9f80: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 9f84: 4004667f .word 0x4004667f 00009ec0 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 9ec0: e3e0001c mvn r0, #28 <== NOT EXECUTED 9ec4: e12fff1e bx lr <== NOT EXECUTED 0000a118 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a118: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a11c: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a120: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a124: e1a04000 mov r4, r0 <== NOT EXECUTED a128: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a12c: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a130: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a134: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a138: ebffe846 bl 4258 <== NOT EXECUTED a13c: e2506000 subs r6, r0, #0 <== NOT EXECUTED a140: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a144: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a148: 0a000045 beq a264 <== NOT EXECUTED a14c: ea00004b b a280 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a150: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a154: e3530000 cmp r3, #0 <== NOT EXECUTED a158: 0a000043 beq a26c <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { a15c: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED a160: e2177001 ands r7, r7, #1 <== NOT EXECUTED a164: 13e0700a mvnne r7, #10 <== NOT EXECUTED a168: 1a000040 bne a270 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a16c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a170: e2833001 add r3, r3, #1 <== NOT EXECUTED a174: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); a178: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a17c: ebffe87b bl 4370 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a180: e1a01007 mov r1, r7 <== NOT EXECUTED a184: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a188: eb000273 bl ab5c <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a18c: e1a01007 mov r1, r7 <== NOT EXECUTED a190: 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)) a194: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a198: 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)) a19c: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a1a0: ebffe82c bl 4258 <== NOT EXECUTED a1a4: e3500000 cmp r0, #0 <== NOT EXECUTED a1a8: 13e07003 mvnne r7, #3 <== NOT EXECUTED a1ac: 1a000031 bne a278 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a1b0: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a1b4: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a1b8: e2433001 sub r3, r3, #1 <== NOT EXECUTED a1bc: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a1c0: 1a00002a bne a270 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a1c4: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a1c8: e3520000 cmp r2, #0 <== NOT EXECUTED a1cc: 0affffdf beq a150 <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; a1d0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a1d4: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a1d8: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a1dc: e1520007 cmp r2, r7 <== NOT EXECUTED a1e0: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; a1e4: e0638008 rsb r8, r3, r8 <== NOT EXECUTED a1e8: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { a1ec: e1570008 cmp r7, r8 <== NOT EXECUTED a1f0: 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); a1f4: d0811003 addle r1, r1, r3 <== NOT EXECUTED a1f8: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { a1fc: da000006 ble a21c <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); a200: e0811003 add r1, r1, r3 <== NOT EXECUTED a204: e1a02008 mov r2, r8 <== NOT EXECUTED a208: eb0006f3 bl bddc <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); a20c: e0860008 add r0, r6, r8 <== NOT EXECUTED a210: e5941000 ldr r1, [r4] <== NOT EXECUTED a214: e0890000 add r0, r9, r0 <== NOT EXECUTED a218: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); a21c: eb0006ee bl bddc <== NOT EXECUTED pipe->Start += chunk; a220: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a224: e0870000 add r0, r7, r0 <== NOT EXECUTED a228: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; a22c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED a230: eb002ae2 bl 14dc0 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; a234: e594300c ldr r3, [r4, #12] <== NOT EXECUTED a238: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) a23c: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; a240: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; a244: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; a248: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) a24c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED a250: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); a254: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED a258: 11a0100d movne r1, sp <== NOT EXECUTED a25c: 1b000228 blne ab04 <== NOT EXECUTED read += chunk; a260: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { a264: e1560005 cmp r6, r5 <== NOT EXECUTED a268: 3affffd5 bcc a1c4 <== NOT EXECUTED a26c: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); a270: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a274: ebffe83d bl 4370 <== NOT EXECUTED out_nolock: if (read > 0) a278: e3560000 cmp r6, #0 <== NOT EXECUTED a27c: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } a280: e1a00006 mov r0, r6 <== NOT EXECUTED a284: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000a2bc : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2bc: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; a2c0: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2c4: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, a2c8: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a2cc: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, a2d0: e1a02001 mov r2, r1 <== NOT EXECUTED a2d4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a2d8: ebffe7de bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) a2dc: e3500000 cmp r0, #0 <== NOT EXECUTED a2e0: 1a000010 bne a328 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); a2e4: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) a2e8: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; a2ec: 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); a2f0: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; a2f4: 12433001 subne r3, r3, #1 <== NOT EXECUTED a2f8: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) a2fc: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; a300: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED a304: 12433001 subne r3, r3, #1 <== NOT EXECUTED a308: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, a30c: e59f30a0 ldr r3, [pc, #160] ; a3b4 <== NOT EXECUTED a310: e3a01000 mov r1, #0 <== NOT EXECUTED a314: e5930000 ldr r0, [r3] <== NOT EXECUTED a318: e1a02001 mov r2, r1 <== NOT EXECUTED a31c: ebffe7cd bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) a320: e3500000 cmp r0, #0 <== NOT EXECUTED a324: 0a000000 beq a32c <== NOT EXECUTED rtems_fatal_error_occurred(sc); a328: ebffe95d bl 48a4 <== NOT EXECUTED PIPE_UNLOCK(pipe); a32c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a330: ebffe80e bl 4370 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { a334: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a338: e3530000 cmp r3, #0 <== NOT EXECUTED a33c: 1a000006 bne a35c <== NOT EXECUTED a340: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED a344: e3570000 cmp r7, #0 <== NOT EXECUTED a348: 1a000003 bne a35c <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); a34c: e1a00004 mov r0, r4 <== NOT EXECUTED a350: ebffffcc bl a288 <== NOT EXECUTED *pipep = NULL; a354: 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) { a358: ea000010 b a3a0 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) a35c: e2552004 subs r2, r5, #4 <== NOT EXECUTED a360: 13a02001 movne r2, #1 <== NOT EXECUTED a364: e3530000 cmp r3, #0 <== NOT EXECUTED a368: 13a02000 movne r2, #0 <== NOT EXECUTED a36c: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); a370: 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) a374: 1a000007 bne a398 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) a378: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED a37c: e2553002 subs r3, r5, #2 <== NOT EXECUTED a380: 13a03001 movne r3, #1 <== NOT EXECUTED a384: e3520000 cmp r2, #0 <== NOT EXECUTED a388: 13a03000 movne r3, #0 <== NOT EXECUTED a38c: e3530000 cmp r3, #0 <== NOT EXECUTED a390: 0a000002 beq a3a0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); a394: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a398: e1a0100d mov r1, sp <== NOT EXECUTED a39c: eb0001d8 bl ab04 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); a3a0: e59f300c ldr r3, [pc, #12] ; a3b4 <== NOT EXECUTED a3a4: e5930000 ldr r0, [r3] <== NOT EXECUTED a3a8: ebffe7f0 bl 4370 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } a3ac: e3a00000 mov r0, #0 <== NOT EXECUTED a3b0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED a3b4: 00018524 .word 0x00018524 00009f88 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 9f88: 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) 9f8c: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 9f90: e1a04000 mov r4, r0 <== NOT EXECUTED 9f94: e1a0b001 mov fp, r1 <== NOT EXECUTED 9f98: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 9f9c: 01a06005 moveq r6, r5 <== NOT EXECUTED 9fa0: 0a00005a beq a110 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 9fa4: e3a01000 mov r1, #0 <== NOT EXECUTED 9fa8: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED 9fac: e1a02001 mov r2, r1 <== NOT EXECUTED 9fb0: ebffe8a8 bl 4258 <== NOT EXECUTED 9fb4: e3500000 cmp r0, #0 <== NOT EXECUTED 9fb8: 13e06003 mvnne r6, #3 <== NOT EXECUTED 9fbc: 1a000053 bne a110 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 9fc0: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED 9fc4: e3560000 cmp r6, #0 <== NOT EXECUTED 9fc8: 0a000022 beq a058 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 9fcc: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED 9fd0: e1550009 cmp r5, r9 <== NOT EXECUTED 9fd4: 91a09005 movls r9, r5 <== NOT EXECUTED 9fd8: 83a09001 movhi r9, #1 <== NOT EXECUTED 9fdc: e1a06000 mov r6, r0 <== NOT EXECUTED 9fe0: ea000043 b a0f4 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 9fe4: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED 9fe8: e2177001 ands r7, r7, #1 <== NOT EXECUTED 9fec: 13e0700a mvnne r7, #10 <== NOT EXECUTED 9ff0: 1a000042 bne a100 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 9ff4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED 9ff8: e2833001 add r3, r3, #1 <== NOT EXECUTED 9ffc: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); a000: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a004: ebffe8d9 bl 4370 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) a008: e1a01007 mov r1, r7 <== NOT EXECUTED a00c: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED a010: eb0002d1 bl ab5c <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a014: e1a01007 mov r1, r7 <== NOT EXECUTED a018: 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)) a01c: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a020: 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)) a024: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a028: ebffe88a bl 4258 <== NOT EXECUTED a02c: e3500000 cmp r0, #0 <== NOT EXECUTED a030: 13e07003 mvnne r7, #3 <== NOT EXECUTED a034: 1a000033 bne a108 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a038: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) a03c: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a040: e2433001 sub r3, r3, #1 <== NOT EXECUTED a044: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) a048: 1a00002c bne a100 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { a04c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED a050: e3530000 cmp r3, #0 <== NOT EXECUTED a054: 1a000001 bne a060 <== NOT EXECUTED a058: e3e0701f mvn r7, #31 <== NOT EXECUTED a05c: ea000027 b a100 <== 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) { a060: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED a064: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a068: e062300a rsb r3, r2, sl <== NOT EXECUTED a06c: e1530009 cmp r3, r9 <== NOT EXECUTED a070: 3affffdb bcc 9fe4 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a074: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED a078: e1a0100a mov r1, sl <== NOT EXECUTED a07c: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a080: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a084: e1530007 cmp r3, r7 <== NOT EXECUTED a088: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); a08c: eb002b4b bl 14dc0 <__umodsi3> <== NOT EXECUTED a090: e5943000 ldr r3, [r4] <== NOT EXECUTED a094: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { a098: e157000a cmp r7, sl <== NOT EXECUTED a09c: 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); a0a0: d0830000 addle r0, r3, r0 <== NOT EXECUTED a0a4: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { a0a8: da000006 ble a0c8 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); a0ac: e1a0200a mov r2, sl <== NOT EXECUTED a0b0: e0830000 add r0, r3, r0 <== NOT EXECUTED a0b4: eb000748 bl bddc <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); a0b8: e08a1006 add r1, sl, r6 <== NOT EXECUTED a0bc: e5940000 ldr r0, [r4] <== NOT EXECUTED a0c0: e08b1001 add r1, fp, r1 <== NOT EXECUTED a0c4: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); a0c8: eb000743 bl bddc <== NOT EXECUTED pipe->Length += chunk; a0cc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) a0d0: 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; a0d4: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) a0d8: 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; a0dc: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); a0e0: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED a0e4: 11a0100d movne r1, sp <== NOT EXECUTED a0e8: 1b000285 blne ab04 <== NOT EXECUTED written += chunk; a0ec: e0866007 add r6, r6, r7 <== NOT EXECUTED a0f0: 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) { a0f4: e1560005 cmp r6, r5 <== NOT EXECUTED a0f8: 3affffd8 bcc a060 <== NOT EXECUTED a0fc: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); a100: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a104: ebffe899 bl 4370 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) a108: e3560000 cmp r6, #0 <== NOT EXECUTED a10c: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } a110: e1a00006 mov r0, r6 <== NOT EXECUTED a114: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0001672c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1672c: e59f30b0 ldr r3, [pc, #176] ; 167e4 16730: e5933000 ldr r3, [r3] 16734: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 16738: e92d4070 push {r4, r5, r6, lr} 1673c: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16740: 2a000005 bcs 1675c iop = rtems_libio_iop( fd ); 16744: e59f309c ldr r3, [pc, #156] ; 167e8 16748: e5934000 ldr r4, [r3] 1674c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 16750: e5943014 ldr r3, [r4, #20] 16754: e3130c01 tst r3, #256 ; 0x100 16758: 1a000002 bne 16768 1675c: ebffd390 bl b5a4 <__errno> 16760: e3a03009 mov r3, #9 16764: ea00000f b 167a8 rtems_libio_check_buffer( buffer ); 16768: e3510000 cmp r1, #0 1676c: 0a000004 beq 16784 rtems_libio_check_count( count ); 16770: e3520000 cmp r2, #0 16774: 01a00002 moveq r0, r2 16778: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1677c: e3130002 tst r3, #2 16780: 1a000002 bne 16790 16784: ebffd386 bl b5a4 <__errno> <== NOT EXECUTED 16788: e3a03016 mov r3, #22 <== NOT EXECUTED 1678c: ea000005 b 167a8 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 16790: e594303c ldr r3, [r4, #60] ; 0x3c 16794: e5933008 ldr r3, [r3, #8] 16798: e3530000 cmp r3, #0 1679c: 1a000004 bne 167b4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 167a0: ebffd37f bl b5a4 <__errno> <== NOT EXECUTED 167a4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 167a8: e5803000 str r3, [r0] 167ac: e3e00000 mvn r0, #0 167b0: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 167b4: e1a00004 mov r0, r4 167b8: e1a0e00f mov lr, pc 167bc: e12fff13 bx r3 if ( rc > 0 ) 167c0: e3500000 cmp r0, #0 167c4: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 167c8: e284600c add r6, r4, #12 167cc: e8960060 ldm r6, {r5, r6} 167d0: e0952000 adds r2, r5, r0 167d4: e0a63fc0 adc r3, r6, r0, asr #31 167d8: e584200c str r2, [r4, #12] 167dc: e5843010 str r3, [r4, #16] return rc; } 167e0: e8bd8070 pop {r4, r5, r6, pc} 167e4: 00016ff0 .word 0x00016ff0 167e8: 000185a8 .word 0x000185a8 000232c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 232c4: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 232c8: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 232cc: e24dd018 sub sp, sp, #24 232d0: e1a05002 mov r5, r2 232d4: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 232d8: 1a000002 bne 232e8 rtems_set_errno_and_return_minus_one( EFAULT ); 232dc: eb005251 bl 37c28 <__errno> <== NOT EXECUTED 232e0: e3a0300e mov r3, #14 <== NOT EXECUTED 232e4: ea000028 b 2338c <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 232e8: eb006cc8 bl 3e610 232ec: e28d4004 add r4, sp, #4 232f0: e3a0c000 mov ip, #0 232f4: e1a01000 mov r1, r0 232f8: e1a0200c mov r2, ip 232fc: e1a00007 mov r0, r7 23300: e1a03004 mov r3, r4 23304: e58dc000 str ip, [sp] 23308: ebff8789 bl 5134 0, &loc, false ); if ( result != 0 ) 2330c: e3500000 cmp r0, #0 23310: 1a00001e bne 23390 return -1; if ( !loc.ops->node_type_h ){ 23314: e59d2010 ldr r2, [sp, #16] 23318: e5923010 ldr r3, [r2, #16] 2331c: e3530000 cmp r3, #0 23320: 0a000012 beq 23370 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 23324: e1a00004 mov r0, r4 23328: e1a0e00f mov lr, pc 2332c: e12fff13 bx r3 23330: e3500004 cmp r0, #4 23334: e59d2010 ldr r2, [sp, #16] 23338: 0a000009 beq 23364 rtems_filesystem_freenode( &loc ); 2333c: e3520000 cmp r2, #0 23340: 0a000004 beq 23358 23344: e592301c ldr r3, [r2, #28] 23348: e3530000 cmp r3, #0 2334c: 11a00004 movne r0, r4 23350: 11a0e00f movne lr, pc 23354: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 23358: eb005232 bl 37c28 <__errno> 2335c: e3a03016 mov r3, #22 23360: ea000009 b 2338c } if ( !loc.ops->readlink_h ){ 23364: e592303c ldr r3, [r2, #60] ; 0x3c 23368: e3530000 cmp r3, #0 2336c: 1a000009 bne 23398 rtems_filesystem_freenode( &loc ); 23370: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23374: e3530000 cmp r3, #0 <== NOT EXECUTED 23378: 11a00004 movne r0, r4 <== NOT EXECUTED 2337c: 11a0e00f movne lr, pc <== NOT EXECUTED 23380: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23384: eb005227 bl 37c28 <__errno> <== NOT EXECUTED 23388: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2338c: e5803000 str r3, [r0] 23390: e3e05000 mvn r5, #0 23394: ea00000d b 233d0 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 23398: e1a02005 mov r2, r5 2339c: e1a01006 mov r1, r6 233a0: e1a00004 mov r0, r4 233a4: e1a0e00f mov lr, pc 233a8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 233ac: e59d3010 ldr r3, [sp, #16] 233b0: 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 ); 233b4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 233b8: 0a000004 beq 233d0 233bc: e593301c ldr r3, [r3, #28] 233c0: e3530000 cmp r3, #0 233c4: 11a00004 movne r0, r4 233c8: 11a0e00f movne lr, pc 233cc: 112fff13 bxne r3 return result; } 233d0: e1a00005 mov r0, r5 233d4: e28dd018 add sp, sp, #24 233d8: e8bd80f0 pop {r4, r5, r6, r7, pc} 00003320 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3320: e59f3138 ldr r3, [pc, #312] ; 3460 3324: e5933000 ldr r3, [r3] 3328: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 332c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3330: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3334: 2a000005 bcs 3350 iop = rtems_libio_iop( fd ); 3338: e59f3124 ldr r3, [pc, #292] ; 3464 333c: e5936000 ldr r6, [r3] 3340: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3344: e5963014 ldr r3, [r6, #20] 3348: e3130c01 tst r3, #256 ; 0x100 334c: 1a000002 bne 335c 3350: eb0029ad bl da0c <__errno> <== NOT EXECUTED 3354: e3a03009 mov r3, #9 <== NOT EXECUTED 3358: ea00001e b 33d8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 335c: e3130002 tst r3, #2 3360: 0a00001a beq 33d0 /* * Argument validation on IO vector */ if ( !iov ) 3364: e3510000 cmp r1, #0 3368: 0a000018 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 336c: e3520000 cmp r2, #0 3370: da000016 ble 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3374: e3520b01 cmp r2, #1024 ; 0x400 3378: ca000014 bgt 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 337c: e596303c ldr r3, [r6, #60] ; 0x3c 3380: e5933008 ldr r3, [r3, #8] 3384: e3530000 cmp r3, #0 3388: 1a000002 bne 3398 rtems_set_errno_and_return_minus_one( ENOTSUP ); 338c: eb00299e bl da0c <__errno> <== NOT EXECUTED 3390: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3394: ea00000f b 33d8 <== NOT EXECUTED 3398: e3a03000 mov r3, #0 339c: e1a05001 mov r5, r1 33a0: e1a02001 mov r2, r1 33a4: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 33a8: e5920000 ldr r0, [r2] 33ac: 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++ ) { 33b0: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 33b4: 0a000005 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33b8: e592c004 ldr ip, [r2, #4] 33bc: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 33c0: 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 ) 33c4: 0a000001 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 33c8: e1500001 cmp r0, r1 33cc: aa000003 bge 33e0 rtems_set_errno_and_return_minus_one( EINVAL ); 33d0: eb00298d bl da0c <__errno> 33d4: e3a03016 mov r3, #22 33d8: e5803000 str r3, [r0] 33dc: ea00000d b 3418 * 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++ ) { 33e0: e1530008 cmp r3, r8 33e4: e2822008 add r2, r2, #8 33e8: b1a01000 movlt r1, r0 33ec: baffffed blt 33a8 33f0: e3a07000 mov r7, #0 33f4: 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 ); 33f8: e8950006 ldm r5, {r1, r2} 33fc: e596303c ldr r3, [r6, #60] ; 0x3c 3400: e1a00006 mov r0, r6 3404: e1a0e00f mov lr, pc 3408: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 340c: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3410: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3414: aa000001 bge 3420 3418: e3e04000 mvn r4, #0 341c: ea00000d b 3458 return -1; if ( bytes > 0 ) { 3420: 0a000006 beq 3440 iop->offset += bytes; 3424: e286c00c add ip, r6, #12 <== NOT EXECUTED 3428: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 342c: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 3430: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 3434: e586200c str r2, [r6, #12] <== NOT EXECUTED 3438: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 343c: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 3440: e5953004 ldr r3, [r5, #4] 3444: e1500003 cmp r0, r3 3448: 1a000002 bne 3458 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 344c: e1570008 cmp r7, r8 <== NOT EXECUTED 3450: e2855008 add r5, r5, #8 <== NOT EXECUTED 3454: baffffe7 blt 33f8 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 3458: e1a00004 mov r0, r4 345c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 3460: 0001acc0 .word 0x0001acc0 3464: 0001d6bc .word 0x0001d6bc 00016844 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 16844: e59f310c ldr r3, [pc, #268] ; 16958 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 16848: e59f210c ldr r2, [pc, #268] ; 1695c 1684c: e592c000 ldr ip, [r2] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 16850: 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())) { 16854: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 16858: e2822001 add r2, r2, #1 1685c: e92d40f1 push {r0, r4, r5, r6, r7, lr} 16860: e5832010 str r2, [r3, #16] 16864: e1a04000 mov r4, r0 16868: 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())) { 1686c: 1a000007 bne 16890 if (_Thread_Dispatch_disable_level > 0) 16870: e59f30e8 ldr r3, [pc, #232] ; 16960 16874: e5933000 ldr r3, [r3] 16878: e3530000 cmp r3, #0 1687c: 1a000032 bne 1694c return (void *) 0; if (_ISR_Nest_level > 0) 16880: e59f30dc ldr r3, [pc, #220] ; 16964 16884: e5933000 ldr r3, [r3] 16888: e3530000 cmp r3, #0 1688c: 1a00002e bne 1694c } /* * Continue with realloc(). */ if ( !ptr ) 16890: e3540000 cmp r4, #0 16894: 1a000003 bne 168a8 return malloc( size ); 16898: e1a00005 mov r0, r5 1689c: ebffc8c3 bl 8bb0 168a0: e1a04000 mov r4, r0 168a4: ea000029 b 16950 if ( !size ) { 168a8: e3550000 cmp r5, #0 168ac: 1a000003 bne 168c0 free( ptr ); 168b0: e1a00004 mov r0, r4 <== NOT EXECUTED 168b4: ebffc77d bl 86b0 <== NOT EXECUTED 168b8: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 168bc: ea000023 b 16950 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 168c0: e59f60a0 ldr r6, [pc, #160] ; 16968 168c4: e1a01004 mov r1, r4 168c8: e5960000 ldr r0, [r6] 168cc: e1a0200d mov r2, sp 168d0: eb000055 bl 16a2c <_Protected_heap_Get_block_size> 168d4: e2507000 subs r7, r0, #0 168d8: 1a000004 bne 168f0 errno = EINVAL; 168dc: ebffd330 bl b5a4 <__errno> 168e0: e3a03016 mov r3, #22 168e4: e5803000 str r3, [r0] 168e8: e1a04007 mov r4, r7 return (void *) 0; 168ec: ea000017 b 16950 #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 ) ) { 168f0: e5960000 ldr r0, [r6] 168f4: e1a01004 mov r1, r4 168f8: e1a02005 mov r2, r5 168fc: eb00005b bl 16a70 <_Protected_heap_Resize_block> 16900: e3500000 cmp r0, #0 16904: 1a000011 bne 16950 * 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 ); 16908: e1a00005 mov r0, r5 1690c: ebffc8a7 bl 8bb0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 16910: e59f3040 ldr r3, [pc, #64] ; 16958 16914: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 16918: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1691c: e2422001 sub r2, r2, #1 16920: e5832004 str r2, [r3, #4] if ( !new_area ) { 16924: 0a000008 beq 1694c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 16928: e59d2000 ldr r2, [sp] 1692c: e1a01004 mov r1, r4 16930: e1550002 cmp r5, r2 16934: 31a02005 movcc r2, r5 16938: ebffd527 bl bddc free( ptr ); 1693c: e1a00004 mov r0, r4 16940: ebffc75a bl 86b0 16944: e1a04006 mov r4, r6 return new_area; 16948: ea000000 b 16950 1694c: e3a04000 mov r4, #0 } 16950: e1a00004 mov r0, r4 16954: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 16958: 000185b4 .word 0x000185b4 1695c: 000188b0 .word 0x000188b0 16960: 0001870c .word 0x0001870c 16964: 0001879c .word 0x0001879c 16968: 00016ffc .word 0x00016ffc 00006568 : #include int rmdir( const char *pathname ) { 6568: e92d4070 push {r4, r5, r6, lr} 656c: e24dd02c sub sp, sp, #44 ; 0x2c 6570: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 6574: ebfffaa6 bl 5014 if ( parentpathlen == 0 ) 6578: e2505000 subs r5, r0, #0 657c: 1a000019 bne 65e8 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6580: e5d63000 ldrb r3, [r6] 6584: e353002f cmp r3, #47 ; 0x2f 6588: 1353005c cmpne r3, #92 ; 0x5c 658c: 0a000001 beq 6598 6590: e3530000 cmp r3, #0 <== NOT EXECUTED 6594: 1a000009 bne 65c0 <== NOT EXECUTED 6598: e59f325c ldr r3, [pc, #604] ; 67fc 659c: e593e000 ldr lr, [r3] 65a0: e28ee018 add lr, lr, #24 65a4: e8be000f ldm lr!, {r0, r1, r2, r3} 65a8: e28dc018 add ip, sp, #24 65ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 65b0: e59e3000 ldr r3, [lr] 65b4: e3a04000 mov r4, #0 65b8: e58c3000 str r3, [ip] 65bc: ea000013 b 6610 65c0: e59f3234 ldr r3, [pc, #564] ; 67fc <== NOT EXECUTED 65c4: e593e000 ldr lr, [r3] <== NOT EXECUTED 65c8: e28ee004 add lr, lr, #4 <== NOT EXECUTED 65cc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 65d0: e28dc018 add ip, sp, #24 <== NOT EXECUTED 65d4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 65d8: e59e3000 ldr r3, [lr] <== NOT EXECUTED 65dc: e1a04005 mov r4, r5 <== NOT EXECUTED 65e0: e58c3000 str r3, [ip] <== NOT EXECUTED 65e4: ea000009 b 6610 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 65e8: e3a0c000 mov ip, #0 65ec: e1a00006 mov r0, r6 65f0: e1a01005 mov r1, r5 65f4: e3a02002 mov r2, #2 65f8: e28d3018 add r3, sp, #24 65fc: e58dc000 str ip, [sp] 6600: ebfffacb bl 5134 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 6604: e3500000 cmp r0, #0 6608: 1a000077 bne 67ec 660c: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6610: e28de018 add lr, sp, #24 6614: e8be000f ldm lr!, {r0, r1, r2, r3} 6618: e28dc004 add ip, sp, #4 661c: e8ac000f stmia ip!, {r0, r1, r2, r3} 6620: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 6624: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6628: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 662c: e1a00005 mov r0, r5 6630: eb00dff6 bl 3e610 6634: e1a01000 mov r1, r0 6638: e1a00005 mov r0, r5 663c: ebfffa68 bl 4fe4 6640: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6644: e1a00006 mov r0, r6 6648: eb00dff0 bl 3e610 664c: e28d5004 add r5, sp, #4 6650: e3a0c000 mov ip, #0 6654: e1a01000 mov r1, r0 6658: e1a0200c mov r2, ip 665c: e1a00006 mov r0, r6 6660: e1a03005 mov r3, r5 6664: e58dc000 str ip, [sp] 6668: ebfffa79 bl 5054 0, &loc, false ); if ( result != 0 ) { 666c: e3500000 cmp r0, #0 6670: 0a00000b beq 66a4 if ( free_parentloc ) 6674: e3540000 cmp r4, #0 6678: 0a00005b beq 67ec rtems_filesystem_freenode( &parentloc ); 667c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6680: e3530000 cmp r3, #0 <== NOT EXECUTED 6684: 0a000058 beq 67ec <== NOT EXECUTED 6688: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 668c: e3530000 cmp r3, #0 <== NOT EXECUTED 6690: 0a000055 beq 67ec <== NOT EXECUTED 6694: e28d0018 add r0, sp, #24 <== NOT EXECUTED 6698: e1a0e00f mov lr, pc <== NOT EXECUTED 669c: e12fff13 bx r3 <== NOT EXECUTED 66a0: ea000051 b 67ec <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66a4: e59d2010 ldr r2, [sp, #16] 66a8: e5923010 ldr r3, [r2, #16] 66ac: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 66b0: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66b4: 0a000021 beq 6740 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 ){ 66b8: e1a00005 mov r0, r5 66bc: e1a0e00f mov lr, pc 66c0: e12fff13 bx r3 66c4: e3500001 cmp r0, #1 66c8: 0a000014 beq 6720 rtems_filesystem_freenode( &loc ); 66cc: e59d3010 ldr r3, [sp, #16] 66d0: e3530000 cmp r3, #0 66d4: 0a000004 beq 66ec 66d8: e593301c ldr r3, [r3, #28] 66dc: e3530000 cmp r3, #0 66e0: 11a00005 movne r0, r5 66e4: 11a0e00f movne lr, pc 66e8: 112fff13 bxne r3 if ( free_parentloc ) 66ec: e3540000 cmp r4, #0 66f0: 0a000007 beq 6714 rtems_filesystem_freenode( &parentloc ); 66f4: e59d3024 ldr r3, [sp, #36] ; 0x24 66f8: e3530000 cmp r3, #0 66fc: 0a000004 beq 6714 6700: e593301c ldr r3, [r3, #28] 6704: e3530000 cmp r3, #0 6708: 128d0018 addne r0, sp, #24 670c: 11a0e00f movne lr, pc 6710: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 6714: eb00c543 bl 37c28 <__errno> 6718: e3a03014 mov r3, #20 671c: ea000017 b 6780 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6720: e59d300c ldr r3, [sp, #12] 6724: e5933034 ldr r3, [r3, #52] ; 0x34 6728: e3530000 cmp r3, #0 672c: 1a000015 bne 6788 rtems_filesystem_freenode( &loc ); 6730: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6734: e3530000 cmp r3, #0 <== NOT EXECUTED 6738: 0a000004 beq 6750 <== NOT EXECUTED 673c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6740: e3530000 cmp r3, #0 <== NOT EXECUTED 6744: 11a00005 movne r0, r5 <== NOT EXECUTED 6748: 11a0e00f movne lr, pc <== NOT EXECUTED 674c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 6750: e3540000 cmp r4, #0 <== NOT EXECUTED 6754: 0a000007 beq 6778 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 6758: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 675c: e3530000 cmp r3, #0 <== NOT EXECUTED 6760: 0a000004 beq 6778 <== NOT EXECUTED 6764: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6768: e3530000 cmp r3, #0 <== NOT EXECUTED 676c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 6770: 11a0e00f movne lr, pc <== NOT EXECUTED 6774: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6778: eb00c52a bl 37c28 <__errno> <== NOT EXECUTED 677c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6780: e5803000 str r3, [r0] 6784: ea000018 b 67ec } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6788: e28d0018 add r0, sp, #24 678c: e1a01005 mov r1, r5 6790: e1a0e00f mov lr, pc 6794: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 6798: e59d3010 ldr r3, [sp, #16] 679c: 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 ); 67a0: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 67a4: 0a000004 beq 67bc 67a8: e593301c ldr r3, [r3, #28] 67ac: e3530000 cmp r3, #0 67b0: 11a00005 movne r0, r5 67b4: 11a0e00f movne lr, pc 67b8: 112fff13 bxne r3 if ( free_parentloc ) 67bc: e3540000 cmp r4, #0 67c0: 0a00000a beq 67f0 rtems_filesystem_freenode( &parentloc ); 67c4: e59d3024 ldr r3, [sp, #36] ; 0x24 67c8: e3530000 cmp r3, #0 67cc: 0a000007 beq 67f0 67d0: e593301c ldr r3, [r3, #28] 67d4: e3530000 cmp r3, #0 67d8: 0a000004 beq 67f0 67dc: e28d0018 add r0, sp, #24 67e0: e1a0e00f mov lr, pc 67e4: e12fff13 bx r3 67e8: ea000000 b 67f0 67ec: e3e06000 mvn r6, #0 return result; } 67f0: e1a00006 mov r0, r6 67f4: e28dd02c add sp, sp, #44 ; 0x2c 67f8: e8bd8070 pop {r4, r5, r6, pc} 67fc: 00051fe8 .word 0x00051fe8 00011770 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 11770: e59f0000 ldr r0, [pc, #0] ; 11778 <== NOT EXECUTED 11774: e12fff1e bx lr <== NOT EXECUTED 11778: 00020a78 .word 0x00020a78 0000e9f8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { e9f8: e92d4010 push {r4, lr} e9fc: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ea00: eb000006 bl ea20 if (nap) ea04: e3500000 cmp r0, #0 ea08: 0a000001 beq ea14 return nap->name; return rtems_assoc_name_bad(local_value); } ea0c: e5900000 ldr r0, [r0] ea10: 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); ea14: e1a00004 mov r0, r4 <== NOT EXECUTED } ea18: 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); ea1c: ea000b53 b 11770 <== NOT EXECUTED 0000b270 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { b270: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); b274: eb0000ad bl b530 <== NOT EXECUTED if (nap) b278: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; b27c: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } b280: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 0000114c : size_t length ) { const char *p; if ( !name ) 114c: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1150: e92d4070 push {r4, r5, r6, lr} 1154: e1a04001 mov r4, r1 1158: e1a05002 mov r5, r2 const char *p; if ( !name ) 115c: 0a00001c beq 11d4 return NULL; if ( !value ) 1160: e3510000 cmp r1, #0 1164: 0a00001b beq 11d8 return NULL; if ( !length ) 1168: e3520000 cmp r2, #0 116c: 0a000018 beq 11d4 return NULL; value[0] = '\0'; 1170: e3a06000 mov r6, #0 1174: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 1178: eb000018 bl 11e0 if ( !p ) 117c: e3500000 cmp r0, #0 1180: 0a000013 beq 11d4 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 == ' ' ) 11a0: e3160001 tst r6, #1 11a4: 1a000001 bne 11b0 11a8: e3520020 cmp r2, #32 11ac: 0a000009 beq 11d8 break; value[i++] = *p++; 11b0: e7c42003 strb r2, [r4, r3] 11b4: e2833001 add r3, r3, #1 value[i] = '\0'; 11b8: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 11c8: e1530005 cmp r3, r5 11cc: 3afffff0 bcc 1194 11d0: ea000000 b 11d8 <== NOT EXECUTED 11d4: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 11d8: e1a00004 mov r0, r4 11dc: e8bd8070 pop {r4, r5, r6, pc} 00001208 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1208: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 120c: e1a05000 mov r5, r0 <== NOT EXECUTED 1210: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 1214: ebffffcc bl 114c <== NOT EXECUTED if ( !p ) 1218: e2506000 subs r6, r0, #0 <== NOT EXECUTED 121c: 0a000018 beq 1284 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 1220: e1a00005 mov r0, r5 <== NOT EXECUTED 1224: eb002cc1 bl c530 <== NOT EXECUTED if ( *rhs != '=' ) 1228: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED 122c: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 1230: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 1234: 1a000012 bne 1284 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 1238: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 123c: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 1240: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 1244: 02866001 addeq r6, r6, #1 <== NOT EXECUTED 1248: e1a02004 mov r2, r4 <== NOT EXECUTED 124c: e3a0c000 mov ip, #0 <== NOT EXECUTED 1250: ea000000 b 1258 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 1254: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1258: e7d6100c ldrb r1, [r6, ip] <== NOT EXECUTED 125c: e3510000 cmp r1, #0 <== NOT EXECUTED *d++ = *rhs++; 1260: e1a03002 mov r3, r2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1264: e28cc001 add ip, ip, #1 <== NOT EXECUTED 1268: e2822001 add r2, r2, #1 <== NOT EXECUTED 126c: 1afffff8 bne 1254 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 1270: e5532001 ldrb r2, [r3, #-1] <== NOT EXECUTED 1274: e3520022 cmp r2, #34 ; 0x22 <== NOT EXECUTED 1278: 02433001 subeq r3, r3, #1 <== NOT EXECUTED d--; *d = '\0'; 127c: e5c31000 strb r1, [r3] <== NOT EXECUTED return value; 1280: ea000000 b 1288 <== NOT EXECUTED 1284: e3a04000 mov r4, #0 <== NOT EXECUTED } 1288: e1a00004 mov r0, r4 <== NOT EXECUTED 128c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001db4 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db4: 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 ) 1db8: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1dbc: e24dd040 sub sp, sp, #64 ; 0x40 1dc0: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1dc4: 0a000059 beq 1f30 * 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 ); 1dc8: e28d4030 add r4, sp, #48 ; 0x30 1dcc: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd0: 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 ); 1dd4: eb001292 bl 6824 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd8: e1a01004 mov r1, r4 1ddc: e1a02005 mov r2, r5 1de0: e59f0150 ldr r0, [pc, #336] ; 1f38 1de4: eb001b54 bl 8b3c <_Timespec_Subtract> } } } #endif (*print)( 1de8: e1a00008 mov r0, r8 1dec: e59f1148 ldr r1, [pc, #328] ; 1f3c 1df0: e1a0e00f mov lr, pc 1df4: e12fff1a bx sl 1df8: e59f4140 ldr r4, [pc, #320] ; 1f40 /* * 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 ) { 1dfc: e59fb140 ldr fp, [pc, #320] ; 1f44 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 1e00: e5943004 ldr r3, [r4, #4] 1e04: e3530000 cmp r3, #0 1e08: 0a00003b beq 1efc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 1e0c: e5936004 ldr r6, [r3, #4] if ( information ) { 1e10: e3560000 cmp r6, #0 1e14: 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( 1e18: 128d9018 addne r9, sp, #24 1e1c: 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 ) { 1e20: 1a00002f bne 1ee4 1e24: ea000034 b 1efc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 1e28: e596301c ldr r3, [r6, #28] 1e2c: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 1e30: e3540000 cmp r4, #0 1e34: 0a000029 beq 1ee0 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1e38: e5940008 ldr r0, [r4, #8] 1e3c: eb000e09 bl 5668 (*print)( 1e40: e28d3008 add r3, sp, #8 1e44: e5942008 ldr r2, [r4, #8] 1e48: e1a00008 mov r0, r8 1e4c: e59f10f4 ldr r1, [pc, #244] ; 1f48 1e50: e1a0e00f mov lr, pc 1e54: 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; 1e58: e2843084 add r3, r4, #132 ; 0x84 1e5c: e893000c ldm r3, {r2, r3} 1e60: e58d2020 str r2, [sp, #32] 1e64: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1e68: e59b2000 ldr r2, [fp] 1e6c: e5943008 ldr r3, [r4, #8] 1e70: e5922008 ldr r2, [r2, #8] 1e74: e1520003 cmp r2, r3 1e78: 1a000006 bne 1e98 Timestamp_Control used; _Timestamp_Subtract( 1e7c: e59f00c8 ldr r0, [pc, #200] ; 1f4c 1e80: e28d1030 add r1, sp, #48 ; 0x30 1e84: e1a02009 mov r2, r9 1e88: eb001b2b bl 8b3c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1e8c: e28d0020 add r0, sp, #32 1e90: e1a01009 mov r1, r9 1e94: eb001aee bl 8a54 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1e98: e28d203c add r2, sp, #60 ; 0x3c 1e9c: e28d3038 add r3, sp, #56 ; 0x38 1ea0: e28d0020 add r0, sp, #32 1ea4: e28d1028 add r1, sp, #40 ; 0x28 1ea8: eb001afd bl 8aa4 <_Timespec_Divide> /* * Print the information */ (*print)( context, 1eac: e3a01ffa mov r1, #1000 ; 0x3e8 1eb0: e59d0024 ldr r0, [sp, #36] ; 0x24 1eb4: eb005f7e bl 19cb4 <__aeabi_uidiv> 1eb8: e59d203c ldr r2, [sp, #60] ; 0x3c 1ebc: e58d2000 str r2, [sp] 1ec0: e59d2038 ldr r2, [sp, #56] ; 0x38 1ec4: e1a03000 mov r3, r0 1ec8: e58d2004 str r2, [sp, #4] 1ecc: e1a00008 mov r0, r8 1ed0: e59f1078 ldr r1, [pc, #120] ; 1f50 1ed4: e59d2020 ldr r2, [sp, #32] 1ed8: e1a0e00f mov lr, pc 1edc: 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++ ) { 1ee0: e2877001 add r7, r7, #1 1ee4: e1d631b0 ldrh r3, [r6, #16] 1ee8: 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 ); 1eec: e3a0100d mov r1, #13 1ef0: 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++ ) { 1ef4: 9affffcb bls 1e28 1ef8: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1efc: e59f3050 ldr r3, [pc, #80] ; 1f54 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++ ) { 1f00: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1f04: e1540003 cmp r4, r3 1f08: 1affffbc bne 1e00 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 1f0c: e3a01ffa mov r1, #1000 ; 0x3e8 1f10: e59d002c ldr r0, [sp, #44] ; 0x2c 1f14: eb005f66 bl 19cb4 <__aeabi_uidiv> 1f18: e59f1038 ldr r1, [pc, #56] ; 1f58 1f1c: e1a03000 mov r3, r0 1f20: e59d2028 ldr r2, [sp, #40] ; 0x28 1f24: e1a00008 mov r0, r8 1f28: e1a0e00f mov lr, pc 1f2c: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 1f30: e28dd040 add sp, sp, #64 ; 0x40 1f34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 1f38: 00026880 .word 0x00026880 1f3c: 0001d520 .word 0x0001d520 1f40: 00026608 .word 0x00026608 1f44: 00026700 .word 0x00026700 1f48: 0001d692 .word 0x0001d692 1f4c: 00026708 .word 0x00026708 1f50: 0001d6a5 .word 0x0001d6a5 1f54: 00026618 .word 0x00026618 1f58: 0001d6bd .word 0x0001d6bd 0000b244 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { b244: e92d4010 push {r4, lr} <== NOT EXECUTED b248: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) b24c: e59f0018 ldr r0, [pc, #24] ; b26c <== NOT EXECUTED b250: eb000006 bl b270 <== NOT EXECUTED b254: e2504000 subs r4, r0, #0 <== NOT EXECUTED b258: 0a000001 beq b264 <== NOT EXECUTED { errno = rc; b25c: eb0000d0 bl b5a4 <__errno> <== NOT EXECUTED b260: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } b264: e3e00000 mvn r0, #0 <== NOT EXECUTED b268: e8bd8010 pop {r4, pc} <== NOT EXECUTED b26c: 00017a9c .word 0x00017a9c 00005f08 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 5f08: e92d000e push {r1, r2, r3} <== NOT EXECUTED 5f0c: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 5f10: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f14: e1a02003 mov r2, r3 <== NOT EXECUTED 5f18: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 5f1c: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f20: ebffff84 bl 5d38 <== NOT EXECUTED va_end(arglist); return chars_written; } 5f24: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f28: e28dd00c add sp, sp, #12 <== NOT EXECUTED 5f2c: e12fff1e bx lr <== NOT EXECUTED 00001168 : } int rtems_filesystem_dirname( const char *pathname ) { 1168: e92d4010 push {r4, lr} 116c: e1a04000 mov r4, r0 int len = strlen( pathname ); 1170: eb002cfc bl c568 1174: e0844000 add r4, r4, r0 while ( len ) { 1178: ea000007 b 119c len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 117c: e5543001 ldrb r3, [r4, #-1] 1180: e353002f cmp r3, #47 ; 0x2f 1184: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 1188: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 118c: 08bd8010 popeq {r4, pc} 1190: e3530000 cmp r3, #0 1194: e2444001 sub r4, r4, #1 1198: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 119c: e3500000 cmp r0, #0 11a0: 1afffff5 bne 117c if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 11a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001288 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1288: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 128c: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1290: e1a07001 mov r7, r1 1294: e1a06002 mov r6, r2 1298: e1a0c003 mov ip, r3 129c: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 12a0: 1a000002 bne 12b0 rtems_set_errno_and_return_minus_one( EFAULT ); 12a4: eb0028be bl b5a4 <__errno> 12a8: e3a0300e mov r3, #14 12ac: ea000003 b 12c0 if ( !pathloc ) 12b0: e3530000 cmp r3, #0 12b4: 1a000004 bne 12cc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 12b8: eb0028b9 bl b5a4 <__errno> <== NOT EXECUTED 12bc: e3a03005 mov r3, #5 <== NOT EXECUTED 12c0: e5803000 str r3, [r0] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 12c4: e3e00000 mvn r0, #0 12c8: 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 ); 12cc: e5d53000 ldrb r3, [r5] 12d0: e353002f cmp r3, #47 ; 0x2f 12d4: 1353005c cmpne r3, #92 ; 0x5c 12d8: 13a08000 movne r8, #0 12dc: 03a08001 moveq r8, #1 12e0: 0a000001 beq 12ec 12e4: e3530000 cmp r3, #0 12e8: 1a000009 bne 1314 12ec: e59f305c ldr r3, [pc, #92] ; 1350 12f0: e5934000 ldr r4, [r3] 12f4: e2844018 add r4, r4, #24 12f8: e8b4000f ldm r4!, {r0, r1, r2, r3} 12fc: e1a0800c mov r8, ip 1300: e8a8000f stmia r8!, {r0, r1, r2, r3} 1304: e5942000 ldr r2, [r4] 1308: e5882000 str r2, [r8] 130c: e3a08001 mov r8, #1 1310: ea000007 b 1334 1314: e59f3034 ldr r3, [pc, #52] ; 1350 1318: e5934000 ldr r4, [r3] 131c: e2844004 add r4, r4, #4 1320: e8b4000f ldm r4!, {r0, r1, r2, r3} 1324: e1a0900c mov r9, ip 1328: e8a9000f stmia r9!, {r0, r1, r2, r3} 132c: e5942000 ldr r2, [r4] 1330: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1334: e0681007 rsb r1, r8, r7 1338: e0850008 add r0, r5, r8 133c: e1a02006 mov r2, r6 1340: e1a0300c mov r3, ip 1344: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 1348: 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], 134c: eaffff95 b 11a8 1350: 00017188 .word 0x00017188 000011a8 : /* * Verify Input parameters. */ if ( !pathname ) 11a8: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 11ac: e92d4030 push {r4, r5, lr} 11b0: e1a05002 mov r5, r2 11b4: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 11b8: 1a000002 bne 11c8 rtems_set_errno_and_return_minus_one( EFAULT ); 11bc: eb0028f8 bl b5a4 <__errno> <== NOT EXECUTED 11c0: e3a0300e mov r3, #14 <== NOT EXECUTED 11c4: ea000027 b 1268 <== NOT EXECUTED if ( !pathloc ) 11c8: e3530000 cmp r3, #0 11cc: 1a000002 bne 11dc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 11d0: eb0028f3 bl b5a4 <__errno> <== NOT EXECUTED 11d4: e3a03005 mov r3, #5 <== NOT EXECUTED 11d8: ea000022 b 1268 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 11dc: e593c00c ldr ip, [r3, #12] 11e0: e59cc000 ldr ip, [ip] 11e4: e35c0000 cmp ip, #0 11e8: 0a00001c beq 1260 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 11ec: e1a0e00f mov lr, pc 11f0: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 11f4: e59d200c ldr r2, [sp, #12] 11f8: e2703001 rsbs r3, r0, #1 11fc: 33a03000 movcc r3, #0 1200: e3520000 cmp r2, #0 1204: 03a03000 moveq r3, #0 1208: e3530000 cmp r3, #0 120c: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 1210: e594200c ldr r2, [r4, #12] 1214: e5923010 ldr r3, [r2, #16] 1218: e3530000 cmp r3, #0 121c: 0a00000a beq 124c rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1220: e1a00004 mov r0, r4 1224: e1a0e00f mov lr, pc 1228: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 122c: e2400003 sub r0, r0, #3 1230: e3500001 cmp r0, #1 1234: 83a00000 movhi r0, #0 1238: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 123c: e594200c ldr r2, [r4, #12] 1240: e5923034 ldr r3, [r2, #52] ; 0x34 1244: e3530000 cmp r3, #0 1248: 1a000009 bne 1274 rtems_filesystem_freenode( pathloc ); 124c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1250: e3530000 cmp r3, #0 <== NOT EXECUTED 1254: 11a00004 movne r0, r4 <== NOT EXECUTED 1258: 11a0e00f movne lr, pc <== NOT EXECUTED 125c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1260: eb0028cf bl b5a4 <__errno> <== NOT EXECUTED 1264: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1268: e5803000 str r3, [r0] <== NOT EXECUTED 126c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1270: 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 ); 1274: e1a00004 mov r0, r4 1278: e1a01005 mov r1, r5 127c: e1a0e00f mov lr, pc 1280: e12fff13 bx r3 } } return result; } 1284: e8bd8030 pop {r4, r5, pc} 00001008 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1008: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 100c: e59f6100 ldr r6, [pc, #256] ; 1114 1010: e5963000 ldr r3, [r6] 1014: e3a02012 mov r2, #18 1018: 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 ) { 101c: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 1020: eb00018e bl 1660 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1024: e59f30ec ldr r3, [pc, #236] ; 1118 1028: e5933000 ldr r3, [r3] 102c: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 1030: 059f00e4 ldreq r0, [pc, #228] ; 111c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1034: 0a000009 beq 1060 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1038: e59f30e0 ldr r3, [pc, #224] ; 1120 103c: e5932000 ldr r2, [r3] status = mount( 1040: e592300c ldr r3, [r2, #12] 1044: e58d3000 str r3, [sp] 1048: e28d0018 add r0, sp, #24 104c: e892000e ldm r2, {r1, r2, r3} 1050: eb000189 bl 167c &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1054: e3700001 cmn r0, #1 1058: 1a000001 bne 1064 rtems_fatal_error_occurred( 0xABCD0002 ); 105c: e59f00c0 ldr r0, [pc, #192] ; 1124 <== NOT EXECUTED 1060: eb000e0f bl 48a4 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1064: 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; 1068: 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; 106c: e28ee01c add lr, lr, #28 1070: e8be000f ldm lr!, {r0, r1, r2, r3} 1074: e287c018 add ip, r7, #24 1078: e8ac000f stmia ip!, {r0, r1, r2, r3} 107c: 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; 1080: 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); 1084: 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; 1088: 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; 108c: 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); 1090: e1a03004 mov r3, r4 1094: e3a01001 mov r1, #1 1098: e1a02005 mov r2, r5 109c: e59f0084 ldr r0, [pc, #132] ; 1128 rtems_filesystem_root = loc; 10a0: 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); 10a4: e58d5000 str r5, [sp] 10a8: eb000076 bl 1288 rtems_filesystem_root = loc; 10ac: e596c000 ldr ip, [r6] 10b0: e8b7000f ldm r7!, {r0, r1, r2, r3} 10b4: e28cc018 add ip, ip, #24 10b8: e8ac000f stmia ip!, {r0, r1, r2, r3} 10bc: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c0: 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; 10c4: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c8: e3a01001 mov r1, #1 10cc: e1a03004 mov r3, r4 10d0: e59f0050 ldr r0, [pc, #80] ; 1128 10d4: e58d5000 str r5, [sp] 10d8: eb00006a bl 1288 rtems_filesystem_current = loc; 10dc: e596c000 ldr ip, [r6] 10e0: e8b4000f ldm r4!, {r0, r1, r2, r3} 10e4: e28cc004 add ip, ip, #4 10e8: e8ac000f stmia ip!, {r0, r1, r2, r3} 10ec: 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); 10f0: e59f0034 ldr r0, [pc, #52] ; 112c /* 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; 10f4: 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); 10f8: e59f1030 ldr r1, [pc, #48] ; 1130 10fc: eb0000fd bl 14f8 if ( status != 0 ) 1100: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 1104: 159f0028 ldrne r0, [pc, #40] ; 1134 * 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 ) 1108: 1affffd4 bne 1060 * 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. */ } 110c: e28dd01c add sp, sp, #28 1110: e8bd80f0 pop {r4, r5, r6, r7, pc} 1114: 00017188 .word 0x00017188 1118: 000176fc .word 0x000176fc 111c: abcd0001 .word 0xabcd0001 1120: 00016ff8 .word 0x00016ff8 1124: abcd0002 .word 0xabcd0002 1128: 00017f23 .word 0x00017f23 112c: 00017f25 .word 0x00017f25 1130: 000001ff .word 0x000001ff 1134: abcd0003 .word 0xabcd0003 00008664 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8664: e5903000 ldr r3, [r0] <== NOT EXECUTED 8668: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 866c: e1530000 cmp r3, r0 <== NOT EXECUTED 8670: 13a00000 movne r0, #0 <== NOT EXECUTED 8674: 03a00001 moveq r0, #1 <== NOT EXECUTED 8678: e12fff1e bx lr <== NOT EXECUTED 00000ec8 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ec8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED ecc: e24dd018 sub sp, sp, #24 <== NOT EXECUTED ed0: e1a05001 mov r5, r1 <== NOT EXECUTED ed4: 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 ); ed8: eb002da2 bl c568 <== NOT EXECUTED edc: e28d4004 add r4, sp, #4 <== NOT EXECUTED ee0: e1a01000 mov r1, r0 <== NOT EXECUTED ee4: e3a02000 mov r2, #0 <== NOT EXECUTED ee8: e1a03004 mov r3, r4 <== NOT EXECUTED eec: e3a0c001 mov ip, #1 <== NOT EXECUTED ef0: e1a00006 mov r0, r6 <== NOT EXECUTED ef4: e58dc000 str ip, [sp] <== NOT EXECUTED ef8: eb0000e2 bl 1288 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { efc: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED f00: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED f04: 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 ); f08: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; f0c: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { f10: 1a000009 bne f3c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f14: e592301c ldr r3, [r2, #28] <== NOT EXECUTED f18: e3530000 cmp r3, #0 <== NOT EXECUTED f1c: 11a00004 movne r0, r4 <== NOT EXECUTED f20: 11a0e00f movne lr, pc <== NOT EXECUTED f24: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); f28: eb00299d bl b5a4 <__errno> <== NOT EXECUTED f2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f30: e5803000 str r3, [r0] <== NOT EXECUTED f34: e3e00000 mvn r0, #0 <== NOT EXECUTED f38: ea000026 b fd8 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); f3c: e1a00004 mov r0, r4 <== NOT EXECUTED f40: e1a0e00f mov lr, pc <== NOT EXECUTED f44: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { f48: e3570000 cmp r7, #0 <== NOT EXECUTED f4c: 03500002 cmpeq r0, #2 <== NOT EXECUTED f50: 03a0a000 moveq sl, #0 <== NOT EXECUTED f54: 13a0a001 movne sl, #1 <== NOT EXECUTED f58: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED f5c: 0a000008 beq f84 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f60: e3570000 cmp r7, #0 <== NOT EXECUTED f64: 0a000018 beq fcc <== NOT EXECUTED f68: e597301c ldr r3, [r7, #28] <== NOT EXECUTED f6c: e3530000 cmp r3, #0 <== NOT EXECUTED f70: 0a000015 beq fcc <== NOT EXECUTED f74: e1a00004 mov r0, r4 <== NOT EXECUTED f78: e1a0e00f mov lr, pc <== NOT EXECUTED f7c: e12fff13 bx r3 <== NOT EXECUTED f80: ea000011 b fcc <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; f84: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); f88: e1a00006 mov r0, r6 <== NOT EXECUTED f8c: eb002d75 bl c568 <== NOT EXECUTED f90: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; f94: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED f98: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; f9c: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa0: 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; fa4: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa8: 0a000009 beq fd4 <== NOT EXECUTED fac: e597301c ldr r3, [r7, #28] <== NOT EXECUTED fb0: e3530000 cmp r3, #0 <== NOT EXECUTED fb4: 0a000006 beq fd4 <== NOT EXECUTED fb8: e1a00004 mov r0, r4 <== NOT EXECUTED fbc: e1a0e00f mov lr, pc <== NOT EXECUTED fc0: e12fff13 bx r3 <== NOT EXECUTED fc4: e1a0000a mov r0, sl <== NOT EXECUTED fc8: ea000002 b fd8 <== NOT EXECUTED fcc: e3a0000d mov r0, #13 <== NOT EXECUTED fd0: ea000000 b fd8 <== NOT EXECUTED fd4: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } fd8: e28dd018 add sp, sp, #24 <== NOT EXECUTED fdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00001354 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1354: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1358: e59f4098 ldr r4, [pc, #152] ; 13f8 135c: e5940000 ldr r0, [r4] 1360: e3500000 cmp r0, #0 1364: 0a000013 beq 13b8 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1368: e3a01040 mov r1, #64 ; 0x40 136c: eb001c93 bl 85c0 1370: e59f3084 ldr r3, [pc, #132] ; 13fc sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1374: 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, 1378: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 137c: 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) 1380: 0a000015 beq 13dc rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1384: e59f3074 ldr r3, [pc, #116] ; 1400 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1388: 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; 138c: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1390: e3a03000 mov r3, #0 1394: ea000000 b 139c iop->data1 = iop + 1; 1398: 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++) 139c: e2833001 add r3, r3, #1 13a0: e1530001 cmp r3, r1 iop->data1 = iop + 1; 13a4: 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++) 13a8: e2800040 add r0, r0, #64 ; 0x40 13ac: 3afffff9 bcc 1398 iop->data1 = iop + 1; iop->data1 = NULL; 13b0: e3a03000 mov r3, #0 13b4: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 13b8: e59fc044 ldr ip, [pc, #68] ; 1404 13bc: e59f0044 ldr r0, [pc, #68] ; 1408 13c0: e3a01001 mov r1, #1 13c4: e3a02054 mov r2, #84 ; 0x54 13c8: e3a03000 mov r3, #0 13cc: e58dc000 str ip, [sp] 13d0: eb000b0e bl 4010 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 13d4: e3500000 cmp r0, #0 13d8: 0a000000 beq 13e0 rtems_fatal_error_occurred( rc ); 13dc: eb000d30 bl 48a4 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 13e0: e59f3024 ldr r3, [pc, #36] ; 140c 13e4: e5933000 ldr r3, [r3] 13e8: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 13ec: 11a0e00f movne lr, pc 13f0: 112fff13 bxne r3 } 13f4: e8bd8018 pop {r3, r4, pc} 13f8: 00016ff0 .word 0x00016ff0 13fc: 000185a8 .word 0x000185a8 1400: 000185ac .word 0x000185ac 1404: 000185b0 .word 0x000185b0 1408: 4c42494f .word 0x4c42494f 140c: 00016fec .word 0x00016fec 00023184 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23184: 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); 23188: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 2318c: 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); 23190: e1a01000 mov r1, r0 23194: e28d2018 add r2, sp, #24 23198: eb000423 bl 2422c if (sc != RTEMS_SUCCESSFUL) return sc; 2319c: e2508000 subs r8, r0, #0 231a0: 1a00003f bne 232a4 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 231a4: e59f4104 ldr r4, [pc, #260] ; 232b0 231a8: e59f3104 ldr r3, [pc, #260] ; 232b4 231ac: e5942000 ldr r2, [r4] 231b0: e1520003 cmp r2, r3 231b4: 1a00000f bne 231f8 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 231b8: e2800048 add r0, r0, #72 ; 0x48 231bc: ebff8991 bl 5808 if (!tmp) 231c0: e2505000 subs r5, r0, #0 231c4: 03a0801a moveq r8, #26 231c8: 0a000035 beq 232a4 #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); 231cc: e1a00008 mov r0, r8 231d0: e1a01004 mov r1, r4 231d4: e59f20dc ldr r2, [pc, #220] ; 232b8 231d8: eb00050a bl 24608 if (sc != RTEMS_SUCCESSFUL) { 231dc: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 231e0: 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) { 231e4: 0a000003 beq 231f8 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 231e8: e1a00005 mov r0, r5 <== NOT EXECUTED 231ec: ebff8803 bl 5200 <== NOT EXECUTED 231f0: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 231f4: ea00002a b 232a4 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 231f8: e59f60b0 ldr r6, [pc, #176] ; 232b0 231fc: e5964000 ldr r4, [r6] 23200: e59f10ac ldr r1, [pc, #172] ; 232b4 23204: e3a02048 mov r2, #72 ; 0x48 23208: e1a00004 mov r0, r4 2320c: eb005eb6 bl 3acec rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23210: e59f30a4 ldr r3, [pc, #164] ; 232bc 23214: 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*/ 23218: e59d3018 ldr r3, [sp, #24] 2321c: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23220: 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*/ 23224: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 23228: e8be000f ldm lr!, {r0, r1, r2, r3} 2322c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23230: 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); 23234: e28d4004 add r4, sp, #4 23238: 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; 2323c: 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); 23240: e3a01001 mov r1, #1 23244: e1a03004 mov r3, r4 23248: e1a02005 mov r2, r5 2324c: e59f006c ldr r0, [pc, #108] ; 232c0 rtems_filesystem_root = loc; 23250: 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); 23254: e58d5000 str r5, [sp] 23258: ebff87b5 bl 5134 rtems_filesystem_root = loc; 2325c: e596c000 ldr ip, [r6] 23260: e8b7000f ldm r7!, {r0, r1, r2, r3} 23264: e28cc018 add ip, ip, #24 23268: e8ac000f stmia ip!, {r0, r1, r2, r3} 2326c: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23270: 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; 23274: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23278: e3a01001 mov r1, #1 2327c: e1a03004 mov r3, r4 23280: e59f0038 ldr r0, [pc, #56] ; 232c0 23284: e58d5000 str r5, [sp] 23288: ebff87a9 bl 5134 rtems_filesystem_current = loc; 2328c: e596c000 ldr ip, [r6] 23290: e8b4000f ldm r4!, {r0, r1, r2, r3} 23294: e28cc004 add ip, ip, #4 23298: e8ac000f stmia ip!, {r0, r1, r2, r3} 2329c: e5973000 ldr r3, [r7] 232a0: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 232a4: e1a00008 mov r0, r8 232a8: e28dd01c add sp, sp, #28 232ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 232b0: 00051fe8 .word 0x00051fe8 232b4: 0005f524 .word 0x0005f524 232b8: 0002307c .word 0x0002307c 232bc: 0005f50c .word 0x0005f50c 232c0: 000565d3 .word 0x000565d3 000230e0 : * 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) { 230e0: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 230e4: 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); 230e8: e3a00000 mov r0, #0 <== NOT EXECUTED 230ec: e1a01000 mov r1, r0 <== NOT EXECUTED 230f0: e1a0200d mov r2, sp <== NOT EXECUTED 230f4: eb00044c bl 2422c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 230f8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 230fc: 1a00001b bne 23170 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 23100: e59f1070 ldr r1, [pc, #112] ; 23178 <== NOT EXECUTED 23104: e5914000 ldr r4, [r1] <== NOT EXECUTED 23108: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2310c: e5942000 ldr r2, [r4] <== NOT EXECUTED 23110: e1520003 cmp r2, r3 <== NOT EXECUTED 23114: 1a000004 bne 2312c <== 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); 23118: eb000563 bl 246ac <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 2311c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23120: 1a000012 bne 23170 <== NOT EXECUTED free_user_env(tmp); 23124: e1a00004 mov r0, r4 <== NOT EXECUTED 23128: ebffffd3 bl 2307c <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 2312c: e59f4044 ldr r4, [pc, #68] ; 23178 <== NOT EXECUTED 23130: e1a00005 mov r0, r5 <== NOT EXECUTED 23134: e1a01004 mov r1, r4 <== NOT EXECUTED 23138: e28d2004 add r2, sp, #4 <== NOT EXECUTED 2313c: eb000577 bl 24720 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 23140: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23144: 1a000006 bne 23164 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 23148: e59f202c ldr r2, [pc, #44] ; 2317c <== NOT EXECUTED 2314c: e1a01004 mov r1, r4 <== NOT EXECUTED 23150: eb00052c bl 24608 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 23154: 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; 23158: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 2315c: 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) 23160: 0a000002 beq 23170 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 23164: e59f1014 ldr r1, [pc, #20] ; 23180 <== NOT EXECUTED 23168: e59f2008 ldr r2, [pc, #8] ; 23178 <== NOT EXECUTED 2316c: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 23170: e1a00003 mov r0, r3 <== NOT EXECUTED 23174: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 23178: 00051fe8 .word 0x00051fe8 2317c: 0002307c .word 0x0002307c 23180: 0005f524 .word 0x0005f524 00005900 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5900: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5904: e59f3038 ldr r3, [pc, #56] ; 5944 <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5908: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 590c: e1a0200d mov r2, sp <== NOT EXECUTED 5910: e5930000 ldr r0, [r3] <== NOT EXECUTED 5914: eb00153a bl ae04 <_Protected_heap_Get_block_size> <== NOT EXECUTED 5918: e3500000 cmp r0, #0 <== NOT EXECUTED 591c: 0a000007 beq 5940 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 5920: e59f3020 ldr r3, [pc, #32] ; 5948 <== NOT EXECUTED 5924: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5928: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 592c: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5930: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 5934: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5938: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 593c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 5940: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 5944: 00051d1c .word 0x00051d1c 5948: 0005f4e0 .word 0x0005f4e0 0000594c : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 594c: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5950: 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 ) 5954: 0a000013 beq 59a8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 5958: e28d2004 add r2, sp, #4 <== NOT EXECUTED 595c: e3a03000 mov r3, #0 <== NOT EXECUTED 5960: 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); 5964: e59f3040 ldr r3, [pc, #64] ; 59ac <== NOT EXECUTED 5968: e1a0200d mov r2, sp <== NOT EXECUTED 596c: e5930000 ldr r0, [r3] <== NOT EXECUTED 5970: eb001523 bl ae04 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 5974: e59f3034 ldr r3, [pc, #52] ; 59b0 <== NOT EXECUTED 5978: e59d4000 ldr r4, [sp] <== NOT EXECUTED 597c: e283c01c add ip, r3, #28 <== NOT EXECUTED 5980: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 5984: 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); 5988: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 598c: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 5990: 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); 5994: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (current_depth > s->max_depth) 5998: 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); 599c: e583001c str r0, [r3, #28] <== NOT EXECUTED 59a0: 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; 59a4: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 59a8: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 59ac: 00051d1c .word 0x00051d1c 59b0: 0005f4e0 .word 0x0005f4e0 000059b4 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 59b4: e59f0008 ldr r0, [pc, #8] ; 59c4 <== NOT EXECUTED 59b8: e3a01000 mov r1, #0 <== NOT EXECUTED 59bc: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 59c0: ea00d550 b 3af08 <== NOT EXECUTED 59c4: 0005f4e0 .word 0x0005f4e0 00005edc : void rtems_panic( const char *printf_format, ... ) { 5edc: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 5ee0: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 5ee4: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5ee8: e1a02003 mov r2, r3 <== NOT EXECUTED 5eec: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 5ef0: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 5ef4: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5ef8: ebffff8e bl 5d38 <== NOT EXECUTED va_end(arglist); } 5efc: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f00: e28dd010 add sp, sp, #16 <== NOT EXECUTED 5f04: e12fff1e bx lr <== NOT EXECUTED 00009ec8 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) 9ec8: e59f3048 ldr r3, [pc, #72] ; 9f18 9ecc: e5d33000 ldrb r3, [r3] 9ed0: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 9ed4: e92d4001 push {r0, lr} if (!rtems_pipe_configured) 9ed8: 0a00000d beq 9f14 return; if (rtems_pipe_semaphore) 9edc: e59fc038 ldr ip, [pc, #56] ; 9f1c <== NOT EXECUTED 9ee0: e59c3000 ldr r3, [ip] <== NOT EXECUTED 9ee4: e3530000 cmp r3, #0 <== NOT EXECUTED 9ee8: 1a000009 bne 9f14 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 9eec: e59f002c ldr r0, [pc, #44] ; 9f20 <== NOT EXECUTED 9ef0: e3a01001 mov r1, #1 <== NOT EXECUTED 9ef4: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED 9ef8: e58dc000 str ip, [sp] <== NOT EXECUTED 9efc: ebffe843 bl 4010 <== 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) 9f00: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 9f04: 1bffea66 blne 48a4 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 9f08: ebffe745 bl 3c24 <== NOT EXECUTED rtems_pipe_no = now; 9f0c: e59f3010 ldr r3, [pc, #16] ; 9f24 <== NOT EXECUTED 9f10: e1c300b0 strh r0, [r3] <== NOT EXECUTED } 9f14: e8bd8008 pop {r3, pc} 9f18: 00018404 .word 0x00018404 9f1c: 00018524 .word 0x00018524 9f20: 50495045 .word 0x50495045 9f24: 0001852a .word 0x0001852a 000039e0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39e0: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 39e4: e59f307c ldr r3, [pc, #124] ; 3a68 39e8: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39ec: e59300c4 ldr r0, [r3, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39f0: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39f4: e15b0000 cmp fp, r0 39f8: 33a04000 movcc r4, #0 39fc: 3a000004 bcc 3a14 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 3a00: e59340c0 ldr r4, [r3, #192] ; 0xc0 3a04: e0804004 add r4, r0, r4 3a08: e15b0004 cmp fp, r4 3a0c: 83a04000 movhi r4, #0 3a10: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3a14: e59f3050 ldr r3, [pc, #80] ; 3a6c 3a18: e5933000 ldr r3, [r3] 3a1c: e3530000 cmp r3, #0 3a20: 03a01001 moveq r1, #1 3a24: 0a000005 beq 3a40 pattern_ok = (!memcmp( 3a28: e59f1040 ldr r1, [pc, #64] ; 3a70 3a2c: e2800008 add r0, r0, #8 3a30: e3a02010 mov r2, #16 3a34: eb00dc82 bl 3ac44 3a38: e2701001 rsbs r1, r0, #1 3a3c: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3a40: e3540000 cmp r4, #0 3a44: 0a000002 beq 3a54 3a48: e3510000 cmp r1, #0 3a4c: 13a00000 movne r0, #0 3a50: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3a54: e59f300c ldr r3, [pc, #12] ; 3a68 <== NOT EXECUTED 3a58: e5930000 ldr r0, [r3] <== NOT EXECUTED 3a5c: ebffffb4 bl 3934 <== NOT EXECUTED 3a60: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3a64: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 3a68: 0005f700 .word 0x0005f700 3a6c: 0005c9d4 .word 0x0005c9d4 3a70: 0005f4b0 .word 0x0005f4b0 00003924 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 3924: e59f1004 ldr r1, [pc, #4] ; 3930 <== NOT EXECUTED 3928: e3a00000 mov r0, #0 <== NOT EXECUTED 392c: eaffffe3 b 38c0 <== NOT EXECUTED 3930: 00006344 .word 0x00006344 000038c0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 38c4: e59f4048 ldr r4, [pc, #72] ; 3914 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c8: e1a05001 mov r5, r1 <== NOT EXECUTED 38cc: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 38d0: 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; 38d4: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 38d8: e59f1038 ldr r1, [pc, #56] ; 3918 <== NOT EXECUTED 38dc: e1a0e00f mov lr, pc <== NOT EXECUTED 38e0: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 38e4: e59f1030 ldr r1, [pc, #48] ; 391c <== NOT EXECUTED 38e8: e1a00006 mov r0, r6 <== NOT EXECUTED 38ec: e1a0e00f mov lr, pc <== NOT EXECUTED 38f0: 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 ); 38f4: e59f0024 ldr r0, [pc, #36] ; 3920 <== NOT EXECUTED 38f8: eb001b3a bl a5e8 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 38fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 3900: ebffff9f bl 3784 <== NOT EXECUTED print_context = NULL; 3904: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 3908: 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; 390c: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 3910: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3914: 0005c9d4 .word 0x0005c9d4 3918: 00056415 .word 0x00056415 391c: 0005642c .word 0x0005642c 3920: 00003784 .word 0x00003784 0000a2b4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a2b4: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a2b8: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a2bc: e1a07000 mov r7, r0 <== NOT EXECUTED a2c0: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a2c4: 03a00009 moveq r0, #9 <== NOT EXECUTED a2c8: 0a00001e beq a348 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; a2cc: eb000848 bl c3f4 <__errno> <== NOT EXECUTED a2d0: e3a03000 mov r3, #0 <== NOT EXECUTED a2d4: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; a2d8: e3a02000 mov r2, #0 <== NOT EXECUTED a2dc: e3a03000 mov r3, #0 <== NOT EXECUTED a2e0: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a2e4: e1a00007 mov r0, r7 <== NOT EXECUTED a2e8: e1a0100d mov r1, sp <== NOT EXECUTED a2ec: eb0013b7 bl f1d0 <== 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 ) a2f0: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; a2f4: 159d3000 ldrne r3, [sp] <== NOT EXECUTED a2f8: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) a2fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED a300: e1530007 cmp r3, r7 <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a304: e1a05000 mov r5, r0 <== NOT EXECUTED a308: 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 ) a30c: 03a0000b moveq r0, #11 <== NOT EXECUTED a310: 0a00000c beq a348 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a314: e1a00005 mov r0, r5 <== NOT EXECUTED a318: e59f202c ldr r2, [pc, #44] ; a34c <== NOT EXECUTED a31c: e3e03000 mvn r3, #0 <== NOT EXECUTED a320: ebffe22d bl 2bdc <__gedf2> <== NOT EXECUTED a324: e3500000 cmp r0, #0 <== NOT EXECUTED a328: da000004 ble a340 <== NOT EXECUTED a32c: eb000830 bl c3f4 <__errno> <== NOT EXECUTED a330: e5903000 ldr r3, [r0] <== NOT EXECUTED a334: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a338: 03a0000a moveq r0, #10 <== NOT EXECUTED a33c: 0a000001 beq a348 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a340: e8840060 stm r4, {r5, r6} <== NOT EXECUTED a344: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } a348: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED a34c: 7fefffff .word 0x7fefffff 0000a350 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a350: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a354: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a358: e1a05000 mov r5, r0 a35c: e1a07002 mov r7, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a360: 03a00009 moveq r0, #9 a364: 0a00001b beq a3d8 return RTEMS_INVALID_ADDRESS; errno = 0; a368: eb000821 bl c3f4 <__errno> a36c: e3a03000 mov r3, #0 a370: e5803000 str r3, [r0] *n = 0; a374: e3a03000 mov r3, #0 a378: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a37c: e1a00005 mov r0, r5 a380: e1a0100d mov r1, sp a384: eb00137e bl f184 #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 ) a388: e3570000 cmp r7, #0 *endptr = end; a38c: 159d3000 ldrne r3, [sp] a390: 15873000 strne r3, [r7] /* nothing was converted */ if ( end == s ) a394: e59d3000 ldr r3, [sp] a398: e1530005 cmp r3, r5 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a39c: 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 ) a3a0: 03a0000b moveq r0, #11 a3a4: 0a00000b beq a3d8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a3a8: e1a00006 mov r0, r6 a3ac: e59f1028 ldr r1, [pc, #40] ; a3dc a3b0: ebffe254 bl 2d08 <__gesf2> a3b4: e3500000 cmp r0, #0 a3b8: da000004 ble a3d0 a3bc: eb00080c bl c3f4 <__errno> <== NOT EXECUTED a3c0: e5903000 ldr r3, [r0] <== NOT EXECUTED a3c4: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a3c8: 03a0000a moveq r0, #10 <== NOT EXECUTED a3cc: 0a000001 beq a3d8 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a3d0: e5846000 str r6, [r4] a3d4: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } a3d8: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} a3dc: 7f7fffff .word 0x7f7fffff 00019c94 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19c94: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19c98: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19c9c: e1a05000 mov r5, r0 19ca0: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19ca4: 03a00009 moveq r0, #9 19ca8: 0a000018 beq 19d10 return RTEMS_INVALID_ADDRESS; errno = 0; 19cac: eb0077dd bl 37c28 <__errno> 19cb0: e3a03000 mov r3, #0 19cb4: e5803000 str r3, [r0] *n = 0; 19cb8: 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 ); 19cbc: e1a00005 mov r0, r5 19cc0: e1a0100d mov r1, sp 19cc4: e3a02010 mov r2, #16 19cc8: eb00976c bl 3fa80 #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 ) 19ccc: e3560000 cmp r6, #0 *endptr = end; 19cd0: 159d3000 ldrne r3, [sp] 19cd4: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 19cd8: e59d3000 ldr r3, [sp] 19cdc: 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 ); 19ce0: 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 ) 19ce4: 03a0000b moveq r0, #11 19ce8: 0a000008 beq 19d10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 19cec: e3770001 cmn r7, #1 19cf0: 1a000004 bne 19d08 19cf4: eb0077cb bl 37c28 <__errno> <== NOT EXECUTED 19cf8: e5903000 ldr r3, [r0] <== NOT EXECUTED 19cfc: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 19d00: 03a0000a moveq r0, #10 <== NOT EXECUTED 19d04: 0a000001 beq 19d10 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 19d08: e5847000 str r7, [r4] 19d0c: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 19d10: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00003384 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3384: e3500009 cmp r0, #9 3388: 012fff1e bxeq lr 338c: ca000016 bgt 33ec 3390: e3500004 cmp r0, #4 3394: 012fff1e bxeq lr 3398: ca00000a bgt 33c8 339c: e3500001 cmp r0, #1 33a0: 012fff1e bxeq lr 33a4: ca000002 bgt 33b4 33a8: e3500000 cmp r0, #0 33ac: 012fff1e bxeq lr 33b0: ea000030 b 3478 33b4: e3500002 cmp r0, #2 <== NOT EXECUTED 33b8: 012fff1e bxeq lr <== NOT EXECUTED 33bc: e3500003 cmp r0, #3 <== NOT EXECUTED 33c0: 1a00002c bne 3478 <== NOT EXECUTED 33c4: e12fff1e bx lr <== NOT EXECUTED 33c8: e3500006 cmp r0, #6 <== NOT EXECUTED 33cc: 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; 33d0: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 33d4: b12fff1e bxlt lr <== NOT EXECUTED 33d8: e3500007 cmp r0, #7 <== NOT EXECUTED 33dc: 012fff1e bxeq lr <== NOT EXECUTED 33e0: e3500008 cmp r0, #8 <== NOT EXECUTED 33e4: 1a000023 bne 3478 <== NOT EXECUTED 33e8: e12fff1e bx lr <== NOT EXECUTED 33ec: e350000e cmp r0, #14 <== NOT EXECUTED 33f0: 012fff1e bxeq lr <== NOT EXECUTED 33f4: ca000008 bgt 341c <== NOT EXECUTED 33f8: e350000b cmp r0, #11 <== NOT EXECUTED 33fc: 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; 3400: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3404: b12fff1e bxlt lr <== NOT EXECUTED 3408: e350000c cmp r0, #12 <== NOT EXECUTED 340c: 012fff1e bxeq lr <== NOT EXECUTED 3410: e350000d cmp r0, #13 <== NOT EXECUTED 3414: 1a000017 bne 3478 <== NOT EXECUTED 3418: e12fff1e bx lr <== NOT EXECUTED 341c: e59f305c ldr r3, [pc, #92] ; 3480 <== NOT EXECUTED 3420: 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; 3424: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3428: 012fff1e bxeq lr <== NOT EXECUTED 342c: ca000005 bgt 3448 <== NOT EXECUTED 3430: e350000f cmp r0, #15 <== NOT EXECUTED 3434: 012fff1e bxeq lr <== NOT EXECUTED 3438: e2433001 sub r3, r3, #1 <== NOT EXECUTED 343c: e1500003 cmp r0, r3 <== NOT EXECUTED 3440: 1a00000c bne 3478 <== NOT EXECUTED 3444: ea000007 b 3468 <== NOT EXECUTED 3448: e59f3034 ldr r3, [pc, #52] ; 3484 <== NOT EXECUTED 344c: 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; 3450: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3454: 012fff1e bxeq lr <== NOT EXECUTED 3458: e2833001 add r3, r3, #1 <== NOT EXECUTED 345c: e1500003 cmp r0, r3 <== NOT EXECUTED 3460: 1a000004 bne 3478 <== NOT EXECUTED 3464: ea000001 b 3470 <== 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; 3468: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 346c: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 3470: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3474: e12fff1e bx lr <== NOT EXECUTED 3478: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 347c: e12fff1e bx lr 3480: 00001002 .word 0x00001002 3484: 00001003 .word 0x00001003 00001eb0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 1eb0: e59f3008 ldr r3, [pc, #8] ; 1ec0 <== NOT EXECUTED 1eb4: 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; } 1eb8: e3a00000 mov r0, #0 <== NOT EXECUTED 1ebc: e12fff1e bx lr <== NOT EXECUTED 1ec0: 00017174 .word 0x00017174 000032bc : { 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); 32bc: e59f2180 ldr r2, [pc, #384] ; 3444 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32c0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32c4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 32c8: e92d4030 push {r4, r5, lr} 32cc: 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); 32d0: e5920000 ldr r0, [r2] 32d4: 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; 32d8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32dc: eb0003dd bl 4258 if (sc != RTEMS_SUCCESSFUL) 32e0: e3500000 cmp r0, #0 32e4: 1a000022 bne 3374 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 32e8: e5943008 ldr r3, [r4, #8] 32ec: e2433001 sub r3, r3, #1 32f0: e3530000 cmp r3, #0 32f4: e5843008 str r3, [r4, #8] 32f8: 1a00004c bne 3430 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 32fc: e59420cc ldr r2, [r4, #204] ; 0xcc 3300: e59f3140 ldr r3, [pc, #320] ; 3448 3304: e0833282 add r3, r3, r2, lsl #5 3308: e5931004 ldr r1, [r3, #4] 330c: e3510000 cmp r1, #0 3310: 0a000003 beq 3324 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3314: e1a00004 mov r0, r4 <== NOT EXECUTED 3318: e1a0e00f mov lr, pc <== NOT EXECUTED 331c: e12fff11 bx r1 <== NOT EXECUTED 3320: ea000006 b 3340 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3324: e5940018 ldr r0, [r4, #24] 3328: e1a02001 mov r2, r1 332c: eb0003c9 bl 4258 if (sc != RTEMS_SUCCESSFUL) { 3330: e3500000 cmp r0, #0 3334: 1a00000e bne 3374 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3338: e1a00004 mov r0, r4 333c: ebfffe05 bl 2b58 } if (tty->device.outputUsesInterrupts 3340: e59430b4 ldr r3, [r4, #180] ; 0xb4 3344: e3530002 cmp r3, #2 3348: 1a00000a bne 3378 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 334c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3350: e3a01001 mov r1, #1 <== NOT EXECUTED 3354: eb0002ab bl 3e08 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3358: e3500000 cmp r0, #0 <== NOT EXECUTED 335c: 1a000004 bne 3374 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3360: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3364: e3a01001 mov r1, #1 <== NOT EXECUTED 3368: eb0002a6 bl 3e08 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 336c: e3500000 cmp r0, #0 <== NOT EXECUTED 3370: 0a000000 beq 3378 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3374: eb00054a bl 48a4 <== NOT EXECUTED } if (tty->device.lastClose) 3378: e594309c ldr r3, [r4, #156] ; 0x9c 337c: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3380: 11a02005 movne r2, r5 3384: 1284000c addne r0, r4, #12 3388: 18900003 ldmne r0, {r0, r1} 338c: 11a0e00f movne lr, pc 3390: 112fff13 bxne r3 if (tty->forw == NULL) { 3394: e894000c ldm r4, {r2, r3} 3398: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 339c: 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) { 33a0: 1a000003 bne 33b4 rtems_termios_ttyTail = tty->back; 33a4: e59f10a0 ldr r1, [pc, #160] ; 344c if ( rtems_termios_ttyTail != NULL ) { 33a8: 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; 33ac: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 33b0: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33b4: e5942004 ldr r2, [r4, #4] 33b8: e5943000 ldr r3, [r4] 33bc: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 33c0: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33c4: 1a000003 bne 33d8 rtems_termios_ttyHead = tty->forw; 33c8: e59f1080 ldr r1, [pc, #128] ; 3450 if ( rtems_termios_ttyHead != NULL ) { 33cc: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 33d0: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 33d4: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 33d8: e5940014 ldr r0, [r4, #20] 33dc: eb000376 bl 41bc rtems_semaphore_delete (tty->osem); 33e0: e5940018 ldr r0, [r4, #24] 33e4: eb000374 bl 41bc rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 33e8: e594008c ldr r0, [r4, #140] ; 0x8c 33ec: eb000372 bl 41bc if ((tty->device.pollRead == NULL) || 33f0: e59430a0 ldr r3, [r4, #160] ; 0xa0 33f4: e3530000 cmp r3, #0 33f8: 0a000002 beq 3408 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 33fc: e59430b4 ldr r3, [r4, #180] ; 0xb4 3400: e3530002 cmp r3, #2 3404: 1a000001 bne 3410 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3408: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 340c: eb00036a bl 41bc <== NOT EXECUTED free (tty->rawInBuf.theBuf); 3410: e5940058 ldr r0, [r4, #88] ; 0x58 3414: eb0014a5 bl 86b0 free (tty->rawOutBuf.theBuf); 3418: e594007c ldr r0, [r4, #124] ; 0x7c 341c: eb0014a3 bl 86b0 free (tty->cbuf); 3420: e594001c ldr r0, [r4, #28] 3424: eb0014a1 bl 86b0 free (tty); 3428: e1a00004 mov r0, r4 342c: eb00149f bl 86b0 } rtems_semaphore_release (rtems_termios_ttyMutex); 3430: e59f300c ldr r3, [pc, #12] ; 3444 3434: e5930000 ldr r0, [r3] 3438: eb0003cc bl 4370 return RTEMS_SUCCESSFUL; } 343c: e3a00000 mov r0, #0 3440: e8bd8030 pop {r4, r5, pc} 3444: 000185ec .word 0x000185ec 3448: 00018418 .word 0x00018418 344c: 000185f0 .word 0x000185f0 3450: 000185f4 .word 0x000185f4 000020b4 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20b8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20bc: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20c0: 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) { 20c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20c8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20cc: 1a000005 bne 20e8 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 20d0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 20d4: e1a01002 mov r1, r2 <== NOT EXECUTED 20d8: eb00074a bl 3e08 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 20dc: e3500000 cmp r0, #0 <== NOT EXECUTED 20e0: 0a00000c beq 2118 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20e4: eb0009ee bl 48a4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 20e8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 20ec: e3530005 cmp r3, #5 <== NOT EXECUTED 20f0: 1a000006 bne 2110 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 20f4: e59f3024 ldr r3, [pc, #36] ; 2120 <== NOT EXECUTED 20f8: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 20fc: e3530000 cmp r3, #0 <== NOT EXECUTED 2100: 0a000004 beq 2118 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2104: e1a0e00f mov lr, pc <== NOT EXECUTED 2108: e12fff13 bx r3 <== NOT EXECUTED 210c: ea000001 b 2118 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2110: 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); 2114: eaffff6d b 1ed0 <== NOT EXECUTED } } 2118: e3a00000 mov r0, #0 <== NOT EXECUTED 211c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 2120: 00018418 .word 0x00018418 00002124 : * 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) { 2124: 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) { 2128: e59f32b8 ldr r3, [pc, #696] ; 23e8 <== 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) { 212c: 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) { 2130: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2134: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2138: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 213c: 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) { 2140: 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); 2144: 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); 2148: 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); 214c: 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) { 2150: 1a00000e bne 2190 <== 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); 2154: e1a08002 mov r8, r2 <== NOT EXECUTED 2158: 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, 215c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 2160: 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); 2164: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2168: e1a09006 mov r9, r6 <== NOT EXECUTED 216c: e1a05006 mov r5, r6 <== NOT EXECUTED 2170: ea000091 b 23bc <== 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); 2174: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2178: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 217c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 2180: e1a0e00f mov lr, pc <== NOT EXECUTED 2184: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2188: e2866001 add r6, r6, #1 <== NOT EXECUTED 218c: 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--) { 2190: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2194: 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--) { 2198: 1afffff5 bne 2174 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 219c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21a0: e3530000 cmp r3, #0 <== NOT EXECUTED 21a4: 1a00008c bne 23dc <== NOT EXECUTED 21a8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 21ac: e3530000 cmp r3, #0 <== NOT EXECUTED 21b0: 0a000089 beq 23dc <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 21b4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 21b8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 21bc: e1a0e00f mov lr, pc <== NOT EXECUTED 21c0: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 21c4: e3a03001 mov r3, #1 <== NOT EXECUTED 21c8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21cc: ea000083 b 23e0 <== 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) { 21d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 21d4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 21d8: 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) { 21dc: 0a00000f beq 2220 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 21e0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 21e4: e152000a cmp r2, sl <== NOT EXECUTED 21e8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 21ec: 1a000007 bne 2210 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 21f0: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 21f4: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21f8: 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; 21fc: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2200: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2204: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2208: e3a09001 mov r9, #1 <== NOT EXECUTED 220c: ea000005 b 2228 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2210: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2214: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2218: 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]) { 221c: 0afffff8 beq 2204 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2220: e3590000 cmp r9, #0 <== NOT EXECUTED 2224: 0a000015 beq 2280 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2228: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 222c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2230: e3530020 cmp r3, #32 <== NOT EXECUTED 2234: 1a00005e bne 23b4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2238: e10f7000 mrs r7, CPSR <== NOT EXECUTED 223c: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 2240: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2244: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2248: 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; 224c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2250: 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; 2254: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2258: 0a000006 beq 2278 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 225c: 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, 2260: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2264: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2268: e0811003 add r1, r1, r3 <== NOT EXECUTED 226c: e3a02001 mov r2, #1 <== NOT EXECUTED 2270: e1a0e00f mov lr, pc <== NOT EXECUTED 2274: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2278: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 227c: ea00004c b 23b4 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2280: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2284: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2288: e2800001 add r0, r0, #1 <== NOT EXECUTED 228c: eb004acb bl 14dc0 <__umodsi3> <== NOT EXECUTED 2290: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2294: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2298: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 229c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 22a0: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 22a4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 22a8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22ac: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 22b0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 22b4: e0800007 add r0, r0, r7 <== NOT EXECUTED 22b8: eb004ac0 bl 14dc0 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 22bc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 22c0: e1500003 cmp r0, r3 <== NOT EXECUTED 22c4: 9a000025 bls 2360 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 22c8: 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) 22cc: e3130001 tst r3, #1 <== NOT EXECUTED 22d0: 1a000022 bne 2360 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 22d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22d8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 22dc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 22e0: e59f3104 ldr r3, [pc, #260] ; 23ec <== NOT EXECUTED 22e4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 22e8: e0023003 and r3, r2, r3 <== NOT EXECUTED 22ec: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22f0: 1a00000e bne 2330 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 22f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22f8: e3130020 tst r3, #32 <== NOT EXECUTED 22fc: 1a000002 bne 230c <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2300: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2304: e3530000 cmp r3, #0 <== NOT EXECUTED 2308: 1a000014 bne 2360 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 230c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2310: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2314: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2318: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 231c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2320: e3a02001 mov r2, #1 <== NOT EXECUTED 2324: e1a0e00f mov lr, pc <== NOT EXECUTED 2328: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 232c: ea00000b b 2360 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2330: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2334: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2338: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 233c: 1a000007 bne 2360 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2340: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2344: 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; 2348: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 234c: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2350: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2354: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2358: 11a0e00f movne lr, pc <== NOT EXECUTED 235c: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2360: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2364: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2368: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 236c: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 2370: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2374: 0a00000e beq 23b4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2378: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 237c: 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 )) { 2380: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2384: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2388: 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 )) { 238c: 1a000008 bne 23b4 <== NOT EXECUTED 2390: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2394: e3530000 cmp r3, #0 <== NOT EXECUTED 2398: 0a000005 beq 23b4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 239c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 23a0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 23a4: e1a0e00f mov lr, pc <== NOT EXECUTED 23a8: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 23ac: e3a02001 mov r2, #1 <== NOT EXECUTED 23b0: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 23b4: e2866001 add r6, r6, #1 <== NOT EXECUTED 23b8: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 23bc: e3580000 cmp r8, #0 <== NOT EXECUTED 23c0: 1affff82 bne 21d0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 23c4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 23c8: e0833005 add r3, r3, r5 <== NOT EXECUTED 23cc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 23d0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 23d4: eb0007e5 bl 4370 <== NOT EXECUTED return dropped; 23d8: ea000000 b 23e0 <== NOT EXECUTED 23dc: e3a05000 mov r5, #0 <== NOT EXECUTED } 23e0: e1a00005 mov r0, r5 <== NOT EXECUTED 23e4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 23e8: 00018418 .word 0x00018418 23ec: 00000402 .word 0x00000402 00002f14 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2f14: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2f18: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f1c: 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; 2f20: 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; 2f24: e5934034 ldr r4, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f28: 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); 2f2c: e1a02001 mov r2, r1 2f30: 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; 2f34: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2f38: eb0004c6 bl 4258 if (sc != RTEMS_SUCCESSFUL) { 2f3c: e2506000 subs r6, r0, #0 2f40: 1a0000d7 bne 32a4 args->ioctl_return = sc; return sc; } switch (args->command) { 2f44: e5953004 ldr r3, [r5, #4] 2f48: e3530004 cmp r3, #4 2f4c: 0a0000ab beq 3200 2f50: 8a000005 bhi 2f6c 2f54: e3530002 cmp r3, #2 2f58: 0a000029 beq 3004 2f5c: 8a0000a0 bhi 31e4 2f60: e3530001 cmp r3, #1 2f64: 1a000010 bne 2fac 2f68: ea00001b b 2fdc 2f6c: e59f233c ldr r2, [pc, #828] ; 32b0 <== NOT EXECUTED 2f70: e1530002 cmp r3, r2 <== NOT EXECUTED 2f74: 0a0000bd beq 3270 <== NOT EXECUTED 2f78: 8a000002 bhi 2f88 <== NOT EXECUTED 2f7c: e3530005 cmp r3, #5 <== NOT EXECUTED 2f80: 1a000009 bne 2fac <== NOT EXECUTED 2f84: ea000099 b 31f0 <== NOT EXECUTED 2f88: e59f2324 ldr r2, [pc, #804] ; 32b4 <== NOT EXECUTED 2f8c: 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; 2f90: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 2f94: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2f98: 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) { 2f9c: 0a0000be beq 329c <== NOT EXECUTED 2fa0: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 2fa4: e1530002 cmp r3, r2 <== NOT EXECUTED 2fa8: 0a000098 beq 3210 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2fac: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2fb0: e59f3300 ldr r3, [pc, #768] ; 32b8 <== NOT EXECUTED 2fb4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2fb8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2fbc: e3530000 cmp r3, #0 <== NOT EXECUTED 2fc0: 03a0600a moveq r6, #10 <== NOT EXECUTED 2fc4: 0a0000b4 beq 329c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 2fc8: e1a00004 mov r0, r4 <== NOT EXECUTED 2fcc: e1a01005 mov r1, r5 <== NOT EXECUTED 2fd0: e1a0e00f mov lr, pc <== NOT EXECUTED 2fd4: e12fff13 bx r3 <== NOT EXECUTED 2fd8: ea0000a2 b 3268 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 2fdc: e5957008 ldr r7, [r5, #8] 2fe0: e284c030 add ip, r4, #48 ; 0x30 2fe4: e8bc000f ldm ip!, {r0, r1, r2, r3} 2fe8: e1a0e007 mov lr, r7 2fec: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff0: e8bc000f ldm ip!, {r0, r1, r2, r3} 2ff4: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff8: e59c3000 ldr r3, [ip] 2ffc: e58e3000 str r3, [lr] break; 3000: ea0000a5 b 329c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3004: e595e008 ldr lr, [r5, #8] 3008: e8be000f ldm lr!, {r0, r1, r2, r3} 300c: e284c030 add ip, r4, #48 ; 0x30 3010: e8ac000f stmia ip!, {r0, r1, r2, r3} 3014: e8be000f ldm lr!, {r0, r1, r2, r3} 3018: 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) && 301c: 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; 3020: 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) && 3024: 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; 3028: 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) && 302c: 0a000019 beq 3098 3030: e5943030 ldr r3, [r4, #48] ; 0x30 3034: e3130b01 tst r3, #1024 ; 0x400 3038: 1a000016 bne 3098 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 303c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3040: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3044: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3048: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 304c: e3130020 tst r3, #32 <== NOT EXECUTED 3050: 0a000010 beq 3098 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3054: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3058: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 305c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3060: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3064: 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; 3068: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 306c: 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; 3070: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3074: 0a000006 beq 3094 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3078: 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, 307c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3080: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3084: e0811003 add r1, r1, r3 <== NOT EXECUTED 3088: e3a02001 mov r2, #1 <== NOT EXECUTED 308c: e1a0e00f mov lr, pc <== NOT EXECUTED 3090: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3094: 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) && 3098: e59430b8 ldr r3, [r4, #184] ; 0xb8 309c: e3130b01 tst r3, #1024 ; 0x400 30a0: 0a000008 beq 30c8 30a4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30a8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30ac: 1a000005 bne 30c8 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30b4: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30b8: 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); 30bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30c0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 30cc: e3130c01 tst r3, #256 ; 0x100 30d0: 0a000010 beq 3118 30d4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30d8: e3530000 cmp r3, #0 <== NOT EXECUTED 30dc: ba00000d blt 3118 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30e4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30e8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 30ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30f0: e3130004 tst r3, #4 <== NOT EXECUTED 30f4: 0a000004 beq 310c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 30f8: 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) && 30fc: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 3100: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3104: 11a0e00f movne lr, pc <== NOT EXECUTED 3108: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 310c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3110: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3114: 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) { 3118: e5943038 ldr r3, [r4, #56] ; 0x38 311c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3120: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3124: b3833c01 orrlt r3, r3, #256 ; 0x100 3128: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 312c: e5943030 ldr r3, [r4, #48] ; 0x30 3130: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3134: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3138: 13833b01 orrne r3, r3, #1024 ; 0x400 313c: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3140: e5943030 ldr r3, [r4, #48] ; 0x30 3144: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3148: 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) { 314c: 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; 3150: 13833c02 orrne r3, r3, #512 ; 0x200 3154: 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) { 3158: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 315c: 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) { 3160: 1a000014 bne 31b8 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; 3164: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3168: eb0002a5 bl 3c04 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 316c: e3a0100a mov r1, #10 <== NOT EXECUTED 3170: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3174: eb00467d bl 14b70 <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3178: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 317c: 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] * 3180: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3184: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3188: 0a000006 beq 31a8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 318c: e3520000 cmp r2, #0 <== NOT EXECUTED 3190: 01a02000 moveq r2, r0 <== NOT EXECUTED 3194: 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; 3198: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 319c: 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; 31a0: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 31a4: ea000006 b 31c4 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 31a8: 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; 31ac: 03a03001 moveq r3, #1 <== NOT EXECUTED 31b0: 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]) { 31b4: 0a000002 beq 31c4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 31b8: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 31bc: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 31c0: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 31c4: e59430a8 ldr r3, [r4, #168] ; 0xa8 31c8: e3530000 cmp r3, #0 31cc: 0a000032 beq 329c (*tty->device.setAttributes)(tty->minor, &tty->termios); 31d0: e5940010 ldr r0, [r4, #16] 31d4: e2841030 add r1, r4, #48 ; 0x30 31d8: e1a0e00f mov lr, pc 31dc: e12fff13 bx r3 31e0: ea00002d b 329c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 31e4: e1a00004 mov r0, r4 31e8: ebfffe5a bl 2b58 break; 31ec: ea00002a b 329c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 31f0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 31f4: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 31f8: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 31fc: ea000026 b 329c <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3200: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3204: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3208: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 320c: ea000022 b 329c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3210: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3214: e59f309c ldr r3, [pc, #156] ; 32b8 <== NOT EXECUTED 3218: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 321c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3220: e3530000 cmp r3, #0 <== NOT EXECUTED 3224: 0a000003 beq 3238 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3228: e1a00004 mov r0, r4 <== NOT EXECUTED 322c: e1a0e00f mov lr, pc <== NOT EXECUTED 3230: e12fff13 bx r3 <== NOT EXECUTED 3234: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3238: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 323c: 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) { 3240: e59f3070 ldr r3, [pc, #112] ; 32b8 <== NOT EXECUTED 3244: 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 */ 3248: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 324c: 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 */ 3250: 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); 3254: 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) { 3258: 0a00000f beq 329c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 325c: e1a00004 mov r0, r4 <== NOT EXECUTED 3260: e1a0e00f mov lr, pc <== NOT EXECUTED 3264: e12fff13 bx r3 <== NOT EXECUTED 3268: e1a06000 mov r6, r0 <== NOT EXECUTED 326c: ea00000a b 329c <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3270: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3274: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3278: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 327c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 3280: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3284: e2842020 add r2, r4, #32 <== NOT EXECUTED 3288: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 328c: e0411002 sub r1, r1, r2 <== NOT EXECUTED 3290: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3294: e0813003 add r3, r1, r3 <== NOT EXECUTED 3298: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 329c: e5940018 ldr r0, [r4, #24] 32a0: eb000432 bl 4370 args->ioctl_return = sc; 32a4: e585600c str r6, [r5, #12] return sc; } 32a8: e1a00006 mov r0, r6 32ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 32b0: 4004667f .word 0x4004667f 32b4: 4004741a .word 0x4004741a 32b8: 00018418 .word 0x00018418 00003454 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3454: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3458: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 345c: e59f23e0 ldr r2, [pc, #992] ; 3844 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3460: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3464: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3468: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 346c: e5920000 ldr r0, [r2] 3470: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3474: e1a0b003 mov fp, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3478: eb000376 bl 4258 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 347c: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3480: 059f33c0 ldreq r3, [pc, #960] ; 3848 3484: 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) 3488: 0a000007 beq 34ac 348c: ea0000e2 b 381c <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 3490: e595300c ldr r3, [r5, #12] 3494: e1530009 cmp r3, r9 3498: 1a000002 bne 34a8 349c: e5953010 ldr r3, [r5, #16] 34a0: e153000a cmp r3, sl 34a4: 0a0000bb beq 3798 */ 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) { 34a8: e5955000 ldr r5, [r5] 34ac: e3550000 cmp r5, #0 34b0: 1afffff6 bne 3490 34b4: ea0000da b 3824 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 34b8: e59f738c ldr r7, [pc, #908] ; 384c 34bc: e5973004 ldr r3, [r7, #4] 34c0: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34c4: e5950064 ldr r0, [r5, #100] ; 0x64 34c8: eb0015b8 bl 8bb0 if (tty->rawInBuf.theBuf == NULL) { 34cc: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34d0: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 34d4: 1a000006 bne 34f4 free(tty); 34d8: e1a00005 mov r0, r5 <== NOT EXECUTED 34dc: eb001473 bl 86b0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 34e0: e59f335c ldr r3, [pc, #860] ; 3844 <== NOT EXECUTED 34e4: e5930000 ldr r0, [r3] <== NOT EXECUTED 34e8: eb0003a0 bl 4370 <== NOT EXECUTED 34ec: e3a0601a mov r6, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 34f0: ea0000c9 b 381c <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 34f4: e5973008 ldr r3, [r7, #8] 34f8: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 34fc: e5950088 ldr r0, [r5, #136] ; 0x88 3500: eb0015aa bl 8bb0 if (tty->rawOutBuf.theBuf == NULL) { 3504: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3508: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 350c: 0a000006 beq 352c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3510: e5970000 ldr r0, [r7] 3514: eb0015a5 bl 8bb0 if (tty->cbuf == NULL) { 3518: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 351c: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 3520: 1a000004 bne 3538 free((void *)(tty->rawOutBuf.theBuf)); 3524: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3528: eb001460 bl 86b0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 352c: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 3530: eb00145e bl 86b0 <== NOT EXECUTED 3534: eaffffe7 b 34d8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3538: e59f3308 ldr r3, [pc, #776] ; 3848 353c: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3540: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3544: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3548: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 354c: 15825004 strne r5, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3550: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3554: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3558: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 355c: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 3560: 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) 3564: e59f32e4 ldr r3, [pc, #740] ; 3850 3568: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 356c: e59f72d8 ldr r7, [pc, #728] ; 384c 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) 3570: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3574: 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; 3578: e59f22c8 ldr r2, [pc, #712] ; 3848 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 357c: e5d7300c ldrb r3, [r7, #12] 3580: e59f02cc ldr r0, [pc, #716] ; 3854 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3584: e5824000 str r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3588: 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; 358c: e584a010 str sl, [r4, #16] tty->major = major; 3590: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3594: e284c014 add ip, r4, #20 3598: e3a03000 mov r3, #0 359c: e3a01001 mov r1, #1 35a0: e3a02054 mov r2, #84 ; 0x54 35a4: e58dc000 str ip, [sp] 35a8: eb000298 bl 4010 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) 35ac: e2503000 subs r3, r0, #0 35b0: 1a000095 bne 380c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35b4: e5d7200c ldrb r2, [r7, #12] 35b8: e59f0298 ldr r0, [pc, #664] ; 3858 35bc: e284c018 add ip, r4, #24 35c0: e1820000 orr r0, r2, r0 35c4: e3a01001 mov r1, #1 35c8: e3a02054 mov r2, #84 ; 0x54 35cc: e58dc000 str ip, [sp] 35d0: eb00028e bl 4010 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) 35d4: e2501000 subs r1, r0, #0 35d8: 1a00008b bne 380c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35dc: e5d7300c ldrb r3, [r7, #12] 35e0: e59f0274 ldr r0, [pc, #628] ; 385c 35e4: e284c08c add ip, r4, #140 ; 0x8c 35e8: e1830000 orr r0, r3, r0 35ec: e3a02020 mov r2, #32 35f0: e1a03001 mov r3, r1 35f4: e58dc000 str ip, [sp] 35f8: eb000284 bl 4010 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 35fc: e250e000 subs lr, r0, #0 3600: 1a000081 bne 380c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3604: e8bb000f ldm fp!, {r0, r1, r2, r3} 3608: e284c098 add ip, r4, #152 ; 0x98 360c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3610: e89b000f ldm fp, {r0, r1, r2, r3} 3614: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3618: e59430b4 ldr r3, [r4, #180] ; 0xb4 361c: 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; 3620: e584e094 str lr, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3624: 1a000017 bne 3688 sc = rtems_task_create ( 3628: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 362c: e59f022c ldr r0, [pc, #556] ; 3860 <== NOT EXECUTED 3630: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3634: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3638: e3a0100a mov r1, #10 <== NOT EXECUTED 363c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3640: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3644: e58de000 str lr, [sp] <== NOT EXECUTED 3648: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 364c: eb00036e bl 440c <== 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) 3650: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3654: 1a00006c bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3658: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 365c: e59f0200 ldr r0, [pc, #512] ; 3864 <== NOT EXECUTED 3660: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3664: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3668: e3a01009 mov r1, #9 <== NOT EXECUTED 366c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3670: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3674: e58de000 str lr, [sp] <== NOT EXECUTED 3678: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 367c: eb000362 bl 440c <== 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) 3680: e3500000 cmp r0, #0 <== NOT EXECUTED 3684: 1a000060 bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3688: e59430a0 ldr r3, [r4, #160] ; 0xa0 368c: e3530000 cmp r3, #0 3690: 0a000002 beq 36a0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3694: e59430b4 ldr r3, [r4, #180] ; 0xb4 3698: e3530002 cmp r3, #2 369c: 1a00000b bne 36d0 sc = rtems_semaphore_create ( 36a0: e59f31a4 ldr r3, [pc, #420] ; 384c <== NOT EXECUTED 36a4: e59f01bc ldr r0, [pc, #444] ; 3868 <== NOT EXECUTED 36a8: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 36ac: e3a01000 mov r1, #0 <== NOT EXECUTED 36b0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 36b4: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 36b8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 36bc: e1a03001 mov r3, r1 <== NOT EXECUTED 36c0: e58dc000 str ip, [sp] <== NOT EXECUTED 36c4: eb000251 bl 4010 <== 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) 36c8: e3500000 cmp r0, #0 <== NOT EXECUTED 36cc: 1a00004e bne 380c <== 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'; 36d0: 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; 36d4: e58430b8 str r3, [r4, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 36d8: e5941064 ldr r1, [r4, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 36dc: 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'; 36e0: 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; 36e4: 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'; 36e8: e3a0c01c mov ip, #28 36ec: e5c4c042 strb ip, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 36f0: e28cc063 add ip, ip, #99 ; 0x63 36f4: e5c4c043 strb ip, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 36f8: e3a0c015 mov ip, #21 36fc: e5c4c044 strb ip, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 3700: e3a0c004 mov ip, #4 3704: e5c4c045 strb ip, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3708: e28cc00d add ip, ip, #13 370c: e5c4c049 strb ip, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 3710: e28cc002 add ip, ip, #2 3714: e5c4c04a strb ip, [r4, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3718: e28cc007 add ip, ip, #7 371c: e5c4c04b strb ip, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 3720: e3a0c012 mov ip, #18 3724: e5c4c04d strb ip, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3728: e3a0c00f mov ip, #15 372c: e5c4c04e strb ip, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 3730: e28cc008 add ip, ip, #8 3734: e5c4c04f strb ip, [r4, #79] ; 0x4f tty->termios.c_cc[VLNEXT] = '\026'; 3738: 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'; 373c: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3740: 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'; 3744: 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'; 3748: 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') 374c: e59f30f8 ldr r3, [pc, #248] ; 384c 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; 3750: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 3754: 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; 3758: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 375c: e59f0108 ldr r0, [pc, #264] ; 386c 3760: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3764: e59f0104 ldr r0, [pc, #260] ; 3870 3768: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 376c: e59f0100 ldr r0, [pc, #256] ; 3874 3770: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3774: e59f00fc ldr r0, [pc, #252] ; 3878 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3778: 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; 377c: e1a010a1 lsr r1, r1, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3780: 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; 3784: 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; 3788: e58410bc str r1, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 378c: e5c3200c strb r2, [r3, #12] c = 'a'; 3790: 03a02061 moveq r2, #97 ; 0x61 3794: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 3798: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 379c: e5982000 ldr r2, [r8] if (!tty->refcount++) { 37a0: e3530000 cmp r3, #0 37a4: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 37a8: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 37ac: e5853008 str r3, [r5, #8] 37b0: 1a000016 bne 3810 if (tty->device.firstOpen) 37b4: e5953098 ldr r3, [r5, #152] ; 0x98 37b8: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 37bc: 11a00009 movne r0, r9 37c0: 11a0100a movne r1, sl 37c4: 11a02008 movne r2, r8 37c8: 11a0e00f movne lr, pc 37cc: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 37d0: e59530b4 ldr r3, [r5, #180] ; 0xb4 37d4: e3530002 cmp r3, #2 37d8: 1a00000c bne 3810 sc = rtems_task_start(tty->rxTaskId, 37dc: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 37e0: e59f1094 ldr r1, [pc, #148] ; 387c <== NOT EXECUTED 37e4: e1a02005 mov r2, r5 <== NOT EXECUTED 37e8: eb0003ac bl 46a0 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 37ec: e3500000 cmp r0, #0 <== NOT EXECUTED 37f0: 1a000005 bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 37f4: e1a02005 mov r2, r5 <== NOT EXECUTED 37f8: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 37fc: e59f107c ldr r1, [pc, #124] ; 3880 <== NOT EXECUTED 3800: eb0003a6 bl 46a0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3804: e3500000 cmp r0, #0 <== NOT EXECUTED 3808: 0a000000 beq 3810 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 380c: eb000424 bl 48a4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 3810: e59f302c ldr r3, [pc, #44] ; 3844 3814: e5930000 ldr r0, [r3] 3818: eb0002d4 bl 4370 return RTEMS_SUCCESSFUL; } 381c: e1a00006 mov r0, r6 3820: 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)); 3824: e3a00001 mov r0, #1 3828: e3a010e8 mov r1, #232 ; 0xe8 382c: eb001363 bl 85c0 if (tty == NULL) { 3830: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3834: e1a05000 mov r5, r0 3838: e1a04000 mov r4, r0 if (tty == NULL) { 383c: 1affff1d bne 34b8 3840: eaffff26 b 34e0 <== NOT EXECUTED 3844: 000185ec .word 0x000185ec 3848: 000185f4 .word 0x000185f4 384c: 00017174 .word 0x00017174 3850: 000185f0 .word 0x000185f0 3854: 54526900 .word 0x54526900 3858: 54526f00 .word 0x54526f00 385c: 54527800 .word 0x54527800 3860: 54785400 .word 0x54785400 3864: 52785400 .word 0x52785400 3868: 54527200 .word 0x54527200 386c: 00002502 .word 0x00002502 3870: 00001805 .word 0x00001805 3874: 000008bd .word 0x000008bd 3878: 0000823b .word 0x0000823b 387c: 000038f0 .word 0x000038f0 3880: 00003884 .word 0x00003884 000023f0 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 23f0: e59230b4 ldr r3, [r2, #180] ; 0xb4 23f4: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 23f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 23fc: e1a04002 mov r4, r2 2400: e1a0a000 mov sl, r0 2404: 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) { 2408: 1a000005 bne 2424 (*tty->device.write)(tty->minor, (void *)buf, len); 240c: e1a01000 mov r1, r0 2410: e1a02006 mov r2, r6 2414: e5940010 ldr r0, [r4, #16] 2418: e1a0e00f mov lr, pc 241c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 2420: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 2424: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2428: 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; 242c: 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; 2430: 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) { 2434: ea00002e b 24f4 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2438: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 243c: e2850001 add r0, r5, #1 <== NOT EXECUTED 2440: eb004a5e bl 14dc0 <__umodsi3> <== NOT EXECUTED 2444: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2448: e10f8000 mrs r8, CPSR <== NOT EXECUTED 244c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2450: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2454: ea00000a b 2484 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2458: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 245c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2460: e3a01000 mov r1, #0 <== NOT EXECUTED 2464: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2468: e1a02001 mov r2, r1 <== NOT EXECUTED 246c: eb000779 bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2470: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2474: 1b00090a blne 48a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2478: e10f8000 mrs r8, CPSR <== NOT EXECUTED 247c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2480: 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) { 2484: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2488: e1550003 cmp r5, r3 <== NOT EXECUTED 248c: 0afffff1 beq 2458 <== 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++; 2490: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2494: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2498: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 249c: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 24a0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 24a4: 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; 24a8: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 24ac: 1a00000d bne 24e8 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 24b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b4: 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; 24b8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24bc: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 24c0: 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)) { 24c4: 1a000006 bne 24e4 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 24c8: 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, 24cc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 24d0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 24d4: e0811003 add r1, r1, r3 <== NOT EXECUTED 24d8: e3a02001 mov r2, #1 <== NOT EXECUTED 24dc: e1a0e00f mov lr, pc <== NOT EXECUTED 24e0: 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; 24e4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 24e8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 24ec: e2466001 sub r6, r6, #1 <== NOT EXECUTED 24f0: 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) { 24f4: e3560000 cmp r6, #0 <== NOT EXECUTED 24f8: 1affffce bne 2438 <== NOT EXECUTED 24fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002bc4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc4: 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; 2bc8: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bcc: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2bd0: 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); 2bd4: 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; 2bd8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bdc: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2be0: 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; 2be4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 2be8: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bec: eb000599 bl 4258 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2bf0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 2bf4: 1a0000c1 bne 2f00 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2bf8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2bfc: e59f3304 ldr r3, [pc, #772] ; 2f08 <== NOT EXECUTED 2c00: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2c04: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2c08: e3530000 cmp r3, #0 <== NOT EXECUTED 2c0c: 0a000005 beq 2c28 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2c10: e1a01005 mov r1, r5 <== NOT EXECUTED 2c14: e1a00004 mov r0, r4 <== NOT EXECUTED 2c18: e1a0e00f mov lr, pc <== NOT EXECUTED 2c1c: e12fff13 bx r3 <== NOT EXECUTED 2c20: e1a06000 mov r6, r0 <== NOT EXECUTED 2c24: ea0000b1 b 2ef0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2c28: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 2c2c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2c30: e1520003 cmp r2, r3 <== NOT EXECUTED 2c34: 1a00009a bne 2ea4 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c38: 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; 2c3c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 2c40: 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; 2c44: 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; 2c48: e5846020 str r6, [r4, #32] <== NOT EXECUTED 2c4c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c50: 0a00003b beq 2d44 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2c54: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 2c58: e3530000 cmp r3, #0 <== NOT EXECUTED 2c5c: 1a000038 bne 2d44 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2c60: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2c64: e3130002 tst r3, #2 <== NOT EXECUTED 2c68: 0a00000d beq 2ca4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2c6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2c70: e1a0e00f mov lr, pc <== NOT EXECUTED 2c74: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2c78: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2c7c: e1a01004 mov r1, r4 <== NOT EXECUTED 2c80: 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) { 2c84: aa000002 bge 2c94 <== NOT EXECUTED rtems_task_wake_after (1); 2c88: e3a00001 mov r0, #1 <== NOT EXECUTED 2c8c: eb00069b bl 4700 <== NOT EXECUTED 2c90: eafffff5 b 2c6c <== NOT EXECUTED } else { if (siproc (n, tty)) 2c94: ebffff67 bl 2a38 <== NOT EXECUTED 2c98: e3500000 cmp r0, #0 <== NOT EXECUTED 2c9c: 0afffff2 beq 2c6c <== NOT EXECUTED 2ca0: ea00007f b 2ea4 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 2ca4: eb0003de bl 3c24 <== NOT EXECUTED 2ca8: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2cac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2cb0: e1a0e00f mov lr, pc <== NOT EXECUTED 2cb4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2cb8: e3500000 cmp r0, #0 <== NOT EXECUTED 2cbc: aa000013 bge 2d10 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2cc0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2cc4: e3530000 cmp r3, #0 <== NOT EXECUTED 2cc8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2ccc: 0a000005 beq 2ce8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2cd0: e3530000 cmp r3, #0 <== NOT EXECUTED 2cd4: 0a00000a beq 2d04 <== NOT EXECUTED 2cd8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2cdc: e3530000 cmp r3, #0 <== NOT EXECUTED 2ce0: 0a000007 beq 2d04 <== NOT EXECUTED 2ce4: ea000001 b 2cf0 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2ce8: e3530000 cmp r3, #0 <== NOT EXECUTED 2cec: 0a00006c beq 2ea4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 2cf0: eb0003cb bl 3c24 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2cf4: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 2cf8: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 2cfc: e1500003 cmp r0, r3 <== NOT EXECUTED 2d00: 8a000067 bhi 2ea4 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2d04: e3a00001 mov r0, #1 <== NOT EXECUTED 2d08: eb00067c bl 4700 <== NOT EXECUTED 2d0c: eaffffe6 b 2cac <== NOT EXECUTED } else { siproc (n, tty); 2d10: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 2d14: e1a01004 mov r1, r4 <== NOT EXECUTED 2d18: ebffff46 bl 2a38 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2d1c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2d20: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2d24: e1520003 cmp r2, r3 <== NOT EXECUTED 2d28: aa00005d bge 2ea4 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2d2c: e3530000 cmp r3, #0 <== NOT EXECUTED 2d30: 0affffdd beq 2cac <== NOT EXECUTED 2d34: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2d38: e3530000 cmp r3, #0 <== NOT EXECUTED 2d3c: 0affffda beq 2cac <== NOT EXECUTED 2d40: eaffffd7 b 2ca4 <== 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; 2d44: 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, 2d48: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 2d4c: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2d50: e59f91b4 ldr r9, [pc, #436] ; 2f0c <== NOT EXECUTED 2d54: ea000041 b 2e60 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 2d58: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2d5c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d60: e2800001 add r0, r0, #1 <== NOT EXECUTED 2d64: eb004815 bl 14dc0 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2d68: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2d6c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2d70: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2d74: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2d78: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 2d7c: e0823003 add r3, r2, r3 <== NOT EXECUTED 2d80: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 2d84: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d88: eb00480c bl 14dc0 <__umodsi3> <== NOT EXECUTED 2d8c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 2d90: e1500003 cmp r0, r3 <== NOT EXECUTED 2d94: 2a00001f bcs 2e18 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2d98: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d9c: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2da0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2da4: e59f3164 ldr r3, [pc, #356] ; 2f10 <== NOT EXECUTED 2da8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dac: e59f015c ldr r0, [pc, #348] ; 2f10 <== NOT EXECUTED 2db0: e0023003 and r3, r2, r3 <== NOT EXECUTED 2db4: e1530000 cmp r3, r0 <== NOT EXECUTED 2db8: 1a00000b bne 2dec <== NOT EXECUTED 2dbc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 2dc4: 0a000002 beq 2dd4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 2dc8: 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)) 2dcc: e3130020 tst r3, #32 <== NOT EXECUTED 2dd0: 0a000005 beq 2dec <== 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, 2dd4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2dd8: e1a0100b mov r1, fp <== NOT EXECUTED 2ddc: e3a02001 mov r2, #1 <== NOT EXECUTED 2de0: e1a0e00f mov lr, pc <== NOT EXECUTED 2de4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2de8: ea00000a b 2e18 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2dec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2df0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2df4: 0a000007 beq 2e18 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2df8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2dfc: 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; 2e00: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2e04: 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; 2e08: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 2e0c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2e10: 11a0e00f movne lr, pc <== NOT EXECUTED 2e14: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2e18: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2e1c: e3130002 tst r3, #2 <== NOT EXECUTED 2e20: 0a000005 beq 2e3c <== NOT EXECUTED if (siproc (c, tty)) 2e24: e1a00008 mov r0, r8 <== NOT EXECUTED 2e28: e1a01004 mov r1, r4 <== NOT EXECUTED 2e2c: ebffff01 bl 2a38 <== NOT EXECUTED 2e30: e3500000 cmp r0, #0 <== NOT EXECUTED 2e34: 1a000007 bne 2e58 <== NOT EXECUTED 2e38: ea000007 b 2e5c <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 2e3c: e1a00008 mov r0, r8 <== NOT EXECUTED 2e40: e1a01004 mov r1, r4 <== NOT EXECUTED 2e44: ebfffefb bl 2a38 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2e48: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2e4c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e50: e1520003 cmp r2, r3 <== NOT EXECUTED 2e54: ba000000 blt 2e5c <== NOT EXECUTED 2e58: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2e5c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2e60: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 2e64: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2e68: e1520003 cmp r2, r3 <== NOT EXECUTED 2e6c: 0a000004 beq 2e84 <== NOT EXECUTED 2e70: e5993000 ldr r3, [r9] <== NOT EXECUTED 2e74: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e78: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e7c: e1520003 cmp r2, r3 <== NOT EXECUTED 2e80: baffffb4 blt 2d58 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2e84: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e88: 0a000005 beq 2ea4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2e8c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 2e90: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2e94: e1a02008 mov r2, r8 <== NOT EXECUTED 2e98: eb0004ee bl 4258 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2e9c: e3500000 cmp r0, #0 <== NOT EXECUTED 2ea0: 0affffee beq 2e60 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2ea4: e3a03000 mov r3, #0 <== NOT EXECUTED 2ea8: ea000007 b 2ecc <== 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++]; 2eac: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 2eb0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2eb4: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 2eb8: e2822001 add r2, r2, #1 <== NOT EXECUTED 2ebc: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 2ec0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 2ec4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 2ec8: 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)) { 2ecc: e3570000 cmp r7, #0 <== NOT EXECUTED 2ed0: 0a000003 beq 2ee4 <== NOT EXECUTED 2ed4: e2841020 add r1, r4, #32 <== NOT EXECUTED 2ed8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2edc: e1520001 cmp r2, r1 <== NOT EXECUTED 2ee0: bafffff1 blt 2eac <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2ee4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 2ee8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 2eec: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2ef0: e3a03000 mov r3, #0 <== NOT EXECUTED 2ef4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2ef8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2efc: eb00051b bl 4370 <== NOT EXECUTED return sc; } 2f00: e1a00006 mov r0, r6 <== NOT EXECUTED 2f04: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2f08: 00018418 .word 0x00018418 2f0c: 00017174 .word 0x00017174 2f10: 00000202 .word 0x00000202 00001ed0 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1ed0: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 1ed4: e59f31d0 ldr r3, [pc, #464] ; 20ac <== NOT EXECUTED 1ed8: e0023003 and r3, r2, r3 <== NOT EXECUTED 1edc: e59f21cc ldr r2, [pc, #460] ; 20b0 <== NOT EXECUTED 1ee0: 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) { 1ee4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1ee8: 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)) 1eec: 1a00000e bne 1f2c <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1ef0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 1ef4: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 1ef8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1efc: e1a0e00f mov lr, pc <== NOT EXECUTED 1f00: 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 ( 1f04: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f08: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f0c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f10: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f14: 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--; 1f18: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f1c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 1f20: 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--; 1f24: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 1f28: ea000011 b 1f74 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1f2c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 1f30: e2033003 and r3, r3, #3 <== NOT EXECUTED 1f34: e3530002 cmp r3, #2 <== NOT EXECUTED 1f38: 1a000010 bne 1f80 <== 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, 1f3c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 1f40: e3a02001 mov r2, #1 <== NOT EXECUTED 1f44: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1f48: e1a0e00f mov lr, pc <== NOT EXECUTED 1f4c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 1f50: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f54: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f58: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f5c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f60: 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--; 1f64: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f68: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 1f6c: 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--; 1f70: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1f74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 1f78: e3a05001 mov r5, #1 <== NOT EXECUTED 1f7c: ea000048 b 20a4 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1f80: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 1f84: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 1f88: e1520003 cmp r2, r3 <== NOT EXECUTED 1f8c: 1a000005 bne 1fa8 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 1f90: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 1f94: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1f98: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 1f9c: 0b0008f3 bleq 4370 <== NOT EXECUTED 1fa0: e3a05000 mov r5, #0 <== NOT EXECUTED 1fa4: ea00003e b 20a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1fa8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1fac: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1fb0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 1fb4: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 1fb8: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 1fbc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1fc0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 1fc4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 1fc8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 1fcc: e0800003 add r0, r0, r3 <== NOT EXECUTED 1fd0: eb004b7a bl 14dc0 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 1fd4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 1fd8: 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; 1fdc: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 1fe0: 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); 1fe4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 1fe8: 0b0008e0 bleq 4370 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 1fec: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 1ff0: e1560003 cmp r6, r3 <== NOT EXECUTED 1ff4: 1a00000a bne 2024 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ff8: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 1ffc: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2000: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2004: 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) { 2008: 01a05003 moveq r5, r3 <== NOT EXECUTED 200c: 0a000023 beq 20a0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2010: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2014: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2018: e1a0e00f mov lr, pc <== NOT EXECUTED 201c: e12fff13 bx r3 <== NOT EXECUTED 2020: ea00001e b 20a0 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 2024: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2028: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 202c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2030: 1a00000a bne 2060 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2034: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2038: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 203c: 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; 2040: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2044: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2048: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 204c: e3a02001 mov r2, #1 <== NOT EXECUTED 2050: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2054: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2058: e3a05000 mov r5, #0 <== NOT EXECUTED 205c: ea00000f b 20a0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2060: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2064: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2068: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 206c: 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)) { 2070: 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; 2074: 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)) { 2078: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 207c: 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)) { 2080: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2084: e3a03001 mov r3, #1 <== NOT EXECUTED 2088: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 208c: e0811006 add r1, r1, r6 <== NOT EXECUTED 2090: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2094: e1a02005 mov r2, r5 <== NOT EXECUTED 2098: e1a0e00f mov lr, pc <== NOT EXECUTED 209c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 20a0: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 20a4: e1a00005 mov r0, r5 <== NOT EXECUTED 20a8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 20ac: 00000403 .word 0x00000403 20b0: 00000401 .word 0x00000401 000038f0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 38f0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 38f4: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38f8: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 38fc: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3900: e1a0300d mov r3, sp <== NOT EXECUTED 3904: e3a01002 mov r1, #2 <== NOT EXECUTED 3908: e3a02000 mov r2, #0 <== NOT EXECUTED 390c: e3a00003 mov r0, #3 <== NOT EXECUTED 3910: eb0000e0 bl 3c98 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3914: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3918: e3130001 tst r3, #1 <== NOT EXECUTED 391c: 0a000003 beq 3930 <== NOT EXECUTED tty->rxTaskId = 0; 3920: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3924: e1a00005 mov r0, r5 <== NOT EXECUTED 3928: eb000309 bl 4554 <== NOT EXECUTED 392c: eafffff3 b 3900 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3930: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3934: e1a0e00f mov lr, pc <== NOT EXECUTED 3938: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 393c: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3940: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3944: 0affffed beq 3900 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3948: e1a00004 mov r0, r4 <== NOT EXECUTED 394c: e1a01006 mov r1, r6 <== NOT EXECUTED 3950: 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; 3954: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3958: ebfff9f1 bl 2124 <== NOT EXECUTED 395c: eaffffe7 b 3900 <== NOT EXECUTED 00001ec4 : 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); 1ec4: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 1ec8: e3a01002 mov r1, #2 <== NOT EXECUTED 1ecc: ea0007cd b 3e08 <== NOT EXECUTED 00003884 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3884: 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) { 3888: e59f705c ldr r7, [pc, #92] ; 38ec <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 388c: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3890: e3a05000 mov r5, #0 <== NOT EXECUTED 3894: e1a0300d mov r3, sp <== NOT EXECUTED 3898: e3a01002 mov r1, #2 <== NOT EXECUTED 389c: e3a02000 mov r2, #0 <== NOT EXECUTED 38a0: e3a00003 mov r0, #3 <== NOT EXECUTED 38a4: eb0000fb bl 3c98 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 38a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 38ac: 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); 38b0: 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) { 38b4: 0a000003 beq 38c8 <== NOT EXECUTED tty->txTaskId = 0; 38b8: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 38bc: e1a00005 mov r0, r5 <== NOT EXECUTED 38c0: eb000323 bl 4554 <== NOT EXECUTED 38c4: eafffff2 b 3894 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 38c8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 38cc: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 38d0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 38d4: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 38d8: 11a0e00f movne lr, pc <== NOT EXECUTED 38dc: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 38e0: e1a00004 mov r0, r4 <== NOT EXECUTED 38e4: ebfff979 bl 1ed0 <== NOT EXECUTED 38e8: eaffffe9 b 3894 <== NOT EXECUTED 38ec: 00018418 .word 0x00018418 00002a98 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a98: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2a9c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2aa0: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2aa4: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2aa8: 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); 2aac: e1a02001 mov r2, r1 2ab0: e5950018 ldr r0, [r5, #24] 2ab4: eb0005e7 bl 4258 if (sc != RTEMS_SUCCESSFUL) 2ab8: e2506000 subs r6, r0, #0 2abc: 1a000022 bne 2b4c return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2ac0: e59520cc ldr r2, [r5, #204] ; 0xcc 2ac4: e59f3088 ldr r3, [pc, #136] ; 2b54 2ac8: e0833282 add r3, r3, r2, lsl #5 2acc: e593300c ldr r3, [r3, #12] 2ad0: e3530000 cmp r3, #0 2ad4: 0a000005 beq 2af0 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2ad8: e1a01004 mov r1, r4 <== NOT EXECUTED 2adc: e1a00005 mov r0, r5 <== NOT EXECUTED 2ae0: e1a0e00f mov lr, pc <== NOT EXECUTED 2ae4: e12fff13 bx r3 <== NOT EXECUTED 2ae8: e1a06000 mov r6, r0 <== NOT EXECUTED 2aec: ea000014 b 2b44 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2af0: e5953034 ldr r3, [r5, #52] ; 0x34 2af4: e3130001 tst r3, #1 uint32_t count = args->count; 2af8: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 2afc: 1594a00c ldrne sl, [r4, #12] 2b00: 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) { 2b04: 1a000004 bne 2b1c 2b08: ea000007 b 2b2c <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 2b0c: e7da0007 ldrb r0, [sl, r7] 2b10: ebfffe7a bl 2500 2b14: e2877001 add r7, r7, #1 2b18: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b1c: e3580000 cmp r8, #0 oproc (*buffer++, tty); 2b20: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b24: 1afffff8 bne 2b0c 2b28: ea000003 b 2b3c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2b2c: e284000c add r0, r4, #12 <== NOT EXECUTED 2b30: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2b34: e1a02005 mov r2, r5 <== NOT EXECUTED 2b38: ebfffe2c bl 23f0 <== NOT EXECUTED args->bytes_moved = args->count; 2b3c: e5943010 ldr r3, [r4, #16] 2b40: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 2b44: e5950018 ldr r0, [r5, #24] 2b48: eb000608 bl 4370 return sc; } 2b4c: e1a00006 mov r0, r6 2b50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2b54: 00018418 .word 0x00018418 00005d38 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 5d38: 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) 5d3c: 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 ) { 5d40: e1a06000 mov r6, r0 <== NOT EXECUTED 5d44: e1a09001 mov r9, r1 <== NOT EXECUTED 5d48: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 5d4c: 0a00000d beq 5d88 <== NOT EXECUTED { if (rtems_panic_in_progress++) 5d50: e59f3160 ldr r3, [pc, #352] ; 5eb8 <== NOT EXECUTED 5d54: e5932000 ldr r2, [r3] <== NOT EXECUTED 5d58: e3520000 cmp r2, #0 <== NOT EXECUTED 5d5c: e2822001 add r2, r2, #1 <== NOT EXECUTED 5d60: e5832000 str r2, [r3] <== NOT EXECUTED 5d64: 0a000003 beq 5d78 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5d68: e59f314c ldr r3, [pc, #332] ; 5ebc <== NOT EXECUTED 5d6c: e5932000 ldr r2, [r3] <== NOT EXECUTED 5d70: e2822001 add r2, r2, #1 <== NOT EXECUTED 5d74: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 5d78: e59f3138 ldr r3, [pc, #312] ; 5eb8 <== NOT EXECUTED 5d7c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5d80: e3530002 cmp r3, #2 <== NOT EXECUTED 5d84: ca000049 bgt 5eb0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 5d88: e59f3130 ldr r3, [pc, #304] ; 5ec0 <== NOT EXECUTED 5d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5d90: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 5d94: eb003047 bl 11eb8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5d98: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 5d9c: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5da0: 0a000001 beq 5dac <== NOT EXECUTED local_errno = errno; 5da4: eb002f50 bl 11aec <__errno> <== NOT EXECUTED 5da8: 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); 5dac: e59fa10c ldr sl, [pc, #268] ; 5ec0 <== NOT EXECUTED 5db0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5db4: e1a02004 mov r2, r4 <== NOT EXECUTED 5db8: e1a01009 mov r1, r9 <== NOT EXECUTED 5dbc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5dc0: eb00485d bl 17f3c <== NOT EXECUTED if (status) 5dc4: 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); 5dc8: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 5dcc: 0a000008 beq 5df4 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 5dd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5dd4: e1a00008 mov r0, r8 <== NOT EXECUTED 5dd8: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5ddc: ebffffd1 bl 5d28 <== NOT EXECUTED 5de0: e59f10dc ldr r1, [pc, #220] ; 5ec4 <== NOT EXECUTED 5de4: e1a02000 mov r2, r0 <== NOT EXECUTED 5de8: e1a00008 mov r0, r8 <== NOT EXECUTED 5dec: eb0030ef bl 121b0 <== NOT EXECUTED 5df0: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 5df4: e3550000 cmp r5, #0 <== NOT EXECUTED 5df8: 0a000015 beq 5e54 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 5dfc: da00000d ble 5e38 <== NOT EXECUTED 5e00: e1a00005 mov r0, r5 <== NOT EXECUTED 5e04: eb0033fc bl 12dfc <== NOT EXECUTED 5e08: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 5e0c: e3530000 cmp r3, #0 <== NOT EXECUTED 5e10: 0a000008 beq 5e38 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 5e14: e59f30a4 ldr r3, [pc, #164] ; 5ec0 <== NOT EXECUTED 5e18: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e1c: e1a00005 mov r0, r5 <== NOT EXECUTED 5e20: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e24: eb0033f4 bl 12dfc <== NOT EXECUTED 5e28: e59f1098 ldr r1, [pc, #152] ; 5ec8 <== NOT EXECUTED 5e2c: e1a02000 mov r2, r0 <== NOT EXECUTED 5e30: e1a00008 mov r0, r8 <== NOT EXECUTED 5e34: ea000004 b 5e4c <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 5e38: e59f3080 ldr r3, [pc, #128] ; 5ec0 <== NOT EXECUTED 5e3c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e40: e59f1084 ldr r1, [pc, #132] ; 5ecc <== NOT EXECUTED 5e44: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e48: e1a02005 mov r2, r5 <== NOT EXECUTED 5e4c: eb0030d7 bl 121b0 <== NOT EXECUTED 5e50: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 5e54: e59f8064 ldr r8, [pc, #100] ; 5ec0 <== NOT EXECUTED 5e58: e5983000 ldr r3, [r8] <== NOT EXECUTED 5e5c: e59f106c ldr r1, [pc, #108] ; 5ed0 <== NOT EXECUTED 5e60: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e64: eb0030d1 bl 121b0 <== NOT EXECUTED (void) fflush(stderr); 5e68: 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"); 5e6c: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 5e70: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e74: eb00300f bl 11eb8 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5e78: 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"); 5e7c: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5e80: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 5e84: e3570000 cmp r7, #0 <== NOT EXECUTED 5e88: 0a000004 beq 5ea0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 5e8c: e3a00000 mov r0, #0 <== NOT EXECUTED 5e90: e59f103c ldr r1, [pc, #60] ; 5ed4 <== NOT EXECUTED 5e94: eb00001b bl 5f08 <== NOT EXECUTED _exit(local_errno); 5e98: e1a00005 mov r0, r5 <== NOT EXECUTED 5e9c: eb0002cf bl 69e0 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 5ea0: e59f1030 ldr r1, [pc, #48] ; 5ed8 <== NOT EXECUTED 5ea4: e1a00007 mov r0, r7 <== NOT EXECUTED 5ea8: eb000016 bl 5f08 <== NOT EXECUTED abort(); 5eac: eb002f05 bl 11ac8 <== NOT EXECUTED 5eb0: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 5eb4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 5eb8: 00023400 .word 0x00023400 5ebc: 0002358c .word 0x0002358c 5ec0: 00020ab4 .word 0x00020ab4 5ec4: 00022247 .word 0x00022247 5ec8: 00022255 .word 0x00022255 5ecc: 00022262 .word 0x00022262 5ed0: 00022234 .word 0x00022234 5ed4: 00022276 .word 0x00022276 5ed8: 0002228b .word 0x0002228b 000220c0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 220c0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 220c4: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 220c8: e59fb0d4 ldr fp, [pc, #212] ; 221a4 limit++; continue; } sign = 1; } if (!isdigit(c)) 220cc: e59f90d4 ldr r9, [pc, #212] ; 221a8 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 220d0: e58d1000 str r1, [sp] 220d4: e1a05000 mov r5, r0 220d8: e3e08102 mvn r8, #-2147483648 ; 0x80000000 220dc: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 220e0: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 220e4: e5953004 ldr r3, [r5, #4] 220e8: e2433001 sub r3, r3, #1 220ec: e3530000 cmp r3, #0 220f0: e5853004 str r3, [r5, #4] 220f4: a5953000 ldrge r3, [r5] 220f8: a4d36001 ldrbge r6, [r3], #1 220fc: a5853000 strge r3, [r5] 22100: aa000003 bge 22114 22104: e59b0000 ldr r0, [fp] <== NOT EXECUTED 22108: e1a01005 mov r1, r5 <== NOT EXECUTED 2210c: eb006bc4 bl 3d024 <__srget_r> <== NOT EXECUTED 22110: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 22114: e356003a cmp r6, #58 ; 0x3a 22118: 0a000019 beq 22184 break; if (sign == 0) { 2211c: e3540000 cmp r4, #0 22120: 1a000004 bne 22138 if (c == '-') { 22124: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 22128: 02888001 addeq r8, r8, #1 2212c: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 22130: 0affffeb beq 220e4 sign = -1; limit++; continue; 22134: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 22138: e5993000 ldr r3, [r9] 2213c: e0833006 add r3, r3, r6 22140: e5d33001 ldrb r3, [r3, #1] 22144: e3130004 tst r3, #4 22148: 0a000013 beq 2219c return 0; d = c - '0'; if ((i > (limit / 10)) 2214c: e1a00008 mov r0, r8 22150: e3a0100a mov r1, #10 22154: eb00b637 bl 4fa38 <__aeabi_uidiv> 22158: e1570000 cmp r7, r0 2215c: 8a00000e bhi 2219c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 22160: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 22164: 1a000004 bne 2217c 22168: e1a00008 mov r0, r8 <== NOT EXECUTED 2216c: e3a0100a mov r1, #10 <== NOT EXECUTED 22170: eb00b6c4 bl 4fc88 <__umodsi3> <== NOT EXECUTED 22174: e1560000 cmp r6, r0 <== NOT EXECUTED 22178: 8a000007 bhi 2219c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 2217c: e027679a mla r7, sl, r7, r6 22180: eaffffd7 b 220e4 } if (sign == 0) 22184: e3540000 cmp r4, #0 return 0; *val = i * sign; 22188: 10030497 mulne r3, r7, r4 2218c: 159d2000 ldrne r2, [sp] 22190: 13a00001 movne r0, #1 22194: 15823000 strne r3, [r2] return 1; 22198: 1a000000 bne 221a0 2219c: e3a00000 mov r0, #0 <== NOT EXECUTED } 221a0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 221a4: 000527bc .word 0x000527bc 221a8: 000527b0 .word 0x000527b0 000221ac : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 221ac: e92d41f0 push {r4, r5, r6, r7, r8, lr} 221b0: e1a04002 mov r4, r2 int c; *name = *bufp; 221b4: 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) { 221b8: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; 221bc: e5812000 str r2, [r1] for (;;) { c = getc(fp); 221c0: e59f70c0 ldr r7, [pc, #192] ; 22288 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 221c4: e1a05000 mov r5, r0 221c8: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 221cc: e5953004 ldr r3, [r5, #4] 221d0: e2433001 sub r3, r3, #1 221d4: e3530000 cmp r3, #0 221d8: e5853004 str r3, [r5, #4] 221dc: a5953000 ldrge r3, [r5] 221e0: a4d30001 ldrbge r0, [r3], #1 221e4: a5853000 strge r3, [r5] 221e8: b5970000 ldrlt r0, [r7] 221ec: b1a01005 movlt r1, r5 221f0: bb006b8b bllt 3d024 <__srget_r> if (c == ':') { 221f4: e350003a cmp r0, #58 ; 0x3a 221f8: 1a000002 bne 22208 if (nlFlag) 221fc: e3560000 cmp r6, #0 22200: 0a000013 beq 22254 22204: ea00001d b 22280 <== NOT EXECUTED return 0; break; } if (c == '\n') { 22208: e350000a cmp r0, #10 2220c: 1a000002 bne 2221c if (!nlFlag) 22210: e3560000 cmp r6, #0 22214: 1a00000e bne 22254 22218: ea000018 b 22280 <== NOT EXECUTED return 0; break; } if (c == EOF) 2221c: e3700001 cmn r0, #1 22220: 0a000016 beq 22280 return 0; if (*nleft < 2) 22224: e5983000 ldr r3, [r8] 22228: e3530001 cmp r3, #1 2222c: 9a000013 bls 22280 return 0; **bufp = c; 22230: e5943000 ldr r3, [r4] 22234: e5c30000 strb r0, [r3] ++(*bufp); 22238: e5942000 ldr r2, [r4] --(*nleft); 2223c: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 22240: e2822001 add r2, r2, #1 --(*nleft); 22244: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 22248: e5842000 str r2, [r4] --(*nleft); 2224c: e5883000 str r3, [r8] } 22250: eaffffdd b 221cc **bufp = '\0'; 22254: e5943000 ldr r3, [r4] 22258: e3a02000 mov r2, #0 2225c: e5c32000 strb r2, [r3] ++(*bufp); 22260: e5942000 ldr r2, [r4] --(*nleft); 22264: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22268: e2822001 add r2, r2, #1 --(*nleft); 2226c: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22270: e5842000 str r2, [r4] --(*nleft); 22274: e5883000 str r3, [r8] 22278: e3a00001 mov r0, #1 return 1; 2227c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 22280: e3a00000 mov r0, #0 <== NOT EXECUTED } 22284: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 22288: 000527bc .word 0x000527bc 0002228c : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2228c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22290: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22294: e28d6008 add r6, sp, #8 22298: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2229c: e58d2008 str r2, [sp, #8] 222a0: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222a4: e3a08000 mov r8, #0 222a8: e1a02006 mov r2, r6 222ac: e1a03005 mov r3, r5 222b0: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 222b4: e1a07000 mov r7, r0 222b8: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222bc: ebffffba bl 221ac 222c0: e1500008 cmp r0, r8 222c4: 0a00003b beq 223b8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 222c8: e1a00007 mov r0, r7 222cc: e2841004 add r1, r4, #4 222d0: e1a02006 mov r2, r6 222d4: e1a03005 mov r3, r5 222d8: e58d8000 str r8, [sp] 222dc: ebffffb2 bl 221ac { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222e0: e1500008 cmp r0, r8 222e4: 0a000033 beq 223b8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 222e8: e1a00007 mov r0, r7 222ec: e28d1010 add r1, sp, #16 222f0: ebffff72 bl 220c0 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 222f4: e1500008 cmp r0, r8 222f8: 0a00002e beq 223b8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 222fc: e1a03005 mov r3, r5 22300: e28d100c add r1, sp, #12 22304: e1a00007 mov r0, r7 22308: e1a02006 mov r2, r6 2230c: e3a05001 mov r5, #1 22310: e58d5000 str r5, [sp] 22314: ebffffa4 bl 221ac { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22318: 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; 2231c: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22320: 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; 22324: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22328: 1a000003 bne 2233c 2232c: ea000021 b 223b8 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 22330: e352002c cmp r2, #44 ; 0x2c memcount++; 22334: 02855001 addeq r5, r5, #1 22338: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2233c: e7d12008 ldrb r2, [r1, r8] 22340: e3520000 cmp r2, #0 22344: 1afffff9 bne 22330 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 22348: e1a05105 lsl r5, r5, #2 2234c: e59d3004 ldr r3, [sp, #4] 22350: e2855013 add r5, r5, #19 22354: e1530005 cmp r3, r5 22358: 3a000016 bcc 223b8 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 2235c: e59d3008 ldr r3, [sp, #8] 22360: e283300f add r3, r3, #15 22364: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22368: 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); 2236c: e584300c str r3, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22370: e59d300c ldr r3, [sp, #12] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 22374: e1a00002 mov r0, r2 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22378: e2833001 add r3, r3, #1 2237c: e2822001 add r2, r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22380: ea000005 b 2239c if(*cp == ',') { 22384: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 22388: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 2238c: 0594100c ldreq r1, [r4, #12] 22390: 07813102 streq r3, [r1, r2, lsl #2] 22394: 02822001 addeq r2, r2, #1 22398: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2239c: e5531001 ldrb r1, [r3, #-1] 223a0: e3510000 cmp r1, #0 223a4: 1afffff6 bne 22384 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 223a8: e594300c ldr r3, [r4, #12] 223ac: e3a00001 mov r0, #1 223b0: e7831102 str r1, [r3, r2, lsl #2] return 1; 223b4: ea000000 b 223bc 223b8: e3a00000 mov r0, #0 <== NOT EXECUTED } 223bc: e28dd014 add sp, sp, #20 223c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022400 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22400: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22404: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22408: e28d7008 add r7, sp, #8 2240c: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22410: e58d2008 str r2, [sp, #8] 22414: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22418: e3a08000 mov r8, #0 2241c: e1a02007 mov r2, r7 22420: e1a03006 mov r3, r6 22424: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22428: e1a05000 mov r5, r0 2242c: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22430: ebffff5d bl 221ac 22434: e1500008 cmp r0, r8 22438: 0a000038 beq 22520 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 2243c: e1a00005 mov r0, r5 22440: e2841004 add r1, r4, #4 22444: e1a02007 mov r2, r7 22448: e1a03006 mov r3, r6 2244c: e58d8000 str r8, [sp] 22450: ebffff55 bl 221ac size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22454: e1500008 cmp r0, r8 22458: 0a000030 beq 22520 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 2245c: e1a00005 mov r0, r5 22460: e28d1010 add r1, sp, #16 22464: ebffff15 bl 220c0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22468: e1500008 cmp r0, r8 2246c: 0a00002b beq 22520 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 22470: e1a00005 mov r0, r5 22474: e28d100c add r1, sp, #12 22478: ebffff10 bl 220c0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2247c: e1500008 cmp r0, r8 22480: 0a000026 beq 22520 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 22484: e1a00005 mov r0, r5 22488: e284100c add r1, r4, #12 2248c: e1a02007 mov r2, r7 22490: e1a03006 mov r3, r6 22494: e58d8000 str r8, [sp] 22498: ebffff43 bl 221ac size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2249c: e1500008 cmp r0, r8 224a0: 0a00001e beq 22520 || !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) 224a4: e1a00005 mov r0, r5 224a8: e2841010 add r1, r4, #16 224ac: e1a02007 mov r2, r7 224b0: e1a03006 mov r3, r6 224b4: e58d8000 str r8, [sp] 224b8: ebffff3b bl 221ac size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 224bc: e1500008 cmp r0, r8 224c0: 0a000016 beq 22520 || !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) 224c4: e1a00005 mov r0, r5 224c8: e2841014 add r1, r4, #20 224cc: e1a02007 mov r2, r7 224d0: e1a03006 mov r3, r6 224d4: e58d8000 str r8, [sp] 224d8: ebffff33 bl 221ac size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 224dc: e1500008 cmp r0, r8 224e0: 0a00000e beq 22520 || !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)) 224e4: e1a00005 mov r0, r5 224e8: e1a02007 mov r2, r7 224ec: e1a03006 mov r3, r6 224f0: e3a05001 mov r5, #1 224f4: e2841018 add r1, r4, #24 224f8: e58d5000 str r5, [sp] 224fc: ebffff2a bl 221ac size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22500: e1500008 cmp r0, r8 22504: 0a000005 beq 22520 || !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; 22508: e1dd30bc ldrh r3, [sp, #12] 2250c: 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; 22510: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 22514: 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; 22518: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 2251c: ea000000 b 22524 22520: e3a00000 mov r0, #0 <== NOT EXECUTED } 22524: e28dd014 add sp, sp, #20 22528: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022078 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 22078: e59f300c ldr r3, [pc, #12] ; 2208c <== NOT EXECUTED 2207c: e5933000 ldr r3, [r3] <== NOT EXECUTED 22080: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 22084: e3a00000 mov r0, #0 <== NOT EXECUTED 22088: e12fff1e bx lr <== NOT EXECUTED 2208c: 00051fe8 .word 0x00051fe8 00022630 : return NULL; return &grent; } void setgrent(void) { 22630: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 22634: ebffffcb bl 22568 <== NOT EXECUTED if (group_fp != NULL) 22638: e59f3020 ldr r3, [pc, #32] ; 22660 <== NOT EXECUTED 2263c: e5930000 ldr r0, [r3] <== NOT EXECUTED 22640: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 22644: 1b0055c4 blne 37d5c <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 22648: e59f0014 ldr r0, [pc, #20] ; 22664 <== NOT EXECUTED 2264c: e59f1014 ldr r1, [pc, #20] ; 22668 <== NOT EXECUTED 22650: eb0057e4 bl 385e8 <== NOT EXECUTED 22654: e59f3004 ldr r3, [pc, #4] ; 22660 <== NOT EXECUTED 22658: e5830000 str r0, [r3] <== NOT EXECUTED } 2265c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 22660: 0005f1dc .word 0x0005f1dc 22664: 00055f90 .word 0x00055f90 22668: 00056d08 .word 0x00056d08 00022800 : return NULL; return &pwent; } void setpwent(void) { 22800: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 22804: ebffff57 bl 22568 <== NOT EXECUTED if (passwd_fp != NULL) 22808: e59f3020 ldr r3, [pc, #32] ; 22830 <== NOT EXECUTED 2280c: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22810: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 22814: 1b005550 blne 37d5c <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 22818: e59f0014 ldr r0, [pc, #20] ; 22834 <== NOT EXECUTED 2281c: e59f1014 ldr r1, [pc, #20] ; 22838 <== NOT EXECUTED 22820: eb005770 bl 385e8 <== NOT EXECUTED 22824: e59f3004 ldr r3, [pc, #4] ; 22830 <== NOT EXECUTED 22828: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 2282c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 22830: 0005f1dc .word 0x0005f1dc 22834: 00055ee2 .word 0x00055ee2 22838: 00056d08 .word 0x00056d08 00005320 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 5320: e59f300c ldr r3, [pc, #12] ; 5334 <== NOT EXECUTED 5324: e5933000 ldr r3, [r3] <== NOT EXECUTED 5328: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 532c: e3a00000 mov r0, #0 <== NOT EXECUTED 5330: e12fff1e bx lr <== NOT EXECUTED 5334: 00051fe8 .word 0x00051fe8 00002a38 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2a38: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 2a3c: e59f3050 ldr r3, [pc, #80] ; 2a94 <== NOT EXECUTED 2a40: e0023003 and r3, r2, r3 <== NOT EXECUTED 2a44: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2a48: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2a4c: e1a04001 mov r4, r1 <== NOT EXECUTED 2a50: 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)) { 2a54: 0a00000b beq 2a88 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2a58: e3a01000 mov r1, #0 <== NOT EXECUTED 2a5c: e1a02001 mov r2, r1 <== NOT EXECUTED 2a60: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a64: eb0005fb bl 4258 <== NOT EXECUTED i = iproc (c, tty); 2a68: e1a01004 mov r1, r4 <== NOT EXECUTED 2a6c: e1a00005 mov r0, r5 <== NOT EXECUTED 2a70: ebffff8b bl 28a4 <== NOT EXECUTED 2a74: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2a78: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a7c: eb00063b bl 4370 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2a80: e1a00005 mov r0, r5 <== NOT EXECUTED 2a84: 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); 2a88: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 2a8c: 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); 2a90: eaffff83 b 28a4 <== NOT EXECUTED 2a94: 00000e78 .word 0x00000e78 00006800 : int _STAT_NAME( const char *path, struct stat *buf ) { 6800: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6804: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 6808: e24dd018 sub sp, sp, #24 680c: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6810: 1a000002 bne 6820 rtems_set_errno_and_return_minus_one( EFAULT ); 6814: eb00c503 bl 37c28 <__errno> 6818: e3a0300e mov r3, #14 681c: ea000018 b 6884 status = rtems_filesystem_evaluate_path( path, strlen( path ), 6820: eb00df7a bl 3e610 6824: e28d4004 add r4, sp, #4 6828: e1a01000 mov r1, r0 682c: e3a0c001 mov ip, #1 6830: e1a00006 mov r0, r6 6834: e3a02000 mov r2, #0 6838: e1a03004 mov r3, r4 683c: e58dc000 str ip, [sp] 6840: ebfffa3b bl 5134 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 6844: e2501000 subs r1, r0, #0 6848: 1a00000e bne 6888 return -1; if ( !loc.handlers->fstat_h ){ 684c: e59d300c ldr r3, [sp, #12] 6850: e5933018 ldr r3, [r3, #24] 6854: e3530000 cmp r3, #0 6858: 1a00000c bne 6890 rtems_filesystem_freenode( &loc ); 685c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6860: e3530000 cmp r3, #0 <== NOT EXECUTED 6864: 0a000004 beq 687c <== NOT EXECUTED 6868: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 686c: e3530000 cmp r3, #0 <== NOT EXECUTED 6870: 11a00004 movne r0, r4 <== NOT EXECUTED 6874: 11a0e00f movne lr, pc <== NOT EXECUTED 6878: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 687c: eb00c4e9 bl 37c28 <__errno> <== NOT EXECUTED 6880: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6884: e5803000 str r3, [r0] 6888: e3e05000 mvn r5, #0 688c: ea000010 b 68d4 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6890: e3a02048 mov r2, #72 ; 0x48 6894: e1a00005 mov r0, r5 6898: eb00d19a bl 3af08 status = (*loc.handlers->fstat_h)( &loc, buf ); 689c: e1a01005 mov r1, r5 68a0: e59d300c ldr r3, [sp, #12] 68a4: e1a00004 mov r0, r4 68a8: e1a0e00f mov lr, pc 68ac: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 68b0: e59d3010 ldr r3, [sp, #16] 68b4: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 68b8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 68bc: 0a000004 beq 68d4 68c0: e593301c ldr r3, [r3, #28] 68c4: e3530000 cmp r3, #0 68c8: 11a00004 movne r0, r4 68cc: 11a0e00f movne lr, pc 68d0: 112fff13 bxne r3 return status; } 68d4: e1a00005 mov r0, r5 68d8: e28dd018 add sp, sp, #24 68dc: e8bd8070 pop {r4, r5, r6, pc} 00023474 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 23474: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 23478: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 2347c: e1a05001 mov r5, r1 <== NOT EXECUTED 23480: 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 ) ) 23484: eb006c61 bl 3e610 <== NOT EXECUTED 23488: e28d4004 add r4, sp, #4 <== NOT EXECUTED 2348c: e1a01000 mov r1, r0 <== NOT EXECUTED 23490: e3a0c001 mov ip, #1 <== NOT EXECUTED 23494: e1a00006 mov r0, r6 <== NOT EXECUTED 23498: e3a02000 mov r2, #0 <== NOT EXECUTED 2349c: e1a03004 mov r3, r4 <== NOT EXECUTED 234a0: e58dc000 str ip, [sp] <== NOT EXECUTED 234a4: ebff8722 bl 5134 <== NOT EXECUTED 234a8: e2501000 subs r1, r0, #0 <== NOT EXECUTED 234ac: 1a000007 bne 234d0 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 234b0: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 234b4: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 234b8: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 234bc: e3530000 cmp r3, #0 <== NOT EXECUTED 234c0: 1a000004 bne 234d8 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 234c4: eb0051d7 bl 37c28 <__errno> <== NOT EXECUTED 234c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 234cc: e5803000 str r3, [r0] <== NOT EXECUTED 234d0: e3e05000 mvn r5, #0 <== NOT EXECUTED 234d4: ea000010 b 2351c <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 234d8: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 234dc: e1a00005 mov r0, r5 <== NOT EXECUTED 234e0: eb005e88 bl 3af08 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 234e4: e1a01005 mov r1, r5 <== NOT EXECUTED 234e8: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 234ec: e286001c add r0, r6, #28 <== NOT EXECUTED 234f0: e1a0e00f mov lr, pc <== NOT EXECUTED 234f4: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 234f8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 234fc: 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 ); 23500: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23504: 0a000004 beq 2351c <== NOT EXECUTED 23508: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2350c: e3530000 cmp r3, #0 <== NOT EXECUTED 23510: 11a00004 movne r0, r4 <== NOT EXECUTED 23514: 11a0e00f movne lr, pc <== NOT EXECUTED 23518: 112fff13 bxne r3 <== NOT EXECUTED return result; } 2351c: e1a00005 mov r0, r5 <== NOT EXECUTED 23520: e28dd018 add sp, sp, #24 <== NOT EXECUTED 23524: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00023528 : int symlink( const char *actualpath, const char *sympath ) { 23528: 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 ); 2352c: e5d13000 ldrb r3, [r1] 23530: e353002f cmp r3, #47 ; 0x2f 23534: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 23538: e24dd018 sub sp, sp, #24 2353c: 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 ); 23540: 13a06000 movne r6, #0 23544: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 23548: 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 ); 2354c: 0a000001 beq 23558 23550: e3530000 cmp r3, #0 23554: 1a000009 bne 23580 23558: e59f30f0 ldr r3, [pc, #240] ; 23650 2355c: e593e000 ldr lr, [r3] 23560: e28ee018 add lr, lr, #24 23564: e8be000f ldm lr!, {r0, r1, r2, r3} 23568: e1a0c00d mov ip, sp 2356c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23570: e59e3000 ldr r3, [lr] 23574: e3a00001 mov r0, #1 23578: e58c3000 str r3, [ip] 2357c: ea000008 b 235a4 23580: e59f30c8 ldr r3, [pc, #200] ; 23650 23584: e593e000 ldr lr, [r3] 23588: e28ee004 add lr, lr, #4 2358c: e8be000f ldm lr!, {r0, r1, r2, r3} 23590: e1a0c00d mov ip, sp 23594: e8ac000f stmia ip!, {r0, r1, r2, r3} 23598: e59e3000 ldr r3, [lr] 2359c: e58c3000 str r3, [ip] 235a0: e1a00006 mov r0, r6 if ( !loc.ops->evalformake_h ) { 235a4: e59d300c ldr r3, [sp, #12] 235a8: e5933004 ldr r3, [r3, #4] 235ac: e3530000 cmp r3, #0 235b0: 0a000010 beq 235f8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 235b4: e0850000 add r0, r5, r0 235b8: e1a0100d mov r1, sp 235bc: e28d2014 add r2, sp, #20 235c0: e1a0e00f mov lr, pc 235c4: e12fff13 bx r3 if ( result != 0 ) 235c8: 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 ); 235cc: e1a0600d mov r6, sp if ( result != 0 ) 235d0: 1a00000b bne 23604 return -1; if ( !loc.ops->symlink_h ) { 235d4: e59d200c ldr r2, [sp, #12] 235d8: e5923038 ldr r3, [r2, #56] ; 0x38 235dc: e3530000 cmp r3, #0 235e0: 1a000009 bne 2360c rtems_filesystem_freenode( &loc ); 235e4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 235e8: e3530000 cmp r3, #0 <== NOT EXECUTED 235ec: 11a0000d movne r0, sp <== NOT EXECUTED 235f0: 11a0e00f movne lr, pc <== NOT EXECUTED 235f4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 235f8: eb00518a bl 37c28 <__errno> <== NOT EXECUTED 235fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23600: e5803000 str r3, [r0] <== NOT EXECUTED 23604: e3e04000 mvn r4, #0 23608: ea00000d b 23644 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 2360c: e1a01004 mov r1, r4 23610: e1a0000d mov r0, sp 23614: e59d2014 ldr r2, [sp, #20] 23618: e1a0e00f mov lr, pc 2361c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23620: e59d300c ldr r3, [sp, #12] 23624: 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); 23628: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 2362c: 0a000004 beq 23644 23630: e593301c ldr r3, [r3, #28] 23634: e3530000 cmp r3, #0 23638: 11a0000d movne r0, sp 2363c: 11a0e00f movne lr, pc 23640: 112fff13 bxne r3 return result; } 23644: e1a00004 mov r0, r4 23648: e28dd018 add sp, sp, #24 2364c: e8bd8070 pop {r4, r5, r6, pc} 23650: 00051fe8 .word 0x00051fe8 0000f514 : int fd, int opt, struct termios *tp ) { switch (opt) { f514: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { f518: e92d4030 push {r4, r5, lr} f51c: e1a04002 mov r4, r2 f520: e1a05000 mov r5, r0 switch (opt) { f524: 0a00000a beq f554 f528: e3510001 cmp r1, #1 <== NOT EXECUTED f52c: 0a000003 beq f540 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); f530: eb000ec7 bl 13054 <__errno> <== NOT EXECUTED f534: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f538: e5803000 str r3, [r0] <== NOT EXECUTED f53c: ea000009 b f568 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) f540: e3a01003 mov r1, #3 <== NOT EXECUTED f544: e3a02000 mov r2, #0 <== NOT EXECUTED f548: eb000b7d bl 12344 <== NOT EXECUTED f54c: e3500000 cmp r0, #0 <== NOT EXECUTED f550: ba000004 blt f568 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f554: e1a00005 mov r0, r5 f558: e1a02004 mov r2, r4 f55c: e3a01002 mov r1, #2 } } f560: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f564: ea000b76 b 12344 } } f568: e3e00000 mvn r0, #0 <== NOT EXECUTED f56c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000b294 : #include int unlink( const char *path ) { b294: e92d4070 push {r4, r5, r6, lr} b298: e24dd02c sub sp, sp, #44 ; 0x2c b29c: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); b2a0: ebffd7b0 bl 1168 if ( parentpathlen == 0 ) b2a4: e2505000 subs r5, r0, #0 b2a8: 1a000019 bne b314 rtems_filesystem_get_start_loc( path, &i, &parentloc ); b2ac: e5d63000 ldrb r3, [r6] b2b0: e353002f cmp r3, #47 ; 0x2f b2b4: 1353005c cmpne r3, #92 ; 0x5c b2b8: 0a000001 beq b2c4 b2bc: e3530000 cmp r3, #0 <== NOT EXECUTED b2c0: 1a000009 bne b2ec <== NOT EXECUTED b2c4: e59f3248 ldr r3, [pc, #584] ; b514 b2c8: e593e000 ldr lr, [r3] b2cc: e28ee018 add lr, lr, #24 b2d0: e8be000f ldm lr!, {r0, r1, r2, r3} b2d4: e28dc018 add ip, sp, #24 b2d8: e8ac000f stmia ip!, {r0, r1, r2, r3} b2dc: e59e3000 ldr r3, [lr] b2e0: e3a04000 mov r4, #0 b2e4: e58c3000 str r3, [ip] b2e8: ea000013 b b33c b2ec: e59f3220 ldr r3, [pc, #544] ; b514 <== NOT EXECUTED b2f0: e593e000 ldr lr, [r3] <== NOT EXECUTED b2f4: e28ee004 add lr, lr, #4 <== NOT EXECUTED b2f8: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED b2fc: e28dc018 add ip, sp, #24 <== NOT EXECUTED b300: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED b304: e59e3000 ldr r3, [lr] <== NOT EXECUTED b308: e1a04005 mov r4, r5 <== NOT EXECUTED b30c: e58c3000 str r3, [ip] <== NOT EXECUTED b310: ea000009 b b33c <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, b314: e3a0c000 mov ip, #0 b318: e1a00006 mov r0, r6 b31c: e1a01005 mov r1, r5 b320: e3a02002 mov r2, #2 b324: e28d3018 add r3, sp, #24 b328: e58dc000 str ip, [sp] b32c: ebffd7d5 bl 1288 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) b330: e3500000 cmp r0, #0 b334: 1a000072 bne b504 b338: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; b33c: e28de018 add lr, sp, #24 b340: e8be000f ldm lr!, {r0, r1, r2, r3} b344: e28dc004 add ip, sp, #4 b348: e8ac000f stmia ip!, {r0, r1, r2, r3} b34c: e59e3000 ldr r3, [lr] name = path + parentpathlen; b350: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; b354: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); b358: e1a00005 mov r0, r5 b35c: eb000481 bl c568 b360: e1a01000 mov r1, r0 b364: e1a00005 mov r0, r5 b368: ebffd772 bl 1138 b36c: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), b370: e1a00006 mov r0, r6 b374: eb00047b bl c568 b378: e28d5004 add r5, sp, #4 b37c: e3a0c000 mov ip, #0 b380: e1a01000 mov r1, r0 b384: e1a0200c mov r2, ip b388: e1a00006 mov r0, r6 b38c: e1a03005 mov r3, r5 b390: e58dc000 str ip, [sp] b394: ebffd783 bl 11a8 0, &loc, false ); if ( result != 0 ) { b398: e3500000 cmp r0, #0 b39c: 0a00000b beq b3d0 if ( free_parentloc ) b3a0: e3540000 cmp r4, #0 b3a4: 0a000056 beq b504 rtems_filesystem_freenode( &parentloc ); b3a8: e59d3024 ldr r3, [sp, #36] ; 0x24 b3ac: e3530000 cmp r3, #0 b3b0: 0a000053 beq b504 b3b4: e593301c ldr r3, [r3, #28] b3b8: e3530000 cmp r3, #0 b3bc: 0a000050 beq b504 b3c0: e28d0018 add r0, sp, #24 b3c4: e1a0e00f mov lr, pc b3c8: e12fff13 bx r3 b3cc: ea00004c b b504 return -1; } if ( !loc.ops->node_type_h ) { b3d0: e59d2010 ldr r2, [sp, #16] b3d4: e5923010 ldr r3, [r2, #16] b3d8: e3530000 cmp r3, #0 b3dc: 0a00001c beq b454 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 ) { b3e0: e1a00005 mov r0, r5 b3e4: e1a0e00f mov lr, pc b3e8: e12fff13 bx r3 b3ec: e3500001 cmp r0, #1 b3f0: e59d2010 ldr r2, [sp, #16] b3f4: 1a000013 bne b448 rtems_filesystem_freenode( &loc ); b3f8: e3520000 cmp r2, #0 b3fc: 0a000004 beq b414 b400: e592301c ldr r3, [r2, #28] b404: e3530000 cmp r3, #0 b408: 11a00005 movne r0, r5 b40c: 11a0e00f movne lr, pc b410: 112fff13 bxne r3 if ( free_parentloc ) b414: e3540000 cmp r4, #0 b418: 0a000007 beq b43c rtems_filesystem_freenode( &parentloc ); b41c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED b420: e3530000 cmp r3, #0 <== NOT EXECUTED b424: 0a000004 beq b43c <== NOT EXECUTED b428: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b42c: e3530000 cmp r3, #0 <== NOT EXECUTED b430: 128d0018 addne r0, sp, #24 <== NOT EXECUTED b434: 11a0e00f movne lr, pc <== NOT EXECUTED b438: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); b43c: eb000058 bl b5a4 <__errno> b440: e3a03015 mov r3, #21 b444: ea000013 b b498 } if ( !loc.ops->unlink_h ) { b448: e592300c ldr r3, [r2, #12] b44c: e3530000 cmp r3, #0 b450: 1a000012 bne b4a0 rtems_filesystem_freenode( &loc ); b454: e592301c ldr r3, [r2, #28] <== NOT EXECUTED b458: e3530000 cmp r3, #0 <== NOT EXECUTED b45c: 11a00005 movne r0, r5 <== NOT EXECUTED b460: 11a0e00f movne lr, pc <== NOT EXECUTED b464: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) b468: e3540000 cmp r4, #0 <== NOT EXECUTED b46c: 0a000007 beq b490 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); b470: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED b474: e3530000 cmp r3, #0 <== NOT EXECUTED b478: 0a000004 beq b490 <== NOT EXECUTED b47c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED b480: e3530000 cmp r3, #0 <== NOT EXECUTED b484: 128d0018 addne r0, sp, #24 <== NOT EXECUTED b488: 11a0e00f movne lr, pc <== NOT EXECUTED b48c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); b490: eb000043 bl b5a4 <__errno> <== NOT EXECUTED b494: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED b498: e5803000 str r3, [r0] b49c: ea000018 b b504 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); b4a0: e28d0018 add r0, sp, #24 b4a4: e1a01005 mov r1, r5 b4a8: e1a0e00f mov lr, pc b4ac: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); b4b0: e59d3010 ldr r3, [sp, #16] b4b4: 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 ); b4b8: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); b4bc: 0a000004 beq b4d4 b4c0: e593301c ldr r3, [r3, #28] b4c4: e3530000 cmp r3, #0 b4c8: 11a00005 movne r0, r5 b4cc: 11a0e00f movne lr, pc b4d0: 112fff13 bxne r3 if ( free_parentloc ) b4d4: e3540000 cmp r4, #0 b4d8: 0a00000a beq b508 rtems_filesystem_freenode( &parentloc ); b4dc: e59d3024 ldr r3, [sp, #36] ; 0x24 b4e0: e3530000 cmp r3, #0 b4e4: 0a000007 beq b508 b4e8: e593301c ldr r3, [r3, #28] b4ec: e3530000 cmp r3, #0 b4f0: 0a000004 beq b508 b4f4: e28d0018 add r0, sp, #24 b4f8: e1a0e00f mov lr, pc b4fc: e12fff13 bx r3 b500: ea000000 b b508 b504: e3e06000 mvn r6, #0 return result; } b508: e1a00006 mov r0, r6 b50c: e28dd02c add sp, sp, #44 ; 0x2c b510: e8bd8070 pop {r4, r5, r6, pc} b514: 00017188 .word 0x00017188 000086b8 : */ int unmount( const char *path ) { 86b8: e92d4030 push {r4, r5, lr} 86bc: e24dd018 sub sp, sp, #24 86c0: 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 ) ) 86c4: eb00d7d1 bl 3e610 86c8: e28d4004 add r4, sp, #4 86cc: e1a01000 mov r1, r0 86d0: e3a0c001 mov ip, #1 86d4: e1a00005 mov r0, r5 86d8: e3a02000 mov r2, #0 86dc: e1a03004 mov r3, r4 86e0: e58dc000 str ip, [sp] 86e4: ebfff292 bl 5134 86e8: e3500000 cmp r0, #0 86ec: 1a000057 bne 8850 return -1; mt_entry = loc.mt_entry; 86f0: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 86f4: e59d3004 ldr r3, [sp, #4] 86f8: e595201c ldr r2, [r5, #28] 86fc: e1520003 cmp r2, r3 8700: e59d3010 ldr r3, [sp, #16] 8704: 0a000009 beq 8730 /* * 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 ); 8708: e3530000 cmp r3, #0 870c: 0a000004 beq 8724 8710: e593301c ldr r3, [r3, #28] 8714: e3530000 cmp r3, #0 8718: 11a00004 movne r0, r4 871c: 11a0e00f movne lr, pc 8720: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 8724: eb00bd3f bl 37c28 <__errno> 8728: e3a0300d mov r3, #13 872c: ea000023 b 87c0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8730: e3530000 cmp r3, #0 8734: 0a000004 beq 874c 8738: e593301c ldr r3, [r3, #28] 873c: e3530000 cmp r3, #0 8740: 11a00004 movne r0, r4 8744: 11a0e00f movne lr, pc 8748: 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; 874c: e5953014 ldr r3, [r5, #20] 8750: e5933028 ldr r3, [r3, #40] ; 0x28 8754: e3530000 cmp r3, #0 8758: 0a000003 beq 876c fs_root_loc = &mt_entry->mt_fs_root; 875c: e5953028 ldr r3, [r5, #40] ; 0x28 8760: e593302c ldr r3, [r3, #44] ; 0x2c 8764: e3530000 cmp r3, #0 8768: 1a000002 bne 8778 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 ); 876c: eb00bd2d bl 37c28 <__errno> <== NOT EXECUTED 8770: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8774: ea000011 b 87c0 <== 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 ) 8778: e59f30f0 ldr r3, [pc, #240] ; 8870 877c: e5933000 ldr r3, [r3] 8780: e5933014 ldr r3, [r3, #20] 8784: 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; 8788: 159f20e4 ldrne r2, [pc, #228] ; 8874 878c: 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 ) 8790: 1a000005 bne 87ac 8794: ea000007 b 87b8 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; 8798: e5930018 ldr r0, [r3, #24] 879c: e595102c ldr r1, [r5, #44] ; 0x2c 87a0: e1500001 cmp r0, r1 87a4: 0a000003 beq 87b8 * 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 ) { 87a8: e5933000 ldr r3, [r3] 87ac: e1530002 cmp r3, r2 87b0: 1afffff8 bne 8798 87b4: ea000028 b 885c * 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 ); 87b8: eb00bd1a bl 37c28 <__errno> 87bc: e3a03010 mov r3, #16 87c0: e5803000 str r3, [r0] 87c4: ea000021 b 8850 * 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 ) 87c8: e5953014 ldr r3, [r5, #20] 87cc: e1a00005 mov r0, r5 87d0: e1a0e00f mov lr, pc 87d4: e593f028 ldr pc, [r3, #40] ; 0x28 87d8: e2504000 subs r4, r0, #0 87dc: 1a00001b bne 8850 * 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){ 87e0: e5953028 ldr r3, [r5, #40] ; 0x28 87e4: e1a00005 mov r0, r5 87e8: e1a0e00f mov lr, pc 87ec: e593f02c ldr pc, [r3, #44] ; 0x2c 87f0: e3500000 cmp r0, #0 87f4: 0a000007 beq 8818 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 87f8: e1a00005 mov r0, r5 <== NOT EXECUTED 87fc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8800: e1a0e00f mov lr, pc <== NOT EXECUTED 8804: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 8808: e3500000 cmp r0, #0 <== NOT EXECUTED 880c: 0a00000f beq 8850 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8810: e1a00004 mov r0, r4 <== NOT EXECUTED 8814: eb00047a bl 9a04 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8818: e1a00005 mov r0, r5 881c: eb00052b bl 9cd0 <_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 ); 8820: e5953014 ldr r3, [r5, #20] 8824: e3530000 cmp r3, #0 8828: 0a000004 beq 8840 882c: e593301c ldr r3, [r3, #28] 8830: e3530000 cmp r3, #0 8834: 12850008 addne r0, r5, #8 8838: 11a0e00f movne lr, pc 883c: 112fff13 bxne r3 free( mt_entry ); 8840: e1a00005 mov r0, r5 8844: ebfff26d bl 5200 8848: e3a00000 mov r0, #0 return 0; 884c: ea000000 b 8854 8850: e3e00000 mvn r0, #0 } 8854: e28dd018 add sp, sp, #24 8858: 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 ) 885c: e1a00005 mov r0, r5 8860: ebfff314 bl 54b8 8864: e3500001 cmp r0, #1 8868: 1affffd6 bne 87c8 886c: eaffffd1 b 87b8 8870: 00051fe8 .word 0x00051fe8 8874: 0005f50c .word 0x0005f50c 000236e4 : int utime( const char *path, const struct utimbuf *times ) { 236e4: e92d4070 push {r4, r5, r6, lr} 236e8: e24dd018 sub sp, sp, #24 236ec: e1a05001 mov r5, r1 236f0: 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 ) ) 236f4: eb006bc5 bl 3e610 236f8: e28d4004 add r4, sp, #4 236fc: e1a01000 mov r1, r0 23700: e3a0c001 mov ip, #1 23704: e1a00006 mov r0, r6 23708: e3a02000 mov r2, #0 2370c: e1a03004 mov r3, r4 23710: e58dc000 str ip, [sp] 23714: ebff8686 bl 5134 23718: e3500000 cmp r0, #0 2371c: 1a00000b bne 23750 return -1; if ( !temp_loc.ops->utime_h ){ 23720: e59d2010 ldr r2, [sp, #16] 23724: e5923030 ldr r3, [r2, #48] ; 0x30 23728: e3530000 cmp r3, #0 2372c: 1a000009 bne 23758 rtems_filesystem_freenode( &temp_loc ); 23730: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23734: e3530000 cmp r3, #0 <== NOT EXECUTED 23738: 11a00004 movne r0, r4 <== NOT EXECUTED 2373c: 11a0e00f movne lr, pc <== NOT EXECUTED 23740: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23744: eb005137 bl 37c28 <__errno> <== NOT EXECUTED 23748: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2374c: e5803000 str r3, [r0] <== NOT EXECUTED 23750: e3e05000 mvn r5, #0 23754: ea00000c b 2378c } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 23758: e8950006 ldm r5, {r1, r2} 2375c: e1a00004 mov r0, r4 23760: e1a0e00f mov lr, pc 23764: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 23768: e59d3010 ldr r3, [sp, #16] 2376c: 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 ); 23770: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 23774: 0a000004 beq 2378c 23778: e593301c ldr r3, [r3, #28] 2377c: e3530000 cmp r3, #0 23780: 11a00004 movne r0, r4 23784: 11a0e00f movne lr, pc 23788: 112fff13 bxne r3 return result; } 2378c: e1a00005 mov r0, r5 23790: e28dd018 add sp, sp, #24 23794: e8bd8070 pop {r4, r5, r6, pc} 0001696c : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 1696c: e59f30b0 ldr r3, [pc, #176] ; 16a24 16970: e5933000 ldr r3, [r3] 16974: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 16978: e92d4070 push {r4, r5, r6, lr} 1697c: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 16980: 2a000005 bcs 1699c iop = rtems_libio_iop( fd ); 16984: e59f309c ldr r3, [pc, #156] ; 16a28 16988: e5934000 ldr r4, [r3] 1698c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 16990: e5943014 ldr r3, [r4, #20] 16994: e3130c01 tst r3, #256 ; 0x100 16998: 1a000002 bne 169a8 1699c: ebffd300 bl b5a4 <__errno> <== NOT EXECUTED 169a0: e3a03009 mov r3, #9 <== NOT EXECUTED 169a4: ea00000f b 169e8 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 169a8: e3510000 cmp r1, #0 169ac: 0a000004 beq 169c4 rtems_libio_check_count( count ); 169b0: e3520000 cmp r2, #0 169b4: 01a00002 moveq r0, r2 169b8: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 169bc: e3130004 tst r3, #4 169c0: 1a000002 bne 169d0 169c4: ebffd2f6 bl b5a4 <__errno> <== NOT EXECUTED 169c8: e3a03016 mov r3, #22 <== NOT EXECUTED 169cc: ea000005 b 169e8 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 169d0: e594303c ldr r3, [r4, #60] ; 0x3c 169d4: e593300c ldr r3, [r3, #12] 169d8: e3530000 cmp r3, #0 169dc: 1a000004 bne 169f4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 169e0: ebffd2ef bl b5a4 <__errno> <== NOT EXECUTED 169e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 169e8: e5803000 str r3, [r0] <== NOT EXECUTED 169ec: e3e00000 mvn r0, #0 <== NOT EXECUTED 169f0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 169f4: e1a00004 mov r0, r4 169f8: e1a0e00f mov lr, pc 169fc: e12fff13 bx r3 if ( rc > 0 ) 16a00: e3500000 cmp r0, #0 16a04: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 16a08: e284600c add r6, r4, #12 16a0c: e8960060 ldm r6, {r5, r6} 16a10: e0952000 adds r2, r5, r0 16a14: e0a63fc0 adc r3, r6, r0, asr #31 16a18: e584200c str r2, [r4, #12] 16a1c: e5843010 str r3, [r4, #16] return rc; } 16a20: e8bd8070 pop {r4, r5, r6, pc} 16a24: 00016ff0 .word 0x00016ff0 16a28: 000185a8 .word 0x000185a8 00005484 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5484: e59f3164 ldr r3, [pc, #356] ; 55f0 5488: e5933000 ldr r3, [r3] 548c: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 5490: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5494: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5498: 2a000005 bcs 54b4 iop = rtems_libio_iop( fd ); 549c: e59f3150 ldr r3, [pc, #336] ; 55f4 54a0: e5936000 ldr r6, [r3] 54a4: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 54a8: e5963014 ldr r3, [r6, #20] 54ac: e3130c01 tst r3, #256 ; 0x100 54b0: 1a000002 bne 54c0 54b4: eb002154 bl da0c <__errno> 54b8: e3a03009 mov r3, #9 54bc: ea000025 b 5558 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 54c0: e3130004 tst r3, #4 54c4: 0a000021 beq 5550 /* * Argument validation on IO vector */ if ( !iov ) 54c8: e3510000 cmp r1, #0 54cc: 0a00001f beq 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 54d0: e3520000 cmp r2, #0 54d4: da00001d ble 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 54d8: e3520b01 cmp r2, #1024 ; 0x400 54dc: ca00001b bgt 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 54e0: e596303c ldr r3, [r6, #60] ; 0x3c 54e4: e593300c ldr r3, [r3, #12] 54e8: e3530000 cmp r3, #0 54ec: 1a000002 bne 54fc rtems_set_errno_and_return_minus_one( ENOTSUP ); 54f0: eb002145 bl da0c <__errno> <== NOT EXECUTED 54f4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 54f8: ea000016 b 5558 <== NOT EXECUTED 54fc: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5500: e59fc0f0 ldr ip, [pc, #240] ; 55f8 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 ); 5504: e1a05001 mov r5, r1 5508: e1a02001 mov r2, r1 550c: e3a07001 mov r7, #1 5510: 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 ) 5514: e5921000 ldr r1, [r2] 5518: 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++ ) { 551c: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 5520: 0a00000a beq 5550 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 ) 5524: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5528: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 552c: e1510004 cmp r1, r4 5530: a3a04000 movge r4, #0 5534: b3a04001 movlt r4, #1 5538: e151000c cmp r1, ip 553c: 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 ) 5540: e3500000 cmp r0, #0 5544: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5548: e3540000 cmp r4, #0 554c: 0a000003 beq 5560 rtems_set_errno_and_return_minus_one( EINVAL ); 5550: eb00212d bl da0c <__errno> 5554: e3a03016 mov r3, #22 5558: e5803000 str r3, [r0] 555c: ea000011 b 55a8 * 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++ ) { 5560: e1530008 cmp r3, r8 5564: e2822008 add r2, r2, #8 5568: b1a04001 movlt r4, r1 556c: baffffe8 blt 5514 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 5570: e3570000 cmp r7, #0 <== NOT EXECUTED 5574: 1a00001b bne 55e8 <== NOT EXECUTED 5578: 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 ) 557c: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 5580: e3520000 cmp r2, #0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5584: e2877001 add r7, r7, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5588: 0a000013 beq 55dc <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 558c: e5951000 ldr r1, [r5] <== NOT EXECUTED 5590: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 5594: e1a00006 mov r0, r6 <== NOT EXECUTED 5598: e1a0e00f mov lr, pc <== NOT EXECUTED 559c: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 55a0: e3500000 cmp r0, #0 <== NOT EXECUTED 55a4: aa000001 bge 55b0 <== NOT EXECUTED 55a8: e3e04000 mvn r4, #0 55ac: ea00000d b 55e8 return -1; if ( bytes > 0 ) { 55b0: 0a000006 beq 55d0 <== NOT EXECUTED iop->offset += bytes; 55b4: e286c00c add ip, r6, #12 <== NOT EXECUTED 55b8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 55bc: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 55c0: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 55c4: e586200c str r2, [r6, #12] <== NOT EXECUTED 55c8: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 55cc: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 55d0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 55d4: e1500003 cmp r0, r3 <== NOT EXECUTED 55d8: 1a000002 bne 55e8 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 55dc: e1570008 cmp r7, r8 <== NOT EXECUTED 55e0: e2855008 add r5, r5, #8 <== NOT EXECUTED 55e4: baffffe4 blt 557c <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 55e8: e1a00004 mov r0, r4 55ec: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 55f0: 0001acc0 .word 0x0001acc0 55f4: 0001d6bc .word 0x0001d6bc 55f8: 00007fff .word 0x00007fff