0800a834 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 800a834: 37 9c ff ec addi sp,sp,-20 800a838: 5b 8b 00 10 sw (sp+16),r11 800a83c: 5b 8c 00 0c sw (sp+12),r12 800a840: 5b 8d 00 08 sw (sp+8),r13 800a844: 5b 9d 00 04 sw (sp+4),ra 800a848: b8 20 60 00 mv r12,r1 800a84c: b8 40 68 00 mv r13,r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 800a850: b8 20 58 00 mv r11,r1 800a854: 5c 20 00 08 bne r1,r0,800a874 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 800a858: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a85c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a860: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800a864: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800a868: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800a86c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800a870: c3 a0 00 00 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 800a874: 78 01 08 01 mvhi r1,0x801 800a878: 38 21 c1 10 ori r1,r1,0xc110 800a87c: 28 26 00 00 lw r6,(r1+0) 800a880: b8 60 10 00 mv r2,r3 800a884: b9 a0 08 00 mv r1,r13 800a888: 28 c3 00 2c lw r3,(r6+44) 800a88c: 5b 85 00 14 sw (sp+20),r5 800a890: a4 60 18 00 not r3,r3 800a894: a0 83 18 00 and r3,r4,r3 800a898: fb ff ff ac calli 800a748 800a89c: b8 20 58 00 mv r11,r1 if ( !node ) 800a8a0: 44 20 ff ee be r1,r0,800a858 return NULL; /* * Set the type specific information */ switch (type) { 800a8a4: 34 01 00 07 mvi r1,7 800a8a8: 55 a1 00 35 bgu r13,r1,800a97c 800a8ac: b9 a0 08 00 mv r1,r13 800a8b0: 34 02 00 02 mvi r2,2 800a8b4: 78 0d 08 01 mvhi r13,0x801 800a8b8: fb ff d6 4e calli 80001f0 <__ashlsi3> 800a8bc: 39 ad b5 5c ori r13,r13,0xb55c 800a8c0: b5 a1 08 00 add r1,r13,r1 800a8c4: 28 21 00 00 lw r1,(r1+0) 800a8c8: 2b 85 00 14 lw r5,(sp+20) 800a8cc: c0 20 00 00 b r1 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 800a8d0: 28 a1 00 04 lw r1,(r5+4) 800a8d4: 59 61 00 54 sw (r11+84),r1 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 800a8d8: 28 a5 00 00 lw r5,(r5+0) 800a8dc: 59 65 00 50 sw (r11+80),r5 /* * 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; 800a8e0: 29 83 00 10 lw r3,(r12+16) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 800a8e4: 29 81 00 00 lw r1,(r12+0) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 800a8e8: b9 60 10 00 mv r2,r11 fs_info = parent_loc->mt_entry->fs_info; 800a8ec: 28 63 00 34 lw r3,(r3+52) node->Parent = parent; 800a8f0: 59 61 00 08 sw (r11+8),r1 800a8f4: 34 21 00 50 addi r1,r1,80 node->st_ino = ++fs_info->ino_count; 800a8f8: 28 64 00 00 lw r4,(r3+0) 800a8fc: 34 84 00 01 addi r4,r4,1 800a900: 58 64 00 00 sw (r3+0),r4 800a904: 59 64 00 38 sw (r11+56),r4 800a908: fb ff e1 12 calli 8002d50 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 800a90c: b9 60 08 00 mv r1,r11 800a910: 2b 9d 00 04 lw ra,(sp+4) 800a914: 2b 8b 00 10 lw r11,(sp+16) 800a918: 2b 8c 00 0c lw r12,(sp+12) 800a91c: 2b 8d 00 08 lw r13,(sp+8) 800a920: 37 9c 00 14 addi sp,sp,20 800a924: c3 a0 00 00 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 800a928: 34 01 00 00 mvi r1,0 <== NOT EXECUTED node->info.linearfile.direct = 0; 800a92c: 59 61 00 58 sw (r11+88),r1 <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 800a930: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED 800a934: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 800a938: 34 01 00 00 mvi r1,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 800a93c: 59 61 00 60 sw (r11+96),r1 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 800a940: 59 61 00 50 sw (r11+80),r1 800a944: 59 61 00 54 sw (r11+84),r1 node->info.file.indirect = 0; 800a948: 59 61 00 58 sw (r11+88),r1 node->info.file.doubly_indirect = 0; 800a94c: 59 61 00 5c sw (r11+92),r1 node->info.file.triply_indirect = 0; break; 800a950: e3 ff ff e4 bi 800a8e0 case IMFS_FIFO: node->info.fifo.pipe = NULL; 800a954: 34 01 00 00 mvi r1,0 800a958: 59 61 00 50 sw (r11+80),r1 break; 800a95c: e3 ff ff e1 bi 800a8e0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 800a960: 35 62 00 54 addi r2,r11,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 800a964: 35 61 00 50 addi r1,r11,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 800a968: 59 62 00 50 sw (r11+80),r2 the_chain->permanent_null = NULL; 800a96c: 34 02 00 00 mvi r2,0 800a970: 59 62 00 54 sw (r11+84),r2 the_chain->last = _Chain_Head(the_chain); 800a974: 59 61 00 58 sw (r11+88),r1 800a978: e3 ff ff da bi 800a8e0 default: assert(0); 800a97c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a980: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800a984: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 800a988: 38 21 b5 0c ori r1,r1,0xb50c <== NOT EXECUTED 800a98c: 38 63 b5 7c ori r3,r3,0xb57c <== NOT EXECUTED 800a990: 38 84 b5 58 ori r4,r4,0xb558 <== NOT EXECUTED 800a994: 34 02 00 5c mvi r2,92 <== NOT EXECUTED 800a998: fb ff f3 32 calli 8007660 <__assert_func> <== NOT EXECUTED 08002e6c : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 8002e6c: 37 9c ff dc addi sp,sp,-36 8002e70: 5b 8b 00 24 sw (sp+36),r11 8002e74: 5b 8c 00 20 sw (sp+32),r12 8002e78: 5b 8d 00 1c sw (sp+28),r13 8002e7c: 5b 8e 00 18 sw (sp+24),r14 8002e80: 5b 8f 00 14 sw (sp+20),r15 8002e84: 5b 90 00 10 sw (sp+16),r16 8002e88: 5b 91 00 0c sw (sp+12),r17 8002e8c: 5b 92 00 08 sw (sp+8),r18 8002e90: 5b 9d 00 04 sw (sp+4),ra 8002e94: b8 40 68 00 mv r13,r2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 8002e98: 44 20 00 33 be r1,r0,8002f64 assert( level >= 0 ); 8002e9c: 4c 40 00 09 bge r2,r0,8002ec0 8002ea0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ea4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002ea8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002eac: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002eb0: 38 63 4d 60 ori r3,r3,0x4d60 <== NOT EXECUTED 8002eb4: 38 84 4c 6c ori r4,r4,0x4c6c <== NOT EXECUTED 8002eb8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8002ebc: f8 00 02 66 calli 8003854 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 8002ec0: 28 31 00 4c lw r17,(r1+76) 8002ec4: 34 02 00 01 mvi r2,1 8002ec8: 5e 22 00 2f bne r17,r2,8002f84 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002ecc: 28 2e 00 50 lw r14,(r1+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8002ed0: 34 30 00 54 addi r16,r1,84 8002ed4: 45 d0 00 15 be r14,r16,8002f28 8002ed8: 78 0c 08 02 mvhi r12,0x802 8002edc: 39 8c 71 90 ori r12,r12,0x7190 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002ee0: 78 0f 08 02 mvhi r15,0x802 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002ee4: 35 b2 00 01 addi r18,r13,1 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 8002ee8: 34 0b 00 00 mvi r11,0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002eec: 29 83 00 00 lw r3,(r12+0) 8002ef0: b9 e0 08 00 mv r1,r15 !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++ ) 8002ef4: 35 6b 00 01 addi r11,r11,1 fprintf(stdout, "...." ); 8002ef8: 28 64 00 08 lw r4,(r3+8) 8002efc: 38 21 4c a0 ori r1,r1,0x4ca0 8002f00: 34 02 00 01 mvi r2,1 8002f04: 34 03 00 04 mvi r3,4 8002f08: f8 00 3d 4d calli 801243c !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++ ) 8002f0c: 4d ab ff f8 bge r13,r11,8002eec fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 8002f10: b9 c0 08 00 mv r1,r14 8002f14: fb ff ff 55 calli 8002c68 if ( the_jnode->type == IMFS_DIRECTORY ) 8002f18: 29 c1 00 4c lw r1,(r14+76) 8002f1c: 44 31 00 0e be r1,r17,8002f54 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 ) { 8002f20: 29 ce 00 00 lw r14,(r14+0) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002f24: 5d d0 ff f1 bne r14,r16,8002ee8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 8002f28: 2b 9d 00 04 lw ra,(sp+4) 8002f2c: 2b 8b 00 24 lw r11,(sp+36) 8002f30: 2b 8c 00 20 lw r12,(sp+32) 8002f34: 2b 8d 00 1c lw r13,(sp+28) 8002f38: 2b 8e 00 18 lw r14,(sp+24) 8002f3c: 2b 8f 00 14 lw r15,(sp+20) 8002f40: 2b 90 00 10 lw r16,(sp+16) 8002f44: 2b 91 00 0c lw r17,(sp+12) 8002f48: 2b 92 00 08 lw r18,(sp+8) 8002f4c: 37 9c 00 24 addi sp,sp,36 8002f50: c3 a0 00 00 ret for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002f54: b9 c0 08 00 mv r1,r14 8002f58: ba 40 10 00 mv r2,r18 8002f5c: fb ff ff c4 calli 8002e6c 8002f60: e3 ff ff f0 bi 8002f20 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 8002f64: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002f68: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002f6c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002f70: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002f74: 38 63 4d 60 ori r3,r3,0x4d60 <== NOT EXECUTED 8002f78: 38 84 4c 5c ori r4,r4,0x4c5c <== NOT EXECUTED 8002f7c: 34 02 00 84 mvi r2,132 <== NOT EXECUTED 8002f80: f8 00 02 35 calli 8003854 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 8002f84: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002f88: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002f8c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002f90: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002f94: 38 63 4d 60 ori r3,r3,0x4d60 <== NOT EXECUTED 8002f98: 38 84 4c 78 ori r4,r4,0x4c78 <== NOT EXECUTED 8002f9c: 34 02 00 88 mvi r2,136 <== NOT EXECUTED 8002fa0: f8 00 02 2d calli 8003854 <__assert_func> <== NOT EXECUTED 08006674 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8006674: 37 9c ff 98 addi sp,sp,-104 8006678: 5b 8b 00 40 sw (sp+64),r11 800667c: 5b 8c 00 3c sw (sp+60),r12 8006680: 5b 8d 00 38 sw (sp+56),r13 8006684: 5b 8e 00 34 sw (sp+52),r14 8006688: 5b 8f 00 30 sw (sp+48),r15 800668c: 5b 90 00 2c sw (sp+44),r16 8006690: 5b 91 00 28 sw (sp+40),r17 8006694: 5b 92 00 24 sw (sp+36),r18 8006698: 5b 93 00 20 sw (sp+32),r19 800669c: 5b 94 00 1c sw (sp+28),r20 80066a0: 5b 95 00 18 sw (sp+24),r21 80066a4: 5b 96 00 14 sw (sp+20),r22 80066a8: 5b 97 00 10 sw (sp+16),r23 80066ac: 5b 98 00 0c sw (sp+12),r24 80066b0: 5b 99 00 08 sw (sp+8),r25 80066b4: 5b 9d 00 04 sw (sp+4),ra /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 80066b8: 28 8b 00 00 lw r11,(r4+0) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80066bc: 78 10 08 01 mvhi r16,0x801 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 80066c0: b8 80 68 00 mv r13,r4 80066c4: b8 20 88 00 mv r17,r1 80066c8: b8 40 70 00 mv r14,r2 80066cc: b8 60 b8 00 mv r23,r3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80066d0: 3a 10 c1 10 ori r16,r16,0xc110 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 80066d4: 34 0f 00 00 mvi r15,0 80066d8: 37 92 00 44 addi r18,sp,68 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 80066dc: 34 13 00 01 mvi r19,1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 80066e0: 34 18 00 40 mvi r24,64 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 80066e4: 34 14 00 03 mvi r20,3 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 80066e8: 34 15 00 04 mvi r21,4 result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 ) 80066ec: 34 19 ff ff mvi r25,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 80066f0: 34 16 00 02 mvi r22,2 * 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 ); 80066f4: 37 84 00 68 addi r4,sp,104 80066f8: b6 2f 08 00 add r1,r17,r15 80066fc: b9 c0 10 00 mv r2,r14 8006700: ba 40 18 00 mv r3,r18 8006704: f8 00 02 84 calli 8007114 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8006708: 29 a5 00 00 lw r5,(r13+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 ); 800670c: b8 20 60 00 mv r12,r1 pathnamelen -= len; 8006710: 2b 84 00 68 lw r4,(sp+104) i += len; if ( !pathloc->node_access ) 8006714: 44 a0 00 53 be r5,r0,8006860 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8006718: c9 c4 70 00 sub r14,r14,r4 i += len; 800671c: b5 e4 78 00 add r15,r15,r4 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006720: 5c 20 00 0f bne r1,r0,800675c * 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 ) { 8006724: 28 a2 00 4c lw r2,(r5+76) 8006728: 34 01 00 01 mvi r1,1 800672c: 44 41 00 59 be r2,r1,8006890 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8006730: b9 a0 08 00 mv r1,r13 8006734: fb ff ff 0f calli 8006370 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006738: 34 02 00 06 mvi r2,6 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 800673c: b8 20 60 00 mv r12,r1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006740: ba e0 08 00 mv r1,r23 8006744: fb ff e6 ab calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8006748: 29 a2 00 00 lw r2,(r13+0) 800674c: 28 42 00 30 lw r2,(r2+48) 8006750: a0 22 10 00 and r2,r1,r2 8006754: 5c 41 00 3e bne r2,r1,800684c 8006758: e0 00 00 27 bi 80067f4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 800675c: 29 62 00 4c lw r2,(r11+76) 8006760: b8 a0 58 00 mv r11,r5 8006764: 44 53 00 37 be r2,r19,8006840 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006768: 45 94 00 06 be r12,r20,8006780 800676c: 45 95 00 1e be r12,r21,80067e4 8006770: 45 96 00 11 be r12,r22,80067b4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8006774: 7d 8c 00 04 cmpnei r12,r12,4 8006778: 5d 80 ff df bne r12,r0,80066f4 800677c: e3 ff ff ea bi 8006724 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8006780: 28 a2 00 4c lw r2,(r5+76) 8006784: 44 54 00 3c be r2,r20,8006874 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8006788: 44 55 00 57 be r2,r21,80068e4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 800678c: 5c 53 00 5e bne r2,r19,8006904 /* * 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 ) { 8006790: 29 6c 00 5c lw r12,(r11+92) 8006794: 5d 80 00 61 bne r12,r0,8006918 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8006798: b9 60 08 00 mv r1,r11 800679c: ba 40 10 00 mv r2,r18 80067a0: f8 00 02 26 calli 8007038 80067a4: b8 20 58 00 mv r11,r1 if ( !node ) 80067a8: 44 2c 00 2e be r1,r12,8006860 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 80067ac: 59 ab 00 00 sw (r13+0),r11 break; 80067b0: e3 ff ff d1 bi 80066f4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80067b4: 2a 01 00 00 lw r1,(r16+0) 80067b8: 28 21 00 18 lw r1,(r1+24) 80067bc: 44 a1 ff ce be r5,r1,80066f4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 80067c0: 29 a2 00 10 lw r2,(r13+16) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 80067c4: 28 41 00 1c lw r1,(r2+28) 80067c8: 44 a1 00 63 be r5,r1,8006954 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 80067cc: 28 ab 00 08 lw r11,(r5+8) 80067d0: 5d 60 ff f7 bne r11,r0,80067ac rtems_set_errno_and_return_minus_one( ENOENT ); 80067d4: f8 00 14 fb calli 800bbc0 <__errno> 80067d8: 58 2c 00 00 sw (r1+0),r12 80067dc: 34 0c ff ff mvi r12,-1 80067e0: e0 00 00 05 bi 80067f4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 80067e4: f8 00 14 f7 calli 800bbc0 <__errno> 80067e8: 34 02 00 5b mvi r2,91 80067ec: 58 22 00 00 sw (r1+0),r2 80067f0: 34 0c ff ff mvi r12,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 80067f4: b9 80 08 00 mv r1,r12 80067f8: 2b 9d 00 04 lw ra,(sp+4) 80067fc: 2b 8b 00 40 lw r11,(sp+64) 8006800: 2b 8c 00 3c lw r12,(sp+60) 8006804: 2b 8d 00 38 lw r13,(sp+56) 8006808: 2b 8e 00 34 lw r14,(sp+52) 800680c: 2b 8f 00 30 lw r15,(sp+48) 8006810: 2b 90 00 2c lw r16,(sp+44) 8006814: 2b 91 00 28 lw r17,(sp+40) 8006818: 2b 92 00 24 lw r18,(sp+36) 800681c: 2b 93 00 20 lw r19,(sp+32) 8006820: 2b 94 00 1c lw r20,(sp+28) 8006824: 2b 95 00 18 lw r21,(sp+24) 8006828: 2b 96 00 14 lw r22,(sp+20) 800682c: 2b 97 00 10 lw r23,(sp+16) 8006830: 2b 98 00 0c lw r24,(sp+12) 8006834: 2b 99 00 08 lw r25,(sp+8) 8006838: 37 9c 00 68 addi sp,sp,104 800683c: c3 a0 00 00 ret /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006840: 28 a1 00 30 lw r1,(r5+48) 8006844: 20 21 00 40 andi r1,r1,0x40 8006848: 44 38 ff c8 be r1,r24,8006768 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 800684c: f8 00 14 dd calli 800bbc0 <__errno> 8006850: 34 02 00 0d mvi r2,13 8006854: 58 22 00 00 sw (r1+0),r2 8006858: 34 0c ff ff mvi r12,-1 800685c: e3 ff ff e6 bi 80067f4 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 8006860: f8 00 14 d8 calli 800bbc0 <__errno> 8006864: 34 02 00 02 mvi r2,2 8006868: 58 22 00 00 sw (r1+0),r2 800686c: 34 0c ff ff mvi r12,-1 8006870: e3 ff ff e1 bi 80067f4 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 8006874: b9 a0 08 00 mv r1,r13 8006878: 34 02 00 00 mvi r2,0 800687c: fb ff ff 0f calli 80064b8 node = pathloc->node_access; 8006880: 29 ab 00 00 lw r11,(r13+0) if ( !node ) 8006884: 45 60 00 20 be r11,r0,8006904 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8006888: 29 62 00 4c lw r2,(r11+76) 800688c: e3 ff ff c0 bi 800678c * * 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 ) { 8006890: 28 a1 00 5c lw r1,(r5+92) 8006894: 44 20 ff a7 be r1,r0,8006730 newloc = node->info.directory.mt_fs->mt_fs_root; 8006898: 28 23 00 28 lw r3,(r1+40) 800689c: 28 27 00 24 lw r7,(r1+36) 80068a0: 28 26 00 20 lw r6,(r1+32) 80068a4: 28 22 00 1c lw r2,(r1+28) *pathloc = newloc; 80068a8: 28 21 00 2c lw r1,(r1+44) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80068ac: 28 65 00 00 lw r5,(r3+0) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 80068b0: 59 a7 00 08 sw (r13+8),r7 80068b4: 59 a1 00 10 sw (r13+16),r1 80068b8: 59 a6 00 04 sw (r13+4),r6 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80068bc: c9 e4 08 00 sub r1,r15,r4 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 80068c0: 59 a2 00 00 sw (r13+0),r2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80068c4: b6 21 08 00 add r1,r17,r1 80068c8: b5 c4 10 00 add r2,r14,r4 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 80068cc: 59 a3 00 0c sw (r13+12),r3 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80068d0: b9 a0 20 00 mv r4,r13 80068d4: ba e0 18 00 mv r3,r23 80068d8: d8 a0 00 00 call r5 80068dc: b8 20 60 00 mv r12,r1 80068e0: e3 ff ff c5 bi 80067f4 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 80068e4: b9 a0 08 00 mv r1,r13 80068e8: 34 02 00 00 mvi r2,0 80068ec: fb ff ff 19 calli 8006550 80068f0: b8 20 60 00 mv r12,r1 node = pathloc->node_access; 80068f4: 29 ab 00 00 lw r11,(r13+0) if ( result == -1 ) 80068f8: 44 39 ff bf be r1,r25,80067f4 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 80068fc: 29 62 00 4c lw r2,(r11+76) 8006900: e3 ff ff a3 bi 800678c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8006904: f8 00 14 af calli 800bbc0 <__errno> 8006908: 34 02 00 14 mvi r2,20 800690c: 58 22 00 00 sw (r1+0),r2 8006910: 34 0c ff ff mvi r12,-1 8006914: e3 ff ff b8 bi 80067f4 */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006918: 2b 82 00 68 lw r2,(sp+104) * 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; 800691c: 29 83 00 28 lw r3,(r12+40) 8006920: 29 87 00 24 lw r7,(r12+36) 8006924: 29 86 00 20 lw r6,(r12+32) 8006928: 29 84 00 1c lw r4,(r12+28) *pathloc = newloc; 800692c: 29 8c 00 2c lw r12,(r12+44) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006930: c9 e2 08 00 sub r1,r15,r2 8006934: 28 65 00 00 lw r5,(r3+0) * 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; 8006938: 59 ac 00 10 sw (r13+16),r12 800693c: 59 a7 00 08 sw (r13+8),r7 8006940: 59 a6 00 04 sw (r13+4),r6 8006944: 59 a4 00 00 sw (r13+0),r4 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006948: b6 21 08 00 add r1,r17,r1 800694c: b5 c2 10 00 add r2,r14,r2 8006950: e3 ff ff df bi 80068cc */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8006954: 28 43 00 14 lw r3,(r2+20) 8006958: 28 48 00 10 lw r8,(r2+16) 800695c: 28 47 00 0c lw r7,(r2+12) 8006960: 28 46 00 08 lw r6,(r2+8) *pathloc = newloc; 8006964: 28 42 00 18 lw r2,(r2+24) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 8006968: 28 65 00 00 lw r5,(r3+0) 800696c: c9 e4 08 00 sub r1,r15,r4 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; 8006970: 59 a2 00 10 sw (r13+16),r2 8006974: 59 a8 00 08 sw (r13+8),r8 8006978: 59 a7 00 04 sw (r13+4),r7 800697c: 59 a6 00 00 sw (r13+0),r6 8006980: e3 ff ff d1 bi 80068c4 08006a84 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006a84: 37 9c ff 98 addi sp,sp,-104 8006a88: 5b 8b 00 40 sw (sp+64),r11 8006a8c: 5b 8c 00 3c sw (sp+60),r12 8006a90: 5b 8d 00 38 sw (sp+56),r13 8006a94: 5b 8e 00 34 sw (sp+52),r14 8006a98: 5b 8f 00 30 sw (sp+48),r15 8006a9c: 5b 90 00 2c sw (sp+44),r16 8006aa0: 5b 91 00 28 sw (sp+40),r17 8006aa4: 5b 92 00 24 sw (sp+36),r18 8006aa8: 5b 93 00 20 sw (sp+32),r19 8006aac: 5b 94 00 1c sw (sp+28),r20 8006ab0: 5b 95 00 18 sw (sp+24),r21 8006ab4: 5b 96 00 14 sw (sp+20),r22 8006ab8: 5b 97 00 10 sw (sp+16),r23 8006abc: 5b 98 00 0c sw (sp+12),r24 8006ac0: 5b 99 00 08 sw (sp+8),r25 8006ac4: 5b 9d 00 04 sw (sp+4),ra case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006ac8: 78 10 08 01 mvhi r16,0x801 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006acc: b8 40 68 00 mv r13,r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8006ad0: 28 4b 00 00 lw r11,(r2+0) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006ad4: b8 60 b8 00 mv r23,r3 8006ad8: b8 20 88 00 mv r17,r1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006adc: f8 00 19 09 calli 800cf00 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006ae0: 3a 10 c1 10 ori r16,r16,0xc110 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006ae4: 34 0f 00 00 mvi r15,0 8006ae8: 37 92 00 44 addi r18,sp,68 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006aec: 34 14 00 01 mvi r20,1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006af0: 34 18 00 40 mvi r24,64 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006af4: 34 13 00 02 mvi r19,2 8006af8: 34 15 00 03 mvi r21,3 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8006afc: 34 16 00 04 mvi r22,4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) 8006b00: 34 19 ff ff mvi r25,-1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006b04: b8 20 70 00 mv r14,r1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8006b08: b9 c0 10 00 mv r2,r14 8006b0c: 37 84 00 68 addi r4,sp,104 8006b10: b6 2f 08 00 add r1,r17,r15 8006b14: ba 40 18 00 mv r3,r18 8006b18: f8 00 01 7f calli 8007114 pathlen -= len; 8006b1c: 2b 85 00 68 lw r5,(sp+104) i += len; if ( !pathloc->node_access ) 8006b20: 29 a4 00 00 lw r4,(r13+0) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8006b24: b8 20 60 00 mv r12,r1 pathlen -= len; 8006b28: c9 c5 70 00 sub r14,r14,r5 i += len; if ( !pathloc->node_access ) 8006b2c: 44 80 00 5c be r4,r0,8006c9c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006b30: 5c 20 00 17 bne r1,r0,8006b8c pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8006b34: f8 00 14 23 calli 800bbc0 <__errno> 8006b38: 34 02 00 11 mvi r2,17 8006b3c: 58 22 00 00 sw (r1+0),r2 8006b40: 34 01 ff ff mvi r1,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8006b44: 2b 9d 00 04 lw ra,(sp+4) 8006b48: 2b 8b 00 40 lw r11,(sp+64) 8006b4c: 2b 8c 00 3c lw r12,(sp+60) 8006b50: 2b 8d 00 38 lw r13,(sp+56) 8006b54: 2b 8e 00 34 lw r14,(sp+52) 8006b58: 2b 8f 00 30 lw r15,(sp+48) 8006b5c: 2b 90 00 2c lw r16,(sp+44) 8006b60: 2b 91 00 28 lw r17,(sp+40) 8006b64: 2b 92 00 24 lw r18,(sp+36) 8006b68: 2b 93 00 20 lw r19,(sp+32) 8006b6c: 2b 94 00 1c lw r20,(sp+28) 8006b70: 2b 95 00 18 lw r21,(sp+24) 8006b74: 2b 96 00 14 lw r22,(sp+20) 8006b78: 2b 97 00 10 lw r23,(sp+16) 8006b7c: 2b 98 00 0c lw r24,(sp+12) 8006b80: 2b 99 00 08 lw r25,(sp+8) 8006b84: 37 9c 00 68 addi sp,sp,104 8006b88: c3 a0 00 00 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006b8c: 29 61 00 4c lw r1,(r11+76) 8006b90: b8 80 58 00 mv r11,r4 8006b94: 44 34 00 28 be r1,r20,8006c34 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8006b98: b5 e5 78 00 add r15,r15,r5 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006b9c: 45 93 00 1a be r12,r19,8006c04 8006ba0: 55 93 00 03 bgu r12,r19,8006bac 8006ba4: 5d 80 ff d9 bne r12,r0,8006b08 8006ba8: e3 ff ff e3 bi 8006b34 <== NOT EXECUTED 8006bac: 45 95 00 07 be r12,r21,8006bc8 8006bb0: 5d 96 ff d6 bne r12,r22,8006b08 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8006bb4: f8 00 14 03 calli 800bbc0 <__errno> 8006bb8: 34 02 00 5b mvi r2,91 8006bbc: 58 22 00 00 sw (r1+0),r2 8006bc0: 34 01 ff ff mvi r1,-1 8006bc4: e3 ff ff e0 bi 8006b44 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8006bc8: 28 81 00 4c lw r1,(r4+76) 8006bcc: 44 35 00 39 be r1,r21,8006cb0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8006bd0: 44 36 00 38 be r1,r22,8006cb0 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 8006bd4: 45 60 00 48 be r11,r0,8006cf4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8006bd8: 29 61 00 4c lw r1,(r11+76) 8006bdc: 5c 34 00 46 bne r1,r20,8006cf4 /* * 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 ) { 8006be0: 29 6c 00 5c lw r12,(r11+92) 8006be4: 5d 80 00 49 bne r12,r0,8006d08 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8006be8: b9 60 08 00 mv r1,r11 8006bec: ba 40 10 00 mv r2,r18 8006bf0: f8 00 01 12 calli 8007038 8006bf4: b8 20 58 00 mv r11,r1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8006bf8: 44 2c 00 17 be r1,r12,8006c54 done = true; else pathloc->node_access = node; 8006bfc: 59 ab 00 00 sw (r13+0),r11 8006c00: e3 ff ff c2 bi 8006b08 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006c04: 2a 01 00 00 lw r1,(r16+0) 8006c08: 28 21 00 18 lw r1,(r1+24) 8006c0c: 44 81 ff bf be r4,r1,8006b08 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8006c10: 29 a1 00 10 lw r1,(r13+16) 8006c14: 28 22 00 1c lw r2,(r1+28) 8006c18: 44 82 00 4e be r4,r2,8006d50 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8006c1c: 28 8b 00 08 lw r11,(r4+8) 8006c20: 5d 60 ff f7 bne r11,r0,8006bfc rtems_set_errno_and_return_minus_one( ENOENT ); 8006c24: f8 00 13 e7 calli 800bbc0 <__errno> 8006c28: 58 2c 00 00 sw (r1+0),r12 8006c2c: 34 01 ff ff mvi r1,-1 8006c30: e3 ff ff c5 bi 8006b44 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006c34: 28 81 00 30 lw r1,(r4+48) 8006c38: 20 21 00 40 andi r1,r1,0x40 8006c3c: 44 38 ff d7 be r1,r24,8006b98 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006c40: f8 00 13 e0 calli 800bbc0 <__errno> 8006c44: 34 02 00 0d mvi r2,13 8006c48: 58 22 00 00 sw (r1+0),r2 8006c4c: 34 01 ff ff mvi r1,-1 8006c50: e3 ff ff bd bi 8006b44 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8006c54: 2b 81 00 68 lw r1,(sp+104) /* * 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++) { 8006c58: b6 2f 10 00 add r2,r17,r15 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8006c5c: c9 e1 78 00 sub r15,r15,r1 8006c60: b6 2f 88 00 add r17,r17,r15 8006c64: 5a f1 00 00 sw (r23+0),r17 /* * 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++) { 8006c68: 40 41 00 00 lbu r1,(r2+0) 8006c6c: 44 2b 00 17 be r1,r11,8006cc8 if ( !IMFS_is_separator( path[ i ] ) ) 8006c70: 7c 23 00 5c cmpnei r3,r1,92 8006c74: 7c 21 00 2f cmpnei r1,r1,47 8006c78: a0 23 08 00 and r1,r1,r3 8006c7c: 5c 2b 00 08 bne r1,r11,8006c9c /* * 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++) { 8006c80: 40 41 00 01 lbu r1,(r2+1) if ( !IMFS_is_separator( path[ i ] ) ) 8006c84: 34 42 00 01 addi r2,r2,1 8006c88: 7c 24 00 2f cmpnei r4,r1,47 8006c8c: 7c 23 00 5c cmpnei r3,r1,92 /* * 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++) { 8006c90: 44 20 00 0e be r1,r0,8006cc8 if ( !IMFS_is_separator( path[ i ] ) ) 8006c94: a0 64 18 00 and r3,r3,r4 8006c98: 44 60 ff fa be r3,r0,8006c80 rtems_set_errno_and_return_minus_one( ENOENT ); 8006c9c: f8 00 13 c9 calli 800bbc0 <__errno> 8006ca0: 34 02 00 02 mvi r2,2 8006ca4: 58 22 00 00 sw (r1+0),r2 8006ca8: 34 01 ff ff mvi r1,-1 8006cac: e3 ff ff a6 bi 8006b44 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8006cb0: b9 a0 08 00 mv r1,r13 8006cb4: 34 02 00 00 mvi r2,0 8006cb8: fb ff ff 33 calli 8006984 if ( result == -1 ) 8006cbc: 44 39 ff a2 be r1,r25,8006b44 8006cc0: 29 ab 00 00 lw r11,(r13+0) 8006cc4: e3 ff ff c4 bi 8006bd4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8006cc8: b9 a0 08 00 mv r1,r13 8006ccc: fb ff fd a9 calli 8006370 /* * The returned node must be a directory */ node = pathloc->node_access; 8006cd0: 29 a2 00 00 lw r2,(r13+0) if ( node->type != IMFS_DIRECTORY ) 8006cd4: 34 03 00 01 mvi r3,1 8006cd8: 28 44 00 4c lw r4,(r2+76) 8006cdc: 5c 83 00 06 bne r4,r3,8006cf4 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006ce0: 28 43 00 30 lw r3,(r2+48) 8006ce4: 34 02 00 c0 mvi r2,192 8006ce8: 20 63 00 c0 andi r3,r3,0xc0 8006cec: 5c 62 ff d5 bne r3,r2,8006c40 8006cf0: e3 ff ff 95 bi 8006b44 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8006cf4: f8 00 13 b3 calli 800bbc0 <__errno> 8006cf8: 34 02 00 14 mvi r2,20 8006cfc: 58 22 00 00 sw (r1+0),r2 8006d00: 34 01 ff ff mvi r1,-1 8006d04: e3 ff ff 90 bi 8006b44 * 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; 8006d08: 29 82 00 28 lw r2,(r12+40) 8006d0c: 29 86 00 24 lw r6,(r12+36) 8006d10: 29 85 00 20 lw r5,(r12+32) 8006d14: 29 83 00 1c lw r3,(r12+28) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006d18: 2b 81 00 68 lw r1,(sp+104) * 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; 8006d1c: 29 8c 00 2c lw r12,(r12+44) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006d20: 28 44 00 04 lw r4,(r2+4) 8006d24: c9 e1 08 00 sub r1,r15,r1 * 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; 8006d28: 59 ac 00 10 sw (r13+16),r12 8006d2c: 59 a6 00 08 sw (r13+8),r6 8006d30: 59 a5 00 04 sw (r13+4),r5 8006d34: 59 a3 00 00 sw (r13+0),r3 8006d38: 59 a2 00 0c sw (r13+12),r2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006d3c: b6 21 08 00 add r1,r17,r1 8006d40: b9 a0 10 00 mv r2,r13 8006d44: ba e0 18 00 mv r3,r23 8006d48: d8 80 00 00 call r4 8006d4c: e3 ff ff 7e bi 8006b44 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8006d50: 28 22 00 14 lw r2,(r1+20) 8006d54: 28 27 00 10 lw r7,(r1+16) 8006d58: 28 26 00 0c lw r6,(r1+12) 8006d5c: 28 23 00 08 lw r3,(r1+8) *pathloc = newloc; 8006d60: 28 21 00 18 lw r1,(r1+24) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006d64: 28 44 00 04 lw r4,(r2+4) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 8006d68: 59 a7 00 08 sw (r13+8),r7 8006d6c: 59 a1 00 10 sw (r13+16),r1 8006d70: 59 a6 00 04 sw (r13+4),r6 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006d74: c9 e5 08 00 sub r1,r15,r5 8006d78: e3 ff ff ef bi 8006d34 080064b8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80064b8: 37 9c ff f4 addi sp,sp,-12 80064bc: 5b 8b 00 0c sw (sp+12),r11 80064c0: 5b 8c 00 08 sw (sp+8),r12 80064c4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 80064c8: 28 23 00 00 lw r3,(r1+0) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80064cc: b8 40 60 00 mv r12,r2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 80064d0: 34 04 00 03 mvi r4,3 80064d4: 28 62 00 4c lw r2,(r3+76) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80064d8: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 80064dc: 5c 44 00 1a bne r2,r4,8006544 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 80064e0: 28 63 00 50 lw r3,(r3+80) 80064e4: 58 23 00 00 sw (r1+0),r3 IMFS_Set_handlers( node ); 80064e8: fb ff ff a2 calli 8006370 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 80064ec: 34 02 00 06 mvi r2,6 80064f0: b9 80 08 00 mv r1,r12 80064f4: fb ff e7 3f calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 80064f8: 29 62 00 00 lw r2,(r11+0) 80064fc: 28 42 00 30 lw r2,(r2+48) 8006500: a0 22 10 00 and r2,r1,r2 8006504: 44 41 00 0a be r2,r1,800652c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006508: f8 00 15 ae calli 800bbc0 <__errno> <== NOT EXECUTED 800650c: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8006510: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006514: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return result; } 8006518: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800651c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006520: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006524: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8006528: c3 a0 00 00 ret <== NOT EXECUTED if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 800652c: 34 01 00 00 mvi r1,0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8006530: 2b 9d 00 04 lw ra,(sp+4) 8006534: 2b 8b 00 0c lw r11,(sp+12) 8006538: 2b 8c 00 08 lw r12,(sp+8) 800653c: 37 9c 00 0c addi sp,sp,12 8006540: c3 a0 00 00 ret /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8006544: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8006548: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 800654c: fb ff f0 fb calli 8002938 <== NOT EXECUTED 0800647c : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 800647c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006480: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006484: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006488: b8 20 58 00 mv r11,r1 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 800648c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8006490: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 8006494: fb ff e7 57 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 8006498: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800649c: 28 42 00 30 lw r2,(r2+48) <== NOT EXECUTED 80064a0: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED return 1; return 0; } 80064a4: e4 41 08 00 cmpe r1,r2,r1 <== NOT EXECUTED 80064a8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80064ac: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80064b0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80064b4: c3 a0 00 00 ret <== NOT EXECUTED 08006550 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8006550: 37 9c ff f0 addi sp,sp,-16 8006554: 5b 8b 00 10 sw (sp+16),r11 8006558: 5b 8c 00 0c sw (sp+12),r12 800655c: 5b 8d 00 08 sw (sp+8),r13 8006560: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8006564: 28 24 00 00 lw r4,(r1+0) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8006568: b8 40 60 00 mv r12,r2 800656c: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8006570: 28 82 00 4c lw r2,(r4+76) 8006574: 34 01 00 04 mvi r1,4 8006578: 5c 41 00 3c bne r2,r1,8006668 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 800657c: 28 81 00 08 lw r1,(r4+8) 8006580: 44 20 00 37 be r1,r0,800665c /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8006584: 59 61 00 00 sw (r11+0),r1 rtems_filesystem_get_sym_start_loc( 8006588: 28 85 00 50 lw r5,(r4+80) 800658c: 40 a6 00 00 lbu r6,(r5+0) 8006590: 64 c7 00 5c cmpei r7,r6,92 8006594: 64 c1 00 2f cmpei r1,r6,47 8006598: b8 e1 38 00 or r7,r7,r1 800659c: 44 e0 00 2d be r7,r0,8006650 80065a0: 78 05 08 01 mvhi r5,0x801 80065a4: 38 a5 c1 10 ori r5,r5,0xc110 80065a8: 28 a5 00 00 lw r5,(r5+0) 80065ac: 34 0d 00 01 mvi r13,1 80065b0: 28 a1 00 18 lw r1,(r5+24) 80065b4: 59 61 00 00 sw (r11+0),r1 80065b8: 28 a1 00 1c lw r1,(r5+28) 80065bc: 59 61 00 04 sw (r11+4),r1 80065c0: 28 a1 00 20 lw r1,(r5+32) 80065c4: 59 61 00 08 sw (r11+8),r1 80065c8: 28 a1 00 24 lw r1,(r5+36) 80065cc: 59 61 00 0c sw (r11+12),r1 80065d0: 28 a5 00 28 lw r5,(r5+40) 80065d4: 59 65 00 10 sw (r11+16),r5 80065d8: 28 85 00 50 lw r5,(r4+80) * 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] ), 80065dc: b4 ad 68 00 add r13,r5,r13 80065e0: b9 a0 08 00 mv r1,r13 80065e4: f8 00 1a 47 calli 800cf00 80065e8: b8 20 10 00 mv r2,r1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 80065ec: b9 80 18 00 mv r3,r12 80065f0: b9 60 20 00 mv r4,r11 80065f4: b9 a0 08 00 mv r1,r13 80065f8: f8 00 00 1f calli 8006674 80065fc: b8 20 68 00 mv r13,r1 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8006600: b9 60 08 00 mv r1,r11 8006604: fb ff ff 5b calli 8006370 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006608: 34 02 00 06 mvi r2,6 800660c: b9 80 08 00 mv r1,r12 8006610: fb ff e6 f8 calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8006614: 29 62 00 00 lw r2,(r11+0) 8006618: 28 42 00 30 lw r2,(r2+48) 800661c: a0 22 10 00 and r2,r1,r2 8006620: 44 41 00 05 be r2,r1,8006634 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006624: f8 00 15 67 calli 800bbc0 <__errno> <== NOT EXECUTED 8006628: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 800662c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006630: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED return result; } 8006634: b9 a0 08 00 mv r1,r13 8006638: 2b 9d 00 04 lw ra,(sp+4) 800663c: 2b 8b 00 10 lw r11,(sp+16) 8006640: 2b 8c 00 0c lw r12,(sp+12) 8006644: 2b 8d 00 08 lw r13,(sp+8) 8006648: 37 9c 00 10 addi sp,sp,16 800664c: c3 a0 00 00 ret * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8006650: b8 e0 68 00 mv r13,r7 8006654: 5c c7 ff e2 bne r6,r7,80065dc 8006658: e3 ff ff d2 bi 80065a0 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 800665c: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8006660: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8006664: fb ff f0 b5 calli 8002938 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8006668: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 800666c: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8006670: fb ff f0 b2 calli 8002938 <== NOT EXECUTED 08006f60 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8006f60: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8006f64: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8006f68: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8006f6c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8006f70: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006f74: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8006f78: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8006f7c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8006f80: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED 8006f84: f8 00 0c aa calli 800a22c <== NOT EXECUTED 8006f88: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (! err) { 8006f8c: 44 20 00 0d be r1,r0,8006fc0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 8006f90: 4c 20 00 05 bge r1,r0,8006fa4 <== NOT EXECUTED 8006f94: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006f98: f8 00 13 0a calli 800bbc0 <__errno> <== NOT EXECUTED 8006f9c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006fa0: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006fa4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006fa8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006fac: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8006fb0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8006fb4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8006fb8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8006fbc: c3 a0 00 00 ret <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 8006fc0: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 8006fc4: 34 02 fe ff mvi r2,-257 <== 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) 8006fc8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 8006fcc: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8006fd0: 59 82 00 18 sw (r12+24),r2 <== 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) 8006fd4: f8 00 02 d4 calli 8007b24 <== NOT EXECUTED 8006fd8: 5c 2b ff f3 bne r1,r11,8006fa4 <== NOT EXECUTED 8006fdc: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED 8006fe0: 5c 20 ff f1 bne r1,r0,8006fa4 <== NOT EXECUTED free(jnode); 8006fe4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006fe8: f8 00 02 08 calli 8007808 <== NOT EXECUTED 8006fec: e3 ff ff ee bi 8006fa4 <== NOT EXECUTED 08006de8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8006de8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006dec: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006df0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int err; if (command == FIONBIO) { 8006df4: 78 05 80 04 mvhi r5,0x8004 <== NOT EXECUTED 8006df8: 38 a5 66 7e ori r5,r5,0x667e <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8006dfc: b8 20 20 00 mv r4,r1 <== NOT EXECUTED int err; if (command == FIONBIO) { 8006e00: 44 45 00 0d be r2,r5,8006e34 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8006e04: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8006e08: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006e0c: f8 00 0b e8 calli 8009dac <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006e10: 4c 20 00 05 bge r1,r0,8006e24 <== NOT EXECUTED 8006e14: c8 01 58 00 sub r11,r0,r1 <== NOT EXECUTED 8006e18: f8 00 13 6a calli 800bbc0 <__errno> <== NOT EXECUTED 8006e1c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006e20: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED } 8006e24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006e28: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006e2c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006e30: c3 a0 00 00 ret <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 8006e34: 34 0b 00 0e mvi r11,14 <== NOT EXECUTED 8006e38: 44 60 ff f8 be r3,r0,8006e18 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8006e3c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8006e40: 44 20 00 09 be r1,r0,8006e64 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8006e44: 28 82 00 18 lw r2,(r4+24) <== NOT EXECUTED 8006e48: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006e4c: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED 8006e50: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 8006e54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006e58: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006e5c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006e60: c3 a0 00 00 ret <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8006e64: 28 83 00 18 lw r3,(r4+24) <== NOT EXECUTED 8006e68: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8006e6c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8006e70: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 8006e74: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006e78: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006e7c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006e80: c3 a0 00 00 ret <== NOT EXECUTED 08006d7c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8006d7c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006d80: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006d84: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006d88: b8 20 28 00 mv r5,r1 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 8006d8c: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8006d90: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8006d94: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 8006d98: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006d9c: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED 8006da0: f8 00 0b e2 calli 8009d28 <== NOT EXECUTED 8006da4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006da8: 4c 20 00 07 bge r1,r0,8006dc4 <== NOT EXECUTED 8006dac: f8 00 13 85 calli 800bbc0 <__errno> <== NOT EXECUTED 8006db0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006db4: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8006db8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006dbc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8006dc0: e0 00 00 04 bi 8006dd0 <== NOT EXECUTED 8006dc4: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 8006dc8: fb ff e5 5a calli 8000330 <__ashrsi3> <== NOT EXECUTED 8006dcc: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } 8006dd0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8006dd4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8006dd8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ddc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006de0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006de4: c3 a0 00 00 ret <== NOT EXECUTED 08006ef4 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8006ef4: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006ef8: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006efc: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006f00: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006f04: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 8006f08: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006f0c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006f10: f8 00 0c 51 calli 800a054 <== NOT EXECUTED 8006f14: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) 8006f18: 4c 01 00 0c bge r0,r1,8006f48 <== NOT EXECUTED IMFS_update_atime(jnode); 8006f1c: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006f20: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006f24: f8 00 02 b7 calli 8007a00 <== NOT EXECUTED 8006f28: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006f2c: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 8006f30: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006f34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006f38: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006f3c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006f40: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8006f44: c3 a0 00 00 ret <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 8006f48: 44 20 ff fa be r1,r0,8006f30 <== NOT EXECUTED 8006f4c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006f50: f8 00 13 1c calli 800bbc0 <__errno> <== NOT EXECUTED 8006f54: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006f58: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8006f5c: e3 ff ff f5 bi 8006f30 <== NOT EXECUTED 08006e84 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8006e84: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006e88: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006e8c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006e90: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006e94: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8006e98: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006e9c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006ea0: f8 00 0b e4 calli 8009e30 <== NOT EXECUTED 8006ea4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) { 8006ea8: 4c 01 00 0d bge r0,r1,8006edc <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8006eac: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006eb0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006eb4: f8 00 02 d3 calli 8007a00 <== NOT EXECUTED 8006eb8: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006ebc: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED 8006ec0: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 8006ec4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006ec8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ecc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006ed0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006ed4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8006ed8: c3 a0 00 00 ret <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 8006edc: 44 20 ff fa be r1,r0,8006ec4 <== NOT EXECUTED 8006ee0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006ee4: f8 00 13 37 calli 800bbc0 <__errno> <== NOT EXECUTED 8006ee8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006eec: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8006ef0: e3 ff ff f5 bi 8006ec4 <== NOT EXECUTED 08007038 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8007038: 37 9c ff f0 addi sp,sp,-16 800703c: 5b 8b 00 10 sw (sp+16),r11 8007040: 5b 8c 00 0c sw (sp+12),r12 8007044: 5b 8d 00 08 sw (sp+8),r13 8007048: 5b 9d 00 04 sw (sp+4),ra 800704c: b8 20 58 00 mv r11,r1 8007050: b8 40 60 00 mv r12,r2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8007054: 44 20 00 28 be r1,r0,80070f4 if ( !name ) 8007058: 44 40 00 13 be r2,r0,80070a4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 800705c: 78 02 08 01 mvhi r2,0x801 8007060: 38 42 b2 9c ori r2,r2,0xb29c 8007064: b9 80 08 00 mv r1,r12 8007068: f8 00 17 56 calli 800cdc0 800706c: 44 20 00 07 be r1,r0,8007088 return directory; if ( !strcmp( name, dotdotname ) ) 8007070: 78 02 08 01 mvhi r2,0x801 8007074: 38 42 b2 a0 ori r2,r2,0xb2a0 8007078: b9 80 08 00 mv r1,r12 800707c: f8 00 17 51 calli 800cdc0 8007080: 5c 20 00 11 bne r1,r0,80070c4 return directory->Parent; 8007084: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8007088: b9 60 08 00 mv r1,r11 800708c: 2b 9d 00 04 lw ra,(sp+4) 8007090: 2b 8b 00 10 lw r11,(sp+16) 8007094: 2b 8c 00 0c lw r12,(sp+12) 8007098: 2b 8d 00 08 lw r13,(sp+8) 800709c: 37 9c 00 10 addi sp,sp,16 80070a0: c3 a0 00 00 ret if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 80070a4: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 80070a8: b9 60 08 00 mv r1,r11 80070ac: 2b 9d 00 04 lw ra,(sp+4) 80070b0: 2b 8b 00 10 lw r11,(sp+16) 80070b4: 2b 8c 00 0c lw r12,(sp+12) 80070b8: 2b 8d 00 08 lw r13,(sp+8) 80070bc: 37 9c 00 10 addi sp,sp,16 80070c0: c3 a0 00 00 ret if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 80070c4: 29 6d 00 50 lw r13,(r11+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80070c8: 35 6b 00 54 addi r11,r11,84 80070cc: 5d ab 00 04 bne r13,r11,80070dc 80070d0: e3 ff ff f5 bi 80070a4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 80070d4: 29 ad 00 00 lw r13,(r13+0) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 80070d8: 45 ab ff f3 be r13,r11,80070a4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 80070dc: b9 80 08 00 mv r1,r12 80070e0: 35 a2 00 0c addi r2,r13,12 80070e4: f8 00 17 37 calli 800cdc0 80070e8: 5c 20 ff fb bne r1,r0,80070d4 80070ec: b9 a0 58 00 mv r11,r13 80070f0: e3 ff ff e6 bi 8007088 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 80070f4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80070f8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 80070fc: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 8007100: 38 21 b2 44 ori r1,r1,0xb244 <== NOT EXECUTED 8007104: 38 63 b2 a4 ori r3,r3,0xb2a4 <== NOT EXECUTED 8007108: 38 84 b2 90 ori r4,r4,0xb290 <== NOT EXECUTED 800710c: 34 02 00 2a mvi r2,42 <== NOT EXECUTED 8007110: f8 00 01 54 calli 8007660 <__assert_func> <== NOT EXECUTED 0800d580 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800d580: 37 9c ff d8 addi sp,sp,-40 800d584: 5b 8b 00 14 sw (sp+20),r11 800d588: 5b 8c 00 10 sw (sp+16),r12 800d58c: 5b 8d 00 0c sw (sp+12),r13 800d590: 5b 8e 00 08 sw (sp+8),r14 800d594: 5b 9d 00 04 sw (sp+4),ra * 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; 800d598: 28 22 00 20 lw r2,(r1+32) /* * 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; 800d59c: 28 2b 00 1c lw r11,(r1+28) 800d5a0: 37 8d 00 18 addi r13,sp,24 loc = temp_mt_entry->mt_fs_root; 800d5a4: 5b 82 00 1c sw (sp+28),r2 800d5a8: 28 22 00 24 lw r2,(r1+36) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 800d5ac: 34 0c 00 01 mvi r12,1 * 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; 800d5b0: 5b 82 00 20 sw (sp+32),r2 800d5b4: 28 22 00 28 lw r2,(r1+40) 800d5b8: 5b 82 00 24 sw (sp+36),r2 800d5bc: 28 22 00 2c lw r2,(r1+44) 800d5c0: 5b 82 00 28 sw (sp+40),r2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 800d5c4: 34 02 00 00 mvi r2,0 800d5c8: 58 22 00 1c sw (r1+28),r2 * 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; 800d5cc: 5b 8b 00 18 sw (sp+24),r11 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800d5d0: b9 a0 08 00 mv r1,r13 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 800d5d4: 5b 8b 00 18 sw (sp+24),r11 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 800d5d8: 29 6e 00 08 lw r14,(r11+8) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800d5dc: fb ff fc b5 calli 800c8b0 if ( jnode->type != IMFS_DIRECTORY ) { 800d5e0: 29 61 00 4c lw r1,(r11+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800d5e4: 35 63 00 54 addi r3,r11,84 800d5e8: 5c 2c 00 13 bne r1,r12,800d634 800d5ec: 29 61 00 50 lw r1,(r11+80) 800d5f0: 44 23 00 11 be r1,r3,800d634 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 800d5f4: 45 60 00 08 be r11,r0,800d614 if ( jnode->type == IMFS_DIRECTORY ) { 800d5f8: 29 61 00 4c lw r1,(r11+76) 800d5fc: 5c 2c ff f5 bne r1,r12,800d5d0 800d600: 29 61 00 50 lw r1,(r11+80) 800d604: 35 62 00 54 addi r2,r11,84 800d608: 44 22 ff f2 be r1,r2,800d5d0 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 800d60c: b8 20 58 00 mv r11,r1 } } } while (jnode != NULL); 800d610: 5c 20 ff f0 bne r1,r0,800d5d0 800d614: 34 01 00 00 mvi r1,0 return 0; } 800d618: 2b 9d 00 04 lw ra,(sp+4) 800d61c: 2b 8b 00 14 lw r11,(sp+20) 800d620: 2b 8c 00 10 lw r12,(sp+16) 800d624: 2b 8d 00 0c lw r13,(sp+12) 800d628: 2b 8e 00 08 lw r14,(sp+8) 800d62c: 37 9c 00 28 addi sp,sp,40 800d630: c3 a0 00 00 ret result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 800d634: 34 01 00 00 mvi r1,0 800d638: b9 a0 10 00 mv r2,r13 800d63c: fb ff d3 79 calli 8002420 if (result != 0) 800d640: 5c 20 00 03 bne r1,r0,800d64c 800d644: b9 c0 58 00 mv r11,r14 800d648: e3 ff ff eb bi 800d5f4 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 800d64c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800d650: e3 ff ff f2 bi 800d618 <== NOT EXECUTED 08007250 : 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 ) { 8007250: 37 9c ff ec addi sp,sp,-20 8007254: 5b 8b 00 14 sw (sp+20),r11 8007258: 5b 8c 00 10 sw (sp+16),r12 800725c: 5b 8d 00 0c sw (sp+12),r13 8007260: 5b 8e 00 08 sw (sp+8),r14 8007264: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8007268: 78 05 08 01 mvhi r5,0x801 800726c: 38 a5 c0 14 ori r5,r5,0xc014 8007270: 28 a6 00 00 lw r6,(r5+0) 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 ) { 8007274: b8 20 58 00 mv r11,r1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8007278: 34 01 00 10 mvi r1,16 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 800727c: b8 40 68 00 mv r13,r2 8007280: b8 60 70 00 mv r14,r3 8007284: b8 80 60 00 mv r12,r4 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8007288: 44 c1 00 09 be r6,r1,80072ac 800728c: 34 05 00 00 mvi r5,0 8007290: 34 01 00 20 mvi r1,32 8007294: 34 07 00 05 mvi r7,5 8007298: 34 a5 00 01 addi r5,r5,1 800729c: 44 c1 00 04 be r6,r1,80072ac 80072a0: b4 21 08 00 add r1,r1,r1 80072a4: 5c a7 ff fd bne r5,r7,8007298 80072a8: 34 06 00 80 mvi r6,128 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 80072ac: 78 01 08 01 mvhi r1,0x801 80072b0: 38 21 c6 24 ori r1,r1,0xc624 80072b4: 58 26 00 00 sw (r1+0),r6 /* * 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(); 80072b8: f8 00 0d 4e calli 800a7f0 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; 80072bc: 78 05 08 01 mvhi r5,0x801 80072c0: 38 a5 b4 dc ori r5,r5,0xb4dc 80072c4: 28 a2 00 2c lw r2,(r5+44) /* * 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(); 80072c8: 59 61 00 1c sw (r11+28),r1 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 80072cc: 59 6d 00 28 sw (r11+40),r13 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 80072d0: 59 62 00 64 sw (r11+100),r2 80072d4: 28 a2 00 00 lw r2,(r5+0) * 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; 80072d8: 59 6c 00 24 sw (r11+36),r12 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 ) ); 80072dc: 34 01 00 01 mvi r1,1 * 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; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 80072e0: 59 62 00 38 sw (r11+56),r2 80072e4: 28 a2 00 04 lw r2,(r5+4) 80072e8: 59 62 00 3c sw (r11+60),r2 80072ec: 28 a2 00 08 lw r2,(r5+8) 80072f0: 59 62 00 40 sw (r11+64),r2 80072f4: 28 a2 00 0c lw r2,(r5+12) 80072f8: 59 62 00 44 sw (r11+68),r2 80072fc: 28 a2 00 10 lw r2,(r5+16) 8007300: 59 62 00 48 sw (r11+72),r2 8007304: 28 a2 00 14 lw r2,(r5+20) 8007308: 59 62 00 4c sw (r11+76),r2 800730c: 28 a2 00 18 lw r2,(r5+24) 8007310: 59 62 00 50 sw (r11+80),r2 8007314: 28 a2 00 1c lw r2,(r5+28) 8007318: 59 62 00 54 sw (r11+84),r2 800731c: 28 a2 00 20 lw r2,(r5+32) 8007320: 59 62 00 58 sw (r11+88),r2 8007324: 28 a2 00 24 lw r2,(r5+36) 8007328: 28 a5 00 28 lw r5,(r5+40) 800732c: 59 62 00 5c sw (r11+92),r2 8007330: 59 65 00 60 sw (r11+96),r5 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8007334: 34 02 00 0c mvi r2,12 8007338: f8 00 00 dd calli 80076ac if ( !fs_info ) { 800733c: 44 20 00 11 be r1,r0,8007380 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; 8007340: 29 63 00 1c lw r3,(r11+28) /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8007344: 34 02 00 01 mvi r2,1 8007348: 58 22 00 00 sw (r1+0),r2 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; 800734c: 59 61 00 34 sw (r11+52),r1 * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8007350: 58 2c 00 08 sw (r1+8),r12 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8007354: 58 2e 00 04 sw (r1+4),r14 fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8007358: 58 62 00 38 sw (r3+56),r2 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 800735c: f8 00 0a 75 calli 8009d30 8007360: 34 01 00 00 mvi r1,0 return 0; } 8007364: 2b 9d 00 04 lw ra,(sp+4) 8007368: 2b 8b 00 14 lw r11,(sp+20) 800736c: 2b 8c 00 10 lw r12,(sp+16) 8007370: 2b 8d 00 0c lw r13,(sp+12) 8007374: 2b 8e 00 08 lw r14,(sp+8) 8007378: 37 9c 00 14 addi sp,sp,20 800737c: c3 a0 00 00 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 8007380: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 8007384: f8 00 01 21 calli 8007808 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8007388: f8 00 12 0e calli 800bbc0 <__errno> <== NOT EXECUTED 800738c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8007390: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007394: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8007398: e3 ff ff f3 bi 8007364 <== NOT EXECUTED 08002050 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002050: 37 9c ff a8 addi sp,sp,-88 8002054: 5b 8b 00 10 sw (sp+16),r11 8002058: 5b 8c 00 0c sw (sp+12),r12 800205c: 5b 8d 00 08 sw (sp+8),r13 8002060: 5b 9d 00 04 sw (sp+4),ra int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8002064: 28 24 00 00 lw r4,(r1+0) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002068: b8 60 58 00 mv r11,r3 /* * 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 ) 800206c: 34 03 00 07 mvi r3,7 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8002070: 5b 84 00 38 sw (sp+56),r4 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 8002074: 2c 84 00 34 lhu r4,(r4+52) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002078: b8 40 68 00 mv r13,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 ) 800207c: 50 64 00 06 bgeu r3,r4,8002094 rtems_set_errno_and_return_minus_one( EMLINK ); 8002080: f8 00 41 78 calli 8012660 <__errno> 8002084: 34 02 00 1f mvi r2,31 8002088: 58 22 00 00 sw (r1+0),r2 800208c: 34 01 ff ff mvi r1,-1 8002090: e0 00 00 1b bi 80020fc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 8002094: b9 60 08 00 mv r1,r11 8002098: f8 00 46 23 calli 8013924 800209c: 37 8c 00 14 addi r12,sp,20 80020a0: b8 20 10 00 mv r2,r1 80020a4: b9 80 18 00 mv r3,r12 80020a8: 37 84 00 58 addi r4,sp,88 80020ac: b9 60 08 00 mv r1,r11 80020b0: f8 00 2d a0 calli 800d730 * 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( 80020b4: b9 a0 08 00 mv r1,r13 80020b8: b9 80 18 00 mv r3,r12 80020bc: 34 02 00 03 mvi r2,3 80020c0: 38 04 a1 ff mvu r4,0xa1ff 80020c4: 37 85 00 38 addi r5,sp,56 80020c8: f8 00 29 a0 calli 800c748 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 80020cc: 44 20 00 12 be r1,r0,8002114 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 80020d0: 2b 83 00 38 lw r3,(sp+56) IMFS_update_ctime( info.hard_link.link_node ); 80020d4: 34 02 00 00 mvi r2,0 80020d8: 37 81 00 50 addi r1,sp,80 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 80020dc: 2c 64 00 34 lhu r4,(r3+52) 80020e0: 34 84 00 01 addi r4,r4,1 80020e4: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( info.hard_link.link_node ); 80020e8: f8 00 02 e2 calli 8002c70 80020ec: 2b 82 00 38 lw r2,(sp+56) 80020f0: 2b 83 00 50 lw r3,(sp+80) 80020f4: 34 01 00 00 mvi r1,0 80020f8: 58 43 00 48 sw (r2+72),r3 return 0; } 80020fc: 2b 9d 00 04 lw ra,(sp+4) 8002100: 2b 8b 00 10 lw r11,(sp+16) 8002104: 2b 8c 00 0c lw r12,(sp+12) 8002108: 2b 8d 00 08 lw r13,(sp+8) 800210c: 37 9c 00 58 addi sp,sp,88 8002110: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8002114: f8 00 41 53 calli 8012660 <__errno> <== NOT EXECUTED 8002118: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 800211c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002120: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002124: e3 ff ff f6 bi 80020fc <== NOT EXECUTED 08010cac : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 8010cac: 37 9c ff f4 addi sp,sp,-12 8010cb0: 5b 8b 00 0c sw (sp+12),r11 8010cb4: 5b 8c 00 08 sw (sp+8),r12 8010cb8: 5b 9d 00 04 sw (sp+4),ra block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 8010cbc: 44 20 00 16 be r1,r0,8010d14 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010cc0: 28 24 00 4c lw r4,(r1+76) 8010cc4: 34 03 00 05 mvi r3,5 8010cc8: 5c 83 00 1b bne r4,r3,8010d34 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 ); 8010ccc: 34 03 00 01 mvi r3,1 8010cd0: fb ff fe 3f calli 80105cc if ( *block_entry_ptr ) 8010cd4: 28 2b 00 00 lw r11,(r1+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 ); 8010cd8: b8 20 60 00 mv r12,r1 if ( *block_entry_ptr ) 8010cdc: 34 01 00 00 mvi r1,0 8010ce0: 45 61 00 06 be r11,r1,8010cf8 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 8010ce4: 2b 9d 00 04 lw ra,(sp+4) 8010ce8: 2b 8b 00 0c lw r11,(sp+12) 8010cec: 2b 8c 00 08 lw r12,(sp+8) 8010cf0: 37 9c 00 0c addi sp,sp,12 8010cf4: c3 a0 00 00 ret #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 8010cf8: fb ff fe 25 calli 801058c 8010cfc: b8 20 10 00 mv r2,r1 if ( !memory ) 8010d00: 34 01 00 01 mvi r1,1 8010d04: 44 4b ff f8 be r2,r11,8010ce4 return 1; *block_entry_ptr = memory; 8010d08: 59 82 00 00 sw (r12+0),r2 8010d0c: b9 60 08 00 mv r1,r11 return 0; 8010d10: e3 ff ff f5 bi 8010ce4 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 8010d14: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010d18: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010d1c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010d20: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010d24: 38 63 2e 98 ori r3,r3,0x2e98 <== NOT EXECUTED 8010d28: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8010d2c: 34 02 01 69 mvi r2,361 <== NOT EXECUTED 8010d30: fb ff f3 3b calli 800da1c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010d34: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010d38: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010d3c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010d40: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010d44: 38 63 2e 98 ori r3,r3,0x2e98 <== NOT EXECUTED 8010d48: 38 84 2d 68 ori r4,r4,0x2d68 <== NOT EXECUTED 8010d4c: 34 02 01 6d mvi r2,365 <== NOT EXECUTED 8010d50: fb ff f3 33 calli 800da1c <__assert_func> <== NOT EXECUTED 08010d54 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 8010d54: 37 9c ff e0 addi sp,sp,-32 8010d58: 5b 8b 00 20 sw (sp+32),r11 8010d5c: 5b 8c 00 1c sw (sp+28),r12 8010d60: 5b 8d 00 18 sw (sp+24),r13 8010d64: 5b 8e 00 14 sw (sp+20),r14 8010d68: 5b 8f 00 10 sw (sp+16),r15 8010d6c: 5b 90 00 0c sw (sp+12),r16 8010d70: 5b 91 00 08 sw (sp+8),r17 8010d74: 5b 9d 00 04 sw (sp+4),ra 8010d78: b8 20 60 00 mv r12,r1 8010d7c: b8 40 78 00 mv r15,r2 /* * Perform internal consistency checks */ assert( the_jnode ); 8010d80: 44 20 00 59 be r1,r0,8010ee4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010d84: 28 22 00 4c lw r2,(r1+76) 8010d88: 34 01 00 05 mvi r1,5 8010d8c: 5c 41 00 4e bne r2,r1,8010ec4 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 8010d90: 78 01 08 02 mvhi r1,0x802 8010d94: 38 21 46 4c ori r1,r1,0x464c 8010d98: 28 2b 00 00 lw r11,(r1+0) 8010d9c: 34 02 00 02 mvi r2,2 8010da0: b9 60 08 00 mv r1,r11 8010da4: fb ff bf b8 calli 8000c84 <__lshrsi3> 8010da8: b8 20 10 00 mv r2,r1 8010dac: b8 20 68 00 mv r13,r1 8010db0: 34 21 00 01 addi r1,r1,1 8010db4: f8 00 41 ec calli 8021564 <__mulsi3> 8010db8: b9 a0 10 00 mv r2,r13 8010dbc: 34 21 00 01 addi r1,r1,1 8010dc0: f8 00 41 e9 calli 8021564 <__mulsi3> 8010dc4: 34 21 ff ff addi r1,r1,-1 8010dc8: b9 60 10 00 mv r2,r11 8010dcc: f8 00 41 e6 calli 8021564 <__mulsi3> 8010dd0: 54 2f 00 06 bgu r1,r15,8010de8 rtems_set_errno_and_return_minus_one( EINVAL ); 8010dd4: f8 00 06 23 calli 8012660 <__errno> <== NOT EXECUTED 8010dd8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010ddc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010de0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010de4: e0 00 00 0a bi 8010e0c <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 8010de8: b9 e0 08 00 mv r1,r15 8010dec: 34 02 00 1f mvi r2,31 8010df0: fb ff bf cd calli 8000d24 <__ashrsi3> 8010df4: 29 8d 00 50 lw r13,(r12+80) 8010df8: b8 20 80 00 mv r16,r1 8010dfc: 29 91 00 54 lw r17,(r12+84) 8010e00: 48 2d 00 0d bg r1,r13,8010e34 8010e04: 44 2d 00 2e be r1,r13,8010ebc /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 8010e08: 34 01 00 00 mvi r1,0 return 0; } 8010e0c: 2b 9d 00 04 lw ra,(sp+4) 8010e10: 2b 8b 00 20 lw r11,(sp+32) 8010e14: 2b 8c 00 1c lw r12,(sp+28) 8010e18: 2b 8d 00 18 lw r13,(sp+24) 8010e1c: 2b 8e 00 14 lw r14,(sp+20) 8010e20: 2b 8f 00 10 lw r15,(sp+16) 8010e24: 2b 90 00 0c lw r16,(sp+12) 8010e28: 2b 91 00 08 lw r17,(sp+8) 8010e2c: 37 9c 00 20 addi sp,sp,32 8010e30: c3 a0 00 00 ret /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e34: b9 60 10 00 mv r2,r11 8010e38: b9 e0 08 00 mv r1,r15 8010e3c: f8 00 41 ea calli 80215e4 <__divsi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e40: 34 02 00 1f mvi r2,31 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e44: b8 20 70 00 mv r14,r1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e48: b9 60 08 00 mv r1,r11 8010e4c: fb ff bf b6 calli 8000d24 <__ashrsi3> 8010e50: b8 20 18 00 mv r3,r1 8010e54: ba 20 10 00 mv r2,r17 8010e58: b9 a0 08 00 mv r1,r13 8010e5c: b9 60 20 00 mv r4,r11 8010e60: f8 00 2c 90 calli 801c0a0 <__divdi3> 8010e64: b8 40 68 00 mv r13,r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8010e68: 54 4e 00 08 bgu r2,r14,8010e88 8010e6c: b8 40 58 00 mv r11,r2 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 8010e70: b9 80 08 00 mv r1,r12 8010e74: b9 60 10 00 mv r2,r11 8010e78: fb ff ff 8d calli 8010cac 8010e7c: 5c 20 00 0a bne r1,r0,8010ea4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8010e80: 35 6b 00 01 addi r11,r11,1 8010e84: 51 cb ff fb bgeu r14,r11,8010e70 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 8010e88: 59 8f 00 54 sw (r12+84),r15 8010e8c: 59 90 00 50 sw (r12+80),r16 8010e90: e3 ff ff de bi 8010e08 */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 8010e94: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010e98: b9 80 08 00 mv r1,r12 <== 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-- ) { 8010e9c: 35 6b ff ff addi r11,r11,-1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 8010ea0: fb ff fe a2 calli 8010928 <== 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-- ) { 8010ea4: 51 6d ff fc bgeu r11,r13,8010e94 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 8010ea8: f8 00 05 ee calli 8012660 <__errno> <== NOT EXECUTED 8010eac: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010eb0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010eb4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010eb8: e3 ff ff d5 bi 8010e0c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 8010ebc: 55 f1 ff de bgu r15,r17,8010e34 8010ec0: e3 ff ff d2 bi 8010e08 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010ec4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010ec8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010ecc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010ed0: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010ed4: 38 63 2e b0 ori r3,r3,0x2eb0 <== NOT EXECUTED 8010ed8: 38 84 2d 68 ori r4,r4,0x2d68 <== NOT EXECUTED 8010edc: 34 02 01 35 mvi r2,309 <== NOT EXECUTED 8010ee0: fb ff f2 cf calli 800da1c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8010ee4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010ee8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010eec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010ef0: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010ef4: 38 63 2e b0 ori r3,r3,0x2eb0 <== NOT EXECUTED 8010ef8: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8010efc: 34 02 01 31 mvi r2,305 <== NOT EXECUTED 8010f00: fb ff f2 c7 calli 800da1c <__assert_func> <== NOT EXECUTED 080105cc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 80105cc: 37 9c ff e4 addi sp,sp,-28 80105d0: 5b 8b 00 1c sw (sp+28),r11 80105d4: 5b 8c 00 18 sw (sp+24),r12 80105d8: 5b 8d 00 14 sw (sp+20),r13 80105dc: 5b 8e 00 10 sw (sp+16),r14 80105e0: 5b 8f 00 0c sw (sp+12),r15 80105e4: 5b 90 00 08 sw (sp+8),r16 80105e8: 5b 9d 00 04 sw (sp+4),ra 80105ec: b8 20 58 00 mv r11,r1 80105f0: b8 40 60 00 mv r12,r2 80105f4: b8 60 70 00 mv r14,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 80105f8: 44 20 00 88 be r1,r0,8010818 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 80105fc: 28 22 00 4c lw r2,(r1+76) 8010600: 34 01 00 05 mvi r1,5 8010604: 5c 41 00 8d bne r2,r1,8010838 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 8010608: 78 01 08 02 mvhi r1,0x802 801060c: 38 21 46 4c ori r1,r1,0x464c 8010610: 28 21 00 00 lw r1,(r1+0) 8010614: 34 02 00 02 mvi r2,2 8010618: fb ff c1 9b calli 8000c84 <__lshrsi3> 801061c: b8 20 68 00 mv r13,r1 8010620: 34 21 ff ff addi r1,r1,-1 8010624: 55 81 00 09 bgu r12,r1,8010648 #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 8010628: 29 6d 00 58 lw r13,(r11+88) if ( malloc_it ) { 801062c: 45 c0 00 5d be r14,r0,80107a0 if ( !p ) { 8010630: 45 a0 00 5f be r13,r0,80107ac } if ( !p ) return 0; return &info->indirect[ my_block ]; 8010634: b9 80 08 00 mv r1,r12 8010638: 34 02 00 02 mvi r2,2 801063c: fb ff c1 6a calli 8000be4 <__ashlsi3> 8010640: b5 a1 08 00 add r1,r13,r1 8010644: e0 00 00 1d bi 80106b8 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 8010648: 35 a1 00 01 addi r1,r13,1 <== NOT EXECUTED 801064c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8010650: f8 00 43 c5 calli 8021564 <__mulsi3> <== NOT EXECUTED 8010654: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8010658: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 801065c: 55 81 00 20 bgu r12,r1,80106dc <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 8010660: c9 8d 60 00 sub r12,r12,r13 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010664: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8010668: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 801066c: f8 00 44 4d calli 80217a0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010670: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010674: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010678: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 801067c: f8 00 44 39 calli 8021760 <__udivsi3> <== NOT EXECUTED 8010680: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->doubly_indirect; 8010684: 29 6c 00 5c lw r12,(r11+92) <== NOT EXECUTED if ( malloc_it ) { 8010688: 45 c0 00 3e be r14,r0,8010780 <== NOT EXECUTED if ( !p ) { 801068c: 45 80 00 4d be r12,r0,80107c0 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 8010690: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010694: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010698: fb ff c1 53 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 801069c: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 80106a0: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p1 ) { 80106a4: 45 60 00 32 be r11,r0,801076c <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 80106a8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80106ac: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80106b0: fb ff c1 4d calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80106b4: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 80106b8: 2b 9d 00 04 lw ra,(sp+4) 80106bc: 2b 8b 00 1c lw r11,(sp+28) 80106c0: 2b 8c 00 18 lw r12,(sp+24) 80106c4: 2b 8d 00 14 lw r13,(sp+20) 80106c8: 2b 8e 00 10 lw r14,(sp+16) 80106cc: 2b 8f 00 0c lw r15,(sp+12) 80106d0: 2b 90 00 08 lw r16,(sp+8) 80106d4: 37 9c 00 1c addi sp,sp,28 80106d8: c3 a0 00 00 ret #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 80106dc: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 80106e0: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80106e4: f8 00 43 a0 calli 8021564 <__mulsi3> <== NOT EXECUTED 80106e8: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80106ec: 55 81 00 2b bgu r12,r1,8010798 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 80106f0: c9 8f 60 00 sub r12,r12,r15 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 80106f4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80106f8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80106fc: f8 00 44 29 calli 80217a0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010700: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010704: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010708: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 801070c: f8 00 44 15 calli 8021760 <__udivsi3> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 8010710: b9 a0 10 00 mv r2,r13 <== 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; 8010714: b8 20 60 00 mv r12,r1 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 8010718: f8 00 44 12 calli 8021760 <__udivsi3> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 801071c: b9 a0 10 00 mv r2,r13 <== 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; 8010720: b8 20 80 00 mv r16,r1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 8010724: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8010728: f8 00 44 1e calli 80217a0 <__umodsi3> <== NOT EXECUTED 801072c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->triply_indirect; 8010730: 29 6c 00 60 lw r12,(r11+96) <== NOT EXECUTED if ( malloc_it ) { 8010734: 45 c0 00 28 be r14,r0,80107d4 <== NOT EXECUTED if ( !p ) { 8010738: 45 80 00 48 be r12,r0,8010858 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 801073c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8010740: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010744: fb ff c1 28 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8010748: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 801074c: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p1 ) { 8010750: 45 60 00 47 be r11,r0,801086c <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 8010754: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010758: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 801075c: fb ff c1 22 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8010760: b5 61 60 00 add r12,r11,r1 <== NOT EXECUTED 8010764: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p2 ) { 8010768: 5d 60 ff d0 bne r11,r0,80106a8 <== NOT EXECUTED p2 = memfile_alloc_block(); 801076c: fb ff ff 88 calli 801058c <== NOT EXECUTED 8010770: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p2 ) 8010774: 44 20 00 09 be r1,r0,8010798 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 8010778: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED 801077c: e3 ff ff cb bi 80106a8 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 8010780: 45 8e 00 06 be r12,r14,8010798 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 8010784: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010788: fb ff c1 17 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 801078c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8010790: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p ) 8010794: 5d 60 ff c5 bne r11,r0,80106a8 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 8010798: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 801079c: e3 ff ff c7 bi 80106b8 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 80107a0: 5d ae ff a5 bne r13,r14,8010634 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 80107a4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80107a8: e3 ff ff c4 bi 80106b8 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 80107ac: fb ff ff 78 calli 801058c 80107b0: b8 20 68 00 mv r13,r1 if ( !p ) 80107b4: 44 20 ff f9 be r1,r0,8010798 return 0; info->indirect = p; 80107b8: 59 61 00 58 sw (r11+88),r1 80107bc: e3 ff ff 9e bi 8010634 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 80107c0: fb ff ff 73 calli 801058c <== NOT EXECUTED 80107c4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 80107c8: 44 20 ff f4 be r1,r0,8010798 <== NOT EXECUTED return 0; info->doubly_indirect = p; 80107cc: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED 80107d0: e3 ff ff b0 bi 8010690 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 80107d4: 45 8e ff f1 be r12,r14,8010798 <== 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 ]; 80107d8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80107dc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80107e0: fb ff c1 01 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80107e4: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 80107e8: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p1 ) 80107ec: 45 60 ff eb be r11,r0,8010798 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 80107f0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80107f4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80107f8: fb ff c0 fb calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80107fc: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 8010800: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010804: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8010808: fb ff c0 f7 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 801080c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8010810: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8010814: e3 ff ff a9 bi 80106b8 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8010818: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801081c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010820: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010824: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010828: 38 63 2e 00 ori r3,r3,0x2e00 <== NOT EXECUTED 801082c: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8010830: 34 02 03 88 mvi r2,904 <== NOT EXECUTED 8010834: fb ff f4 7a calli 800da1c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010838: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801083c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010840: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010844: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010848: 38 63 2e 00 ori r3,r3,0x2e00 <== NOT EXECUTED 801084c: 38 84 2d 68 ori r4,r4,0x2d68 <== NOT EXECUTED 8010850: 34 02 03 8c mvi r2,908 <== NOT EXECUTED 8010854: fb ff f4 72 calli 800da1c <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 8010858: fb ff ff 4d calli 801058c <== NOT EXECUTED 801085c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 8010860: 44 20 ff ce be r1,r0,8010798 <== NOT EXECUTED return 0; info->triply_indirect = p; 8010864: 59 61 00 60 sw (r11+96),r1 <== NOT EXECUTED 8010868: e3 ff ff b5 bi 801073c <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 801086c: fb ff ff 48 calli 801058c <== NOT EXECUTED 8010870: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p1 ) 8010874: 44 20 ff c9 be r1,r0,8010798 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 8010878: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED 801087c: e3 ff ff b6 bi 8010754 <== NOT EXECUTED 08011420 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 8011420: 37 9c ff cc addi sp,sp,-52 8011424: 5b 8b 00 28 sw (sp+40),r11 8011428: 5b 8c 00 24 sw (sp+36),r12 801142c: 5b 8d 00 20 sw (sp+32),r13 8011430: 5b 8e 00 1c sw (sp+28),r14 8011434: 5b 8f 00 18 sw (sp+24),r15 8011438: 5b 90 00 14 sw (sp+20),r16 801143c: 5b 91 00 10 sw (sp+16),r17 8011440: 5b 92 00 0c sw (sp+12),r18 8011444: 5b 93 00 08 sw (sp+8),r19 8011448: 5b 9d 00 04 sw (sp+4),ra 801144c: b8 20 80 00 mv r16,r1 8011450: b8 40 68 00 mv r13,r2 8011454: b8 60 90 00 mv r18,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 8011458: 44 20 00 a5 be r1,r0,80116ec if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 801145c: 28 21 00 4c lw r1,(r1+76) 8011460: 34 03 00 01 mvi r3,1 8011464: 34 22 ff fb addi r2,r1,-5 8011468: 50 62 00 09 bgeu r3,r2,801148c 801146c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011470: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011474: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011478: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 801147c: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 8011480: 38 84 2d ac ori r4,r4,0x2dac <== NOT EXECUTED 8011484: 34 02 02 51 mvi r2,593 <== NOT EXECUTED 8011488: fb ff f1 65 calli 800da1c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 801148c: 46 40 00 88 be r18,r0,80116ac /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 8011490: 44 80 00 72 be r4,r0,8011658 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 8011494: 34 02 00 06 mvi r2,6 8011498: 44 22 00 56 be r1,r2,80115f0 * 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 ) 801149c: 2a 01 00 50 lw r1,(r16+80) 80114a0: 2a 0c 00 54 lw r12,(r16+84) 80114a4: b4 8d 10 00 add r2,r4,r13 80114a8: 48 01 00 04 bg r0,r1,80114b8 80114ac: 44 01 00 65 be r0,r1,8011640 80114b0: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 80114b4: e0 00 00 02 bi 80114bc <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 80114b8: c9 8d 60 00 sub r12,r12,r13 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80114bc: 78 0f 08 02 mvhi r15,0x802 80114c0: 39 ef 46 4c ori r15,r15,0x464c 80114c4: 29 eb 00 00 lw r11,(r15+0) 80114c8: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 80114cc: ba 40 70 00 mv r14,r18 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80114d0: b9 60 10 00 mv r2,r11 80114d4: f8 00 40 77 calli 80216b0 <__modsi3> 80114d8: b8 20 98 00 mv r19,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 80114dc: b9 60 10 00 mv r2,r11 80114e0: b9 a0 08 00 mv r1,r13 80114e4: f8 00 40 40 calli 80215e4 <__divsi3> 80114e8: b8 20 68 00 mv r13,r1 if ( start_offset ) { 80114ec: ba 60 88 00 mv r17,r19 80114f0: 46 60 00 13 be r19,r0,801153c 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 ); 80114f4: ba 00 08 00 mv r1,r16 80114f8: b9 a0 10 00 mv r2,r13 80114fc: 34 03 00 00 mvi r3,0 8011500: fb ff fc 33 calli 80105cc assert( block_ptr ); 8011504: 44 20 00 72 be r1,r0,80116cc */ 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; 8011508: c9 73 58 00 sub r11,r11,r19 801150c: b9 80 88 00 mv r17,r12 8011510: 51 6c 00 02 bgeu r11,r12,8011518 8011514: b9 60 88 00 mv r17,r11 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 ); 8011518: 28 22 00 00 lw r2,(r1+0) 801151c: ba 20 18 00 mv r3,r17 8011520: ba 40 08 00 mv r1,r18 8011524: b4 53 10 00 add r2,r2,r19 8011528: f8 00 06 f4 calli 80130f8 dest += to_copy; block++; my_length -= to_copy; 801152c: 29 eb 00 00 lw r11,(r15+0) block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 8011530: b6 51 70 00 add r14,r18,r17 block++; 8011534: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8011538: c9 91 60 00 sub r12,r12,r17 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 801153c: 55 6c 00 10 bgu r11,r12,801157c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011540: ba 00 08 00 mv r1,r16 8011544: b9 a0 10 00 mv r2,r13 8011548: 34 03 00 00 mvi r3,0 801154c: fb ff fc 20 calli 80105cc assert( block_ptr ); 8011550: 44 20 00 47 be r1,r0,801166c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 8011554: 28 22 00 00 lw r2,(r1+0) 8011558: b9 60 18 00 mv r3,r11 801155c: b9 c0 08 00 mv r1,r14 8011560: f8 00 06 e6 calli 80130f8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011564: 29 e1 00 00 lw r1,(r15+0) if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 8011568: c9 8b 60 00 sub r12,r12,r11 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 801156c: b5 cb 70 00 add r14,r14,r11 block++; 8011570: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; copied += to_copy; 8011574: b6 2b 88 00 add r17,r17,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011578: 51 81 ff f2 bgeu r12,r1,8011540 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 801157c: 45 80 00 0b be r12,r0,80115a8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011580: b9 a0 10 00 mv r2,r13 8011584: ba 00 08 00 mv r1,r16 8011588: 34 03 00 00 mvi r3,0 801158c: fb ff fc 10 calli 80105cc assert( block_ptr ); 8011590: 44 20 00 3f be r1,r0,801168c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 8011594: 28 22 00 00 lw r2,(r1+0) 8011598: b9 80 18 00 mv r3,r12 801159c: b9 c0 08 00 mv r1,r14 80115a0: f8 00 06 d6 calli 80130f8 copied += my_length; 80115a4: b6 2c 88 00 add r17,r17,r12 } IMFS_update_atime( the_jnode ); 80115a8: 37 81 00 30 addi r1,sp,48 80115ac: 34 02 00 00 mvi r2,0 80115b0: fb ff c5 b0 calli 8002c70 80115b4: 2b 81 00 30 lw r1,(sp+48) 80115b8: 5a 01 00 40 sw (r16+64),r1 return copied; 80115bc: ba 20 08 00 mv r1,r17 } 80115c0: 2b 9d 00 04 lw ra,(sp+4) 80115c4: 2b 8b 00 28 lw r11,(sp+40) 80115c8: 2b 8c 00 24 lw r12,(sp+36) 80115cc: 2b 8d 00 20 lw r13,(sp+32) 80115d0: 2b 8e 00 1c lw r14,(sp+28) 80115d4: 2b 8f 00 18 lw r15,(sp+24) 80115d8: 2b 90 00 14 lw r16,(sp+20) 80115dc: 2b 91 00 10 lw r17,(sp+16) 80115e0: 2b 92 00 0c lw r18,(sp+12) 80115e4: 2b 93 00 08 lw r19,(sp+8) 80115e8: 37 9c 00 34 addi sp,sp,52 80115ec: c3 a0 00 00 ret if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 80115f0: 2a 0b 00 54 lw r11,(r16+84) <== NOT EXECUTED 80115f4: 2a 0c 00 50 lw r12,(r16+80) <== NOT EXECUTED 80115f8: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 80115fc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8011600: 5b 84 00 2c sw (sp+44),r4 <== NOT EXECUTED 8011604: c9 6d 88 00 sub r17,r11,r13 <== NOT EXECUTED 8011608: fb ff bd c7 calli 8000d24 <__ashrsi3> <== NOT EXECUTED 801160c: f6 2b 10 00 cmpgu r2,r17,r11 <== NOT EXECUTED 8011610: c9 81 08 00 sub r1,r12,r1 <== NOT EXECUTED 8011614: c8 22 08 00 sub r1,r1,r2 <== NOT EXECUTED 8011618: 2b 84 00 2c lw r4,(sp+44) <== 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; 801161c: 2a 02 00 58 lw r2,(r16+88) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 8011620: 48 01 00 03 bg r0,r1,801162c <== NOT EXECUTED 8011624: 44 01 00 0a be r0,r1,801164c <== NOT EXECUTED 8011628: b8 80 88 00 mv r17,r4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 801162c: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8011630: ba 40 08 00 mv r1,r18 <== NOT EXECUTED 8011634: ba 20 18 00 mv r3,r17 <== NOT EXECUTED 8011638: f8 00 06 b0 calli 80130f8 <== NOT EXECUTED 801163c: e3 ff ff db bi 80115a8 <== 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 ) 8011640: 54 4c ff 9e bgu r2,r12,80114b8 8011644: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 8011648: e3 ff ff 9d bi 80114bc <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 801164c: 54 91 ff f8 bgu r4,r17,801162c <== NOT EXECUTED 8011650: b8 80 88 00 mv r17,r4 <== NOT EXECUTED 8011654: e3 ff ff f6 bi 801162c <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 8011658: f8 00 04 02 calli 8012660 <__errno> <== NOT EXECUTED 801165c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011660: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011664: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8011668: e3 ff ff d6 bi 80115c0 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 801166c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011670: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011674: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011678: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 801167c: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 8011680: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 8011684: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED 8011688: fb ff f0 e5 calli 800da1c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 801168c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011690: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011694: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011698: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 801169c: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 80116a0: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 80116a4: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED 80116a8: fb ff f0 dd calli 800da1c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 80116ac: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80116b0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80116b4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80116b8: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80116bc: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 80116c0: 38 84 2d f8 ori r4,r4,0x2df8 <== NOT EXECUTED 80116c4: 34 02 02 5a mvi r2,602 <== NOT EXECUTED 80116c8: fb ff f0 d5 calli 800da1c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 80116cc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80116d0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80116d4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80116d8: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80116dc: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 80116e0: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 80116e4: 34 02 02 96 mvi r2,662 <== NOT EXECUTED 80116e8: fb ff f0 cd calli 800da1c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 80116ec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80116f0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80116f4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80116f8: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80116fc: 38 63 2e 34 ori r3,r3,0x2e34 <== NOT EXECUTED 8011700: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8011704: 34 02 02 4c mvi r2,588 <== NOT EXECUTED 8011708: fb ff f0 c5 calli 800da1c <__assert_func> <== NOT EXECUTED 08010980 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 8010980: 37 9c ff d8 addi sp,sp,-40 8010984: 5b 8b 00 28 sw (sp+40),r11 8010988: 5b 8c 00 24 sw (sp+36),r12 801098c: 5b 8d 00 20 sw (sp+32),r13 8010990: 5b 8e 00 1c sw (sp+28),r14 8010994: 5b 8f 00 18 sw (sp+24),r15 8010998: 5b 90 00 14 sw (sp+20),r16 801099c: 5b 91 00 10 sw (sp+16),r17 80109a0: 5b 92 00 0c sw (sp+12),r18 80109a4: 5b 93 00 08 sw (sp+8),r19 80109a8: 5b 9d 00 04 sw (sp+4),ra 80109ac: b8 20 80 00 mv r16,r1 /* * Perform internal consistency checks */ assert( the_jnode ); 80109b0: 44 20 00 6c be r1,r0,8010b60 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 80109b4: 28 22 00 4c lw r2,(r1+76) 80109b8: 34 01 00 05 mvi r1,5 80109bc: 5c 41 00 71 bne r2,r1,8010b80 /* * 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; 80109c0: 78 0d 08 02 mvhi r13,0x802 80109c4: 39 ad 46 4c ori r13,r13,0x464c 80109c8: 29 a1 00 00 lw r1,(r13+0) 80109cc: 34 02 00 02 mvi r2,2 80109d0: fb ff c0 ad calli 8000c84 <__lshrsi3> 80109d4: b8 20 78 00 mv r15,r1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 80109d8: 2a 01 00 58 lw r1,(r16+88) 80109dc: 44 20 00 04 be r1,r0,80109ec if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 80109e0: 36 01 00 58 addi r1,r16,88 80109e4: b9 e0 10 00 mv r2,r15 80109e8: fb ff ff a6 calli 8010880 } if ( info->doubly_indirect ) { 80109ec: 2a 0e 00 5c lw r14,(r16+92) 80109f0: 45 c0 00 1a be r14,r0,8010a58 for ( i=0 ; i <== NOT EXECUTED 8010a04: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 8010a08: 44 2c 00 11 be r1,r12,8010a4c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 8010a0c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010a10: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8010a14: fb ff c0 74 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8010a18: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8010a1c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8010a20: 44 40 00 03 be r2,r0,8010a2c <== NOT EXECUTED memfile_free_blocks_in_table( 8010a24: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8010a28: fb ff ff 96 calli 8010880 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 8010a40: 51 61 00 03 bgeu r11,r1,8010a4c <== NOT EXECUTED 8010a44: 2a 0e 00 5c lw r14,(r16+92) <== NOT EXECUTED 8010a48: e3 ff ff f1 bi 8010a0c <== 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 ); 8010a4c: 36 01 00 5c addi r1,r16,92 <== NOT EXECUTED 8010a50: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8010a54: fb ff ff 8b calli 8010880 <== NOT EXECUTED } if ( info->triply_indirect ) { 8010a58: 2a 0b 00 60 lw r11,(r16+96) 8010a5c: 45 60 00 2c be r11,r0,8010b0c for ( i=0 ; i <== NOT EXECUTED 8010a70: 44 20 00 24 be r1,r0,8010b00 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 8010a74: 29 6e 00 00 lw r14,(r11+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 8010a78: 34 13 00 00 mvi r19,0 <== NOT EXECUTED 8010a7c: 34 11 00 04 mvi r17,4 <== NOT EXECUTED 8010a80: ba 60 90 00 mv r18,r19 <== NOT EXECUTED 8010a84: 45 d3 00 1f be r14,r19,8010b00 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 8010a94: 44 20 00 12 be r1,r0,8010adc <== NOT EXECUTED 8010a98: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8010a9c: b9 80 58 00 mv r11,r12 <== NOT EXECUTED if ( p[j] ) { 8010aa0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010aa4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8010aa8: fb ff c0 4f calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8010aac: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8010ab0: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8010ab4: 44 40 00 03 be r2,r0,8010ac0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 8010ab8: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8010abc: fb ff ff 71 calli 8010880 <== 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 8010ad4: 54 2b ff f3 bgu r1,r11,8010aa0 <== NOT EXECUTED 8010ad8: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 8010adc: b5 73 08 00 add r1,r11,r19 <== NOT EXECUTED 8010ae0: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8010ae4: fb ff ff 67 calli 8010880 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 8010afc: 54 32 00 11 bgu r1,r18,8010b40 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 8010b00: 36 01 00 60 addi r1,r16,96 <== NOT EXECUTED 8010b04: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8010b08: fb ff ff 5e calli 8010880 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 8010b0c: 34 01 00 00 mvi r1,0 8010b10: 2b 9d 00 04 lw ra,(sp+4) 8010b14: 2b 8b 00 28 lw r11,(sp+40) 8010b18: 2b 8c 00 24 lw r12,(sp+36) 8010b1c: 2b 8d 00 20 lw r13,(sp+32) 8010b20: 2b 8e 00 1c lw r14,(sp+28) 8010b24: 2b 8f 00 18 lw r15,(sp+24) 8010b28: 2b 90 00 14 lw r16,(sp+20) 8010b2c: 2b 91 00 10 lw r17,(sp+16) 8010b30: 2b 92 00 0c lw r18,(sp+12) 8010b34: 2b 93 00 08 lw r19,(sp+8) 8010b38: 37 9c 00 28 addi sp,sp,40 8010b3c: c3 a0 00 00 ret } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 8010b40: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED 8010b44: 36 22 00 04 addi r2,r17,4 <== NOT EXECUTED 8010b48: b5 71 08 00 add r1,r11,r17 <== NOT EXECUTED 8010b4c: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 8010b50: 45 c0 ff ec be r14,r0,8010b00 <== NOT EXECUTED 8010b54: ba 20 98 00 mv r19,r17 <== NOT EXECUTED 8010b58: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 8010b5c: e3 ff ff cb bi 8010a88 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8010b60: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010b64: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010b68: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010b6c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010b70: 38 63 2e 48 ori r3,r3,0x2e48 <== NOT EXECUTED 8010b74: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8010b78: 34 02 01 ee mvi r2,494 <== NOT EXECUTED 8010b7c: fb ff f3 a8 calli 800da1c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010b80: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010b84: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010b88: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010b8c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010b90: 38 63 2e 48 ori r3,r3,0x2e48 <== NOT EXECUTED 8010b94: 38 84 2d 68 ori r4,r4,0x2d68 <== NOT EXECUTED 8010b98: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED 8010b9c: fb ff f3 a0 calli 800da1c <__assert_func> <== NOT EXECUTED 08010928 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 8010928: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 801092c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010930: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8010934: fb ff ff 26 calli 80105cc <== NOT EXECUTED assert( block_ptr ); 8010938: 44 20 00 0a be r1,r0,8010960 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 801093c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED *block_ptr = 0; 8010940: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8010944: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED memfile_free_block( ptr ); 8010948: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 801094c: fb ff ff 05 calli 8010560 <== NOT EXECUTED } return 1; } 8010950: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8010954: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8010958: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 801095c: c3 a0 00 00 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8010960: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010964: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010968: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801096c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010970: 38 63 2e 7c ori r3,r3,0x2e7c <== NOT EXECUTED 8010974: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 8010978: 34 02 01 96 mvi r2,406 <== NOT EXECUTED 801097c: fb ff f4 28 calli 800da1c <__assert_func> <== NOT EXECUTED 0801105c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 801105c: 37 9c ff cc addi sp,sp,-52 8011060: 5b 8b 00 2c sw (sp+44),r11 8011064: 5b 8c 00 28 sw (sp+40),r12 8011068: 5b 8d 00 24 sw (sp+36),r13 801106c: 5b 8e 00 20 sw (sp+32),r14 8011070: 5b 8f 00 1c sw (sp+28),r15 8011074: 5b 90 00 18 sw (sp+24),r16 8011078: 5b 91 00 14 sw (sp+20),r17 801107c: 5b 92 00 10 sw (sp+16),r18 8011080: 5b 93 00 0c sw (sp+12),r19 8011084: 5b 94 00 08 sw (sp+8),r20 8011088: 5b 9d 00 04 sw (sp+4),ra 801108c: b8 20 88 00 mv r17,r1 8011090: b8 40 68 00 mv r13,r2 8011094: b8 60 98 00 mv r19,r3 8011098: b8 80 90 00 mv r18,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 801109c: 44 20 00 79 be r1,r0,8011280 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 80110a0: 28 22 00 4c lw r2,(r1+76) 80110a4: 34 01 00 05 mvi r1,5 80110a8: 5c 41 00 86 bne r2,r1,80112c0 /* * Error check arguments */ assert( source ); 80110ac: 44 60 00 7d be r3,r0,80112a0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 80110b0: 44 80 00 5f be r4,r0,801122c * 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 ) { 80110b4: 2a 21 00 50 lw r1,(r17+80) /* * 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; 80110b8: b4 8d 10 00 add r2,r4,r13 if ( last_byte > the_jnode->info.file.size ) { 80110bc: 48 01 00 51 bg r0,r1,8011200 80110c0: 44 20 00 58 be r1,r0,8011220 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80110c4: 78 10 08 02 mvhi r16,0x802 80110c8: 3a 10 46 4c ori r16,r16,0x464c 80110cc: 2a 0b 00 00 lw r11,(r16+0) 80110d0: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 80110d4: ba 40 60 00 mv r12,r18 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80110d8: b9 60 10 00 mv r2,r11 80110dc: f8 00 41 75 calli 80216b0 <__modsi3> 80110e0: b8 20 a0 00 mv r20,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 80110e4: b9 60 10 00 mv r2,r11 80110e8: b9 a0 08 00 mv r1,r13 80110ec: f8 00 41 3e calli 80215e4 <__divsi3> 80110f0: b8 20 68 00 mv r13,r1 if ( start_offset ) { 80110f4: ba 60 70 00 mv r14,r19 80110f8: ba 80 78 00 mv r15,r20 80110fc: 46 80 00 12 be r20,r0,8011144 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 ); 8011100: ba 20 08 00 mv r1,r17 8011104: b9 a0 10 00 mv r2,r13 8011108: 34 03 00 00 mvi r3,0 801110c: fb ff fd 30 calli 80105cc assert( block_ptr ); 8011110: 44 20 00 74 be r1,r0,80112e0 */ 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; 8011114: c9 74 78 00 sub r15,r11,r20 8011118: 52 4f 00 02 bgeu r18,r15,8011120 801111c: ba 40 78 00 mv r15,r18 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 ); 8011120: 28 21 00 00 lw r1,(r1+0) 8011124: ba 60 10 00 mv r2,r19 8011128: b9 e0 18 00 mv r3,r15 801112c: b4 34 08 00 add r1,r1,r20 8011130: f8 00 07 f2 calli 80130f8 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 8011134: 2a 0b 00 00 lw r11,(r16+0) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 8011138: b6 6f 70 00 add r14,r19,r15 block++; 801113c: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8011140: ca 4f 60 00 sub r12,r18,r15 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011144: 55 6c 00 10 bgu r11,r12,8011184 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011148: ba 20 08 00 mv r1,r17 801114c: b9 a0 10 00 mv r2,r13 8011150: 34 03 00 00 mvi r3,0 8011154: fb ff fd 1e calli 80105cc assert( block_ptr ); 8011158: 44 20 00 3a be r1,r0,8011240 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 ); 801115c: 28 21 00 00 lw r1,(r1+0) 8011160: b9 c0 10 00 mv r2,r14 8011164: b9 60 18 00 mv r3,r11 8011168: f8 00 07 e4 calli 80130f8 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 801116c: 2a 01 00 00 lw r1,(r16+0) fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 8011170: c9 8b 60 00 sub r12,r12,r11 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 8011174: b5 cb 70 00 add r14,r14,r11 block++; 8011178: 35 ad 00 01 addi r13,r13,1 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 801117c: b5 eb 78 00 add r15,r15,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011180: 51 81 ff f2 bgeu r12,r1,8011148 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 8011184: 45 80 00 0b be r12,r0,80111b0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011188: b9 a0 10 00 mv r2,r13 801118c: ba 20 08 00 mv r1,r17 8011190: 34 03 00 00 mvi r3,0 8011194: fb ff fd 0e calli 80105cc assert( block_ptr ); 8011198: 44 20 00 32 be r1,r0,8011260 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 ); 801119c: 28 21 00 00 lw r1,(r1+0) 80111a0: b9 c0 10 00 mv r2,r14 80111a4: b9 80 18 00 mv r3,r12 80111a8: f8 00 07 d4 calli 80130f8 my_length = 0; copied += to_copy; 80111ac: b5 ec 78 00 add r15,r15,r12 } IMFS_mtime_ctime_update( the_jnode ); 80111b0: 37 81 00 30 addi r1,sp,48 80111b4: 34 02 00 00 mvi r2,0 80111b8: fb ff c6 ae calli 8002c70 80111bc: 2b 81 00 30 lw r1,(sp+48) 80111c0: 5a 21 00 48 sw (r17+72),r1 80111c4: 5a 21 00 44 sw (r17+68),r1 return copied; } 80111c8: b9 e0 08 00 mv r1,r15 80111cc: 2b 9d 00 04 lw ra,(sp+4) 80111d0: 2b 8b 00 2c lw r11,(sp+44) 80111d4: 2b 8c 00 28 lw r12,(sp+40) 80111d8: 2b 8d 00 24 lw r13,(sp+36) 80111dc: 2b 8e 00 20 lw r14,(sp+32) 80111e0: 2b 8f 00 1c lw r15,(sp+28) 80111e4: 2b 90 00 18 lw r16,(sp+24) 80111e8: 2b 91 00 14 lw r17,(sp+20) 80111ec: 2b 92 00 10 lw r18,(sp+16) 80111f0: 2b 93 00 0c lw r19,(sp+12) 80111f4: 2b 94 00 08 lw r20,(sp+8) 80111f8: 37 9c 00 34 addi sp,sp,52 80111fc: c3 a0 00 00 ret * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 8011200: ba 20 08 00 mv r1,r17 8011204: fb ff fe d4 calli 8010d54 if ( status ) 8011208: 44 20 ff af be r1,r0,80110c4 rtems_set_errno_and_return_minus_one( ENOSPC ); 801120c: f8 00 05 15 calli 8012660 <__errno> <== NOT EXECUTED 8011210: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8011214: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011218: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 801121c: e3 ff ff eb bi 80111c8 <== 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 ) { 8011220: 2a 21 00 54 lw r1,(r17+84) 8011224: 54 41 ff f7 bgu r2,r1,8011200 8011228: e3 ff ff a7 bi 80110c4 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 801122c: f8 00 05 0d calli 8012660 <__errno> <== NOT EXECUTED 8011230: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011234: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011238: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 801123c: e3 ff ff e3 bi 80111c8 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011240: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011244: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011248: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801124c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8011250: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 8011254: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 8011258: 34 02 03 30 mvi r2,816 <== NOT EXECUTED 801125c: fb ff f1 f0 calli 800da1c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011260: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011264: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011268: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801126c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8011270: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 8011274: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 8011278: 34 02 03 46 mvi r2,838 <== NOT EXECUTED 801127c: fb ff f1 e8 calli 800da1c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8011280: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011284: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011288: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801128c: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8011290: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 8011294: 38 84 2d 5c ori r4,r4,0x2d5c <== NOT EXECUTED 8011298: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED 801129c: fb ff f1 e0 calli 800da1c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 80112a0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80112a4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80112a8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80112ac: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80112b0: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 80112b4: 38 84 2d a4 ori r4,r4,0x2da4 <== NOT EXECUTED 80112b8: 34 02 02 ef mvi r2,751 <== NOT EXECUTED 80112bc: fb ff f1 d8 calli 800da1c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 80112c0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80112c4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80112c8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80112cc: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80112d0: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 80112d4: 38 84 2d 68 ori r4,r4,0x2d68 <== NOT EXECUTED 80112d8: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED 80112dc: fb ff f1 d0 calli 800da1c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 80112e0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80112e4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80112e8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80112ec: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 80112f0: 38 63 2e 20 ori r3,r3,0x2e20 <== NOT EXECUTED 80112f4: 38 84 2d 98 ori r4,r4,0x2d98 <== NOT EXECUTED 80112f8: 34 02 03 1c mvi r2,796 <== NOT EXECUTED 80112fc: fb ff f1 c8 calli 800da1c <__assert_func> <== NOT EXECUTED 0800739c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 800739c: 37 9c ff a4 addi sp,sp,-92 80073a0: 5b 8b 00 1c sw (sp+28),r11 80073a4: 5b 8c 00 18 sw (sp+24),r12 80073a8: 5b 8d 00 14 sw (sp+20),r13 80073ac: 5b 8e 00 10 sw (sp+16),r14 80073b0: 5b 8f 00 0c sw (sp+12),r15 80073b4: 5b 90 00 08 sw (sp+8),r16 80073b8: 5b 9d 00 04 sw (sp+4),ra 80073bc: b8 40 58 00 mv r11,r2 80073c0: b8 60 80 00 mv r16,r3 80073c4: b8 80 78 00 mv r15,r4 80073c8: b8 a0 70 00 mv r14,r5 80073cc: b8 20 68 00 mv r13,r1 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 ); 80073d0: 37 8c 00 20 addi r12,sp,32 80073d4: f8 00 16 cb calli 800cf00 80073d8: b8 20 10 00 mv r2,r1 80073dc: b9 80 18 00 mv r3,r12 80073e0: b9 a0 08 00 mv r1,r13 80073e4: 37 84 00 5c addi r4,sp,92 80073e8: fb ff ff 4b calli 8007114 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 80073ec: 21 66 f0 00 andi r6,r11,0xf000 80073f0: 34 02 40 00 mvi r2,16384 80073f4: 44 c2 00 25 be r6,r2,8007488 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 80073f8: 38 01 80 00 mvu r1,0x8000 80073fc: 34 07 00 05 mvi r7,5 8007400: 44 c1 00 08 be r6,r1,8007420 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8007404: 64 c2 20 00 cmpei r2,r6,8192 8007408: 64 c1 60 00 cmpei r1,r6,24576 800740c: b8 41 08 00 or r1,r2,r1 8007410: 44 20 00 16 be r1,r0,8007468 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8007414: 5b 90 00 44 sw (sp+68),r16 8007418: 5b 8f 00 48 sw (sp+72),r15 800741c: 34 07 00 02 mvi r7,2 * 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( 8007420: b8 e0 10 00 mv r2,r7 8007424: b9 c0 08 00 mv r1,r14 8007428: b9 80 18 00 mv r3,r12 800742c: b9 60 20 00 mv r4,r11 8007430: 37 85 00 44 addi r5,sp,68 8007434: f8 00 0d 00 calli 800a834 new_name, mode, &info ); if ( !new_node ) 8007438: 34 02 00 00 mvi r2,0 800743c: 44 22 00 15 be r1,r2,8007490 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8007440: b8 40 08 00 mv r1,r2 8007444: 2b 9d 00 04 lw ra,(sp+4) 8007448: 2b 8b 00 1c lw r11,(sp+28) 800744c: 2b 8c 00 18 lw r12,(sp+24) 8007450: 2b 8d 00 14 lw r13,(sp+20) 8007454: 2b 8e 00 10 lw r14,(sp+16) 8007458: 2b 8f 00 0c lw r15,(sp+12) 800745c: 2b 90 00 08 lw r16,(sp+8) 8007460: 37 9c 00 5c addi sp,sp,92 8007464: c3 a0 00 00 ret type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8007468: 34 01 10 00 mvi r1,4096 800746c: 34 07 00 07 mvi r7,7 8007470: 44 c1 ff ec be r6,r1,8007420 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8007474: f8 00 11 d3 calli 800bbc0 <__errno> <== NOT EXECUTED 8007478: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800747c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007480: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8007484: e3 ff ff ef bi 8007440 <== NOT EXECUTED 8007488: 34 07 00 01 mvi r7,1 800748c: e3 ff ff e5 bi 8007420 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8007490: f8 00 11 cc calli 800bbc0 <__errno> <== NOT EXECUTED 8007494: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8007498: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800749c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80074a0: e3 ff ff e8 bi 8007440 <== NOT EXECUTED 08002230 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8002230: 37 9c ff fc addi sp,sp,-4 8002234: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8002238: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 800223c: 34 03 00 01 mvi r3,1 8002240: 28 44 00 4c lw r4,(r2+76) 8002244: 5c 83 00 06 bne r4,r3,800225c /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 8002248: 58 41 00 5c sw (r2+92),r1 800224c: 34 01 00 00 mvi r1,0 return 0; } 8002250: 2b 9d 00 04 lw ra,(sp+4) 8002254: 37 9c 00 04 addi sp,sp,4 8002258: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 800225c: f8 00 41 01 calli 8012660 <__errno> <== NOT EXECUTED 8002260: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002264: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002268: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800226c: e3 ff ff f9 bi 8002250 <== NOT EXECUTED 08002c68 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 8002c68: 37 9c ff ec addi sp,sp,-20 8002c6c: 5b 8b 00 14 sw (sp+20),r11 8002c70: 5b 8c 00 10 sw (sp+16),r12 8002c74: 5b 8d 00 0c sw (sp+12),r13 8002c78: 5b 8e 00 08 sw (sp+8),r14 8002c7c: 5b 9d 00 04 sw (sp+4),ra 8002c80: b8 20 60 00 mv r12,r1 assert( the_jnode ); 8002c84: 44 20 00 72 be r1,r0,8002e4c fprintf(stdout, "%s", the_jnode->name ); 8002c88: 78 0b 08 02 mvhi r11,0x802 8002c8c: 39 6b 71 90 ori r11,r11,0x7190 8002c90: 29 62 00 00 lw r2,(r11+0) 8002c94: 34 21 00 0c addi r1,r1,12 8002c98: 28 42 00 08 lw r2,(r2+8) 8002c9c: f8 00 3a b7 calli 8011778 switch( the_jnode->type ) { 8002ca0: 29 8d 00 4c lw r13,(r12+76) 8002ca4: 34 01 00 07 mvi r1,7 8002ca8: 55 a1 00 09 bgu r13,r1,8002ccc 8002cac: 78 0e 08 02 mvhi r14,0x802 8002cb0: b9 a0 08 00 mv r1,r13 8002cb4: 34 02 00 02 mvi r2,2 8002cb8: fb ff fd cd calli 80023ec <__ashlsi3> 8002cbc: 39 ce 4d 40 ori r14,r14,0x4d40 8002cc0: b5 c1 08 00 add r1,r14,r1 8002cc4: 28 21 00 00 lw r1,(r1+0) 8002cc8: c0 20 00 00 b r1 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 8002ccc: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002cd0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002cd4: 38 42 4c 4c ori r2,r2,0x4c4c <== NOT EXECUTED 8002cd8: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002cdc: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8002ce0: f8 00 3a 2f calli 801159c <== NOT EXECUTED assert(0); 8002ce4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ce8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002cec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002cf0: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002cf4: 38 63 4d 74 ori r3,r3,0x4d74 <== NOT EXECUTED 8002cf8: 38 84 4c 34 ori r4,r4,0x4c34 <== NOT EXECUTED 8002cfc: 34 02 00 6c mvi r2,108 <== NOT EXECUTED 8002d00: f8 00 02 d5 calli 8003854 <__assert_func> <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 8002d04: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002d08: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d0c: 34 03 00 12 mvi r3,18 <== NOT EXECUTED 8002d10: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002d14: 38 21 4c 38 ori r1,r1,0x4c38 <== NOT EXECUTED 8002d18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002d1c: f8 00 3d c8 calli 801243c <== NOT EXECUTED assert(0); 8002d20: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d24: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002d28: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002d2c: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002d30: 38 63 4d 74 ori r3,r3,0x4d74 <== NOT EXECUTED 8002d34: 38 84 4c 34 ori r4,r4,0x4c34 <== NOT EXECUTED 8002d38: 34 02 00 67 mvi r2,103 <== NOT EXECUTED 8002d3c: f8 00 02 c6 calli 8003854 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 8002d40: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002d44: 29 84 00 58 lw r4,(r12+88) <== NOT EXECUTED 8002d48: 29 83 00 54 lw r3,(r12+84) <== NOT EXECUTED 8002d4c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002d50: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002d54: 38 42 4c 04 ori r2,r2,0x4c04 <== NOT EXECUTED 8002d58: f8 00 3a 11 calli 801159c <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 8002d5c: 78 01 08 02 mvhi r1,0x802 8002d60: 38 21 46 04 ori r1,r1,0x4604 8002d64: f8 00 42 80 calli 8013764 } 8002d68: 2b 9d 00 04 lw ra,(sp+4) 8002d6c: 2b 8b 00 14 lw r11,(sp+20) 8002d70: 2b 8c 00 10 lw r12,(sp+16) 8002d74: 2b 8d 00 0c lw r13,(sp+12) 8002d78: 2b 8e 00 08 lw r14,(sp+8) 8002d7c: 37 9c 00 14 addi sp,sp,20 8002d80: c3 a0 00 00 ret the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 8002d84: 29 61 00 00 lw r1,(r11+0) 8002d88: 29 83 00 54 lw r3,(r12+84) 8002d8c: 78 02 08 02 mvhi r2,0x802 8002d90: 28 21 00 08 lw r1,(r1+8) 8002d94: 38 42 4c 14 ori r2,r2,0x4c14 8002d98: f8 00 3a 01 calli 801159c (uint32_t)the_jnode->info.file.size ); #endif break; 8002d9c: e3 ff ff f0 bi 8002d5c fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 8002da0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002da4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002da8: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8002dac: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002db0: 38 21 4c 20 ori r1,r1,0x4c20 <== NOT EXECUTED 8002db4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002db8: f8 00 3d a1 calli 801243c <== NOT EXECUTED assert(0); 8002dbc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002dc0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002dc4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002dc8: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002dcc: 38 63 4d 74 ori r3,r3,0x4d74 <== NOT EXECUTED 8002dd0: 38 84 4c 34 ori r4,r4,0x4c34 <== NOT EXECUTED 8002dd4: 34 02 00 62 mvi r2,98 <== NOT EXECUTED 8002dd8: f8 00 02 9f calli 8003854 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 8002ddc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002de0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002de4: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8002de8: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002dec: 38 21 4c 20 ori r1,r1,0x4c20 <== NOT EXECUTED 8002df0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002df4: f8 00 3d 92 calli 801243c <== NOT EXECUTED assert(0); 8002df8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002dfc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002e00: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002e04: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002e08: 38 63 4d 74 ori r3,r3,0x4d74 <== NOT EXECUTED 8002e0c: 38 84 4c 34 ori r4,r4,0x4c34 <== NOT EXECUTED 8002e10: 34 02 00 5d mvi r2,93 <== NOT EXECUTED 8002e14: f8 00 02 90 calli 8003854 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 8002e18: 29 61 00 00 lw r1,(r11+0) 8002e1c: 29 84 00 54 lw r4,(r12+84) 8002e20: 29 83 00 50 lw r3,(r12+80) 8002e24: 28 21 00 08 lw r1,(r1+8) 8002e28: 78 02 08 02 mvhi r2,0x802 8002e2c: 38 42 4b f0 ori r2,r2,0x4bf0 8002e30: f8 00 39 db calli 801159c the_jnode->info.device.major, the_jnode->info.device.minor ); break; 8002e34: e3 ff ff ca bi 8002d5c assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 8002e38: 29 62 00 00 lw r2,(r11+0) 8002e3c: 34 01 00 2f mvi r1,47 8002e40: 28 42 00 08 lw r2,(r2+8) 8002e44: f8 00 39 f7 calli 8011620 break; 8002e48: e3 ff ff c5 bi 8002d5c void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 8002e4c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002e50: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002e54: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002e58: 38 21 4b 98 ori r1,r1,0x4b98 <== NOT EXECUTED 8002e5c: 38 63 4d 74 ori r3,r3,0x4d74 <== NOT EXECUTED 8002e60: 38 84 4b e4 ori r4,r4,0x4be4 <== NOT EXECUTED 8002e64: 34 02 00 38 mvi r2,56 <== NOT EXECUTED 8002e68: f8 00 02 7b calli 8003854 <__assert_func> <== NOT EXECUTED 0800227c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 800227c: 37 9c ff fc addi sp,sp,-4 8002280: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; int i; node = loc->node_access; 8002284: 28 25 00 00 lw r5,(r1+0) if ( node->type != IMFS_SYM_LINK ) 8002288: 34 01 00 04 mvi r1,4 800228c: 28 a4 00 4c lw r4,(r5+76) 8002290: 5c 81 00 15 bne r4,r1,80022e4 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 8002294: 44 60 00 12 be r3,r0,80022dc 8002298: 28 a4 00 50 lw r4,(r5+80) int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 800229c: 34 06 00 00 mvi r6,0 80022a0: b8 c0 08 00 mv r1,r6 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 80022a4: 40 84 00 00 lbu r4,(r4+0) 80022a8: 44 86 00 0d be r4,r6,80022dc buf[i] = node->info.sym_link.name[i]; 80022ac: b4 46 30 00 add r6,r2,r6 80022b0: 30 c4 00 00 sb (r6+0),r4 node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 80022b4: 34 21 00 01 addi r1,r1,1 80022b8: b8 20 30 00 mv r6,r1 80022bc: 50 23 00 05 bgeu r1,r3,80022d0 80022c0: 28 a4 00 50 lw r4,(r5+80) 80022c4: b4 81 20 00 add r4,r4,r1 80022c8: 40 84 00 00 lbu r4,(r4+0) 80022cc: 5c 80 ff f8 bne r4,r0,80022ac buf[i] = node->info.sym_link.name[i]; return i; } 80022d0: 2b 9d 00 04 lw ra,(sp+4) 80022d4: 37 9c 00 04 addi sp,sp,4 80022d8: c3 a0 00 00 ret 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++ ) 80022dc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80022e0: e3 ff ff fc bi 80022d0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 80022e4: f8 00 40 df calli 8012660 <__errno> <== NOT EXECUTED 80022e8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80022ec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80022f0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80022f4: e3 ff ff f7 bi 80022d0 <== NOT EXECUTED 080022f8 : 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 */ ) { 80022f8: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80022fc: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8002300: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8002304: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 8002308: 28 4b 00 00 lw r11,(r2+0) <== 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 */ ) { 800230c: b8 60 60 00 mv r12,r3 <== 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 ); 8002310: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8002314: 35 61 00 0c addi r1,r11,12 <== NOT EXECUTED 8002318: 34 03 00 20 mvi r3,32 <== NOT EXECUTED 800231c: f8 00 45 ad calli 80139d0 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 8002320: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 8002324: 44 20 00 03 be r1,r0,8002330 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8002328: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800232c: f8 00 0b e8 calli 80052cc <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 8002330: 29 83 00 00 lw r3,(r12+0) <== 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 ); 8002334: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8002338: 34 61 00 50 addi r1,r3,80 <== NOT EXECUTED the_jnode->Parent = new_parent; 800233c: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 8002340: f8 00 0b d7 calli 800529c <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 8002344: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8002348: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800234c: f8 00 02 49 calli 8002c70 <== NOT EXECUTED 8002350: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8002354: 59 61 00 48 sw (r11+72),r1 <== NOT EXECUTED return 0; } 8002358: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800235c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002360: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002364: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002368: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800236c: c3 a0 00 00 ret <== NOT EXECUTED 080074b0 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 80074b0: 37 9c ff ec addi sp,sp,-20 80074b4: 5b 8b 00 0c sw (sp+12),r11 80074b8: 5b 8c 00 08 sw (sp+8),r12 80074bc: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 80074c0: 28 4b 00 00 lw r11,(r2+0) int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 80074c4: b8 40 60 00 mv r12,r2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 80074c8: 29 61 00 08 lw r1,(r11+8) 80074cc: 44 20 00 05 be r1,r0,80074e0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 80074d0: b9 60 08 00 mv r1,r11 80074d4: f8 00 05 2a calli 800897c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 80074d8: 34 01 00 00 mvi r1,0 80074dc: 59 61 00 08 sw (r11+8),r1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 80074e0: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 80074e4: 34 02 00 00 mvi r2,0 80074e8: 37 81 00 10 addi r1,sp,16 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 80074ec: 34 63 ff ff addi r3,r3,-1 80074f0: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 80074f4: f8 00 01 43 calli 8007a00 80074f8: 2b 81 00 10 lw r1,(sp+16) 80074fc: 59 61 00 48 sw (r11+72),r1 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 8007500: b9 60 08 00 mv r1,r11 8007504: f8 00 01 88 calli 8007b24 8007508: 5c 20 00 0e bne r1,r0,8007540 800750c: 2d 62 00 34 lhu r2,(r11+52) 8007510: 5c 41 00 0c bne r2,r1,8007540 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8007514: 78 01 08 01 mvhi r1,0x801 8007518: 38 21 c1 10 ori r1,r1,0xc110 800751c: 28 21 00 00 lw r1,(r1+0) 8007520: 29 83 00 00 lw r3,(r12+0) 8007524: 28 24 00 04 lw r4,(r1+4) 8007528: 44 83 00 10 be r4,r3,8007568 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 800752c: 29 62 00 4c lw r2,(r11+76) 8007530: 34 01 00 04 mvi r1,4 8007534: 44 41 00 09 be r2,r1,8007558 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 8007538: b9 60 08 00 mv r1,r11 800753c: f8 00 00 b3 calli 8007808 } return 0; } 8007540: 34 01 00 00 mvi r1,0 8007544: 2b 9d 00 04 lw ra,(sp+4) 8007548: 2b 8b 00 0c lw r11,(sp+12) 800754c: 2b 8c 00 08 lw r12,(sp+8) 8007550: 37 9c 00 14 addi sp,sp,20 8007554: c3 a0 00 00 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 8007558: 29 61 00 50 lw r1,(r11+80) 800755c: 44 20 ff f7 be r1,r0,8007538 free( (void*) the_jnode->info.sym_link.name ); 8007560: f8 00 00 aa calli 8007808 8007564: e3 ff ff f5 bi 8007538 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 8007568: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 800756c: e3 ff ff f0 bi 800752c <== NOT EXECUTED 08007570 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8007570: 37 9c ff f0 addi sp,sp,-16 8007574: 5b 8b 00 10 sw (sp+16),r11 8007578: 5b 8c 00 0c sw (sp+12),r12 800757c: 5b 8d 00 08 sw (sp+8),r13 8007580: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8007584: 28 2b 00 00 lw r11,(r1+0) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8007588: b8 40 60 00 mv r12,r2 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 800758c: 34 02 00 07 mvi r2,7 8007590: 29 61 00 4c lw r1,(r11+76) 8007594: 54 22 00 26 bgu r1,r2,800762c 8007598: 78 0d 08 01 mvhi r13,0x801 800759c: 34 02 00 02 mvi r2,2 80075a0: fb ff e3 14 calli 80001f0 <__ashlsi3> 80075a4: 39 ad b3 34 ori r13,r13,0xb334 80075a8: b5 a1 08 00 add r1,r13,r1 80075ac: 28 21 00 00 lw r1,(r1+0) 80075b0: c0 20 00 00 b r1 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 80075b4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80075b8: 59 81 00 20 sw (r12+32),r1 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 80075bc: 29 62 00 38 lw r2,(r11+56) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 80075c0: 2d 61 00 34 lhu r1,(r11+52) buf->st_ino = the_jnode->st_ino; 80075c4: 59 82 00 08 sw (r12+8),r2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 80075c8: 29 62 00 30 lw r2,(r11+48) buf->st_nlink = the_jnode->st_nlink; 80075cc: 0d 81 00 10 sh (r12+16),r1 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; 80075d0: 29 61 00 40 lw r1,(r11+64) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 80075d4: 59 82 00 0c sw (r12+12),r2 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 80075d8: 2d 62 00 3c lhu r2,(r11+60) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 80075dc: 59 81 00 24 sw (r12+36),r1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80075e0: 34 01 00 00 mvi r1,0 } 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; 80075e4: 0d 82 00 12 sh (r12+18),r2 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 80075e8: 29 62 00 44 lw r2,(r11+68) 80075ec: 59 82 00 2c sw (r12+44),r2 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; 80075f0: 2d 62 00 3e lhu r2,(r11+62) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80075f4: 29 6b 00 48 lw r11,(r11+72) 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; 80075f8: 0d 82 00 14 sh (r12+20),r2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80075fc: 59 8b 00 34 sw (r12+52),r11 return 0; } 8007600: 2b 9d 00 04 lw ra,(sp+4) 8007604: 2b 8b 00 10 lw r11,(sp+16) 8007608: 2b 8c 00 0c lw r12,(sp+12) 800760c: 2b 8d 00 08 lw r13,(sp+8) 8007610: 37 9c 00 10 addi sp,sp,16 8007614: c3 a0 00 00 ret switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8007618: 29 61 00 54 lw r1,(r11+84) 800761c: 29 62 00 50 lw r2,(r11+80) 8007620: 59 81 00 1c sw (r12+28),r1 8007624: 59 82 00 18 sw (r12+24),r2 break; 8007628: e3 ff ff e5 bi 80075bc case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 800762c: f8 00 11 65 calli 800bbc0 <__errno> <== NOT EXECUTED 8007630: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007634: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007638: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 800763c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007640: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8007644: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8007648: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800764c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8007650: c3 a0 00 00 ret <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8007654: 29 61 00 54 lw r1,(r11+84) 8007658: 59 81 00 20 sw (r12+32),r1 break; 800765c: e3 ff ff d8 bi 80075bc 08002370 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8002370: 37 9c ff ac addi sp,sp,-84 8002374: 5b 8b 00 14 sw (sp+20),r11 8002378: 5b 8c 00 10 sw (sp+16),r12 800237c: 5b 8d 00 0c sw (sp+12),r13 8002380: 5b 8e 00 08 sw (sp+8),r14 8002384: 5b 9d 00 04 sw (sp+4),ra 8002388: b8 20 70 00 mv r14,r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 800238c: b8 60 08 00 mv r1,r3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8002390: b8 60 58 00 mv r11,r3 8002394: b8 40 68 00 mv r13,r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8002398: 37 8c 00 18 addi r12,sp,24 800239c: f8 00 45 62 calli 8013924 80023a0: b8 20 10 00 mv r2,r1 80023a4: b9 80 18 00 mv r3,r12 80023a8: 37 84 00 54 addi r4,sp,84 80023ac: b9 60 08 00 mv r1,r11 80023b0: f8 00 2c e0 calli 800d730 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 80023b4: b9 a0 08 00 mv r1,r13 80023b8: f8 00 45 38 calli 8013898 80023bc: 5b 81 00 3c sw (sp+60),r1 if (info.sym_link.name == NULL) { 80023c0: 44 20 00 13 be r1,r0,800240c * 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( 80023c4: 34 02 00 04 mvi r2,4 80023c8: b9 c0 08 00 mv r1,r14 80023cc: b9 80 18 00 mv r3,r12 80023d0: 38 04 a1 ff mvu r4,0xa1ff 80023d4: 37 85 00 3c addi r5,sp,60 80023d8: f8 00 28 dc calli 800c748 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 80023dc: 34 02 00 00 mvi r2,0 80023e0: 44 22 00 09 be r1,r2,8002404 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 80023e4: b8 40 08 00 mv r1,r2 80023e8: 2b 9d 00 04 lw ra,(sp+4) 80023ec: 2b 8b 00 14 lw r11,(sp+20) 80023f0: 2b 8c 00 10 lw r12,(sp+16) 80023f4: 2b 8d 00 0c lw r13,(sp+12) 80023f8: 2b 8e 00 08 lw r14,(sp+8) 80023fc: 37 9c 00 54 addi sp,sp,84 8002400: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 8002404: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8002408: f8 00 01 ec calli 8002bb8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 800240c: f8 00 40 95 calli 8012660 <__errno> <== NOT EXECUTED 8002410: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8002414: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002418: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 800241c: e3 ff ff f2 bi 80023e4 <== NOT EXECUTED 08002420 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 8002420: 37 9c ff d0 addi sp,sp,-48 8002424: 5b 8b 00 14 sw (sp+20),r11 8002428: 5b 8c 00 10 sw (sp+16),r12 800242c: 5b 8d 00 0c sw (sp+12),r13 8002430: 5b 8e 00 08 sw (sp+8),r14 8002434: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 8002438: 28 4c 00 00 lw r12,(r2+0) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 800243c: b8 40 58 00 mv r11,r2 8002440: b8 20 68 00 mv r13,r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 8002444: 29 82 00 4c lw r2,(r12+76) 8002448: 34 01 00 03 mvi r1,3 800244c: 44 41 00 0f be r2,r1,8002488 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 8002450: 29 63 00 08 lw r3,(r11+8) 8002454: b9 60 10 00 mv r2,r11 8002458: b9 a0 08 00 mv r1,r13 800245c: 28 63 00 34 lw r3,(r3+52) 8002460: d8 60 00 00 call r3 8002464: b8 20 10 00 mv r2,r1 return result; } 8002468: b8 40 08 00 mv r1,r2 800246c: 2b 9d 00 04 lw ra,(sp+4) 8002470: 2b 8b 00 14 lw r11,(sp+20) 8002474: 2b 8c 00 10 lw r12,(sp+16) 8002478: 2b 8d 00 0c lw r13,(sp+12) 800247c: 2b 8e 00 08 lw r14,(sp+8) 8002480: 37 9c 00 30 addi sp,sp,48 8002484: c3 a0 00 00 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 8002488: 29 83 00 50 lw r3,(r12+80) 800248c: 44 60 00 22 be r3,r0,8002514 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; 8002490: 5b 83 00 18 sw (sp+24),r3 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 8002494: 29 62 00 04 lw r2,(r11+4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 8002498: 37 8e 00 18 addi r14,sp,24 800249c: b9 c0 08 00 mv r1,r14 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 80024a0: 5b 82 00 1c sw (sp+28),r2 80024a4: 29 62 00 08 lw r2,(r11+8) 80024a8: 5b 82 00 20 sw (sp+32),r2 80024ac: 29 62 00 0c lw r2,(r11+12) 80024b0: 5b 82 00 24 sw (sp+36),r2 80024b4: 29 62 00 10 lw r2,(r11+16) 80024b8: 5b 82 00 28 sw (sp+40),r2 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 80024bc: f8 00 28 fd calli 800c8b0 /* * 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) 80024c0: 29 83 00 50 lw r3,(r12+80) 80024c4: 34 01 00 01 mvi r1,1 80024c8: 2c 64 00 34 lhu r4,(r3+52) 80024cc: 44 81 00 0a be r4,r1,80024f4 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 80024d0: 34 84 ff ff addi r4,r4,-1 IMFS_update_ctime( node->info.hard_link.link_node ); 80024d4: 34 02 00 00 mvi r2,0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 80024d8: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( node->info.hard_link.link_node ); 80024dc: 37 81 00 2c addi r1,sp,44 80024e0: f8 00 01 e4 calli 8002c70 80024e4: 29 81 00 50 lw r1,(r12+80) 80024e8: 2b 82 00 2c lw r2,(sp+44) 80024ec: 58 22 00 48 sw (r1+72),r2 80024f0: e3 ff ff d8 bi 8002450 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 80024f4: 2b 83 00 20 lw r3,(sp+32) 80024f8: b9 c0 10 00 mv r2,r14 80024fc: b9 a0 08 00 mv r1,r13 8002500: 28 63 00 34 lw r3,(r3+52) 8002504: d8 60 00 00 call r3 if ( result != 0 ) 8002508: 34 02 ff ff mvi r2,-1 800250c: 44 20 ff d1 be r1,r0,8002450 8002510: e3 ff ff d6 bi 8002468 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 8002514: f8 00 40 53 calli 8012660 <__errno> <== NOT EXECUTED 8002518: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800251c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002520: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8002524: e3 ff ff d1 bi 8002468 <== NOT EXECUTED 08002528 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8002528: 37 9c ff fc addi sp,sp,-4 800252c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8002530: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 8002534: 34 01 00 01 mvi r1,1 8002538: 28 43 00 4c lw r3,(r2+76) 800253c: 5c 61 00 08 bne r3,r1,800255c /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 8002540: 28 43 00 5c lw r3,(r2+92) 8002544: 34 01 00 00 mvi r1,0 8002548: 44 61 00 0a be r3,r1,8002570 /* * 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; 800254c: 58 41 00 5c sw (r2+92),r1 return 0; } 8002550: 2b 9d 00 04 lw ra,(sp+4) 8002554: 37 9c 00 04 addi sp,sp,4 8002558: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 800255c: f8 00 40 41 calli 8012660 <__errno> <== NOT EXECUTED 8002560: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002564: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002568: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800256c: e3 ff ff f9 bi 8002550 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 8002570: f8 00 40 3c calli 8012660 <__errno> <== NOT EXECUTED 8002574: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002578: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800257c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002580: e3 ff ff f4 bi 8002550 <== NOT EXECUTED 0800109c : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 800109c: 37 9c ff f0 addi sp,sp,-16 80010a0: 5b 8b 00 10 sw (sp+16),r11 80010a4: 5b 8c 00 0c sw (sp+12),r12 80010a8: 5b 8d 00 08 sw (sp+8),r13 80010ac: 5b 9d 00 04 sw (sp+4),ra #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 80010b0: 78 04 08 01 mvhi r4,0x801 80010b4: 38 84 c6 10 ori r4,r4,0xc610 80010b8: 28 84 00 00 lw r4,(r4+0) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 80010bc: b8 20 60 00 mv r12,r1 80010c0: b8 40 68 00 mv r13,r2 80010c4: b8 60 58 00 mv r11,r3 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 80010c8: 44 80 00 03 be r4,r0,80010d4 (*rtems_malloc_statistics_helpers->initialize)(); 80010cc: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 80010d0: d8 20 00 00 call r1 <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 80010d4: f8 00 1b 66 calli 8007e6c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 80010d8: 78 04 08 01 mvhi r4,0x801 80010dc: 38 84 c6 14 ori r4,r4,0xc614 80010e0: 28 81 00 00 lw r1,(r4+0) 80010e4: 44 20 00 08 be r1,r0,8001104 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 80010e8: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80010ec: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80010f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80010f4: d8 60 00 00 call r3 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 80010f8: b5 8d 68 00 add r13,r12,r13 <== NOT EXECUTED 80010fc: c9 a1 68 00 sub r13,r13,r1 <== NOT EXECUTED 8001100: b8 20 60 00 mv r12,r1 <== 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 ( 8001104: 78 0b 08 01 mvhi r11,0x801 8001108: 39 6b c6 0d ori r11,r11,0xc60d 800110c: 41 62 00 00 lbu r2,(r11+0) 8001110: 5c 40 00 1f bne r2,r0,800118c !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 8001114: 78 01 08 01 mvhi r1,0x801 8001118: 38 21 c0 c4 ori r1,r1,0xc0c4 800111c: 40 21 00 28 lbu r1,(r1+40) 8001120: 5c 22 00 16 bne r1,r2,8001178 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 8001124: 78 0b 08 01 mvhi r11,0x801 8001128: 39 6b c0 1c ori r11,r11,0xc01c 800112c: 29 61 00 00 lw r1,(r11+0) 8001130: b9 80 10 00 mv r2,r12 8001134: b9 a0 18 00 mv r3,r13 8001138: 34 04 00 08 mvi r4,8 800113c: f8 00 08 41 calli 8003240 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 8001140: 44 20 00 16 be r1,r0,8001198 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 8001144: 78 0c 08 01 mvhi r12,0x801 8001148: 39 8c c6 a8 ori r12,r12,0xc6a8 800114c: 29 61 00 00 lw r1,(r11+0) 8001150: 29 8b 00 00 lw r11,(r12+0) 8001154: f8 00 0b c0 calli 8004054 <_Protected_heap_Get_size> 8001158: b4 2b 08 00 add r1,r1,r11 800115c: 59 81 00 00 sw (r12+0),r1 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 8001160: 2b 9d 00 04 lw ra,(sp+4) 8001164: 2b 8b 00 10 lw r11,(sp+16) 8001168: 2b 8c 00 0c lw r12,(sp+12) 800116c: 2b 8d 00 08 lw r13,(sp+8) 8001170: 37 9c 00 10 addi sp,sp,16 8001174: c3 a0 00 00 ret if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 8001178: b9 80 08 00 mv r1,r12 800117c: b9 a0 18 00 mv r3,r13 8001180: f8 00 2d 94 calli 800c7d0 * 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 ) { 8001184: 41 61 00 00 lbu r1,(r11+0) 8001188: 44 20 ff e7 be r1,r0,8001124 800118c: 78 0b 08 01 mvhi r11,0x801 8001190: 39 6b c0 1c ori r11,r11,0xc01c 8001194: e3 ff ff ec bi 8001144 heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 8001198: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 800119c: f8 00 05 e7 calli 8002938 <== NOT EXECUTED 080055e8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 80055e8: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 80055ec: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED 80055f0: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED 80055f4: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED 80055f8: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED 80055fc: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED 8005600: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED 8005604: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED 8005608: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED 800560c: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED 8005610: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005614: b8 20 58 00 mv r11,r1 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 8005618: 44 20 00 37 be r1,r0,80056f4 <== NOT EXECUTED return; if ( !print_handler ) 800561c: 78 0d 08 07 mvhi r13,0x807 <== NOT EXECUTED 8005620: 39 ad 24 b0 ori r13,r13,0x24b0 <== NOT EXECUTED 8005624: 29 b0 00 00 lw r16,(r13+0) <== NOT EXECUTED 8005628: 46 00 00 33 be r16,r0,80056f4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 800562c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8005630: 45 61 00 4d be r11,r1,8005764 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 8005634: 29 71 01 10 lw r17,(r11+272) <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 8005638: 35 6e 00 c0 addi r14,r11,192 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 800563c: 29 cc 00 04 lw r12,(r14+4) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 8005640: 29 cf 00 00 lw r15,(r14+0) <== 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); 8005644: 35 8c 00 10 addi r12,r12,16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 8005648: 35 ef ff f0 addi r15,r15,-16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 800564c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8005650: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005654: fb ff ff c3 calli 8005560 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 8005658: b5 8f 60 00 add r12,r12,r15 <== NOT EXECUTED 800565c: c9 81 90 00 sub r18,r12,r1 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 8005660: 44 20 00 37 be r1,r0,800573c <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 8005664: 45 60 00 38 be r11,r0,8005744 <== NOT EXECUTED (*print_handler)( 8005668: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 800566c: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8005670: 39 8c 24 ac ori r12,r12,0x24ac <== NOT EXECUTED 8005674: 29 93 00 00 lw r19,(r12+0) <== NOT EXECUTED 8005678: 37 83 00 2c addi r3,sp,44 <== NOT EXECUTED 800567c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005680: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005684: f8 00 13 49 calli 800a3a8 <== NOT EXECUTED 8005688: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800568c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8005690: 38 42 51 78 ori r2,r2,0x5178 <== NOT EXECUTED 8005694: ba 60 08 00 mv r1,r19 <== NOT EXECUTED 8005698: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800569c: da 00 00 00 call r16 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 80056a0: 29 c4 00 00 lw r4,(r14+0) <== NOT EXECUTED 80056a4: 29 c3 00 04 lw r3,(r14+4) <== NOT EXECUTED 80056a8: 29 a7 00 00 lw r7,(r13+0) <== NOT EXECUTED 80056ac: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80056b0: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 80056b4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80056b8: 38 42 51 98 ori r2,r2,0x5198 <== NOT EXECUTED 80056bc: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED 80056c0: ba 20 28 00 mv r5,r17 <== NOT EXECUTED 80056c4: b9 e0 30 00 mv r6,r15 <== NOT EXECUTED 80056c8: d8 e0 00 00 call r7 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 80056cc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80056d0: 38 42 24 a8 ori r2,r2,0x24a8 <== NOT EXECUTED 80056d4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 80056d8: 44 20 00 13 be r1,r0,8005724 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 80056dc: 29 a4 00 00 lw r4,(r13+0) <== NOT EXECUTED 80056e0: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80056e4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80056e8: 38 42 51 c8 ori r2,r2,0x51c8 <== NOT EXECUTED 80056ec: ba 40 18 00 mv r3,r18 <== NOT EXECUTED 80056f0: d8 80 00 00 call r4 <== NOT EXECUTED } } 80056f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80056f8: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED 80056fc: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED 8005700: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED 8005704: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED 8005708: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED 800570c: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED 8005710: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED 8005714: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED 8005718: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED 800571c: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8005720: c3 a0 00 00 ret <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 8005724: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED 8005728: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800572c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005730: 38 42 51 b8 ori r2,r2,0x51b8 <== NOT EXECUTED 8005734: d8 60 00 00 call r3 <== NOT EXECUTED 8005738: e3 ff ff ef bi 80056f4 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 800573c: b8 20 90 00 mv r18,r1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 8005740: 5d 60 ff ca bne r11,r0,8005668 <== 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 ); 8005744: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8005748: 39 8c 24 ac ori r12,r12,0x24ac <== NOT EXECUTED 800574c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005750: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005754: 38 42 51 88 ori r2,r2,0x5188 <== NOT EXECUTED 8005758: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 800575c: da 00 00 00 call r16 <== NOT EXECUTED 8005760: e3 ff ff d0 bi 80056a0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 8005764: 78 0e 08 07 mvhi r14,0x807 <== NOT EXECUTED 8005768: 39 ce 4e 88 ori r14,r14,0x4e88 <== NOT EXECUTED 800576c: 29 c1 00 04 lw r1,(r14+4) <== NOT EXECUTED 8005770: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8005774: b9 60 88 00 mv r17,r11 <== NOT EXECUTED 8005778: 5c 2b ff b1 bne r1,r11,800563c <== NOT EXECUTED 800577c: e3 ff ff de bi 80056f4 <== NOT EXECUTED 08005560 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 8005560: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8005564: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8005568: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 800556c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005570: b8 20 60 00 mv r12,r1 <== 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++) 8005574: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8005578: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800557c: fb ff ef 21 calli 8001200 <__lshrsi3> <== NOT EXECUTED 8005580: 34 02 00 02 mvi r2,2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 8005584: 35 8b 00 10 addi r11,r12,16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 8005588: fb ff ee f6 calli 8001160 <__ashlsi3> <== NOT EXECUTED 800558c: b5 61 10 00 add r2,r11,r1 <== NOT EXECUTED 8005590: 51 62 00 08 bgeu r11,r2,80055b0 <== NOT EXECUTED if (*base != U32_PATTERN) 8005594: 29 84 00 10 lw r4,(r12+16) <== NOT EXECUTED 8005598: 78 03 a5 a5 mvhi r3,0xa5a5 <== NOT EXECUTED 800559c: 38 63 a5 a5 ori r3,r3,0xa5a5 <== NOT EXECUTED 80055a0: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80055a4: 5c 83 00 0b bne r4,r3,80055d0 <== 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++) 80055a8: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED 80055ac: 54 4b 00 07 bgu r2,r11,80055c8 <== NOT EXECUTED 80055b0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 80055b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80055b8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80055bc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80055c0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80055c4: c3 a0 00 00 ret <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 80055c8: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 80055cc: 44 61 ff f7 be r3,r1,80055a8 <== NOT EXECUTED return (void *) base; 80055d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED #endif return (void *)0; } 80055d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80055d8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80055dc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80055e0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80055e4: c3 a0 00 00 ret <== NOT EXECUTED 08005834 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 8005834: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8005838: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 800583c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8005840: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8005844: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005848: b8 20 58 00 mv r11,r1 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 800584c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005850: 38 21 52 34 ori r1,r1,0x5234 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 8005854: 20 4c 00 ff andi r12,r2,0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 8005858: 29 6d 00 c4 lw r13,(r11+196) <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 800585c: f8 00 0d d1 calli 8008fa0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 8005860: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005864: 38 21 52 44 ori r1,r1,0x5244 <== NOT EXECUTED 8005868: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800586c: f8 00 0d cd calli 8008fa0 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 8005870: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED 8005874: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005878: 38 21 52 64 ori r1,r1,0x5264 <== NOT EXECUTED 800587c: f8 00 0d c9 calli 8008fa0 <== NOT EXECUTED printk( 8005880: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED 8005884: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005888: 38 21 52 78 ori r1,r1,0x5278 <== NOT EXECUTED 800588c: f8 00 0d c5 calli 8008fa0 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 8005890: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 8005894: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 8005898: 34 02 00 20 mvi r2,32 <== NOT EXECUTED 800589c: f8 00 12 c3 calli 800a3a8 <== NOT EXECUTED 80058a0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80058a4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058a8: 38 21 52 8c ori r1,r1,0x528c <== NOT EXECUTED 80058ac: f8 00 0d bd calli 8008fa0 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 80058b0: 29 62 00 c0 lw r2,(r11+192) <== NOT EXECUTED 80058b4: 29 63 00 c4 lw r3,(r11+196) <== NOT EXECUTED 80058b8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058bc: 38 21 52 a4 ori r1,r1,0x52a4 <== NOT EXECUTED 80058c0: b4 62 20 00 add r4,r3,r2 <== NOT EXECUTED 80058c4: f8 00 0d b7 calli 8008fa0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 80058c8: 45 80 00 03 be r12,r0,80058d4 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 80058cc: 34 01 00 81 mvi r1,129 <== NOT EXECUTED 80058d0: f8 00 15 67 calli 800ae6c <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 80058d4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058d8: 38 21 52 d8 ori r1,r1,0x52d8 <== NOT EXECUTED 80058dc: 35 a4 00 18 addi r4,r13,24 <== NOT EXECUTED 80058e0: 34 02 00 10 mvi r2,16 <== NOT EXECUTED 80058e4: 35 a3 00 08 addi r3,r13,8 <== NOT EXECUTED 80058e8: f8 00 0d ae calli 8008fa0 <== NOT EXECUTED 80058ec: e3 ff ff f8 bi 80058cc <== NOT EXECUTED 080151bc <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 80151bc: 37 9c ff e4 addi sp,sp,-28 80151c0: 5b 8b 00 1c sw (sp+28),r11 80151c4: 5b 8c 00 18 sw (sp+24),r12 80151c8: 5b 8d 00 14 sw (sp+20),r13 80151cc: 5b 8e 00 10 sw (sp+16),r14 80151d0: 5b 8f 00 0c sw (sp+12),r15 80151d4: 5b 90 00 08 sw (sp+8),r16 80151d8: 5b 9d 00 04 sw (sp+4),ra 80151dc: b8 20 70 00 mv r14,r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80151e0: 28 21 00 4c lw r1,(r1+76) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 80151e4: b8 60 60 00 mv r12,r3 80151e8: b8 40 78 00 mv r15,r2 80151ec: b8 c0 80 00 mv r16,r6 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80151f0: 50 23 00 0b bgeu r1,r3,801521c <_CORE_message_queue_Broadcast+0x60> 80151f4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 80151f8: 2b 9d 00 04 lw ra,(sp+4) 80151fc: 2b 8b 00 1c lw r11,(sp+28) 8015200: 2b 8c 00 18 lw r12,(sp+24) 8015204: 2b 8d 00 14 lw r13,(sp+20) 8015208: 2b 8e 00 10 lw r14,(sp+16) 801520c: 2b 8f 00 0c lw r15,(sp+12) 8015210: 2b 90 00 08 lw r16,(sp+8) 8015214: 37 9c 00 1c addi sp,sp,28 8015218: c3 a0 00 00 ret * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 801521c: 29 c2 00 48 lw r2,(r14+72) 8015220: 34 01 00 00 mvi r1,0 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 8015224: b8 40 68 00 mv r13,r2 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 8015228: 44 41 00 08 be r2,r1,8015248 <_CORE_message_queue_Broadcast+0x8c> *count = 0; 801522c: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015230: e3 ff ff f2 bi 80151f8 <_CORE_message_queue_Broadcast+0x3c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 8015234: 29 61 00 2c lw r1,(r11+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 8015238: 35 ad 00 01 addi r13,r13,1 801523c: f8 00 29 08 calli 801f65c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8015240: 29 61 00 28 lw r1,(r11+40) 8015244: 58 2c 00 00 sw (r1+0),r12 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 8015248: b9 c0 08 00 mv r1,r14 801524c: f8 00 0c 70 calli 801840c <_Thread_queue_Dequeue> 8015250: b8 20 58 00 mv r11,r1 8015254: b9 e0 10 00 mv r2,r15 8015258: b9 80 18 00 mv r3,r12 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 801525c: 5c 20 ff f6 bne r1,r0,8015234 <_CORE_message_queue_Broadcast+0x78> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 8015260: 5a 0d 00 00 sw (r16+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015264: e3 ff ff e5 bi 80151f8 <_CORE_message_queue_Broadcast+0x3c> 08008a38 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 8008a38: 37 9c ff fc addi sp,sp,-4 8008a3c: 5b 9d 00 04 sw (sp+4),ra { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 8008a40: 78 03 08 01 mvhi r3,0x801 8008a44: 38 63 c8 e0 ori r3,r3,0xc8e0 8008a48: 28 63 00 00 lw r3,(r3+0) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 8008a4c: 34 04 00 00 mvi r4,0 8008a50: 58 64 00 34 sw (r3+52),r4 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 8008a54: 28 25 00 50 lw r5,(r1+80) 8008a58: 44 a4 00 12 be r5,r4,8008aa0 <_CORE_mutex_Seize_interrupt_trylock+0x68> the_mutex->lock = CORE_MUTEX_LOCKED; 8008a5c: 58 24 00 50 sw (r1+80),r4 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 8008a60: 28 66 00 08 lw r6,(r3+8) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 8008a64: 28 25 00 48 lw r5,(r1+72) 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; 8008a68: 58 23 00 5c sw (r1+92),r3 the_mutex->holder_id = executing->Object.id; 8008a6c: 58 26 00 60 sw (r1+96),r6 the_mutex->nest_count = 1; 8008a70: 34 06 00 01 mvi r6,1 8008a74: 58 26 00 54 sw (r1+84),r6 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 8008a78: 34 07 00 02 mvi r7,2 8008a7c: 44 a7 00 0f be r5,r7,8008ab8 <_CORE_mutex_Seize_interrupt_trylock+0x80> 8008a80: 34 07 00 03 mvi r7,3 8008a84: 44 a7 00 1b be r5,r7,8008af0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 8008a88: 28 41 00 00 lw r1,(r2+0) 8008a8c: d0 01 00 00 wcsr IE,r1 8008a90: 34 01 00 00 mvi r1,0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 8008a94: 2b 9d 00 04 lw ra,(sp+4) 8008a98: 37 9c 00 04 addi sp,sp,4 8008a9c: c3 a0 00 00 ret /* * 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 ) ) { 8008aa0: 28 24 00 5c lw r4,(r1+92) 8008aa4: 44 64 00 09 be r3,r4,8008ac8 <_CORE_mutex_Seize_interrupt_trylock+0x90> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 8008aa8: 34 01 00 01 mvi r1,1 8008aac: 2b 9d 00 04 lw ra,(sp+4) 8008ab0: 37 9c 00 04 addi sp,sp,4 8008ab4: c3 a0 00 00 ret _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008ab8: 28 61 00 1c lw r1,(r3+28) 8008abc: 34 21 00 01 addi r1,r1,1 8008ac0: 58 61 00 1c sw (r3+28),r1 8008ac4: e3 ff ff f1 bi 8008a88 <_CORE_mutex_Seize_interrupt_trylock+0x50> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 8008ac8: 28 24 00 40 lw r4,(r1+64) 8008acc: 44 80 00 2d be r4,r0,8008b80 <_CORE_mutex_Seize_interrupt_trylock+0x148> 8008ad0: 34 01 00 01 mvi r1,1 8008ad4: 5c 81 ff f5 bne r4,r1,8008aa8 <_CORE_mutex_Seize_interrupt_trylock+0x70> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 8008ad8: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8008adc: 58 61 00 34 sw (r3+52),r1 <== NOT EXECUTED _ISR_Enable( *level_p ); 8008ae0: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8008ae4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8008ae8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8008aec: e3 ff ff f0 bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008af0: 28 68 00 1c lw r8,(r3+28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 8008af4: 28 65 00 14 lw r5,(r3+20) _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008af8: b5 06 38 00 add r7,r8,r6 8008afc: 58 67 00 1c sw (r3+28),r7 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 8008b00: 28 27 00 4c lw r7,(r1+76) current = executing->current_priority; if ( current == ceiling ) { 8008b04: 44 e5 00 1b be r7,r5,8008b70 <_CORE_mutex_Seize_interrupt_trylock+0x138> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 8008b08: 50 e5 00 0f bgeu r7,r5,8008b44 <_CORE_mutex_Seize_interrupt_trylock+0x10c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8008b0c: 78 03 08 01 mvhi r3,0x801 8008b10: 38 63 c8 24 ori r3,r3,0xc824 8008b14: 28 64 00 00 lw r4,(r3+0) 8008b18: 34 84 00 01 addi r4,r4,1 8008b1c: 58 64 00 00 sw (r3+0),r4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 8008b20: 28 42 00 00 lw r2,(r2+0) 8008b24: d0 02 00 00 wcsr IE,r2 _Thread_Change_priority( 8008b28: 28 22 00 4c lw r2,(r1+76) 8008b2c: 28 21 00 5c lw r1,(r1+92) 8008b30: 34 03 00 00 mvi r3,0 8008b34: fb ff ed 4a calli 800405c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 8008b38: fb ff ee d4 calli 8004688 <_Thread_Enable_dispatch> 8008b3c: 34 01 00 00 mvi r1,0 8008b40: e3 ff ff db bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 8008b44: 34 05 00 06 mvi r5,6 8008b48: 58 65 00 34 sw (r3+52),r5 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 8008b4c: 58 24 00 54 sw (r1+84),r4 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 8008b50: 58 26 00 50 sw (r1+80),r6 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 8008b54: 58 68 00 1c sw (r3+28),r8 _ISR_Enable( *level_p ); 8008b58: 28 41 00 00 lw r1,(r2+0) 8008b5c: d0 01 00 00 wcsr IE,r1 8008b60: 34 01 00 00 mvi r1,0 8008b64: 2b 9d 00 04 lw ra,(sp+4) 8008b68: 37 9c 00 04 addi sp,sp,4 8008b6c: c3 a0 00 00 ret Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 8008b70: 28 41 00 00 lw r1,(r2+0) 8008b74: d0 01 00 00 wcsr IE,r1 8008b78: 34 01 00 00 mvi r1,0 8008b7c: e3 ff ff cc bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 8008b80: 28 23 00 54 lw r3,(r1+84) 8008b84: 34 63 00 01 addi r3,r3,1 8008b88: 58 23 00 54 sw (r1+84),r3 _ISR_Enable( *level_p ); 8008b8c: 28 41 00 00 lw r1,(r2+0) 8008b90: d0 01 00 00 wcsr IE,r1 8008b94: 34 01 00 00 mvi r1,0 8008b98: e3 ff ff c5 bi 8008aac <_CORE_mutex_Seize_interrupt_trylock+0x74> 08008bb4 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 8008bb4: 37 9c ff f8 addi sp,sp,-8 8008bb8: 5b 8b 00 08 sw (sp+8),r11 8008bbc: 5b 9d 00 04 sw (sp+4),ra 8008bc0: b8 20 58 00 mv r11,r1 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 8008bc4: fb ff ef d8 calli 8004b24 <_Thread_queue_Dequeue> 8008bc8: 34 02 00 00 mvi r2,0 8008bcc: 44 22 00 06 be r1,r2,8008be4 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 8008bd0: b8 40 08 00 mv r1,r2 8008bd4: 2b 9d 00 04 lw ra,(sp+4) 8008bd8: 2b 8b 00 08 lw r11,(sp+8) 8008bdc: 37 9c 00 08 addi sp,sp,8 8008be0: c3 a0 00 00 ret if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 8008be4: 90 00 08 00 rcsr r1,IE 8008be8: 34 02 ff fe mvi r2,-2 8008bec: a0 22 10 00 and r2,r1,r2 8008bf0: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8008bf4: 29 62 00 48 lw r2,(r11+72) 8008bf8: 29 63 00 40 lw r3,(r11+64) 8008bfc: 54 62 00 08 bgu r3,r2,8008c1c <_CORE_semaphore_Surrender+0x68> 8008c00: 34 02 00 04 mvi r2,4 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008c04: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } return status; } 8008c08: b8 40 08 00 mv r1,r2 8008c0c: 2b 9d 00 04 lw ra,(sp+4) 8008c10: 2b 8b 00 08 lw r11,(sp+8) 8008c14: 37 9c 00 08 addi sp,sp,8 8008c18: c3 a0 00 00 ret #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 8008c1c: 34 42 00 01 addi r2,r2,1 8008c20: 59 62 00 48 sw (r11+72),r2 8008c24: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008c28: d0 01 00 00 wcsr IE,r1 8008c2c: e3 ff ff f7 bi 8008c08 <_CORE_semaphore_Surrender+0x54> 0800e7d8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800e7d8: 37 9c ff f8 addi sp,sp,-8 800e7dc: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800e7e0: 37 82 00 08 addi r2,sp,8 800e7e4: fb ff e1 9f calli 8006e60 <_Thread_Get> switch ( location ) { 800e7e8: 2b 82 00 08 lw r2,(sp+8) 800e7ec: 44 40 00 04 be r2,r0,800e7fc <_Event_Timeout+0x24> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800e7f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800e7f4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800e7f8: c3 a0 00 00 ret <== NOT EXECUTED * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 800e7fc: 90 00 18 00 rcsr r3,IE 800e800: 34 02 ff fe mvi r2,-2 800e804: a0 62 10 00 and r2,r3,r2 800e808: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800e80c: 78 02 08 02 mvhi r2,0x802 800e810: 38 42 49 70 ori r2,r2,0x4970 800e814: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800e818: 34 04 00 00 mvi r4,0 800e81c: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800e820: 44 22 00 0f be r1,r2,800e85c <_Event_Timeout+0x84> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800e824: 34 02 00 06 mvi r2,6 800e828: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800e82c: d0 03 00 00 wcsr IE,r3 800e830: 78 02 10 03 mvhi r2,0x1003 800e834: 38 42 ff f8 ori r2,r2,0xfff8 800e838: f8 00 05 72 calli 800fe00 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800e83c: 78 01 08 02 mvhi r1,0x802 800e840: 38 21 48 b4 ori r1,r1,0x48b4 800e844: 28 22 00 00 lw r2,(r1+0) 800e848: 34 42 ff ff addi r2,r2,-1 800e84c: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800e850: 2b 9d 00 04 lw ra,(sp+4) 800e854: 37 9c 00 08 addi sp,sp,8 800e858: c3 a0 00 00 ret } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800e85c: 78 02 08 02 mvhi r2,0x802 800e860: 38 42 4b b0 ori r2,r2,0x4bb0 800e864: 28 45 00 00 lw r5,(r2+0) 800e868: 34 04 00 01 mvi r4,1 800e86c: 5c a4 ff ee bne r5,r4,800e824 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800e870: 34 04 00 02 mvi r4,2 800e874: 58 44 00 00 sw (r2+0),r4 800e878: e3 ff ff eb bi 800e824 <_Event_Timeout+0x4c> 0800f050 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800f050: 37 9c ff e8 addi sp,sp,-24 800f054: 5b 8b 00 14 sw (sp+20),r11 800f058: 5b 8c 00 10 sw (sp+16),r12 800f05c: 5b 8d 00 0c sw (sp+12),r13 800f060: 5b 8e 00 08 sw (sp+8),r14 800f064: 5b 9d 00 04 sw (sp+4),ra Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 800f068: 28 2c 00 18 lw r12,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800f06c: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800f070: b8 20 58 00 mv r11,r1 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 800f074: f0 4c 60 00 cmpgeu r12,r2,r12 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 800f078: f4 a2 08 00 cmpgu r1,r5,r2 uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 800f07c: 29 6d 00 24 lw r13,(r11+36) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 800f080: a0 2c 60 00 and r12,r1,r12 800f084: 34 01 00 01 mvi r1,1 800f088: 5d 80 00 03 bne r12,r0,800f094 <_Heap_Extend+0x44> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 800f08c: 34 01 00 02 mvi r1,2 800f090: 44 45 00 08 be r2,r5,800f0b0 <_Heap_Extend+0x60> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 800f094: 2b 9d 00 04 lw ra,(sp+4) 800f098: 2b 8b 00 14 lw r11,(sp+20) 800f09c: 2b 8c 00 10 lw r12,(sp+16) 800f0a0: 2b 8d 00 0c lw r13,(sp+12) 800f0a4: 2b 8e 00 08 lw r14,(sp+8) 800f0a8: 37 9c 00 18 addi sp,sp,24 800f0ac: c3 a0 00 00 ret { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 800f0b0: b4 43 18 00 add r3,r2,r3 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 800f0b4: c8 6d 70 00 sub r14,r3,r13 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 800f0b8: 29 62 00 10 lw r2,(r11+16) 800f0bc: 35 ce ff f8 addi r14,r14,-8 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 800f0c0: 59 63 00 1c sw (r11+28),r3 800f0c4: b9 c0 08 00 mv r1,r14 800f0c8: 5b 84 00 18 sw (sp+24),r4 800f0cc: fb ff d5 13 calli 8004518 <__umodsi3> extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 800f0d0: 2b 84 00 18 lw r4,(sp+24) 800f0d4: c9 c1 08 00 sub r1,r14,r1 800f0d8: 58 81 00 00 sw (r4+0),r1 if( extend_size >= heap->min_block_size ) { 800f0dc: 29 62 00 14 lw r2,(r11+20) 800f0e0: 50 22 00 09 bgeu r1,r2,800f104 <_Heap_Extend+0xb4> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800f0e4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 800f0e8: 2b 9d 00 04 lw ra,(sp+4) 800f0ec: 2b 8b 00 14 lw r11,(sp+20) 800f0f0: 2b 8c 00 10 lw r12,(sp+16) 800f0f4: 2b 8d 00 0c lw r13,(sp+12) 800f0f8: 2b 8e 00 08 lw r14,(sp+8) 800f0fc: 37 9c 00 18 addi sp,sp,24 800f100: c3 a0 00 00 ret uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800f104: 29 a4 00 04 lw r4,(r13+4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 800f108: 29 63 00 20 lw r3,(r11+32) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 800f10c: b4 2d 10 00 add r2,r1,r13 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800f110: 20 84 00 01 andi r4,r4,0x1 800f114: b8 24 20 00 or r4,r1,r4 800f118: c8 62 18 00 sub r3,r3,r2 800f11c: 59 a4 00 04 sw (r13+4),r4 800f120: 38 63 00 01 ori r3,r3,0x1 800f124: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800f128: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800f12c: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800f130: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800f134: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800f138: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800f13c: 34 63 ff ff addi r3,r3,-1 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 800f140: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800f144: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800f148: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800f14c: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800f150: b9 60 08 00 mv r1,r11 800f154: 35 a2 00 08 addi r2,r13,8 800f158: fb ff e5 c2 calli 8008860 <_Heap_Free> 800f15c: b9 80 08 00 mv r1,r12 800f160: e3 ff ff e2 bi 800f0e8 <_Heap_Extend+0x98> 08003e80 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003e80: 37 9c ff a8 addi sp,sp,-88 8003e84: 5b 8b 00 50 sw (sp+80),r11 8003e88: 5b 8c 00 4c sw (sp+76),r12 8003e8c: 5b 8d 00 48 sw (sp+72),r13 8003e90: 5b 8e 00 44 sw (sp+68),r14 8003e94: 5b 8f 00 40 sw (sp+64),r15 8003e98: 5b 90 00 3c sw (sp+60),r16 8003e9c: 5b 91 00 38 sw (sp+56),r17 8003ea0: 5b 92 00 34 sw (sp+52),r18 8003ea4: 5b 93 00 30 sw (sp+48),r19 8003ea8: 5b 94 00 2c sw (sp+44),r20 8003eac: 5b 95 00 28 sw (sp+40),r21 8003eb0: 5b 96 00 24 sw (sp+36),r22 8003eb4: 5b 97 00 20 sw (sp+32),r23 8003eb8: 5b 98 00 1c sw (sp+28),r24 8003ebc: 5b 99 00 18 sw (sp+24),r25 8003ec0: 5b 9b 00 14 sw (sp+20),fp 8003ec4: 5b 9d 00 10 sw (sp+16),ra 8003ec8: 20 63 00 ff andi r3,r3,0xff 8003ecc: b8 20 58 00 mv r11,r1 8003ed0: b8 40 80 00 mv r16,r2 uintptr_t const page_size = heap->page_size; 8003ed4: 28 32 00 10 lw r18,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003ed8: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003edc: 28 34 00 24 lw r20,(r1+36) Heap_Block *block = heap->first_block; 8003ee0: 28 2c 00 20 lw r12,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003ee4: 5c 60 00 1c bne r3,r0,8003f54 <_Heap_Walk+0xd4> if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003ee8: 78 03 08 01 mvhi r3,0x801 8003eec: 38 63 fa 08 ori r3,r3,0xfa08 8003ef0: 28 63 00 00 lw r3,(r3+0) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003ef4: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003ef8: 34 02 00 03 mvi r2,3 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003efc: 39 ef 3e 5c ori r15,r15,0x3e5c if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f00: 44 62 00 1c be r3,r2,8003f70 <_Heap_Walk+0xf0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8003f04: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 8003f08: 2b 9d 00 10 lw ra,(sp+16) 8003f0c: 2b 8b 00 50 lw r11,(sp+80) 8003f10: 2b 8c 00 4c lw r12,(sp+76) 8003f14: 2b 8d 00 48 lw r13,(sp+72) 8003f18: 2b 8e 00 44 lw r14,(sp+68) 8003f1c: 2b 8f 00 40 lw r15,(sp+64) 8003f20: 2b 90 00 3c lw r16,(sp+60) 8003f24: 2b 91 00 38 lw r17,(sp+56) 8003f28: 2b 92 00 34 lw r18,(sp+52) 8003f2c: 2b 93 00 30 lw r19,(sp+48) 8003f30: 2b 94 00 2c lw r20,(sp+44) 8003f34: 2b 95 00 28 lw r21,(sp+40) 8003f38: 2b 96 00 24 lw r22,(sp+36) 8003f3c: 2b 97 00 20 lw r23,(sp+32) 8003f40: 2b 98 00 1c lw r24,(sp+28) 8003f44: 2b 99 00 18 lw r25,(sp+24) 8003f48: 2b 9b 00 14 lw fp,(sp+20) 8003f4c: 37 9c 00 58 addi sp,sp,88 8003f50: c3 a0 00 00 ret Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f54: 78 03 08 01 mvhi r3,0x801 8003f58: 38 63 fa 08 ori r3,r3,0xfa08 8003f5c: 28 63 00 00 lw r3,(r3+0) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f60: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f64: 34 02 00 03 mvi r2,3 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f68: 39 ef 44 6c ori r15,r15,0x446c if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f6c: 5c 62 ff e6 bne r3,r2,8003f04 <_Heap_Walk+0x84> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 8003f70: 29 61 00 08 lw r1,(r11+8) 8003f74: 29 66 00 18 lw r6,(r11+24) 8003f78: 29 67 00 1c lw r7,(r11+28) 8003f7c: 5b 81 00 08 sw (sp+8),r1 8003f80: 29 61 00 0c lw r1,(r11+12) 8003f84: 78 03 08 01 mvhi r3,0x801 8003f88: 5b 94 00 04 sw (sp+4),r20 8003f8c: 5b 81 00 0c sw (sp+12),r1 8003f90: 38 63 c2 b4 ori r3,r3,0xc2b4 8003f94: ba 00 08 00 mv r1,r16 8003f98: 34 02 00 00 mvi r2,0 8003f9c: ba 40 20 00 mv r4,r18 8003fa0: ba 60 28 00 mv r5,r19 8003fa4: b9 80 40 00 mv r8,r12 8003fa8: d9 e0 00 00 call r15 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8003fac: 46 40 00 d1 be r18,r0,80042f0 <_Heap_Walk+0x470> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8003fb0: 22 4d 00 07 andi r13,r18,0x7 8003fb4: 5d a0 00 d6 bne r13,r0,800430c <_Heap_Walk+0x48c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8003fb8: ba 60 08 00 mv r1,r19 8003fbc: ba 40 10 00 mv r2,r18 8003fc0: fb ff f3 38 calli 8000ca0 <__umodsi3> 8003fc4: b8 20 88 00 mv r17,r1 8003fc8: 5c 2d 00 d9 bne r1,r13,800432c <_Heap_Walk+0x4ac> ); return false; } if ( 8003fcc: 35 81 00 08 addi r1,r12,8 8003fd0: ba 40 10 00 mv r2,r18 8003fd4: fb ff f3 33 calli 8000ca0 <__umodsi3> 8003fd8: b8 20 70 00 mv r14,r1 8003fdc: 5c 31 00 ee bne r1,r17,8004394 <_Heap_Walk+0x514> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 8003fe0: 29 8d 00 04 lw r13,(r12+4) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8003fe4: 21 b1 00 01 andi r17,r13,0x1 8003fe8: 46 21 00 f3 be r17,r1,80043b4 <_Heap_Walk+0x534> ); return false; } if ( first_block->prev_size != page_size ) { 8003fec: 29 84 00 00 lw r4,(r12+0) 8003ff0: 5e 44 00 60 bne r18,r4,8004170 <_Heap_Walk+0x2f0> ); return false; } if ( _Heap_Is_free( last_block ) ) { 8003ff4: 2a 82 00 04 lw r2,(r20+4) 8003ff8: 34 01 ff fe mvi r1,-2 8003ffc: a0 41 08 00 and r1,r2,r1 8004000: b6 81 08 00 add r1,r20,r1 8004004: 28 35 00 04 lw r21,(r1+4) 8004008: 22 b5 00 01 andi r21,r21,0x1 800400c: 46 ae 00 f1 be r21,r14,80043d0 <_Heap_Walk+0x550> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004010: 29 6e 00 08 lw r14,(r11+8) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 8004014: 29 78 00 10 lw r24,(r11+16) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 8004018: 45 6e 00 24 be r11,r14,80040a8 <_Heap_Walk+0x228> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 800401c: 29 76 00 20 lw r22,(r11+32) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004020: 56 ce 00 fb bgu r22,r14,800440c <_Heap_Walk+0x58c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 8004024: 29 79 00 24 lw r25,(r11+36) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004028: 55 d9 00 f9 bgu r14,r25,800440c <_Heap_Walk+0x58c> ); return false; } if ( 800402c: 35 c1 00 08 addi r1,r14,8 8004030: bb 00 10 00 mv r2,r24 8004034: fb ff f3 1b calli 8000ca0 <__umodsi3> 8004038: 5c 20 00 ed bne r1,r0,80043ec <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 800403c: 29 c2 00 04 lw r2,(r14+4) 8004040: 34 17 ff fe mvi r23,-2 8004044: a0 57 10 00 and r2,r2,r23 8004048: b5 c2 10 00 add r2,r14,r2 800404c: 28 42 00 04 lw r2,(r2+4) 8004050: 20 42 00 01 andi r2,r2,0x1 8004054: 5c 41 00 fe bne r2,r1,800444c <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 8004058: 29 c5 00 0c lw r5,(r14+12) 800405c: 45 65 00 10 be r11,r5,800409c <_Heap_Walk+0x21c> 8004060: e0 00 00 f3 bi 800442c <_Heap_Walk+0x5ac> <== NOT EXECUTED 8004064: 56 ce 00 ea bgu r22,r14,800440c <_Heap_Walk+0x58c> ); return false; } if ( 8004068: 35 c1 00 08 addi r1,r14,8 800406c: bb 00 10 00 mv r2,r24 8004070: 55 d9 00 e7 bgu r14,r25,800440c <_Heap_Walk+0x58c> 8004074: fb ff f3 0b calli 8000ca0 <__umodsi3> 8004078: 5c 20 00 dd bne r1,r0,80043ec <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 800407c: 29 c3 00 04 lw r3,(r14+4) 8004080: a0 77 18 00 and r3,r3,r23 8004084: b4 6e 18 00 add r3,r3,r14 8004088: 28 63 00 04 lw r3,(r3+4) 800408c: 20 63 00 01 andi r3,r3,0x1 8004090: 5c 61 00 ef bne r3,r1,800444c <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 8004094: 29 c5 00 0c lw r5,(r14+12) 8004098: 5c b5 00 e5 bne r5,r21,800442c <_Heap_Walk+0x5ac> (*printer)( 800409c: b9 c0 a8 00 mv r21,r14 return false; } prev_block = free_block; free_block = free_block->next; 80040a0: 29 ce 00 08 lw r14,(r14+8) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 80040a4: 5d 6e ff f0 bne r11,r14,8004064 <_Heap_Walk+0x1e4> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80040a8: 46 8c ff 97 be r20,r12,8003f04 <_Heap_Walk+0x84> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040ac: 78 01 08 01 mvhi r1,0x801 80040b0: 5b 81 00 54 sw (sp+84),r1 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 80040b4: 78 01 08 01 mvhi r1,0x801 80040b8: 5b 81 00 58 sw (sp+88),r1 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040bc: 2b 81 00 54 lw r1,(sp+84) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 80040c0: 34 16 ff fe mvi r22,-2 80040c4: 78 15 08 01 mvhi r21,0x801 80040c8: 38 21 c6 0c ori r1,r1,0xc60c 80040cc: 5b 81 00 54 sw (sp+84),r1 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 80040d0: 2b 81 00 58 lw r1,(sp+88) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 80040d4: 78 18 08 01 mvhi r24,0x801 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80040d8: 78 17 08 01 mvhi r23,0x801 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 80040dc: 38 21 c5 f4 ori r1,r1,0xc5f4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 80040e0: a1 b6 68 00 and r13,r13,r22 80040e4: 5b 81 00 58 sw (sp+88),r1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 80040e8: ba 20 10 00 mv r2,r17 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040ec: 3a b5 c6 7c ori r21,r21,0xc67c Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 80040f0: 3b 18 c6 00 ori r24,r24,0xc600 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80040f4: 3a f7 c5 e8 ori r23,r23,0xc5e8 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80040f8: 78 1b 08 01 mvhi fp,0x801 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80040fc: b5 ac 70 00 add r14,r13,r12 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 8004100: 44 40 00 59 be r2,r0,8004264 <_Heap_Walk+0x3e4> (*printer)( 8004104: 78 03 08 01 mvhi r3,0x801 8004108: ba 00 08 00 mv r1,r16 800410c: 34 02 00 00 mvi r2,0 8004110: 38 63 c4 e8 ori r3,r3,0xc4e8 8004114: b9 80 20 00 mv r4,r12 8004118: b9 a0 28 00 mv r5,r13 800411c: d9 e0 00 00 call r15 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004120: 29 63 00 20 lw r3,(r11+32) 8004124: 54 6e 00 8a bgu r3,r14,800434c <_Heap_Walk+0x4cc> 8004128: 29 61 00 24 lw r1,(r11+36) 800412c: 55 c1 00 88 bgu r14,r1,800434c <_Heap_Walk+0x4cc> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8004130: b9 a0 08 00 mv r1,r13 8004134: ba 40 10 00 mv r2,r18 8004138: fb ff f2 da calli 8000ca0 <__umodsi3> 800413c: b8 20 88 00 mv r17,r1 8004140: 5c 20 00 8c bne r1,r0,8004370 <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 8004144: 51 b3 00 13 bgeu r13,r19,8004190 <_Heap_Walk+0x310> (*printer)( 8004148: 78 03 08 01 mvhi r3,0x801 800414c: ba 00 08 00 mv r1,r16 8004150: 38 63 c5 88 ori r3,r3,0xc588 8004154: b9 80 20 00 mv r4,r12 8004158: b9 a0 28 00 mv r5,r13 800415c: ba 60 30 00 mv r6,r19 8004160: 34 02 00 01 mvi r2,1 8004164: d9 e0 00 00 call r15 8004168: ba 20 08 00 mv r1,r17 block, block_size, min_block_size ); return false; 800416c: e3 ff ff 67 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 8004170: 78 03 08 01 mvhi r3,0x801 8004174: ba 00 08 00 mv r1,r16 8004178: 38 63 c4 04 ori r3,r3,0xc404 800417c: ba 40 28 00 mv r5,r18 8004180: 34 02 00 01 mvi r2,1 8004184: d9 e0 00 00 call r15 8004188: b9 c0 08 00 mv r1,r14 800418c: e3 ff ff 5f bi 8003f08 <_Heap_Walk+0x88> ); return false; } if ( next_block_begin <= block_begin ) { 8004190: 55 cc 00 0a bgu r14,r12,80041b8 <_Heap_Walk+0x338> (*printer)( 8004194: 78 03 08 01 mvhi r3,0x801 8004198: ba 00 08 00 mv r1,r16 800419c: 38 63 c5 b4 ori r3,r3,0xc5b4 80041a0: b9 80 20 00 mv r4,r12 80041a4: b9 c0 28 00 mv r5,r14 80041a8: 34 02 00 01 mvi r2,1 80041ac: d9 e0 00 00 call r15 80041b0: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 80041b4: e3 ff ff 55 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_prev_used( next_block ) ) { 80041b8: 29 c3 00 04 lw r3,(r14+4) 80041bc: 20 63 00 01 andi r3,r3,0x1 80041c0: 5c 60 00 22 bne r3,r0,8004248 <_Heap_Walk+0x3c8> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 80041c4: 29 91 00 04 lw r17,(r12+4) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 80041c8: 29 85 00 0c lw r5,(r12+12) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80041cc: 29 61 00 08 lw r1,(r11+8) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 80041d0: a2 36 68 00 and r13,r17,r22 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 80041d4: 29 63 00 0c lw r3,(r11+12) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80041d8: b5 8d c8 00 add r25,r12,r13 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80041dc: ba e0 30 00 mv r6,r23 80041e0: 44 25 00 03 be r1,r5,80041ec <_Heap_Walk+0x36c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 80041e4: ba a0 30 00 mv r6,r21 80041e8: 44 ab 00 40 be r5,r11,80042e8 <_Heap_Walk+0x468> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 80041ec: 29 87 00 08 lw r7,(r12+8) 80041f0: bb 00 40 00 mv r8,r24 80041f4: 44 67 00 03 be r3,r7,8004200 <_Heap_Walk+0x380> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80041f8: ba a0 40 00 mv r8,r21 80041fc: 44 eb 00 39 be r7,r11,80042e0 <_Heap_Walk+0x460> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 8004200: 78 03 08 01 mvhi r3,0x801 8004204: ba 00 08 00 mv r1,r16 8004208: 34 02 00 00 mvi r2,0 800420c: 38 63 c6 18 ori r3,r3,0xc618 8004210: b9 80 20 00 mv r4,r12 8004214: d9 e0 00 00 call r15 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8004218: 2b 26 00 00 lw r6,(r25+0) 800421c: 45 a6 00 1a be r13,r6,8004284 <_Heap_Walk+0x404> (*printer)( 8004220: 78 03 08 01 mvhi r3,0x801 8004224: ba 00 08 00 mv r1,r16 8004228: 38 63 c6 44 ori r3,r3,0xc644 800422c: b9 80 20 00 mv r4,r12 8004230: b9 a0 28 00 mv r5,r13 8004234: bb 20 38 00 mv r7,r25 8004238: 34 02 00 01 mvi r2,1 800423c: d9 e0 00 00 call r15 8004240: 34 01 00 00 mvi r1,0 8004244: e3 ff ff 31 bi 8003f08 <_Heap_Walk+0x88> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8004248: 46 8e ff 2f be r20,r14,8003f04 <_Heap_Walk+0x84> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 800424c: 29 cd 00 04 lw r13,(r14+4) 8004250: b9 c0 60 00 mv r12,r14 8004254: 21 a2 00 01 andi r2,r13,0x1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8004258: a1 b6 68 00 and r13,r13,r22 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 800425c: b5 ac 70 00 add r14,r13,r12 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 8004260: 5c 40 ff a9 bne r2,r0,8004104 <_Heap_Walk+0x284> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8004264: 29 86 00 00 lw r6,(r12+0) 8004268: bb 60 18 00 mv r3,fp 800426c: ba 00 08 00 mv r1,r16 8004270: 38 63 c5 00 ori r3,r3,0xc500 8004274: b9 80 20 00 mv r4,r12 8004278: b9 a0 28 00 mv r5,r13 800427c: d9 e0 00 00 call r15 8004280: e3 ff ff a8 bi 8004120 <_Heap_Walk+0x2a0> ); return false; } if ( !prev_used ) { 8004284: 22 31 00 01 andi r17,r17,0x1 8004288: 46 20 00 0e be r17,r0,80042c0 <_Heap_Walk+0x440> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 800428c: 29 63 00 08 lw r3,(r11+8) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 8004290: 44 6b 00 04 be r3,r11,80042a0 <_Heap_Walk+0x420> if ( free_block == block ) { 8004294: 44 6c ff ed be r3,r12,8004248 <_Heap_Walk+0x3c8> return true; } free_block = free_block->next; 8004298: 28 63 00 08 lw r3,(r3+8) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 800429c: 5c 6b ff fe bne r3,r11,8004294 <_Heap_Walk+0x414> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80042a0: 78 03 08 01 mvhi r3,0x801 80042a4: ba 00 08 00 mv r1,r16 80042a8: 38 63 c6 b0 ori r3,r3,0xc6b0 80042ac: b9 80 20 00 mv r4,r12 80042b0: 34 02 00 01 mvi r2,1 80042b4: d9 e0 00 00 call r15 80042b8: 34 01 00 00 mvi r1,0 80042bc: e3 ff ff 13 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !prev_used ) { (*printer)( 80042c0: 78 03 08 01 mvhi r3,0x801 80042c4: ba 00 08 00 mv r1,r16 80042c8: 38 63 c6 80 ori r3,r3,0xc680 80042cc: b9 80 20 00 mv r4,r12 80042d0: 34 02 00 01 mvi r2,1 80042d4: d9 e0 00 00 call r15 80042d8: ba 20 08 00 mv r1,r17 80042dc: e3 ff ff 0b bi 8003f08 <_Heap_Walk+0x88> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80042e0: 2b 88 00 54 lw r8,(sp+84) 80042e4: e3 ff ff c7 bi 8004200 <_Heap_Walk+0x380> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 80042e8: 2b 86 00 58 lw r6,(sp+88) 80042ec: e3 ff ff c0 bi 80041ec <_Heap_Walk+0x36c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 80042f0: 78 03 08 01 mvhi r3,0x801 80042f4: ba 00 08 00 mv r1,r16 80042f8: 38 63 c3 48 ori r3,r3,0xc348 80042fc: 34 02 00 01 mvi r2,1 8004300: d9 e0 00 00 call r15 8004304: ba 40 08 00 mv r1,r18 8004308: e3 ff ff 00 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 800430c: 78 03 08 01 mvhi r3,0x801 8004310: ba 00 08 00 mv r1,r16 8004314: 38 63 c3 5c ori r3,r3,0xc35c 8004318: ba 40 20 00 mv r4,r18 800431c: 34 02 00 01 mvi r2,1 8004320: d9 e0 00 00 call r15 8004324: 34 01 00 00 mvi r1,0 8004328: e3 ff fe f8 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 800432c: 78 03 08 01 mvhi r3,0x801 8004330: ba 00 08 00 mv r1,r16 8004334: 38 63 c3 7c ori r3,r3,0xc37c 8004338: ba 60 20 00 mv r4,r19 800433c: 34 02 00 01 mvi r2,1 8004340: d9 e0 00 00 call r15 8004344: b9 a0 08 00 mv r1,r13 8004348: e3 ff fe f0 bi 8003f08 <_Heap_Walk+0x88> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 800434c: 78 03 08 01 mvhi r3,0x801 8004350: ba 00 08 00 mv r1,r16 8004354: 38 63 c5 28 ori r3,r3,0xc528 8004358: b9 80 20 00 mv r4,r12 800435c: b9 c0 28 00 mv r5,r14 8004360: 34 02 00 01 mvi r2,1 8004364: d9 e0 00 00 call r15 8004368: 34 01 00 00 mvi r1,0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 800436c: e3 ff fe e7 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 8004370: 78 03 08 01 mvhi r3,0x801 8004374: ba 00 08 00 mv r1,r16 8004378: 38 63 c5 58 ori r3,r3,0xc558 800437c: b9 80 20 00 mv r4,r12 8004380: b9 a0 28 00 mv r5,r13 8004384: 34 02 00 01 mvi r2,1 8004388: d9 e0 00 00 call r15 800438c: 34 01 00 00 mvi r1,0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 8004390: e3 ff fe de bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 8004394: 78 03 08 01 mvhi r3,0x801 8004398: ba 00 08 00 mv r1,r16 800439c: 38 63 c3 a0 ori r3,r3,0xc3a0 80043a0: b9 80 20 00 mv r4,r12 80043a4: 34 02 00 01 mvi r2,1 80043a8: d9 e0 00 00 call r15 80043ac: ba 20 08 00 mv r1,r17 80043b0: e3 ff fe d6 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 80043b4: 78 03 08 01 mvhi r3,0x801 80043b8: ba 00 08 00 mv r1,r16 80043bc: 38 63 c3 d4 ori r3,r3,0xc3d4 80043c0: 34 02 00 01 mvi r2,1 80043c4: d9 e0 00 00 call r15 80043c8: ba 20 08 00 mv r1,r17 80043cc: e3 ff fe cf bi 8003f08 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 80043d0: 78 03 08 01 mvhi r3,0x801 80043d4: ba 00 08 00 mv r1,r16 80043d8: 38 63 c4 30 ori r3,r3,0xc430 80043dc: 34 02 00 01 mvi r2,1 80043e0: d9 e0 00 00 call r15 80043e4: ba a0 08 00 mv r1,r21 80043e8: e3 ff fe c8 bi 8003f08 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 80043ec: 78 03 08 01 mvhi r3,0x801 80043f0: ba 00 08 00 mv r1,r16 80043f4: 38 63 c4 68 ori r3,r3,0xc468 80043f8: b9 c0 20 00 mv r4,r14 80043fc: 34 02 00 01 mvi r2,1 8004400: d9 e0 00 00 call r15 8004404: 34 01 00 00 mvi r1,0 8004408: e3 ff fe c0 bi 8003f08 <_Heap_Walk+0x88> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 800440c: 78 03 08 01 mvhi r3,0x801 8004410: ba 00 08 00 mv r1,r16 8004414: 38 63 c4 48 ori r3,r3,0xc448 8004418: b9 c0 20 00 mv r4,r14 800441c: 34 02 00 01 mvi r2,1 8004420: d9 e0 00 00 call r15 8004424: 34 01 00 00 mvi r1,0 8004428: e3 ff fe b8 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( free_block->prev != prev_block ) { (*printer)( 800442c: 78 03 08 01 mvhi r3,0x801 8004430: ba 00 08 00 mv r1,r16 8004434: 38 63 c4 b4 ori r3,r3,0xc4b4 8004438: b9 c0 20 00 mv r4,r14 800443c: 34 02 00 01 mvi r2,1 8004440: d9 e0 00 00 call r15 8004444: 34 01 00 00 mvi r1,0 8004448: e3 ff fe b0 bi 8003f08 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 800444c: 78 03 08 01 mvhi r3,0x801 8004450: ba 00 08 00 mv r1,r16 8004454: 38 63 c4 98 ori r3,r3,0xc498 8004458: b9 c0 20 00 mv r4,r14 800445c: 34 02 00 01 mvi r2,1 8004460: d9 e0 00 00 call r15 8004464: 34 01 00 00 mvi r1,0 8004468: e3 ff fe a8 bi 8003f08 <_Heap_Walk+0x88> 08003d50 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003d50: 37 9c ff e4 addi sp,sp,-28 8003d54: 5b 8b 00 1c sw (sp+28),r11 8003d58: 5b 8c 00 18 sw (sp+24),r12 8003d5c: 5b 8d 00 14 sw (sp+20),r13 8003d60: 5b 8e 00 10 sw (sp+16),r14 8003d64: 5b 8f 00 0c sw (sp+12),r15 8003d68: 5b 90 00 08 sw (sp+8),r16 8003d6c: 5b 9d 00 04 sw (sp+4),ra #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; 8003d70: 34 06 00 00 mvi r6,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003d74: b8 20 58 00 mv r11,r1 8003d78: 20 a5 ff ff andi r5,r5,0xffff 8003d7c: b8 40 78 00 mv r15,r2 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 8003d80: 58 25 00 18 sw (r1+24),r5 /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 8003d84: 0c 26 00 10 sh (r1+16),r6 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; 8003d88: 58 26 00 1c sw (r1+28),r6 information->inactive_per_block = 0; 8003d8c: 58 26 00 30 sw (r1+48),r6 information->object_blocks = 0; 8003d90: 58 26 00 34 sw (r1+52),r6 information->inactive = 0; 8003d94: 0c 26 00 2c sh (r1+44),r6 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 8003d98: 0d 63 00 04 sh (r11+4),r3 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 8003d9c: 59 62 00 00 sw (r11+0),r2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003da0: 78 0d 08 01 mvhi r13,0x801 8003da4: 34 02 00 02 mvi r2,2 8003da8: b9 e0 08 00 mv r1,r15 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003dac: b8 80 60 00 mv r12,r4 8003db0: b8 60 70 00 mv r14,r3 8003db4: b8 e0 80 00 mv r16,r7 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003db8: 39 ad c7 bc ori r13,r13,0xc7bc 8003dbc: fb ff f1 0d calli 80001f0 <__ashlsi3> 8003dc0: b5 a1 08 00 add r1,r13,r1 8003dc4: 28 2d 00 00 lw r13,(r1+0) 8003dc8: 34 02 00 02 mvi r2,2 8003dcc: b9 c0 08 00 mv r1,r14 8003dd0: fb ff f1 08 calli 80001f0 <__ashlsi3> 8003dd4: b5 a1 08 00 add r1,r13,r1 8003dd8: 58 2b 00 00 sw (r1+0),r11 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 8003ddc: 34 02 00 1f mvi r2,31 8003de0: b9 80 08 00 mv r1,r12 8003de4: fb ff f1 2b calli 8000290 <__lshrsi3> 8003de8: 20 22 00 ff andi r2,r1,0xff maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003dec: 78 05 7f ff mvhi r5,0x7fff 8003df0: 38 a5 ff ff ori r5,r5,0xffff _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 8003df4: 31 62 00 12 sb (r11+18),r2 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003df8: a1 85 60 00 and r12,r12,r5 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 8003dfc: 44 40 00 02 be r2,r0,8003e04 <_Objects_Initialize_information+0xb4> 8003e00: 45 80 00 2c be r12,r0,8003eb0 <_Objects_Initialize_information+0x160> information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 8003e04: 78 01 08 01 mvhi r1,0x801 8003e08: 38 21 c6 20 ori r1,r1,0xc620 8003e0c: 59 61 00 1c sw (r11+28),r1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 8003e10: 34 02 00 18 mvi r2,24 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 8003e14: 0d 6c 00 14 sh (r11+20),r12 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 8003e18: b9 e0 08 00 mv r1,r15 8003e1c: fb ff f0 f5 calli 80001f0 <__ashlsi3> 8003e20: 78 02 00 01 mvhi r2,0x1 8003e24: 38 42 00 00 ori r2,r2,0x0 8003e28: b8 22 68 00 or r13,r1,r2 8003e2c: 34 02 00 1b mvi r2,27 8003e30: b9 c0 08 00 mv r1,r14 8003e34: fb ff f0 ef calli 80001f0 <__ashlsi3> 8003e38: 7d 83 00 00 cmpnei r3,r12,0 8003e3c: b9 a1 08 00 or r1,r13,r1 8003e40: b8 23 08 00 or r1,r1,r3 8003e44: 59 61 00 08 sw (r11+8),r1 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 8003e48: 22 02 00 03 andi r2,r16,0x3 8003e4c: ba 00 08 00 mv r1,r16 8003e50: 5c 40 00 14 bne r2,r0,8003ea0 <_Objects_Initialize_information+0x150> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003e54: 35 63 00 24 addi r3,r11,36 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8003e58: 35 62 00 20 addi r2,r11,32 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 8003e5c: 0d 61 00 38 sh (r11+56),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8003e60: 34 01 00 00 mvi r1,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003e64: 59 63 00 20 sw (r11+32),r3 the_chain->permanent_null = NULL; 8003e68: 59 61 00 24 sw (r11+36),r1 the_chain->last = _Chain_Head(the_chain); 8003e6c: 59 62 00 28 sw (r11+40),r2 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 8003e70: 45 81 00 03 be r12,r1,8003e7c <_Objects_Initialize_information+0x12c> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 8003e74: b9 60 08 00 mv r1,r11 8003e78: fb ff fe 84 calli 8003888 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 8003e7c: 2b 9d 00 04 lw ra,(sp+4) 8003e80: 2b 8b 00 1c lw r11,(sp+28) 8003e84: 2b 8c 00 18 lw r12,(sp+24) 8003e88: 2b 8d 00 14 lw r13,(sp+20) 8003e8c: 2b 8e 00 10 lw r14,(sp+16) 8003e90: 2b 8f 00 0c lw r15,(sp+12) 8003e94: 2b 90 00 08 lw r16,(sp+8) 8003e98: 37 9c 00 1c addi sp,sp,28 8003e9c: c3 a0 00 00 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 8003ea0: 36 10 00 04 addi r16,r16,4 <== NOT EXECUTED 8003ea4: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED 8003ea8: a2 01 08 00 and r1,r16,r1 <== NOT EXECUTED 8003eac: e3 ff ff ea bi 8003e54 <_Objects_Initialize_information+0x104> <== NOT EXECUTED /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 8003eb0: b9 80 08 00 mv r1,r12 8003eb4: 34 02 00 01 mvi r2,1 8003eb8: 34 03 00 14 mvi r3,20 8003ebc: fb ff fd ff calli 80036b8 <_Internal_error_Occurred> 08003f3c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f3c: 37 9c ff ec addi sp,sp,-20 8003f40: 5b 8b 00 14 sw (sp+20),r11 8003f44: 5b 8c 00 10 sw (sp+16),r12 8003f48: 5b 8d 00 0c sw (sp+12),r13 8003f4c: 5b 8e 00 08 sw (sp+8),r14 8003f50: 5b 9d 00 04 sw (sp+4),ra /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003f54: 28 2c 00 08 lw r12,(r1+8) block_count = (information->maximum - index_base) / 8003f58: 2c 2d 00 14 lhu r13,(r1+20) */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f5c: b8 20 70 00 mv r14,r1 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 8003f60: 2c 21 00 10 lhu r1,(r1+16) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003f64: 21 8c ff ff andi r12,r12,0xffff block_count = (information->maximum - index_base) / 8003f68: b9 a0 10 00 mv r2,r13 8003f6c: c8 2c 08 00 sub r1,r1,r12 8003f70: f8 00 57 78 calli 8019d50 <__udivsi3> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f74: 44 20 00 09 be r1,r0,8003f98 <_Objects_Shrink_information+0x5c> if ( information->inactive_per_block[ block ] == 8003f78: 29 c5 00 30 lw r5,(r14+48) information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 8003f7c: 34 0b 00 04 mvi r11,4 8003f80: 34 03 00 00 mvi r3,0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003f84: 28 a2 00 00 lw r2,(r5+0) 8003f88: 45 a2 00 11 be r13,r2,8003fcc <_Objects_Shrink_information+0x90> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f8c: 34 63 00 01 addi r3,r3,1 if ( information->inactive_per_block[ block ] == 8003f90: b4 ab 10 00 add r2,r5,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003f94: 54 23 00 08 bgu r1,r3,8003fb4 <_Objects_Shrink_information+0x78> return; } index_base += information->allocation_size; } } 8003f98: 2b 9d 00 04 lw ra,(sp+4) 8003f9c: 2b 8b 00 14 lw r11,(sp+20) 8003fa0: 2b 8c 00 10 lw r12,(sp+16) 8003fa4: 2b 8d 00 0c lw r13,(sp+12) 8003fa8: 2b 8e 00 08 lw r14,(sp+8) 8003fac: 37 9c 00 14 addi sp,sp,20 8003fb0: c3 a0 00 00 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003fb4: 28 42 00 00 lw r2,(r2+0) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 8003fb8: b5 8d 60 00 add r12,r12,r13 8003fbc: 35 64 00 04 addi r4,r11,4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003fc0: 45 a2 00 04 be r13,r2,8003fd0 <_Objects_Shrink_information+0x94> 8003fc4: b8 80 58 00 mv r11,r4 8003fc8: e3 ff ff f1 bi 8003f8c <_Objects_Shrink_information+0x50> 8003fcc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 8003fd0: 29 c1 00 20 lw r1,(r14+32) do { index = _Objects_Get_index( the_object->id ); 8003fd4: 28 22 00 08 lw r2,(r1+8) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 8003fd8: 28 2d 00 00 lw r13,(r1+0) * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 8003fdc: 20 42 ff ff andi r2,r2,0xffff /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 8003fe0: 55 82 00 05 bgu r12,r2,8003ff4 <_Objects_Shrink_information+0xb8> (index < (index_base + information->allocation_size))) { 8003fe4: 2d c3 00 14 lhu r3,(r14+20) 8003fe8: b5 83 18 00 add r3,r12,r3 8003fec: 50 43 00 02 bgeu r2,r3,8003ff4 <_Objects_Shrink_information+0xb8> _Chain_Extract( &extract_me->Node ); 8003ff0: f8 00 12 63 calli 800897c <_Chain_Extract> } } while ( the_object ); 8003ff4: 45 a0 00 03 be r13,r0,8004000 <_Objects_Shrink_information+0xc4> 8003ff8: b9 a0 08 00 mv r1,r13 8003ffc: e3 ff ff f6 bi 8003fd4 <_Objects_Shrink_information+0x98> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 8004000: 29 c1 00 34 lw r1,(r14+52) 8004004: b4 2b 08 00 add r1,r1,r11 8004008: 28 21 00 00 lw r1,(r1+0) 800400c: f8 00 07 c0 calli 8005f0c <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 8004010: 2d c3 00 2c lhu r3,(r14+44) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004014: 29 c1 00 34 lw r1,(r14+52) information->inactive_per_block[ block ] = 0; 8004018: 29 c4 00 30 lw r4,(r14+48) information->inactive -= information->allocation_size; 800401c: 2d c2 00 14 lhu r2,(r14+20) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004020: b4 2b 08 00 add r1,r1,r11 information->inactive_per_block[ block ] = 0; 8004024: b4 8b 58 00 add r11,r4,r11 information->inactive -= information->allocation_size; 8004028: c8 62 10 00 sub r2,r3,r2 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 800402c: 59 6d 00 00 sw (r11+0),r13 information->inactive -= information->allocation_size; 8004030: 0d c2 00 2c sh (r14+44),r2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004034: 58 2d 00 00 sw (r1+0),r13 return; } index_base += information->allocation_size; } } 8004038: 2b 9d 00 04 lw ra,(sp+4) 800403c: 2b 8b 00 14 lw r11,(sp+20) 8004040: 2b 8c 00 10 lw r12,(sp+16) 8004044: 2b 8d 00 0c lw r13,(sp+12) 8004048: 2b 8e 00 08 lw r14,(sp+8) 800404c: 37 9c 00 14 addi sp,sp,20 8004050: c3 a0 00 00 ret 08040c28 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 8040c28: 37 9c ff f4 addi sp,sp,-12 8040c2c: 5b 8b 00 08 sw (sp+8),r11 8040c30: 5b 9d 00 04 sw (sp+4),ra 8040c34: b8 20 10 00 mv r2,r1 8040c38: 78 01 08 07 mvhi r1,0x807 8040c3c: 38 21 54 9c ori r1,r1,0x549c 8040c40: 37 83 00 0c addi r3,sp,12 8040c44: fb ff 2e bd calli 800c738 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 8040c48: 2b 82 00 0c lw r2,(sp+12) 8040c4c: b8 20 58 00 mv r11,r1 8040c50: 44 40 00 05 be r2,r0,8040c64 <_Rate_monotonic_Timeout+0x3c> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8040c54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8040c58: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8040c5c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8040c60: c3 a0 00 00 ret <== NOT EXECUTED */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; 8040c64: 28 21 00 40 lw r1,(r1+64) if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8040c68: 28 23 00 10 lw r3,(r1+16) 8040c6c: 20 63 40 00 andi r3,r3,0x4000 8040c70: 44 62 00 04 be r3,r2,8040c80 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) { 8040c74: 28 23 00 20 lw r3,(r1+32) 8040c78: 29 62 00 08 lw r2,(r11+8) 8040c7c: 44 62 00 1a be r3,r2,8040ce4 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 8040c80: 29 62 00 38 lw r2,(r11+56) 8040c84: 34 01 00 01 mvi r1,1 8040c88: 44 41 00 0c be r2,r1,8040cb8 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 8040c8c: 34 01 00 04 mvi r1,4 8040c90: 59 61 00 38 sw (r11+56),r1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8040c94: 78 01 08 07 mvhi r1,0x807 8040c98: 38 21 50 24 ori r1,r1,0x5024 8040c9c: 28 22 00 00 lw r2,(r1+0) 8040ca0: 34 42 ff ff addi r2,r2,-1 8040ca4: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8040ca8: 2b 9d 00 04 lw ra,(sp+4) 8040cac: 2b 8b 00 08 lw r11,(sp+8) 8040cb0: 37 9c 00 0c addi sp,sp,12 8040cb4: c3 a0 00 00 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 8040cb8: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8040cbc: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8040cc0: b9 60 08 00 mv r1,r11 8040cc4: fb ff fe a7 calli 8040760 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040cc8: 29 61 00 3c lw r1,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040ccc: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040cd0: 59 61 00 1c sw (r11+28),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040cd4: 78 01 08 07 mvhi r1,0x807 8040cd8: 38 21 51 00 ori r1,r1,0x5100 8040cdc: fb ff 36 aa calli 800e784 <_Watchdog_Insert> 8040ce0: e3 ff ff ed bi 8040c94 <_Rate_monotonic_Timeout+0x6c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 8040ce4: 78 02 10 03 mvhi r2,0x1003 8040ce8: 38 42 ff f8 ori r2,r2,0xfff8 8040cec: fb ff b5 5c calli 802e25c <_Thread_Clear_state> 8040cf0: e3 ff ff f4 bi 8040cc0 <_Rate_monotonic_Timeout+0x98> 08008c30 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8008c30: 37 9c ff e4 addi sp,sp,-28 8008c34: 5b 8b 00 0c sw (sp+12),r11 8008c38: 5b 8c 00 08 sw (sp+8),r12 8008c3c: 5b 9d 00 04 sw (sp+4),ra 8008c40: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 8008c44: 90 00 60 00 rcsr r12,IE 8008c48: 34 01 ff fe mvi r1,-2 8008c4c: a1 81 08 00 and r1,r12,r1 8008c50: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8008c54: 78 02 08 01 mvhi r2,0x801 8008c58: 38 42 c8 b4 ori r2,r2,0xc8b4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c5c: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c60: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c64: 38 63 c9 c4 ori r3,r3,0xc9c4 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c68: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c6c: 28 63 00 00 lw r3,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008c70: 5b 81 00 14 sw (sp+20),r1 8008c74: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008c78: b8 60 20 00 mv r4,r3 8008c7c: 44 60 00 03 be r3,r0,8008c88 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008c80: d8 60 00 00 call r3 <== NOT EXECUTED 8008c84: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008c88: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008c8c: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 8008c90: 37 81 00 10 addi r1,sp,16 8008c94: 37 82 00 18 addi r2,sp,24 now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8008c98: 5b 83 00 18 sw (sp+24),r3 8008c9c: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 8008ca0: fb ff f2 7e calli 8005698 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 8008ca4: 2b 81 00 14 lw r1,(sp+20) 8008ca8: 59 61 00 04 sw (r11+4),r1 8008cac: 2b 81 00 10 lw r1,(sp+16) 8008cb0: 59 61 00 00 sw (r11+0),r1 } 8008cb4: 2b 9d 00 04 lw ra,(sp+4) 8008cb8: 2b 8b 00 0c lw r11,(sp+12) 8008cbc: 2b 8c 00 08 lw r12,(sp+8) 8008cc0: 37 9c 00 1c addi sp,sp,28 8008cc4: c3 a0 00 00 ret 08008cc8 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 8008cc8: 37 9c ff e4 addi sp,sp,-28 8008ccc: 5b 8b 00 0c sw (sp+12),r11 8008cd0: 5b 8c 00 08 sw (sp+8),r12 8008cd4: 5b 9d 00 04 sw (sp+4),ra 8008cd8: b8 20 58 00 mv r11,r1 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 8008cdc: 90 00 60 00 rcsr r12,IE 8008ce0: 34 01 ff fe mvi r1,-2 8008ce4: a1 81 08 00 and r1,r12,r1 8008ce8: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8008cec: 78 02 08 01 mvhi r2,0x801 8008cf0: 38 42 c8 a4 ori r2,r2,0xc8a4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008cf4: 78 03 08 01 mvhi r3,0x801 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008cf8: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008cfc: 38 63 c9 c4 ori r3,r3,0xc9c4 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008d00: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d04: 28 63 00 00 lw r3,(r3+0) /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008d08: 5b 81 00 14 sw (sp+20),r1 8008d0c: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d10: b8 60 20 00 mv r4,r3 8008d14: 44 60 00 03 be r3,r0,8008d20 <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008d18: d8 60 00 00 call r3 <== NOT EXECUTED 8008d1c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008d20: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008d24: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8008d28: 37 81 00 10 addi r1,sp,16 8008d2c: 37 82 00 18 addi r2,sp,24 up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 8008d30: 5b 83 00 18 sw (sp+24),r3 8008d34: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8008d38: fb ff f2 58 calli 8005698 <_Timespec_Add_to> *uptime = up; 8008d3c: 2b 81 00 14 lw r1,(sp+20) 8008d40: 59 61 00 04 sw (r11+4),r1 8008d44: 2b 81 00 10 lw r1,(sp+16) 8008d48: 59 61 00 00 sw (r11+0),r1 } 8008d4c: 2b 9d 00 04 lw ra,(sp+4) 8008d50: 2b 8b 00 0c lw r11,(sp+12) 8008d54: 2b 8c 00 08 lw r12,(sp+8) 8008d58: 37 9c 00 1c addi sp,sp,28 8008d5c: c3 a0 00 00 ret 0800405c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 800405c: 37 9c ff ec addi sp,sp,-20 8004060: 5b 8b 00 14 sw (sp+20),r11 8004064: 5b 8c 00 10 sw (sp+16),r12 8004068: 5b 8d 00 0c sw (sp+12),r13 800406c: 5b 8e 00 08 sw (sp+8),r14 8004070: 5b 9d 00 04 sw (sp+4),ra 8004074: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 8004078: 28 2d 00 10 lw r13,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 800407c: b8 40 60 00 mv r12,r2 8004080: 20 6e 00 ff andi r14,r3,0xff /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 8004084: f8 00 04 e1 calli 8005408 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 8004088: 29 61 00 14 lw r1,(r11+20) 800408c: 44 2c 00 04 be r1,r12,800409c <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 8004090: b9 80 10 00 mv r2,r12 8004094: b9 60 08 00 mv r1,r11 8004098: f8 00 04 37 calli 8005174 <_Thread_Set_priority> _ISR_Disable( level ); 800409c: 90 00 60 00 rcsr r12,IE 80040a0: 34 02 ff fe mvi r2,-2 80040a4: a1 82 10 00 and r2,r12,r2 80040a8: d0 02 00 00 wcsr IE,r2 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 80040ac: 29 61 00 10 lw r1,(r11+16) if ( state != STATES_TRANSIENT ) { 80040b0: 34 04 00 04 mvi r4,4 80040b4: 44 24 00 21 be r1,r4,8004138 <_Thread_Change_priority+0xdc> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 80040b8: a1 a4 68 00 and r13,r13,r4 80040bc: 45 a0 00 0d be r13,r0,80040f0 <_Thread_Change_priority+0x94> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 80040c0: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 80040c4: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED 80040c8: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED 80040cc: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 80040d0: 5c 20 00 10 bne r1,r0,8004110 <_Thread_Change_priority+0xb4> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 80040d4: 2b 9d 00 04 lw ra,(sp+4) 80040d8: 2b 8b 00 14 lw r11,(sp+20) 80040dc: 2b 8c 00 10 lw r12,(sp+16) 80040e0: 2b 8d 00 0c lw r13,(sp+12) 80040e4: 2b 8e 00 08 lw r14,(sp+8) 80040e8: 37 9c 00 14 addi sp,sp,20 80040ec: c3 a0 00 00 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 80040f0: 34 02 ff fb mvi r2,-5 80040f4: a0 22 10 00 and r2,r1,r2 80040f8: 59 62 00 10 sw (r11+16),r2 _ISR_Enable( level ); 80040fc: d0 0c 00 00 wcsr IE,r12 if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004100: 78 02 00 03 mvhi r2,0x3 8004104: 38 42 be e0 ori r2,r2,0xbee0 8004108: a0 22 08 00 and r1,r1,r2 800410c: 44 20 ff f2 be r1,r0,80040d4 <_Thread_Change_priority+0x78> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 8004110: 29 61 00 44 lw r1,(r11+68) 8004114: b9 60 10 00 mv r2,r11 8004118: f8 00 03 dc calli 8005088 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 800411c: 2b 9d 00 04 lw ra,(sp+4) 8004120: 2b 8b 00 14 lw r11,(sp+20) 8004124: 2b 8c 00 10 lw r12,(sp+16) 8004128: 2b 8d 00 0c lw r13,(sp+12) 800412c: 2b 8e 00 08 lw r14,(sp+8) 8004130: 37 9c 00 14 addi sp,sp,20 8004134: c3 a0 00 00 ret } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 8004138: 21 ad 00 04 andi r13,r13,0x4 800413c: 45 a0 00 3a be r13,r0,8004224 <_Thread_Change_priority+0x1c8> 8004140: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004144: 38 21 c8 d4 ori r1,r1,0xc8d4 <== NOT EXECUTED _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 8004148: d0 0c 00 00 wcsr IE,r12 800414c: d0 02 00 00 wcsr IE,r2 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 8004150: 2c 21 00 00 lhu r1,(r1+0) */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 8004154: 78 02 08 01 mvhi r2,0x801 8004158: 38 42 c7 b0 ori r2,r2,0xc7b0 800415c: 28 4e 00 00 lw r14,(r2+0) 8004160: 20 21 ff ff andi r1,r1,0xffff 8004164: 34 02 00 ff mvi r2,255 8004168: 54 22 00 49 bgu r1,r2,800428c <_Thread_Change_priority+0x230> 800416c: 78 0b 08 01 mvhi r11,0x801 8004170: 39 6b b0 44 ori r11,r11,0xb044 8004174: b5 61 08 00 add r1,r11,r1 8004178: 40 2d 00 00 lbu r13,(r1+0) 800417c: 35 ad 00 08 addi r13,r13,8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8004180: 78 02 08 01 mvhi r2,0x801 8004184: b5 ad 08 00 add r1,r13,r13 8004188: 38 42 c9 50 ori r2,r2,0xc950 800418c: b4 41 10 00 add r2,r2,r1 8004190: 2c 41 00 00 lhu r1,(r2+0) 8004194: 34 02 00 ff mvi r2,255 8004198: 54 22 00 38 bgu r1,r2,8004278 <_Thread_Change_priority+0x21c> 800419c: b5 61 58 00 add r11,r11,r1 80041a0: 41 6b 00 00 lbu r11,(r11+0) 80041a4: 35 6b 00 08 addi r11,r11,8 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041a8: 34 02 00 04 mvi r2,4 80041ac: b9 a0 08 00 mv r1,r13 80041b0: fb ff f0 10 calli 80001f0 <__ashlsi3> 80041b4: b5 61 08 00 add r1,r11,r1 80041b8: b4 21 10 00 add r2,r1,r1 80041bc: b4 41 08 00 add r1,r2,r1 80041c0: 34 02 00 02 mvi r2,2 80041c4: fb ff f0 0b calli 80001f0 <__ashlsi3> 80041c8: b5 c1 08 00 add r1,r14,r1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041cc: 78 02 08 01 mvhi r2,0x801 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041d0: 28 23 00 00 lw r3,(r1+0) * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041d4: 38 42 c8 e0 ori r2,r2,0xc8e0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041d8: 78 01 08 01 mvhi r1,0x801 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 80041dc: 28 42 00 00 lw r2,(r2+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 80041e0: 38 21 c8 b0 ori r1,r1,0xc8b0 80041e4: 58 23 00 00 sw (r1+0),r3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 80041e8: 44 62 00 07 be r3,r2,8004204 <_Thread_Change_priority+0x1a8> _Thread_Executing->is_preemptible ) 80041ec: 40 41 00 75 lbu r1,(r2+117) 80041f0: 44 20 00 05 be r1,r0,8004204 <_Thread_Change_priority+0x1a8> _Context_Switch_necessary = true; 80041f4: 78 01 08 01 mvhi r1,0x801 80041f8: 38 21 c8 f0 ori r1,r1,0xc8f0 80041fc: 34 02 00 01 mvi r2,1 8004200: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8004204: d0 0c 00 00 wcsr IE,r12 } 8004208: 2b 9d 00 04 lw ra,(sp+4) 800420c: 2b 8b 00 14 lw r11,(sp+20) 8004210: 2b 8c 00 10 lw r12,(sp+16) 8004214: 2b 8d 00 0c lw r13,(sp+12) 8004218: 2b 8e 00 08 lw r14,(sp+8) 800421c: 37 9c 00 14 addi sp,sp,20 8004220: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004224: 29 63 00 90 lw r3,(r11+144) 8004228: 2d 64 00 96 lhu r4,(r11+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 800422c: 78 01 08 01 mvhi r1,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004230: 2c 65 00 00 lhu r5,(r3+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004234: 38 21 c8 d4 ori r1,r1,0xc8d4 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 8004238: 59 6d 00 10 sw (r11+16),r13 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800423c: b8 a4 20 00 or r4,r5,r4 8004240: 0c 64 00 00 sh (r3+0),r4 _Priority_Major_bit_map |= the_priority_map->ready_major; 8004244: 2c 23 00 00 lhu r3,(r1+0) 8004248: 2d 64 00 94 lhu r4,(r11+148) 800424c: b8 83 18 00 or r3,r4,r3 8004250: 20 63 ff ff andi r3,r3,0xffff 8004254: 0c 23 00 00 sh (r1+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 8004258: 45 cd 00 14 be r14,r13,80042a8 <_Thread_Change_priority+0x24c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 800425c: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 8004260: 28 64 00 00 lw r4,(r3+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 8004264: 59 63 00 04 sw (r11+4),r3 before_node = after_node->next; after_node->next = the_node; 8004268: 58 6b 00 00 sw (r3+0),r11 the_node->next = before_node; before_node->previous = the_node; 800426c: 58 8b 00 04 sw (r4+4),r11 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 8004270: 59 64 00 00 sw (r11+0),r4 8004274: e3 ff ff b5 bi 8004148 <_Thread_Change_priority+0xec> { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8004278: 34 02 00 08 mvi r2,8 800427c: fb ff f0 05 calli 8000290 <__lshrsi3> 8004280: b5 61 08 00 add r1,r11,r1 8004284: 40 2b 00 00 lbu r11,(r1+0) 8004288: e3 ff ff c8 bi 80041a8 <_Thread_Change_priority+0x14c> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 800428c: 34 02 00 08 mvi r2,8 8004290: 78 0b 08 01 mvhi r11,0x801 8004294: fb ff ef ff calli 8000290 <__lshrsi3> 8004298: 39 6b b0 44 ori r11,r11,0xb044 800429c: b5 61 08 00 add r1,r11,r1 80042a0: 40 2d 00 00 lbu r13,(r1+0) 80042a4: e3 ff ff b7 bi 8004180 <_Thread_Change_priority+0x124> _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 80042a8: 29 63 00 8c lw r3,(r11+140) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 80042ac: 34 64 00 04 addi r4,r3,4 80042b0: 59 64 00 00 sw (r11+0),r4 old_last_node = the_chain->last; 80042b4: 28 64 00 08 lw r4,(r3+8) the_chain->last = the_node; 80042b8: 58 6b 00 08 sw (r3+8),r11 old_last_node->next = the_node; the_node->previous = old_last_node; 80042bc: 59 64 00 04 sw (r11+4),r4 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 80042c0: 58 8b 00 00 sw (r4+0),r11 80042c4: e3 ff ff a1 bi 8004148 <_Thread_Change_priority+0xec> 080049fc <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 80049fc: 37 9c ff f0 addi sp,sp,-16 8004a00: 5b 8b 00 10 sw (sp+16),r11 8004a04: 5b 8c 00 0c sw (sp+12),r12 8004a08: 5b 8d 00 08 sw (sp+8),r13 8004a0c: 5b 9d 00 04 sw (sp+4),ra uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 8004a10: 78 01 08 01 mvhi r1,0x801 8004a14: 38 21 c0 c4 ori r1,r1,0xc0c4 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a18: 28 22 00 20 lw r2,(r1+32) 8004a1c: 28 29 00 24 lw r9,(r1+36) uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 8004a20: 28 2a 00 10 lw r10,(r1+16) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a24: 64 42 00 00 cmpei r2,r2,0 8004a28: 65 29 00 00 cmpei r9,r9,0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; maximum_extensions = Configuration.maximum_extensions; 8004a2c: 28 2d 00 08 lw r13,(r1+8) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004a30: 99 22 48 00 xor r9,r9,r2 8004a34: b9 20 58 00 mv r11,r9 8004a38: 5d 20 00 37 bne r9,r0,8004b14 <_Thread_Handler_initialization+0x118> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a3c: 78 0c 08 01 mvhi r12,0x801 8004a40: 39 8c c0 c0 ori r12,r12,0xc0c0 8004a44: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a48: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 8004a4c: 78 05 08 01 mvhi r5,0x801 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a50: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a54: 78 04 08 01 mvhi r4,0x801 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a58: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 8004a5c: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a60: 78 06 08 01 mvhi r6,0x801 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a64: 38 84 c8 b0 ori r4,r4,0xc8b0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a68: 38 63 c8 c4 ori r3,r3,0xc8c4 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a6c: 38 c6 c7 b4 ori r6,r6,0xc7b4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a70: 39 08 c8 f0 ori r8,r8,0xc8f0 _Thread_Executing = NULL; 8004a74: 38 a5 c8 e0 ori r5,r5,0xc8e0 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004a78: 38 e7 c8 c0 ori r7,r7,0xc8c0 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a7c: b4 21 10 00 add r2,r1,r1 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004a80: 58 ca 00 00 sw (r6+0),r10 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004a84: 58 89 00 00 sw (r4+0),r9 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004a88: 58 69 00 00 sw (r3+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a8c: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004a90: 31 09 00 00 sb (r8+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004a94: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004a98: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004a9c: 58 a9 00 00 sw (r5+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004aa0: fb ff ed d4 calli 80001f0 <__ashlsi3> 8004aa4: f8 00 05 00 calli 8005ea4 <_Workspace_Allocate_or_fatal_error> 8004aa8: 78 03 08 01 mvhi r3,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004aac: 41 84 00 00 lbu r4,(r12+0) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004ab0: 38 63 c7 b0 ori r3,r3,0xc7b0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004ab4: b9 60 10 00 mv r2,r11 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004ab8: 58 61 00 00 sw (r3+0),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8004abc: b9 60 30 00 mv r6,r11 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004ac0: 34 23 00 04 addi r3,r1,4 8004ac4: 58 23 00 00 sw (r1+0),r3 the_chain->permanent_null = NULL; 8004ac8: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004acc: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004ad0: 34 42 00 01 addi r2,r2,1 8004ad4: 34 21 00 0c addi r1,r1,12 8004ad8: 50 82 ff fa bgeu r4,r2,8004ac0 <_Thread_Handler_initialization+0xc4> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004adc: 34 02 00 01 mvi r2,1 8004ae0: 78 01 08 01 mvhi r1,0x801 8004ae4: 38 21 c9 80 ori r1,r1,0xc980 8004ae8: b8 40 18 00 mv r3,r2 8004aec: b8 40 20 00 mv r4,r2 8004af0: 34 05 01 38 mvi r5,312 8004af4: 34 07 00 08 mvi r7,8 8004af8: fb ff fc 96 calli 8003d50 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004afc: 2b 9d 00 04 lw ra,(sp+4) 8004b00: 2b 8b 00 10 lw r11,(sp+16) 8004b04: 2b 8c 00 0c lw r12,(sp+12) 8004b08: 2b 8d 00 08 lw r13,(sp+8) 8004b0c: 37 9c 00 10 addi sp,sp,16 8004b10: c3 a0 00 00 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 8004b14: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004b18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004b1c: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004b20: fb ff fa e6 calli 80036b8 <_Internal_error_Occurred> <== NOT EXECUTED 08009a60 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 8009a60: 78 01 08 01 mvhi r1,0x801 8009a64: 38 21 c8 e0 ori r1,r1,0xc8e0 8009a68: 28 21 00 00 lw r1,(r1+0) ready = executing->ready; 8009a6c: 28 22 00 8c lw r2,(r1+140) _ISR_Disable( level ); 8009a70: 90 00 20 00 rcsr r4,IE 8009a74: 34 03 ff fe mvi r3,-2 8009a78: a0 83 18 00 and r3,r4,r3 8009a7c: d0 03 00 00 wcsr IE,r3 if ( _Chain_Has_only_one_node( ready ) ) { 8009a80: 28 46 00 00 lw r6,(r2+0) 8009a84: 28 45 00 08 lw r5,(r2+8) 8009a88: 44 c5 00 1f be r6,r5,8009b04 <_Thread_Reset_timeslice+0xa4> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 8009a8c: 28 25 00 00 lw r5,(r1+0) previous = the_node->previous; 8009a90: 28 26 00 04 lw r6,(r1+4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009a94: 34 47 00 04 addi r7,r2,4 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 8009a98: 58 c5 00 00 sw (r6+0),r5 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009a9c: 58 27 00 00 sw (r1+0),r7 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 8009aa0: 58 a6 00 04 sw (r5+4),r6 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 8009aa4: 28 45 00 08 lw r5,(r2+8) the_chain->last = the_node; 8009aa8: 58 41 00 08 sw (r2+8),r1 old_last_node->next = the_node; the_node->previous = old_last_node; 8009aac: 58 25 00 04 sw (r1+4),r5 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 8009ab0: 58 a1 00 00 sw (r5+0),r1 return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 8009ab4: d0 04 00 00 wcsr IE,r4 8009ab8: d0 03 00 00 wcsr IE,r3 if ( _Thread_Is_heir( executing ) ) 8009abc: 78 03 08 01 mvhi r3,0x801 8009ac0: 38 63 c8 b0 ori r3,r3,0xc8b0 8009ac4: 28 65 00 00 lw r5,(r3+0) 8009ac8: 44 25 00 07 be r1,r5,8009ae4 <_Thread_Reset_timeslice+0x84> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 8009acc: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8009ad0: 38 21 c8 f0 ori r1,r1,0xc8f0 <== NOT EXECUTED 8009ad4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009ad8: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED _ISR_Enable( level ); 8009adc: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED 8009ae0: c3 a0 00 00 ret <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 8009ae4: 28 42 00 00 lw r2,(r2+0) _Context_Switch_necessary = true; 8009ae8: 78 01 08 01 mvhi r1,0x801 8009aec: 38 21 c8 f0 ori r1,r1,0xc8f0 _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 8009af0: 58 62 00 00 sw (r3+0),r2 _Context_Switch_necessary = true; 8009af4: 34 02 00 01 mvi r2,1 8009af8: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8009afc: d0 04 00 00 wcsr IE,r4 8009b00: c3 a0 00 00 ret executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 8009b04: d0 04 00 00 wcsr IE,r4 return; 8009b08: c3 a0 00 00 ret 080060f8 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 80060f8: 37 9c ff f0 addi sp,sp,-16 80060fc: 5b 8b 00 08 sw (sp+8),r11 8006100: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 8006104: 28 25 00 10 lw r5,(r1+16) 8006108: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 800610c: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 8006110: 20 a5 00 01 andi r5,r5,0x1 8006114: 44 a4 00 06 be r5,r4,800612c <_Thread_Restart+0x34> return true; } return false; } 8006118: b8 80 08 00 mv r1,r4 800611c: 2b 9d 00 04 lw ra,(sp+4) 8006120: 2b 8b 00 08 lw r11,(sp+8) 8006124: 37 9c 00 10 addi sp,sp,16 8006128: c3 a0 00 00 ret Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 800612c: 5b 82 00 10 sw (sp+16),r2 8006130: 5b 83 00 0c sw (sp+12),r3 8006134: f8 00 00 b9 calli 8006418 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8006138: 2b 82 00 10 lw r2,(sp+16) 800613c: 2b 83 00 0c lw r3,(sp+12) 8006140: b9 60 08 00 mv r1,r11 8006144: f8 00 12 ce calli 800ac7c <_Thread_Reset> _Thread_Load_environment( the_thread ); 8006148: b9 60 08 00 mv r1,r11 800614c: f8 00 11 93 calli 800a798 <_Thread_Load_environment> _Thread_Ready( the_thread ); 8006150: b9 60 08 00 mv r1,r11 8006154: f8 00 12 66 calli 800aaec <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8006158: b9 60 08 00 mv r1,r11 800615c: f8 00 02 6f calli 8006b18 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8006160: 78 01 08 02 mvhi r1,0x802 8006164: 38 21 19 40 ori r1,r1,0x1940 8006168: 28 21 00 00 lw r1,(r1+0) 800616c: 34 04 00 01 mvi r4,1 8006170: 5d 61 ff ea bne r11,r1,8006118 <_Thread_Restart+0x20> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 8006174: 35 61 00 cc addi r1,r11,204 8006178: f8 00 04 0a calli 80071a0 <_CPU_Context_restore> 800617c: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 8006180: e3 ff ff e6 bi 8006118 <_Thread_Restart+0x20> <== NOT EXECUTED 08004b24 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004b24: 37 9c ff f8 addi sp,sp,-8 8004b28: 5b 8b 00 08 sw (sp+8),r11 8004b2c: 5b 9d 00 04 sw (sp+4),ra Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b30: 28 22 00 34 lw r2,(r1+52) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004b34: b8 20 58 00 mv r11,r1 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b38: 34 01 00 01 mvi r1,1 8004b3c: 44 41 00 0f be r2,r1,8004b78 <_Thread_queue_Dequeue+0x54> 8004b40: 78 02 08 00 mvhi r2,0x800 8004b44: 38 42 95 d0 ori r2,r2,0x95d0 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004b48: b9 60 08 00 mv r1,r11 8004b4c: d8 40 00 00 call r2 _ISR_Disable( level ); 8004b50: 90 00 10 00 rcsr r2,IE 8004b54: 34 03 ff fe mvi r3,-2 8004b58: a0 43 18 00 and r3,r2,r3 8004b5c: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004b60: 44 20 00 0f be r1,r0,8004b9c <_Thread_queue_Dequeue+0x78> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 8004b64: d0 02 00 00 wcsr IE,r2 return the_thread; } 8004b68: 2b 9d 00 04 lw ra,(sp+4) 8004b6c: 2b 8b 00 08 lw r11,(sp+8) 8004b70: 37 9c 00 08 addi sp,sp,8 8004b74: c3 a0 00 00 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004b78: 78 02 08 00 mvhi r2,0x800 8004b7c: 38 42 4b c4 ori r2,r2,0x4bc4 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004b80: b9 60 08 00 mv r1,r11 8004b84: d8 40 00 00 call r2 _ISR_Disable( level ); 8004b88: 90 00 10 00 rcsr r2,IE 8004b8c: 34 03 ff fe mvi r3,-2 8004b90: a0 43 18 00 and r3,r2,r3 8004b94: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004b98: 5c 20 ff f3 bne r1,r0,8004b64 <_Thread_queue_Dequeue+0x40> sync_state = the_thread_queue->sync_state; 8004b9c: 29 64 00 30 lw r4,(r11+48) 8004ba0: 34 03 00 01 mvi r3,1 8004ba4: 34 84 ff ff addi r4,r4,-1 8004ba8: 54 83 ff ef bgu r4,r3,8004b64 <_Thread_queue_Dequeue+0x40> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; 8004bac: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004bb0: 38 21 c8 e0 ori r1,r1,0xc8e0 <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004bb4: 34 03 00 03 mvi r3,3 <== NOT EXECUTED the_thread = _Thread_Executing; 8004bb8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004bbc: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED 8004bc0: e3 ff ff e9 bi 8004b64 <_Thread_queue_Dequeue+0x40> <== NOT EXECUTED 08004dcc <_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 ) { 8004dcc: 37 9c ff ec addi sp,sp,-20 8004dd0: 5b 8b 00 14 sw (sp+20),r11 8004dd4: 5b 8c 00 10 sw (sp+16),r12 8004dd8: 5b 8d 00 0c sw (sp+12),r13 8004ddc: 5b 8e 00 08 sw (sp+8),r14 8004de0: 5b 9d 00 04 sw (sp+4),ra Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 8004de4: 28 4b 00 14 lw r11,(r2+20) Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8004de8: b8 40 60 00 mv r12,r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004dec: 34 44 00 3c addi r4,r2,60 8004df0: 59 84 00 38 sw (r12+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004df4: 34 42 00 38 addi r2,r2,56 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8004df8: 34 04 00 00 mvi r4,0 8004dfc: b8 20 68 00 mv r13,r1 8004e00: 59 84 00 3c sw (r12+60),r4 the_chain->last = _Chain_Head(the_chain); 8004e04: 59 82 00 40 sw (r12+64),r2 _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 ]; 8004e08: b9 60 08 00 mv r1,r11 8004e0c: 34 02 00 06 mvi r2,6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8004e10: b8 60 70 00 mv r14,r3 _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 ]; 8004e14: fb ff ed 1f calli 8000290 <__lshrsi3> 8004e18: b4 21 10 00 add r2,r1,r1 8004e1c: b4 41 08 00 add r1,r2,r1 8004e20: 34 02 00 02 mvi r2,2 8004e24: fb ff ec f3 calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 8004e28: 21 62 00 20 andi r2,r11,0x20 _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 ]; 8004e2c: b5 a1 40 00 add r8,r13,r1 block_state = the_thread_queue->state; 8004e30: 29 a6 00 38 lw r6,(r13+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004e34: 5c 40 00 25 bne r2,r0,8004ec8 <_Thread_queue_Enqueue_priority+0xfc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004e38: 35 01 00 04 addi r1,r8,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004e3c: 34 0a ff fe mvi r10,-2 8004e40: 90 00 10 00 rcsr r2,IE 8004e44: a0 4a 48 00 and r9,r2,r10 8004e48: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->first; 8004e4c: 29 04 00 00 lw r4,(r8+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004e50: 44 81 00 69 be r4,r1,8004ff4 <_Thread_queue_Enqueue_priority+0x228> search_priority = search_thread->current_priority; 8004e54: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004e58: 50 ab 00 10 bgeu r5,r11,8004e98 <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004e5c: d0 02 00 00 wcsr IE,r2 8004e60: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004e64: 28 83 00 10 lw r3,(r4+16) 8004e68: a0 c3 18 00 and r3,r6,r3 8004e6c: 5c 60 00 09 bne r3,r0,8004e90 <_Thread_queue_Enqueue_priority+0xc4> 8004e70: e0 00 00 43 bi 8004f7c <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 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 ) ) { search_priority = search_thread->current_priority; 8004e74: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004e78: 50 ab 00 08 bgeu r5,r11,8004e98 <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004e7c: d0 02 00 00 wcsr IE,r2 8004e80: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004e84: 28 87 00 10 lw r7,(r4+16) 8004e88: a0 c7 38 00 and r7,r6,r7 8004e8c: 44 e0 00 3c be r7,r0,8004f7c <_Thread_queue_Enqueue_priority+0x1b0> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004e90: 28 84 00 00 lw r4,(r4+0) 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 ) ) { 8004e94: 5c 81 ff f8 bne r4,r1,8004e74 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004e98: 29 a1 00 30 lw r1,(r13+48) 8004e9c: 34 06 00 01 mvi r6,1 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004ea0: b8 40 18 00 mv r3,r2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004ea4: 44 26 00 38 be r1,r6,8004f84 <_Thread_queue_Enqueue_priority+0x1b8> * 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; 8004ea8: 59 c3 00 00 sw (r14+0),r3 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004eac: 2b 9d 00 04 lw ra,(sp+4) 8004eb0: 2b 8b 00 14 lw r11,(sp+20) 8004eb4: 2b 8c 00 10 lw r12,(sp+16) 8004eb8: 2b 8d 00 0c lw r13,(sp+12) 8004ebc: 2b 8e 00 08 lw r14,(sp+8) 8004ec0: 37 9c 00 14 addi sp,sp,20 8004ec4: c3 a0 00 00 ret 8004ec8: 78 01 08 01 mvhi r1,0x801 8004ecc: 38 21 c0 c0 ori r1,r1,0xc0c0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 8004ed0: 34 03 ff fe mvi r3,-2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8004ed4: 40 25 00 00 lbu r5,(r1+0) 8004ed8: 34 a5 00 01 addi r5,r5,1 _ISR_Disable( level ); 8004edc: 90 00 38 00 rcsr r7,IE 8004ee0: a0 e3 48 00 and r9,r7,r3 8004ee4: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->last; 8004ee8: 29 04 00 08 lw r4,(r8+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004eec: 5c 88 00 04 bne r4,r8,8004efc <_Thread_queue_Enqueue_priority+0x130> 8004ef0: e0 00 00 0c bi 8004f20 <_Thread_queue_Enqueue_priority+0x154> _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 8004ef4: 28 84 00 04 lw 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 ) ) { 8004ef8: 45 04 00 0a be r8,r4,8004f20 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority; 8004efc: 28 85 00 14 lw r5,(r4+20) if ( priority >= search_priority ) 8004f00: 51 65 00 08 bgeu r11,r5,8004f20 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004f04: d0 07 00 00 wcsr IE,r7 8004f08: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f0c: 28 82 00 10 lw r2,(r4+16) 8004f10: a0 c2 10 00 and r2,r6,r2 8004f14: 5c 40 ff f8 bne r2,r0,8004ef4 <_Thread_queue_Enqueue_priority+0x128> _ISR_Enable( level ); 8004f18: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED goto restart_reverse_search; 8004f1c: e3 ff ff ee bi 8004ed4 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004f20: 29 a1 00 30 lw r1,(r13+48) 8004f24: 34 02 00 01 mvi r2,1 8004f28: b8 e0 18 00 mv r3,r7 8004f2c: 5c 22 ff df bne r1,r2,8004ea8 <_Thread_queue_Enqueue_priority+0xdc> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004f30: 34 01 00 00 mvi r1,0 8004f34: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004f38: b8 e0 10 00 mv r2,r7 8004f3c: 45 65 00 24 be r11,r5,8004fcc <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004f40: 28 81 00 00 lw r1,(r4+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004f44: 59 84 00 04 sw (r12+4),r4 search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004f48: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8004f4c: 59 81 00 00 sw (r12+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004f50: 58 8c 00 00 sw (r4+0),r12 next_node->previous = the_node; 8004f54: 58 2c 00 04 sw (r1+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004f58: d0 07 00 00 wcsr IE,r7 8004f5c: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8004f60: 2b 9d 00 04 lw ra,(sp+4) 8004f64: 2b 8b 00 14 lw r11,(sp+20) 8004f68: 2b 8c 00 10 lw r12,(sp+16) 8004f6c: 2b 8d 00 0c lw r13,(sp+12) 8004f70: 2b 8e 00 08 lw r14,(sp+8) 8004f74: 37 9c 00 14 addi sp,sp,20 8004f78: c3 a0 00 00 ret if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 8004f7c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED goto restart_forward_search; 8004f80: e3 ff ff b0 bi 8004e40 <_Thread_queue_Enqueue_priority+0x74> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004f84: 34 01 00 00 mvi r1,0 8004f88: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004f8c: 45 65 00 10 be r11,r5,8004fcc <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8004f90: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004f94: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004f98: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8004f9c: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8004fa0: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8004fa4: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004fa8: d0 02 00 00 wcsr IE,r2 8004fac: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8004fb0: 2b 9d 00 04 lw ra,(sp+4) 8004fb4: 2b 8b 00 14 lw r11,(sp+20) 8004fb8: 2b 8c 00 10 lw r12,(sp+16) 8004fbc: 2b 8d 00 0c lw r13,(sp+12) 8004fc0: 2b 8e 00 08 lw r14,(sp+8) 8004fc4: 37 9c 00 14 addi sp,sp,20 8004fc8: c3 a0 00 00 ret 8004fcc: 34 84 00 3c addi r4,r4,60 _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; 8004fd0: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004fd4: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004fd8: 59 8d 00 44 sw (r12+68),r13 search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8004fdc: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8004fe0: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8004fe4: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004fe8: d0 02 00 00 wcsr IE,r2 8004fec: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004ff0: e3 ff ff af bi 8004eac <_Thread_queue_Enqueue_priority+0xe0> 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 ) ) { 8004ff4: 34 05 ff ff mvi r5,-1 8004ff8: e3 ff ff a8 bi 8004e98 <_Thread_queue_Enqueue_priority+0xcc> 08005088 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 8005088: 37 9c ff ec addi sp,sp,-20 800508c: 5b 8b 00 10 sw (sp+16),r11 8005090: 5b 8c 00 0c sw (sp+12),r12 8005094: 5b 8d 00 08 sw (sp+8),r13 8005098: 5b 9d 00 04 sw (sp+4),ra 800509c: b8 20 58 00 mv r11,r1 80050a0: b8 40 60 00 mv r12,r2 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 80050a4: 44 20 00 04 be r1,r0,80050b4 <_Thread_queue_Requeue+0x2c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 80050a8: 28 22 00 34 lw r2,(r1+52) 80050ac: 34 01 00 01 mvi r1,1 80050b0: 44 41 00 07 be r2,r1,80050cc <_Thread_queue_Requeue+0x44> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 80050b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80050b8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80050bc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80050c0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80050c4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80050c8: c3 a0 00 00 ret <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 80050cc: 90 00 68 00 rcsr r13,IE 80050d0: 34 01 ff fe mvi r1,-2 80050d4: a1 a1 08 00 and r1,r13,r1 80050d8: d0 01 00 00 wcsr IE,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 80050dc: 29 82 00 10 lw r2,(r12+16) 80050e0: 78 01 00 03 mvhi r1,0x3 80050e4: 38 21 be e0 ori r1,r1,0xbee0 80050e8: a0 41 08 00 and r1,r2,r1 80050ec: 5c 20 00 08 bne r1,r0,800510c <_Thread_queue_Requeue+0x84> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 80050f0: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } } 80050f4: 2b 9d 00 04 lw ra,(sp+4) 80050f8: 2b 8b 00 10 lw r11,(sp+16) 80050fc: 2b 8c 00 0c lw r12,(sp+12) 8005100: 2b 8d 00 08 lw r13,(sp+8) 8005104: 37 9c 00 14 addi sp,sp,20 8005108: c3 a0 00 00 ret 800510c: 34 03 00 01 mvi r3,1 8005110: 59 63 00 30 sw (r11+48),r3 ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 8005114: b9 60 08 00 mv r1,r11 8005118: b9 80 10 00 mv r2,r12 800511c: f8 00 11 83 calli 8009728 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 8005120: b9 60 08 00 mv r1,r11 8005124: b9 80 10 00 mv r2,r12 8005128: 37 83 00 14 addi r3,sp,20 800512c: fb ff ff 28 calli 8004dcc <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 8005130: d0 0d 00 00 wcsr IE,r13 8005134: e3 ff ff f0 bi 80050f4 <_Thread_queue_Requeue+0x6c> 080143d4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 80143d4: 37 9c ff a0 addi sp,sp,-96 80143d8: 5b 8b 00 44 sw (sp+68),r11 80143dc: 5b 8c 00 40 sw (sp+64),r12 80143e0: 5b 8d 00 3c sw (sp+60),r13 80143e4: 5b 8e 00 38 sw (sp+56),r14 80143e8: 5b 8f 00 34 sw (sp+52),r15 80143ec: 5b 90 00 30 sw (sp+48),r16 80143f0: 5b 91 00 2c sw (sp+44),r17 80143f4: 5b 92 00 28 sw (sp+40),r18 80143f8: 5b 93 00 24 sw (sp+36),r19 80143fc: 5b 94 00 20 sw (sp+32),r20 8014400: 5b 95 00 1c sw (sp+28),r21 8014404: 5b 96 00 18 sw (sp+24),r22 8014408: 5b 97 00 14 sw (sp+20),r23 801440c: 5b 98 00 10 sw (sp+16),r24 8014410: 5b 99 00 0c sw (sp+12),r25 8014414: 5b 9b 00 08 sw (sp+8),fp 8014418: 5b 9d 00 04 sw (sp+4),ra RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 801441c: 34 17 00 00 mvi r23,0 8014420: b8 20 58 00 mv r11,r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014424: 37 98 00 58 addi r24,sp,88 8014428: 37 96 00 5c addi r22,sp,92 801442c: 37 8f 00 4c addi r15,sp,76 8014430: 37 95 00 50 addi r21,sp,80 8014434: 78 14 08 03 mvhi r20,0x803 8014438: 78 13 08 03 mvhi r19,0x803 801443c: 78 19 08 03 mvhi r25,0x803 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014440: 34 31 00 30 addi r17,r1,48 /* * 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 ); 8014444: 34 30 00 68 addi r16,r1,104 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 8014448: 34 21 00 08 addi r1,r1,8 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 801444c: 5b 96 00 58 sw (sp+88),r22 the_chain->permanent_null = NULL; 8014450: 5b 97 00 5c sw (sp+92),r23 the_chain->last = _Chain_Head(the_chain); 8014454: 5b 98 00 60 sw (sp+96),r24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8014458: 5b 95 00 4c sw (sp+76),r21 the_chain->permanent_null = NULL; 801445c: 5b 97 00 50 sw (sp+80),r23 the_chain->last = _Chain_Head(the_chain); 8014460: 5b 8f 00 54 sw (sp+84),r15 8014464: 3a 94 ed 7c ori r20,r20,0xed7c 8014468: 3a 73 ec bc ori r19,r19,0xecbc 801446c: 3b 39 ec 2c ori r25,r25,0xec2c 8014470: 5b 81 00 48 sw (sp+72),r1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8014474: 35 7b 00 40 addi fp,r11,64 /* * 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 ); 8014478: 34 0c 00 01 mvi r12,1 Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 801447c: 34 0d 00 03 mvi r13,3 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 8014480: 34 12 ff fe mvi r18,-2 { /* * 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; 8014484: 59 78 00 78 sw (r11+120),r24 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8014488: 2a 82 00 00 lw r2,(r20+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 801448c: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014490: ba 20 08 00 mv r1,r17 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8014494: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014498: c8 43 10 00 sub r2,r2,r3 801449c: b9 e0 18 00 mv r3,r15 80144a0: f8 00 15 5c calli 8019a10 <_Watchdog_Adjust_to_chain> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 80144a4: 29 62 00 74 lw r2,(r11+116) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 80144a8: 2a 6e 00 00 lw r14,(r19+0) /* * 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 ) { 80144ac: 50 4e 00 19 bgeu r2,r14,8014510 <_Timer_server_Body+0x13c> /* * 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 ); 80144b0: c9 c2 10 00 sub r2,r14,r2 80144b4: ba 00 08 00 mv r1,r16 80144b8: b9 e0 18 00 mv r3,r15 80144bc: f8 00 15 55 calli 8019a10 <_Watchdog_Adjust_to_chain> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 80144c0: 59 6e 00 74 sw (r11+116),r14 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144c4: 29 61 00 78 lw r1,(r11+120) 80144c8: f8 00 03 1e calli 8015140 <_Chain_Get> if ( timer == NULL ) { 80144cc: 44 20 00 0a be r1,r0,80144f4 <_Timer_server_Body+0x120> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 80144d0: 28 22 00 38 lw r2,(r1+56) <== NOT EXECUTED 80144d4: 44 4c 00 15 be r2,r12,8014528 <_Timer_server_Body+0x154> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 80144d8: 5c 4d ff fb bne r2,r13,80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80144dc: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 80144e0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80144e4: f8 00 15 75 calli 8019ab8 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144e8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80144ec: f8 00 03 15 calli 8015140 <_Chain_Get> <== NOT EXECUTED if ( timer == NULL ) { 80144f0: 5c 20 ff f8 bne r1,r0,80144d0 <_Timer_server_Body+0xfc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 80144f4: 90 00 10 00 rcsr r2,IE 80144f8: a0 52 18 00 and r3,r2,r18 80144fc: d0 03 00 00 wcsr IE,r3 if ( _Chain_Is_empty( insert_chain ) ) { 8014500: 2b 83 00 58 lw r3,(sp+88) 8014504: 46 c3 00 0d be r22,r3,8014538 <_Timer_server_Body+0x164> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 8014508: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 801450c: e3 ff ff df bi 8014488 <_Timer_server_Body+0xb4> <== NOT EXECUTED * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 8014510: 51 c2 ff ec bgeu r14,r2,80144c0 <_Timer_server_Body+0xec> /* * 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 ); 8014514: c8 4e 18 00 sub r3,r2,r14 8014518: ba 00 08 00 mv r1,r16 801451c: 34 02 00 01 mvi r2,1 8014520: f8 00 14 fe calli 8019918 <_Watchdog_Adjust> 8014524: e3 ff ff e7 bi 80144c0 <_Timer_server_Body+0xec> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8014528: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 801452c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8014530: f8 00 15 62 calli 8019ab8 <_Watchdog_Insert> <== NOT EXECUTED 8014534: e3 ff ff e4 bi 80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 8014538: 59 77 00 78 sw (r11+120),r23 _ISR_Enable( level ); 801453c: d0 02 00 00 wcsr IE,r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 8014540: 2b 82 00 4c lw r2,(sp+76) 8014544: 5e a2 00 0b bne r21,r2,8014570 <_Timer_server_Body+0x19c> 8014548: e0 00 00 11 bi 801458c <_Timer_server_Body+0x1b8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 801454c: 28 83 00 00 lw r3,(r4+0) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 8014550: 58 97 00 08 sw (r4+8),r23 the_chain->first = new_first; 8014554: 5b 83 00 4c sw (sp+76),r3 new_first->previous = _Chain_Head(the_chain); 8014558: 58 6f 00 04 sw (r3+4),r15 _ISR_Enable( level ); 801455c: d0 02 00 00 wcsr IE,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 ); 8014560: 28 82 00 24 lw r2,(r4+36) 8014564: 28 83 00 1c lw r3,(r4+28) 8014568: 28 81 00 20 lw r1,(r4+32) 801456c: d8 60 00 00 call r3 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 8014570: 90 00 10 00 rcsr r2,IE 8014574: a0 52 18 00 and r3,r2,r18 8014578: d0 03 00 00 wcsr IE,r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801457c: 2b 84 00 4c lw r4,(sp+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 8014580: 5e a4 ff f3 bne r21,r4,801454c <_Timer_server_Body+0x178> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 8014584: d0 02 00 00 wcsr IE,r2 8014588: e3 ff ff bf bi 8014484 <_Timer_server_Body+0xb0> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 801458c: 34 01 00 00 mvi r1,0 8014590: 31 61 00 7c sb (r11+124),r1 8014594: 2b 21 00 00 lw r1,(r25+0) 8014598: 34 21 00 01 addi r1,r1,1 801459c: 5b 21 00 00 sw (r25+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 80145a0: 29 61 00 00 lw r1,(r11+0) 80145a4: 34 02 00 08 mvi r2,8 80145a8: f8 00 11 c1 calli 8018cac <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 80145ac: b9 60 08 00 mv r1,r11 80145b0: fb ff ff 47 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 80145b4: b9 60 08 00 mv r1,r11 80145b8: fb ff ff 66 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 80145bc: f8 00 0e 5a calli 8017f24 <_Thread_Enable_dispatch> ts->active = true; 80145c0: 34 01 00 01 mvi r1,1 80145c4: 31 61 00 7c sb (r11+124),r1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 80145c8: 2b 81 00 48 lw r1,(sp+72) 80145cc: f8 00 15 a2 calli 8019c54 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 80145d0: bb 60 08 00 mv r1,fp 80145d4: f8 00 15 a0 calli 8019c54 <_Watchdog_Remove> 80145d8: e3 ff ff ab bi 8014484 <_Timer_server_Body+0xb0> 080145dc <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145dc: 37 9c ff f8 addi sp,sp,-8 80145e0: 5b 8b 00 08 sw (sp+8),r11 80145e4: 5b 9d 00 04 sw (sp+4),ra if ( ts->insert_chain == NULL ) { 80145e8: 28 23 00 78 lw r3,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145ec: b8 20 58 00 mv r11,r1 80145f0: b8 40 08 00 mv r1,r2 if ( ts->insert_chain == NULL ) { 80145f4: 44 60 00 07 be r3,r0,8014610 <_Timer_server_Schedule_operation_method+0x34> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 80145f8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80145fc: f8 00 02 c5 calli 8015110 <_Chain_Append> <== NOT EXECUTED } } 8014600: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8014604: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8014608: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 801460c: c3 a0 00 00 ret <== NOT EXECUTED 8014610: 78 02 08 03 mvhi r2,0x803 8014614: 38 42 ec 2c ori r2,r2,0xec2c 8014618: 28 43 00 00 lw r3,(r2+0) 801461c: 34 63 00 01 addi r3,r3,1 8014620: 58 43 00 00 sw (r2+0),r3 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014624: 28 22 00 38 lw r2,(r1+56) 8014628: 34 03 00 01 mvi r3,1 801462c: 44 43 00 28 be r2,r3,80146cc <_Timer_server_Schedule_operation_method+0xf0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8014630: 34 03 00 03 mvi r3,3 8014634: 44 43 00 06 be r2,r3,801464c <_Timer_server_Schedule_operation_method+0x70> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014638: f8 00 0e 3b calli 8017f24 <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 801463c: 2b 9d 00 04 lw ra,(sp+4) 8014640: 2b 8b 00 08 lw r11,(sp+8) 8014644: 37 9c 00 08 addi sp,sp,8 8014648: c3 a0 00 00 ret } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 801464c: 90 00 38 00 rcsr r7,IE 8014650: 34 02 ff fe mvi r2,-2 8014654: a0 e2 10 00 and r2,r7,r2 8014658: d0 02 00 00 wcsr IE,r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801465c: 29 63 00 68 lw r3,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014660: 78 02 08 03 mvhi r2,0x803 last_snapshot = ts->TOD_watchdogs.last_snapshot; 8014664: 29 64 00 74 lw r4,(r11+116) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014668: 38 42 ec bc ori r2,r2,0xecbc */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 801466c: 35 65 00 6c addi r5,r11,108 8014670: 28 42 00 00 lw r2,(r2+0) 8014674: 44 65 00 0b be r3,r5,80146a0 <_Timer_server_Schedule_operation_method+0xc4> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 8014678: 28 66 00 10 lw r6,(r3+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 801467c: b4 c4 28 00 add r5,r6,r4 delta_interval += delta; 8014680: c8 a2 28 00 sub r5,r5,r2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 8014684: 50 82 00 06 bgeu r4,r2,801469c <_Timer_server_Schedule_operation_method+0xc0> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8014688: c8 44 20 00 sub r4,r2,r4 if (delta_interval > delta) { 801468c: f4 c4 40 00 cmpgu r8,r6,r4 delta_interval -= delta; 8014690: c8 c4 28 00 sub r5,r6,r4 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 8014694: c8 08 20 00 sub r4,r0,r8 8014698: a0 a4 28 00 and r5,r5,r4 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 801469c: 58 65 00 10 sw (r3+16),r5 } ts->TOD_watchdogs.last_snapshot = snapshot; 80146a0: 59 62 00 74 sw (r11+116),r2 _ISR_Enable( level ); 80146a4: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80146a8: 34 22 00 10 addi r2,r1,16 80146ac: 35 61 00 68 addi r1,r11,104 80146b0: f8 00 15 02 calli 8019ab8 <_Watchdog_Insert> if ( !ts->active ) { 80146b4: 41 61 00 7c lbu r1,(r11+124) 80146b8: 5c 20 ff e0 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_tod_system_watchdog( ts ); 80146bc: b9 60 08 00 mv r1,r11 80146c0: fb ff ff 24 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 80146c4: f8 00 0e 18 calli 8017f24 <_Thread_Enable_dispatch> 80146c8: e3 ff ff dd bi 801463c <_Timer_server_Schedule_operation_method+0x60> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 80146cc: 90 00 20 00 rcsr r4,IE 80146d0: 34 02 ff fe mvi r2,-2 80146d4: a0 82 10 00 and r2,r4,r2 80146d8: d0 02 00 00 wcsr IE,r2 snapshot = _Watchdog_Ticks_since_boot; 80146dc: 78 03 08 03 mvhi r3,0x803 80146e0: 38 63 ed 7c ori r3,r3,0xed7c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80146e4: 29 62 00 30 lw r2,(r11+48) 80146e8: 28 65 00 00 lw r5,(r3+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 80146ec: 29 63 00 3c lw r3,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80146f0: 35 66 00 34 addi r6,r11,52 80146f4: 44 46 00 08 be r2,r6,8014714 <_Timer_server_Schedule_operation_method+0x138> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 80146f8: 28 47 00 10 lw r7,(r2+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 80146fc: c8 a3 18 00 sub r3,r5,r3 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014700: f4 e3 30 00 cmpgu r6,r7,r3 delta_interval -= delta; 8014704: c8 e3 18 00 sub r3,r7,r3 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014708: c8 06 30 00 sub r6,r0,r6 801470c: a0 66 18 00 and r3,r3,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 8014710: 58 43 00 10 sw (r2+16),r3 } ts->Interval_watchdogs.last_snapshot = snapshot; 8014714: 59 65 00 3c sw (r11+60),r5 _ISR_Enable( level ); 8014718: d0 04 00 00 wcsr IE,r4 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 801471c: 34 22 00 10 addi r2,r1,16 8014720: 35 61 00 30 addi r1,r11,48 8014724: f8 00 14 e5 calli 8019ab8 <_Watchdog_Insert> if ( !ts->active ) { 8014728: 41 61 00 7c lbu r1,(r11+124) 801472c: 5c 20 ff c3 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_interval_system_watchdog( ts ); 8014730: b9 60 08 00 mv r1,r11 8014734: fb ff fe e6 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014738: f8 00 0d fb calli 8017f24 <_Thread_Enable_dispatch> 801473c: e3 ff ff c0 bi 801463c <_Timer_server_Schedule_operation_method+0x60> 080415a8 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 80415a8: 28 24 00 00 lw r4,(r1+0) 80415ac: 28 43 00 00 lw r3,(r2+0) 80415b0: 4c 64 00 03 bge r3,r4,80415bc <_Timespec_Greater_than+0x14> 80415b4: 34 01 00 01 mvi r1,1 80415b8: c3 a0 00 00 ret return true; if ( lhs->tv_sec < rhs->tv_sec ) 80415bc: 4c 83 00 03 bge r4,r3,80415c8 <_Timespec_Greater_than+0x20> 80415c0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80415c4: c3 a0 00 00 ret <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 80415c8: 28 23 00 04 lw r3,(r1+4) 80415cc: 28 41 00 04 lw r1,(r2+4) 80415d0: e8 61 08 00 cmpg r1,r3,r1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 80415d4: c3 a0 00 00 ret 08007ed4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 8007ed4: 37 9c ff e4 addi sp,sp,-28 8007ed8: 5b 8b 00 1c sw (sp+28),r11 8007edc: 5b 8c 00 18 sw (sp+24),r12 8007ee0: 5b 8d 00 14 sw (sp+20),r13 8007ee4: 5b 8e 00 10 sw (sp+16),r14 8007ee8: 5b 8f 00 0c sw (sp+12),r15 8007eec: 5b 90 00 08 sw (sp+8),r16 8007ef0: 5b 9d 00 04 sw (sp+4),ra 8007ef4: b8 20 60 00 mv r12,r1 8007ef8: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 8007efc: 90 00 20 00 rcsr r4,IE 8007f00: 34 01 ff fe mvi r1,-2 8007f04: a0 81 08 00 and r1,r4,r1 8007f08: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8007f0c: 29 81 00 00 lw r1,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007f10: 35 8e 00 04 addi r14,r12,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 8007f14: 44 2e 00 04 be r1,r14,8007f24 <_Watchdog_Adjust+0x50> switch ( direction ) { 8007f18: 44 40 00 11 be r2,r0,8007f5c <_Watchdog_Adjust+0x88> 8007f1c: 34 03 00 01 mvi r3,1 8007f20: 44 43 00 0b be r2,r3,8007f4c <_Watchdog_Adjust+0x78> } break; } } _ISR_Enable( level ); 8007f24: d0 04 00 00 wcsr IE,r4 } 8007f28: 2b 9d 00 04 lw ra,(sp+4) 8007f2c: 2b 8b 00 1c lw r11,(sp+28) 8007f30: 2b 8c 00 18 lw r12,(sp+24) 8007f34: 2b 8d 00 14 lw r13,(sp+20) 8007f38: 2b 8e 00 10 lw r14,(sp+16) 8007f3c: 2b 8f 00 0c lw r15,(sp+12) 8007f40: 2b 90 00 08 lw r16,(sp+8) 8007f44: 37 9c 00 1c addi sp,sp,28 8007f48: c3 a0 00 00 ret * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 8007f4c: 28 22 00 10 lw r2,(r1+16) 8007f50: b4 4b 58 00 add r11,r2,r11 8007f54: 58 2b 00 10 sw (r1+16),r11 break; 8007f58: e3 ff ff f3 bi 8007f24 <_Watchdog_Adjust+0x50> case WATCHDOG_FORWARD: while ( units ) { 8007f5c: 44 62 ff f2 be r3,r2,8007f24 <_Watchdog_Adjust+0x50> if ( units < _Watchdog_First( header )->delta_interval ) { 8007f60: 28 2d 00 10 lw r13,(r1+16) _Watchdog_First( header )->delta_interval -= units; break; 8007f64: b8 80 18 00 mv r3,r4 } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 8007f68: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8007f6c: 34 0f ff fe mvi r15,-2 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8007f70: 51 6d 00 02 bgeu r11,r13,8007f78 <_Watchdog_Adjust+0xa4> 8007f74: e0 00 00 11 bi 8007fb8 <_Watchdog_Adjust+0xe4> <== NOT EXECUTED _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 8007f78: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 8007f7c: d0 03 00 00 wcsr IE,r3 _Watchdog_Tickle( header ); 8007f80: b9 80 08 00 mv r1,r12 8007f84: f8 00 00 b0 calli 8008244 <_Watchdog_Tickle> _ISR_Disable( level ); 8007f88: 90 00 10 00 rcsr r2,IE 8007f8c: a0 4f 08 00 and r1,r2,r15 8007f90: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8007f94: 29 84 00 00 lw r4,(r12+0) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 8007f98: c9 6d 58 00 sub r11,r11,r13 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8007f9c: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8007fa0: b8 80 08 00 mv r1,r4 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8007fa4: 45 c4 00 08 be r14,r4,8007fc4 <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8007fa8: 45 60 00 07 be r11,r0,8007fc4 <_Watchdog_Adjust+0xf0> if ( units < _Watchdog_First( header )->delta_interval ) { 8007fac: 28 2d 00 10 lw r13,(r1+16) 8007fb0: 51 6d ff f2 bgeu r11,r13,8007f78 <_Watchdog_Adjust+0xa4> 8007fb4: b8 60 20 00 mv r4,r3 _Watchdog_First( header )->delta_interval -= units; 8007fb8: c9 ab 58 00 sub r11,r13,r11 8007fbc: 58 2b 00 10 sw (r1+16),r11 break; 8007fc0: e3 ff ff d9 bi 8007f24 <_Watchdog_Adjust+0x50> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8007fc4: b8 40 20 00 mv r4,r2 8007fc8: e3 ff ff d7 bi 8007f24 <_Watchdog_Adjust+0x50> 08005db4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 8005db4: 37 9c ff e4 addi sp,sp,-28 8005db8: 5b 8b 00 1c sw (sp+28),r11 8005dbc: 5b 8c 00 18 sw (sp+24),r12 8005dc0: 5b 8d 00 14 sw (sp+20),r13 8005dc4: 5b 8e 00 10 sw (sp+16),r14 8005dc8: 5b 8f 00 0c sw (sp+12),r15 8005dcc: 5b 90 00 08 sw (sp+8),r16 8005dd0: 5b 9d 00 04 sw (sp+4),ra 8005dd4: b8 20 60 00 mv r12,r1 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 8005dd8: 90 00 68 00 rcsr r13,IE 8005ddc: 34 01 ff fe mvi r1,-2 8005de0: a1 a1 08 00 and r1,r13,r1 8005de4: d0 01 00 00 wcsr IE,r1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8005de8: 29 8b 00 00 lw r11,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8005dec: 35 8e 00 04 addi r14,r12,4 if ( _Chain_Is_empty( header ) ) 8005df0: 45 6e 00 2b be r11,r14,8005e9c <_Watchdog_Tickle+0xe8> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 8005df4: 29 61 00 10 lw r1,(r11+16) 8005df8: 5c 20 00 26 bne r1,r0,8005e90 <_Watchdog_Tickle+0xdc> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8005dfc: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005e00: 34 0f ff fe mvi r15,-2 8005e04: e0 00 00 0a bi 8005e2c <_Watchdog_Tickle+0x78> 8005e08: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8005e0c: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED 8005e10: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8005e14: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005e18: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8005e1c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e20: 45 c1 00 12 be r14,r1,8005e68 <_Watchdog_Tickle+0xb4> <== NOT EXECUTED 8005e24: 28 21 00 10 lw r1,(r1+16) 8005e28: 5c 20 00 10 bne r1,r0,8005e68 <_Watchdog_Tickle+0xb4> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 8005e2c: b9 60 08 00 mv r1,r11 8005e30: fb ff ff aa calli 8005cd8 <_Watchdog_Remove> _ISR_Enable( level ); 8005e34: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8005e38: 5c 30 ff f4 bne r1,r16,8005e08 <_Watchdog_Tickle+0x54> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 8005e3c: 29 62 00 24 lw r2,(r11+36) 8005e40: 29 63 00 1c lw r3,(r11+28) 8005e44: 29 61 00 20 lw r1,(r11+32) 8005e48: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005e4c: 90 00 10 00 rcsr r2,IE 8005e50: a0 4f 08 00 and r1,r2,r15 8005e54: d0 01 00 00 wcsr IE,r1 8005e58: 29 81 00 00 lw r1,(r12+0) 8005e5c: b8 40 68 00 mv r13,r2 8005e60: b8 20 58 00 mv r11,r1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e64: 5d c1 ff f0 bne r14,r1,8005e24 <_Watchdog_Tickle+0x70> leave: _ISR_Enable(level); 8005e68: d0 02 00 00 wcsr IE,r2 } 8005e6c: 2b 9d 00 04 lw ra,(sp+4) 8005e70: 2b 8b 00 1c lw r11,(sp+28) 8005e74: 2b 8c 00 18 lw r12,(sp+24) 8005e78: 2b 8d 00 14 lw r13,(sp+20) 8005e7c: 2b 8e 00 10 lw r14,(sp+16) 8005e80: 2b 8f 00 0c lw r15,(sp+12) 8005e84: 2b 90 00 08 lw r16,(sp+8) 8005e88: 37 9c 00 1c addi sp,sp,28 8005e8c: c3 a0 00 00 ret * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; 8005e90: 34 21 ff ff addi r1,r1,-1 8005e94: 59 61 00 10 sw (r11+16),r1 if ( the_watchdog->delta_interval != 0 ) 8005e98: 44 20 ff d9 be r1,r0,8005dfc <_Watchdog_Tickle+0x48> _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005e9c: b9 a0 10 00 mv r2,r13 8005ea0: e3 ff ff f2 bi 8005e68 <_Watchdog_Tickle+0xb4> 08005ea4 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005ea4: 37 9c ff fc addi sp,sp,-4 8005ea8: 5b 9d 00 04 sw (sp+4),ra * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8005eac: 34 03 00 00 mvi r3,0 8005eb0: b8 20 10 00 mv r2,r1 8005eb4: 78 01 08 01 mvhi r1,0x801 8005eb8: 38 21 c8 48 ori r1,r1,0xc848 8005ebc: b8 60 20 00 mv r4,r3 8005ec0: f8 00 0b a8 calli 8008d60 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 8005ec4: 44 20 00 04 be r1,r0,8005ed4 <_Workspace_Allocate_or_fatal_error+0x30> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 8005ec8: 2b 9d 00 04 lw ra,(sp+4) 8005ecc: 37 9c 00 04 addi sp,sp,4 8005ed0: c3 a0 00 00 ret memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 8005ed4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005ed8: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005edc: fb ff f5 f7 calli 80036b8 <_Internal_error_Occurred> <== NOT EXECUTED 08026284 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 8026284: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8026288: c3 a0 00 00 ret <== NOT EXECUTED 0801a2f4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 801a2f4: 37 9c ff f8 addi sp,sp,-8 801a2f8: 5b 9d 00 04 sw (sp+4),ra 801a2fc: 5b 81 00 08 sw (sp+8),r1 801a300: f8 00 02 90 calli 801ad40 <__start_set_sysctl_set> * 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(); 801a304: fb ff ff d7 calli 801a260 rtems_shutdown_executive(status); 801a308: 2b 81 00 08 lw r1,(sp+8) 801a30c: f8 00 00 64 calli 801a49c 801a310: e0 00 00 00 bi 801a310 <_exit+0x1c> <== NOT EXECUTED 080402c8 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 80402c8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80402cc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return fcntl( fd, cmd, arg ); 80402d0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 80402d4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80402d8: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 80402dc: fb ff ff 5c calli 804004c <== NOT EXECUTED } 80402e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80402e4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80402e8: c3 a0 00 00 ret <== NOT EXECUTED 08026250 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 8026250: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8026254: c3 a0 00 00 ret <== NOT EXECUTED 08007a78 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 8007a78: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007a7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return gettimeofday( tp, tzp ); 8007a80: fb ff ff e0 calli 8007a00 <== NOT EXECUTED } 8007a84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007a88: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007a8c: c3 a0 00 00 ret <== NOT EXECUTED 0802627c <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 802627c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8026280: c3 a0 00 00 ret <== NOT EXECUTED 0802ab88 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 802ab88: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802ab8c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return link( existing, new ); 802ab90: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802ab94: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802ab98: fb ff ff 64 calli 802a928 <== NOT EXECUTED } 802ab9c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802aba0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802aba4: c3 a0 00 00 ret <== NOT EXECUTED 0802ae7c <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 802ae7c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802ae80: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 802ae84: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802ae88: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802ae8c: fb ff ff b9 calli 802ad70 <== NOT EXECUTED } 802ae90: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802ae94: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802ae98: c3 a0 00 00 ret <== NOT EXECUTED 0801a458 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 801a458: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 801a45c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return realloc( ptr, size ); 801a460: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 801a464: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 801a468: f8 00 00 1b calli 801a4d4 <== NOT EXECUTED } 801a46c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801a470: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 801a474: c3 a0 00 00 ret <== NOT EXECUTED 08063c28 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8063c28: 37 9c ff a8 addi sp,sp,-88 <== NOT EXECUTED 8063c2c: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 8063c30: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 8063c34: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8063c38: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 8063c3c: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 8063c40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8063c44: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8063c48: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 8063c4c: b8 60 78 00 mv r15,r3 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8063c50: fb fe 8e ec calli 8007800 <== NOT EXECUTED 8063c54: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8063c58: 5c 20 00 e5 bne r1,r0,8063fec <_rename_r+0x3c4> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8063c5c: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 8063c60: 64 43 00 5c cmpei r3,r2,92 <== NOT EXECUTED 8063c64: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 8063c68: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 8063c6c: 44 2b 00 6d be r1,r11,8063e20 <_rename_r+0x1f8> <== NOT EXECUTED 8063c70: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8063c74: 38 42 12 f0 ori r2,r2,0x12f0 <== NOT EXECUTED 8063c78: 28 44 00 00 lw r4,(r2+0) <== NOT EXECUTED 8063c7c: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED 8063c80: 28 81 00 18 lw r1,(r4+24) <== NOT EXECUTED 8063c84: 5b 81 00 30 sw (sp+48),r1 <== NOT EXECUTED 8063c88: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED 8063c8c: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 8063c90: 28 83 00 20 lw r3,(r4+32) <== NOT EXECUTED 8063c94: 5b 83 00 38 sw (sp+56),r3 <== NOT EXECUTED 8063c98: 28 81 00 24 lw r1,(r4+36) <== NOT EXECUTED 8063c9c: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 8063ca0: 28 84 00 28 lw r4,(r4+40) <== NOT EXECUTED 8063ca4: 5b 84 00 40 sw (sp+64),r4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8063ca8: 2b 82 00 30 lw r2,(sp+48) <== NOT EXECUTED 8063cac: 2b 83 00 34 lw r3,(sp+52) <== NOT EXECUTED name = old + old_parent_pathlen; 8063cb0: b5 8b 58 00 add r11,r12,r11 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8063cb4: 5b 82 00 44 sw (sp+68),r2 <== NOT EXECUTED 8063cb8: 2b 82 00 38 lw r2,(sp+56) <== NOT EXECUTED 8063cbc: 5b 83 00 48 sw (sp+72),r3 <== NOT EXECUTED 8063cc0: 2b 83 00 3c lw r3,(sp+60) <== NOT EXECUTED 8063cc4: 5b 82 00 4c sw (sp+76),r2 <== NOT EXECUTED 8063cc8: 2b 82 00 40 lw r2,(sp+64) <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8063ccc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8063cd0: 5b 83 00 50 sw (sp+80),r3 <== NOT EXECUTED 8063cd4: 5b 82 00 54 sw (sp+84),r2 <== NOT EXECUTED name = old + old_parent_pathlen; 8063cd8: 5b 8b 00 58 sw (sp+88),r11 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8063cdc: fb ff ab 93 calli 804eb28 <== NOT EXECUTED 8063ce0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8063ce4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8063ce8: fb fe 8e ad calli 800779c <== NOT EXECUTED 8063cec: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8063cf0: b9 60 08 00 mv r1,r11 <== 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 ) ); 8063cf4: 5b 8b 00 58 sw (sp+88),r11 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8063cf8: fb ff ab 8c calli 804eb28 <== NOT EXECUTED 8063cfc: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8063d00: 37 8c 00 44 addi r12,sp,68 <== NOT EXECUTED 8063d04: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8063d08: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8063d0c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8063d10: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 8063d14: fb fe 8e d8 calli 8007874 <== NOT EXECUTED 8063d18: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8063d1c: 5c 20 00 80 bne r1,r0,8063f1c <_rename_r+0x2f4> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8063d20: 41 e2 00 00 lbu r2,(r15+0) <== NOT EXECUTED 8063d24: 64 44 00 5c cmpei r4,r2,92 <== NOT EXECUTED 8063d28: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 8063d2c: b8 81 20 00 or r4,r4,r1 <== NOT EXECUTED 8063d30: 44 8b 00 4c be r4,r11,8063e60 <_rename_r+0x238> <== NOT EXECUTED 8063d34: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8063d38: 38 42 12 f0 ori r2,r2,0x12f0 <== NOT EXECUTED 8063d3c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8063d40: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8063d44: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8063d48: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED 8063d4c: 28 43 00 1c lw r3,(r2+28) <== NOT EXECUTED 8063d50: 5b 83 00 20 sw (sp+32),r3 <== NOT EXECUTED 8063d54: 28 43 00 20 lw r3,(r2+32) <== NOT EXECUTED 8063d58: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED 8063d5c: 28 43 00 24 lw r3,(r2+36) <== NOT EXECUTED 8063d60: 5b 83 00 28 sw (sp+40),r3 <== NOT EXECUTED 8063d64: 28 42 00 28 lw r2,(r2+40) <== NOT EXECUTED 8063d68: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8063d6c: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED 8063d70: 28 44 00 04 lw r4,(r2+4) <== NOT EXECUTED 8063d74: 44 80 00 8c be r4,r0,8063fa4 <_rename_r+0x37c> <== 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 ); 8063d78: 37 8b 00 1c addi r11,sp,28 <== NOT EXECUTED 8063d7c: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 8063d80: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8063d84: 37 83 00 58 addi r3,sp,88 <== NOT EXECUTED 8063d88: d8 80 00 00 call r4 <== NOT EXECUTED 8063d8c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( result != 0 ) { 8063d90: 5c 20 00 6e bne r1,r0,8063f48 <_rename_r+0x320> <== 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 ) { 8063d94: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8063d98: 2b 82 00 40 lw r2,(sp+64) <== NOT EXECUTED 8063d9c: 5c 41 00 48 bne r2,r1,8063ebc <_rename_r+0x294> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 8063da0: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8063da4: 28 25 00 40 lw r5,(r1+64) <== NOT EXECUTED 8063da8: 44 a0 00 9b be r5,r0,8064014 <_rename_r+0x3ec> <== 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 ); 8063dac: 2b 84 00 58 lw r4,(sp+88) <== NOT EXECUTED 8063db0: 37 8f 00 30 addi r15,sp,48 <== NOT EXECUTED 8063db4: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8063db8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8063dbc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8063dc0: d8 a0 00 00 call r5 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8063dc4: 2b 82 00 28 lw r2,(sp+40) <== 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 ); 8063dc8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8063dcc: 44 40 00 05 be r2,r0,8063de0 <_rename_r+0x1b8> <== NOT EXECUTED 8063dd0: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8063dd4: 44 40 00 03 be r2,r0,8063de0 <_rename_r+0x1b8> <== NOT EXECUTED 8063dd8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8063ddc: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8063de0: 5d c0 00 30 bne r14,r0,8063ea0 <_rename_r+0x278> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 8063de4: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 8063de8: 44 20 00 05 be r1,r0,8063dfc <_rename_r+0x1d4> <== NOT EXECUTED 8063dec: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063df0: 44 40 00 03 be r2,r0,8063dfc <_rename_r+0x1d4> <== NOT EXECUTED 8063df4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8063df8: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 8063dfc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8063e00: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8063e04: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 8063e08: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 8063e0c: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 8063e10: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 8063e14: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 8063e18: 37 9c 00 58 addi sp,sp,88 <== NOT EXECUTED 8063e1c: c3 a0 00 00 ret <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8063e20: 44 40 ff 94 be r2,r0,8063c70 <_rename_r+0x48> <== NOT EXECUTED 8063e24: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8063e28: 38 21 12 f0 ori r1,r1,0x12f0 <== NOT EXECUTED 8063e2c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8063e30: b9 60 70 00 mv r14,r11 <== NOT EXECUTED 8063e34: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8063e38: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 8063e3c: 28 23 00 08 lw r3,(r1+8) <== NOT EXECUTED 8063e40: 5b 83 00 34 sw (sp+52),r3 <== NOT EXECUTED 8063e44: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8063e48: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 8063e4c: 28 23 00 10 lw r3,(r1+16) <== NOT EXECUTED 8063e50: 5b 83 00 3c sw (sp+60),r3 <== NOT EXECUTED 8063e54: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 8063e58: 5b 81 00 40 sw (sp+64),r1 <== NOT EXECUTED 8063e5c: e3 ff ff 93 bi 8063ca8 <_rename_r+0x80> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8063e60: 44 44 ff b5 be r2,r4,8063d34 <_rename_r+0x10c> <== NOT EXECUTED 8063e64: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8063e68: 38 21 12 f0 ori r1,r1,0x12f0 <== NOT EXECUTED 8063e6c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8063e70: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 8063e74: 28 43 00 04 lw r3,(r2+4) <== NOT EXECUTED 8063e78: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED 8063e7c: 28 43 00 08 lw r3,(r2+8) <== NOT EXECUTED 8063e80: 5b 83 00 20 sw (sp+32),r3 <== NOT EXECUTED 8063e84: 28 43 00 0c lw r3,(r2+12) <== NOT EXECUTED 8063e88: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED 8063e8c: 28 43 00 10 lw r3,(r2+16) <== NOT EXECUTED 8063e90: 5b 83 00 28 sw (sp+40),r3 <== NOT EXECUTED 8063e94: 28 42 00 14 lw r2,(r2+20) <== NOT EXECUTED 8063e98: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 8063e9c: e3 ff ff b4 bi 8063d6c <_rename_r+0x144> <== NOT EXECUTED result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 8063ea0: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8063ea4: 44 20 ff d0 be r1,r0,8063de4 <_rename_r+0x1bc> <== NOT EXECUTED 8063ea8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063eac: 44 40 ff ce be r2,r0,8063de4 <_rename_r+0x1bc> <== NOT EXECUTED 8063eb0: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8063eb4: d8 40 00 00 call r2 <== NOT EXECUTED 8063eb8: e3 ff ff cb bi 8063de4 <_rename_r+0x1bc> <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 8063ebc: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8063ec0: 44 20 00 05 be r1,r0,8063ed4 <_rename_r+0x2ac> <== NOT EXECUTED 8063ec4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063ec8: 44 40 00 03 be r2,r0,8063ed4 <_rename_r+0x2ac> <== NOT EXECUTED 8063ecc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8063ed0: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8063ed4: 45 c0 00 07 be r14,r0,8063ef0 <_rename_r+0x2c8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8063ed8: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8063edc: 44 20 00 05 be r1,r0,8063ef0 <_rename_r+0x2c8> <== NOT EXECUTED 8063ee0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063ee4: 44 40 00 03 be r2,r0,8063ef0 <_rename_r+0x2c8> <== NOT EXECUTED 8063ee8: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8063eec: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8063ef0: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 8063ef4: 44 20 00 05 be r1,r0,8063f08 <_rename_r+0x2e0> <== NOT EXECUTED 8063ef8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063efc: 44 40 00 03 be r2,r0,8063f08 <_rename_r+0x2e0> <== NOT EXECUTED 8063f00: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8063f04: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 8063f08: fb ff 8d 1e calli 8047380 <__errno> <== NOT EXECUTED 8063f0c: 34 02 00 12 mvi r2,18 <== NOT EXECUTED 8063f10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8063f14: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8063f18: e3 ff ff b9 bi 8063dfc <_rename_r+0x1d4> <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 8063f1c: 45 c0 00 07 be r14,r0,8063f38 <_rename_r+0x310> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8063f20: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8063f24: 44 20 00 05 be r1,r0,8063f38 <_rename_r+0x310> <== NOT EXECUTED 8063f28: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063f2c: 44 40 00 03 be r2,r0,8063f38 <_rename_r+0x310> <== NOT EXECUTED 8063f30: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8063f34: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8063f38: fb ff 8d 12 calli 8047380 <__errno> <== NOT EXECUTED 8063f3c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8063f40: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8063f44: e3 ff ff ae bi 8063dfc <_rename_r+0x1d4> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 8063f48: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8063f4c: 44 20 00 05 be r1,r0,8063f60 <_rename_r+0x338> <== NOT EXECUTED 8063f50: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063f54: 44 40 00 03 be r2,r0,8063f60 <_rename_r+0x338> <== NOT EXECUTED 8063f58: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8063f5c: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8063f60: 45 c0 00 07 be r14,r0,8063f7c <_rename_r+0x354> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8063f64: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8063f68: 44 20 00 05 be r1,r0,8063f7c <_rename_r+0x354> <== NOT EXECUTED 8063f6c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063f70: 44 40 00 03 be r2,r0,8063f7c <_rename_r+0x354> <== NOT EXECUTED 8063f74: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8063f78: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8063f7c: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 8063f80: 44 20 00 05 be r1,r0,8063f94 <_rename_r+0x36c> <== NOT EXECUTED 8063f84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063f88: 44 40 00 03 be r2,r0,8063f94 <_rename_r+0x36c> <== NOT EXECUTED 8063f8c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8063f90: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8063f94: fb ff 8c fb calli 8047380 <__errno> <== NOT EXECUTED 8063f98: 58 2d 00 00 sw (r1+0),r13 <== NOT EXECUTED 8063f9c: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8063fa0: e3 ff ff 97 bi 8063dfc <_rename_r+0x1d4> <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 8063fa4: 45 c4 00 07 be r14,r4,8063fc0 <_rename_r+0x398> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 8063fa8: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8063fac: 44 20 00 05 be r1,r0,8063fc0 <_rename_r+0x398> <== NOT EXECUTED 8063fb0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063fb4: 44 40 00 03 be r2,r0,8063fc0 <_rename_r+0x398> <== NOT EXECUTED 8063fb8: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8063fbc: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8063fc0: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 8063fc4: 44 20 00 05 be r1,r0,8063fd8 <_rename_r+0x3b0> <== NOT EXECUTED 8063fc8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8063fcc: 44 40 00 03 be r2,r0,8063fd8 <_rename_r+0x3b0> <== NOT EXECUTED 8063fd0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8063fd4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8063fd8: fb ff 8c ea calli 8047380 <__errno> <== NOT EXECUTED 8063fdc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8063fe0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8063fe4: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8063fe8: e3 ff ff 85 bi 8063dfc <_rename_r+0x1d4> <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 8063fec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8063ff0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8063ff4: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 8063ff8: 37 84 00 30 addi r4,sp,48 <== NOT EXECUTED 8063ffc: 34 05 00 00 mvi r5,0 <== NOT EXECUTED 8064000: fb fe 8e 60 calli 8007980 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 8064004: 34 0e 00 01 mvi r14,1 <== NOT EXECUTED 8064008: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 806400c: 44 20 ff 27 be r1,r0,8063ca8 <_rename_r+0x80> <== NOT EXECUTED 8064010: e3 ff ff 7b bi 8063dfc <_rename_r+0x1d4> <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 8064014: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8064018: 44 45 00 03 be r2,r5,8064024 <_rename_r+0x3fc> <== NOT EXECUTED 806401c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8064020: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8064024: 45 c0 ff e7 be r14,r0,8063fc0 <_rename_r+0x398> <== NOT EXECUTED 8064028: e3 ff ff e0 bi 8063fa8 <_rename_r+0x380> <== NOT EXECUTED 0800966c <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 800966c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8009670: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 8009674: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8009678: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 800967c: fb ff ff b9 calli 8009560 <== NOT EXECUTED } 8009680: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009684: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8009688: c3 a0 00 00 ret <== NOT EXECUTED 0800ba94 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 800ba94: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800ba98: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return unlink( path ); 800ba9c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800baa0: fb ff ff 56 calli 800b7f8 <== NOT EXECUTED } 800baa4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800baa8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800baac: c3 a0 00 00 ret <== NOT EXECUTED 080291d4 : #include int chdir( const char *pathname ) { 80291d4: 37 9c ff e0 addi sp,sp,-32 80291d8: 5b 8b 00 0c sw (sp+12),r11 80291dc: 5b 8c 00 08 sw (sp+8),r12 80291e0: 5b 9d 00 04 sw (sp+4),ra 80291e4: b8 20 60 00 mv r12,r1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 80291e8: f8 00 96 50 calli 804eb28 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 80291ec: 34 03 00 01 mvi r3,1 80291f0: 37 8b 00 10 addi r11,sp,16 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 80291f4: b8 20 10 00 mv r2,r1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 80291f8: b8 60 28 00 mv r5,r3 80291fc: b9 80 08 00 mv r1,r12 8029200: b9 60 20 00 mv r4,r11 8029204: fb ff 79 df calli 8007980 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 8029208: 34 03 ff ff mvi r3,-1 802920c: 5c 20 00 1d bne r1,r0,8029280 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 8029210: 2b 83 00 1c lw r3,(sp+28) 8029214: 28 62 00 10 lw r2,(r3+16) 8029218: 44 41 00 2b be r2,r1,80292c4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 802921c: b9 60 08 00 mv r1,r11 8029220: d8 40 00 00 call r2 8029224: 34 02 00 01 mvi r2,1 8029228: 5c 22 00 1c bne r1,r2,8029298 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 802922c: 78 0b 08 07 mvhi r11,0x807 8029230: 39 6b 12 f0 ori r11,r11,0x12f0 8029234: 29 62 00 00 lw r2,(r11+0) 8029238: 28 41 00 10 lw r1,(r2+16) 802923c: 44 20 00 06 be r1,r0,8029254 8029240: 28 23 00 1c lw r3,(r1+28) 8029244: 44 60 00 04 be r3,r0,8029254 8029248: 34 41 00 04 addi r1,r2,4 802924c: d8 60 00 00 call r3 8029250: 29 62 00 00 lw r2,(r11+0) rtems_filesystem_current = loc; 8029254: 2b 81 00 10 lw r1,(sp+16) 8029258: 34 03 00 00 mvi r3,0 802925c: 58 41 00 04 sw (r2+4),r1 8029260: 2b 81 00 14 lw r1,(sp+20) 8029264: 58 41 00 08 sw (r2+8),r1 8029268: 2b 81 00 18 lw r1,(sp+24) 802926c: 58 41 00 0c sw (r2+12),r1 8029270: 2b 81 00 1c lw r1,(sp+28) 8029274: 58 41 00 10 sw (r2+16),r1 8029278: 2b 81 00 20 lw r1,(sp+32) 802927c: 58 41 00 14 sw (r2+20),r1 return 0; } 8029280: b8 60 08 00 mv r1,r3 8029284: 2b 9d 00 04 lw ra,(sp+4) 8029288: 2b 8b 00 0c lw r11,(sp+12) 802928c: 2b 8c 00 08 lw r12,(sp+8) 8029290: 37 9c 00 20 addi sp,sp,32 8029294: c3 a0 00 00 ret rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 8029298: 2b 81 00 1c lw r1,(sp+28) 802929c: 44 20 00 05 be r1,r0,80292b0 80292a0: 28 22 00 1c lw r2,(r1+28) 80292a4: 44 40 00 03 be r2,r0,80292b0 80292a8: b9 60 08 00 mv r1,r11 80292ac: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 80292b0: f8 00 78 34 calli 8047380 <__errno> 80292b4: 34 02 00 14 mvi r2,20 80292b8: 58 22 00 00 sw (r1+0),r2 80292bc: 34 03 ff ff mvi r3,-1 80292c0: e3 ff ff f0 bi 8029280 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 80292c4: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 80292c8: 44 62 00 03 be r3,r2,80292d4 <== NOT EXECUTED 80292cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80292d0: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 80292d4: f8 00 78 2b calli 8047380 <__errno> <== NOT EXECUTED 80292d8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80292dc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80292e0: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80292e4: e3 ff ff e7 bi 8029280 <== NOT EXECUTED 080075cc : int chmod( const char *path, mode_t mode ) { 80075cc: 37 9c ff dc addi sp,sp,-36 80075d0: 5b 8b 00 10 sw (sp+16),r11 80075d4: 5b 8c 00 0c sw (sp+12),r12 80075d8: 5b 8d 00 08 sw (sp+8),r13 80075dc: 5b 9d 00 04 sw (sp+4),ra 80075e0: b8 20 58 00 mv r11,r1 80075e4: b8 40 68 00 mv r13,r2 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 80075e8: 37 8c 00 14 addi r12,sp,20 80075ec: f8 01 1d 4f calli 804eb28 80075f0: b8 20 10 00 mv r2,r1 80075f4: 34 03 00 00 mvi r3,0 80075f8: b9 60 08 00 mv r1,r11 80075fc: b9 80 20 00 mv r4,r12 8007600: 34 05 00 01 mvi r5,1 8007604: f8 00 00 df calli 8007980 if ( status != 0 ) 8007608: 34 0b ff ff mvi r11,-1 800760c: 5c 20 00 0f bne r1,r0,8007648 return -1; if ( !loc.handlers ){ 8007610: 2b 83 00 1c lw r3,(sp+28) 8007614: 44 61 00 1f be r3,r1,8007690 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 8007618: 28 63 00 1c lw r3,(r3+28) 800761c: 44 60 00 12 be r3,r0,8007664 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 8007620: b9 a0 10 00 mv r2,r13 8007624: b9 80 08 00 mv r1,r12 8007628: d8 60 00 00 call r3 800762c: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8007630: 2b 81 00 20 lw r1,(sp+32) 8007634: 44 20 00 05 be r1,r0,8007648 8007638: 28 22 00 1c lw r2,(r1+28) 800763c: 44 40 00 03 be r2,r0,8007648 8007640: b9 80 08 00 mv r1,r12 8007644: d8 40 00 00 call r2 return result; } 8007648: b9 60 08 00 mv r1,r11 800764c: 2b 9d 00 04 lw ra,(sp+4) 8007650: 2b 8b 00 10 lw r11,(sp+16) 8007654: 2b 8c 00 0c lw r12,(sp+12) 8007658: 2b 8d 00 08 lw r13,(sp+8) 800765c: 37 9c 00 24 addi sp,sp,36 8007660: c3 a0 00 00 ret rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 8007664: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007668: 44 23 00 05 be r1,r3,800767c <== NOT EXECUTED 800766c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8007670: 44 40 00 03 be r2,r0,800767c <== NOT EXECUTED 8007674: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007678: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800767c: f8 00 ff 41 calli 8047380 <__errno> <== NOT EXECUTED 8007680: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007684: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007688: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 800768c: e3 ff ff ef bi 8007648 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 8007690: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007694: 44 23 00 05 be r1,r3,80076a8 <== NOT EXECUTED 8007698: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800769c: 44 43 00 03 be r2,r3,80076a8 <== NOT EXECUTED 80076a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80076a4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 80076a8: f8 00 ff 36 calli 8047380 <__errno> <== NOT EXECUTED 80076ac: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80076b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80076b4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80076b8: e3 ff ff e4 bi 8007648 <== NOT EXECUTED 080292e8 : int chown( const char *path, uid_t owner, gid_t group ) { 80292e8: 37 9c ff d8 addi sp,sp,-40 80292ec: 5b 8b 00 14 sw (sp+20),r11 80292f0: 5b 8c 00 10 sw (sp+16),r12 80292f4: 5b 8d 00 0c sw (sp+12),r13 80292f8: 5b 8e 00 08 sw (sp+8),r14 80292fc: 5b 9d 00 04 sw (sp+4),ra 8029300: b8 20 58 00 mv r11,r1 8029304: 20 4e ff ff andi r14,r2,0xffff 8029308: 20 6d ff ff andi r13,r3,0xffff rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 802930c: 37 8c 00 18 addi r12,sp,24 8029310: f8 00 96 06 calli 804eb28 8029314: b8 20 10 00 mv r2,r1 8029318: 34 03 00 00 mvi r3,0 802931c: b9 60 08 00 mv r1,r11 8029320: b9 80 20 00 mv r4,r12 8029324: 34 05 00 01 mvi r5,1 8029328: fb ff 79 96 calli 8007980 802932c: 34 0b ff ff mvi r11,-1 8029330: 5c 20 00 0f bne r1,r0,802936c return -1; if ( !loc.ops->chown_h ) { 8029334: 2b 82 00 24 lw r2,(sp+36) 8029338: 28 44 00 18 lw r4,(r2+24) 802933c: 44 81 00 14 be r4,r1,802938c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 8029340: b9 c0 10 00 mv r2,r14 8029344: b9 a0 18 00 mv r3,r13 8029348: b9 80 08 00 mv r1,r12 802934c: d8 80 00 00 call r4 8029350: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8029354: 2b 81 00 24 lw r1,(sp+36) 8029358: 44 20 00 05 be r1,r0,802936c 802935c: 28 22 00 1c lw r2,(r1+28) 8029360: 44 40 00 03 be r2,r0,802936c 8029364: b9 80 08 00 mv r1,r12 8029368: d8 40 00 00 call r2 return result; } 802936c: b9 60 08 00 mv r1,r11 8029370: 2b 9d 00 04 lw ra,(sp+4) 8029374: 2b 8b 00 14 lw r11,(sp+20) 8029378: 2b 8c 00 10 lw r12,(sp+16) 802937c: 2b 8d 00 0c lw r13,(sp+12) 8029380: 2b 8e 00 08 lw r14,(sp+8) 8029384: 37 9c 00 28 addi sp,sp,40 8029388: c3 a0 00 00 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 802938c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8029390: 44 44 00 03 be r2,r4,802939c <== NOT EXECUTED 8029394: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8029398: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802939c: f8 00 77 f9 calli 8047380 <__errno> <== NOT EXECUTED 80293a0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80293a4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80293a8: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80293ac: e3 ff ff f0 bi 802936c <== NOT EXECUTED 080293b0 : #include int chroot( const char *pathname ) { 80293b0: 37 9c ff dc addi sp,sp,-36 80293b4: 5b 8b 00 10 sw (sp+16),r11 80293b8: 5b 8c 00 0c sw (sp+12),r12 80293bc: 5b 8d 00 08 sw (sp+8),r13 80293c0: 5b 9d 00 04 sw (sp+4),ra 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) { 80293c4: 78 0b 08 07 mvhi r11,0x807 80293c8: 39 6b 12 f0 ori r11,r11,0x12f0 80293cc: 29 6d 00 00 lw r13,(r11+0) 80293d0: 78 02 08 07 mvhi r2,0x807 80293d4: 38 42 4e e4 ori r2,r2,0x4ee4 #include int chroot( const char *pathname ) { 80293d8: b8 20 60 00 mv r12,r1 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) { 80293dc: 45 a2 00 26 be r13,r2,8029474 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 80293e0: b9 80 08 00 mv r1,r12 80293e4: fb ff ff 7c calli 80291d4 80293e8: b8 20 60 00 mv r12,r1 if (result) { 80293ec: 5c 20 00 2a bne r1,r0,8029494 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 80293f0: 78 01 08 06 mvhi r1,0x806 80293f4: 38 21 5e d0 ori r1,r1,0x5ed0 80293f8: 34 02 00 01 mvi r2,1 80293fc: b9 80 18 00 mv r3,r12 8029400: 37 84 00 14 addi r4,sp,20 8029404: b9 80 28 00 mv r5,r12 8029408: fb ff 79 5e calli 8007980 802940c: 5c 2c 00 22 bne r1,r12,8029494 /* 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); 8029410: 29 62 00 00 lw r2,(r11+0) 8029414: 28 43 00 24 lw r3,(r2+36) 8029418: 44 61 00 06 be r3,r1,8029430 802941c: 28 63 00 1c lw r3,(r3+28) 8029420: 44 61 00 04 be r3,r1,8029430 8029424: 34 41 00 18 addi r1,r2,24 8029428: d8 60 00 00 call r3 802942c: 29 62 00 00 lw r2,(r11+0) rtems_filesystem_root = loc; 8029430: 2b 81 00 14 lw r1,(sp+20) 8029434: 58 41 00 18 sw (r2+24),r1 8029438: 2b 83 00 18 lw r3,(sp+24) 802943c: 34 01 00 00 mvi r1,0 8029440: 58 43 00 1c sw (r2+28),r3 8029444: 2b 83 00 1c lw r3,(sp+28) 8029448: 58 43 00 20 sw (r2+32),r3 802944c: 2b 83 00 20 lw r3,(sp+32) 8029450: 58 43 00 24 sw (r2+36),r3 8029454: 2b 83 00 24 lw r3,(sp+36) 8029458: 58 43 00 28 sw (r2+40),r3 return 0; } 802945c: 2b 9d 00 04 lw ra,(sp+4) 8029460: 2b 8b 00 10 lw r11,(sp+16) 8029464: 2b 8c 00 0c lw r12,(sp+12) 8029468: 2b 8d 00 08 lw r13,(sp+8) 802946c: 37 9c 00 24 addi sp,sp,36 8029470: c3 a0 00 00 ret int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 8029474: f8 00 07 9d calli 802b2e8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 8029478: 29 61 00 00 lw r1,(r11+0) 802947c: 5c 2d ff d9 bne r1,r13,80293e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029480: f8 00 77 c0 calli 8047380 <__errno> <== NOT EXECUTED 8029484: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8029488: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802948c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029490: e3 ff ff f3 bi 802945c <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 8029494: f8 00 77 bb calli 8047380 <__errno> <== NOT EXECUTED 8029498: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 802949c: f8 00 77 b9 calli 8047380 <__errno> <== NOT EXECUTED 80294a0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80294a4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED 80294a8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80294ac: e3 ff ff ec bi 802945c <== NOT EXECUTED 08004fbc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004fbc: 37 9c ff f0 addi sp,sp,-16 8004fc0: 5b 9d 00 04 sw (sp+4),ra rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8004fc4: 28 23 00 3c lw r3,(r1+60) #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004fc8: b8 20 20 00 mv r4,r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0; 8004fcc: 34 01 00 00 mvi r1,0 args.mode = 0; 8004fd0: 5b 81 00 10 sw (sp+16),r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0; 8004fd4: 5b 81 00 0c sw (sp+12),r1 args.mode = 0; status = rtems_io_close( 8004fd8: 28 62 00 0c lw r2,(r3+12) 8004fdc: 28 61 00 08 lw r1,(r3+8) 8004fe0: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8004fe4: 5b 84 00 08 sw (sp+8),r4 args.flags = 0; args.mode = 0; status = rtems_io_close( 8004fe8: f8 00 05 38 calli 80064c8 np->major, np->minor, (void *) &args ); if ( status ) { 8004fec: b8 20 10 00 mv r2,r1 8004ff0: 44 20 00 03 be r1,r0,8004ffc return rtems_deviceio_errno(status); 8004ff4: f8 00 00 54 calli 8005144 <== NOT EXECUTED 8004ff8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 8004ffc: b8 40 08 00 mv r1,r2 8005000: 2b 9d 00 04 lw ra,(sp+4) 8005004: 37 9c 00 10 addi sp,sp,16 8005008: c3 a0 00 00 ret 08005018 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8005018: 37 9c ff dc addi sp,sp,-36 800501c: 5b 8b 00 24 sw (sp+36),r11 8005020: 5b 8c 00 20 sw (sp+32),r12 8005024: 5b 8d 00 1c sw (sp+28),r13 8005028: 5b 8e 00 18 sw (sp+24),r14 800502c: 5b 8f 00 14 sw (sp+20),r15 8005030: 5b 90 00 10 sw (sp+16),r16 8005034: 5b 91 00 0c sw (sp+12),r17 8005038: 5b 92 00 08 sw (sp+8),r18 800503c: 5b 9d 00 04 sw (sp+4),ra 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; 8005040: 28 90 00 00 lw r16,(r4+0) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8005044: b8 80 78 00 mv r15,r4 8005048: b8 20 90 00 mv r18,r1 800504c: b8 40 70 00 mv r14,r2 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) 8005050: 46 00 00 38 be r16,r0,8005130 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8005054: 78 02 08 00 mvhi r2,0x800 8005058: 38 42 d0 14 ori r2,r2,0xd014 800505c: 28 51 00 00 lw r17,(r2+0) } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 8005060: 34 01 00 00 mvi r1,0 8005064: b8 20 58 00 mv r11,r1 for (i = 0; i < rtems_device_table_size; i++) { 8005068: 46 21 00 15 be r17,r1,80050bc if (!device_name_table[i].device_name) 800506c: 34 02 00 02 mvi r2,2 8005070: fb ff ec 3a calli 8000158 <__ashlsi3> 8005074: 34 02 00 02 mvi r2,2 8005078: b8 20 68 00 mv r13,r1 800507c: fb ff ec 37 calli 8000158 <__ashlsi3> 8005080: b5 a1 68 00 add r13,r13,r1 8005084: b6 0d 68 00 add r13,r16,r13 8005088: 29 ac 00 00 lw r12,(r13+0) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 800508c: ba 40 08 00 mv r1,r18 8005090: b9 c0 18 00 mv r3,r14 8005094: b9 80 10 00 mv r2,r12 /* 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++) { 8005098: 35 6b 00 01 addi r11,r11,1 if (!device_name_table[i].device_name) 800509c: 45 80 00 06 be r12,r0,80050b4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 80050a0: f8 00 13 b3 calli 8009f6c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 80050a4: b5 8e 60 00 add r12,r12,r14 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 80050a8: 5c 20 00 03 bne r1,r0,80050b4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 80050ac: 41 82 00 00 lbu r2,(r12+0) 80050b0: 44 41 00 08 be r2,r1,80050d0 /* 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++) { 80050b4: b9 60 08 00 mv r1,r11 80050b8: 56 2b ff ed bgu r17,r11,800506c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 80050bc: f8 00 0f 17 calli 8008d18 <__errno> 80050c0: 34 02 00 02 mvi r2,2 80050c4: 58 22 00 00 sw (r1+0),r2 80050c8: 34 01 ff ff mvi r1,-1 80050cc: e0 00 00 0e bi 8005104 /* 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; 80050d0: 78 01 08 00 mvhi r1,0x800 80050d4: 38 21 d1 7c ori r1,r1,0xd17c 80050d8: 28 24 00 00 lw r4,(r1+0) 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; 80050dc: 78 03 08 00 mvhi r3,0x800 pathloc->ops = &devFS_ops; 80050e0: 78 01 08 00 mvhi r1,0x800 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80050e4: 28 84 00 28 lw r4,(r4+40) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 80050e8: 38 21 d0 fc ori r1,r1,0xd0fc 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; 80050ec: 38 63 d1 44 ori r3,r3,0xd144 pathloc->ops = &devFS_ops; 80050f0: 59 e1 00 0c sw (r15+12),r1 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80050f4: 59 e4 00 10 sw (r15+16),r4 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 80050f8: 59 ed 00 00 sw (r15+0),r13 pathloc->handlers = &devFS_file_handlers; 80050fc: 59 e3 00 08 sw (r15+8),r3 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8005100: b8 40 08 00 mv r1,r2 return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 8005104: 2b 9d 00 04 lw ra,(sp+4) 8005108: 2b 8b 00 24 lw r11,(sp+36) 800510c: 2b 8c 00 20 lw r12,(sp+32) 8005110: 2b 8d 00 1c lw r13,(sp+28) 8005114: 2b 8e 00 18 lw r14,(sp+24) 8005118: 2b 8f 00 14 lw r15,(sp+20) 800511c: 2b 90 00 10 lw r16,(sp+16) 8005120: 2b 91 00 0c lw r17,(sp+12) 8005124: 2b 92 00 08 lw r18,(sp+8) 8005128: 37 9c 00 24 addi sp,sp,36 800512c: c3 a0 00 00 ret } /* 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 ); 8005130: f8 00 0e fa calli 8008d18 <__errno> <== NOT EXECUTED 8005134: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8005138: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800513c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8005140: e3 ff ff f1 bi 8005104 <== NOT EXECUTED 08000810 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8000810: 37 9c ff f0 addi sp,sp,-16 8000814: 5b 8b 00 10 sw (sp+16),r11 8000818: 5b 8c 00 0c sw (sp+12),r12 800081c: 5b 8d 00 08 sw (sp+8),r13 8000820: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 8000824: 78 0b 08 00 mvhi r11,0x800 8000828: 39 6b d0 14 ori r11,r11,0xd014 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800082c: b8 20 68 00 mv r13,r1 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 8000830: 29 61 00 00 lw r1,(r11+0) 8000834: 34 02 00 02 mvi r2,2 8000838: fb ff fe 48 calli 8000158 <__ashlsi3> 800083c: 34 02 00 02 mvi r2,2 8000840: b8 20 60 00 mv r12,r1 8000844: fb ff fe 45 calli 8000158 <__ashlsi3> 8000848: b5 81 08 00 add r1,r12,r1 800084c: f8 00 10 c3 calli 8004b58 <_Workspace_Allocate> 8000850: b8 20 60 00 mv r12,r1 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 8000854: 44 20 00 19 be r1,r0,80008b8 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 8000858: 29 61 00 00 lw r1,(r11+0) 800085c: 34 02 00 02 mvi r2,2 8000860: fb ff fe 3e calli 8000158 <__ashlsi3> 8000864: 34 02 00 02 mvi r2,2 8000868: b8 20 58 00 mv r11,r1 800086c: fb ff fe 3b calli 8000158 <__ashlsi3> 8000870: b5 61 18 00 add r3,r11,r1 8000874: 34 02 00 00 mvi r2,0 8000878: b9 80 08 00 mv r1,r12 800087c: f8 00 24 0a calli 80098a4 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; 8000880: 78 02 08 00 mvhi r2,0x800 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000884: 78 01 08 00 mvhi r1,0x800 8000888: 38 21 d0 fc ori r1,r1,0xd0fc 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; 800088c: 38 42 d1 44 ori r2,r2,0xd144 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000890: 59 a1 00 28 sw (r13+40),r1 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 8000894: 59 ac 00 1c sw (r13+28),r12 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; 8000898: 59 a2 00 24 sw (r13+36),r2 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; 800089c: 34 01 00 00 mvi r1,0 return 0; } 80008a0: 2b 9d 00 04 lw ra,(sp+4) 80008a4: 2b 8b 00 10 lw r11,(sp+16) 80008a8: 2b 8c 00 0c lw r12,(sp+12) 80008ac: 2b 8d 00 08 lw r13,(sp+8) 80008b0: 37 9c 00 10 addi sp,sp,16 80008b4: c3 a0 00 00 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 80008b8: f8 00 21 18 calli 8008d18 <__errno> <== NOT EXECUTED 80008bc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80008c0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80008c4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80008c8: e3 ff ff f6 bi 80008a0 <== NOT EXECUTED 08000a9c : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8000a9c: 37 9c ff ec addi sp,sp,-20 8000aa0: 5b 9d 00 04 sw (sp+4),ra 8000aa4: b8 20 20 00 mv r4,r1 rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000aa8: 28 21 00 3c lw r1,(r1+60) args.iop = iop; args.command = command; 8000aac: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8000ab0: 5b 83 00 10 sw (sp+16),r3 status = rtems_io_control( 8000ab4: 28 22 00 0c lw r2,(r1+12) 8000ab8: 28 21 00 08 lw r1,(r1+8) 8000abc: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000ac0: 5b 84 00 08 sw (sp+8),r4 args.command = command; args.buffer = buffer; status = rtems_io_control( 8000ac4: f8 00 07 5a calli 800282c np->major, np->minor, (void *) &args ); if ( status ) 8000ac8: 5c 20 00 05 bne r1,r0,8000adc return rtems_deviceio_errno(status); return args.ioctl_return; 8000acc: 2b 81 00 14 lw r1,(sp+20) } 8000ad0: 2b 9d 00 04 lw ra,(sp+4) 8000ad4: 37 9c 00 14 addi sp,sp,20 8000ad8: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000adc: f8 00 11 9a calli 8005144 <== NOT EXECUTED return args.ioctl_return; } 8000ae0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ae4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8000ae8: c3 a0 00 00 ret <== NOT EXECUTED 080008cc : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008cc: 37 9c ff d8 addi sp,sp,-40 80008d0: 5b 8b 00 28 sw (sp+40),r11 80008d4: 5b 8c 00 24 sw (sp+36),r12 80008d8: 5b 8d 00 20 sw (sp+32),r13 80008dc: 5b 8e 00 1c sw (sp+28),r14 80008e0: 5b 8f 00 18 sw (sp+24),r15 80008e4: 5b 90 00 14 sw (sp+20),r16 80008e8: 5b 91 00 10 sw (sp+16),r17 80008ec: 5b 92 00 0c sw (sp+12),r18 80008f0: 5b 93 00 08 sw (sp+8),r19 80008f4: 5b 9d 00 04 sw (sp+4),ra * 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') && 80008f8: 40 26 00 00 lbu r6,(r1+0) const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008fc: b8 20 60 00 mv r12,r1 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 8000900: 34 01 00 64 mvi r1,100 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 8000904: b8 40 88 00 mv r17,r2 8000908: b8 60 98 00 mv r19,r3 800090c: b8 80 90 00 mv r18,r4 * 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') && 8000910: 44 c1 00 48 be r6,r1,8000a30 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 8000914: 22 26 f0 00 andi r6,r17,0xf000 8000918: 7c c2 60 00 cmpnei r2,r6,24576 800091c: 7c c1 20 00 cmpnei r1,r6,8192 8000920: a0 22 08 00 and r1,r1,r2 8000924: 5c 20 00 4d bne r1,r0,8000a58 rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8000928: 28 ae 00 00 lw r14,(r5+0) if (!device_name_table) 800092c: 45 c1 00 55 be r14,r1,8000a80 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000930: 78 05 08 00 mvhi r5,0x800 8000934: 38 a5 d0 14 ori r5,r5,0xd014 8000938: 28 af 00 00 lw r15,(r5+0) rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 800093c: 34 10 ff ff mvi r16,-1 8000940: b8 20 58 00 mv r11,r1 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000944: 45 e0 00 4a be r15,r0,8000a6c if (device_name_table[i].device_name == NULL) 8000948: 34 02 00 02 mvi r2,2 800094c: fb ff fe 03 calli 8000158 <__ashlsi3> 8000950: 34 02 00 02 mvi r2,2 8000954: b8 20 68 00 mv r13,r1 8000958: fb ff fe 00 calli 8000158 <__ashlsi3> 800095c: b5 a1 08 00 add r1,r13,r1 8000960: b5 c1 08 00 add r1,r14,r1 8000964: 28 25 00 00 lw r5,(r1+0) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000968: b9 80 08 00 mv r1,r12 800096c: b8 a0 10 00 mv r2,r5 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 8000970: 44 a0 00 29 be r5,r0,8000a14 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000974: f8 00 25 03 calli 8009d80 <== NOT EXECUTED 8000978: 44 20 00 29 be r1,r0,8000a1c <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 800097c: 35 6b 00 01 addi r11,r11,1 8000980: b9 60 08 00 mv r1,r11 8000984: 55 eb ff f1 bgu r15,r11,8000948 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 8000988: 34 01 ff ff mvi r1,-1 800098c: 46 01 00 38 be r16,r1,8000a6c rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 8000990: 90 00 58 00 rcsr r11,IE 8000994: 34 01 ff fe mvi r1,-2 8000998: a1 61 08 00 and r1,r11,r1 800099c: d0 01 00 00 wcsr IE,r1 device_name_table[slot].device_name = (char *)path; 80009a0: 34 02 00 02 mvi r2,2 80009a4: ba 00 08 00 mv r1,r16 80009a8: fb ff fd ec calli 8000158 <__ashlsi3> 80009ac: 34 02 00 02 mvi r2,2 80009b0: b8 20 68 00 mv r13,r1 80009b4: fb ff fd e9 calli 8000158 <__ashlsi3> 80009b8: b5 a1 08 00 add r1,r13,r1 80009bc: b5 c1 70 00 add r14,r14,r1 80009c0: 59 cc 00 00 sw (r14+0),r12 device_name_table[slot].device_name_length = strlen(path); 80009c4: b9 80 08 00 mv r1,r12 80009c8: f8 00 25 3e calli 8009ec0 80009cc: 59 c1 00 04 sw (r14+4),r1 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 80009d0: 59 d1 00 10 sw (r14+16),r17 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); device_name_table[slot].major = major; 80009d4: 59 d3 00 08 sw (r14+8),r19 device_name_table[slot].minor = minor; 80009d8: 59 d2 00 0c sw (r14+12),r18 device_name_table[slot].mode = mode; _ISR_Enable(level); 80009dc: d0 0b 00 00 wcsr IE,r11 80009e0: 34 01 00 00 mvi r1,0 return 0; } 80009e4: 2b 9d 00 04 lw ra,(sp+4) 80009e8: 2b 8b 00 28 lw r11,(sp+40) 80009ec: 2b 8c 00 24 lw r12,(sp+36) 80009f0: 2b 8d 00 20 lw r13,(sp+32) 80009f4: 2b 8e 00 1c lw r14,(sp+28) 80009f8: 2b 8f 00 18 lw r15,(sp+24) 80009fc: 2b 90 00 14 lw r16,(sp+20) 8000a00: 2b 91 00 10 lw r17,(sp+16) 8000a04: 2b 92 00 0c lw r18,(sp+12) 8000a08: 2b 93 00 08 lw r19,(sp+8) 8000a0c: 37 9c 00 28 addi sp,sp,40 8000a10: c3 a0 00 00 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 8000a14: b9 60 80 00 mv r16,r11 8000a18: e3 ff ff d9 bi 800097c 8000a1c: f8 00 20 bf calli 8008d18 <__errno> <== NOT EXECUTED 8000a20: 34 02 00 11 mvi r2,17 <== NOT EXECUTED 8000a24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a2c: e3 ff ff ee bi 80009e4 <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 8000a30: 41 82 00 01 lbu r2,(r12+1) 8000a34: 34 01 00 65 mvi r1,101 8000a38: 5c 41 ff b7 bne r2,r1,8000914 (path[2] == 'v') && (path[3] == '\0')) 8000a3c: 41 82 00 02 lbu r2,(r12+2) 8000a40: 34 01 00 76 mvi r1,118 8000a44: 5c 41 ff b4 bne r2,r1,8000914 8000a48: 41 82 00 03 lbu r2,(r12+3) 8000a4c: b8 40 08 00 mv r1,r2 8000a50: 5c 40 ff b1 bne r2,r0,8000914 8000a54: e3 ff ff e4 bi 80009e4 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 8000a58: f8 00 20 b0 calli 8008d18 <__errno> <== NOT EXECUTED 8000a5c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000a60: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a64: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a68: e3 ff ff df bi 80009e4 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 8000a6c: f8 00 20 ab calli 8008d18 <__errno> <== NOT EXECUTED 8000a70: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000a74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a78: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a7c: e3 ff ff da bi 80009e4 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 8000a80: f8 00 20 a6 calli 8008d18 <__errno> <== NOT EXECUTED 8000a84: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000a88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a90: e3 ff ff d5 bi 80009e4 <== NOT EXECUTED 08000aec : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8000aec: 37 9c ff f0 addi sp,sp,-16 8000af0: 5b 9d 00 04 sw (sp+4),ra 8000af4: b8 20 28 00 mv r5,r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 8000af8: 28 21 00 18 lw r1,(r1+24) args.mode = mode; 8000afc: 5b 84 00 10 sw (sp+16),r4 status = rtems_io_open( 8000b00: 37 83 00 08 addi r3,sp,8 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 8000b04: 5b 81 00 0c sw (sp+12),r1 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000b08: 28 a1 00 3c lw r1,(r5+60) args.iop = iop; 8000b0c: 5b 85 00 08 sw (sp+8),r5 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 8000b10: 28 22 00 0c lw r2,(r1+12) 8000b14: 28 21 00 08 lw r1,(r1+8) 8000b18: f8 00 07 c9 calli 8002a3c np->major, np->minor, (void *) &args ); if ( status ) 8000b1c: b8 20 10 00 mv r2,r1 8000b20: 44 20 00 03 be r1,r0,8000b2c return rtems_deviceio_errno(status); 8000b24: f8 00 11 88 calli 8005144 <== NOT EXECUTED 8000b28: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 8000b2c: b8 40 08 00 mv r1,r2 8000b30: 2b 9d 00 04 lw ra,(sp+4) 8000b34: 37 9c 00 10 addi sp,sp,16 8000b38: c3 a0 00 00 ret 08000b3c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8000b3c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8000b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000b44: b8 20 20 00 mv r4,r1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 8000b48: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED 8000b4c: 5b 81 00 20 sw (sp+32),r1 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000b50: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED 8000b54: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED 8000b58: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED args.buffer = buffer; args.count = count; 8000b5c: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8000b60: 34 03 00 00 mvi r3,0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000b64: 5b 81 00 10 sw (sp+16),r1 <== 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; 8000b68: 28 81 00 3c lw r1,(r4+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8000b6c: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 8000b70: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000b74: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8000b78: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8000b7c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000b80: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000b84: f8 00 07 d6 calli 8002adc <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 8000b88: 5c 20 00 05 bne r1,r0,8000b9c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000b8c: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8000b90: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000b94: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000b98: c3 a0 00 00 ret <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000b9c: f8 00 11 6a calli 8005144 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000ba0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ba4: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000ba8: c3 a0 00 00 ret <== NOT EXECUTED 08000bac : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8000bac: 37 9c ff fc addi sp,sp,-4 8000bb0: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 8000bb4: 28 21 00 00 lw r1,(r1+0) if (!the_dev) 8000bb8: 44 20 00 0b be r1,r0,8000be4 rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000bbc: 28 23 00 0c lw r3,(r1+12) buf->st_mode = the_dev->mode; 8000bc0: 28 24 00 10 lw r4,(r1+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 ); 8000bc4: 28 21 00 08 lw r1,(r1+8) 8000bc8: 58 43 00 1c sw (r2+28),r3 buf->st_mode = the_dev->mode; 8000bcc: 58 44 00 0c sw (r2+12),r4 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 ); 8000bd0: 58 41 00 18 sw (r2+24),r1 buf->st_mode = the_dev->mode; 8000bd4: 34 01 00 00 mvi r1,0 return 0; } 8000bd8: 2b 9d 00 04 lw ra,(sp+4) 8000bdc: 37 9c 00 04 addi sp,sp,4 8000be0: c3 a0 00 00 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 8000be4: f8 00 20 4d calli 8008d18 <__errno> <== NOT EXECUTED 8000be8: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000bec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000bf0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000bf4: e3 ff ff f9 bi 8000bd8 <== NOT EXECUTED 08000bf8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8000bf8: 37 9c ff dc addi sp,sp,-36 8000bfc: 5b 9d 00 04 sw (sp+4),ra 8000c00: b8 20 20 00 mv r4,r1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 8000c04: 28 21 00 18 lw r1,(r1+24) 8000c08: 5b 81 00 20 sw (sp+32),r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000c0c: 28 81 00 14 lw r1,(r4+20) 8000c10: 5b 81 00 14 sw (sp+20),r1 8000c14: 28 81 00 10 lw r1,(r4+16) args.buffer = (void *) buffer; args.count = count; 8000c18: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 8000c1c: 34 03 00 00 mvi r3,0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000c20: 5b 81 00 10 sw (sp+16),r1 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000c24: 28 81 00 3c lw r1,(r4+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8000c28: 5b 83 00 24 sw (sp+36),r3 np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 8000c2c: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000c30: 28 22 00 0c lw r2,(r1+12) 8000c34: 28 21 00 08 lw r1,(r1+8) 8000c38: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000c3c: 5b 84 00 08 sw (sp+8),r4 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000c40: f8 00 07 cf calli 8002b7c np->major, np->minor, (void *) &args ); if ( status ) 8000c44: 5c 20 00 05 bne r1,r0,8000c58 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000c48: 2b 81 00 24 lw r1,(sp+36) } 8000c4c: 2b 9d 00 04 lw ra,(sp+4) 8000c50: 37 9c 00 24 addi sp,sp,36 8000c54: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000c58: f8 00 11 3b calli 8005144 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000c5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000c60: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000c64: c3 a0 00 00 ret <== NOT EXECUTED 08009c90 : */ int device_close( rtems_libio_t *iop ) { 8009c90: 37 9c ff f0 addi sp,sp,-16 8009c94: 5b 9d 00 04 sw (sp+4),ra rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8009c98: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = 0; 8009c9c: 34 02 00 00 mvi r2,0 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 8009ca0: 5b 81 00 08 sw (sp+8),r1 args.flags = 0; args.mode = 0; 8009ca4: 5b 82 00 10 sw (sp+16),r2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; 8009ca8: 5b 82 00 0c sw (sp+12),r2 args.mode = 0; status = rtems_io_close( 8009cac: 28 62 00 54 lw r2,(r3+84) 8009cb0: 28 61 00 50 lw r1,(r3+80) 8009cb4: 37 83 00 08 addi r3,sp,8 8009cb8: f8 00 04 ce calli 800aff0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 8009cbc: b8 20 10 00 mv r2,r1 8009cc0: 44 20 00 03 be r1,r0,8009ccc return rtems_deviceio_errno(status); 8009cc4: f8 00 06 aa calli 800b76c <== NOT EXECUTED 8009cc8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 8009ccc: b8 40 08 00 mv r1,r2 8009cd0: 2b 9d 00 04 lw ra,(sp+4) 8009cd4: 37 9c 00 10 addi sp,sp,16 8009cd8: c3 a0 00 00 ret 08009b6c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8009b6c: 37 9c ff ec addi sp,sp,-20 8009b70: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 8009b74: 28 24 00 3c lw r4,(r1+60) rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 8009b78: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8009b7c: 5b 83 00 10 sw (sp+16),r3 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 8009b80: 5b 81 00 08 sw (sp+8),r1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 8009b84: 28 82 00 54 lw r2,(r4+84) 8009b88: 28 81 00 50 lw r1,(r4+80) 8009b8c: 37 83 00 08 addi r3,sp,8 8009b90: f8 00 05 40 calli 800b090 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009b94: 5c 20 00 05 bne r1,r0,8009ba8 return rtems_deviceio_errno(status); return args.ioctl_return; 8009b98: 2b 81 00 14 lw r1,(sp+20) } 8009b9c: 2b 9d 00 04 lw ra,(sp+4) 8009ba0: 37 9c 00 14 addi sp,sp,20 8009ba4: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8009ba8: f8 00 06 f1 calli 800b76c <== NOT EXECUTED return args.ioctl_return; } 8009bac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009bb0: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8009bb4: c3 a0 00 00 ret <== NOT EXECUTED 08009cdc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8009cdc: 37 9c ff f0 addi sp,sp,-16 8009ce0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 8009ce4: 28 22 00 18 lw r2,(r1+24) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8009ce8: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = iop->flags; args.mode = mode; 8009cec: 5b 84 00 10 sw (sp+16),r4 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 8009cf0: 5b 82 00 0c sw (sp+12),r2 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 8009cf4: 5b 81 00 08 sw (sp+8),r1 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 8009cf8: 28 62 00 54 lw r2,(r3+84) 8009cfc: 28 61 00 50 lw r1,(r3+80) 8009d00: 37 83 00 08 addi r3,sp,8 8009d04: f8 00 05 0b calli 800b130 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009d08: b8 20 10 00 mv r2,r1 8009d0c: 44 20 00 03 be r1,r0,8009d18 return rtems_deviceio_errno(status); 8009d10: f8 00 06 97 calli 800b76c <== NOT EXECUTED 8009d14: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 8009d18: b8 40 08 00 mv r1,r2 8009d1c: 2b 9d 00 04 lw ra,(sp+4) 8009d20: 37 9c 00 10 addi sp,sp,16 8009d24: c3 a0 00 00 ret 08009c24 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8009c24: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009c28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 8009c2c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8009c30: 5b 84 00 20 sw (sp+32),r4 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 8009c34: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED 8009c38: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8009c3c: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED args.buffer = buffer; 8009c40: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8009c44: 34 02 00 00 mvi r2,0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 8009c48: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8009c4c: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 8009c50: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8009c54: 5b 82 00 24 sw (sp+36),r2 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 8009c58: 5b 81 00 08 sw (sp+8),r1 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8009c5c: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED 8009c60: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED 8009c64: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8009c68: f8 00 05 5a calli 800b1d0 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009c6c: 5c 20 00 05 bne r1,r0,8009c80 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8009c70: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8009c74: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009c78: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009c7c: c3 a0 00 00 ret <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8009c80: f8 00 06 bb calli 800b76c <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8009c84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009c88: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009c8c: c3 a0 00 00 ret <== NOT EXECUTED 08009bb8 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8009bb8: 37 9c ff dc addi sp,sp,-36 8009bbc: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 8009bc0: 28 24 00 18 lw r4,(r1+24) 8009bc4: 5b 84 00 20 sw (sp+32),r4 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 8009bc8: 28 24 00 14 lw r4,(r1+20) 8009bcc: 5b 84 00 14 sw (sp+20),r4 8009bd0: 28 24 00 10 lw r4,(r1+16) args.buffer = (void *) buffer; 8009bd4: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8009bd8: 34 02 00 00 mvi r2,0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 8009bdc: 5b 84 00 10 sw (sp+16),r4 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8009be0: 28 24 00 3c lw r4,(r1+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 8009be4: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 8009be8: 5b 82 00 24 sw (sp+36),r2 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 8009bec: 5b 81 00 08 sw (sp+8),r1 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8009bf0: 28 82 00 54 lw r2,(r4+84) 8009bf4: 28 81 00 50 lw r1,(r4+80) 8009bf8: 37 83 00 08 addi r3,sp,8 8009bfc: f8 00 05 9d calli 800b270 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009c00: 5c 20 00 05 bne r1,r0,8009c14 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8009c04: 2b 81 00 24 lw r1,(sp+36) } 8009c08: 2b 9d 00 04 lw ra,(sp+4) 8009c0c: 37 9c 00 24 addi sp,sp,36 8009c10: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8009c14: f8 00 06 d6 calli 800b76c <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8009c18: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009c1c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009c20: c3 a0 00 00 ret <== NOT EXECUTED 08004be8 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 8004be8: 37 9c ff f0 addi sp,sp,-16 8004bec: 5b 8b 00 10 sw (sp+16),r11 8004bf0: 5b 8c 00 0c sw (sp+12),r12 8004bf4: 5b 8d 00 08 sw (sp+8),r13 8004bf8: 5b 9d 00 04 sw (sp+4),ra 8004bfc: b8 20 58 00 mv r11,r1 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 8004c00: 28 21 00 b4 lw r1,(r1+180) 8004c04: 44 20 00 1a be r1,r0,8004c6c rtems_interrupt_disable (level); 8004c08: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004c0c: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8004c10: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8004c14: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 8004c18: 29 64 00 84 lw r4,(r11+132) <== NOT EXECUTED 8004c1c: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 8004c20: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8004c24: 44 83 00 11 be r4,r3,8004c68 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 8004c28: 34 0c 00 02 mvi r12,2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004c2c: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 8004c30: 59 6c 00 94 sw (r11+148),r12 <== NOT EXECUTED rtems_interrupt_enable (level); 8004c34: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 8004c38: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004c3c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004c40: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004c44: f8 00 07 1d calli 80068b8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004c48: 5c 20 00 0f bne r1,r0,8004c84 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004c4c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004c50: a0 2d 10 00 and r2,r1,r13 <== NOT EXECUTED 8004c54: d0 02 00 00 wcsr IE,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) { 8004c58: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED 8004c5c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED 8004c60: 5c 62 ff f4 bne r3,r2,8004c30 <== NOT EXECUTED 8004c64: b8 20 10 00 mv r2,r1 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 8004c68: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED } } 8004c6c: 2b 9d 00 04 lw ra,(sp+4) 8004c70: 2b 8b 00 10 lw r11,(sp+16) 8004c74: 2b 8c 00 0c lw r12,(sp+12) 8004c78: 2b 8d 00 08 lw r13,(sp+8) 8004c7c: 37 9c 00 10 addi sp,sp,16 8004c80: c3 a0 00 00 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8004c84: f8 00 09 39 calli 8007168 <== NOT EXECUTED 08001edc : int dup2( int fildes, int fildes2 ) { 8001edc: 37 9c ff a4 addi sp,sp,-92 8001ee0: 5b 8b 00 14 sw (sp+20),r11 8001ee4: 5b 8c 00 10 sw (sp+16),r12 8001ee8: 5b 8d 00 0c sw (sp+12),r13 8001eec: 5b 8e 00 08 sw (sp+8),r14 8001ef0: 5b 9d 00 04 sw (sp+4),ra /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001ef4: 37 8c 00 18 addi r12,sp,24 int dup2( int fildes, int fildes2 ) { 8001ef8: b8 40 68 00 mv r13,r2 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001efc: b9 80 10 00 mv r2,r12 if ( status == -1 ) 8001f00: 34 0b ff ff mvi r11,-1 int dup2( int fildes, int fildes2 ) { 8001f04: b8 20 70 00 mv r14,r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001f08: f8 00 02 1c calli 8002778 if ( status == -1 ) 8001f0c: 5c 2b 00 09 bne r1,r11,8001f30 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001f10: 34 01 ff ff mvi r1,-1 } 8001f14: 2b 9d 00 04 lw ra,(sp+4) 8001f18: 2b 8b 00 14 lw r11,(sp+20) 8001f1c: 2b 8c 00 10 lw r12,(sp+16) 8001f20: 2b 8d 00 0c lw r13,(sp+12) 8001f24: 2b 8e 00 08 lw r14,(sp+8) 8001f28: 37 9c 00 5c addi sp,sp,92 8001f2c: c3 a0 00 00 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 8001f30: b9 80 10 00 mv r2,r12 8001f34: b9 a0 08 00 mv r1,r13 8001f38: f8 00 02 10 calli 8002778 if ( status == -1 ) 8001f3c: 44 2b ff f5 be r1,r11,8001f10 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001f40: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8001f44: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8001f48: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8001f4c: f8 00 00 bb calli 8002238 <== NOT EXECUTED 8001f50: e3 ff ff f1 bi 8001f14 <== NOT EXECUTED 0800458c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 800458c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8004590: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004594: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004598: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800459c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80045a0: 28 42 00 3c lw r2,(r2+60) <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 80045a4: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80045a8: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 80045ac: 44 20 00 0b be r1,r0,80045d8 <== NOT EXECUTED 80045b0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80045b4: 38 21 42 c8 ori r1,r1,0x42c8 <== NOT EXECUTED 80045b8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80045bc: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80045c0: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED 80045c4: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 80045c8: fb ff f3 e5 calli 800155c <__lshrsi3> <== NOT EXECUTED 80045cc: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED 80045d0: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 80045d4: 5c 20 00 09 bne r1,r0,80045f8 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 80045d8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80045dc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80045e0: fb ff ff 86 calli 80043f8 <== NOT EXECUTED } } 80045e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80045e8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80045ec: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80045f0: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80045f4: c3 a0 00 00 ret <== 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')) { 80045f8: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 80045fc: 45 81 ff f7 be r12,r1,80045d8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 8004600: 34 04 00 5e mvi r4,94 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 8004604: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 8004608: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 800460c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004610: b9 60 18 00 mv r3,r11 <== 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] = '^'; 8004614: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 8004618: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 800461c: fb ff ff 1c calli 800428c <== NOT EXECUTED tty->column += 2; 8004620: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004624: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED 8004628: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } else { oproc (c, tty); } } 800462c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004630: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004634: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004638: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800463c: c3 a0 00 00 ret <== NOT EXECUTED 08029c68 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 8029c68: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8029c6c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp != NULL) 8029c70: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029c74: 38 21 4c a0 ori r1,r1,0x4ca0 <== NOT EXECUTED 8029c78: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8029c7c: 44 20 00 02 be r1,r0,8029c84 <== NOT EXECUTED fclose(group_fp); 8029c80: f8 00 76 22 calli 8047508 <== NOT EXECUTED } 8029c84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8029c88: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8029c8c: c3 a0 00 00 ret <== NOT EXECUTED 08029c90 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 8029c90: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8029c94: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp != NULL) 8029c98: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029c9c: 38 21 4b b8 ori r1,r1,0x4bb8 <== NOT EXECUTED 8029ca0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8029ca4: 44 20 00 02 be r1,r0,8029cac <== NOT EXECUTED fclose(passwd_fp); 8029ca8: f8 00 76 18 calli 8047508 <== NOT EXECUTED } 8029cac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8029cb0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8029cb4: c3 a0 00 00 ret <== NOT EXECUTED 08004640 : * 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) { 8004640: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8004644: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8004648: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 800464c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8004650: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8004654: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8004658: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 800465c: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8004660: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (tty->ccount == 0) 8004664: 28 23 00 20 lw r3,(r1+32) <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 8004668: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800466c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED if (tty->ccount == 0) 8004670: 44 60 00 24 be r3,r0,8004700 <== NOT EXECUTED return; if (lineFlag) { 8004674: 5c 40 00 1f bne r2,r0,80046f0 <== NOT EXECUTED 8004678: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 800467c: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8004680: 39 ce 42 c8 ori r14,r14,0x42c8 <== 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') { 8004684: 34 0f 00 09 mvi r15,9 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8004688: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 800468c: 78 10 08 02 mvhi r16,0x802 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 8004690: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED 8004694: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 8004698: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 800469c: b4 43 28 00 add r5,r2,r3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80046a0: 20 24 00 08 andi r4,r1,0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 80046a4: 40 a5 00 00 lbu r5,(r5+0) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80046a8: 44 80 00 0d be r4,r0,80046dc <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 80046ac: 5d a0 00 03 bne r13,r0,80046b8 <== NOT EXECUTED 80046b0: 20 24 00 10 andi r4,r1,0x10 <== NOT EXECUTED 80046b4: 44 8d 00 68 be r4,r13,8004854 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 80046b8: 44 af 00 37 be r5,r15,8004794 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 80046bc: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 80046c0: 34 ac 00 01 addi r12,r5,1 <== NOT EXECUTED 80046c4: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 80046c8: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED 80046cc: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 80046d0: 44 40 00 27 be r2,r0,800476c <== NOT EXECUTED 80046d4: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 80046d8: 5c 20 00 14 bne r1,r0,8004728 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 80046dc: 45 a0 00 09 be r13,r0,8004700 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 80046e0: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 80046e4: 44 60 00 07 be r3,r0,8004700 <== NOT EXECUTED 80046e8: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80046ec: e3 ff ff e9 bi 8004690 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 80046f0: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 80046f4: 20 22 00 08 andi r2,r1,0x8 <== NOT EXECUTED 80046f8: 5c 40 00 4a bne r2,r0,8004820 <== NOT EXECUTED tty->ccount = 0; 80046fc: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED } } if (!lineFlag) break; } } 8004700: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004704: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8004708: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 800470c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8004710: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8004714: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8004718: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 800471c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8004720: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8004724: c3 a0 00 00 ret <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8004728: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 800472c: 38 21 25 58 ori r1,r1,0x2558 <== NOT EXECUTED 8004730: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004734: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004738: fb ff fe d5 calli 800428c <== NOT EXECUTED if (tty->column) 800473c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004740: 44 20 00 03 be r1,r0,800474c <== NOT EXECUTED tty->column--; 8004744: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004748: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 800474c: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8004750: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED 8004754: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 8004758: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 800475c: 44 20 00 04 be r1,r0,800476c <== NOT EXECUTED 8004760: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004764: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8004768: 44 20 ff dd be r1,r0,80046dc <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 800476c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004770: 38 21 25 58 ori r1,r1,0x2558 <== NOT EXECUTED 8004774: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004778: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800477c: fb ff fe c4 calli 800428c <== NOT EXECUTED if (tty->column) 8004780: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004784: 44 20 ff d6 be r1,r0,80046dc <== NOT EXECUTED tty->column--; 8004788: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800478c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 8004790: e3 ff ff d3 bi 80046dc <== 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; 8004794: 29 6c 00 2c lw r12,(r11+44) <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004798: 44 60 00 0f be r3,r0,80047d4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 800479c: 29 c6 00 00 lw r6,(r14+0) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 80047a0: 20 27 02 00 andi r7,r1,0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 80047a4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 80047a8: b4 41 20 00 add r4,r2,r1 <== NOT EXECUTED 80047ac: 40 84 00 00 lbu r4,(r4+0) <== NOT EXECUTED 80047b0: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 80047b4: b4 c4 28 00 add r5,r6,r4 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 80047b8: 44 8f 00 16 be r4,r15,8004810 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 80047bc: 40 a4 00 01 lbu r4,(r5+1) <== NOT EXECUTED 80047c0: 20 84 00 20 andi r4,r4,0x20 <== NOT EXECUTED 80047c4: 44 80 00 10 be r4,r0,8004804 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 80047c8: 44 e0 00 02 be r7,r0,80047d0 <== NOT EXECUTED col += 2; 80047cc: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 80047d0: 5c 61 ff f6 bne r3,r1,80047a8 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 80047d4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80047d8: 4d 81 ff c1 bge r12,r1,80046dc <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 80047dc: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80047e0: 38 21 25 54 ori r1,r1,0x2554 <== NOT EXECUTED 80047e4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80047e8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80047ec: fb ff fe a8 calli 800428c <== NOT EXECUTED tty->column--; 80047f0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80047f4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80047f8: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 80047fc: 48 2c ff f8 bg r1,r12,80047dc <== NOT EXECUTED 8004800: e3 ff ff b7 bi 80046dc <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 8004804: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004808: 5c 61 ff e8 bne r3,r1,80047a8 <== NOT EXECUTED 800480c: e3 ff ff f2 bi 80047d4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 8004810: 39 8c 00 07 ori r12,r12,0x7 <== NOT EXECUTED 8004814: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004818: 5c 61 ff e4 bne r3,r1,80047a8 <== NOT EXECUTED 800481c: e3 ff ff ee bi 80047d4 <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 8004820: 20 2c 00 10 andi r12,r1,0x10 <== NOT EXECUTED 8004824: 5d 80 ff 96 bne r12,r0,800467c <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 8004828: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 800482c: 59 6c 00 20 sw (r11+32),r12 <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 8004830: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004834: fb ff ff 56 calli 800458c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 8004838: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 800483c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004840: 44 2c ff b0 be r1,r12,8004700 <== NOT EXECUTED echo ('\n', tty); 8004844: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004848: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 800484c: fb ff ff 50 calli 800458c <== NOT EXECUTED 8004850: e3 ff ff ac bi 8004700 <== 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); 8004854: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004858: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800485c: fb ff ff 4c calli 800458c <== NOT EXECUTED 8004860: e3 ff ff a8 bi 8004700 <== NOT EXECUTED 0803fe6c : #include int fchdir( int fd ) { 803fe6c: 37 9c ff c8 addi sp,sp,-56 <== NOT EXECUTED 803fe70: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 803fe74: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 803fe78: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 803fe7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 803fe80: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 803fe84: 38 42 10 10 ori r2,r2,0x1010 <== NOT EXECUTED 803fe88: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 803fe8c: 54 41 00 06 bgu r2,r1,803fea4 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 803fe90: f8 00 1d 3c calli 8047380 <__errno> <== NOT EXECUTED 803fe94: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803fe98: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 803fe9c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 803fea0: e0 00 00 49 bi 803ffc4 <== NOT EXECUTED { rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 803fea4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803fea8: fb ff 04 ae calli 8001160 <__ashlsi3> <== NOT EXECUTED 803feac: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 803feb0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803feb4: 39 8c 4e 90 ori r12,r12,0x4e90 <== NOT EXECUTED 803feb8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803febc: fb ff 04 a9 calli 8001160 <__ashlsi3> <== NOT EXECUTED 803fec0: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED 803fec4: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 803fec8: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 803fecc: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 803fed0: 20 22 01 00 andi r2,r1,0x100 <== NOT EXECUTED 803fed4: 44 40 ff ef be r2,r0,803fe90 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 803fed8: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 803fedc: 44 20 00 52 be r1,r0,8040024 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 803fee0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 803fee4: 44 20 00 55 be r1,r0,8040038 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 803fee8: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 803feec: 44 40 00 53 be r2,r0,8040038 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 803fef0: 35 61 00 1c addi r1,r11,28 <== NOT EXECUTED 803fef4: d8 40 00 00 call r2 <== NOT EXECUTED 803fef8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 803fefc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 803ff00: 5c 41 00 37 bne r2,r1,803ffdc <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803ff04: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 803ff08: 39 8c 12 f0 ori r12,r12,0x12f0 <== NOT EXECUTED 803ff0c: 29 86 00 00 lw r6,(r12+0) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803ff10: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 803ff14: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803ff18: 28 c4 00 04 lw r4,(r6+4) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803ff1c: 38 21 5e d0 ori r1,r1,0x5ed0 <== NOT EXECUTED 803ff20: b8 60 28 00 mv r5,r3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803ff24: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 803ff28: 28 c7 00 08 lw r7,(r6+8) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803ff2c: 37 84 00 28 addi r4,sp,40 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803ff30: 5b 87 00 18 sw (sp+24),r7 <== NOT EXECUTED 803ff34: 28 c7 00 0c lw r7,(r6+12) <== NOT EXECUTED 803ff38: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 803ff3c: 28 c7 00 10 lw r7,(r6+16) <== NOT EXECUTED 803ff40: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 803ff44: 28 c7 00 14 lw r7,(r6+20) <== NOT EXECUTED 803ff48: 5b 87 00 24 sw (sp+36),r7 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 803ff4c: 29 67 00 1c lw r7,(r11+28) <== NOT EXECUTED 803ff50: 58 c7 00 04 sw (r6+4),r7 <== NOT EXECUTED 803ff54: 29 67 00 20 lw r7,(r11+32) <== NOT EXECUTED 803ff58: 58 c7 00 08 sw (r6+8),r7 <== NOT EXECUTED 803ff5c: 29 67 00 24 lw r7,(r11+36) <== NOT EXECUTED 803ff60: 58 c7 00 0c sw (r6+12),r7 <== NOT EXECUTED 803ff64: 29 67 00 28 lw r7,(r11+40) <== NOT EXECUTED 803ff68: 58 c7 00 10 sw (r6+16),r7 <== NOT EXECUTED 803ff6c: 29 6b 00 2c lw r11,(r11+44) <== NOT EXECUTED 803ff70: 58 cb 00 14 sw (r6+20),r11 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803ff74: fb ff 1e 83 calli 8007980 <== NOT EXECUTED 803ff78: 5c 20 00 1e bne r1,r0,803fff0 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 803ff7c: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED 803ff80: 44 41 00 05 be r2,r1,803ff94 <== NOT EXECUTED 803ff84: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 803ff88: 44 40 00 03 be r2,r0,803ff94 <== NOT EXECUTED 803ff8c: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED 803ff90: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_current = loc; 803ff94: 2b 87 00 28 lw r7,(sp+40) <== NOT EXECUTED 803ff98: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 803ff9c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 803ffa0: 58 47 00 04 sw (r2+4),r7 <== NOT EXECUTED 803ffa4: 2b 83 00 2c lw r3,(sp+44) <== NOT EXECUTED 803ffa8: 58 43 00 08 sw (r2+8),r3 <== NOT EXECUTED 803ffac: 2b 84 00 30 lw r4,(sp+48) <== NOT EXECUTED 803ffb0: 58 44 00 0c sw (r2+12),r4 <== NOT EXECUTED 803ffb4: 2b 87 00 34 lw r7,(sp+52) <== NOT EXECUTED 803ffb8: 58 47 00 10 sw (r2+16),r7 <== NOT EXECUTED 803ffbc: 2b 83 00 38 lw r3,(sp+56) <== NOT EXECUTED 803ffc0: 58 43 00 14 sw (r2+20),r3 <== NOT EXECUTED return 0; } 803ffc4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803ffc8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 803ffcc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 803ffd0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 803ffd4: 37 9c 00 38 addi sp,sp,56 <== NOT EXECUTED 803ffd8: c3 a0 00 00 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 803ffdc: f8 00 1c e9 calli 8047380 <__errno> <== NOT EXECUTED 803ffe0: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 803ffe4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 803ffe8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 803ffec: e3 ff ff f6 bi 803ffc4 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 803fff0: 2b 83 00 14 lw r3,(sp+20) <== NOT EXECUTED 803fff4: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 803fff8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 803fffc: 58 43 00 04 sw (r2+4),r3 <== NOT EXECUTED 8040000: 2b 84 00 18 lw r4,(sp+24) <== NOT EXECUTED 8040004: 58 44 00 08 sw (r2+8),r4 <== NOT EXECUTED 8040008: 2b 87 00 1c lw r7,(sp+28) <== NOT EXECUTED 804000c: 58 47 00 0c sw (r2+12),r7 <== NOT EXECUTED 8040010: 2b 83 00 20 lw r3,(sp+32) <== NOT EXECUTED 8040014: 58 43 00 10 sw (r2+16),r3 <== NOT EXECUTED 8040018: 2b 84 00 24 lw r4,(sp+36) <== NOT EXECUTED 804001c: 58 44 00 14 sw (r2+20),r4 <== NOT EXECUTED return -1; 8040020: e3 ff ff e9 bi 803ffc4 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 8040024: f8 00 1c d7 calli 8047380 <__errno> <== NOT EXECUTED 8040028: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 804002c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040030: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040034: e3 ff ff e4 bi 803ffc4 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 8040038: f8 00 1c d2 calli 8047380 <__errno> <== NOT EXECUTED 804003c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8040040: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040044: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040048: e3 ff ff df bi 803ffc4 <== NOT EXECUTED 08029750 : int fchmod( int fd, mode_t mode ) { 8029750: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8029754: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8029758: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802975c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8029760: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029764: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8029768: 38 63 10 10 ori r3,r3,0x1010 <== NOT EXECUTED 802976c: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 8029770: b8 40 60 00 mv r12,r2 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029774: 54 61 00 06 bgu r3,r1,802978c <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8029778: f8 00 77 02 calli 8047380 <__errno> <== NOT EXECUTED 802977c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8029780: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029784: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029788: e0 00 00 18 bi 80297e8 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 802978c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029790: fb ff 5e 74 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029794: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029798: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802979c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 80297a0: 39 6b 4e 90 ori r11,r11,0x4e90 <== NOT EXECUTED 80297a4: fb ff 5e 6f calli 8001160 <__ashlsi3> <== NOT EXECUTED 80297a8: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 80297ac: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 80297b0: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 80297b4: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 80297b8: 20 43 01 00 andi r3,r2,0x100 <== NOT EXECUTED 80297bc: 44 60 ff ef be r3,r0,8029778 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80297c0: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 80297c4: 44 40 00 0f be r2,r0,8029800 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 80297c8: 28 22 00 40 lw r2,(r1+64) <== NOT EXECUTED 80297cc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 80297d0: 44 40 00 11 be r2,r0,8029814 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 80297d4: 28 23 00 24 lw r3,(r1+36) <== NOT EXECUTED 80297d8: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80297dc: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 80297e0: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 80297e4: d8 60 00 00 call r3 <== NOT EXECUTED } 80297e8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80297ec: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80297f0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80297f4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80297f8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80297fc: c3 a0 00 00 ret <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029800: f8 00 76 e0 calli 8047380 <__errno> <== NOT EXECUTED 8029804: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8029808: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802980c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029810: e3 ff ff f6 bi 80297e8 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029814: f8 00 76 db calli 8047380 <__errno> <== NOT EXECUTED 8029818: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802981c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029820: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029824: e3 ff ff f1 bi 80297e8 <== NOT EXECUTED 08029828 : int fchown( int fd, uid_t owner, gid_t group ) { 8029828: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 802982c: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8029830: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8029834: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8029838: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 802983c: 78 04 08 07 mvhi r4,0x807 <== NOT EXECUTED 8029840: 38 84 10 10 ori r4,r4,0x1010 <== NOT EXECUTED 8029844: 28 84 00 00 lw r4,(r4+0) <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 8029848: 20 4c ff ff andi r12,r2,0xffff <== NOT EXECUTED 802984c: 20 63 ff ff andi r3,r3,0xffff <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029850: 54 81 00 06 bgu r4,r1,8029868 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8029854: f8 00 76 cb calli 8047380 <__errno> <== NOT EXECUTED 8029858: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 802985c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029860: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029864: e0 00 00 18 bi 80298c4 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029868: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 802986c: 5b 83 00 14 sw (sp+20),r3 <== NOT EXECUTED 8029870: fb ff 5e 3c calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029874: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029878: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802987c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8029880: 39 6b 4e 90 ori r11,r11,0x4e90 <== NOT EXECUTED 8029884: fb ff 5e 37 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029888: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 802988c: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8029890: 2b 83 00 14 lw r3,(sp+20) <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029894: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8029898: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 802989c: 20 44 01 00 andi r4,r2,0x100 <== NOT EXECUTED 80298a0: 44 80 ff ed be r4,r0,8029854 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80298a4: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 80298a8: 44 40 00 0d be r2,r0,80298dc <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 80298ac: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 80298b0: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 80298b4: 44 80 00 0f be r4,r0,80298f0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 80298b8: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 80298bc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80298c0: d8 80 00 00 call r4 <== NOT EXECUTED } 80298c4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80298c8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80298cc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80298d0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80298d4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80298d8: c3 a0 00 00 ret <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80298dc: f8 00 76 a9 calli 8047380 <__errno> <== NOT EXECUTED 80298e0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80298e4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80298e8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80298ec: e3 ff ff f6 bi 80298c4 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 80298f0: f8 00 76 a4 calli 8047380 <__errno> <== NOT EXECUTED 80298f4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80298f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80298fc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029900: e3 ff ff f1 bi 80298c4 <== NOT EXECUTED 0804004c : int fcntl( int fd, int cmd, ... ) { 804004c: 37 9c ff c0 addi sp,sp,-64 8040050: 5b 8b 00 24 sw (sp+36),r11 8040054: 5b 8c 00 20 sw (sp+32),r12 8040058: 5b 8d 00 1c sw (sp+28),r13 804005c: 5b 8e 00 18 sw (sp+24),r14 8040060: 5b 8f 00 14 sw (sp+20),r15 8040064: 5b 90 00 10 sw (sp+16),r16 8040068: 5b 91 00 0c sw (sp+12),r17 804006c: 5b 92 00 08 sw (sp+8),r18 8040070: 5b 9d 00 04 sw (sp+4),ra int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 8040074: 78 09 08 07 mvhi r9,0x807 8040078: 39 29 10 10 ori r9,r9,0x1010 804007c: 29 30 00 00 lw r16,(r9+0) int fcntl( int fd, int cmd, ... ) { 8040080: 5b 83 00 2c sw (sp+44),r3 8040084: 5b 84 00 30 sw (sp+48),r4 8040088: 5b 85 00 34 sw (sp+52),r5 804008c: 5b 86 00 38 sw (sp+56),r6 8040090: 5b 87 00 3c sw (sp+60),r7 8040094: 5b 88 00 40 sw (sp+64),r8 8040098: 5b 82 00 28 sw (sp+40),r2 804009c: b8 40 68 00 mv r13,r2 #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 80400a0: 37 91 00 2c addi r17,sp,44 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 80400a4: 56 01 00 06 bgu r16,r1,80400bc iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 80400a8: f8 00 1c b6 calli 8047380 <__errno> <== NOT EXECUTED 80400ac: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80400b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80400b4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 80400b8: e0 00 00 1c bi 8040128 <== NOT EXECUTED int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 80400bc: 34 02 00 03 mvi r2,3 80400c0: 78 0e 08 07 mvhi r14,0x807 80400c4: fb ff 04 27 calli 8001160 <__ashlsi3> 80400c8: 39 ce 4e 90 ori r14,r14,0x4e90 80400cc: 29 d2 00 00 lw r18,(r14+0) 80400d0: 34 02 00 03 mvi r2,3 80400d4: b8 20 58 00 mv r11,r1 80400d8: fb ff 04 22 calli 8001160 <__ashlsi3> 80400dc: b5 61 08 00 add r1,r11,r1 80400e0: b6 41 58 00 add r11,r18,r1 rtems_libio_check_is_open(iop); 80400e4: 29 6f 00 18 lw r15,(r11+24) 80400e8: 21 e1 01 00 andi r1,r15,0x100 80400ec: 44 20 ff ef be r1,r0,80400a8 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 80400f0: 34 02 00 09 mvi r2,9 80400f4: 55 a2 00 5b bgu r13,r2,8040260 80400f8: 78 0c 08 06 mvhi r12,0x806 80400fc: b9 a0 08 00 mv r1,r13 8040100: 34 02 00 02 mvi r2,2 8040104: fb ff 04 17 calli 8001160 <__ashlsi3> 8040108: 39 8c dd 9c ori r12,r12,0xdd9c 804010c: b5 81 08 00 add r1,r12,r1 8040110: 28 21 00 00 lw r1,(r1+0) 8040114: c0 20 00 00 b r1 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 8040118: f8 00 1c 9a calli 8047380 <__errno> 804011c: 34 02 00 86 mvi r2,134 8040120: 58 22 00 00 sw (r1+0),r2 8040124: 34 0c ff ff mvi r12,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 8040128: b9 80 08 00 mv r1,r12 804012c: 2b 9d 00 04 lw ra,(sp+4) 8040130: 2b 8b 00 24 lw r11,(sp+36) 8040134: 2b 8c 00 20 lw r12,(sp+32) 8040138: 2b 8d 00 1c lw r13,(sp+28) 804013c: 2b 8e 00 18 lw r14,(sp+24) 8040140: 2b 8f 00 14 lw r15,(sp+20) 8040144: 2b 90 00 10 lw r16,(sp+16) 8040148: 2b 91 00 0c lw r17,(sp+12) 804014c: 2b 92 00 08 lw r18,(sp+8) 8040150: 37 9c 00 40 addi sp,sp,64 8040154: c3 a0 00 00 ret case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 8040158: 2a 21 00 00 lw r1,(r17+0) /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 804015c: 34 0c 00 00 mvi r12,0 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 8040160: fb ff 1f b1 calli 8008024 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 8040164: 29 63 00 18 lw r3,(r11+24) 8040168: 34 02 fd fe mvi r2,-514 804016c: 20 21 02 01 andi r1,r1,0x201 8040170: a0 62 10 00 and r2,r3,r2 8040174: b8 22 08 00 or r1,r1,r2 8040178: 59 61 00 18 sw (r11+24),r1 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 804017c: 29 61 00 40 lw r1,(r11+64) 8040180: 28 23 00 30 lw r3,(r1+48) 8040184: 44 60 ff e9 be r3,r0,8040128 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 8040188: b9 60 10 00 mv r2,r11 804018c: b9 a0 08 00 mv r1,r13 8040190: d8 60 00 00 call r3 8040194: b8 20 58 00 mv r11,r1 if (err) { 8040198: 44 20 ff e4 be r1,r0,8040128 errno = err; 804019c: f8 00 1c 79 calli 8047380 <__errno> <== NOT EXECUTED 80401a0: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80401a4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 80401a8: e3 ff ff e0 bi 8040128 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 80401ac: b9 e0 08 00 mv r1,r15 80401b0: fb ff 1e cd calli 8007ce4 80401b4: b8 20 60 00 mv r12,r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 80401b8: 48 0c ff dc bg r0,r12,8040128 80401bc: e3 ff ff f0 bi 804017c * 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 ) ) 80401c0: 2a 2c 00 00 lw r12,(r17+0) 80401c4: 45 80 00 2c be r12,r0,8040274 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 80401c8: 39 ef 08 00 ori r15,r15,0x800 80401cc: 59 6f 00 18 sw (r11+24),r15 80401d0: 34 0c 00 00 mvi r12,0 80401d4: e3 ff ff ea bi 804017c diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 80401d8: b9 e0 08 00 mv r1,r15 80401dc: 34 02 00 0b mvi r2,11 80401e0: fb ff 04 08 calli 8001200 <__lshrsi3> 80401e4: 20 2c 00 01 andi r12,r1,0x1 80401e8: e3 ff ff e5 bi 804017c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 80401ec: 2a 31 00 00 lw r17,(r17+0) if ( fd2 ) 80401f0: 46 20 00 2f be r17,r0,80402ac diop = rtems_libio_iop( fd2 ); 80401f4: 56 11 00 24 bgu r16,r17,8040284 <== NOT EXECUTED 80401f8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80401fc: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040200: 29 62 00 1c lw r2,(r11+28) ret = -1; break; } } diop->handlers = iop->handlers; 8040204: 29 64 00 40 lw r4,(r11+64) diop->file_info = iop->file_info; diop->flags = iop->flags; 8040208: 58 6f 00 18 sw (r3+24),r15 diop->pathinfo = iop->pathinfo; 804020c: 58 62 00 1c sw (r3+28),r2 ret = -1; break; } } diop->handlers = iop->handlers; 8040210: 58 64 00 40 sw (r3+64),r4 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040214: 29 64 00 20 lw r4,(r11+32) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 8040218: 29 62 00 3c lw r2,(r11+60) diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 804021c: c8 32 08 00 sub r1,r1,r18 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040220: 58 64 00 20 sw (r3+32),r4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 8040224: 58 62 00 3c sw (r3+60),r2 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040228: 29 62 00 24 lw r2,(r11+36) 804022c: 58 62 00 24 sw (r3+36),r2 8040230: 29 64 00 28 lw r4,(r11+40) ret = (int) (diop - rtems_libio_iops); 8040234: 34 02 00 03 mvi r2,3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040238: 58 64 00 28 sw (r3+40),r4 804023c: 29 64 00 2c lw r4,(r11+44) 8040240: 58 64 00 2c sw (r3+44),r4 ret = (int) (diop - rtems_libio_iops); 8040244: fb ff 04 17 calli 80012a0 <__ashrsi3> 8040248: 78 02 38 e3 mvhi r2,0x38e3 804024c: 38 42 8e 39 ori r2,r2,0x8e39 8040250: fb ff 0c dd calli 80035c4 <__mulsi3> 8040254: b8 20 60 00 mv r12,r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 8040258: 48 0c ff b4 bg r0,r12,8040128 804025c: e3 ff ff c8 bi 804017c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 8040260: f8 00 1c 48 calli 8047380 <__errno> 8040264: 34 02 00 16 mvi r2,22 8040268: 58 22 00 00 sw (r1+0),r2 804026c: 34 0c ff ff mvi r12,-1 8040270: e3 ff ff ae bi 8040128 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 8040274: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED 8040278: a1 e1 78 00 and r15,r15,r1 <== NOT EXECUTED 804027c: 59 6f 00 18 sw (r11+24),r15 <== NOT EXECUTED 8040280: e3 ff ff bf bi 804017c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 8040284: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040288: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 804028c: fb ff 03 b5 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8040290: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040294: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8040298: fb ff 03 b2 calli 8001160 <__ashlsi3> <== NOT EXECUTED 804029c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 80402a0: b6 41 18 00 add r3,r18,r1 <== NOT EXECUTED 80402a4: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 80402a8: e3 ff ff d6 bi 8040200 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 80402ac: fb ff 1f 25 calli 8007f40 80402b0: b8 20 18 00 mv r3,r1 if ( diop == 0 ) { 80402b4: 34 0c ff ff mvi r12,-1 80402b8: 44 31 ff 9c be r1,r17,8040128 80402bc: 29 d2 00 00 lw r18,(r14+0) 80402c0: 29 6f 00 18 lw r15,(r11+24) 80402c4: e3 ff ff cf bi 8040200 0800a370 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a370: 37 9c ff d8 addi sp,sp,-40 800a374: 5b 8b 00 24 sw (sp+36),r11 800a378: 5b 8c 00 20 sw (sp+32),r12 800a37c: 5b 8d 00 1c sw (sp+28),r13 800a380: 5b 8e 00 18 sw (sp+24),r14 800a384: 5b 8f 00 14 sw (sp+20),r15 800a388: 5b 90 00 10 sw (sp+16),r16 800a38c: 5b 91 00 0c sw (sp+12),r17 800a390: 5b 92 00 08 sw (sp+8),r18 800a394: 5b 9d 00 04 sw (sp+4),ra ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a398: 78 0d 08 01 mvhi r13,0x801 800a39c: 39 ad c6 28 ori r13,r13,0xc628 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a3a0: b8 20 70 00 mv r14,r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a3a4: 29 a1 00 00 lw r1,(r13+0) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a3a8: b8 40 88 00 mv r17,r2 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a3ac: 34 02 00 00 mvi r2,0 800a3b0: b8 40 18 00 mv r3,r2 800a3b4: fb ff f7 d3 calli 8008300 800a3b8: b8 20 58 00 mv r11,r1 800a3bc: 34 0c ff fc mvi r12,-4 800a3c0: 5c 20 00 1b bne r1,r0,800a42c RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 800a3c4: 29 cf 00 00 lw r15,(r14+0) <== NOT EXECUTED if (pipe == NULL) { 800a3c8: 45 e1 00 7c be r15,r1,800a5b8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 800a3cc: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED 800a3d0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a3d4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a3d8: fb ff f7 ca calli 8008300 <== NOT EXECUTED 800a3dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800a3e0: 44 20 00 02 be r1,r0,800a3e8 <== NOT EXECUTED 800a3e4: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 800a3e8: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800a3ec: 44 20 00 3e be r1,r0,800a4e4 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800a3f0: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800a3f4: fb ff f8 24 calli 8008484 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 800a3f8: 5d 80 00 0d bne r12,r0,800a42c <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 800a3fc: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED 800a400: 34 03 00 04 mvi r3,4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 800a404: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 800a408: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED 800a40c: 44 23 00 14 be r1,r3,800a45c <== NOT EXECUTED 800a410: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 800a414: 44 22 00 57 be r1,r2,800a570 <== NOT EXECUTED 800a418: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800a41c: 44 22 00 37 be r1,r2,800a4f8 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 800a420: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a424: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800a428: fb ff f8 17 calli 8008484 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 800a42c: b9 80 08 00 mv r1,r12 800a430: 2b 9d 00 04 lw ra,(sp+4) 800a434: 2b 8b 00 24 lw r11,(sp+36) 800a438: 2b 8c 00 20 lw r12,(sp+32) 800a43c: 2b 8d 00 1c lw r13,(sp+28) 800a440: 2b 8e 00 18 lw r14,(sp+24) 800a444: 2b 8f 00 14 lw r15,(sp+20) 800a448: 2b 90 00 10 lw r16,(sp+16) 800a44c: 2b 91 00 0c lw r17,(sp+12) 800a450: 2b 92 00 08 lw r18,(sp+8) 800a454: 37 9c 00 28 addi sp,sp,40 800a458: c3 a0 00 00 ret } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 800a45c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a460: 5c 20 00 04 bne r1,r0,800a470 <== NOT EXECUTED 800a464: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a468: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED 800a46c: 5c 41 00 1a bne r2,r1,800a4d4 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a470: 29 64 00 24 lw r4,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a474: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a478: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a47c: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a480: 59 64 00 24 sw (r11+36),r4 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a484: 59 63 00 14 sw (r11+20),r3 <== NOT EXECUTED 800a488: 44 40 00 96 be r2,r0,800a6e0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 800a48c: 5c 20 ff e5 bne r1,r0,800a420 <== NOT EXECUTED prevCounter = pipe->readerCounter; 800a490: 29 6d 00 20 lw r13,(r11+32) <== NOT EXECUTED 800a494: e0 00 00 06 bi 800a4ac <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 800a498: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a49c: fb ff f7 99 calli 8008300 <== NOT EXECUTED 800a4a0: 5c 2c 00 0c bne r1,r12,800a4d0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 800a4a4: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 800a4a8: 5c 2d ff de bne r1,r13,800a420 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 800a4ac: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a4b0: fb ff f7 f5 calli 8008484 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 800a4b4: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a4b8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a4bc: f8 00 02 2e calli 800ad74 <== NOT EXECUTED 800a4c0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a4c4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a4c8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 800a4cc: 44 20 ff f3 be r1,r0,800a498 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 800a4d0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 800a4d4: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800a4d8: ba 20 10 00 mv r2,r17 <== NOT EXECUTED 800a4dc: fb ff ff 54 calli 800a22c <== NOT EXECUTED return err; 800a4e0: e3 ff ff d3 bi 800a42c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 800a4e4: 5d 81 00 8c bne r12,r1,800a714 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800a4e8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 800a4ec: 59 cf 00 00 sw (r14+0),r15 <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 800a4f0: fb ff f7 e5 calli 8008484 <== NOT EXECUTED 800a4f4: e3 ff ff c2 bi 800a3fc <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a4f8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a4fc: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a500: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a504: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a508: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a50c: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a510: 44 20 00 79 be r1,r0,800a6f4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 800a514: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a518: 5c 20 ff c2 bne r1,r0,800a420 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 800a51c: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED 800a520: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a524: 5c 41 ff bf bne r2,r1,800a420 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 800a528: 29 6d 00 24 lw r13,(r11+36) <== NOT EXECUTED 800a52c: e0 00 00 06 bi 800a544 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 800a530: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a534: fb ff f7 73 calli 8008300 <== NOT EXECUTED 800a538: 5c 2c ff e6 bne r1,r12,800a4d0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 800a53c: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 800a540: 5c 2d ff b8 bne r1,r13,800a420 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 800a544: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a548: fb ff f7 cf calli 8008484 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800a54c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a550: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a554: f8 00 02 08 calli 800ad74 <== NOT EXECUTED 800a558: b8 20 60 00 mv r12,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a55c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a560: b8 20 18 00 mv r3,r1 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 800a564: 44 20 ff f3 be r1,r0,800a530 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 800a568: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a56c: e3 ff ff da bi 800a4d4 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a570: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a574: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a578: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a57c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a580: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a584: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a588: 44 20 00 5f be r1,r0,800a704 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a58c: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a590: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a594: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a598: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800a59c: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a5a0: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800a5a4: 5c 20 ff 9f bne r1,r0,800a420 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a5a8: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a5ac: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a5b0: f8 00 01 d2 calli 800acf8 <== NOT EXECUTED 800a5b4: e3 ff ff 9b bi 800a420 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 800a5b8: 34 01 00 34 mvi r1,52 <== NOT EXECUTED 800a5bc: fb ff f6 4b calli 8007ee8 <== NOT EXECUTED 800a5c0: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 800a5c4: b8 20 78 00 mv r15,r1 <== NOT EXECUTED if (pipe == NULL) 800a5c8: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED 800a5cc: 44 20 ff 89 be r1,r0,800a3f0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 800a5d0: 34 02 02 00 mvi r2,512 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800a5d4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 800a5d8: 5a 0b 00 00 sw (r16+0),r11 <== NOT EXECUTED 800a5dc: 5a 0b 00 08 sw (r16+8),r11 <== NOT EXECUTED 800a5e0: 5a 0b 00 0c sw (r16+12),r11 <== NOT EXECUTED 800a5e4: 5a 0b 00 10 sw (r16+16),r11 <== NOT EXECUTED 800a5e8: 5a 0b 00 14 sw (r16+20),r11 <== NOT EXECUTED 800a5ec: 5a 0b 00 18 sw (r16+24),r11 <== NOT EXECUTED 800a5f0: 5a 0b 00 1c sw (r16+28),r11 <== NOT EXECUTED 800a5f4: 5a 0b 00 20 sw (r16+32),r11 <== NOT EXECUTED 800a5f8: 5a 0b 00 24 sw (r16+36),r11 <== NOT EXECUTED 800a5fc: 5a 0b 00 28 sw (r16+40),r11 <== NOT EXECUTED 800a600: 5a 0b 00 2c sw (r16+44),r11 <== NOT EXECUTED 800a604: 5a 0b 00 30 sw (r16+48),r11 <== NOT EXECUTED pipe->Size = PIPE_BUF; 800a608: 5a 02 00 04 sw (r16+4),r2 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800a60c: fb ff f6 37 calli 8007ee8 <== NOT EXECUTED 800a610: 5a 01 00 00 sw (r16+0),r1 <== NOT EXECUTED if (! pipe->Buffer) 800a614: 44 20 00 30 be r1,r0,800a6d4 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 800a618: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800a61c: 39 8c c1 58 ori r12,r12,0xc158 <== NOT EXECUTED 800a620: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED 800a624: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a628: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 800a62c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800a630: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 800a634: 36 04 00 2c addi r4,r16,44 <== NOT EXECUTED 800a638: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800a63c: f8 00 01 49 calli 800ab60 <== NOT EXECUTED 800a640: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800a644: 5c 20 00 21 bne r1,r0,800a6c8 <== 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( 800a648: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800a64c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a650: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED 800a654: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800a658: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800a65c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800a660: 36 04 00 30 addi r4,r16,48 <== NOT EXECUTED 800a664: f8 00 01 3f calli 800ab60 <== NOT EXECUTED 800a668: b8 20 90 00 mv r18,r1 <== NOT EXECUTED 800a66c: 5c 2b 00 15 bne r1,r11,800a6c0 <== 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( 800a670: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800a674: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a678: 38 21 73 00 ori r1,r1,0x7300 <== NOT EXECUTED 800a67c: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800a680: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 800a684: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800a688: ba 40 20 00 mv r4,r18 <== NOT EXECUTED 800a68c: 36 05 00 28 addi r5,r16,40 <== NOT EXECUTED 800a690: fb ff de bb calli 800217c <== NOT EXECUTED 800a694: 5c 32 00 09 bne r1,r18,800a6b8 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 800a698: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800a69c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 800a6a0: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED 800a6a4: 34 02 00 7a mvi r2,122 <== NOT EXECUTED 800a6a8: 5c 22 ff 49 bne r1,r2,800a3cc <== NOT EXECUTED c = 'a'; 800a6ac: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 800a6b0: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED 800a6b4: e3 ff ff 46 bi 800a3cc <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 800a6b8: 2a 01 00 30 lw r1,(r16+48) <== NOT EXECUTED 800a6bc: f8 00 01 6f calli 800ac78 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 800a6c0: 2a 01 00 2c lw r1,(r16+44) <== NOT EXECUTED 800a6c4: f8 00 01 6d calli 800ac78 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 800a6c8: 2a 01 00 00 lw r1,(r16+0) <== NOT EXECUTED 800a6cc: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a6d0: fb ff f4 4e calli 8007808 <== NOT EXECUTED err_buf: free(pipe); 800a6d4: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 800a6d8: fb ff f4 4c calli 8007808 <== NOT EXECUTED 800a6dc: e3 ff ff 45 bi 800a3f0 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 800a6e0: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a6e4: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a6e8: f8 00 01 84 calli 800acf8 <== NOT EXECUTED 800a6ec: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a6f0: e3 ff ff 67 bi 800a48c <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800a6f4: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a6f8: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a6fc: f8 00 01 7f calli 800acf8 <== NOT EXECUTED 800a700: e3 ff ff 85 bi 800a514 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800a704: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a708: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a70c: f8 00 01 7b calli 800acf8 <== NOT EXECUTED 800a710: e3 ff ff 9f bi 800a58c <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800a714: 29 e1 00 2c lw r1,(r15+44) <== NOT EXECUTED 800a718: f8 00 01 58 calli 800ac78 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800a71c: 29 e1 00 30 lw r1,(r15+48) <== NOT EXECUTED 800a720: f8 00 01 56 calli 800ac78 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800a724: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED 800a728: fb ff f6 b3 calli 80081f4 <== NOT EXECUTED free(pipe->Buffer); 800a72c: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 800a730: fb ff f4 36 calli 8007808 <== NOT EXECUTED free(pipe); 800a734: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800a738: fb ff f4 34 calli 8007808 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800a73c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800a740: fb ff f7 51 calli 8008484 <== NOT EXECUTED 800a744: e3 ff ff 3a bi 800a42c <== NOT EXECUTED 08009954 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009954: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8009958: 38 63 4e d8 ori r3,r3,0x4ed8 <== NOT EXECUTED 800995c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8009960: 34 63 00 04 addi r3,r3,4 <== NOT EXECUTED 8009964: 44 23 00 09 be r1,r3,8009988 <== 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 ) { 8009968: 28 42 00 10 lw r2,(r2+16) <== NOT EXECUTED 800996c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8009970: 5c 82 00 04 bne r4,r2,8009980 <== NOT EXECUTED 8009974: e0 00 00 07 bi 8009990 <== NOT EXECUTED 8009978: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 800997c: 44 82 00 05 be r4,r2,8009990 <== 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 ) { 8009980: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009984: 5c 23 ff fd bne r1,r3,8009978 <== NOT EXECUTED 8009988: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return true; } } return false; } 800998c: c3 a0 00 00 ret <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009990: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8009994: c3 a0 00 00 ret <== NOT EXECUTED 08007808 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8007808: 37 9c ff f4 addi sp,sp,-12 800780c: 5b 8b 00 0c sw (sp+12),r11 8007810: 5b 8c 00 08 sw (sp+8),r12 8007814: 5b 9d 00 04 sw (sp+4),ra 8007818: 78 03 08 01 mvhi r3,0x801 800781c: 38 63 c6 a8 ori r3,r3,0xc6a8 8007820: 28 62 00 0c lw r2,(r3+12) 8007824: b8 20 58 00 mv r11,r1 8007828: 34 41 00 01 addi r1,r2,1 800782c: 58 61 00 0c sw (r3+12),r1 if ( !ptr ) 8007830: 45 60 00 1a be r11,r0,8007898 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 8007834: 78 01 08 01 mvhi r1,0x801 8007838: 38 21 c9 c0 ori r1,r1,0xc9c0 800783c: 28 22 00 00 lw r2,(r1+0) 8007840: 34 01 00 03 mvi r1,3 8007844: 44 41 00 1a be r2,r1,80078ac #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8007848: 78 01 08 01 mvhi r1,0x801 800784c: 38 21 c6 10 ori r1,r1,0xc610 8007850: 28 21 00 00 lw r1,(r1+0) 8007854: 44 20 00 04 be r1,r0,8007864 (*rtems_malloc_statistics_helpers->at_free)(ptr); 8007858: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800785c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007860: d8 40 00 00 call r2 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 8007864: 78 0c 08 01 mvhi r12,0x801 8007868: 39 8c c0 1c ori r12,r12,0xc01c 800786c: 29 81 00 00 lw r1,(r12+0) 8007870: b9 60 10 00 mv r2,r11 8007874: f8 00 06 e0 calli 80093f4 <_Protected_heap_Free> 8007878: 5c 20 00 08 bne r1,r0,8007898 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 800787c: 29 82 00 00 lw r2,(r12+0) <== 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", 8007880: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007884: 38 21 b3 94 ori r1,r1,0xb394 <== NOT EXECUTED 8007888: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED 800788c: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8007890: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8007894: fb ff e9 0b calli 8001cc0 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8007898: 2b 9d 00 04 lw ra,(sp+4) 800789c: 2b 8b 00 0c lw r11,(sp+12) 80078a0: 2b 8c 00 08 lw r12,(sp+8) 80078a4: 37 9c 00 0c addi sp,sp,12 80078a8: c3 a0 00 00 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 80078ac: f8 00 01 66 calli 8007e44 80078b0: 5c 20 ff e6 bne r1,r0,8007848 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 80078b4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80078b8: f8 00 01 75 calli 8007e8c <== NOT EXECUTED return; 80078bc: e3 ff ff f7 bi 8007898 <== NOT EXECUTED 0802b1b0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 802b1b0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802b1b4: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802b1b8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 802b1bc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802b1c0: 38 42 4e e4 ori r2,r2,0x4ee4 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 802b1c4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 802b1c8: 44 22 00 0f be r1,r2,802b204 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 802b1cc: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED 802b1d0: 44 20 00 05 be r1,r0,802b1e4 <== NOT EXECUTED 802b1d4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b1d8: 44 40 00 03 be r2,r0,802b1e4 <== NOT EXECUTED 802b1dc: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED 802b1e0: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 802b1e4: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 802b1e8: 44 20 00 05 be r1,r0,802b1fc <== NOT EXECUTED 802b1ec: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b1f0: 44 40 00 03 be r2,r0,802b1fc <== NOT EXECUTED 802b1f4: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 802b1f8: d8 40 00 00 call r2 <== NOT EXECUTED free(env); 802b1fc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b200: fb ff 72 18 calli 8007a60 <== NOT EXECUTED } } 802b204: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b208: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802b20c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802b210: c3 a0 00 00 ret <== NOT EXECUTED 08019f50 : int fstat( int fd, struct stat *sbuf ) { 8019f50: 37 9c ff ec addi sp,sp,-20 8019f54: 5b 8b 00 14 sw (sp+20),r11 8019f58: 5b 8c 00 10 sw (sp+16),r12 8019f5c: 5b 8d 00 0c sw (sp+12),r13 8019f60: 5b 8e 00 08 sw (sp+8),r14 8019f64: 5b 9d 00 04 sw (sp+4),ra 8019f68: b8 40 60 00 mv r12,r2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 8019f6c: 45 80 00 30 be r12,r0,801a02c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 8019f70: 78 03 08 01 mvhi r3,0x801 8019f74: 38 63 c0 10 ori r3,r3,0xc010 8019f78: 28 63 00 00 lw r3,(r3+0) 8019f7c: 50 23 00 22 bgeu r1,r3,801a004 8019f80: 34 02 00 03 mvi r2,3 8019f84: fb ff 98 9b calli 80001f0 <__ashlsi3> 8019f88: 78 0d 08 01 mvhi r13,0x801 8019f8c: 39 ad c6 9c ori r13,r13,0xc69c 8019f90: 34 02 00 03 mvi r2,3 8019f94: b8 20 70 00 mv r14,r1 8019f98: fb ff 98 96 calli 80001f0 <__ashlsi3> 8019f9c: 29 ab 00 00 lw r11,(r13+0) 8019fa0: b5 c1 08 00 add r1,r14,r1 8019fa4: b5 61 58 00 add r11,r11,r1 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 8019fa8: 29 61 00 18 lw r1,(r11+24) 8019fac: 20 21 01 00 andi r1,r1,0x100 8019fb0: 44 20 00 15 be r1,r0,801a004 if ( !iop->handlers ) 8019fb4: 29 61 00 40 lw r1,(r11+64) 8019fb8: 44 20 00 13 be r1,r0,801a004 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 8019fbc: 28 21 00 18 lw r1,(r1+24) 8019fc0: 44 20 00 16 be r1,r0,801a018 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 8019fc4: 34 02 00 00 mvi r2,0 8019fc8: 34 03 00 48 mvi r3,72 8019fcc: b9 80 08 00 mv r1,r12 8019fd0: fb ff ca 00 calli 800c7d0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 8019fd4: 29 63 00 40 lw r3,(r11+64) 8019fd8: 35 61 00 1c addi r1,r11,28 8019fdc: b9 80 10 00 mv r2,r12 8019fe0: 28 63 00 18 lw r3,(r3+24) 8019fe4: d8 60 00 00 call r3 } 8019fe8: 2b 9d 00 04 lw ra,(sp+4) 8019fec: 2b 8b 00 14 lw r11,(sp+20) 8019ff0: 2b 8c 00 10 lw r12,(sp+16) 8019ff4: 2b 8d 00 0c lw r13,(sp+12) 8019ff8: 2b 8e 00 08 lw r14,(sp+8) 8019ffc: 37 9c 00 14 addi sp,sp,20 801a000: c3 a0 00 00 ret iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 801a004: fb ff c6 ef calli 800bbc0 <__errno> 801a008: 34 02 00 09 mvi r2,9 801a00c: 58 22 00 00 sw (r1+0),r2 801a010: 34 01 ff ff mvi r1,-1 801a014: e3 ff ff f5 bi 8019fe8 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801a018: fb ff c6 ea calli 800bbc0 <__errno> <== NOT EXECUTED 801a01c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801a020: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a024: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 801a028: e3 ff ff f0 bi 8019fe8 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 801a02c: fb ff c6 e5 calli 800bbc0 <__errno> 801a030: 34 02 00 0e mvi r2,14 801a034: 58 22 00 00 sw (r1+0),r2 801a038: 34 01 ff ff mvi r1,-1 801a03c: e3 ff ff eb bi 8019fe8 08029a14 : #include int fsync( int fd ) { 8029a14: 37 9c ff f4 addi sp,sp,-12 8029a18: 5b 8b 00 0c sw (sp+12),r11 8029a1c: 5b 8c 00 08 sw (sp+8),r12 8029a20: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029a24: 78 02 08 07 mvhi r2,0x807 8029a28: 38 42 10 10 ori r2,r2,0x1010 8029a2c: 28 42 00 00 lw r2,(r2+0) 8029a30: 54 41 00 06 bgu r2,r1,8029a48 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 8029a34: f8 00 76 53 calli 8047380 <__errno> <== NOT EXECUTED 8029a38: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8029a3c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029a40: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029a44: e0 00 00 15 bi 8029a98 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029a48: 34 02 00 03 mvi r2,3 8029a4c: fb ff 5d c5 calli 8001160 <__ashlsi3> 8029a50: 34 02 00 03 mvi r2,3 8029a54: 78 0b 08 07 mvhi r11,0x807 8029a58: b8 20 60 00 mv r12,r1 8029a5c: 39 6b 4e 90 ori r11,r11,0x4e90 8029a60: fb ff 5d c0 calli 8001160 <__ashlsi3> 8029a64: 29 62 00 00 lw r2,(r11+0) 8029a68: b5 81 08 00 add r1,r12,r1 8029a6c: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 8029a70: 28 22 00 18 lw r2,(r1+24) 8029a74: 20 43 01 00 andi r3,r2,0x100 8029a78: 44 60 ff ef be r3,r0,8029a34 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029a7c: 20 42 00 04 andi r2,r2,0x4 8029a80: 44 40 00 0b be r2,r0,8029aac /* * Now process the fsync(). */ if ( !iop->handlers ) 8029a84: 28 22 00 40 lw r2,(r1+64) 8029a88: 44 40 ff eb be r2,r0,8029a34 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 8029a8c: 28 42 00 28 lw r2,(r2+40) 8029a90: 44 40 00 0c be r2,r0,8029ac0 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 8029a94: d8 40 00 00 call r2 } 8029a98: 2b 9d 00 04 lw ra,(sp+4) 8029a9c: 2b 8b 00 0c lw r11,(sp+12) 8029aa0: 2b 8c 00 08 lw r12,(sp+8) 8029aa4: 37 9c 00 0c addi sp,sp,12 8029aa8: c3 a0 00 00 ret rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029aac: f8 00 76 35 calli 8047380 <__errno> 8029ab0: 34 02 00 16 mvi r2,22 8029ab4: 58 22 00 00 sw (r1+0),r2 8029ab8: 34 01 ff ff mvi r1,-1 8029abc: e3 ff ff f7 bi 8029a98 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029ac0: f8 00 76 30 calli 8047380 <__errno> 8029ac4: 34 02 00 86 mvi r2,134 8029ac8: 58 22 00 00 sw (r1+0),r2 8029acc: 34 01 ff ff mvi r1,-1 8029ad0: e3 ff ff f2 bi 8029a98 080078c0 : int ftruncate( int fd, off_t length ) { 80078c0: 37 9c ff d8 addi sp,sp,-40 80078c4: 5b 8b 00 14 sw (sp+20),r11 80078c8: 5b 8c 00 10 sw (sp+16),r12 80078cc: 5b 8d 00 0c sw (sp+12),r13 80078d0: 5b 8e 00 08 sw (sp+8),r14 80078d4: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 80078d8: 78 03 08 01 mvhi r3,0x801 80078dc: 38 63 c0 10 ori r3,r3,0xc010 80078e0: 28 63 00 00 lw r3,(r3+0) int ftruncate( int fd, off_t length ) { 80078e4: b8 40 68 00 mv r13,r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 80078e8: 54 61 00 06 bgu r3,r1,8007900 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 80078ec: f8 00 10 b5 calli 800bbc0 <__errno> <== NOT EXECUTED 80078f0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80078f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80078f8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80078fc: e0 00 00 2b bi 80079a8 <== NOT EXECUTED { rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8007900: 34 02 00 03 mvi r2,3 8007904: fb ff e2 3b calli 80001f0 <__ashlsi3> 8007908: 78 0c 08 01 mvhi r12,0x801 800790c: 39 8c c6 9c ori r12,r12,0xc69c 8007910: 34 02 00 03 mvi r2,3 8007914: b8 20 70 00 mv r14,r1 8007918: fb ff e2 36 calli 80001f0 <__ashlsi3> 800791c: 29 8b 00 00 lw r11,(r12+0) 8007920: b5 c1 08 00 add r1,r14,r1 8007924: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 8007928: 29 61 00 18 lw r1,(r11+24) 800792c: 20 21 01 00 andi r1,r1,0x100 8007930: 44 20 ff ef be r1,r0,80078ec /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8007934: 29 61 00 1c lw r1,(r11+28) 8007938: 5b 81 00 18 sw (sp+24),r1 800793c: 29 61 00 20 lw r1,(r11+32) 8007940: 5b 81 00 1c sw (sp+28),r1 8007944: 29 61 00 24 lw r1,(r11+36) 8007948: 5b 81 00 20 sw (sp+32),r1 800794c: 29 64 00 28 lw r4,(r11+40) 8007950: 5b 84 00 24 sw (sp+36),r4 8007954: 29 61 00 2c lw r1,(r11+44) if ( !loc.ops->node_type_h ) 8007958: 28 84 00 10 lw r4,(r4+16) /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 800795c: 5b 81 00 28 sw (sp+40),r1 if ( !loc.ops->node_type_h ) 8007960: 44 80 00 1e be r4,r0,80079d8 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8007964: 37 81 00 18 addi r1,sp,24 8007968: d8 80 00 00 call r4 800796c: 34 02 00 01 mvi r2,1 8007970: 44 22 00 1f be r1,r2,80079ec rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8007974: 29 61 00 18 lw r1,(r11+24) 8007978: 20 21 00 04 andi r1,r1,0x4 800797c: 44 20 00 12 be r1,r0,80079c4 if ( !iop->handlers->ftruncate_h ) 8007980: 29 61 00 40 lw r1,(r11+64) 8007984: 28 2c 00 20 lw r12,(r1+32) 8007988: 45 80 00 14 be r12,r0,80079d8 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 800798c: 34 02 00 1f mvi r2,31 8007990: b9 a0 08 00 mv r1,r13 8007994: fb ff e2 67 calli 8000330 <__ashrsi3> 8007998: b8 20 10 00 mv r2,r1 800799c: b9 a0 18 00 mv r3,r13 80079a0: b9 60 08 00 mv r1,r11 80079a4: d9 80 00 00 call r12 } 80079a8: 2b 9d 00 04 lw ra,(sp+4) 80079ac: 2b 8b 00 14 lw r11,(sp+20) 80079b0: 2b 8c 00 10 lw r12,(sp+16) 80079b4: 2b 8d 00 0c lw r13,(sp+12) 80079b8: 2b 8e 00 08 lw r14,(sp+8) 80079bc: 37 9c 00 28 addi sp,sp,40 80079c0: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80079c4: f8 00 10 7f calli 800bbc0 <__errno> <== NOT EXECUTED 80079c8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80079cc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80079d0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80079d4: e3 ff ff f5 bi 80079a8 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 80079d8: f8 00 10 7a calli 800bbc0 <__errno> <== NOT EXECUTED 80079dc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80079e0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80079e4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80079e8: e3 ff ff f0 bi 80079a8 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 80079ec: f8 00 10 75 calli 800bbc0 <__errno> 80079f0: 34 02 00 15 mvi r2,21 80079f4: 58 22 00 00 sw (r1+0),r2 80079f8: 34 01 ff ff mvi r1,-1 80079fc: e3 ff ff eb bi 80079a8 08063aa0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8063aa0: 37 9c ff d4 addi sp,sp,-44 8063aa4: 5b 8b 00 18 sw (sp+24),r11 8063aa8: 5b 8c 00 14 sw (sp+20),r12 8063aac: 5b 8d 00 10 sw (sp+16),r13 8063ab0: 5b 8e 00 0c sw (sp+12),r14 8063ab4: 5b 8f 00 08 sw (sp+8),r15 8063ab8: 5b 9d 00 04 sw (sp+4),ra /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8063abc: 78 04 08 07 mvhi r4,0x807 8063ac0: 38 84 10 10 ori r4,r4,0x1010 8063ac4: 28 84 00 00 lw r4,(r4+0) int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8063ac8: b8 40 70 00 mv r14,r2 8063acc: b8 60 68 00 mv r13,r3 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8063ad0: 54 81 00 21 bgu r4,r1,8063b54 8063ad4: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8063ad8: 29 61 00 1c lw r1,(r11+28) 8063adc: 5b 81 00 1c sw (sp+28),r1 8063ae0: 29 61 00 20 lw r1,(r11+32) 8063ae4: 5b 81 00 20 sw (sp+32),r1 8063ae8: 29 61 00 24 lw r1,(r11+36) 8063aec: 5b 81 00 24 sw (sp+36),r1 8063af0: 29 61 00 28 lw r1,(r11+40) 8063af4: 5b 81 00 28 sw (sp+40),r1 if ( !loc.ops->node_type_h ) 8063af8: 28 24 00 10 lw r4,(r1+16) iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8063afc: 29 61 00 2c lw r1,(r11+44) 8063b00: 5b 81 00 2c sw (sp+44),r1 if ( !loc.ops->node_type_h ) 8063b04: 44 80 00 24 be r4,r0,8063b94 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8063b08: 37 81 00 1c addi r1,sp,28 8063b0c: d8 80 00 00 call r4 8063b10: 34 04 00 01 mvi r4,1 8063b14: 5c 24 00 1b bne r1,r4,8063b80 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 8063b18: 29 61 00 40 lw r1,(r11+64) 8063b1c: 28 24 00 08 lw r4,(r1+8) 8063b20: 44 80 00 1d be r4,r0,8063b94 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 8063b24: b9 60 08 00 mv r1,r11 8063b28: b9 c0 10 00 mv r2,r14 8063b2c: b9 a0 18 00 mv r3,r13 8063b30: d8 80 00 00 call r4 } 8063b34: 2b 9d 00 04 lw ra,(sp+4) 8063b38: 2b 8b 00 18 lw r11,(sp+24) 8063b3c: 2b 8c 00 14 lw r12,(sp+20) 8063b40: 2b 8d 00 10 lw r13,(sp+16) 8063b44: 2b 8e 00 0c lw r14,(sp+12) 8063b48: 2b 8f 00 08 lw r15,(sp+8) 8063b4c: 37 9c 00 2c addi sp,sp,44 8063b50: c3 a0 00 00 ret /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8063b54: 34 02 00 03 mvi r2,3 8063b58: fb fe 75 82 calli 8001160 <__ashlsi3> 8063b5c: 78 0c 08 07 mvhi r12,0x807 8063b60: 39 8c 4e 90 ori r12,r12,0x4e90 8063b64: 34 02 00 03 mvi r2,3 8063b68: b8 20 78 00 mv r15,r1 8063b6c: fb fe 75 7d calli 8001160 <__ashlsi3> 8063b70: 29 8b 00 00 lw r11,(r12+0) 8063b74: b5 e1 08 00 add r1,r15,r1 8063b78: b5 61 58 00 add r11,r11,r1 8063b7c: e3 ff ff d7 bi 8063ad8 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8063b80: fb ff 8e 00 calli 8047380 <__errno> 8063b84: 34 02 00 14 mvi r2,20 8063b88: 58 22 00 00 sw (r1+0),r2 8063b8c: 34 01 ff ff mvi r1,-1 8063b90: e3 ff ff e9 bi 8063b34 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8063b94: fb ff 8d fb calli 8047380 <__errno> <== NOT EXECUTED 8063b98: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8063b9c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8063ba0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8063ba4: e3 ff ff e4 bi 8063b34 <== NOT EXECUTED 08029c3c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 8029c3c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029c40: 38 21 12 f0 ori r1,r1,0x12f0 <== NOT EXECUTED 8029c44: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Gid; } 8029c48: 2c 21 00 34 lhu r1,(r1+52) <== NOT EXECUTED 8029c4c: c3 a0 00 00 ret <== NOT EXECUTED 0802a418 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 802a418: 37 9c ff e0 addi sp,sp,-32 802a41c: 5b 8b 00 20 sw (sp+32),r11 802a420: 5b 8c 00 1c sw (sp+28),r12 802a424: 5b 8d 00 18 sw (sp+24),r13 802a428: 5b 8e 00 14 sw (sp+20),r14 802a42c: 5b 8f 00 10 sw (sp+16),r15 802a430: 5b 90 00 0c sw (sp+12),r16 802a434: 5b 91 00 08 sw (sp+8),r17 802a438: 5b 9d 00 04 sw (sp+4),ra 802a43c: b8 20 68 00 mv r13,r1 802a440: b8 40 80 00 mv r16,r2 802a444: b8 60 58 00 mv r11,r3 802a448: b8 80 78 00 mv r15,r4 802a44c: b8 a0 70 00 mv r14,r5 802a450: b8 c0 88 00 mv r17,r6 FILE *fp; int match; init_etc_passwd_group(); 802a454: fb ff ff 97 calli 802a2b0 if ((fp = fopen("/etc/group", "r")) == NULL) { 802a458: 78 01 08 06 mvhi r1,0x806 802a45c: 78 02 08 06 mvhi r2,0x806 802a460: 38 21 49 24 ori r1,r1,0x4924 802a464: 38 42 cf bc ori r2,r2,0xcfbc 802a468: f8 00 76 cd calli 8047f9c 802a46c: b8 20 60 00 mv r12,r1 802a470: 44 20 00 26 be r1,r0,802a508 errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 802a474: b9 60 10 00 mv r2,r11 802a478: b9 e0 18 00 mv r3,r15 802a47c: b9 c0 20 00 mv r4,r14 802a480: b9 80 08 00 mv r1,r12 802a484: fb ff fe b0 calli 8029f44 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 802a488: b9 a0 10 00 mv r2,r13 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 802a48c: 44 20 00 18 be r1,r0,802a4ec errno = EINVAL; fclose(fp); return -1; } if (name) { 802a490: 45 a0 00 13 be r13,r0,802a4dc match = (strcmp(grp->gr_name, name) == 0); 802a494: 29 61 00 00 lw r1,(r11+0) 802a498: f8 00 90 28 calli 804e538 802a49c: 64 21 00 00 cmpei r1,r1,0 } else { match = (grp->gr_gid == gid); } if (match) { 802a4a0: 44 20 ff f5 be r1,r0,802a474 fclose(fp); 802a4a4: b9 80 08 00 mv r1,r12 802a4a8: f8 00 74 18 calli 8047508 *result = grp; 802a4ac: 34 01 00 00 mvi r1,0 802a4b0: 5a 2b 00 00 sw (r17+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 802a4b4: 2b 9d 00 04 lw ra,(sp+4) 802a4b8: 2b 8b 00 20 lw r11,(sp+32) 802a4bc: 2b 8c 00 1c lw r12,(sp+28) 802a4c0: 2b 8d 00 18 lw r13,(sp+24) 802a4c4: 2b 8e 00 14 lw r14,(sp+20) 802a4c8: 2b 8f 00 10 lw r15,(sp+16) 802a4cc: 2b 90 00 0c lw r16,(sp+12) 802a4d0: 2b 91 00 08 lw r17,(sp+8) 802a4d4: 37 9c 00 20 addi sp,sp,32 802a4d8: c3 a0 00 00 ret } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 802a4dc: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED 802a4e0: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED } if (match) { 802a4e4: 44 20 ff e4 be r1,r0,802a474 <== NOT EXECUTED 802a4e8: e3 ff ff ef bi 802a4a4 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 802a4ec: f8 00 73 a5 calli 8047380 <__errno> <== NOT EXECUTED 802a4f0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a4f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 802a4f8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a4fc: f8 00 74 03 calli 8047508 <== NOT EXECUTED 802a500: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a504: e3 ff ff ec bi 802a4b4 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 802a508: f8 00 73 9e calli 8047380 <__errno> <== NOT EXECUTED 802a50c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a510: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802a514: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a518: e3 ff ff e7 bi 802a4b4 <== NOT EXECUTED 0802a0d8 : return NULL; return p; } struct group *getgrent(void) { 802a0d8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a0dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp == NULL) 802a0e0: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a0e4: 38 21 4c a0 ori r1,r1,0x4ca0 <== NOT EXECUTED 802a0e8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802a0ec: 5c 20 00 05 bne r1,r0,802a100 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 802a0f0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &grent; } 802a0f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a0f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a0fc: c3 a0 00 00 ret <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 802a100: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a104: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a108: 38 42 4d 6c ori r2,r2,0x4d6c <== NOT EXECUTED 802a10c: 38 63 4c a4 ori r3,r3,0x4ca4 <== NOT EXECUTED 802a110: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a114: fb ff ff 8c calli 8029f44 <== NOT EXECUTED 802a118: 44 20 ff f6 be r1,r0,802a0f0 <== NOT EXECUTED 802a11c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a120: 38 21 4d 6c ori r1,r1,0x4d6c <== NOT EXECUTED return NULL; return &grent; } 802a124: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a128: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a12c: c3 a0 00 00 ret <== NOT EXECUTED 0802a558 : struct group *getgrgid( gid_t gid ) { 802a558: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a55c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 802a560: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a564: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a568: 38 42 4d 6c ori r2,r2,0x4d6c <== NOT EXECUTED 802a56c: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 802a570: 38 63 4c a4 ori r3,r3,0x4ca4 <== NOT EXECUTED 802a574: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a578: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 802a57c: fb ff ff e8 calli 802a51c <== NOT EXECUTED 802a580: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 802a584: 5c 22 00 02 bne r1,r2,802a58c <== NOT EXECUTED return NULL; return p; 802a588: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 802a58c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802a590: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a594: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a598: c3 a0 00 00 ret <== NOT EXECUTED 0802a51c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 802a51c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a520: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802a524: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 802a528: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 802a52c: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 802a530: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 802a534: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 802a538: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 802a53c: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 802a540: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 802a544: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a548: fb ff ff b4 calli 802a418 <== NOT EXECUTED } 802a54c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a550: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a554: c3 a0 00 00 ret <== NOT EXECUTED 08026248 : */ pid_t getpid( void ) { return _Objects_Local_node; } 8026248: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 802624c: c3 a0 00 00 ret <== NOT EXECUTED 0802a65c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 802a65c: 37 9c ff e0 addi sp,sp,-32 802a660: 5b 8b 00 20 sw (sp+32),r11 802a664: 5b 8c 00 1c sw (sp+28),r12 802a668: 5b 8d 00 18 sw (sp+24),r13 802a66c: 5b 8e 00 14 sw (sp+20),r14 802a670: 5b 8f 00 10 sw (sp+16),r15 802a674: 5b 90 00 0c sw (sp+12),r16 802a678: 5b 91 00 08 sw (sp+8),r17 802a67c: 5b 9d 00 04 sw (sp+4),ra 802a680: b8 20 68 00 mv r13,r1 802a684: b8 40 80 00 mv r16,r2 802a688: b8 60 58 00 mv r11,r3 802a68c: b8 80 78 00 mv r15,r4 802a690: b8 a0 70 00 mv r14,r5 802a694: b8 c0 88 00 mv r17,r6 FILE *fp; int match; init_etc_passwd_group(); 802a698: fb ff ff 06 calli 802a2b0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 802a69c: 78 01 08 06 mvhi r1,0x806 802a6a0: 78 02 08 06 mvhi r2,0x806 802a6a4: 38 21 48 74 ori r1,r1,0x4874 802a6a8: 38 42 cf bc ori r2,r2,0xcfbc 802a6ac: f8 00 76 3c calli 8047f9c 802a6b0: b8 20 60 00 mv r12,r1 802a6b4: 44 20 00 26 be r1,r0,802a74c errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 802a6b8: b9 60 10 00 mv r2,r11 802a6bc: b9 e0 18 00 mv r3,r15 802a6c0: b9 c0 20 00 mv r4,r14 802a6c4: b9 80 08 00 mv r1,r12 802a6c8: fb ff fe 9a calli 802a130 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 802a6cc: b9 a0 10 00 mv r2,r13 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 802a6d0: 44 20 00 18 be r1,r0,802a730 errno = EINVAL; fclose(fp); return -1; } if (name) { 802a6d4: 45 a0 00 13 be r13,r0,802a720 match = (strcmp(pwd->pw_name, name) == 0); 802a6d8: 29 61 00 00 lw r1,(r11+0) 802a6dc: f8 00 8f 97 calli 804e538 802a6e0: 64 21 00 00 cmpei r1,r1,0 } else { match = (pwd->pw_uid == uid); } if (match) { 802a6e4: 44 20 ff f5 be r1,r0,802a6b8 fclose(fp); 802a6e8: b9 80 08 00 mv r1,r12 802a6ec: f8 00 73 87 calli 8047508 *result = pwd; 802a6f0: 34 01 00 00 mvi r1,0 802a6f4: 5a 2b 00 00 sw (r17+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 802a6f8: 2b 9d 00 04 lw ra,(sp+4) 802a6fc: 2b 8b 00 20 lw r11,(sp+32) 802a700: 2b 8c 00 1c lw r12,(sp+28) 802a704: 2b 8d 00 18 lw r13,(sp+24) 802a708: 2b 8e 00 14 lw r14,(sp+20) 802a70c: 2b 8f 00 10 lw r15,(sp+16) 802a710: 2b 90 00 0c lw r16,(sp+12) 802a714: 2b 91 00 08 lw r17,(sp+8) 802a718: 37 9c 00 20 addi sp,sp,32 802a71c: c3 a0 00 00 ret } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 802a720: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED 802a724: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED } if (match) { 802a728: 44 20 ff e4 be r1,r0,802a6b8 <== NOT EXECUTED 802a72c: e3 ff ff ef bi 802a6e8 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 802a730: f8 00 73 14 calli 8047380 <__errno> <== NOT EXECUTED 802a734: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a738: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 802a73c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a740: f8 00 73 72 calli 8047508 <== NOT EXECUTED 802a744: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a748: e3 ff ff ec bi 802a6f8 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 802a74c: f8 00 73 0d calli 8047380 <__errno> <== NOT EXECUTED 802a750: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a754: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802a758: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a75c: e3 ff ff e7 bi 802a6f8 <== NOT EXECUTED 0802a258 : return NULL; return p; } struct passwd *getpwent(void) { 802a258: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a25c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp == NULL) 802a260: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a264: 38 21 4b b8 ori r1,r1,0x4bb8 <== NOT EXECUTED 802a268: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802a26c: 5c 20 00 05 bne r1,r0,802a280 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 802a270: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &pwent; } 802a274: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a278: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a27c: c3 a0 00 00 ret <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 802a280: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a284: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a288: 38 42 4c 84 ori r2,r2,0x4c84 <== NOT EXECUTED 802a28c: 38 63 4b bc ori r3,r3,0x4bbc <== NOT EXECUTED 802a290: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a294: fb ff ff a7 calli 802a130 <== NOT EXECUTED 802a298: 44 20 ff f6 be r1,r0,802a270 <== NOT EXECUTED 802a29c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a2a0: 38 21 4c 84 ori r1,r1,0x4c84 <== NOT EXECUTED return NULL; return &pwent; } 802a2a4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a2a8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a2ac: c3 a0 00 00 ret <== NOT EXECUTED 0802a79c : struct passwd *getpwuid( uid_t uid ) { 802a79c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a7a0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 802a7a4: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a7a8: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a7ac: 38 42 4c 84 ori r2,r2,0x4c84 <== NOT EXECUTED 802a7b0: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 802a7b4: 38 63 4b bc ori r3,r3,0x4bbc <== NOT EXECUTED 802a7b8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a7bc: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 802a7c0: fb ff ff e8 calli 802a760 <== NOT EXECUTED 802a7c4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 802a7c8: 5c 22 00 02 bne r1,r2,802a7d0 <== NOT EXECUTED return NULL; return p; 802a7cc: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 802a7d0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802a7d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a7d8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a7dc: c3 a0 00 00 ret <== NOT EXECUTED 0802a760 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 802a760: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a764: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802a768: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 802a76c: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 802a770: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 802a774: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 802a778: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 802a77c: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 802a780: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 802a784: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 802a788: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a78c: fb ff ff b4 calli 802a65c <== NOT EXECUTED } 802a790: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a794: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a798: c3 a0 00 00 ret <== NOT EXECUTED 08007a00 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8007a00: 37 9c ff ec addi sp,sp,-20 8007a04: 5b 8b 00 0c sw (sp+12),r11 8007a08: 5b 8c 00 08 sw (sp+8),r12 8007a0c: 5b 9d 00 04 sw (sp+4),ra 8007a10: b8 20 58 00 mv r11,r1 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 8007a14: 44 20 00 14 be r1,r0,8007a64 { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 8007a18: 90 00 60 00 rcsr r12,IE 8007a1c: 34 01 ff fe mvi r1,-2 8007a20: a1 81 08 00 and r1,r12,r1 8007a24: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 8007a28: 37 81 00 10 addi r1,sp,16 8007a2c: f8 00 04 81 calli 8008c30 <_TOD_Get> _ISR_Enable(level); 8007a30: d0 0c 00 00 wcsr IE,r12 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 8007a34: 2b 82 00 10 lw r2,(sp+16) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8007a38: 2b 81 00 14 lw r1,(sp+20) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 8007a3c: 59 62 00 00 sw (r11+0),r2 time->tv_usec = useconds; 8007a40: 34 02 03 e8 mvi r2,1000 8007a44: f8 00 48 64 calli 8019bd4 <__divsi3> 8007a48: 59 61 00 04 sw (r11+4),r1 8007a4c: 34 01 00 00 mvi r1,0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 8007a50: 2b 9d 00 04 lw ra,(sp+4) 8007a54: 2b 8b 00 0c lw r11,(sp+12) 8007a58: 2b 8c 00 08 lw r12,(sp+8) 8007a5c: 37 9c 00 14 addi sp,sp,20 8007a60: c3 a0 00 00 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 8007a64: f8 00 10 57 calli 800bbc0 <__errno> <== NOT EXECUTED 8007a68: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8007a6c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007a70: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8007a74: e3 ff ff f7 bi 8007a50 <== NOT EXECUTED 08007bc8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 8007bc8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8007bcc: 38 21 12 f0 ori r1,r1,0x12f0 <== NOT EXECUTED 8007bd0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Uid; } 8007bd4: 2c 21 00 32 lhu r1,(r1+50) <== NOT EXECUTED 8007bd8: c3 a0 00 00 ret <== NOT EXECUTED 08011acc : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 8011acc: 28 23 00 3c lw r3,(r1+60) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8011ad0: b8 20 10 00 mv r2,r1 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 8011ad4: 34 01 ff ff mvi r1,-1 8011ad8: 28 64 00 4c lw r4,(r3+76) 8011adc: 34 03 00 01 mvi r3,1 8011ae0: 44 83 00 02 be r4,r3,8011ae8 if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 8011ae4: c3 a0 00 00 ret <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 8011ae8: 34 01 00 00 mvi r1,0 8011aec: 58 41 00 14 sw (r2+20),r1 8011af0: 58 41 00 10 sw (r2+16),r1 return 0; } 8011af4: c3 a0 00 00 ret 08011bfc : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8011bfc: 37 9c ff e8 addi sp,sp,-24 8011c00: 5b 8b 00 10 sw (sp+16),r11 8011c04: 5b 8c 00 0c sw (sp+12),r12 8011c08: 5b 8d 00 08 sw (sp+8),r13 8011c0c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8011c10: 28 4b 00 00 lw r11,(r2+0) int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8011c14: b8 40 60 00 mv r12,r2 8011c18: 29 62 00 50 lw r2,(r11+80) 8011c1c: 35 61 00 54 addi r1,r11,84 8011c20: 5c 41 00 2e bne r2,r1,8011cd8 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 8011c24: 29 81 00 10 lw r1,(r12+16) 8011c28: 28 21 00 1c lw r1,(r1+28) 8011c2c: 45 61 00 30 be r11,r1,8011cec /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 8011c30: 29 6d 00 5c lw r13,(r11+92) 8011c34: 5d a0 00 2e bne r13,r0,8011cec /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8011c38: 29 61 00 08 lw r1,(r11+8) 8011c3c: 44 2d 00 04 be r1,r13,8011c4c 8011c40: b9 60 08 00 mv r1,r11 8011c44: fb ff cd a2 calli 80052cc <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8011c48: 59 6d 00 08 sw (r11+8),r13 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8011c4c: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8011c50: 34 02 00 00 mvi r2,0 8011c54: 37 81 00 14 addi r1,sp,20 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8011c58: 34 63 ff ff addi r3,r3,-1 8011c5c: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8011c60: fb ff c4 04 calli 8002c70 8011c64: 2b 81 00 14 lw r1,(sp+20) 8011c68: 59 61 00 48 sw (r11+72),r1 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 8011c6c: b9 60 08 00 mv r1,r11 8011c70: fb ff f0 23 calli 800dcfc 8011c74: 5c 20 00 12 bne r1,r0,8011cbc 8011c78: 2d 62 00 34 lhu r2,(r11+52) 8011c7c: 5c 41 00 10 bne r2,r1,8011cbc /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8011c80: 78 01 08 02 mvhi r1,0x802 8011c84: 38 21 40 f8 ori r1,r1,0x40f8 8011c88: 28 21 00 00 lw r1,(r1+0) 8011c8c: 29 83 00 00 lw r3,(r12+0) 8011c90: 28 24 00 04 lw r4,(r1+4) 8011c94: 44 83 00 1b be r4,r3,8011d00 /* * Free memory associated with a memory file. */ free( the_jnode ); 8011c98: b9 60 08 00 mv r1,r11 8011c9c: fb ff c3 c7 calli 8002bb8 8011ca0: 34 01 00 00 mvi r1,0 } return 0; } 8011ca4: 2b 9d 00 04 lw ra,(sp+4) 8011ca8: 2b 8b 00 10 lw r11,(sp+16) 8011cac: 2b 8c 00 0c lw r12,(sp+12) 8011cb0: 2b 8d 00 08 lw r13,(sp+8) 8011cb4: 37 9c 00 18 addi sp,sp,24 8011cb8: c3 a0 00 00 ret /* * Free memory associated with a memory file. */ free( the_jnode ); 8011cbc: 34 01 00 00 mvi r1,0 } return 0; } 8011cc0: 2b 9d 00 04 lw ra,(sp+4) 8011cc4: 2b 8b 00 10 lw r11,(sp+16) 8011cc8: 2b 8c 00 0c lw r12,(sp+12) 8011ccc: 2b 8d 00 08 lw r13,(sp+8) 8011cd0: 37 9c 00 18 addi sp,sp,24 8011cd4: c3 a0 00 00 ret /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 8011cd8: f8 00 02 62 calli 8012660 <__errno> 8011cdc: 34 02 00 5a mvi r2,90 8011ce0: 58 22 00 00 sw (r1+0),r2 8011ce4: 34 01 ff ff mvi r1,-1 8011ce8: e3 ff ff f6 bi 8011cc0 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 8011cec: f8 00 02 5d calli 8012660 <__errno> 8011cf0: 34 02 00 10 mvi r2,16 8011cf4: 58 22 00 00 sw (r1+0),r2 8011cf8: 34 01 ff ff mvi r1,-1 8011cfc: e3 ff ff f1 bi 8011cc0 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 8011d00: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8011d04: e3 ff ff e5 bi 8011c98 <== NOT EXECUTED 0802a2b0 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 802a2b0: 37 9c ff f4 addi sp,sp,-12 802a2b4: 5b 8b 00 0c sw (sp+12),r11 802a2b8: 5b 8c 00 08 sw (sp+8),r12 802a2bc: 5b 9d 00 04 sw (sp+4),ra FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 802a2c0: 78 03 08 07 mvhi r3,0x807 802a2c4: 38 63 4b b4 ori r3,r3,0x4bb4 802a2c8: 40 6b 00 00 lbu r11,(r3+0) 802a2cc: 45 60 00 06 be r11,r0,802a2e4 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 802a2d0: 2b 9d 00 04 lw ra,(sp+4) 802a2d4: 2b 8b 00 0c lw r11,(sp+12) 802a2d8: 2b 8c 00 08 lw r12,(sp+8) 802a2dc: 37 9c 00 0c addi sp,sp,12 802a2e0: c3 a0 00 00 ret FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 802a2e4: 34 04 00 01 mvi r4,1 mkdir("/etc", 0777); 802a2e8: 78 01 08 06 mvhi r1,0x806 802a2ec: 34 02 01 ff mvi r2,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 802a2f0: 30 64 00 00 sb (r3+0),r4 mkdir("/etc", 0777); 802a2f4: 38 21 47 f4 ori r1,r1,0x47f4 802a2f8: fb ff 78 62 calli 8008480 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 802a2fc: 78 01 08 06 mvhi r1,0x806 802a300: 78 02 08 06 mvhi r2,0x806 802a304: 38 21 48 74 ori r1,r1,0x4874 802a308: 38 42 cf bc ori r2,r2,0xcfbc 802a30c: f8 00 77 24 calli 8047f9c 802a310: b8 20 60 00 mv r12,r1 802a314: 44 2b 00 1f be r1,r11,802a390 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 802a318: f8 00 74 7c calli 8047508 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 802a31c: 78 01 08 06 mvhi r1,0x806 802a320: 78 02 08 06 mvhi r2,0x806 802a324: 38 21 49 24 ori r1,r1,0x4924 802a328: 38 42 cf bc ori r2,r2,0xcfbc 802a32c: f8 00 77 1c calli 8047f9c 802a330: b8 20 58 00 mv r11,r1 802a334: 44 20 00 07 be r1,r0,802a350 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 802a338: f8 00 74 74 calli 8047508 <== NOT EXECUTED } } 802a33c: 2b 9d 00 04 lw ra,(sp+4) 802a340: 2b 8b 00 0c lw r11,(sp+12) 802a344: 2b 8c 00 08 lw r12,(sp+8) 802a348: 37 9c 00 0c addi sp,sp,12 802a34c: c3 a0 00 00 ret * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 802a350: 78 01 08 06 mvhi r1,0x806 802a354: 78 02 08 06 mvhi r2,0x806 802a358: 38 21 49 24 ori r1,r1,0x4924 802a35c: 38 42 5b c4 ori r2,r2,0x5bc4 802a360: f8 00 77 0f calli 8047f9c 802a364: b8 20 60 00 mv r12,r1 802a368: 44 2b ff da be r1,r11,802a2d0 fprintf( fp, "root:x:0:root\n" 802a36c: 78 01 08 06 mvhi r1,0x806 802a370: 34 02 00 01 mvi r2,1 802a374: 34 03 00 2a mvi r3,42 802a378: b9 80 20 00 mv r4,r12 802a37c: 38 21 a2 18 ori r1,r1,0xa218 802a380: f8 00 7c 42 calli 8049488 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 802a384: b9 80 08 00 mv r1,r12 802a388: f8 00 74 60 calli 8047508 802a38c: e3 ff ff ec bi 802a33c * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 802a390: 78 01 08 06 mvhi r1,0x806 802a394: 78 02 08 06 mvhi r2,0x806 802a398: 38 21 48 74 ori r1,r1,0x4874 802a39c: 38 42 5b c4 ori r2,r2,0x5bc4 802a3a0: f8 00 76 ff calli 8047f9c 802a3a4: b8 20 58 00 mv r11,r1 802a3a8: 44 2c ff dd be r1,r12,802a31c fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 802a3ac: 78 01 08 06 mvhi r1,0x806 802a3b0: 38 21 a1 b0 ori r1,r1,0xa1b0 802a3b4: 34 02 00 01 mvi r2,1 802a3b8: 34 03 00 66 mvi r3,102 802a3bc: b9 60 20 00 mv r4,r11 802a3c0: f8 00 7c 32 calli 8049488 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 802a3c4: b9 60 08 00 mv r1,r11 802a3c8: e3 ff ff d4 bi 802a318 0800592c : int ioctl( int fd, ioctl_command_t command, ... ) { 800592c: 37 9c ff d4 addi sp,sp,-44 8005930: 5b 8b 00 10 sw (sp+16),r11 8005934: 5b 8c 00 0c sw (sp+12),r12 8005938: 5b 8d 00 08 sw (sp+8),r13 800593c: 5b 9d 00 04 sw (sp+4),ra va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 8005940: 78 09 08 02 mvhi r9,0x802 8005944: 39 29 40 10 ori r9,r9,0x4010 8005948: 29 29 00 00 lw r9,(r9+0) int ioctl( int fd, ioctl_command_t command, ... ) { 800594c: 5b 83 00 18 sw (sp+24),r3 8005950: 5b 84 00 1c sw (sp+28),r4 8005954: 5b 85 00 20 sw (sp+32),r5 8005958: 5b 86 00 24 sw (sp+36),r6 800595c: 5b 87 00 28 sw (sp+40),r7 8005960: 5b 88 00 2c sw (sp+44),r8 8005964: 5b 82 00 14 sw (sp+20),r2 8005968: b8 40 60 00 mv r12,r2 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 800596c: 55 21 00 06 bgu r9,r1,8005984 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 8005970: f8 00 34 b1 calli 8012c34 <__errno> 8005974: 34 02 00 09 mvi r2,9 8005978: 58 22 00 00 sw (r1+0),r2 800597c: 34 01 ff ff mvi r1,-1 8005980: e0 00 00 15 bi 80059d4 rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8005984: 34 02 00 03 mvi r2,3 8005988: fb ff ec bf calli 8000c84 <__ashlsi3> 800598c: 34 02 00 03 mvi r2,3 8005990: 78 0b 08 02 mvhi r11,0x802 8005994: b8 20 68 00 mv r13,r1 8005998: 39 6b 47 78 ori r11,r11,0x4778 800599c: fb ff ec ba calli 8000c84 <__ashlsi3> 80059a0: 29 62 00 00 lw r2,(r11+0) 80059a4: b5 a1 08 00 add r1,r13,r1 80059a8: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 80059ac: 28 22 00 18 lw r2,(r1+24) 80059b0: 20 42 01 00 andi r2,r2,0x100 80059b4: 44 40 ff ef be r2,r0,8005970 /* * Now process the ioctl(). */ if ( !iop->handlers ) 80059b8: 28 22 00 40 lw r2,(r1+64) iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 80059bc: 2b 83 00 18 lw r3,(sp+24) /* * Now process the ioctl(). */ if ( !iop->handlers ) 80059c0: 44 40 ff ec be r2,r0,8005970 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 80059c4: 28 44 00 10 lw r4,(r2+16) 80059c8: 44 80 00 09 be r4,r0,80059ec rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 80059cc: b9 80 10 00 mv r2,r12 80059d0: d8 80 00 00 call r4 return rc; } 80059d4: 2b 9d 00 04 lw ra,(sp+4) 80059d8: 2b 8b 00 10 lw r11,(sp+16) 80059dc: 2b 8c 00 0c lw r12,(sp+12) 80059e0: 2b 8d 00 08 lw r13,(sp+8) 80059e4: 37 9c 00 2c addi sp,sp,44 80059e8: c3 a0 00 00 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 80059ec: f8 00 34 92 calli 8012c34 <__errno> <== NOT EXECUTED 80059f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80059f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80059f8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80059fc: e3 ff ff f6 bi 80059d4 <== NOT EXECUTED 08004864 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 8004864: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004868: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800486c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004870: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004874: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 8004878: 28 42 00 30 lw r2,(r2+48) <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 800487c: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 8004880: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 8004884: 44 20 00 02 be r1,r0,800488c <== NOT EXECUTED c &= 0x7f; 8004888: 21 8c 00 7f andi r12,r12,0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 800488c: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 8004890: 44 20 00 0b be r1,r0,80048bc <== NOT EXECUTED c = tolower (c); 8004894: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004898: 38 21 42 c8 ori r1,r1,0x42c8 <== NOT EXECUTED 800489c: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80048a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80048a4: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED 80048a8: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED 80048ac: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80048b0: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 80048b4: 44 83 00 44 be r4,r3,80049c4 <== NOT EXECUTED 80048b8: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (c == '\r') { 80048bc: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 80048c0: 45 81 00 18 be r12,r1,8004920 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 80048c4: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 80048c8: 45 83 00 3b be r12,r3,80049b4 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 80048cc: 5d 80 00 20 bne r12,r0,800494c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 80048d0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80048d4: 38 21 42 34 ori r1,r1,0x4234 <== NOT EXECUTED 80048d8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80048dc: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80048e0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80048e4: 4c 41 00 11 bge r2,r1,8004928 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 80048e8: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80048ec: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED 80048f0: 5c 20 00 37 bne r1,r0,80049cc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 80048f4: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 80048f8: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED 80048fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004900: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8004904: 30 4c 00 00 sb (r2+0),r12 <== NOT EXECUTED 8004908: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED } return 0; } 800490c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004910: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004914: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004918: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800491c: c3 a0 00 00 ret <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 8004920: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED 8004924: 44 20 00 07 be r1,r0,8004940 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 8004928: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } 800492c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004930: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004934: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004938: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800493c: c3 a0 00 00 ret <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 8004940: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED 8004944: 44 41 00 02 be r2,r1,800494c <== NOT EXECUTED 8004948: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 800494c: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED 8004950: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED 8004954: 44 20 ff df be r1,r0,80048d0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 8004958: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 800495c: 44 2c 00 38 be r1,r12,8004a3c <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 8004960: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED 8004964: 44 2c 00 23 be r1,r12,80049f0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 8004968: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED 800496c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004970: 44 6c ff e7 be r3,r12,800490c <== NOT EXECUTED return 1; } else if (c == '\n') { 8004974: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004978: 45 81 00 23 be r12,r1,8004a04 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 800497c: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED 8004980: 44 2c 00 03 be r1,r12,800498c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 8004984: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED 8004988: 5c 2c ff d2 bne r1,r12,80048d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 800498c: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED 8004990: 5c 40 00 14 bne r2,r0,80049e0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 8004994: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004998: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 800499c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80049a0: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED 80049a4: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED 80049a8: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED 80049ac: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED return 1; 80049b0: e3 ff ff d7 bi 800490c <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 80049b4: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED 80049b8: 44 40 ff e5 be r2,r0,800494c <== NOT EXECUTED 80049bc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 80049c0: e3 ff ff e3 bi 800494c <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 80049c4: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED 80049c8: e3 ff ff bc bi 80048b8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 80049cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049d0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80049d4: fb ff fe ee calli 800458c <== NOT EXECUTED 80049d8: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80049dc: e3 ff ff c6 bi 80048f4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 80049e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80049e4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049e8: fb ff fe e9 calli 800458c <== NOT EXECUTED 80049ec: e3 ff ff ea bi 8004994 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 80049f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80049f4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80049f8: fb ff ff 12 calli 8004640 <== NOT EXECUTED 80049fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; 8004a00: e3 ff ff c3 bi 800490c <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 8004a04: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED 8004a08: 44 40 00 04 be r2,r0,8004a18 <== NOT EXECUTED echo (c, tty); 8004a0c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a10: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004a14: fb ff fe de calli 800458c <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 8004a18: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004a1c: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004a20: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004a24: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED 8004a28: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8004a2c: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED 8004a30: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED 8004a34: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return 1; 8004a38: e3 ff ff b5 bi 800490c <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 8004a3c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004a40: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004a44: fb ff fe ff calli 8004640 <== NOT EXECUTED 8004a48: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; 8004a4c: e3 ff ff b0 bi 800490c <== NOT EXECUTED 08026274 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 8026274: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8026278: c3 a0 00 00 ret <== NOT EXECUTED 0802a928 : int link( const char *existing, const char *new ) { 802a928: 37 9c ff c0 addi sp,sp,-64 802a92c: 5b 8b 00 14 sw (sp+20),r11 802a930: 5b 8c 00 10 sw (sp+16),r12 802a934: 5b 8d 00 0c sw (sp+12),r13 802a938: 5b 8e 00 08 sw (sp+8),r14 802a93c: 5b 9d 00 04 sw (sp+4),ra 802a940: b8 20 60 00 mv r12,r1 802a944: b8 40 70 00 mv r14,r2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 802a948: 37 8b 00 2c addi r11,sp,44 802a94c: f8 00 90 77 calli 804eb28 802a950: b8 20 10 00 mv r2,r1 802a954: 34 03 00 00 mvi r3,0 802a958: b9 80 08 00 mv r1,r12 802a95c: b9 60 20 00 mv r4,r11 802a960: 34 05 00 01 mvi r5,1 802a964: fb ff 74 07 calli 8007980 0, &existing_loc, true ); if ( result != 0 ) 802a968: 34 0c ff ff mvi r12,-1 802a96c: 5c 20 00 35 bne r1,r0,802aa40 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 802a970: 41 c3 00 00 lbu r3,(r14+0) 802a974: 64 64 00 5c cmpei r4,r3,92 802a978: 64 62 00 2f cmpei r2,r3,47 802a97c: b8 82 20 00 or r4,r4,r2 802a980: 44 81 00 38 be r4,r1,802aa60 802a984: 78 03 08 07 mvhi r3,0x807 802a988: 38 63 12 f0 ori r3,r3,0x12f0 802a98c: 28 63 00 00 lw r3,(r3+0) 802a990: 34 01 00 01 mvi r1,1 802a994: 28 62 00 18 lw r2,(r3+24) 802a998: 5b 82 00 18 sw (sp+24),r2 802a99c: 28 62 00 1c lw r2,(r3+28) 802a9a0: 5b 82 00 1c sw (sp+28),r2 802a9a4: 28 62 00 20 lw r2,(r3+32) 802a9a8: 5b 82 00 20 sw (sp+32),r2 802a9ac: 28 62 00 24 lw r2,(r3+36) 802a9b0: 5b 82 00 24 sw (sp+36),r2 802a9b4: 28 63 00 28 lw r3,(r3+40) 802a9b8: 5b 83 00 28 sw (sp+40),r3 if ( !parent_loc.ops->evalformake_h ) { 802a9bc: 2b 82 00 24 lw r2,(sp+36) 802a9c0: 28 44 00 04 lw r4,(r2+4) 802a9c4: 44 80 00 59 be r4,r0,802ab28 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 802a9c8: 37 8d 00 18 addi r13,sp,24 802a9cc: b5 c1 08 00 add r1,r14,r1 802a9d0: b9 a0 10 00 mv r2,r13 802a9d4: 37 83 00 40 addi r3,sp,64 802a9d8: d8 80 00 00 call r4 802a9dc: b8 20 60 00 mv r12,r1 if ( result != 0 ) { 802a9e0: 5c 20 00 48 bne r1,r0,802ab00 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 802a9e4: 2b 81 00 3c lw r1,(sp+60) 802a9e8: 2b 82 00 28 lw r2,(sp+40) 802a9ec: 5c 41 00 2d bne r2,r1,802aaa0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 802a9f0: 2b 82 00 24 lw r2,(sp+36) 802a9f4: 28 44 00 08 lw r4,(r2+8) 802a9f8: 44 80 00 57 be r4,r0,802ab54 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 ); 802a9fc: 2b 83 00 40 lw r3,(sp+64) 802aa00: b9 60 08 00 mv r1,r11 802aa04: b9 a0 10 00 mv r2,r13 802aa08: d8 80 00 00 call r4 802aa0c: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &existing_loc ); 802aa10: 2b 81 00 38 lw r1,(sp+56) 802aa14: 44 20 00 05 be r1,r0,802aa28 802aa18: 28 22 00 1c lw r2,(r1+28) 802aa1c: 44 40 00 03 be r2,r0,802aa28 802aa20: b9 60 08 00 mv r1,r11 802aa24: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 802aa28: 2b 81 00 24 lw r1,(sp+36) 802aa2c: 44 20 00 05 be r1,r0,802aa40 802aa30: 28 22 00 1c lw r2,(r1+28) 802aa34: 44 40 00 03 be r2,r0,802aa40 802aa38: b9 a0 08 00 mv r1,r13 802aa3c: d8 40 00 00 call r2 return result; } 802aa40: b9 80 08 00 mv r1,r12 802aa44: 2b 9d 00 04 lw ra,(sp+4) 802aa48: 2b 8b 00 14 lw r11,(sp+20) 802aa4c: 2b 8c 00 10 lw r12,(sp+16) 802aa50: 2b 8d 00 0c lw r13,(sp+12) 802aa54: 2b 8e 00 08 lw r14,(sp+8) 802aa58: 37 9c 00 40 addi sp,sp,64 802aa5c: c3 a0 00 00 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 802aa60: 44 64 ff c9 be r3,r4,802a984 802aa64: 78 01 08 07 mvhi r1,0x807 802aa68: 38 21 12 f0 ori r1,r1,0x12f0 802aa6c: 28 22 00 00 lw r2,(r1+0) 802aa70: b8 80 08 00 mv r1,r4 802aa74: 28 43 00 04 lw r3,(r2+4) 802aa78: 5b 83 00 18 sw (sp+24),r3 802aa7c: 28 43 00 08 lw r3,(r2+8) 802aa80: 5b 83 00 1c sw (sp+28),r3 802aa84: 28 43 00 0c lw r3,(r2+12) 802aa88: 5b 83 00 20 sw (sp+32),r3 802aa8c: 28 43 00 10 lw r3,(r2+16) 802aa90: 5b 83 00 24 sw (sp+36),r3 802aa94: 28 42 00 14 lw r2,(r2+20) 802aa98: 5b 82 00 28 sw (sp+40),r2 802aa9c: e3 ff ff c8 bi 802a9bc * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 802aaa0: 2b 81 00 38 lw r1,(sp+56) 802aaa4: 44 20 00 05 be r1,r0,802aab8 802aaa8: 28 22 00 1c lw r2,(r1+28) 802aaac: 44 40 00 03 be r2,r0,802aab8 802aab0: b9 60 08 00 mv r1,r11 802aab4: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 802aab8: 2b 81 00 24 lw r1,(sp+36) 802aabc: 44 20 00 05 be r1,r0,802aad0 802aac0: 28 22 00 1c lw r2,(r1+28) 802aac4: 44 40 00 03 be r2,r0,802aad0 802aac8: b9 a0 08 00 mv r1,r13 802aacc: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EXDEV ); 802aad0: f8 00 72 2c calli 8047380 <__errno> 802aad4: 34 02 00 12 mvi r2,18 802aad8: 34 0c ff ff mvi r12,-1 802aadc: 58 22 00 00 sw (r1+0),r2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 802aae0: b9 80 08 00 mv r1,r12 802aae4: 2b 9d 00 04 lw ra,(sp+4) 802aae8: 2b 8b 00 14 lw r11,(sp+20) 802aaec: 2b 8c 00 10 lw r12,(sp+16) 802aaf0: 2b 8d 00 0c lw r13,(sp+12) 802aaf4: 2b 8e 00 08 lw r14,(sp+8) 802aaf8: 37 9c 00 40 addi sp,sp,64 802aafc: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 802ab00: 2b 81 00 38 lw r1,(sp+56) 802ab04: 44 20 00 05 be r1,r0,802ab18 802ab08: 28 22 00 1c lw r2,(r1+28) 802ab0c: 44 40 00 03 be r2,r0,802ab18 802ab10: b9 60 08 00 mv r1,r11 802ab14: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( result ); 802ab18: f8 00 72 1a calli 8047380 <__errno> 802ab1c: 58 2c 00 00 sw (r1+0),r12 802ab20: 34 0c ff ff mvi r12,-1 802ab24: e3 ff ff c7 bi 802aa40 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 802ab28: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 802ab2c: 44 24 00 05 be r1,r4,802ab40 <== NOT EXECUTED 802ab30: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802ab34: 44 40 00 03 be r2,r0,802ab40 <== NOT EXECUTED 802ab38: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ab3c: d8 40 00 00 call r2 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802ab40: f8 00 72 10 calli 8047380 <__errno> <== NOT EXECUTED 802ab44: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802ab48: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802ab4c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802ab50: e3 ff ff bc bi 802aa40 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 802ab54: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 802ab58: 44 24 00 06 be r1,r4,802ab70 <== NOT EXECUTED 802ab5c: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 802ab60: 44 64 00 04 be r3,r4,802ab70 <== NOT EXECUTED 802ab64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ab68: d8 60 00 00 call r3 <== NOT EXECUTED 802ab6c: 2b 82 00 24 lw r2,(sp+36) <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 802ab70: 44 40 ff f4 be r2,r0,802ab40 <== NOT EXECUTED 802ab74: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 802ab78: 44 40 ff f2 be r2,r0,802ab40 <== NOT EXECUTED 802ab7c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802ab80: d8 40 00 00 call r2 <== NOT EXECUTED 802ab84: e3 ff ff ef bi 802ab40 <== NOT EXECUTED 0801a07c : off_t lseek( int fd, off_t offset, int whence ) { 801a07c: 37 9c ff e4 addi sp,sp,-28 801a080: 5b 8b 00 1c sw (sp+28),r11 801a084: 5b 8c 00 18 sw (sp+24),r12 801a088: 5b 8d 00 14 sw (sp+20),r13 801a08c: 5b 8e 00 10 sw (sp+16),r14 801a090: 5b 8f 00 0c sw (sp+12),r15 801a094: 5b 90 00 08 sw (sp+8),r16 801a098: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801a09c: 78 04 08 01 mvhi r4,0x801 801a0a0: 38 84 c0 10 ori r4,r4,0xc010 801a0a4: 28 84 00 00 lw r4,(r4+0) off_t lseek( int fd, off_t offset, int whence ) { 801a0a8: b8 40 60 00 mv r12,r2 801a0ac: b8 60 68 00 mv r13,r3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801a0b0: 54 81 00 06 bgu r4,r1,801a0c8 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 801a0b4: fb ff c6 c3 calli 800bbc0 <__errno> <== NOT EXECUTED 801a0b8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801a0bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a0c0: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a0c4: e0 00 00 1c bi 801a134 <== NOT EXECUTED rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801a0c8: 34 02 00 03 mvi r2,3 801a0cc: fb ff 98 49 calli 80001f0 <__ashlsi3> 801a0d0: 78 0e 08 01 mvhi r14,0x801 801a0d4: 39 ce c6 9c ori r14,r14,0xc69c 801a0d8: 34 02 00 03 mvi r2,3 801a0dc: b8 20 78 00 mv r15,r1 801a0e0: fb ff 98 44 calli 80001f0 <__ashlsi3> 801a0e4: 29 cb 00 00 lw r11,(r14+0) 801a0e8: b5 e1 08 00 add r1,r15,r1 801a0ec: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 801a0f0: 29 61 00 18 lw r1,(r11+24) 801a0f4: 20 21 01 00 andi r1,r1,0x100 801a0f8: 44 20 ff ef be r1,r0,801a0b4 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 801a0fc: 29 6e 00 40 lw r14,(r11+64) 801a100: 29 c1 00 14 lw r1,(r14+20) 801a104: 44 20 00 42 be r1,r0,801a20c /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 801a108: 34 01 00 01 mvi r1,1 /* * Now process the lseek(). */ old_offset = iop->offset; 801a10c: 29 70 00 10 lw r16,(r11+16) 801a110: 29 6f 00 14 lw r15,(r11+20) switch ( whence ) { 801a114: 45 a1 00 33 be r13,r1,801a1e0 801a118: 34 01 00 02 mvi r1,2 801a11c: 45 a1 00 24 be r13,r1,801a1ac 801a120: 45 a0 00 0f be r13,r0,801a15c case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 801a124: fb ff c6 a7 calli 800bbc0 <__errno> 801a128: 34 02 00 16 mvi r2,22 801a12c: 58 22 00 00 sw (r1+0),r2 801a130: 34 0c ff ff mvi r12,-1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 801a134: b9 80 08 00 mv r1,r12 801a138: 2b 9d 00 04 lw ra,(sp+4) 801a13c: 2b 8b 00 1c lw r11,(sp+28) 801a140: 2b 8c 00 18 lw r12,(sp+24) 801a144: 2b 8d 00 14 lw r13,(sp+20) 801a148: 2b 8e 00 10 lw r14,(sp+16) 801a14c: 2b 8f 00 0c lw r15,(sp+12) 801a150: 2b 90 00 08 lw r16,(sp+8) 801a154: 37 9c 00 1c addi sp,sp,28 801a158: c3 a0 00 00 ret */ old_offset = iop->offset; switch ( whence ) { case SEEK_SET: iop->offset = offset; 801a15c: 34 02 00 1f mvi r2,31 801a160: b9 80 08 00 mv r1,r12 801a164: fb ff 98 73 calli 8000330 <__ashrsi3> 801a168: b8 20 10 00 mv r2,r1 801a16c: 59 61 00 10 sw (r11+16),r1 801a170: 59 6c 00 14 sw (r11+20),r12 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 801a174: 29 c5 00 14 lw r5,(r14+20) 801a178: b9 80 18 00 mv r3,r12 801a17c: b9 a0 20 00 mv r4,r13 801a180: b9 60 08 00 mv r1,r11 801a184: d8 a0 00 00 call r5 if ( status == (off_t) -1 ) 801a188: 34 01 ff ff mvi r1,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 801a18c: b8 40 60 00 mv r12,r2 if ( status == (off_t) -1 ) 801a190: 5c 41 ff e9 bne r2,r1,801a134 iop->offset = old_offset; 801a194: b9 e0 08 00 mv r1,r15 801a198: 34 02 00 1f mvi r2,31 801a19c: fb ff 98 65 calli 8000330 <__ashrsi3> 801a1a0: 59 61 00 10 sw (r11+16),r1 801a1a4: 59 6f 00 14 sw (r11+20),r15 801a1a8: e3 ff ff e3 bi 801a134 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 801a1ac: 34 02 00 1f mvi r2,31 801a1b0: b9 80 08 00 mv r1,r12 801a1b4: fb ff 98 5f calli 8000330 <__ashrsi3> 801a1b8: b8 20 10 00 mv r2,r1 801a1bc: 29 61 00 0c lw r1,(r11+12) 801a1c0: 29 63 00 08 lw r3,(r11+8) 801a1c4: b5 81 08 00 add r1,r12,r1 801a1c8: f5 81 20 00 cmpgu r4,r12,r1 801a1cc: b4 43 18 00 add r3,r2,r3 801a1d0: b4 83 18 00 add r3,r4,r3 801a1d4: 59 63 00 10 sw (r11+16),r3 801a1d8: 59 61 00 14 sw (r11+20),r1 break; 801a1dc: e3 ff ff e6 bi 801a174 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 801a1e0: 34 02 00 1f mvi r2,31 801a1e4: b9 80 08 00 mv r1,r12 801a1e8: fb ff 98 52 calli 8000330 <__ashrsi3> 801a1ec: b8 20 10 00 mv r2,r1 801a1f0: b5 8f 08 00 add r1,r12,r15 801a1f4: f5 81 18 00 cmpgu r3,r12,r1 801a1f8: b4 50 80 00 add r16,r2,r16 801a1fc: b4 70 80 00 add r16,r3,r16 801a200: 59 70 00 10 sw (r11+16),r16 801a204: 59 61 00 14 sw (r11+20),r1 break; 801a208: e3 ff ff db bi 801a174 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801a20c: fb ff c6 6d calli 800bbc0 <__errno> <== NOT EXECUTED 801a210: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801a214: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a218: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a21c: e3 ff ff c6 bi 801a134 <== NOT EXECUTED 0802ad70 : int _STAT_NAME( const char *path, struct stat *buf ) { 802ad70: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 802ad74: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 802ad78: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802ad7c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 802ad80: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802ad84: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 802ad88: b8 20 58 00 mv r11,r1 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 802ad8c: 44 40 00 26 be r2,r0,802ae24 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 802ad90: f8 00 8f 66 calli 804eb28 <== NOT EXECUTED 802ad94: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 802ad98: 37 8d 00 14 addi r13,sp,20 <== NOT EXECUTED 802ad9c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802ada0: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 802ada4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ada8: b9 a0 20 00 mv r4,r13 <== NOT EXECUTED 802adac: fb ff 72 f5 calli 8007980 <== NOT EXECUTED 802adb0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 802adb4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802adb8: 5c 20 00 14 bne r1,r0,802ae08 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 802adbc: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 802adc0: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 802adc4: 44 43 00 23 be r2,r3,802ae50 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 802adc8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802adcc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802add0: 34 03 00 48 mvi r3,72 <== NOT EXECUTED 802add4: f8 00 80 d7 calli 804b130 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 802add8: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 802addc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802ade0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802ade4: 28 63 00 18 lw r3,(r3+24) <== NOT EXECUTED 802ade8: d8 60 00 00 call r3 <== NOT EXECUTED 802adec: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 802adf0: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802adf4: 44 20 00 05 be r1,r0,802ae08 <== NOT EXECUTED 802adf8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802adfc: 44 40 00 03 be r2,r0,802ae08 <== NOT EXECUTED 802ae00: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802ae04: d8 40 00 00 call r2 <== NOT EXECUTED return status; } 802ae08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ae0c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802ae10: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802ae14: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802ae18: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802ae1c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802ae20: c3 a0 00 00 ret <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 802ae24: f8 00 71 57 calli 8047380 <__errno> <== NOT EXECUTED 802ae28: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 802ae2c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802ae30: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 802ae34: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ae38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802ae3c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802ae40: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802ae44: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802ae48: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802ae4c: c3 a0 00 00 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 802ae50: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802ae54: 44 22 00 05 be r1,r2,802ae68 <== NOT EXECUTED 802ae58: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 802ae5c: 44 62 00 03 be r3,r2,802ae68 <== NOT EXECUTED 802ae60: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802ae64: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802ae68: f8 00 71 46 calli 8047380 <__errno> <== NOT EXECUTED 802ae6c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802ae70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802ae74: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802ae78: e3 ff ff e4 bi 802ae08 <== NOT EXECUTED 08007ee8 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8007ee8: 37 9c ff f0 addi sp,sp,-16 8007eec: 5b 8b 00 10 sw (sp+16),r11 8007ef0: 5b 8c 00 0c sw (sp+12),r12 8007ef4: 5b 8d 00 08 sw (sp+8),r13 8007ef8: 5b 9d 00 04 sw (sp+4),ra 8007efc: 78 03 08 01 mvhi r3,0x801 8007f00: 38 63 c6 a8 ori r3,r3,0xc6a8 8007f04: 28 62 00 04 lw r2,(r3+4) 8007f08: b8 20 60 00 mv r12,r1 8007f0c: 34 41 00 01 addi r1,r2,1 8007f10: 58 61 00 04 sw (r3+4),r1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8007f14: fb ff ff e7 calli 8007eb0 /* * Validate the parameters */ if ( !size ) 8007f18: 45 80 00 29 be r12,r0,8007fbc return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8007f1c: 78 01 08 01 mvhi r1,0x801 8007f20: 38 21 c9 c0 ori r1,r1,0xc9c0 8007f24: 28 22 00 00 lw r2,(r1+0) 8007f28: 34 01 00 03 mvi r1,3 8007f2c: 44 41 00 22 be r2,r1,8007fb4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8007f30: 78 01 08 01 mvhi r1,0x801 8007f34: 38 21 c0 1c ori r1,r1,0xc01c 8007f38: 28 21 00 00 lw r1,(r1+0) 8007f3c: 34 03 00 00 mvi r3,0 8007f40: b9 80 10 00 mv r2,r12 8007f44: b8 60 20 00 mv r4,r3 8007f48: f8 00 05 11 calli 800938c <_Protected_heap_Allocate_aligned_with_boundary> 8007f4c: b8 20 58 00 mv r11,r1 if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 8007f50: b8 20 68 00 mv r13,r1 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 8007f54: 44 20 00 22 be r1,r0,8007fdc } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8007f58: 78 01 08 01 mvhi r1,0x801 8007f5c: 38 21 c6 18 ori r1,r1,0xc618 8007f60: 28 21 00 00 lw r1,(r1+0) 8007f64: 44 20 00 05 be r1,r0,8007f78 (*rtems_malloc_dirty_helper)( return_this, size ); 8007f68: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8007f6c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8007f70: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007f74: d8 60 00 00 call r3 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8007f78: 78 01 08 01 mvhi r1,0x801 8007f7c: 38 21 c6 10 ori r1,r1,0xc610 8007f80: 28 21 00 00 lw r1,(r1+0) 8007f84: b9 a0 58 00 mv r11,r13 8007f88: 44 20 00 04 be r1,r0,8007f98 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8007f8c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007f90: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007f94: d8 40 00 00 call r2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8007f98: b9 60 08 00 mv r1,r11 8007f9c: 2b 9d 00 04 lw ra,(sp+4) 8007fa0: 2b 8b 00 10 lw r11,(sp+16) 8007fa4: 2b 8c 00 0c lw r12,(sp+12) 8007fa8: 2b 8d 00 08 lw r13,(sp+8) 8007fac: 37 9c 00 10 addi sp,sp,16 8007fb0: c3 a0 00 00 ret return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8007fb4: fb ff ff a4 calli 8007e44 8007fb8: 5c 20 ff de bne r1,r0,8007f30 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8007fbc: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8007fc0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007fc4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007fc8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8007fcc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8007fd0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8007fd4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8007fd8: c3 a0 00 00 ret <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 8007fdc: 78 01 08 01 mvhi r1,0x801 8007fe0: 38 21 c6 14 ori r1,r1,0xc614 8007fe4: 28 21 00 00 lw r1,(r1+0) 8007fe8: 44 2b 00 06 be r1,r11,8008000 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8007fec: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007ff0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007ff4: d8 40 00 00 call r2 <== NOT EXECUTED 8007ff8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( !return_this ) { 8007ffc: 5c 20 ff d7 bne r1,r0,8007f58 <== NOT EXECUTED errno = ENOMEM; 8008000: f8 00 0e f0 calli 800bbc0 <__errno> 8008004: 34 02 00 0c mvi r2,12 8008008: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 800800c: e3 ff ff e3 bi 8007f98 08007e8c : } void malloc_deferred_free( void *pointer ) { 8007e8c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007e90: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8007e94: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8007e98: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007e9c: 38 21 ca 18 ori r1,r1,0xca18 <== NOT EXECUTED 8007ea0: fb ff eb ac calli 8002d50 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 8007ea4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007ea8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007eac: c3 a0 00 00 ret <== NOT EXECUTED 08007eb0 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8007eb0: 37 9c ff f8 addi sp,sp,-8 8007eb4: 5b 8b 00 08 sw (sp+8),r11 8007eb8: 5b 9d 00 04 sw (sp+4),ra */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8007ebc: 78 0b 08 01 mvhi r11,0x801 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) 8007ec0: e0 00 00 02 bi 8007ec8 free(to_be_freed); 8007ec4: fb ff fe 51 calli 8007808 <== NOT EXECUTED 8007ec8: b9 60 08 00 mv r1,r11 8007ecc: 38 21 ca 18 ori r1,r1,0xca18 8007ed0: f8 00 02 b5 calli 80089a4 <_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) 8007ed4: 5c 20 ff fc bne r1,r0,8007ec4 free(to_be_freed); } 8007ed8: 2b 9d 00 04 lw ra,(sp+4) 8007edc: 2b 8b 00 08 lw r11,(sp+8) 8007ee0: 37 9c 00 08 addi sp,sp,8 8007ee4: c3 a0 00 00 ret 08010ba0 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 8010ba0: 37 9c ff f8 addi sp,sp,-8 8010ba4: 5b 8b 00 08 sw (sp+8),r11 8010ba8: 5b 9d 00 04 sw (sp+4),ra 8010bac: b8 20 58 00 mv r11,r1 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 8010bb0: fb ff f4 53 calli 800dcfc 8010bb4: 5c 20 00 0f bne r1,r0,8010bf0 8010bb8: 2d 62 00 34 lhu r2,(r11+52) 8010bbc: 5c 41 00 0d bne r2,r1,8010bf0 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 8010bc0: 78 01 08 02 mvhi r1,0x802 8010bc4: 38 21 40 f8 ori r1,r1,0x40f8 8010bc8: 28 21 00 00 lw r1,(r1+0) 8010bcc: 28 23 00 04 lw r3,(r1+4) 8010bd0: 44 6b 00 0d be r3,r11,8010c04 rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 8010bd4: 29 62 00 4c lw r2,(r11+76) 8010bd8: 34 01 00 06 mvi r1,6 8010bdc: 44 41 00 03 be r2,r1,8010be8 IMFS_memfile_remove( the_jnode ); 8010be0: b9 60 08 00 mv r1,r11 8010be4: fb ff ff 67 calli 8010980 free( the_jnode ); 8010be8: b9 60 08 00 mv r1,r11 8010bec: fb ff c7 f3 calli 8002bb8 } return 0; } 8010bf0: 34 01 00 00 mvi r1,0 8010bf4: 2b 9d 00 04 lw ra,(sp+4) 8010bf8: 2b 8b 00 08 lw r11,(sp+8) 8010bfc: 37 9c 00 08 addi sp,sp,8 8010c00: c3 a0 00 00 ret /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 8010c04: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8010c08: e3 ff ff f3 bi 8010bd4 <== NOT EXECUTED 08010880 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 8010880: 37 9c ff e8 addi sp,sp,-24 8010884: 5b 8b 00 18 sw (sp+24),r11 8010888: 5b 8c 00 14 sw (sp+20),r12 801088c: 5b 8d 00 10 sw (sp+16),r13 8010890: 5b 8e 00 0c sw (sp+12),r14 8010894: 5b 8f 00 08 sw (sp+8),r15 8010898: 5b 9d 00 04 sw (sp+4),ra 801089c: b8 20 78 00 mv r15,r1 80108a0: b8 40 68 00 mv r13,r2 /* * Perform internal consistency checks */ assert( block_table ); 80108a4: 44 20 00 19 be r1,r0,8010908 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 80108a8: 28 21 00 00 lw r1,(r1+0) for ( i=0 ; i 80108b0: 34 0c 00 00 mvi r12,0 80108b4: b8 20 58 00 mv r11,r1 if ( b[i] ) { 80108b8: b9 80 70 00 mv r14,r12 80108bc: 29 61 00 00 lw r1,(r11+0) 80108c0: 44 20 00 03 be r1,r0,80108cc memfile_free_block( b[i] ); 80108c4: fb ff ff 27 calli 8010560 b[i] = 0; 80108c8: 59 6e 00 00 sw (r11+0),r14 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 80108d8: 29 e1 00 00 lw r1,(r15+0) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 80108dc: fb ff ff 21 calli 8010560 *block_table = 0; 80108e0: 34 01 00 00 mvi r1,0 80108e4: 59 e1 00 00 sw (r15+0),r1 } 80108e8: 2b 9d 00 04 lw ra,(sp+4) 80108ec: 2b 8b 00 18 lw r11,(sp+24) 80108f0: 2b 8c 00 14 lw r12,(sp+20) 80108f4: 2b 8d 00 10 lw r13,(sp+16) 80108f8: 2b 8e 00 0c lw r14,(sp+12) 80108fc: 2b 8f 00 08 lw r15,(sp+8) 8010900: 37 9c 00 18 addi sp,sp,24 8010904: c3 a0 00 00 ret /* * Perform internal consistency checks */ assert( block_table ); 8010908: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801090c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010910: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010914: 38 21 2d 14 ori r1,r1,0x2d14 <== NOT EXECUTED 8010918: 38 63 2e 5c ori r3,r3,0x2e5c <== NOT EXECUTED 801091c: 38 84 2d 8c ori r4,r4,0x2d8c <== NOT EXECUTED 8010920: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED 8010924: fb ff f4 3e calli 800da1c <__assert_func> <== NOT EXECUTED 08010f04 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 8010f04: 37 9c ff f0 addi sp,sp,-16 8010f08: 5b 8b 00 08 sw (sp+8),r11 8010f0c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010f10: 28 2b 00 3c lw r11,(r1+60) * 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 ) 8010f14: 29 64 00 50 lw r4,(r11+80) 8010f18: 48 44 00 10 bg r2,r4,8010f58 8010f1c: 44 82 00 16 be r4,r2,8010f74 * 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; 8010f20: 59 62 00 50 sw (r11+80),r2 8010f24: 59 63 00 54 sw (r11+84),r3 iop->size = the_jnode->info.file.size; 8010f28: 58 23 00 0c sw (r1+12),r3 8010f2c: 58 22 00 08 sw (r1+8),r2 IMFS_update_atime( the_jnode ); 8010f30: 37 81 00 0c addi r1,sp,12 8010f34: 34 02 00 00 mvi r2,0 8010f38: fb ff c7 4e calli 8002c70 8010f3c: 2b 81 00 0c lw r1,(sp+12) 8010f40: 59 61 00 40 sw (r11+64),r1 8010f44: 34 01 00 00 mvi r1,0 return 0; } 8010f48: 2b 9d 00 04 lw ra,(sp+4) 8010f4c: 2b 8b 00 08 lw r11,(sp+8) 8010f50: 37 9c 00 10 addi sp,sp,16 8010f54: c3 a0 00 00 ret * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 8010f58: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010f5c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010f60: fb ff ff 7d calli 8010d54 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 8010f64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8010f68: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8010f6c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8010f70: c3 a0 00 00 ret <== NOT EXECUTED * 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 ) 8010f74: 29 64 00 54 lw r4,(r11+84) 8010f78: 54 64 ff f8 bgu r3,r4,8010f58 8010f7c: e3 ff ff e9 bi 8010f20 08010f80 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8010f80: 37 9c ff f4 addi sp,sp,-12 8010f84: 5b 8b 00 0c sw (sp+12),r11 8010f88: 5b 8c 00 08 sw (sp+8),r12 8010f8c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010f90: 28 2c 00 3c lw r12,(r1+60) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8010f94: b8 20 58 00 mv r11,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 8010f98: 34 01 00 06 mvi r1,6 8010f9c: 29 82 00 4c lw r2,(r12+76) 8010fa0: 44 41 00 11 be r2,r1,8010fe4 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 8010fa4: 29 62 00 14 lw r2,(r11+20) 8010fa8: b9 80 08 00 mv r1,r12 8010fac: fb ff ff 6a calli 8010d54 8010fb0: 5c 20 00 25 bne r1,r0,8011044 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 8010fb4: 29 81 00 50 lw r1,(r12+80) 8010fb8: 29 62 00 14 lw r2,(r11+20) 8010fbc: 29 63 00 10 lw r3,(r11+16) 8010fc0: 59 61 00 08 sw (r11+8),r1 8010fc4: 29 8c 00 54 lw r12,(r12+84) 8010fc8: 59 6c 00 0c sw (r11+12),r12 } return iop->offset; } 8010fcc: b8 60 08 00 mv r1,r3 8010fd0: 2b 9d 00 04 lw ra,(sp+4) 8010fd4: 2b 8b 00 0c lw r11,(sp+12) 8010fd8: 2b 8c 00 08 lw r12,(sp+8) 8010fdc: 37 9c 00 0c addi sp,sp,12 8010fe0: c3 a0 00 00 ret IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 8010fe4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8010fe8: 29 83 00 50 lw r3,(r12+80) <== NOT EXECUTED 8010fec: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED 8010ff0: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED 8010ff4: 48 23 00 0a bg r1,r3,801101c <== NOT EXECUTED 8010ff8: 44 23 00 11 be r1,r3,801103c <== NOT EXECUTED 8010ffc: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8011000: b8 80 10 00 mv r2,r4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 8011004: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8011008: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801100c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8011010: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8011014: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8011018: c3 a0 00 00 ret <== NOT EXECUTED 801101c: b8 60 08 00 mv r1,r3 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; 8011020: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8011024: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 8011028: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801102c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8011030: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8011034: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8011038: c3 a0 00 00 ret <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 801103c: 54 82 ff f8 bgu r4,r2,801101c <== NOT EXECUTED 8011040: e3 ff ff ef bi 8010ffc <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 8011044: f8 00 05 87 calli 8012660 <__errno> <== NOT EXECUTED 8011048: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 801104c: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8011050: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011054: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8011058: e3 ff ff dd bi 8010fcc <== NOT EXECUTED 08011354 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8011354: 37 9c ff f4 addi sp,sp,-12 8011358: 5b 8b 00 0c sw (sp+12),r11 801135c: 5b 8c 00 08 sw (sp+8),r12 8011360: 5b 9d 00 04 sw (sp+4),ra the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 8011364: 28 23 00 18 lw r3,(r1+24) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8011368: b8 20 60 00 mv r12,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 801136c: 28 2b 00 3c lw r11,(r1+60) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 8011370: 34 02 00 00 mvi r2,0 8011374: 20 61 02 04 andi r1,r3,0x204 8011378: 44 22 00 04 be r1,r2,8011388 && (the_jnode->type == IMFS_LINEAR_FILE)) { 801137c: 29 64 00 4c lw r4,(r11+76) 8011380: 34 01 00 06 mvi r1,6 8011384: 44 81 00 12 be r4,r1,80113cc 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) 8011388: 29 61 00 50 lw r1,(r11+80) 801138c: 29 62 00 54 lw r2,(r11+84) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 8011390: 20 63 02 00 andi r3,r3,0x200 8011394: 5c 60 00 09 bne r3,r0,80113b8 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 8011398: 59 81 00 08 sw (r12+8),r1 801139c: 59 82 00 0c sw (r12+12),r2 80113a0: 34 01 00 00 mvi r1,0 return 0; } 80113a4: 2b 9d 00 04 lw ra,(sp+4) 80113a8: 2b 8b 00 0c lw r11,(sp+12) 80113ac: 2b 8c 00 08 lw r12,(sp+8) 80113b0: 37 9c 00 0c addi sp,sp,12 80113b4: c3 a0 00 00 ret if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 80113b8: 59 81 00 10 sw (r12+16),r1 80113bc: 59 82 00 14 sw (r12+20),r2 80113c0: 29 62 00 54 lw r2,(r11+84) 80113c4: 29 61 00 50 lw r1,(r11+80) 80113c8: e3 ff ff f4 bi 8011398 /* * 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; 80113cc: 29 61 00 54 lw r1,(r11+84) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 80113d0: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 80113d4: 59 63 00 4c sw (r11+76),r3 <== NOT EXECUTED the_jnode->info.file.size = 0; 80113d8: 59 62 00 50 sw (r11+80),r2 <== 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; 80113dc: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 80113e0: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 80113e4: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 80113e8: 59 62 00 60 sw (r11+96),r2 <== 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; 80113ec: 59 62 00 58 sw (r11+88),r2 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 80113f0: 5c 20 00 04 bne r1,r0,8011400 <== NOT EXECUTED 80113f4: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 80113f8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80113fc: e3 ff ff e5 bi 8011390 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 8011400: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8011404: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8011408: fb ff ff 15 calli 801105c <== NOT EXECUTED 801140c: b8 20 10 00 mv r2,r1 <== 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) 8011410: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8011414: 44 43 ff e4 be r2,r3,80113a4 <== NOT EXECUTED 8011418: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 801141c: e3 ff ff db bi 8011388 <== NOT EXECUTED 080011c4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80011c4: 37 9c ff d0 addi sp,sp,-48 80011c8: 5b 8b 00 18 sw (sp+24),r11 80011cc: 5b 8c 00 14 sw (sp+20),r12 80011d0: 5b 8d 00 10 sw (sp+16),r13 80011d4: 5b 8e 00 0c sw (sp+12),r14 80011d8: 5b 8f 00 08 sw (sp+8),r15 80011dc: 5b 9d 00 04 sw (sp+4),ra 80011e0: b8 40 68 00 mv r13,r2 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) ) ) 80011e4: 20 42 f0 00 andi r2,r2,0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80011e8: b8 60 78 00 mv r15,r3 80011ec: b8 80 70 00 mv r14,r4 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) ) ) 80011f0: 44 40 00 4d be r2,r0,8001324 rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 80011f4: 40 25 00 00 lbu r5,(r1+0) 80011f8: 64 a6 00 5c cmpei r6,r5,92 80011fc: 64 a2 00 2f cmpei r2,r5,47 8001200: b8 c2 30 00 or r6,r6,r2 8001204: 44 c0 00 32 be r6,r0,80012cc 8001208: 78 05 08 01 mvhi r5,0x801 800120c: 38 a5 c1 10 ori r5,r5,0xc110 8001210: 28 a5 00 00 lw r5,(r5+0) 8001214: 34 06 00 01 mvi r6,1 8001218: 28 a2 00 18 lw r2,(r5+24) 800121c: 5b 82 00 1c sw (sp+28),r2 8001220: 28 a3 00 1c lw r3,(r5+28) 8001224: 5b 83 00 20 sw (sp+32),r3 8001228: 28 a2 00 20 lw r2,(r5+32) 800122c: 5b 82 00 24 sw (sp+36),r2 8001230: 28 a3 00 24 lw r3,(r5+36) 8001234: 5b 83 00 28 sw (sp+40),r3 8001238: 28 a5 00 28 lw r5,(r5+40) if ( !temp_loc.ops->evalformake_h ) { 800123c: 2b 82 00 28 lw r2,(sp+40) int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 8001240: 5b 85 00 2c sw (sp+44),r5 if ( !temp_loc.ops->evalformake_h ) { 8001244: 28 45 00 04 lw r5,(r2+4) 8001248: 44 a0 00 32 be r5,r0,8001310 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 800124c: 37 8c 00 1c addi r12,sp,28 8001250: b4 26 08 00 add r1,r1,r6 8001254: b9 80 10 00 mv r2,r12 8001258: 37 83 00 30 addi r3,sp,48 800125c: d8 a0 00 00 call r5 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 8001260: 34 0b ff ff mvi r11,-1 8001264: 5c 20 00 11 bne r1,r0,80012a8 return -1; if ( !temp_loc.ops->mknod_h ) { 8001268: 2b 82 00 28 lw r2,(sp+40) 800126c: 28 46 00 14 lw r6,(r2+20) 8001270: 44 c1 00 32 be r6,r1,8001338 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 ); 8001274: 2b 81 00 30 lw r1,(sp+48) 8001278: b9 a0 10 00 mv r2,r13 800127c: b9 e0 18 00 mv r3,r15 8001280: b9 c0 20 00 mv r4,r14 8001284: b9 80 28 00 mv r5,r12 8001288: d8 c0 00 00 call r6 800128c: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 8001290: 2b 81 00 28 lw r1,(sp+40) 8001294: 44 20 00 05 be r1,r0,80012a8 8001298: 28 22 00 1c lw r2,(r1+28) 800129c: 44 40 00 03 be r2,r0,80012a8 80012a0: b9 80 08 00 mv r1,r12 80012a4: d8 40 00 00 call r2 return result; } 80012a8: b9 60 08 00 mv r1,r11 80012ac: 2b 9d 00 04 lw ra,(sp+4) 80012b0: 2b 8b 00 18 lw r11,(sp+24) 80012b4: 2b 8c 00 14 lw r12,(sp+20) 80012b8: 2b 8d 00 10 lw r13,(sp+16) 80012bc: 2b 8e 00 0c lw r14,(sp+12) 80012c0: 2b 8f 00 08 lw r15,(sp+8) 80012c4: 37 9c 00 30 addi sp,sp,48 80012c8: c3 a0 00 00 ret int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 80012cc: 44 a6 ff cf be r5,r6,8001208 80012d0: 78 02 08 01 mvhi r2,0x801 80012d4: 38 42 c1 10 ori r2,r2,0xc110 80012d8: 28 42 00 00 lw r2,(r2+0) 80012dc: 28 43 00 04 lw r3,(r2+4) 80012e0: 5b 83 00 1c sw (sp+28),r3 80012e4: 28 43 00 08 lw r3,(r2+8) 80012e8: 5b 83 00 20 sw (sp+32),r3 80012ec: 28 43 00 0c lw r3,(r2+12) 80012f0: 5b 83 00 24 sw (sp+36),r3 80012f4: 28 43 00 10 lw r3,(r2+16) 80012f8: 5b 83 00 28 sw (sp+40),r3 80012fc: 28 42 00 14 lw r2,(r2+20) 8001300: 5b 82 00 2c sw (sp+44),r2 if ( !temp_loc.ops->evalformake_h ) { 8001304: 2b 82 00 28 lw r2,(sp+40) 8001308: 28 45 00 04 lw r5,(r2+4) 800130c: 5c a0 ff d0 bne r5,r0,800124c if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 8001310: f8 00 2a 2c calli 800bbc0 <__errno> <== NOT EXECUTED 8001314: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8001318: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800131c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8001320: e3 ff ff e2 bi 80012a8 <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 8001324: f8 00 2a 27 calli 800bbc0 <__errno> <== NOT EXECUTED 8001328: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800132c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001330: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8001334: e3 ff ff dd bi 80012a8 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 8001338: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800133c: 44 46 ff f5 be r2,r6,8001310 <== NOT EXECUTED 8001340: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8001344: d8 40 00 00 call r2 <== NOT EXECUTED 8001348: e3 ff ff f2 bi 8001310 <== NOT EXECUTED 0800136c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 800136c: 37 9c ff cc addi sp,sp,-52 8001370: 5b 8b 00 20 sw (sp+32),r11 8001374: 5b 8c 00 1c sw (sp+28),r12 8001378: 5b 8d 00 18 sw (sp+24),r13 800137c: 5b 8e 00 14 sw (sp+20),r14 8001380: 5b 8f 00 10 sw (sp+16),r15 8001384: 5b 90 00 0c sw (sp+12),r16 8001388: 5b 91 00 08 sw (sp+8),r17 800138c: 5b 9d 00 04 sw (sp+4),ra 8001390: b8 40 70 00 mv r14,r2 8001394: b8 20 78 00 mv r15,r1 8001398: b8 60 80 00 mv r16,r3 800139c: b8 80 68 00 mv r13,r4 80013a0: b8 a0 60 00 mv r12,r5 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 80013a4: 44 40 00 03 be r2,r0,80013b0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 80013a8: 34 01 00 01 mvi r1,1 80013ac: 50 23 00 06 bgeu r1,r3,80013c4 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 80013b0: f8 00 2a 04 calli 800bbc0 <__errno> 80013b4: 34 02 00 16 mvi r2,22 80013b8: 58 22 00 00 sw (r1+0),r2 80013bc: 34 02 ff ff mvi r2,-1 return -1; 80013c0: e0 00 00 4e bi 80014f8 } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 80013c4: 28 4b 00 24 lw r11,(r2+36) 80013c8: 45 60 00 85 be r11,r0,80015dc /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 80013cc: 34 01 00 6c mvi r1,108 80013d0: 44 80 00 04 be r4,r0,80013e0 size += strlen( device ) + 1; 80013d4: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80013d8: f8 00 2e ca calli 800cf00 <== NOT EXECUTED 80013dc: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); 80013e0: f8 00 1a c2 calli 8007ee8 80013e4: b8 20 58 00 mv r11,r1 80013e8: b8 20 88 00 mv r17,r1 if ( !temp_mt_entry ) { 80013ec: 44 20 00 84 be r1,r0,80015fc errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 80013f0: 58 30 00 30 sw (r1+48),r16 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 80013f4: 59 61 00 2c sw (r11+44),r1 temp_mt_entry->options = options; if ( device ) { 80013f8: 45 a0 00 59 be r13,r0,800155c temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 80013fc: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 8001400: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8001404: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 8001408: 59 63 00 68 sw (r11+104),r3 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 800140c: f8 00 2e 9b calli 800ce78 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001410: 45 80 00 55 be r12,r0,8001564 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 8001414: b9 80 08 00 mv r1,r12 8001418: f8 00 2e ba calli 800cf00 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 800141c: 37 8d 00 24 addi r13,sp,36 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 8001420: b8 20 10 00 mv r2,r1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 8001424: 34 03 00 07 mvi r3,7 8001428: b9 80 08 00 mv r1,r12 800142c: b9 a0 20 00 mv r4,r13 8001430: 34 05 00 01 mvi r5,1 8001434: fb ff fe a6 calli 8000ecc 8001438: 34 02 ff ff mvi r2,-1 800143c: 44 22 00 6c be r1,r2,80015ec /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 8001440: 2b 81 00 30 lw r1,(sp+48) 8001444: 28 22 00 10 lw r2,(r1+16) 8001448: 44 40 00 37 be r2,r0,8001524 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 800144c: b9 a0 08 00 mv r1,r13 8001450: d8 40 00 00 call r2 8001454: 34 02 00 01 mvi r2,1 8001458: 5c 22 00 5d bne r1,r2,80015cc /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800145c: 78 06 08 01 mvhi r6,0x801 8001460: 38 c6 c6 d8 ori r6,r6,0xc6d8 8001464: 28 c3 00 00 lw r3,(r6+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8001468: 34 c6 00 04 addi r6,r6,4 800146c: 44 66 00 56 be r3,r6,80015c4 !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 ) 8001470: 2b 85 00 24 lw r5,(sp+36) 8001474: 28 61 00 1c lw r1,(r3+28) 8001478: 5c 25 00 04 bne r1,r5,8001488 800147c: e0 00 00 34 bi 800154c <== NOT EXECUTED 8001480: 28 67 00 1c lw r7,(r3+28) 8001484: 44 e5 00 32 be r7,r5,800154c * 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 ) { 8001488: 28 63 00 00 lw r3,(r3+0) /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800148c: 5c 66 ff fd bne r3,r6,8001480 * 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; 8001490: 2b 82 00 2c lw r2,(sp+44) temp_mt_entry->mt_point_node.ops = loc.ops; 8001494: 2b 81 00 30 lw r1,(sp+48) * 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; 8001498: 59 65 00 08 sw (r11+8),r5 temp_mt_entry->mt_point_node.handlers = loc.handlers; 800149c: 59 62 00 10 sw (r11+16),r2 temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 80014a0: 2b 82 00 34 lw r2,(sp+52) * 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; 80014a4: 59 61 00 14 sw (r11+20),r1 temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 80014a8: 59 62 00 18 sw (r11+24),r2 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 80014ac: 28 22 00 20 lw r2,(r1+32) 80014b0: 44 40 00 1d be r2,r0,8001524 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 80014b4: b9 60 08 00 mv r1,r11 80014b8: d8 40 00 00 call r2 80014bc: b9 a0 60 00 mv r12,r13 80014c0: 5c 20 00 1c bne r1,r0,8001530 temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 80014c4: 29 c2 00 24 lw r2,(r14+36) 80014c8: b9 60 08 00 mv r1,r11 80014cc: d8 40 00 00 call r2 80014d0: b8 20 68 00 mv r13,r1 80014d4: 5c 20 00 2c bne r1,r0,8001584 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 80014d8: 78 01 08 01 mvhi r1,0x801 80014dc: b9 60 10 00 mv r2,r11 80014e0: 38 21 c6 d8 ori r1,r1,0xc6d8 80014e4: f8 00 06 1b calli 8002d50 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 80014e8: b9 e0 10 00 mv r2,r15 80014ec: 45 ed 00 03 be r15,r13,80014f8 *mt_entry = temp_mt_entry; 80014f0: 59 eb 00 00 sw (r15+0),r11 80014f4: b9 a0 10 00 mv r2,r13 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 80014f8: b8 40 08 00 mv r1,r2 80014fc: 2b 9d 00 04 lw ra,(sp+4) 8001500: 2b 8b 00 20 lw r11,(sp+32) 8001504: 2b 8c 00 1c lw r12,(sp+28) 8001508: 2b 8d 00 18 lw r13,(sp+24) 800150c: 2b 8e 00 14 lw r14,(sp+20) 8001510: 2b 8f 00 10 lw r15,(sp+16) 8001514: 2b 90 00 0c lw r16,(sp+12) 8001518: 2b 91 00 08 lw r17,(sp+8) 800151c: 37 9c 00 34 addi sp,sp,52 8001520: c3 a0 00 00 ret * 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; 8001524: f8 00 29 a7 calli 800bbc0 <__errno> <== NOT EXECUTED 8001528: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800152c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8001530: b9 60 08 00 mv r1,r11 8001534: f8 00 18 b5 calli 8007808 8001538: b9 a0 60 00 mv r12,r13 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 800153c: 29 81 00 0c lw r1,(r12+12) 8001540: 5c 20 00 1b bne r1,r0,80015ac 8001544: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8001548: e3 ff ff ec bi 80014f8 <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 800154c: f8 00 29 9d calli 800bbc0 <__errno> 8001550: 34 02 00 10 mvi r2,16 8001554: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 8001558: e3 ff ff f6 bi 8001530 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; 800155c: 58 2d 00 68 sw (r1+104),r13 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001560: 5d 80 ff ad bne r12,r0,8001414 * 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; 8001564: 59 6c 00 1c sw (r11+28),r12 temp_mt_entry->mt_fs_root.handlers = NULL; 8001568: 59 6c 00 24 sw (r11+36),r12 temp_mt_entry->mt_fs_root.ops = NULL; 800156c: 59 6c 00 28 sw (r11+40),r12 temp_mt_entry->mt_point_node.node_access = NULL; 8001570: 59 6c 00 08 sw (r11+8),r12 temp_mt_entry->mt_point_node.handlers = NULL; 8001574: 59 6c 00 10 sw (r11+16),r12 temp_mt_entry->mt_point_node.ops = NULL; 8001578: 59 6c 00 14 sw (r11+20),r12 temp_mt_entry->mt_point_node.mt_entry = NULL; 800157c: 59 6c 00 18 sw (r11+24),r12 8001580: e3 ff ff d1 bi 80014c4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 8001584: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED 8001588: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 800158c: 44 40 00 03 be r2,r0,8001598 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 8001590: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001594: d8 40 00 00 call r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8001598: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800159c: f8 00 18 9b calli 8007808 <== NOT EXECUTED if ( loc_to_free ) 80015a0: 5d 80 ff e7 bne r12,r0,800153c <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 80015a4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80015a8: e3 ff ff d4 bi 80014f8 <== NOT EXECUTED 80015ac: 28 22 00 1c lw r2,(r1+28) 80015b0: 44 40 ff e5 be r2,r0,8001544 80015b4: b9 80 08 00 mv r1,r12 80015b8: d8 40 00 00 call r2 80015bc: 34 02 ff ff mvi r2,-1 80015c0: e3 ff ff ce bi 80014f8 80015c4: 2b 85 00 24 lw r5,(sp+36) <== NOT EXECUTED 80015c8: e3 ff ff b2 bi 8001490 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 80015cc: f8 00 29 7d calli 800bbc0 <__errno> 80015d0: 34 02 00 14 mvi r2,20 80015d4: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 80015d8: e3 ff ff d6 bi 8001530 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 80015dc: f8 00 29 79 calli 800bbc0 <__errno> <== NOT EXECUTED 80015e0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80015e4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80015e8: b9 60 88 00 mv r17,r11 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 80015ec: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 80015f0: f8 00 18 86 calli 8007808 <== NOT EXECUTED 80015f4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80015f8: e3 ff ff c0 bi 80014f8 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 80015fc: f8 00 29 71 calli 800bbc0 <__errno> <== NOT EXECUTED 8001600: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8001604: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001608: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED return -1; 800160c: e3 ff ff bb bi 80014f8 <== NOT EXECUTED 080016bc : */ int newlib_free_buffers( FILE *fp ) { 80016bc: 37 9c ff f4 addi sp,sp,-12 80016c0: 5b 8b 00 0c sw (sp+12),r11 80016c4: 5b 8c 00 08 sw (sp+8),r12 80016c8: 5b 9d 00 04 sw (sp+4),ra 80016cc: b8 20 58 00 mv r11,r1 switch ( fileno(fp) ) { 80016d0: f8 00 2a 60 calli 800c050 80016d4: 34 02 00 02 mvi r2,2 80016d8: 54 22 00 0b bgu r1,r2,8001704 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 80016dc: 2d 61 00 0c lhu r1,(r11+12) 80016e0: 34 0c 00 00 mvi r12,0 80016e4: 20 21 00 80 andi r1,r1,0x80 80016e8: 5c 2c 00 0f bne r1,r12,8001724 break; default: fclose(fp); } return 0; } 80016ec: 34 01 00 00 mvi r1,0 80016f0: 2b 9d 00 04 lw ra,(sp+4) 80016f4: 2b 8b 00 0c lw r11,(sp+12) 80016f8: 2b 8c 00 08 lw r12,(sp+8) 80016fc: 37 9c 00 0c addi sp,sp,12 8001700: c3 a0 00 00 ret fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 8001704: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001708: f8 00 29 90 calli 800bd48 <== NOT EXECUTED } return 0; } 800170c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001710: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001714: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8001718: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800171c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8001720: c3 a0 00 00 ret <== NOT EXECUTED switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); 8001724: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8001728: f8 00 18 38 calli 8007808 <== NOT EXECUTED fp->_flags &= ~__SMBF; 800172c: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 8001730: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED 8001734: 59 6c 00 00 sw (r11+0),r12 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 8001738: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED 800173c: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED break; default: fclose(fp); } return 0; } 8001740: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001744: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001748: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800174c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8001750: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8001754: c3 a0 00 00 ret <== NOT EXECUTED 08001844 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 8001844: 37 9c ff f4 addi sp,sp,-12 8001848: 5b 8b 00 0c sw (sp+12),r11 800184c: 5b 8c 00 08 sw (sp+8),r12 8001850: 5b 9d 00 04 sw (sp+4),ra rtems_device_driver status; if ( !initialized ) { 8001854: 78 04 08 02 mvhi r4,0x802 8001858: 38 84 16 a4 ori r4,r4,0x16a4 800185c: 40 8b 00 00 lbu r11,(r4+0) rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 8001860: b8 20 60 00 mv r12,r1 rtems_device_driver status; if ( !initialized ) { 8001864: 45 60 00 07 be r11,r0,8001880 NULL_major = major; } return RTEMS_SUCCESSFUL; } 8001868: 34 01 00 00 mvi r1,0 800186c: 2b 9d 00 04 lw ra,(sp+4) 8001870: 2b 8b 00 0c lw r11,(sp+12) 8001874: 2b 8c 00 08 lw r12,(sp+8) 8001878: 37 9c 00 0c addi sp,sp,12 800187c: c3 a0 00 00 ret rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 8001880: 78 01 08 01 mvhi r1,0x801 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001884: 34 05 00 01 mvi r5,1 status = rtems_io_register_name( 8001888: 38 21 f0 0c ori r1,r1,0xf00c 800188c: b9 80 10 00 mv r2,r12 8001890: b9 60 18 00 mv r3,r11 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001894: 30 85 00 00 sb (r4+0),r5 status = rtems_io_register_name( 8001898: f8 00 00 56 calli 80019f0 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 800189c: 5c 2b 00 0a bne r1,r11,80018c4 rtems_fatal_error_occurred(status); NULL_major = major; 80018a0: 78 03 08 02 mvhi r3,0x802 80018a4: 38 63 17 48 ori r3,r3,0x1748 } return RTEMS_SUCCESSFUL; } 80018a8: 34 01 00 00 mvi r1,0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; 80018ac: 58 6c 00 00 sw (r3+0),r12 } return RTEMS_SUCCESSFUL; } 80018b0: 2b 9d 00 04 lw ra,(sp+4) 80018b4: 2b 8b 00 0c lw r11,(sp+12) 80018b8: 2b 8c 00 08 lw r12,(sp+8) 80018bc: 37 9c 00 0c addi sp,sp,12 80018c0: c3 a0 00 00 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 80018c4: f8 00 08 8f calli 8003b00 <== NOT EXECUTED 08001828 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 8001828: 44 60 00 03 be r3,r0,8001834 rw_args->bytes_moved = rw_args->count; 800182c: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED 8001830: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED return NULL_SUCCESSFUL; } 8001834: 34 01 00 00 mvi r1,0 8001838: c3 a0 00 00 ret 080019c0 : int open( const char *pathname, int flags, ... ) { 80019c0: 37 9c ff ac addi sp,sp,-84 80019c4: 5b 8b 00 24 sw (sp+36),r11 80019c8: 5b 8c 00 20 sw (sp+32),r12 80019cc: 5b 8d 00 1c sw (sp+28),r13 80019d0: 5b 8e 00 18 sw (sp+24),r14 80019d4: 5b 8f 00 14 sw (sp+20),r15 80019d8: 5b 90 00 10 sw (sp+16),r16 80019dc: 5b 91 00 0c sw (sp+12),r17 80019e0: 5b 92 00 08 sw (sp+8),r18 80019e4: 5b 9d 00 04 sw (sp+4),ra /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 80019e8: 34 49 00 01 addi r9,r2,1 int open( const char *pathname, int flags, ... ) { 80019ec: b8 40 60 00 mv r12,r2 80019f0: 5b 82 00 3c sw (sp+60),r2 80019f4: 5b 83 00 40 sw (sp+64),r3 80019f8: 5b 84 00 44 sw (sp+68),r4 80019fc: 5b 85 00 48 sw (sp+72),r5 8001a00: 5b 86 00 4c sw (sp+76),r6 8001a04: 5b 87 00 50 sw (sp+80),r7 8001a08: 5b 88 00 54 sw (sp+84),r8 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001a0c: 21 22 00 01 andi r2,r9,0x1 int open( const char *pathname, int flags, ... ) { 8001a10: b8 20 78 00 mv r15,r1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001a14: 34 0d 00 04 mvi r13,4 8001a18: 5c 40 00 02 bne r2,r0,8001a20 8001a1c: b8 40 68 00 mv r13,r2 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 8001a20: 21 29 00 02 andi r9,r9,0x2 8001a24: 45 20 00 02 be r9,r0,8001a2c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 8001a28: 39 ad 00 02 ori r13,r13,0x2 va_start(ap, flags); mode = va_arg( ap, int ); 8001a2c: 2b 91 00 40 lw r17,(sp+64) * 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(); 8001a30: f8 00 18 b7 calli 8007d0c 8001a34: b8 20 58 00 mv r11,r1 if ( iop == 0 ) { 8001a38: 34 0e 00 17 mvi r14,23 8001a3c: 44 20 00 53 be r1,r0,8001b88 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 8001a40: b9 e0 08 00 mv r1,r15 8001a44: f8 00 2d 2f calli 800cf00 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 8001a48: 37 90 00 28 addi r16,sp,40 8001a4c: b8 20 10 00 mv r2,r1 8001a50: b9 a0 18 00 mv r3,r13 8001a54: b9 e0 08 00 mv r1,r15 8001a58: ba 00 20 00 mv r4,r16 8001a5c: 34 05 00 01 mvi r5,1 8001a60: fb ff fd 1b calli 8000ecc pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 8001a64: 34 02 ff ff mvi r2,-1 8001a68: 44 22 00 4f be r1,r2,8001ba4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 8001a6c: 21 82 0a 00 andi r2,r12,0xa00 8001a70: 34 01 0a 00 mvi r1,2560 8001a74: ba 00 68 00 mv r13,r16 8001a78: 34 0e 00 11 mvi r14,17 8001a7c: 44 41 00 39 be r2,r1,8001b60 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 8001a80: 2b 81 00 30 lw r1,(sp+48) iop->file_info = loc.node_access; 8001a84: 2b 82 00 28 lw r2,(sp+40) iop->flags |= rtems_libio_fcntl_flags( flags ); 8001a88: 29 6d 00 18 lw r13,(r11+24) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 8001a8c: 59 61 00 40 sw (r11+64),r1 iop->file_info = loc.node_access; 8001a90: 59 62 00 3c sw (r11+60),r2 iop->flags |= rtems_libio_fcntl_flags( flags ); 8001a94: b9 80 08 00 mv r1,r12 8001a98: f8 00 18 d6 calli 8007df0 iop->pathinfo = loc; 8001a9c: 2b 83 00 28 lw r3,(sp+40) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 8001aa0: b8 2d 08 00 or r1,r1,r13 8001aa4: 59 61 00 18 sw (r11+24),r1 iop->pathinfo = loc; 8001aa8: 59 63 00 1c sw (r11+28),r3 8001aac: 2b 83 00 2c lw r3,(sp+44) if ( !iop->handlers || !iop->handlers->open_h ) { 8001ab0: 29 62 00 40 lw r2,(r11+64) */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 8001ab4: 59 63 00 20 sw (r11+32),r3 8001ab8: 2b 81 00 30 lw r1,(sp+48) 8001abc: 59 61 00 24 sw (r11+36),r1 8001ac0: 2b 83 00 34 lw r3,(sp+52) 8001ac4: 59 63 00 28 sw (r11+40),r3 8001ac8: 2b 81 00 38 lw r1,(sp+56) 8001acc: 59 61 00 2c sw (r11+44),r1 if ( !iop->handlers || !iop->handlers->open_h ) { 8001ad0: 44 40 00 32 be r2,r0,8001b98 8001ad4: 28 45 00 00 lw r5,(r2+0) 8001ad8: 44 a0 00 30 be r5,r0,8001b98 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 8001adc: b9 e0 10 00 mv r2,r15 8001ae0: ba 20 20 00 mv r4,r17 8001ae4: b9 60 08 00 mv r1,r11 8001ae8: b9 80 18 00 mv r3,r12 8001aec: d8 a0 00 00 call r5 8001af0: b8 20 68 00 mv r13,r1 if ( rc ) { 8001af4: 5c 20 00 17 bne r1,r0,8001b50 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 8001af8: 21 8c 04 00 andi r12,r12,0x400 8001afc: 5d 81 00 33 bne r12,r1,8001bc8 8001b00: 78 0c 08 01 mvhi r12,0x801 8001b04: 39 8c c6 9c ori r12,r12,0xc69c if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 8001b08: 29 81 00 00 lw r1,(r12+0) 8001b0c: 34 02 00 03 mvi r2,3 8001b10: c9 61 08 00 sub r1,r11,r1 8001b14: fb ff fa 07 calli 8000330 <__ashrsi3> 8001b18: 78 02 38 e3 mvhi r2,0x38e3 8001b1c: 38 42 8e 39 ori r2,r2,0x8e39 8001b20: f8 00 60 0d calli 8019b54 <__mulsi3> } 8001b24: 2b 9d 00 04 lw ra,(sp+4) 8001b28: 2b 8b 00 24 lw r11,(sp+36) 8001b2c: 2b 8c 00 20 lw r12,(sp+32) 8001b30: 2b 8d 00 1c lw r13,(sp+28) 8001b34: 2b 8e 00 18 lw r14,(sp+24) 8001b38: 2b 8f 00 14 lw r15,(sp+20) 8001b3c: 2b 90 00 10 lw r16,(sp+16) 8001b40: 2b 91 00 0c lw r17,(sp+12) 8001b44: 2b 92 00 08 lw r18,(sp+8) 8001b48: 37 9c 00 54 addi sp,sp,84 8001b4c: c3 a0 00 00 ret goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 8001b50: f8 00 28 1c calli 800bbc0 <__errno> 8001b54: 28 2e 00 00 lw r14,(r1+0) 8001b58: ba 00 68 00 mv r13,r16 */ done: va_end(ap); if ( rc ) { 8001b5c: 45 c0 ff e9 be r14,r0,8001b00 if ( iop ) 8001b60: 45 60 00 03 be r11,r0,8001b6c rtems_libio_free( iop ); 8001b64: b9 60 08 00 mv r1,r11 8001b68: f8 00 18 4b calli 8007c94 if ( loc_to_free ) 8001b6c: 45 a0 00 07 be r13,r0,8001b88 rtems_filesystem_freenode( loc_to_free ); 8001b70: 29 a1 00 0c lw r1,(r13+12) 8001b74: 44 20 00 05 be r1,r0,8001b88 8001b78: 28 22 00 1c lw r2,(r1+28) 8001b7c: 44 40 00 03 be r2,r0,8001b88 8001b80: b9 a0 08 00 mv r1,r13 8001b84: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( rc ); 8001b88: f8 00 28 0e calli 800bbc0 <__errno> 8001b8c: 58 2e 00 00 sw (r1+0),r14 8001b90: 34 01 ff ff mvi r1,-1 8001b94: e3 ff ff e4 bi 8001b24 } return iop - rtems_libio_iops; 8001b98: ba 00 68 00 mv r13,r16 <== NOT EXECUTED 8001b9c: 34 0e 00 86 mvi r14,134 <== NOT EXECUTED 8001ba0: e3 ff ff f0 bi 8001b60 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 8001ba4: f8 00 28 07 calli 800bbc0 <__errno> 8001ba8: 28 2e 00 00 lw r14,(r1+0) 8001bac: 34 01 00 02 mvi r1,2 8001bb0: 45 c1 00 22 be r14,r1,8001c38 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 8001bb4: f8 00 28 03 calli 800bbc0 <__errno> 8001bb8: 28 2e 00 00 lw r14,(r1+0) 8001bbc: 34 0d 00 00 mvi r13,0 */ done: va_end(ap); if ( rc ) { 8001bc0: 45 c0 ff d0 be r14,r0,8001b00 8001bc4: e3 ff ff e7 bi 8001b60 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 8001bc8: 78 0c 08 01 mvhi r12,0x801 8001bcc: 39 8c c6 9c ori r12,r12,0xc69c 8001bd0: 29 81 00 00 lw r1,(r12+0) 8001bd4: 34 02 00 03 mvi r2,3 8001bd8: c9 61 08 00 sub r1,r11,r1 8001bdc: fb ff f9 d5 calli 8000330 <__ashrsi3> 8001be0: 78 02 38 e3 mvhi r2,0x38e3 8001be4: 38 42 8e 39 ori r2,r2,0x8e39 8001be8: f8 00 5f db calli 8019b54 <__mulsi3> 8001bec: b9 a0 10 00 mv r2,r13 8001bf0: f8 00 17 34 calli 80078c0 8001bf4: b8 20 70 00 mv r14,r1 if ( rc ) { 8001bf8: 44 20 ff c4 be r1,r0,8001b08 if(errno) rc = errno; 8001bfc: f8 00 27 f1 calli 800bbc0 <__errno> <== NOT EXECUTED 8001c00: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001c04: 5c 20 00 23 bne r1,r0,8001c90 <== NOT EXECUTED close( iop - rtems_libio_iops ); 8001c08: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8001c0c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8001c10: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED 8001c14: fb ff f9 c7 calli 8000330 <__ashrsi3> <== NOT EXECUTED 8001c18: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED 8001c1c: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED 8001c20: f8 00 5f cd calli 8019b54 <__mulsi3> <== NOT EXECUTED 8001c24: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8001c28: f8 00 16 c0 calli 8007728 <== NOT EXECUTED 8001c2c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 8001c30: 45 c0 ff b4 be r14,r0,8001b00 <== NOT EXECUTED 8001c34: e3 ff ff cb bi 8001b60 <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 8001c38: 21 81 02 00 andi r1,r12,0x200 8001c3c: b8 20 68 00 mv r13,r1 8001c40: 44 20 ff c8 be r1,r0,8001b60 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 8001c44: 34 03 00 00 mvi r3,0 8001c48: b9 e0 08 00 mv r1,r15 8001c4c: 3a 22 80 00 ori r2,r17,0x8000 8001c50: b8 60 20 00 mv r4,r3 8001c54: fb ff fd 5c calli 80011c4 8001c58: b8 20 90 00 mv r18,r1 if ( rc ) { 8001c5c: 5c 20 ff d6 bne r1,r0,8001bb4 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 8001c60: b9 e0 08 00 mv r1,r15 8001c64: f8 00 2c a7 calli 800cf00 8001c68: b8 20 10 00 mv r2,r1 8001c6c: ba 40 18 00 mv r3,r18 8001c70: b9 e0 08 00 mv r1,r15 8001c74: ba 00 20 00 mv r4,r16 8001c78: 34 05 00 01 mvi r5,1 8001c7c: fb ff fc 94 calli 8000ecc if ( status != 0 ) { /* The file did not exist */ 8001c80: ba 40 68 00 mv r13,r18 8001c84: 34 0e 00 0d mvi r14,13 8001c88: 5c 32 ff b6 bne r1,r18,8001b60 8001c8c: e3 ff ff 7d bi 8001a80 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 8001c90: f8 00 27 cc calli 800bbc0 <__errno> <== NOT EXECUTED 8001c94: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED 8001c98: e3 ff ff dc bi 8001c08 <== NOT EXECUTED 08001940 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 8001940: 37 9c ff f8 addi sp,sp,-8 8001944: 5b 8b 00 08 sw (sp+8),r11 8001948: 5b 9d 00 04 sw (sp+4),ra int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 800194c: 34 02 00 00 mvi r2,0 8001950: 78 01 08 01 mvhi r1,0x801 8001954: 38 21 b0 10 ori r1,r1,0xb010 8001958: b8 40 18 00 mv r3,r2 800195c: f8 00 00 19 calli 80019c0 8001960: 34 0b ff ff mvi r11,-1 8001964: 44 2b 00 0d be r1,r11,8001998 /* * 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) 8001968: 78 01 08 01 mvhi r1,0x801 800196c: 38 21 b0 10 ori r1,r1,0xb010 8001970: 34 02 00 01 mvi r2,1 8001974: 34 03 00 00 mvi r3,0 8001978: f8 00 00 12 calli 80019c0 800197c: 44 2b 00 0b be r1,r11,80019a8 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 8001980: 78 01 08 01 mvhi r1,0x801 8001984: 38 21 b0 10 ori r1,r1,0xb010 8001988: 34 02 00 01 mvi r2,1 800198c: 34 03 00 00 mvi r3,0 8001990: f8 00 00 0c calli 80019c0 8001994: 44 2b 00 08 be r1,r11,80019b4 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 8001998: 2b 9d 00 04 lw ra,(sp+4) 800199c: 2b 8b 00 08 lw r11,(sp+8) 80019a0: 37 9c 00 08 addi sp,sp,8 80019a4: c3 a0 00 00 ret /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 80019a8: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80019ac: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED 80019b0: f8 00 03 e2 calli 8002938 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 80019b4: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80019b8: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED 80019bc: f8 00 03 df calli 8002938 <== NOT EXECUTED 080043f8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 80043f8: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 80043fc: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8004400: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004404: b8 40 58 00 mv r11,r2 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004408: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 800440c: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004410: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED 8004414: 44 20 00 0b be r1,r0,8004440 <== NOT EXECUTED switch (c) { 8004418: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 800441c: 34 03 00 09 mvi r3,9 <== NOT EXECUTED 8004420: 44 23 00 2f be r1,r3,80044dc <== NOT EXECUTED 8004424: 54 23 00 0f bgu r1,r3,8004460 <== NOT EXECUTED 8004428: 34 03 00 08 mvi r3,8 <== NOT EXECUTED 800442c: 5c 23 00 11 bne r1,r3,8004470 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 8004430: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004434: 4c 01 00 03 bge r0,r1,8004440 <== NOT EXECUTED tty->column--; 8004438: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800443c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 8004440: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004444: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED 8004448: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800444c: fb ff ff 90 calli 800428c <== NOT EXECUTED } 8004450: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004454: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8004458: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800445c: c3 a0 00 00 ret <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 8004460: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004464: 44 23 00 10 be r1,r3,80044a4 <== NOT EXECUTED 8004468: 34 03 00 0d mvi r3,13 <== NOT EXECUTED 800446c: 44 23 00 26 be r1,r3,8004504 <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 8004470: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED 8004474: 5c 40 00 31 bne r2,r0,8004538 <== NOT EXECUTED 8004478: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800447c: 38 42 42 c8 ori r2,r2,0x42c8 <== NOT EXECUTED 8004480: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED c = toupper(c); if (!iscntrl(c)) 8004484: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004488: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 800448c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004490: 5c 20 ff ec bne r1,r0,8004440 <== NOT EXECUTED tty->column++; 8004494: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004498: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 800449c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 80044a0: e3 ff ff e8 bi 8004440 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 80044a4: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 80044a8: 44 20 00 03 be r1,r0,80044b4 <== NOT EXECUTED tty->column = 0; 80044ac: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80044b0: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 80044b4: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 80044b8: 44 40 ff e2 be r2,r0,8004440 <== NOT EXECUTED rtems_termios_puts ("\r", 1, tty); 80044bc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80044c0: 38 21 25 44 ori r1,r1,0x2544 <== NOT EXECUTED 80044c4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80044c8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80044cc: fb ff ff 70 calli 800428c <== NOT EXECUTED tty->column = 0; 80044d0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80044d4: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 80044d8: e3 ff ff da bi 8004440 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80044dc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80044e0: 34 03 00 08 mvi r3,8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 80044e4: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80044e8: 20 22 00 07 andi r2,r1,0x7 <== NOT EXECUTED 80044ec: c8 62 10 00 sub r2,r3,r2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 80044f0: 34 03 18 00 mvi r3,6144 <== NOT EXECUTED 80044f4: 44 83 00 1f be r4,r3,8004570 <== NOT EXECUTED tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 80044f8: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 80044fc: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED break; 8004500: e3 ff ff d0 bi 8004440 <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 8004504: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED 8004508: 44 20 00 03 be r1,r0,8004514 <== NOT EXECUTED 800450c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004510: 44 20 ff d0 be r1,r0,8004450 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 8004514: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED 8004518: 44 20 ff e1 be r1,r0,800449c <== NOT EXECUTED c = '\n'; 800451c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004520: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 8004524: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8004528: 44 40 ff c6 be r2,r0,8004440 <== NOT EXECUTED tty->column = 0; 800452c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004530: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 8004534: e3 ff ff c3 bi 8004440 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 8004538: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800453c: 38 42 42 c8 ori r2,r2,0x42c8 <== NOT EXECUTED 8004540: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8004544: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8004548: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800454c: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED 8004550: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8004554: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 8004558: 44 81 00 04 be r4,r1,8004568 <== NOT EXECUTED 800455c: 20 61 00 ff andi r1,r3,0xff <== NOT EXECUTED 8004560: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED 8004564: e3 ff ff c8 bi 8004484 <== NOT EXECUTED 8004568: 34 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED 800456c: e3 ff ff fc bi 800455c <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 8004570: b4 41 18 00 add r3,r2,r1 <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 8004574: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 8004578: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 800457c: 38 21 25 48 ori r1,r1,0x2548 <== NOT EXECUTED 8004580: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004584: fb ff ff 42 calli 800428c <== NOT EXECUTED return; 8004588: e3 ff ff b2 bi 8004450 <== NOT EXECUTED 0800b5a8 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 800b5a8: 37 9c ff c4 addi sp,sp,-60 800b5ac: 5b 8b 00 18 sw (sp+24),r11 800b5b0: 5b 8c 00 14 sw (sp+20),r12 800b5b4: 5b 8d 00 10 sw (sp+16),r13 800b5b8: 5b 8e 00 0c sw (sp+12),r14 800b5bc: 5b 8f 00 08 sw (sp+8),r15 800b5c0: 5b 9d 00 04 sw (sp+4),ra 800b5c4: b8 20 68 00 mv r13,r1 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) 800b5c8: 37 8b 00 1c addi r11,sp,28 800b5cc: 78 01 08 01 mvhi r1,0x801 800b5d0: 34 02 00 03 mvi r2,3 800b5d4: 38 21 b5 9c ori r1,r1,0xb59c 800b5d8: 34 03 00 07 mvi r3,7 800b5dc: b9 60 20 00 mv r4,r11 800b5e0: 34 05 00 01 mvi r5,1 800b5e4: fb ff d6 3a calli 8000ecc 800b5e8: b8 20 10 00 mv r2,r1 800b5ec: 5c 20 00 46 bne r1,r0,800b704 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 800b5f0: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 800b5f4: 44 22 00 05 be r1,r2,800b608 <== NOT EXECUTED 800b5f8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800b5fc: 44 40 00 03 be r2,r0,800b608 <== NOT EXECUTED 800b600: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800b604: d8 40 00 00 call r2 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800b608: 78 04 08 01 mvhi r4,0x801 800b60c: 38 84 c6 2e ori r4,r4,0xc62e 800b610: 2c 81 00 00 lhu r1,(r4+0) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800b614: 78 06 2f 74 mvhi r6,0x2f74 800b618: 78 05 2f 2e mvhi r5,0x2f2e sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800b61c: 34 28 00 01 addi r8,r1,1 800b620: 78 02 08 01 mvhi r2,0x801 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800b624: 38 c6 6d 70 ori r6,r6,0x6d70 800b628: 38 a5 66 69 ori r5,r5,0x6669 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800b62c: b8 20 18 00 mv r3,r1 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800b630: 37 8b 00 30 addi r11,sp,48 800b634: 34 07 66 6f mvi r7,26223 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800b638: 38 42 b5 a4 ori r2,r2,0xb5a4 800b63c: 0c 88 00 00 sh (r4+0),r8 800b640: 37 81 00 3a addi r1,sp,58 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800b644: 5b 86 00 30 sw (sp+48),r6 800b648: 59 65 00 04 sw (r11+4),r5 800b64c: 0d 67 00 08 sh (r11+8),r7 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800b650: f8 00 05 02 calli 800ca58 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 800b654: b9 60 08 00 mv r1,r11 800b658: 34 02 01 80 mvi r2,384 800b65c: f8 00 00 5e calli 800b7d4 800b660: b8 20 60 00 mv r12,r1 800b664: 5c 20 00 1e bne r1,r0,800b6dc 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); 800b668: b9 60 08 00 mv r1,r11 800b66c: 34 02 40 00 mvi r2,16384 800b670: fb ff d8 d4 calli 80019c0 800b674: 59 a1 00 00 sw (r13+0),r1 if (filsdes[0] < 0) { 800b678: 4c 2c 00 06 bge r1,r12,800b690 err = errno; 800b67c: f8 00 01 51 calli 800bbc0 <__errno> 800b680: 28 2c 00 00 lw r12,(r1+0) /* 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); 800b684: b9 60 08 00 mv r1,r11 800b688: f8 00 00 5c calli 800b7f8 800b68c: e0 00 00 11 bi 800b6d0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800b690: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800b694: 38 63 c0 10 ori r3,r3,0xc010 <== NOT EXECUTED 800b698: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED 800b69c: 54 61 00 24 bgu r3,r1,800b72c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800b6a0: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 800b6a4: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800b6a8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800b6ac: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 800b6b0: 59 82 00 18 sw (r12+24),r2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800b6b4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800b6b8: fb ff d8 c2 calli 80019c0 <== NOT EXECUTED 800b6bc: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED if (filsdes[1] < 0) { 800b6c0: 48 01 00 26 bg r0,r1,800b758 <== NOT EXECUTED 800b6c4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 800b6c8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800b6cc: f8 00 00 4b calli 800b7f8 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 800b6d0: f8 00 01 3c calli 800bbc0 <__errno> 800b6d4: 58 2c 00 00 sw (r1+0),r12 800b6d8: e0 00 00 02 bi 800b6e0 memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 800b6dc: f8 00 01 39 calli 800bbc0 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 800b6e0: 34 01 ff ff mvi r1,-1 800b6e4: 2b 9d 00 04 lw ra,(sp+4) 800b6e8: 2b 8b 00 18 lw r11,(sp+24) 800b6ec: 2b 8c 00 14 lw r12,(sp+20) 800b6f0: 2b 8d 00 10 lw r13,(sp+16) 800b6f4: 2b 8e 00 0c lw r14,(sp+12) 800b6f8: 2b 8f 00 08 lw r15,(sp+8) 800b6fc: 37 9c 00 3c addi sp,sp,60 800b700: c3 a0 00 00 ret rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 800b704: f8 00 01 2f calli 800bbc0 <__errno> 800b708: 28 22 00 00 lw r2,(r1+0) 800b70c: 34 01 00 02 mvi r1,2 800b710: 5c 41 ff f4 bne r2,r1,800b6e0 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 800b714: 78 01 08 01 mvhi r1,0x801 800b718: 38 21 b5 9c ori r1,r1,0xb59c 800b71c: 34 02 03 ff mvi r2,1023 800b720: fb ff d6 a0 calli 80011a0 800b724: 44 20 ff b9 be r1,r0,800b608 800b728: e3 ff ff ee bi 800b6e0 <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800b72c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800b730: fb ff d2 b0 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800b734: 78 0e 08 01 mvhi r14,0x801 <== NOT EXECUTED 800b738: 39 ce c6 9c ori r14,r14,0xc69c <== NOT EXECUTED 800b73c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800b740: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800b744: fb ff d2 ab calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800b748: 29 cc 00 00 lw r12,(r14+0) <== NOT EXECUTED 800b74c: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 800b750: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 800b754: e3 ff ff d3 bi 800b6a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 800b758: f8 00 01 1a calli 800bbc0 <__errno> <== NOT EXECUTED 800b75c: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED close(filsdes[0]); 800b760: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800b764: fb ff ef f1 calli 8007728 <== NOT EXECUTED 800b768: e3 ff ff d8 bi 800b6c8 <== NOT EXECUTED 08009dac : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 8009dac: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8009db0: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8009db4: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8009db8: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8009dbc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (cmd == FIONREAD) { 8009dc0: 78 04 40 04 mvhi r4,0x4004 <== NOT EXECUTED 8009dc4: 38 84 66 7f ori r4,r4,0x667f <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 8009dc8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8009dcc: b8 60 60 00 mv r12,r3 <== NOT EXECUTED if (cmd == FIONREAD) { 8009dd0: 34 05 ff ea mvi r5,-22 <== NOT EXECUTED 8009dd4: 44 44 00 08 be r2,r4,8009df4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 8009dd8: b8 a0 08 00 mv r1,r5 <== NOT EXECUTED 8009ddc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009de0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8009de4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8009de8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8009dec: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8009df0: c3 a0 00 00 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 8009df4: 34 05 ff f2 mvi r5,-14 <== NOT EXECUTED 8009df8: 44 60 ff f8 be r3,r0,8009dd8 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 8009dfc: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 8009e00: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009e04: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009e08: fb ff f9 3e calli 8008300 <== NOT EXECUTED 8009e0c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8009e10: 34 05 ff fc mvi r5,-4 <== NOT EXECUTED 8009e14: 5c 20 ff f1 bne r1,r0,8009dd8 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 8009e18: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8009e1c: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009e20: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009e24: fb ff f9 98 calli 8008484 <== NOT EXECUTED 8009e28: b9 a0 28 00 mv r5,r13 <== NOT EXECUTED return 0; 8009e2c: e3 ff ff eb bi 8009dd8 <== NOT EXECUTED 08009d28 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 8009d28: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED 8009d2c: c3 a0 00 00 ret <== NOT EXECUTED 0800a054 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a054: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 800a058: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 800a05c: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800a060: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 800a064: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 800a068: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 800a06c: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800a070: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 800a074: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 800a078: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800a07c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a080: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a084: b8 40 90 00 mv r18,r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a088: 34 02 00 00 mvi r2,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a08c: b8 60 80 00 mv r16,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a090: b8 40 18 00 mv r3,r2 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800a094: b8 80 78 00 mv r15,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800a098: fb ff f8 9a calli 8008300 <== NOT EXECUTED 800a09c: 34 0e ff fc mvi r14,-4 <== NOT EXECUTED 800a0a0: 5c 20 00 24 bne r1,r0,800a130 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 800a0a4: b8 20 88 00 mv r17,r1 <== NOT EXECUTED 800a0a8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800a0ac: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800a0b0: 46 01 00 1c be r16,r1,800a120 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { 800a0b4: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED 800a0b8: 5c a0 00 41 bne r5,r0,800a1bc <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 800a0bc: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED 800a0c0: 44 85 00 3d be r4,r5,800a1b4 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 800a0c4: 29 ed 00 18 lw r13,(r15+24) <== NOT EXECUTED 800a0c8: 21 ad 00 01 andi r13,r13,0x1 <== NOT EXECUTED 800a0cc: 5d a0 00 4f bne r13,r0,800a208 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800a0d0: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a0d4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800a0d8: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED 800a0dc: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a0e0: fb ff f8 e9 calli 8008484 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800a0e4: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a0e8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800a0ec: f8 00 03 22 calli 800ad74 <== NOT EXECUTED 800a0f0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800a0f4: 44 2d 00 02 be r1,r13,800a0fc <== NOT EXECUTED 800a0f8: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a0fc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a100: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a104: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a108: fb ff f8 7e calli 8008300 <== NOT EXECUTED 800a10c: 5c 20 00 41 bne r1,r0,800a210 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 800a110: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED 800a114: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 800a118: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED if (ret != 0) 800a11c: 45 81 ff e6 be r12,r1,800a0b4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 800a120: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a124: fb ff f8 d8 calli 8008484 <== NOT EXECUTED out_nolock: if (read > 0) 800a128: 49 c0 00 02 bg r14,r0,800a130 <== NOT EXECUTED 800a12c: b9 80 70 00 mv r14,r12 <== NOT EXECUTED return read; return ret; } 800a130: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800a134: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a138: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800a13c: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 800a140: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 800a144: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 800a148: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800a14c: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 800a150: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 800a154: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 800a158: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 800a15c: c3 a0 00 00 ret <== NOT EXECUTED if (chunk > chunk1) { 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); 800a160: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 800a164: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED 800a168: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 800a16c: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 800a170: f8 00 09 3a calli 800c658 <== NOT EXECUTED pipe->Start += chunk; 800a174: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED pipe->Start %= pipe->Size; 800a178: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; 800a17c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800a180: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Start %= pipe->Size; 800a184: f8 00 3f 03 calli 8019d90 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; 800a188: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 800a18c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Length -= chunk; 800a190: c8 4c 08 00 sub r1,r2,r12 <== NOT EXECUTED 800a194: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 800a198: 5c 20 00 02 bne r1,r0,800a1a0 <== NOT EXECUTED pipe->Start = 0; 800a19c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED if (pipe->waitingWriters > 0) 800a1a0: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 800a1a4: 5c 20 00 1e bne r1,r0,800a21c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 800a1a8: b5 cc 70 00 add r14,r14,r12 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800a1ac: b9 c0 88 00 mv r17,r14 <== NOT EXECUTED 800a1b0: 56 0e ff c1 bgu r16,r14,800a0b4 <== NOT EXECUTED 800a1b4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800a1b8: e3 ff ff da bi 800a120 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 800a1bc: ca 11 08 00 sub r1,r16,r17 <== NOT EXECUTED 800a1c0: b8 a0 60 00 mv r12,r5 <== NOT EXECUTED 800a1c4: 50 25 00 02 bgeu r1,r5,800a1cc <== NOT EXECUTED 800a1c8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 800a1cc: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED 800a1d0: 29 6d 00 04 lw r13,(r11+4) <== NOT EXECUTED 800a1d4: c9 a2 68 00 sub r13,r13,r2 <== NOT EXECUTED if (chunk > chunk1) { 800a1d8: 4d ac ff e2 bge r13,r12,800a160 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 800a1dc: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 800a1e0: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 800a1e4: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED 800a1e8: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 800a1ec: f8 00 09 1b calli 800c658 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 800a1f0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800a1f4: b6 2d 08 00 add r1,r17,r13 <== NOT EXECUTED 800a1f8: b6 41 08 00 add r1,r18,r1 <== NOT EXECUTED 800a1fc: c9 8d 18 00 sub r3,r12,r13 <== NOT EXECUTED 800a200: f8 00 09 16 calli 800c658 <== NOT EXECUTED 800a204: e3 ff ff dc bi 800a174 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 800a208: 34 0c ff f5 mvi r12,-11 <== NOT EXECUTED 800a20c: e3 ff ff c5 bi 800a120 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a210: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 800a214: 49 c0 ff c7 bg r14,r0,800a130 <== NOT EXECUTED 800a218: e3 ff ff c5 bi 800a12c <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 800a21c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a220: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a224: f8 00 02 b5 calli 800acf8 <== NOT EXECUTED 800a228: e3 ff ff e0 bi 800a1a8 <== NOT EXECUTED 0800a22c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a22c: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 800a230: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 800a234: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 800a238: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 800a23c: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 800a240: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 800a244: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED pipe_control_t *pipe = *pipep; 800a248: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a24c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800a250: b8 40 60 00 mv r12,r2 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 800a254: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a258: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a25c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a260: fb ff f8 28 calli 8008300 <== NOT EXECUTED 800a264: b8 20 18 00 mv r3,r1 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 800a268: 5c 20 00 41 bne r1,r0,800a36c <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800a26c: 29 8d 00 18 lw r13,(r12+24) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800a270: 21 a1 00 02 andi r1,r13,0x2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800a274: 21 ad 00 06 andi r13,r13,0x6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800a278: 44 23 00 04 be r1,r3,800a288 <== NOT EXECUTED pipe->Readers --; 800a27c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a280: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a284: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 800a288: 21 a1 00 04 andi r1,r13,0x4 <== NOT EXECUTED 800a28c: 5c 20 00 20 bne r1,r0,800a30c <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 800a290: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800a294: 39 8c c6 28 ori r12,r12,0xc628 <== NOT EXECUTED 800a298: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800a29c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a2a0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a2a4: fb ff f8 17 calli 8008300 <== NOT EXECUTED 800a2a8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 800a2ac: 5c 20 00 30 bne r1,r0,800a36c <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 800a2b0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a2b4: fb ff f8 74 calli 8008484 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 800a2b8: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800a2bc: 44 4e 00 18 be r2,r14,800a31c <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 800a2c0: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a2c4: 7d ad 00 02 cmpnei r13,r13,2 <== NOT EXECUTED 800a2c8: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED 800a2cc: a0 2d 68 00 and r13,r1,r13 <== NOT EXECUTED 800a2d0: 45 a0 00 04 be r13,r0,800a2e0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a2d4: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a2d8: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED 800a2dc: f8 00 02 87 calli 800acf8 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 800a2e0: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800a2e4: fb ff f8 68 calli 8008484 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 800a2e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800a2ec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a2f0: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 800a2f4: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 800a2f8: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 800a2fc: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 800a300: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 800a304: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 800a308: c3 a0 00 00 ret <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 800a30c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a310: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a314: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED 800a318: e3 ff ff de bi 800a290 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 800a31c: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED 800a320: 45 c2 00 07 be r14,r2,800a33c <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 800a324: 7d ad 00 04 cmpnei r13,r13,4 <== NOT EXECUTED 800a328: 45 a2 ff ee be r13,r2,800a2e0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 800a32c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a330: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED 800a334: f8 00 02 71 calli 800acf8 <== NOT EXECUTED 800a338: e3 ff ff ea bi 800a2e0 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800a33c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a340: f8 00 02 4e calli 800ac78 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800a344: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a348: f8 00 02 4c calli 800ac78 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800a34c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a350: fb ff f7 a9 calli 80081f4 <== NOT EXECUTED free(pipe->Buffer); 800a354: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a358: fb ff f5 2c calli 8007808 <== NOT EXECUTED free(pipe); 800a35c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a360: fb ff f5 2a calli 8007808 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 800a364: 59 ee 00 00 sw (r15+0),r14 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 800a368: e3 ff ff de bi 800a2e0 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 800a36c: fb ff e1 73 calli 8002938 <== NOT EXECUTED 08009e30 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 8009e30: 37 9c ff d4 addi sp,sp,-44 <== NOT EXECUTED 8009e34: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 8009e38: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 8009e3c: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 8009e40: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 8009e44: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 8009e48: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 8009e4c: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 8009e50: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 8009e54: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8009e58: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 8009e5c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8009e60: b8 40 70 00 mv r14,r2 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 8009e64: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8009e68: 5c 60 00 0d bne r3,r0,8009e9c <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 8009e6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009e70: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009e74: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 8009e78: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 8009e7c: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 8009e80: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 8009e84: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 8009e88: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 8009e8c: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 8009e90: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 8009e94: 37 9c 00 2c addi sp,sp,44 <== NOT EXECUTED 8009e98: c3 a0 00 00 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 8009e9c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 8009ea0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009ea4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009ea8: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 8009eac: fb ff f9 15 calli 8008300 <== NOT EXECUTED 8009eb0: 34 0b ff fc mvi r11,-4 <== NOT EXECUTED 8009eb4: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 8009eb8: 5c 20 ff ed bne r1,r0,8009e6c <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 8009ebc: 29 ab 00 10 lw r11,(r13+16) <== NOT EXECUTED 8009ec0: 45 61 00 4e be r11,r1,8009ff8 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 8009ec4: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 8009ec8: 34 11 00 01 mvi r17,1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 8009ecc: 55 8f 00 02 bgu r12,r15,8009ed4 <== NOT EXECUTED 8009ed0: b9 80 88 00 mv r17,r12 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 8009ed4: 34 12 00 00 mvi r18,0 <== NOT EXECUTED 8009ed8: ba 40 58 00 mv r11,r18 <== 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) { 8009edc: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED 8009ee0: c9 e1 18 00 sub r3,r15,r1 <== NOT EXECUTED 8009ee4: 56 23 00 26 bgu r17,r3,8009f7c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 8009ee8: c9 92 10 00 sub r2,r12,r18 <== NOT EXECUTED 8009eec: b8 60 80 00 mv r16,r3 <== NOT EXECUTED 8009ef0: 50 43 00 02 bgeu r2,r3,8009ef8 <== NOT EXECUTED 8009ef4: b8 40 80 00 mv r16,r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 8009ef8: 29 a3 00 08 lw r3,(r13+8) <== NOT EXECUTED 8009efc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8009f00: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 8009f04: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8009f08: f8 00 3f a2 calli 8019d90 <__umodsi3> <== NOT EXECUTED 8009f0c: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED if (chunk > chunk1) { 8009f10: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 8009f14: 4d f0 00 42 bge r15,r16,800a01c <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 8009f18: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 8009f1c: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED 8009f20: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 8009f24: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED 8009f28: f8 00 09 cc calli 800c658 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 8009f2c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8009f30: b5 f2 10 00 add r2,r15,r18 <== NOT EXECUTED 8009f34: b5 c2 10 00 add r2,r14,r2 <== NOT EXECUTED 8009f38: ca 0f 18 00 sub r3,r16,r15 <== NOT EXECUTED 8009f3c: f8 00 09 c7 calli 800c658 <== NOT EXECUTED 8009f40: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 8009f44: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 8009f48: 29 a2 00 18 lw r2,(r13+24) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 8009f4c: b4 30 08 00 add r1,r1,r16 <== NOT EXECUTED 8009f50: 59 a1 00 0c sw (r13+12),r1 <== NOT EXECUTED if (pipe->waitingReaders > 0) 8009f54: 5c 40 00 3a bne r2,r0,800a03c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 8009f58: b5 70 58 00 add r11,r11,r16 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 8009f5c: b9 60 90 00 mv r18,r11 <== NOT EXECUTED 8009f60: 55 8b 00 28 bgu r12,r11,800a000 <== NOT EXECUTED 8009f64: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 8009f68: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 8009f6c: fb ff f9 46 calli 8008484 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 8009f70: 49 60 ff bf bg r11,r0,8009e6c <== NOT EXECUTED 8009f74: b9 e0 58 00 mv r11,r15 <== NOT EXECUTED 8009f78: e3 ff ff bd bi 8009e6c <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 8009f7c: 28 90 00 18 lw r16,(r4+24) <== NOT EXECUTED 8009f80: 22 10 00 01 andi r16,r16,0x1 <== NOT EXECUTED 8009f84: 5e 00 00 22 bne r16,r0,800a00c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 8009f88: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009f8c: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 8009f90: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 8009f94: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED 8009f98: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009f9c: fb ff f9 3a calli 8008484 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 8009fa0: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED 8009fa4: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8009fa8: f8 00 03 73 calli 800ad74 <== NOT EXECUTED 8009fac: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8009fb0: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 8009fb4: 44 30 00 02 be r1,r16,8009fbc <== NOT EXECUTED 8009fb8: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 8009fbc: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 8009fc0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009fc4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009fc8: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 8009fcc: fb ff f8 cd calli 8008300 <== NOT EXECUTED 8009fd0: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 8009fd4: 5c 20 00 10 bne r1,r0,800a014 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 8009fd8: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED 8009fdc: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 8009fe0: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED if (ret != 0) 8009fe4: 5d e1 ff e1 bne r15,r1,8009f68 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 8009fe8: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED 8009fec: 44 2f 00 03 be r1,r15,8009ff8 <== NOT EXECUTED 8009ff0: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED 8009ff4: e3 ff ff ba bi 8009edc <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 8009ff8: 34 0f ff e0 mvi r15,-32 <== NOT EXECUTED 8009ffc: e3 ff ff db bi 8009f68 <== NOT EXECUTED 800a000: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED 800a004: 34 11 00 01 mvi r17,1 <== NOT EXECUTED 800a008: e3 ff ff b5 bi 8009edc <== NOT EXECUTED while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 800a00c: 34 0f ff f5 mvi r15,-11 <== NOT EXECUTED 800a010: e3 ff ff d6 bi 8009f68 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a014: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED 800a018: e3 ff ff d6 bi 8009f70 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 800a01c: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 800a020: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED 800a024: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a028: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED 800a02c: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800a030: f8 00 09 8a calli 800c658 <== NOT EXECUTED 800a034: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800a038: e3 ff ff c3 bi 8009f44 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 800a03c: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED 800a040: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800a044: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800a048: f8 00 03 2c calli 800acf8 <== NOT EXECUTED 800a04c: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800a050: e3 ff ff c2 bi 8009f58 <== NOT EXECUTED 08001954 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 8001954: 37 9c ff f4 addi sp,sp,-12 8001958: 5b 8b 00 0c sw (sp+12),r11 800195c: 5b 8c 00 08 sw (sp+8),r12 8001960: 5b 9d 00 04 sw (sp+4),ra 8001964: b8 20 60 00 mv r12,r1 const char *p = s; for (p=s ; *p ; p++ ) 8001968: 40 21 00 00 lbu r1,(r1+0) 800196c: 44 20 00 10 be r1,r0,80019ac 8001970: 78 0b 08 01 mvhi r11,0x801 8001974: 39 6b a5 ac ori r11,r11,0xa5ac BSP_output_char(*p); 8001978: 29 62 00 00 lw r2,(r11+0) */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 800197c: 35 8c 00 01 addi r12,r12,1 BSP_output_char(*p); 8001980: d8 40 00 00 call r2 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 8001984: 41 81 00 00 lbu r1,(r12+0) 8001988: 5c 20 ff fc bne r1,r0,8001978 BSP_output_char(*p); BSP_output_char('\n'); 800198c: 29 62 00 00 lw r2,(r11+0) 8001990: 34 01 00 0a mvi r1,10 8001994: d8 40 00 00 call r2 } 8001998: 2b 9d 00 04 lw ra,(sp+4) 800199c: 2b 8b 00 0c lw r11,(sp+12) 80019a0: 2b 8c 00 08 lw r12,(sp+8) 80019a4: 37 9c 00 0c addi sp,sp,12 80019a8: c3 a0 00 00 ret 80019ac: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 80019b0: 39 6b a5 ac ori r11,r11,0xa5ac <== NOT EXECUTED 80019b4: e3 ff ff f6 bi 800198c <== NOT EXECUTED 0801a314 : ssize_t read( int fd, void *buffer, size_t count ) { 801a314: 37 9c ff e8 addi sp,sp,-24 801a318: 5b 8b 00 14 sw (sp+20),r11 801a31c: 5b 8c 00 10 sw (sp+16),r12 801a320: 5b 8d 00 0c sw (sp+12),r13 801a324: 5b 8e 00 08 sw (sp+8),r14 801a328: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801a32c: 78 04 08 01 mvhi r4,0x801 801a330: 38 84 c0 10 ori r4,r4,0xc010 801a334: 28 84 00 00 lw r4,(r4+0) ssize_t read( int fd, void *buffer, size_t count ) { 801a338: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801a33c: 54 81 00 06 bgu r4,r1,801a354 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 801a340: fb ff c6 20 calli 800bbc0 <__errno> 801a344: 34 02 00 09 mvi r2,9 801a348: 58 22 00 00 sw (r1+0),r2 801a34c: 34 0c ff ff mvi r12,-1 801a350: e0 00 00 27 bi 801a3ec { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801a354: 34 02 00 03 mvi r2,3 801a358: 5b 83 00 18 sw (sp+24),r3 801a35c: 78 0c 08 01 mvhi r12,0x801 801a360: fb ff 97 a4 calli 80001f0 <__ashlsi3> 801a364: 34 02 00 03 mvi r2,3 801a368: 39 8c c6 9c ori r12,r12,0xc69c 801a36c: b8 20 70 00 mv r14,r1 801a370: fb ff 97 a0 calli 80001f0 <__ashlsi3> 801a374: 29 8b 00 00 lw r11,(r12+0) 801a378: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801a37c: 2b 83 00 18 lw r3,(sp+24) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801a380: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 801a384: 29 61 00 18 lw r1,(r11+24) 801a388: 20 22 01 00 andi r2,r1,0x100 801a38c: 44 40 ff ed be r2,r0,801a340 rtems_libio_check_buffer( buffer ); 801a390: 45 a0 00 1f be r13,r0,801a40c rtems_libio_check_count( count ); 801a394: b8 60 60 00 mv r12,r3 801a398: 44 60 00 15 be r3,r0,801a3ec rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801a39c: 20 21 00 02 andi r1,r1,0x2 801a3a0: 44 20 00 1b be r1,r0,801a40c /* * Now process the read(). */ if ( !iop->handlers->read_h ) 801a3a4: 29 61 00 40 lw r1,(r11+64) 801a3a8: 28 24 00 08 lw r4,(r1+8) 801a3ac: 44 80 00 1d be r4,r0,801a420 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 801a3b0: b9 a0 10 00 mv r2,r13 801a3b4: b9 60 08 00 mv r1,r11 801a3b8: d8 80 00 00 call r4 801a3bc: b8 20 60 00 mv r12,r1 if ( rc > 0 ) 801a3c0: 4c 01 00 0b bge r0,r1,801a3ec iop->offset += rc; 801a3c4: 34 02 00 1f mvi r2,31 801a3c8: fb ff 97 da calli 8000330 <__ashrsi3> 801a3cc: 29 62 00 14 lw r2,(r11+20) 801a3d0: 29 64 00 10 lw r4,(r11+16) 801a3d4: b5 82 10 00 add r2,r12,r2 801a3d8: f5 82 18 00 cmpgu r3,r12,r2 801a3dc: b4 24 08 00 add r1,r1,r4 801a3e0: b4 61 08 00 add r1,r3,r1 801a3e4: 59 62 00 14 sw (r11+20),r2 801a3e8: 59 61 00 10 sw (r11+16),r1 return rc; } 801a3ec: b9 80 08 00 mv r1,r12 801a3f0: 2b 9d 00 04 lw ra,(sp+4) 801a3f4: 2b 8b 00 14 lw r11,(sp+20) 801a3f8: 2b 8c 00 10 lw r12,(sp+16) 801a3fc: 2b 8d 00 0c lw r13,(sp+12) 801a400: 2b 8e 00 08 lw r14,(sp+8) 801a404: 37 9c 00 18 addi sp,sp,24 801a408: c3 a0 00 00 ret rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801a40c: fb ff c5 ed calli 800bbc0 <__errno> <== NOT EXECUTED 801a410: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801a414: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a418: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a41c: e3 ff ff f4 bi 801a3ec <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801a420: fb ff c5 e8 calli 800bbc0 <__errno> <== NOT EXECUTED 801a424: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801a428: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a42c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a430: e3 ff ff ef bi 801a3ec <== NOT EXECUTED 0802b504 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 802b504: 37 9c ff d8 addi sp,sp,-40 802b508: 5b 8b 00 14 sw (sp+20),r11 802b50c: 5b 8c 00 10 sw (sp+16),r12 802b510: 5b 8d 00 0c sw (sp+12),r13 802b514: 5b 8e 00 08 sw (sp+8),r14 802b518: 5b 9d 00 04 sw (sp+4),ra 802b51c: b8 40 68 00 mv r13,r2 802b520: b8 60 70 00 mv r14,r3 802b524: b8 20 60 00 mv r12,r1 rtems_filesystem_location_info_t loc; int result; if (!buf) 802b528: 44 40 00 29 be r2,r0,802b5cc rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 802b52c: f8 00 8d 7f calli 804eb28 802b530: b8 20 20 00 mv r4,r1 802b534: 34 03 00 00 mvi r3,0 802b538: 37 8b 00 18 addi r11,sp,24 802b53c: b9 80 08 00 mv r1,r12 802b540: b8 80 10 00 mv r2,r4 802b544: b8 60 28 00 mv r5,r3 802b548: b9 60 20 00 mv r4,r11 802b54c: fb ff 71 0d calli 8007980 0, &loc, false ); if ( result != 0 ) 802b550: 34 0c ff ff mvi r12,-1 802b554: 5c 20 00 16 bne r1,r0,802b5ac return -1; if ( !loc.ops->node_type_h ){ 802b558: 2b 83 00 24 lw r3,(sp+36) 802b55c: 28 62 00 10 lw r2,(r3+16) 802b560: 44 41 00 32 be r2,r1,802b628 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 802b564: b9 60 08 00 mv r1,r11 802b568: d8 40 00 00 call r2 802b56c: 34 02 00 04 mvi r2,4 802b570: 5c 22 00 23 bne r1,r2,802b5fc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 802b574: 2b 81 00 24 lw r1,(sp+36) 802b578: 28 24 00 3c lw r4,(r1+60) 802b57c: 44 80 00 34 be r4,r0,802b64c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 802b580: b9 a0 10 00 mv r2,r13 802b584: b9 c0 18 00 mv r3,r14 802b588: b9 60 08 00 mv r1,r11 802b58c: d8 80 00 00 call r4 802b590: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 802b594: 2b 81 00 24 lw r1,(sp+36) 802b598: 44 20 00 05 be r1,r0,802b5ac 802b59c: 28 22 00 1c lw r2,(r1+28) 802b5a0: 44 40 00 03 be r2,r0,802b5ac 802b5a4: b9 60 08 00 mv r1,r11 802b5a8: d8 40 00 00 call r2 return result; } 802b5ac: b9 80 08 00 mv r1,r12 802b5b0: 2b 9d 00 04 lw ra,(sp+4) 802b5b4: 2b 8b 00 14 lw r11,(sp+20) 802b5b8: 2b 8c 00 10 lw r12,(sp+16) 802b5bc: 2b 8d 00 0c lw r13,(sp+12) 802b5c0: 2b 8e 00 08 lw r14,(sp+8) 802b5c4: 37 9c 00 28 addi sp,sp,40 802b5c8: c3 a0 00 00 ret { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 802b5cc: f8 00 6f 6d calli 8047380 <__errno> <== NOT EXECUTED 802b5d0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 802b5d4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b5d8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 802b5dc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b5e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b5e4: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 802b5e8: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 802b5ec: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 802b5f0: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 802b5f4: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 802b5f8: c3 a0 00 00 ret <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 802b5fc: 2b 81 00 24 lw r1,(sp+36) 802b600: 44 20 00 05 be r1,r0,802b614 802b604: 28 22 00 1c lw r2,(r1+28) 802b608: 44 40 00 03 be r2,r0,802b614 802b60c: b9 60 08 00 mv r1,r11 802b610: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EINVAL ); 802b614: f8 00 6f 5b calli 8047380 <__errno> 802b618: 34 02 00 16 mvi r2,22 802b61c: 58 22 00 00 sw (r1+0),r2 802b620: 34 0c ff ff mvi r12,-1 802b624: e3 ff ff e2 bi 802b5ac 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 802b628: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 802b62c: 44 62 00 03 be r3,r2,802b638 <== NOT EXECUTED 802b630: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b634: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b638: f8 00 6f 52 calli 8047380 <__errno> <== NOT EXECUTED 802b63c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b640: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802b644: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b648: e3 ff ff d9 bi 802b5ac <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 802b64c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b650: 44 44 ff fa be r2,r4,802b638 <== NOT EXECUTED 802b654: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b658: d8 40 00 00 call r2 <== NOT EXECUTED 802b65c: e3 ff ff f7 bi 802b638 <== NOT EXECUTED 0800357c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 800357c: 37 9c ff e4 addi sp,sp,-28 8003580: 5b 8b 00 1c sw (sp+28),r11 8003584: 5b 8c 00 18 sw (sp+24),r12 8003588: 5b 8d 00 14 sw (sp+20),r13 800358c: 5b 8e 00 10 sw (sp+16),r14 8003590: 5b 8f 00 0c sw (sp+12),r15 8003594: 5b 90 00 08 sw (sp+8),r16 8003598: 5b 9d 00 04 sw (sp+4),ra int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 800359c: 78 04 08 02 mvhi r4,0x802 80035a0: 38 84 10 10 ori r4,r4,0x1010 80035a4: 28 84 00 00 lw r4,(r4+0) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 80035a8: b8 40 70 00 mv r14,r2 80035ac: b8 60 60 00 mv r12,r3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 80035b0: 54 81 00 06 bgu r4,r1,80035c8 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 80035b4: f8 00 2b c6 calli 800e4cc <__errno> <== NOT EXECUTED 80035b8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80035bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80035c0: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 80035c4: e0 00 00 16 bi 800361c <== NOT EXECUTED int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 80035c8: 34 02 00 03 mvi r2,3 80035cc: fb ff f6 3b calli 8000eb8 <__ashlsi3> 80035d0: 78 0d 08 02 mvhi r13,0x802 80035d4: 34 02 00 03 mvi r2,3 80035d8: 39 ad 1e 70 ori r13,r13,0x1e70 80035dc: b8 20 78 00 mv r15,r1 80035e0: fb ff f6 36 calli 8000eb8 <__ashlsi3> 80035e4: 29 ab 00 00 lw r11,(r13+0) 80035e8: b5 e1 08 00 add r1,r15,r1 80035ec: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 80035f0: 29 61 00 18 lw r1,(r11+24) 80035f4: 20 22 01 00 andi r2,r1,0x100 80035f8: 44 40 ff ef be r2,r0,80035b4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 80035fc: 20 21 00 02 andi r1,r1,0x2 8003600: 44 20 00 03 be r1,r0,800360c /* * Argument validation on IO vector */ if ( !iov ) 8003604: 45 c0 00 02 be r14,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003608: 49 80 00 0f bg r12,r0,8003644 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 800360c: f8 00 2b b0 calli 800e4cc <__errno> 8003610: 34 02 00 16 mvi r2,22 8003614: 58 22 00 00 sw (r1+0),r2 8003618: 34 0f ff ff mvi r15,-1 if (bytes != iov[ v ].iov_len) break; } return total; } 800361c: b9 e0 08 00 mv r1,r15 8003620: 2b 9d 00 04 lw ra,(sp+4) 8003624: 2b 8b 00 1c lw r11,(sp+28) 8003628: 2b 8c 00 18 lw r12,(sp+24) 800362c: 2b 8d 00 14 lw r13,(sp+20) 8003630: 2b 8e 00 10 lw r14,(sp+16) 8003634: 2b 8f 00 0c lw r15,(sp+12) 8003638: 2b 90 00 08 lw r16,(sp+8) 800363c: 37 9c 00 1c addi sp,sp,28 8003640: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003644: 34 01 04 00 mvi r1,1024 8003648: 4c 2c 00 02 bge r1,r12,8003650 800364c: e3 ff ff f0 bi 800360c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 8003650: 29 61 00 40 lw r1,(r11+64) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003654: 34 05 00 00 mvi r5,0 8003658: b9 c0 20 00 mv r4,r14 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 800365c: 28 29 00 08 lw r9,(r1+8) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003660: b8 a0 30 00 mv r6,r5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 8003664: 45 20 00 2c be r9,r0,8003714 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 8003668: 28 82 00 00 lw r2,(r4+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++ ) { 800366c: 34 a5 00 01 addi r5,r5,1 ssize_t old; if ( !iov[v].iov_base ) 8003670: 44 40 ff e7 be r2,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 8003674: 28 87 00 04 lw r7,(r4+4) * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003678: 34 84 00 08 addi r4,r4,8 if ( iov[v].iov_len <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 800367c: b4 c7 40 00 add r8,r6,r7 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 8003680: 44 e0 ff e3 be r7,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 8003684: 4d 06 00 02 bge r8,r6,800368c 8003688: e3 ff ff e1 bi 800360c * 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++ ) { 800368c: 4c ac 00 03 bge r5,r12,8003698 8003690: b9 00 30 00 mv r6,r8 8003694: e3 ff ff f5 bi 8003668 8003698: 34 10 00 00 mvi r16,0 800369c: ba 00 78 00 mv r15,r16 80036a0: e0 00 00 04 bi 80036b0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80036a4: 4e 0c ff de bge r16,r12,800361c <== NOT EXECUTED 80036a8: 29 61 00 40 lw r1,(r11+64) <== NOT EXECUTED 80036ac: 28 29 00 08 lw r9,(r1+8) <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 80036b0: 29 c2 00 00 lw r2,(r14+0) 80036b4: 29 c3 00 04 lw r3,(r14+4) 80036b8: b9 60 08 00 mv r1,r11 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80036bc: 36 10 00 01 addi r16,r16,1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 80036c0: d9 20 00 00 call r9 80036c4: b8 20 68 00 mv r13,r1 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 80036c8: 34 02 00 1f mvi r2,31 * 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 ); if ( bytes < 0 ) 80036cc: 48 01 00 10 bg r0,r1,800370c return -1; if ( bytes > 0 ) { 80036d0: 44 20 00 0b be r1,r0,80036fc iop->offset += bytes; 80036d4: fb ff f6 49 calli 8000ff8 <__ashrsi3> <== NOT EXECUTED 80036d8: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 80036dc: 29 64 00 10 lw r4,(r11+16) <== NOT EXECUTED total += bytes; 80036e0: b5 ed 78 00 add r15,r15,r13 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 80036e4: b5 a2 10 00 add r2,r13,r2 <== NOT EXECUTED 80036e8: f5 a2 18 00 cmpgu r3,r13,r2 <== NOT EXECUTED 80036ec: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 80036f0: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 80036f4: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED 80036f8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 80036fc: 29 c1 00 04 lw r1,(r14+4) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003700: 35 ce 00 08 addi r14,r14,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) 8003704: 45 a1 ff e8 be r13,r1,80036a4 8003708: e3 ff ff c5 bi 800361c } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 800370c: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8003710: e3 ff ff c3 bi 800361c <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003714: f8 00 2b 6e calli 800e4cc <__errno> <== NOT EXECUTED 8003718: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800371c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8003720: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8003724: e3 ff ff be bi 800361c <== NOT EXECUTED 0801a4d4 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801a4d4: 37 9c ff e4 addi sp,sp,-28 801a4d8: 5b 8b 00 18 sw (sp+24),r11 801a4dc: 5b 8c 00 14 sw (sp+20),r12 801a4e0: 5b 8d 00 10 sw (sp+16),r13 801a4e4: 5b 8e 00 0c sw (sp+12),r14 801a4e8: 5b 8f 00 08 sw (sp+8),r15 801a4ec: 5b 9d 00 04 sw (sp+4),ra 801a4f0: 78 0c 08 01 mvhi r12,0x801 801a4f4: 39 8c c6 a8 ori r12,r12,0xc6a8 801a4f8: 29 84 00 10 lw r4,(r12+16) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801a4fc: 78 03 08 01 mvhi r3,0x801 801a500: 38 63 c9 c0 ori r3,r3,0xc9c0 801a504: 28 63 00 00 lw r3,(r3+0) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801a508: 34 84 00 01 addi r4,r4,1 801a50c: b8 20 58 00 mv r11,r1 801a510: 59 84 00 10 sw (r12+16),r4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801a514: 34 01 00 03 mvi r1,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801a518: b8 40 70 00 mv r14,r2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801a51c: 44 61 00 23 be r3,r1,801a5a8 } /* * Continue with realloc(). */ if ( !ptr ) 801a520: 45 60 00 2e be r11,r0,801a5d8 return malloc( size ); if ( !size ) { 801a524: 45 c0 00 18 be r14,r0,801a584 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 801a528: 78 0d 08 01 mvhi r13,0x801 801a52c: 39 ad c0 1c ori r13,r13,0xc01c 801a530: 29 a1 00 00 lw r1,(r13+0) 801a534: b9 60 10 00 mv r2,r11 801a538: 37 83 00 1c addi r3,sp,28 801a53c: f8 00 00 85 calli 801a750 <_Protected_heap_Get_block_size> 801a540: b8 20 78 00 mv r15,r1 801a544: 44 20 00 14 be r1,r0,801a594 #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 ) ) { 801a548: 29 a1 00 00 lw r1,(r13+0) 801a54c: b9 60 10 00 mv r2,r11 801a550: b9 c0 18 00 mv r3,r14 801a554: f8 00 00 97 calli 801a7b0 <_Protected_heap_Resize_block> 801a558: b8 20 68 00 mv r13,r1 801a55c: 44 20 00 23 be r1,r0,801a5e8 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 801a560: b9 60 08 00 mv r1,r11 801a564: 2b 9d 00 04 lw ra,(sp+4) 801a568: 2b 8b 00 18 lw r11,(sp+24) 801a56c: 2b 8c 00 14 lw r12,(sp+20) 801a570: 2b 8d 00 10 lw r13,(sp+16) 801a574: 2b 8e 00 0c lw r14,(sp+12) 801a578: 2b 8f 00 08 lw r15,(sp+8) 801a57c: 37 9c 00 1c addi sp,sp,28 801a580: c3 a0 00 00 ret */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 801a584: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 801a588: fb ff b4 a0 calli 8007808 <== NOT EXECUTED 801a58c: b9 c0 58 00 mv r11,r14 <== NOT EXECUTED return (void *) 0; 801a590: e3 ff ff f4 bi 801a560 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 801a594: fb ff c5 8b calli 800bbc0 <__errno> 801a598: 34 02 00 16 mvi r2,22 801a59c: 58 22 00 00 sw (r1+0),r2 801a5a0: b9 e0 58 00 mv r11,r15 return (void *) 0; 801a5a4: e3 ff ff ef bi 801a560 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 801a5a8: 78 01 08 01 mvhi r1,0x801 801a5ac: 38 21 c8 24 ori r1,r1,0xc824 801a5b0: 28 21 00 00 lw r1,(r1+0) 801a5b4: 44 20 00 03 be r1,r0,801a5c0 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 801a5b8: 34 0b 00 00 mvi r11,0 801a5bc: e3 ff ff e9 bi 801a560 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 801a5c0: 78 02 08 01 mvhi r2,0x801 801a5c4: 38 42 c8 bc ori r2,r2,0xc8bc 801a5c8: 28 42 00 00 lw r2,(r2+0) 801a5cc: 44 41 ff d5 be r2,r1,801a520 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 801a5d0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 801a5d4: e3 ff ff e3 bi 801a560 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 801a5d8: b9 c0 08 00 mv r1,r14 801a5dc: fb ff b6 43 calli 8007ee8 801a5e0: b8 20 58 00 mv r11,r1 801a5e4: e3 ff ff df bi 801a560 * 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 ); 801a5e8: b9 c0 08 00 mv r1,r14 801a5ec: fb ff b6 3f calli 8007ee8 801a5f0: b8 20 78 00 mv r15,r1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 801a5f4: 29 81 00 04 lw r1,(r12+4) 801a5f8: 34 21 ff ff addi r1,r1,-1 801a5fc: 59 81 00 04 sw (r12+4),r1 if ( !new_area ) { 801a600: 45 ed ff ee be r15,r13,801a5b8 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 801a604: 2b 81 00 1c lw r1,(sp+28) 801a608: b9 c0 18 00 mv r3,r14 801a60c: 50 2e 00 02 bgeu r1,r14,801a614 801a610: b8 20 18 00 mv r3,r1 801a614: b9 60 10 00 mv r2,r11 801a618: b9 e0 08 00 mv r1,r15 801a61c: fb ff c8 0f calli 800c658 free( ptr ); 801a620: b9 60 08 00 mv r1,r11 801a624: fb ff b4 79 calli 8007808 801a628: b9 e0 58 00 mv r11,r15 return new_area; 801a62c: e3 ff ff cd bi 801a560 080092bc : #include int rmdir( const char *pathname ) { 80092bc: 37 9c ff c4 addi sp,sp,-60 80092c0: 5b 8b 00 14 sw (sp+20),r11 80092c4: 5b 8c 00 10 sw (sp+16),r12 80092c8: 5b 8d 00 0c sw (sp+12),r13 80092cc: 5b 8e 00 08 sw (sp+8),r14 80092d0: 5b 9d 00 04 sw (sp+4),ra 80092d4: b8 20 60 00 mv r12,r1 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 80092d8: fb ff f9 4a calli 8007800 80092dc: b8 20 58 00 mv r11,r1 if ( parentpathlen == 0 ) 80092e0: 5c 20 00 80 bne r1,r0,80094e0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 80092e4: 41 82 00 00 lbu r2,(r12+0) 80092e8: 64 43 00 5c cmpei r3,r2,92 80092ec: 64 41 00 2f cmpei r1,r2,47 80092f0: b8 61 08 00 or r1,r3,r1 80092f4: 44 2b 00 4e be r1,r11,800942c 80092f8: 78 01 08 07 mvhi r1,0x807 80092fc: 38 21 12 f0 ori r1,r1,0x12f0 8009300: 28 22 00 00 lw r2,(r1+0) 8009304: 34 0d 00 00 mvi r13,0 8009308: 28 41 00 18 lw r1,(r2+24) 800930c: 5b 81 00 2c sw (sp+44),r1 8009310: 28 41 00 1c lw r1,(r2+28) 8009314: 5b 81 00 30 sw (sp+48),r1 8009318: 28 41 00 20 lw r1,(r2+32) 800931c: 5b 81 00 34 sw (sp+52),r1 8009320: 28 41 00 24 lw r1,(r2+36) 8009324: 5b 81 00 38 sw (sp+56),r1 8009328: 28 42 00 28 lw r2,(r2+40) 800932c: 5b 82 00 3c sw (sp+60),r2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8009330: 2b 82 00 2c lw r2,(sp+44) name = pathname + parentpathlen; 8009334: b5 8b 58 00 add r11,r12,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8009338: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800933c: 5b 82 00 18 sw (sp+24),r2 8009340: 2b 82 00 30 lw r2,(sp+48) 8009344: 5b 82 00 1c sw (sp+28),r2 8009348: 2b 82 00 34 lw r2,(sp+52) 800934c: 5b 82 00 20 sw (sp+32),r2 8009350: 2b 82 00 38 lw r2,(sp+56) 8009354: 5b 82 00 24 sw (sp+36),r2 8009358: 2b 82 00 3c lw r2,(sp+60) 800935c: 5b 82 00 28 sw (sp+40),r2 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8009360: f8 01 15 f2 calli 804eb28 8009364: b8 20 10 00 mv r2,r1 8009368: b9 60 08 00 mv r1,r11 800936c: fb ff f9 0c calli 800779c 8009370: b5 61 60 00 add r12,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8009374: b9 80 08 00 mv r1,r12 8009378: f8 01 15 ec calli 804eb28 800937c: 34 03 00 00 mvi r3,0 8009380: 37 8b 00 18 addi r11,sp,24 8009384: b8 20 10 00 mv r2,r1 8009388: b9 60 20 00 mv r4,r11 800938c: b9 80 08 00 mv r1,r12 8009390: b8 60 28 00 mv r5,r3 8009394: fb ff f9 38 calli 8007874 0, &loc, false ); if ( result != 0 ) { 8009398: 5c 20 00 47 bne r1,r0,80094b4 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 800939c: 2b 83 00 24 lw r3,(sp+36) 80093a0: 28 62 00 10 lw r2,(r3+16) 80093a4: 44 41 00 6a be r2,r1,800954c 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 ){ 80093a8: b9 60 08 00 mv r1,r11 80093ac: d8 40 00 00 call r2 80093b0: 34 02 00 01 mvi r2,1 80093b4: 5c 22 00 2e bne r1,r2,800946c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 80093b8: 2b 81 00 20 lw r1,(sp+32) 80093bc: 28 23 00 34 lw r3,(r1+52) 80093c0: 44 60 00 51 be r3,r0,8009504 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 80093c4: 37 8e 00 2c addi r14,sp,44 80093c8: b9 60 10 00 mv r2,r11 80093cc: b9 c0 08 00 mv r1,r14 80093d0: d8 60 00 00 call r3 rtems_filesystem_freenode( &loc ); 80093d4: 2b 82 00 24 lw r2,(sp+36) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 80093d8: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 80093dc: 44 40 00 05 be r2,r0,80093f0 80093e0: 28 42 00 1c lw r2,(r2+28) 80093e4: 44 40 00 03 be r2,r0,80093f0 80093e8: b9 60 08 00 mv r1,r11 80093ec: d8 40 00 00 call r2 if ( free_parentloc ) 80093f0: 45 a0 00 07 be r13,r0,800940c rtems_filesystem_freenode( &parentloc ); 80093f4: 2b 81 00 38 lw r1,(sp+56) 80093f8: 44 20 00 05 be r1,r0,800940c 80093fc: 28 22 00 1c lw r2,(r1+28) 8009400: 44 40 00 03 be r2,r0,800940c 8009404: b9 c0 08 00 mv r1,r14 8009408: d8 40 00 00 call r2 return result; } 800940c: b9 80 08 00 mv r1,r12 8009410: 2b 9d 00 04 lw ra,(sp+4) 8009414: 2b 8b 00 14 lw r11,(sp+20) 8009418: 2b 8c 00 10 lw r12,(sp+16) 800941c: 2b 8d 00 0c lw r13,(sp+12) 8009420: 2b 8e 00 08 lw r14,(sp+8) 8009424: 37 9c 00 3c addi sp,sp,60 8009428: c3 a0 00 00 ret */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 800942c: 44 40 ff b3 be r2,r0,80092f8 <== NOT EXECUTED 8009430: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8009434: 38 21 12 f0 ori r1,r1,0x12f0 <== NOT EXECUTED 8009438: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800943c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED 8009440: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8009444: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 8009448: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800944c: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 8009450: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8009454: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 8009458: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 800945c: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 8009460: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 8009464: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 8009468: e3 ff ff b2 bi 8009330 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 800946c: 2b 81 00 24 lw r1,(sp+36) 8009470: 44 20 00 05 be r1,r0,8009484 8009474: 28 22 00 1c lw r2,(r1+28) 8009478: 44 40 00 03 be r2,r0,8009484 800947c: b9 60 08 00 mv r1,r11 8009480: d8 40 00 00 call r2 if ( free_parentloc ) 8009484: 45 a0 00 07 be r13,r0,80094a0 rtems_filesystem_freenode( &parentloc ); 8009488: 2b 81 00 38 lw r1,(sp+56) 800948c: 44 20 00 05 be r1,r0,80094a0 8009490: 28 22 00 1c lw r2,(r1+28) 8009494: 44 40 00 03 be r2,r0,80094a0 8009498: 37 81 00 2c addi r1,sp,44 800949c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 80094a0: f8 00 f7 b8 calli 8047380 <__errno> 80094a4: 34 02 00 14 mvi r2,20 80094a8: 58 22 00 00 sw (r1+0),r2 80094ac: 34 0c ff ff mvi r12,-1 80094b0: e3 ff ff d7 bi 800940c name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 80094b4: 5d a0 00 03 bne r13,r0,80094c0 result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 80094b8: 34 0c ff ff mvi r12,-1 80094bc: e3 ff ff d4 bi 800940c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 80094c0: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 80094c4: 44 20 ff fd be r1,r0,80094b8 <== NOT EXECUTED 80094c8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80094cc: 44 40 ff fb be r2,r0,80094b8 <== NOT EXECUTED 80094d0: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 80094d4: d8 40 00 00 call r2 <== NOT EXECUTED 80094d8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 80094dc: e3 ff ff cc bi 800940c <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 80094e0: b9 80 08 00 mv r1,r12 80094e4: b9 60 10 00 mv r2,r11 80094e8: 34 03 00 02 mvi r3,2 80094ec: 37 84 00 2c addi r4,sp,44 80094f0: 34 05 00 00 mvi r5,0 80094f4: fb ff f9 23 calli 8007980 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 80094f8: 5c 20 ff f0 bne r1,r0,80094b8 80094fc: 34 0d 00 01 mvi r13,1 8009500: e3 ff ff 8c bi 8009330 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 8009504: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED 8009508: 44 23 00 05 be r1,r3,800951c <== NOT EXECUTED 800950c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8009510: 44 40 00 03 be r2,r0,800951c <== NOT EXECUTED 8009514: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009518: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_parentloc ) 800951c: 45 a0 00 07 be r13,r0,8009538 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 8009520: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 8009524: 44 20 00 05 be r1,r0,8009538 <== NOT EXECUTED 8009528: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800952c: 44 40 00 03 be r2,r0,8009538 <== NOT EXECUTED 8009530: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 8009534: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009538: f8 00 f7 92 calli 8047380 <__errno> <== NOT EXECUTED 800953c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009540: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009544: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8009548: e3 ff ff b1 bi 800940c <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 800954c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8009550: 44 62 ff f3 be r3,r2,800951c <== NOT EXECUTED 8009554: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009558: d8 60 00 00 call r3 <== NOT EXECUTED 800955c: e3 ff ff f0 bi 800951c <== NOT EXECUTED 08013d1c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 8013d1c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 8013d20: 38 21 a1 ac ori r1,r1,0xa1ac <== NOT EXECUTED 8013d24: c3 a0 00 00 ret <== NOT EXECUTED 08010458 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 8010458: 37 9c ff f8 addi sp,sp,-8 801045c: 5b 8b 00 08 sw (sp+8),r11 8010460: 5b 9d 00 04 sw (sp+4),ra 8010464: b8 40 58 00 mv r11,r2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 8010468: f8 00 00 0d calli 801049c if (nap) 801046c: 44 20 00 06 be r1,r0,8010484 return nap->name; 8010470: 28 21 00 00 lw r1,(r1+0) return rtems_assoc_name_bad(local_value); } 8010474: 2b 9d 00 04 lw ra,(sp+4) 8010478: 2b 8b 00 08 lw r11,(sp+8) 801047c: 37 9c 00 08 addi sp,sp,8 8010480: c3 a0 00 00 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 8010484: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010488: f8 00 0e 25 calli 8013d1c <== NOT EXECUTED } 801048c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8010490: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8010494: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8010498: c3 a0 00 00 ret <== NOT EXECUTED 0800bae4 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800bae4: 37 9c ff f4 addi sp,sp,-12 800bae8: 5b 8b 00 0c sw (sp+12),r11 800baec: 5b 8c 00 08 sw (sp+8),r12 800baf0: 5b 9d 00 04 sw (sp+4),ra 800baf4: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800baf8: 28 21 00 00 lw r1,(r1+0) const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800bafc: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800bb00: 44 20 00 1f be r1,r0,800bb7c 800bb04: 78 02 08 01 mvhi r2,0x801 800bb08: 38 42 b5 90 ori r2,r2,0xb590 800bb0c: f8 00 04 ad calli 800cdc0 800bb10: 34 02 00 00 mvi r2,0 800bb14: 5c 22 00 0b bne r1,r2,800bb40 default_ap = ap++; for ( ; ap->name; ap++) 800bb18: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800bb1c: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED for ( ; ap->name; ap++) 800bb20: 44 41 00 0a be r2,r1,800bb48 <== NOT EXECUTED 800bb24: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800bb28: b8 60 58 00 mv r11,r3 <== NOT EXECUTED if (ap->local_value == local_value) 800bb2c: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 800bb30: 44 2c 00 06 be r1,r12,800bb48 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800bb34: 35 6b 00 0c addi r11,r11,12 800bb38: 29 61 00 00 lw r1,(r11+0) 800bb3c: 44 20 00 09 be r1,r0,800bb60 if (ap->local_value == local_value) 800bb40: 29 61 00 04 lw r1,(r11+4) 800bb44: 5c 2c ff fc bne r1,r12,800bb34 return ap; return default_ap; } 800bb48: b9 60 08 00 mv r1,r11 800bb4c: 2b 9d 00 04 lw ra,(sp+4) 800bb50: 2b 8b 00 0c lw r11,(sp+12) 800bb54: 2b 8c 00 08 lw r12,(sp+8) 800bb58: 37 9c 00 0c addi sp,sp,12 800bb5c: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800bb60: b8 40 58 00 mv r11,r2 if (ap->local_value == local_value) return ap; return default_ap; } 800bb64: b9 60 08 00 mv r1,r11 800bb68: 2b 9d 00 04 lw ra,(sp+4) 800bb6c: 2b 8b 00 0c lw r11,(sp+12) 800bb70: 2b 8c 00 08 lw r12,(sp+8) 800bb74: 37 9c 00 0c addi sp,sp,12 800bb78: c3 a0 00 00 ret uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800bb7c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 800bb80: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800bb84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bb88: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800bb8c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800bb90: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800bb94: c3 a0 00 00 ret <== NOT EXECUTED 0800aaac : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800aaac: 37 9c ff f4 addi sp,sp,-12 800aab0: 5b 8b 00 0c sw (sp+12),r11 800aab4: 5b 8c 00 08 sw (sp+8),r12 800aab8: 5b 9d 00 04 sw (sp+4),ra 800aabc: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800aac0: 28 21 00 00 lw r1,(r1+0) const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800aac4: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800aac8: 44 20 00 1f be r1,r0,800ab44 800aacc: 78 02 08 01 mvhi r2,0x801 800aad0: 38 42 b5 90 ori r2,r2,0xb590 800aad4: f8 00 08 bb calli 800cdc0 800aad8: 34 02 00 00 mvi r2,0 800aadc: 5c 22 00 0b bne r1,r2,800ab08 default_ap = ap++; for ( ; ap->name; ap++) 800aae0: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800aae4: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED for ( ; ap->name; ap++) 800aae8: 44 41 00 0a be r2,r1,800ab10 <== NOT EXECUTED 800aaec: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800aaf0: b8 60 58 00 mv r11,r3 <== NOT EXECUTED if (ap->remote_value == remote_value) 800aaf4: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 800aaf8: 44 2c 00 06 be r1,r12,800ab10 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800aafc: 35 6b 00 0c addi r11,r11,12 800ab00: 29 61 00 00 lw r1,(r11+0) 800ab04: 44 20 00 09 be r1,r0,800ab28 if (ap->remote_value == remote_value) 800ab08: 29 61 00 08 lw r1,(r11+8) 800ab0c: 5c 2c ff fc bne r1,r12,800aafc return ap; return default_ap; } 800ab10: b9 60 08 00 mv r1,r11 800ab14: 2b 9d 00 04 lw ra,(sp+4) 800ab18: 2b 8b 00 0c lw r11,(sp+12) 800ab1c: 2b 8c 00 08 lw r12,(sp+8) 800ab20: 37 9c 00 0c addi sp,sp,12 800ab24: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800ab28: b8 40 58 00 mv r11,r2 if (ap->remote_value == remote_value) return ap; return default_ap; } 800ab2c: b9 60 08 00 mv r1,r11 800ab30: 2b 9d 00 04 lw ra,(sp+4) 800ab34: 2b 8b 00 0c lw r11,(sp+12) 800ab38: 2b 8c 00 08 lw r12,(sp+8) 800ab3c: 37 9c 00 0c addi sp,sp,12 800ab40: c3 a0 00 00 ret uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800ab44: b8 20 58 00 mv r11,r1 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 800ab48: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ab4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ab50: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800ab54: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800ab58: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800ab5c: c3 a0 00 00 ret <== NOT EXECUTED 0800b7ac : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800b7ac: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800b7b0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800b7b4: f8 00 00 cc calli 800bae4 <== NOT EXECUTED if (nap) 800b7b8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800b7bc: 44 20 00 02 be r1,r0,800b7c4 <== NOT EXECUTED return nap->remote_value; 800b7c0: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED return 0; } 800b7c4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800b7c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800b7cc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800b7d0: c3 a0 00 00 ret <== NOT EXECUTED 08000f2c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 8000f2c: 37 9c ff f0 addi sp,sp,-16 8000f30: 5b 8b 00 08 sw (sp+8),r11 8000f34: 5b 9d 00 04 sw (sp+4),ra const char *p; if ( !name ) 8000f38: 34 0b 00 00 mvi r11,0 8000f3c: 5c 2b 00 07 bne r1,r11,8000f58 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 8000f5c: 44 6b ff f9 be r3,r11,8000f40 return NULL; value[0] = '\0'; 8000f60: 30 4b 00 00 sb (r2+0),r11 p = rtems_bsp_cmdline_get_param_raw( name ); 8000f64: 5b 82 00 10 sw (sp+16),r2 8000f68: 5b 83 00 0c sw (sp+12),r3 8000f6c: f8 00 00 1e calli 8000fe4 if ( !p ) 8000f70: 2b 82 00 10 lw r2,(sp+16) 8000f74: 2b 83 00 0c lw r3,(sp+12) 8000f78: 44 2b ff f2 be r1,r11,8000f40 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 8000f84: 34 63 ff ff addi r3,r3,-1 8000f88: 44 6b ff ef be r3,r11,8000f44 8000f8c: b9 60 20 00 mv r4,r11 8000f90: b9 60 30 00 mv r6,r11 if ( *p == '\"' ) { 8000f94: 34 08 00 22 mvi r8,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000f98: 34 09 00 20 mvi r9,32 8000f9c: 20 c7 00 01 andi r7,r6,0x1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000fa4: 5c e0 00 02 bne r7,r0,8000fac 8000fa8: 44 a9 ff e7 be r5,r9,8000f44 break; value[i++] = *p++; 8000fac: 34 84 00 01 addi r4,r4,1 8000fb0: b4 4b 58 00 add r11,r2,r11 8000fb4: 31 65 00 00 sb (r11+0),r5 value[i] = '\0'; 8000fb8: 34 07 00 00 mvi r7,0 8000fbc: b4 44 28 00 add r5,r2,r4 8000fc0: 30 a7 00 00 sb (r5+0),r7 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 8000fd4: 54 64 ff f2 bgu r3,r4,8000f9c 8000fd8: e3 ff ff db bi 8000f44 <== NOT EXECUTED if ( *p == '\"' ) { quotes++; 8000fdc: 34 c6 00 01 addi r6,r6,1 <== NOT EXECUTED 8000fe0: e3 ff ff f3 bi 8000fac <== NOT EXECUTED 08001024 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 8001024: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8001028: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 800102c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8001030: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8001034: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8001038: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800103c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 8001040: fb ff ff bb calli 8000f2c <== NOT EXECUTED 8001044: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 8001048: 5c 20 00 09 bne r1,r0,800106c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 800104c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED } 8001050: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001054: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001058: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800105c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8001060: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8001064: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8001068: c3 a0 00 00 ret <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 800106c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8001070: f8 00 2f 70 calli 800ce30 <== NOT EXECUTED 8001074: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED if ( *rhs != '=' ) 8001078: 40 23 00 00 lbu r3,(r1+0) <== NOT EXECUTED 800107c: 34 02 00 3d mvi r2,61 <== NOT EXECUTED 8001080: 5c 62 ff f3 bne r3,r2,800104c <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 8001084: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED 8001088: 34 02 00 22 mvi r2,34 <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 800108c: 34 25 00 01 addi r5,r1,1 <== NOT EXECUTED if ( *rhs == '\"' ) 8001090: 44 82 00 16 be r4,r2,80010e8 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 8001094: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8001098: 44 80 00 06 be r4,r0,80010b0 <== NOT EXECUTED *d++ = *rhs++; 800109c: 30 64 00 00 sb (r3+0),r4 <== NOT EXECUTED 80010a0: 34 a5 00 01 addi r5,r5,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 80010a4: 40 a4 00 00 lbu r4,(r5+0) <== NOT EXECUTED *d++ = *rhs++; 80010a8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 80010ac: 5c 80 ff fc bne r4,r0,800109c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 80010b0: 40 64 ff ff lbu r4,(r3+-1) <== NOT EXECUTED 80010b4: 34 02 00 22 mvi r2,34 <== NOT EXECUTED 80010b8: 34 61 ff ff addi r1,r3,-1 <== NOT EXECUTED 80010bc: 44 82 00 02 be r4,r2,80010c4 <== NOT EXECUTED 80010c0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED d--; *d = '\0'; 80010c4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80010c8: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED return value; } 80010cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80010d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80010d4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80010d8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80010dc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80010e0: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80010e4: c3 a0 00 00 ret <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 80010e8: 40 24 00 02 lbu r4,(r1+2) <== NOT EXECUTED 80010ec: 34 25 00 02 addi r5,r1,2 <== NOT EXECUTED 80010f0: e3 ff ff e9 bi 8001094 <== NOT EXECUTED 0800fe3c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 800fe3c: b8 20 18 00 mv r3,r1 if ( !routine ) 800fe40: 34 01 00 09 mvi r1,9 800fe44: 44 60 00 05 be r3,r0,800fe58 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 800fe48: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 800fe4c: 38 42 ed cc ori r2,r2,0xedcc <== NOT EXECUTED 800fe50: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 800fe54: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 800fe58: c3 a0 00 00 ret 0800b76c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 800b76c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800b770: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800b774: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800b778: b8 20 10 00 mv r2,r1 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 800b77c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800b780: 38 21 b6 28 ori r1,r1,0xb628 <== NOT EXECUTED 800b784: f8 00 00 0a calli 800b7ac <== NOT EXECUTED 800b788: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800b78c: 44 20 00 03 be r1,r0,800b798 <== NOT EXECUTED { errno = rc; 800b790: f8 00 01 0c calli 800bbc0 <__errno> <== NOT EXECUTED 800b794: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED return -1; } return -1; } 800b798: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800b79c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800b7a0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800b7a4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800b7a8: c3 a0 00 00 ret <== NOT EXECUTED 080071c0 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 80071c0: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 80071c4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80071c8: 5b 83 00 0c sw (sp+12),r3 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 80071cc: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 80071d0: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED 80071d4: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED 80071d8: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED 80071dc: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 80071e0: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED 80071e4: 5b 82 00 08 sw (sp+8),r2 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 80071e8: fb ff ff 65 calli 8006f7c <== NOT EXECUTED va_end(arglist); return chars_written; } 80071ec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80071f0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 80071f4: c3 a0 00 00 ret <== NOT EXECUTED 08000ecc : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000ecc: 37 9c ff fc addi sp,sp,-4 8000ed0: 5b 9d 00 04 sw (sp+4),ra /* * Verify Input parameters. */ if ( !pathname ) 8000ed4: 44 20 00 31 be r1,r0,8000f98 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 8000ed8: 44 80 00 2b be r4,r0,8000f84 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 8000edc: 40 26 00 00 lbu r6,(r1+0) 8000ee0: 64 c8 00 5c cmpei r8,r6,92 8000ee4: 64 c7 00 2f cmpei r7,r6,47 8000ee8: b9 07 38 00 or r7,r8,r7 8000eec: 44 e0 00 16 be r7,r0,8000f44 8000ef0: 78 06 08 01 mvhi r6,0x801 8000ef4: 38 c6 c1 10 ori r6,r6,0xc110 8000ef8: 28 c6 00 00 lw r6,(r6+0) 8000efc: 34 07 00 01 mvi r7,1 8000f00: b8 e0 40 00 mv r8,r7 8000f04: 28 c9 00 18 lw r9,(r6+24) 8000f08: 58 89 00 00 sw (r4+0),r9 8000f0c: 28 c9 00 1c lw r9,(r6+28) 8000f10: 58 89 00 04 sw (r4+4),r9 8000f14: 28 c9 00 20 lw r9,(r6+32) 8000f18: 58 89 00 08 sw (r4+8),r9 8000f1c: 28 c9 00 24 lw r9,(r6+36) 8000f20: 58 89 00 0c sw (r4+12),r9 8000f24: 28 c6 00 28 lw r6,(r6+40) 8000f28: 58 86 00 10 sw (r4+16),r6 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 8000f2c: b4 27 08 00 add r1,r1,r7 8000f30: c8 48 10 00 sub r2,r2,r8 8000f34: fb ff ff a3 calli 8000dc0 pathnamelen - i, flags, pathloc, follow_link ); } 8000f38: 2b 9d 00 04 lw ra,(sp+4) 8000f3c: 37 9c 00 04 addi sp,sp,4 8000f40: c3 a0 00 00 ret /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 8000f44: 44 c7 ff eb be r6,r7,8000ef0 8000f48: 78 06 08 01 mvhi r6,0x801 8000f4c: 38 c6 c1 10 ori r6,r6,0xc110 8000f50: 28 c6 00 00 lw r6,(r6+0) 8000f54: b8 e0 40 00 mv r8,r7 8000f58: 28 c9 00 04 lw r9,(r6+4) 8000f5c: 58 89 00 00 sw (r4+0),r9 8000f60: 28 c9 00 08 lw r9,(r6+8) 8000f64: 58 89 00 04 sw (r4+4),r9 8000f68: 28 c9 00 0c lw r9,(r6+12) 8000f6c: 58 89 00 08 sw (r4+8),r9 8000f70: 28 c9 00 10 lw r9,(r6+16) 8000f74: 58 89 00 0c sw (r4+12),r9 8000f78: 28 c6 00 14 lw r6,(r6+20) 8000f7c: 58 86 00 10 sw (r4+16),r6 8000f80: e3 ff ff eb bi 8000f2c if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000f84: f8 00 2b 0f calli 800bbc0 <__errno> <== NOT EXECUTED 8000f88: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000f8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000f90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000f94: e3 ff ff e9 bi 8000f38 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 8000f98: f8 00 2b 0a calli 800bbc0 <__errno> 8000f9c: 34 02 00 0e mvi r2,14 8000fa0: 58 22 00 00 sw (r1+0),r2 8000fa4: 34 01 ff ff mvi r1,-1 8000fa8: e3 ff ff e4 bi 8000f38 08000dc0 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000dc0: 37 9c ff f0 addi sp,sp,-16 8000dc4: 5b 8b 00 10 sw (sp+16),r11 8000dc8: 5b 8c 00 0c sw (sp+12),r12 8000dcc: 5b 8d 00 08 sw (sp+8),r13 8000dd0: 5b 9d 00 04 sw (sp+4),ra 8000dd4: b8 a0 60 00 mv r12,r5 8000dd8: b8 60 68 00 mv r13,r3 8000ddc: b8 80 58 00 mv r11,r4 /* * Verify Input parameters. */ if ( !pathname ) 8000de0: 44 20 00 33 be r1,r0,8000eac rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 8000de4: 44 80 00 2d be r4,r0,8000e98 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 8000de8: 28 85 00 0c lw r5,(r4+12) 8000dec: 28 a6 00 00 lw r6,(r5+0) 8000df0: 44 c0 00 25 be r6,r0,8000e84 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 8000df4: d8 c0 00 00 call r6 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 8000df8: 7d 8c 00 00 cmpnei r12,r12,0 8000dfc: 64 24 00 00 cmpei r4,r1,0 8000e00: a0 8c 60 00 and r12,r4,r12 8000e04: 45 80 00 0a be r12,r0,8000e2c if ( !pathloc->ops->node_type_h ){ 8000e08: 29 61 00 0c lw r1,(r11+12) 8000e0c: 28 24 00 10 lw r4,(r1+16) 8000e10: 44 80 00 19 be r4,r0,8000e74 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 8000e14: b9 60 08 00 mv r1,r11 8000e18: d8 80 00 00 call r4 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 8000e1c: 34 21 ff fd addi r1,r1,-3 8000e20: 34 02 00 01 mvi r2,1 8000e24: 50 41 00 08 bgeu r2,r1,8000e44 8000e28: 34 01 00 00 mvi r1,0 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 8000e2c: 2b 9d 00 04 lw ra,(sp+4) 8000e30: 2b 8b 00 10 lw r11,(sp+16) 8000e34: 2b 8c 00 0c lw r12,(sp+12) 8000e38: 2b 8d 00 08 lw r13,(sp+8) 8000e3c: 37 9c 00 10 addi sp,sp,16 8000e40: c3 a0 00 00 ret type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 8000e44: 29 61 00 0c lw r1,(r11+12) 8000e48: 28 23 00 34 lw r3,(r1+52) 8000e4c: 44 60 00 1d be r3,r0,8000ec0 * 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 ); 8000e50: b9 60 08 00 mv r1,r11 8000e54: b9 a0 10 00 mv r2,r13 8000e58: d8 60 00 00 call r3 } } return result; } 8000e5c: 2b 9d 00 04 lw ra,(sp+4) 8000e60: 2b 8b 00 10 lw r11,(sp+16) 8000e64: 2b 8c 00 0c lw r12,(sp+12) 8000e68: 2b 8d 00 08 lw r13,(sp+8) 8000e6c: 37 9c 00 10 addi sp,sp,16 8000e70: c3 a0 00 00 ret */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 8000e74: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000e78: 44 44 00 03 be r2,r4,8000e84 <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 8000e7c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000e80: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000e84: f8 00 2b 4f calli 800bbc0 <__errno> <== NOT EXECUTED 8000e88: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000e8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000e90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000e94: e3 ff ff e6 bi 8000e2c <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000e98: f8 00 2b 4a calli 800bbc0 <__errno> <== NOT EXECUTED 8000e9c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000ea0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000ea4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000ea8: e3 ff ff e1 bi 8000e2c <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 8000eac: f8 00 2b 45 calli 800bbc0 <__errno> <== NOT EXECUTED 8000eb0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000eb4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000eb8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000ebc: e3 ff ff dc bi 8000e2c <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 8000ec0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000ec4: 5c 43 ff ee bne r2,r3,8000e7c <== NOT EXECUTED 8000ec8: e3 ff ff ef bi 8000e84 <== NOT EXECUTED 08000b64 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8000b64: 37 9c ff d8 addi sp,sp,-40 8000b68: 5b 8b 00 10 sw (sp+16),r11 8000b6c: 5b 8c 00 0c sw (sp+12),r12 8000b70: 5b 8d 00 08 sw (sp+8),r13 8000b74: 5b 9d 00 04 sw (sp+4),ra /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b78: 78 0b 08 01 mvhi r11,0x801 8000b7c: 39 6b c1 10 ori r11,r11,0xc110 8000b80: 29 62 00 00 lw r2,(r11+0) 8000b84: 34 01 00 12 mvi r1,18 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b88: 34 0c 00 00 mvi r12,0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b8c: 58 41 00 2c sw (r2+44),r1 init_fs_mount_table(); 8000b90: f8 00 01 ef calli 800134c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b94: 78 01 08 01 mvhi r1,0x801 8000b98: 38 21 ad c4 ori r1,r1,0xadc4 8000b9c: 28 21 00 00 lw r1,(r1+0) 8000ba0: 44 2c 00 49 be r1,r12,8000cc4 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8000ba4: 78 01 08 01 mvhi r1,0x801 8000ba8: 38 21 c0 18 ori r1,r1,0xc018 8000bac: 28 24 00 00 lw r4,(r1+0) status = mount( 8000bb0: 37 81 00 28 addi r1,sp,40 8000bb4: 28 82 00 00 lw r2,(r4+0) 8000bb8: 28 85 00 0c lw r5,(r4+12) 8000bbc: 28 83 00 04 lw r3,(r4+4) 8000bc0: 28 84 00 08 lw r4,(r4+8) 8000bc4: f8 00 01 ea calli 800136c &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8000bc8: 34 02 ff ff mvi r2,-1 8000bcc: 44 22 00 44 be r1,r2,8000cdc * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bd0: 2b 87 00 28 lw r7,(sp+40) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8000bd4: 29 66 00 00 lw r6,(r11+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); 8000bd8: 37 8d 00 14 addi r13,sp,20 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bdc: 28 e2 00 1c lw r2,(r7+28) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000be0: 78 01 08 01 mvhi r1,0x801 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8000be4: 0c cc 00 30 sh (r6+48),r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000be8: 58 c2 00 18 sw (r6+24),r2 8000bec: 28 e4 00 20 lw r4,(r7+32) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000bf0: 34 02 00 01 mvi r2,1 8000bf4: b9 80 18 00 mv r3,r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bf8: 58 c4 00 1c sw (r6+28),r4 8000bfc: 28 e8 00 24 lw r8,(r7+36) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c00: b9 a0 20 00 mv r4,r13 8000c04: b9 80 28 00 mv r5,r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000c08: 58 c8 00 20 sw (r6+32),r8 8000c0c: 28 e8 00 28 lw r8,(r7+40) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c10: 38 21 b0 20 ori r1,r1,0xb020 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000c14: 58 c8 00 24 sw (r6+36),r8 8000c18: 28 e7 00 2c lw r7,(r7+44) 8000c1c: 58 c7 00 28 sw (r6+40),r7 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c20: f8 00 00 ab calli 8000ecc rtems_filesystem_root = loc; 8000c24: 2b 82 00 14 lw r2,(sp+20) 8000c28: 29 66 00 00 lw r6,(r11+0) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c2c: 78 01 08 01 mvhi r1,0x801 8000c30: b9 80 18 00 mv r3,r12 * 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; 8000c34: 58 c2 00 18 sw (r6+24),r2 8000c38: 2b 87 00 18 lw r7,(sp+24) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c3c: b9 a0 20 00 mv r4,r13 8000c40: 34 02 00 01 mvi r2,1 * 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; 8000c44: 58 c7 00 1c sw (r6+28),r7 8000c48: 2b 88 00 1c lw r8,(sp+28) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c4c: 38 21 b0 20 ori r1,r1,0xb020 8000c50: b9 80 28 00 mv r5,r12 * 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; 8000c54: 58 c8 00 20 sw (r6+32),r8 8000c58: 2b 87 00 20 lw r7,(sp+32) 8000c5c: 58 c7 00 24 sw (r6+36),r7 8000c60: 2b 88 00 24 lw r8,(sp+36) 8000c64: 58 c8 00 28 sw (r6+40),r8 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c68: f8 00 00 99 calli 8000ecc rtems_filesystem_current = loc; 8000c6c: 2b 82 00 14 lw r2,(sp+20) 8000c70: 29 63 00 00 lw r3,(r11+0) * * 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); 8000c74: 78 01 08 01 mvhi r1,0x801 8000c78: 38 21 b0 24 ori r1,r1,0xb024 /* 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; 8000c7c: 58 62 00 04 sw (r3+4),r2 8000c80: 2b 84 00 18 lw r4,(sp+24) * * 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); 8000c84: 34 02 01 ff mvi r2,511 /* 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; 8000c88: 58 64 00 08 sw (r3+8),r4 8000c8c: 2b 87 00 1c lw r7,(sp+28) 8000c90: 58 67 00 0c sw (r3+12),r7 8000c94: 2b 88 00 20 lw r8,(sp+32) 8000c98: 58 68 00 10 sw (r3+16),r8 8000c9c: 2b 84 00 24 lw r4,(sp+36) 8000ca0: 58 64 00 14 sw (r3+20),r4 * * 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); 8000ca4: f8 00 01 3f calli 80011a0 if ( status != 0 ) 8000ca8: 5c 20 00 0a bne r1,r0,8000cd0 * 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. */ } 8000cac: 2b 9d 00 04 lw ra,(sp+4) 8000cb0: 2b 8b 00 10 lw r11,(sp+16) 8000cb4: 2b 8c 00 0c lw r12,(sp+12) 8000cb8: 2b 8d 00 08 lw r13,(sp+8) 8000cbc: 37 9c 00 28 addi sp,sp,40 8000cc0: c3 a0 00 00 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 8000cc4: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000cc8: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8000ccc: f8 00 07 1b calli 8002938 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 8000cd0: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000cd4: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED 8000cd8: f8 00 07 18 calli 8002938 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 8000cdc: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000ce0: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED 8000ce4: f8 00 07 15 calli 8002938 <== NOT EXECUTED 08009944 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8009944: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8009948: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 800994c: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED 8009950: c3 a0 00 00 ret <== NOT EXECUTED 08000ce8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 8000ce8: b8 20 38 00 mv r7,r1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 8000cec: 40 21 00 00 lbu r1,(r1+0) 8000cf0: 7c 44 00 00 cmpnei r4,r2,0 8000cf4: 7c 23 00 00 cmpnei r3,r1,0 8000cf8: a0 83 18 00 and r3,r4,r3 8000cfc: 44 60 00 12 be r3,r0,8000d44 8000d00: 64 23 00 2f cmpei r3,r1,47 8000d04: 64 21 00 5c cmpei r1,r1,92 8000d08: b8 23 08 00 or r1,r1,r3 8000d0c: 44 20 00 0e be r1,r0,8000d44 8000d10: 34 01 00 00 mvi r1,0 { pathname++; pathnamelen--; stripped++; 8000d14: 34 21 00 01 addi r1,r1,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 8000d18: b4 e1 18 00 add r3,r7,r1 8000d1c: 40 63 00 00 lbu r3,(r3+0) 8000d20: fc 41 30 00 cmpne r6,r2,r1 8000d24: 7c 64 00 00 cmpnei r4,r3,0 8000d28: 64 65 00 2f cmpei r5,r3,47 8000d2c: 64 63 00 5c cmpei r3,r3,92 8000d30: a0 c4 20 00 and r4,r6,r4 8000d34: b8 65 18 00 or r3,r3,r5 8000d38: 44 80 00 04 be r4,r0,8000d48 8000d3c: 5c 60 ff f6 bne r3,r0,8000d14 8000d40: c3 a0 00 00 ret 8000d44: 34 01 00 00 mvi r1,0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 8000d48: c3 a0 00 00 ret <== NOT EXECUTED 08000a08 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 8000a08: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8000a0c: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8000a10: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8000a14: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8000a18: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8000a1c: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8000a20: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8000a24: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000a28: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8000a2c: b8 20 60 00 mv r12,r1 <== 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 ); 8000a30: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED 8000a34: f8 00 31 33 calli 800cf00 <== NOT EXECUTED 8000a38: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8000a3c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8000a40: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8000a44: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8000a48: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8000a4c: f8 00 01 20 calli 8000ecc <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 8000a50: 2b 82 00 2c lw r2,(sp+44) <== 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 ); 8000a54: b8 20 78 00 mv r15,r1 <== NOT EXECUTED the_jnode = loc.node_access; 8000a58: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 8000a5c: 28 43 00 10 lw r3,(r2+16) <== NOT EXECUTED 8000a60: 44 60 00 17 be r3,r0,8000abc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 8000a64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a68: d8 60 00 00 call r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 8000a6c: 7c 21 00 02 cmpnei r1,r1,2 <== NOT EXECUTED 8000a70: 7d ee 00 00 cmpnei r14,r15,0 <== NOT EXECUTED 8000a74: b8 2e 70 00 or r14,r1,r14 <== NOT EXECUTED 8000a78: 45 c0 00 1a be r14,r0,8000ae0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000a7c: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8000a80: 44 20 00 28 be r1,r0,8000b20 <== NOT EXECUTED 8000a84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000a88: 44 40 00 26 be r2,r0,8000b20 <== NOT EXECUTED 8000a8c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a90: d8 40 00 00 call r2 <== NOT EXECUTED 8000a94: 34 01 00 0d mvi r1,13 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 8000a98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000a9c: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8000aa0: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8000aa4: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8000aa8: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8000aac: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8000ab0: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8000ab4: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8000ab8: c3 a0 00 00 ret <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 8000abc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8000ac0: 44 43 00 03 be r2,r3,8000acc <== NOT EXECUTED 8000ac4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000ac8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000acc: f8 00 2c 3d calli 800bbc0 <__errno> <== NOT EXECUTED 8000ad0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000ad4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000ad8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000adc: e3 ff ff ef bi 8000a98 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 8000ae0: 59 ac 00 00 sw (r13+0),r12 <== NOT EXECUTED device_info->device_name_length = strlen( name ); 8000ae4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8000ae8: f8 00 31 06 calli 800cf00 <== NOT EXECUTED 8000aec: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 8000af0: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED 8000af4: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 8000af8: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000afc: 2b 81 00 2c lw r1,(sp+44) <== 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; 8000b00: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000b04: 44 2e 00 09 be r1,r14,8000b28 <== NOT EXECUTED 8000b08: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000b0c: 44 40 00 07 be r2,r0,8000b28 <== NOT EXECUTED 8000b10: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000b14: d8 40 00 00 call r2 <== NOT EXECUTED 8000b18: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8000b1c: e3 ff ff df bi 8000a98 <== NOT EXECUTED 8000b20: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8000b24: e3 ff ff dd bi 8000a98 <== NOT EXECUTED 8000b28: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8000b2c: e3 ff ff db bi 8000a98 <== NOT EXECUTED 08004e04 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e04: 37 9c ff ec addi sp,sp,-20 8004e08: 5b 8b 00 10 sw (sp+16),r11 8004e0c: 5b 8c 00 0c sw (sp+12),r12 8004e10: 5b 8d 00 08 sw (sp+8),r13 8004e14: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e18: 78 04 08 02 mvhi r4,0x802 8004e1c: 38 84 49 4c ori r4,r4,0x494c 8004e20: 28 85 00 00 lw r5,(r4+0) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e24: 78 04 08 02 mvhi r4,0x802 8004e28: 38 84 4b 68 ori r4,r4,0x4b68 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e2c: b8 20 58 00 mv r11,r1 8004e30: b8 40 60 00 mv r12,r2 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e34: 34 01 00 12 mvi r1,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e38: 28 82 00 00 lw r2,(r4+0) if ( rtems_interrupt_is_in_progress() ) 8004e3c: 5c a0 00 08 bne r5,r0,8004e5c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004e40: 44 65 00 52 be r3,r5,8004f88 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 8004e44: 58 62 00 00 sw (r3+0),r2 if ( driver_table == NULL ) 8004e48: 45 80 00 50 be r12,r0,8004f88 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004e4c: 29 81 00 00 lw r1,(r12+0) 8004e50: 44 20 00 4c be r1,r0,8004f80 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 8004e54: 54 4b 00 08 bgu r2,r11,8004e74 8004e58: 34 01 00 0a mvi r1,10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004e5c: 2b 9d 00 04 lw ra,(sp+4) 8004e60: 2b 8b 00 10 lw r11,(sp+16) 8004e64: 2b 8c 00 0c lw r12,(sp+12) 8004e68: 2b 8d 00 08 lw r13,(sp+8) 8004e6c: 37 9c 00 14 addi sp,sp,20 8004e70: c3 a0 00 00 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004e74: 78 01 08 02 mvhi r1,0x802 8004e78: 38 21 48 b4 ori r1,r1,0x48b4 8004e7c: 28 22 00 00 lw r2,(r1+0) 8004e80: 34 42 00 01 addi r2,r2,1 8004e84: 58 22 00 00 sw (r1+0),r2 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004e88: 5d 60 00 2a bne r11,r0,8004f30 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 8004e8c: 28 84 00 00 lw r4,(r4+0) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004e90: 44 8b 00 48 be r4,r11,8004fb0 8004e94: 78 01 08 02 mvhi r1,0x802 8004e98: 38 21 4b 6c ori r1,r1,0x4b6c 8004e9c: 28 2d 00 00 lw r13,(r1+0) 8004ea0: b9 a0 08 00 mv r1,r13 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004ea4: 28 22 00 00 lw r2,(r1+0) 8004ea8: 44 40 00 3f be r2,r0,8004fa4 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004eac: 35 6b 00 01 addi r11,r11,1 8004eb0: 34 21 00 18 addi r1,r1,24 8004eb4: 54 8b ff fc bgu r4,r11,8004ea4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004eb8: 58 6b 00 00 sw (r3+0),r11 if ( m != n ) 8004ebc: 44 8b 00 3e be r4,r11,8004fb4 8004ec0: b5 6b 08 00 add r1,r11,r11 8004ec4: b4 2b 08 00 add r1,r1,r11 8004ec8: 34 02 00 03 mvi r2,3 8004ecc: fb ff ef 46 calli 8000be4 <__ashlsi3> 8004ed0: b5 a1 08 00 add r1,r13,r1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 8004ed4: 29 82 00 00 lw r2,(r12+0) 8004ed8: 58 22 00 00 sw (r1+0),r2 8004edc: 29 82 00 04 lw r2,(r12+4) 8004ee0: 58 22 00 04 sw (r1+4),r2 8004ee4: 29 82 00 08 lw r2,(r12+8) 8004ee8: 58 22 00 08 sw (r1+8),r2 8004eec: 29 82 00 0c lw r2,(r12+12) 8004ef0: 58 22 00 0c sw (r1+12),r2 8004ef4: 29 82 00 10 lw r2,(r12+16) 8004ef8: 58 22 00 10 sw (r1+16),r2 8004efc: 29 8c 00 14 lw r12,(r12+20) 8004f00: 58 2c 00 14 sw (r1+20),r12 _Thread_Enable_dispatch(); 8004f04: f8 00 07 ca calli 8006e2c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 8004f08: 34 02 00 00 mvi r2,0 8004f0c: b9 60 08 00 mv r1,r11 8004f10: b8 40 18 00 mv r3,r2 8004f14: f8 00 28 bc calli 800f204 } 8004f18: 2b 9d 00 04 lw ra,(sp+4) 8004f1c: 2b 8b 00 10 lw r11,(sp+16) 8004f20: 2b 8c 00 0c lw r12,(sp+12) 8004f24: 2b 8d 00 08 lw r13,(sp+8) 8004f28: 37 9c 00 14 addi sp,sp,20 8004f2c: c3 a0 00 00 ret _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f30: b5 6b 08 00 add r1,r11,r11 8004f34: 34 02 00 03 mvi r2,3 8004f38: 78 0d 08 02 mvhi r13,0x802 8004f3c: b4 2b 08 00 add r1,r1,r11 8004f40: 5b 83 00 14 sw (sp+20),r3 8004f44: 39 ad 4b 6c ori r13,r13,0x4b6c 8004f48: fb ff ef 27 calli 8000be4 <__ashlsi3> 8004f4c: 29 a2 00 00 lw r2,(r13+0) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f50: 2b 83 00 14 lw r3,(sp+20) _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f54: b4 41 08 00 add r1,r2,r1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f58: 28 22 00 00 lw r2,(r1+0) 8004f5c: 44 40 00 19 be r2,r0,8004fc0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 8004f60: f8 00 07 b3 calli 8006e2c <_Thread_Enable_dispatch> 8004f64: 34 01 00 0c mvi r1,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004f68: 2b 9d 00 04 lw ra,(sp+4) 8004f6c: 2b 8b 00 10 lw r11,(sp+16) 8004f70: 2b 8c 00 0c lw r12,(sp+12) 8004f74: 2b 8d 00 08 lw r13,(sp+8) 8004f78: 37 9c 00 14 addi sp,sp,20 8004f7c: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f80: 29 85 00 04 lw r5,(r12+4) 8004f84: 5c a1 ff b4 bne r5,r1,8004e54 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 8004f88: 34 01 00 09 mvi r1,9 } 8004f8c: 2b 9d 00 04 lw ra,(sp+4) 8004f90: 2b 8b 00 10 lw r11,(sp+16) 8004f94: 2b 8c 00 0c lw r12,(sp+12) 8004f98: 2b 8d 00 08 lw r13,(sp+8) 8004f9c: 37 9c 00 14 addi sp,sp,20 8004fa0: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fa4: 28 25 00 04 lw r5,(r1+4) 8004fa8: 5c a2 ff c1 bne r5,r2,8004eac 8004fac: e3 ff ff c3 bi 8004eb8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004fb0: 58 6b 00 00 sw (r3+0),r11 <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 8004fb4: f8 00 07 9e calli 8006e2c <_Thread_Enable_dispatch> 8004fb8: 34 01 00 05 mvi r1,5 return sc; 8004fbc: e3 ff ff a8 bi 8004e5c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fc0: 28 24 00 04 lw r4,(r1+4) 8004fc4: 5c 82 ff e7 bne r4,r2,8004f60 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 8004fc8: 58 6b 00 00 sw (r3+0),r11 8004fcc: e3 ff ff c2 bi 8004ed4 08000fac : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 8000fac: 37 9c ff f4 addi sp,sp,-12 8000fb0: 5b 8b 00 0c sw (sp+12),r11 8000fb4: 5b 8c 00 08 sw (sp+8),r12 8000fb8: 5b 9d 00 04 sw (sp+4),ra rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 8000fbc: 78 0b 08 01 mvhi r11,0x801 8000fc0: 39 6b c0 10 ori r11,r11,0xc010 8000fc4: 29 61 00 00 lw r1,(r11+0) 8000fc8: 44 20 00 1e be r1,r0,8001040 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 8000fcc: 34 02 00 48 mvi r2,72 8000fd0: f8 00 19 b7 calli 80076ac 8000fd4: b8 20 60 00 mv r12,r1 8000fd8: 78 01 08 01 mvhi r1,0x801 8000fdc: 38 21 c6 9c ori r1,r1,0xc69c 8000fe0: 58 2c 00 00 sw (r1+0),r12 8000fe4: b9 80 10 00 mv r2,r12 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 8000fe8: 45 80 00 2b be r12,r0,8001094 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 8000fec: 78 01 08 01 mvhi r1,0x801 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8000ff0: 29 64 00 00 lw r4,(r11+0) rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 8000ff4: 38 21 c6 a0 ori r1,r1,0xc6a0 8000ff8: 58 2c 00 00 sw (r1+0),r12 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8000ffc: 34 03 00 01 mvi r3,1 8001000: 50 64 00 0e bgeu r3,r4,8001038 8001004: 35 82 00 48 addi r2,r12,72 iop->data1 = iop + 1; 8001008: 58 42 ff f0 sw (r2+-16),r2 800100c: 34 63 00 01 addi r3,r3,1 8001010: 34 42 00 48 addi r2,r2,72 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++) 8001014: 5c 64 ff fd bne r3,r4,8001008 8001018: 34 61 ff ff addi r1,r3,-1 800101c: 34 02 00 03 mvi r2,3 8001020: fb ff fc 74 calli 80001f0 <__ashlsi3> 8001024: 34 02 00 03 mvi r2,3 8001028: b8 20 58 00 mv r11,r1 800102c: fb ff fc 71 calli 80001f0 <__ashlsi3> 8001030: b5 61 08 00 add r1,r11,r1 8001034: b5 81 10 00 add r2,r12,r1 iop->data1 = iop + 1; iop->data1 = NULL; 8001038: 34 01 00 00 mvi r1,0 800103c: 58 41 00 38 sw (r2+56),r1 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 8001040: 78 01 4c 42 mvhi r1,0x4c42 8001044: 78 05 08 01 mvhi r5,0x801 8001048: 34 03 00 54 mvi r3,84 800104c: 38 21 49 4f ori r1,r1,0x494f 8001050: 38 a5 c6 a4 ori r5,r5,0xc6a4 8001054: 34 02 00 01 mvi r2,1 8001058: 34 04 00 00 mvi r4,0 800105c: f8 00 04 48 calli 800217c 8001060: b8 20 18 00 mv r3,r1 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 8001064: 5c 20 00 0b bne r1,r0,8001090 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 8001068: 78 02 08 01 mvhi r2,0x801 800106c: 38 42 c0 0c ori r2,r2,0xc00c 8001070: 28 41 00 00 lw r1,(r2+0) 8001074: 44 23 00 02 be r1,r3,800107c (* rtems_fs_init_helper)(); 8001078: d8 20 00 00 call r1 } 800107c: 2b 9d 00 04 lw ra,(sp+4) 8001080: 2b 8b 00 0c lw r11,(sp+12) 8001084: 2b 8c 00 08 lw r12,(sp+8) 8001088: 37 9c 00 0c addi sp,sp,12 800108c: c3 a0 00 00 ret RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 8001090: f8 00 06 2a calli 8002938 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 8001094: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 8001098: f8 00 06 28 calli 8002938 <== NOT EXECUTED 0802b2e8 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 802b2e8: 37 9c ff d0 addi sp,sp,-48 802b2ec: 5b 8b 00 18 sw (sp+24),r11 802b2f0: 5b 8c 00 14 sw (sp+20),r12 802b2f4: 5b 8d 00 10 sw (sp+16),r13 802b2f8: 5b 8e 00 0c sw (sp+12),r14 802b2fc: 5b 8f 00 08 sw (sp+8),r15 802b300: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 802b304: 34 01 00 00 mvi r1,0 802b308: b8 20 10 00 mv r2,r1 802b30c: 37 83 00 30 addi r3,sp,48 802b310: f8 00 06 6f calli 802cccc 802b314: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) return sc; 802b318: b8 20 78 00 mv r15,r1 802b31c: 5c 20 00 60 bne r1,r0,802b49c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 802b320: 78 0d 08 07 mvhi r13,0x807 802b324: 39 ad 12 f0 ori r13,r13,0x12f0 802b328: 29 ab 00 00 lw r11,(r13+0) 802b32c: 78 0c 08 07 mvhi r12,0x807 802b330: 39 8c 4e e4 ori r12,r12,0x4ee4 802b334: 45 6c 00 63 be r11,r12,802b4c0 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b338: 29 81 00 00 lw r1,(r12+0) rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b33c: 78 06 08 07 mvhi r6,0x807 802b340: 38 c6 4e d8 ori r6,r6,0x4ed8 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b344: 59 61 00 00 sw (r11+0),r1 802b348: 29 82 00 04 lw r2,(r12+4) * 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); 802b34c: 34 03 00 00 mvi r3,0 802b350: 37 8e 00 1c addi r14,sp,28 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b354: 59 62 00 04 sw (r11+4),r2 802b358: 29 84 00 08 lw r4,(r12+8) * 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); 802b35c: 78 01 08 06 mvhi r1,0x806 802b360: b8 60 28 00 mv r5,r3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b364: 59 64 00 08 sw (r11+8),r4 802b368: 29 87 00 0c lw r7,(r12+12) * 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); 802b36c: 34 02 00 01 mvi r2,1 802b370: 38 21 f7 ec ori r1,r1,0xf7ec return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b374: 59 67 00 0c sw (r11+12),r7 802b378: 29 84 00 10 lw r4,(r12+16) */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 802b37c: b8 60 78 00 mv r15,r3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b380: 59 64 00 10 sw (r11+16),r4 802b384: 29 87 00 14 lw r7,(r12+20) * 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); 802b388: b9 c0 20 00 mv r4,r14 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b38c: 59 67 00 14 sw (r11+20),r7 802b390: 29 87 00 18 lw r7,(r12+24) 802b394: 59 67 00 18 sw (r11+24),r7 802b398: 29 87 00 1c lw r7,(r12+28) 802b39c: 59 67 00 1c sw (r11+28),r7 802b3a0: 29 87 00 20 lw r7,(r12+32) 802b3a4: 59 67 00 20 sw (r11+32),r7 802b3a8: 29 87 00 24 lw r7,(r12+36) 802b3ac: 59 67 00 24 sw (r11+36),r7 802b3b0: 29 87 00 28 lw r7,(r12+40) 802b3b4: 59 67 00 28 sw (r11+40),r7 802b3b8: 29 87 00 2c lw r7,(r12+44) 802b3bc: 59 67 00 2c sw (r11+44),r7 802b3c0: 29 87 00 30 lw r7,(r12+48) 802b3c4: 59 67 00 30 sw (r11+48),r7 802b3c8: 29 87 00 34 lw r7,(r12+52) 802b3cc: 59 67 00 34 sw (r11+52),r7 802b3d0: 29 87 00 38 lw r7,(r12+56) 802b3d4: 59 67 00 38 sw (r11+56),r7 802b3d8: 29 87 00 3c lw r7,(r12+60) 802b3dc: 59 67 00 3c sw (r11+60),r7 802b3e0: 29 87 00 40 lw r7,(r12+64) 802b3e4: 59 67 00 40 sw (r11+64),r7 802b3e8: 29 8c 00 44 lw r12,(r12+68) 802b3ec: 59 6c 00 44 sw (r11+68),r12 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b3f0: 28 c6 00 00 lw r6,(r6+0) } 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*/ 802b3f4: 2b 87 00 30 lw r7,(sp+48) 802b3f8: 59 67 00 00 sw (r11+0),r7 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b3fc: 28 c7 00 1c lw r7,(r6+28) 802b400: 59 67 00 18 sw (r11+24),r7 802b404: 28 c7 00 20 lw r7,(r6+32) 802b408: 59 67 00 1c sw (r11+28),r7 802b40c: 28 c7 00 24 lw r7,(r6+36) 802b410: 59 67 00 20 sw (r11+32),r7 802b414: 28 c7 00 28 lw r7,(r6+40) 802b418: 59 67 00 24 sw (r11+36),r7 802b41c: 28 c6 00 2c lw r6,(r6+44) 802b420: 59 66 00 28 sw (r11+40),r6 * 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); 802b424: fb ff 71 57 calli 8007980 rtems_filesystem_root = loc; 802b428: 2b 82 00 1c lw r2,(sp+28) 802b42c: 29 a6 00 00 lw r6,(r13+0) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b430: 78 01 08 06 mvhi r1,0x806 802b434: b9 c0 20 00 mv r4,r14 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b438: 58 c2 00 18 sw (r6+24),r2 802b43c: 2b 87 00 20 lw r7,(sp+32) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b440: 34 02 00 01 mvi r2,1 802b444: b9 e0 18 00 mv r3,r15 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b448: 58 c7 00 1c sw (r6+28),r7 802b44c: 2b 87 00 24 lw r7,(sp+36) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b450: 38 21 f7 ec ori r1,r1,0xf7ec 802b454: b9 e0 28 00 mv r5,r15 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b458: 58 c7 00 20 sw (r6+32),r7 802b45c: 2b 87 00 28 lw r7,(sp+40) 802b460: 58 c7 00 24 sw (r6+36),r7 802b464: 2b 87 00 2c lw r7,(sp+44) 802b468: 58 c7 00 28 sw (r6+40),r7 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b46c: fb ff 71 45 calli 8007980 rtems_filesystem_current = loc; 802b470: 2b 81 00 1c lw r1,(sp+28) 802b474: 29 a2 00 00 lw r2,(r13+0) 802b478: 58 41 00 04 sw (r2+4),r1 802b47c: 2b 84 00 20 lw r4,(sp+32) 802b480: 58 44 00 08 sw (r2+8),r4 802b484: 2b 87 00 24 lw r7,(sp+36) 802b488: 58 47 00 0c sw (r2+12),r7 802b48c: 2b 81 00 28 lw r1,(sp+40) 802b490: 58 41 00 10 sw (r2+16),r1 802b494: 2b 84 00 2c lw r4,(sp+44) 802b498: 58 44 00 14 sw (r2+20),r4 return RTEMS_SUCCESSFUL; } 802b49c: b9 e0 08 00 mv r1,r15 802b4a0: 2b 9d 00 04 lw ra,(sp+4) 802b4a4: 2b 8b 00 18 lw r11,(sp+24) 802b4a8: 2b 8c 00 14 lw r12,(sp+20) 802b4ac: 2b 8d 00 10 lw r13,(sp+16) 802b4b0: 2b 8e 00 0c lw r14,(sp+12) 802b4b4: 2b 8f 00 08 lw r15,(sp+8) 802b4b8: 37 9c 00 30 addi sp,sp,48 802b4bc: c3 a0 00 00 ret sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 802b4c0: 34 01 00 48 mvi r1,72 802b4c4: fb ff 73 62 calli 800824c 802b4c8: b8 20 58 00 mv r11,r1 if (!tmp) 802b4cc: 34 0f 00 1a mvi r15,26 802b4d0: 44 20 ff f3 be r1,r0,802b49c #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); 802b4d4: 78 03 08 02 mvhi r3,0x802 802b4d8: b9 c0 08 00 mv r1,r14 802b4dc: 38 63 b1 b0 ori r3,r3,0xb1b0 802b4e0: b9 a0 10 00 mv r2,r13 802b4e4: f8 00 07 38 calli 802d1c4 802b4e8: b8 20 78 00 mv r15,r1 if (sc != RTEMS_SUCCESSFUL) { 802b4ec: 5c 20 00 03 bne r1,r0,802b4f8 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 802b4f0: 59 ab 00 00 sw (r13+0),r11 802b4f4: e3 ff ff 91 bi 802b338 sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 802b4f8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b4fc: fb ff 71 59 calli 8007a60 <== NOT EXECUTED return sc; 802b500: e3 ff ff e7 bi 802b49c <== NOT EXECUTED 0802b214 : * 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) { 802b214: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 802b218: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 802b21c: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 802b220: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 802b224: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 802b228: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802b22c: b8 20 70 00 mv r14,r1 <== 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); 802b230: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802b234: 37 83 00 18 addi r3,sp,24 <== NOT EXECUTED 802b238: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802b23c: f8 00 06 a4 calli 802cccc <== NOT EXECUTED 802b240: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 802b244: 5c 20 00 11 bne r1,r0,802b288 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 802b248: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802b24c: 39 6b 12 f0 ori r11,r11,0x12f0 <== NOT EXECUTED 802b250: 29 6d 00 00 lw r13,(r11+0) <== NOT EXECUTED 802b254: 2b 82 00 18 lw r2,(sp+24) <== NOT EXECUTED 802b258: b9 60 60 00 mv r12,r11 <== NOT EXECUTED 802b25c: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED 802b260: 44 62 00 12 be r3,r2,802b2a8 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 802b264: 37 83 00 1c addi r3,sp,28 <== NOT EXECUTED 802b268: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 802b26c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802b270: f8 00 08 43 calli 802d37c <== NOT EXECUTED 802b274: b8 20 18 00 mv r3,r1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 802b278: 44 20 00 13 be r1,r0,802b2c4 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 802b27c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802b280: 38 21 4e e4 ori r1,r1,0x4ee4 <== NOT EXECUTED 802b284: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED return sc; } 802b288: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 802b28c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b290: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 802b294: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 802b298: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 802b29c: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 802b2a0: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 802b2a4: c3 a0 00 00 ret <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 802b2a8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802b2ac: f8 00 08 05 calli 802d2c0 <== NOT EXECUTED 802b2b0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 802b2b4: 5c 20 ff f5 bne r1,r0,802b288 <== NOT EXECUTED free_user_env(tmp); 802b2b8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802b2bc: fb ff ff bd calli 802b1b0 <== NOT EXECUTED 802b2c0: e3 ff ff e9 bi 802b264 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 802b2c4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 802b2c8: 38 63 b1 b0 ori r3,r3,0xb1b0 <== NOT EXECUTED 802b2cc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802b2d0: f8 00 07 bd calli 802d1c4 <== NOT EXECUTED 802b2d4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 802b2d8: 5c 20 ff e9 bne r1,r0,802b27c <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 802b2dc: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 802b2e0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 802b2e4: e3 ff ff e9 bi 802b288 <== NOT EXECUTED 08007ab0 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007ab0: 37 9c ff f8 addi sp,sp,-8 8007ab4: 5b 8b 00 08 sw (sp+8),r11 8007ab8: 5b 9d 00 04 sw (sp+4),ra uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007abc: 34 03 00 06 mvi r3,6 8007ac0: 20 24 00 06 andi r4,r1,0x6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007ac4: b8 20 58 00 mv r11,r1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007ac8: 34 02 00 02 mvi r2,2 8007acc: 44 83 00 04 be r4,r3,8007adc fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8007ad0: a0 22 18 00 and r3,r1,r2 8007ad4: 34 02 00 00 mvi r2,0 8007ad8: 44 62 00 0f be r3,r2,8007b14 fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 8007adc: 21 61 00 01 andi r1,r11,0x1 8007ae0: 44 20 00 02 be r1,r0,8007ae8 fcntl_flags |= O_NONBLOCK; 8007ae4: 38 42 40 00 ori r2,r2,0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 8007ae8: 21 61 02 00 andi r1,r11,0x200 8007aec: 44 20 00 02 be r1,r0,8007af4 fcntl_flags |= O_APPEND; 8007af0: 38 42 00 08 ori r2,r2,0x8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 8007af4: 21 6b 04 00 andi r11,r11,0x400 8007af8: 45 60 00 02 be r11,r0,8007b00 fcntl_flags |= O_CREAT; 8007afc: 38 42 02 00 ori r2,r2,0x200 } return fcntl_flags; } 8007b00: b8 40 08 00 mv r1,r2 8007b04: 2b 9d 00 04 lw ra,(sp+4) 8007b08: 2b 8b 00 08 lw r11,(sp+8) 8007b0c: 37 9c 00 08 addi sp,sp,8 8007b10: c3 a0 00 00 ret { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8007b14: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8007b18: fb ff e1 de calli 8000290 <__lshrsi3> <== NOT EXECUTED 8007b1c: 20 22 00 01 andi r2,r1,0x1 <== NOT EXECUTED 8007b20: e3 ff ff ef bi 8007adc <== NOT EXECUTED 08008374 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8008374: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8008378: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 800837c: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8008380: 38 63 10 1c ori r3,r3,0x101c <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8008384: b8 20 10 00 mv r2,r1 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 8008388: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 800838c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8008390: f8 00 11 ec calli 800cb40 <_Protected_heap_Get_block_size> <== NOT EXECUTED 8008394: 44 20 00 0b be r1,r0,80083c0 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 8008398: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 800839c: 38 21 4e a8 ori r1,r1,0x4ea8 <== NOT EXECUTED 80083a0: 2b 83 00 08 lw r3,(sp+8) <== NOT EXECUTED 80083a4: 28 22 00 2c lw r2,(r1+44) <== NOT EXECUTED 80083a8: 28 24 00 28 lw r4,(r1+40) <== NOT EXECUTED 80083ac: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80083b0: f4 62 18 00 cmpgu r3,r3,r2 <== NOT EXECUTED 80083b4: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 80083b8: b4 64 10 00 add r2,r3,r4 <== NOT EXECUTED 80083bc: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED } } 80083c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80083c4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80083c8: c3 a0 00 00 ret <== NOT EXECUTED 080083cc : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 80083cc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 80083d0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80083d4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 80083d8: 44 20 00 17 be r1,r0,8008434 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083dc: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 80083e0: 38 63 10 1c ori r3,r3,0x101c <== NOT EXECUTED 80083e4: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 80083e8: 34 04 00 00 mvi r4,0 <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083ec: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 80083f0: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083f4: f8 00 11 d3 calli 800cb40 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 80083f8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80083fc: 38 21 4e a8 ori r1,r1,0x4ea8 <== NOT EXECUTED 8008400: 2b 84 00 08 lw r4,(sp+8) <== NOT EXECUTED 8008404: 28 22 00 24 lw r2,(r1+36) <== NOT EXECUTED 8008408: 28 26 00 20 lw r6,(r1+32) <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 800840c: 28 23 00 2c lw r3,(r1+44) <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8008410: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8008414: f4 82 20 00 cmpgu r4,r4,r2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 8008418: 28 25 00 18 lw r5,(r1+24) <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 800841c: b4 86 20 00 add r4,r4,r6 <== NOT EXECUTED 8008420: 58 24 00 20 sw (r1+32),r4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8008424: c8 43 18 00 sub r3,r2,r3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8008428: 58 22 00 24 sw (r1+36),r2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 800842c: 50 a3 00 02 bgeu r5,r3,8008434 <== NOT EXECUTED s->max_depth = current_depth; 8008430: 58 23 00 18 sw (r1+24),r3 <== NOT EXECUTED } 8008434: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008438: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800843c: c3 a0 00 00 ret <== NOT EXECUTED 08008440 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 8008440: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8008444: 38 21 4e a8 ori r1,r1,0x4ea8 <== NOT EXECUTED 8008448: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800844c: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 8008450: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8008454: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8008458: 58 22 00 08 sw (r1+8),r2 <== NOT EXECUTED 800845c: 58 22 00 0c sw (r1+12),r2 <== NOT EXECUTED 8008460: 58 22 00 10 sw (r1+16),r2 <== NOT EXECUTED 8008464: 58 22 00 14 sw (r1+20),r2 <== NOT EXECUTED 8008468: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 800846c: 58 22 00 1c sw (r1+28),r2 <== NOT EXECUTED 8008470: 58 22 00 20 sw (r1+32),r2 <== NOT EXECUTED 8008474: 58 22 00 24 sw (r1+36),r2 <== NOT EXECUTED 8008478: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED } 800847c: c3 a0 00 00 ret <== NOT EXECUTED 0800e01c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800e01c: 37 9c ff f0 addi sp,sp,-16 800e020: 5b 8b 00 10 sw (sp+16),r11 800e024: 5b 8c 00 0c sw (sp+12),r12 800e028: 5b 8d 00 08 sw (sp+8),r13 800e02c: 5b 9d 00 04 sw (sp+4),ra 800e030: b8 20 58 00 mv r11,r1 800e034: b8 40 60 00 mv r12,r2 800e038: b8 60 68 00 mv r13,r3 void *return_this; /* * Parameter error checks */ if ( !pointer ) 800e03c: 44 20 00 24 be r1,r0,800e0cc *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800e040: 78 01 08 02 mvhi r1,0x802 800e044: 38 21 4a 50 ori r1,r1,0x4a50 800e048: 28 22 00 00 lw r2,(r1+0) * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; 800e04c: 34 01 00 00 mvi r1,0 800e050: 59 61 00 00 sw (r11+0),r1 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800e054: 34 01 00 03 mvi r1,3 800e058: 44 41 00 1b be r2,r1,800e0c4 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800e05c: fb ff d3 88 calli 8002e7c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 800e060: 78 01 08 02 mvhi r1,0x802 800e064: 38 21 40 1c ori r1,r1,0x401c 800e068: 28 21 00 00 lw r1,(r1+0) 800e06c: b9 80 18 00 mv r3,r12 800e070: b9 a0 10 00 mv r2,r13 800e074: 34 04 00 00 mvi r4,0 800e078: fb ff e1 b5 calli 800674c <_Protected_heap_Allocate_aligned_with_boundary> 800e07c: b8 20 60 00 mv r12,r1 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 800e080: 34 01 00 0c mvi r1,12 800e084: 45 80 00 0a be r12,r0,800e0ac return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 800e088: 78 02 08 02 mvhi r2,0x802 800e08c: 38 42 46 30 ori r2,r2,0x4630 800e090: 28 41 00 00 lw r1,(r2+0) 800e094: 44 20 00 04 be r1,r0,800e0a4 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 800e098: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800e09c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800e0a0: d8 40 00 00 call r2 <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 800e0a4: 59 6c 00 00 sw (r11+0),r12 800e0a8: 34 01 00 00 mvi r1,0 return 0; } 800e0ac: 2b 9d 00 04 lw ra,(sp+4) 800e0b0: 2b 8b 00 10 lw r11,(sp+16) 800e0b4: 2b 8c 00 0c lw r12,(sp+12) 800e0b8: 2b 8d 00 08 lw r13,(sp+8) 800e0bc: 37 9c 00 10 addi sp,sp,16 800e0c0: c3 a0 00 00 ret *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800e0c4: fb ff d3 53 calli 8002e10 800e0c8: 5c 20 ff e5 bne r1,r0,800e05c if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 800e0cc: 34 01 00 16 mvi r1,22 } 800e0d0: 2b 9d 00 04 lw ra,(sp+4) 800e0d4: 2b 8b 00 10 lw r11,(sp+16) 800e0d8: 2b 8c 00 0c lw r12,(sp+12) 800e0dc: 2b 8d 00 08 lw r13,(sp+8) 800e0e0: 37 9c 00 10 addi sp,sp,16 800e0e4: c3 a0 00 00 ret 08007174 : void rtems_panic( const char *printf_format, ... ) { 8007174: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8007178: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800717c: b8 20 48 00 mv r9,r1 <== NOT EXECUTED 8007180: 5b 81 00 08 sw (sp+8),r1 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 8007184: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 8007188: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED 800718c: 5b 83 00 10 sw (sp+16),r3 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 8007190: b9 20 10 00 mv r2,r9 <== NOT EXECUTED 8007194: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED 8007198: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 800719c: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 80071a0: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED 80071a4: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED 80071a8: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 80071ac: 5b 88 00 24 sw (sp+36),r8 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 80071b0: fb ff ff 73 calli 8006f7c <== NOT EXECUTED va_end(arglist); } 80071b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80071b8: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 80071bc: c3 a0 00 00 ret <== NOT EXECUTED 08009d30 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 8009d30: 37 9c ff f8 addi sp,sp,-8 8009d34: 5b 8b 00 08 sw (sp+8),r11 8009d38: 5b 9d 00 04 sw (sp+4),ra if (!rtems_pipe_configured) 8009d3c: 78 01 08 01 mvhi r1,0x801 8009d40: 38 21 c6 0c ori r1,r1,0xc60c 8009d44: 40 21 00 00 lbu r1,(r1+0) 8009d48: 44 20 00 05 be r1,r0,8009d5c return; if (rtems_pipe_semaphore) 8009d4c: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 8009d50: 38 a5 c6 28 ori r5,r5,0xc628 <== NOT EXECUTED 8009d54: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED 8009d58: 45 60 00 05 be r11,r0,8009d6c <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 8009d5c: 2b 9d 00 04 lw ra,(sp+4) 8009d60: 2b 8b 00 08 lw r11,(sp+8) 8009d64: 37 9c 00 08 addi sp,sp,8 8009d68: c3 a0 00 00 ret if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 8009d6c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 8009d70: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED 8009d74: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009d78: 34 03 00 54 mvi r3,84 <== NOT EXECUTED 8009d7c: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8009d80: fb ff e0 ff calli 800217c <== 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) 8009d84: 5c 2b 00 09 bne r1,r11,8009da8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 8009d88: f8 00 04 1b calli 800adf4 <== NOT EXECUTED rtems_pipe_no = now; 8009d8c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009d90: 38 42 c6 2e ori r2,r2,0xc62e <== NOT EXECUTED 8009d94: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED } 8009d98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009d9c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8009da0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8009da4: c3 a0 00 00 ret <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8009da8: fb ff e2 e4 calli 8002938 <== NOT EXECUTED 08040a1c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 8040a1c: 37 9c ff e0 addi sp,sp,-32 8040a20: 5b 8b 00 18 sw (sp+24),r11 8040a24: 5b 8c 00 14 sw (sp+20),r12 8040a28: 5b 8d 00 10 sw (sp+16),r13 8040a2c: 5b 8e 00 0c sw (sp+12),r14 8040a30: 5b 8f 00 08 sw (sp+8),r15 8040a34: 5b 9d 00 04 sw (sp+4),ra 8040a38: b8 20 70 00 mv r14,r1 8040a3c: 78 01 08 07 mvhi r1,0x807 8040a40: b8 40 68 00 mv r13,r2 8040a44: 38 21 54 9c ori r1,r1,0x549c 8040a48: b9 c0 10 00 mv r2,r14 8040a4c: 37 83 00 20 addi r3,sp,32 8040a50: fb ff 2f 3a calli 800c738 <_Objects_Get> 8040a54: b8 20 58 00 mv r11,r1 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 8040a58: 2b 81 00 20 lw r1,(sp+32) 8040a5c: 44 20 00 0a be r1,r0,8040a84 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 8040a60: 34 01 00 04 mvi r1,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8040a64: 2b 9d 00 04 lw ra,(sp+4) 8040a68: 2b 8b 00 18 lw r11,(sp+24) 8040a6c: 2b 8c 00 14 lw r12,(sp+20) 8040a70: 2b 8d 00 10 lw r13,(sp+16) 8040a74: 2b 8e 00 0c lw r14,(sp+12) 8040a78: 2b 8f 00 08 lw r15,(sp+8) 8040a7c: 37 9c 00 20 addi sp,sp,32 8040a80: c3 a0 00 00 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 8040a84: 78 0c 08 07 mvhi r12,0x807 8040a88: 39 8c 50 e0 ori r12,r12,0x50e0 8040a8c: 29 62 00 40 lw r2,(r11+64) 8040a90: 29 81 00 00 lw r1,(r12+0) 8040a94: 44 41 00 0b be r2,r1,8040ac0 _Thread_Enable_dispatch(); 8040a98: fb ff 31 fe calli 800d290 <_Thread_Enable_dispatch> 8040a9c: 34 01 00 17 mvi r1,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8040aa0: 2b 9d 00 04 lw ra,(sp+4) 8040aa4: 2b 8b 00 18 lw r11,(sp+24) 8040aa8: 2b 8c 00 14 lw r12,(sp+20) 8040aac: 2b 8d 00 10 lw r13,(sp+16) 8040ab0: 2b 8e 00 0c lw r14,(sp+12) 8040ab4: 2b 8f 00 08 lw r15,(sp+8) 8040ab8: 37 9c 00 20 addi sp,sp,32 8040abc: c3 a0 00 00 ret if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 8040ac0: 45 a0 00 32 be r13,r0,8040b88 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8040ac4: 90 00 78 00 rcsr r15,IE 8040ac8: 34 01 ff fe mvi r1,-2 8040acc: a1 e1 08 00 and r1,r15,r1 8040ad0: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8040ad4: 29 61 00 38 lw r1,(r11+56) 8040ad8: 34 02 00 02 mvi r2,2 8040adc: 44 22 00 30 be r1,r2,8040b9c 8040ae0: 34 02 00 04 mvi r2,4 8040ae4: 44 22 00 19 be r1,r2,8040b48 8040ae8: 5c 20 ff de bne r1,r0,8040a60 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 8040aec: d0 0f 00 00 wcsr IE,r15 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 8040af0: b9 60 08 00 mv r1,r11 8040af4: fb ff ff 1b calli 8040760 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8040af8: 78 02 08 04 mvhi r2,0x804 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8040afc: 34 0c 00 00 mvi r12,0 the_watchdog->routine = routine; 8040b00: 38 42 0c 28 ori r2,r2,0xc28 the_period->state = RATE_MONOTONIC_ACTIVE; 8040b04: 34 03 00 02 mvi r3,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b08: 78 01 08 07 mvhi r1,0x807 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8040b0c: 59 62 00 2c sw (r11+44),r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b10: 38 21 51 00 ori r1,r1,0x5100 8040b14: 59 63 00 38 sw (r11+56),r3 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 8040b18: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040b1c: 59 6d 00 1c sw (r11+28),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b20: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8040b24: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 8040b28: 59 6c 00 34 sw (r11+52),r12 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 8040b2c: 59 6d 00 3c sw (r11+60),r13 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b30: fb ff 37 15 calli 800e784 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8040b34: b9 80 08 00 mv r1,r12 8040b38: 5b 81 00 1c sw (sp+28),r1 8040b3c: fb ff 31 d5 calli 800d290 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8040b40: 2b 81 00 1c lw r1,(sp+28) 8040b44: e3 ff ff d7 bi 8040aa0 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8040b48: b9 60 08 00 mv r1,r11 8040b4c: fb ff ff 6a calli 80408f4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 8040b50: d0 0f 00 00 wcsr IE,r15 the_period->state = RATE_MONOTONIC_ACTIVE; 8040b54: 34 02 00 02 mvi r2,2 8040b58: 78 01 08 07 mvhi r1,0x807 8040b5c: 59 62 00 38 sw (r11+56),r2 8040b60: 38 21 51 00 ori r1,r1,0x5100 8040b64: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8040b68: 59 6d 00 1c sw (r11+28),r13 the_period->next_length = length; 8040b6c: 59 6d 00 3c sw (r11+60),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8040b70: fb ff 37 05 calli 800e784 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8040b74: 34 01 00 06 mvi r1,6 8040b78: 5b 81 00 1c sw (sp+28),r1 8040b7c: fb ff 31 c5 calli 800d290 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 8040b80: 2b 81 00 1c lw r1,(sp+28) 8040b84: e3 ff ff c7 bi 8040aa0 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8040b88: 29 61 00 38 lw r1,(r11+56) 8040b8c: 34 02 00 04 mvi r2,4 8040b90: 50 41 00 1b bgeu r2,r1,8040bfc 8040b94: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8040b98: e3 ff ff e8 bi 8040b38 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 8040b9c: b9 60 08 00 mv r1,r11 8040ba0: fb ff ff 55 calli 80408f4 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 8040ba4: 34 01 00 01 mvi r1,1 the_period->next_length = length; 8040ba8: 59 6d 00 3c sw (r11+60),r13 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 8040bac: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 8040bb0: d0 0f 00 00 wcsr IE,r15 _Thread_Executing->Wait.id = the_period->Object.id; 8040bb4: 29 81 00 00 lw r1,(r12+0) 8040bb8: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040bbc: 34 02 40 00 mvi r2,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 8040bc0: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040bc4: fb ff 34 ab calli 800de70 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 8040bc8: 90 00 08 00 rcsr r1,IE 8040bcc: 34 02 ff fe mvi r2,-2 8040bd0: a0 22 10 00 and r2,r1,r2 8040bd4: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 8040bd8: 34 03 00 02 mvi r3,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 8040bdc: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 8040be0: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 8040be4: d0 01 00 00 wcsr IE,r1 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 8040be8: 34 01 00 03 mvi r1,3 8040bec: 44 41 00 0b be r2,r1,8040c18 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 8040bf0: fb ff 31 a8 calli 800d290 <_Thread_Enable_dispatch> 8040bf4: 34 01 00 00 mvi r1,0 return RTEMS_SUCCESSFUL; 8040bf8: e3 ff ff aa bi 8040aa0 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8040bfc: 78 0b 08 06 mvhi r11,0x806 8040c00: 34 02 00 02 mvi r2,2 8040c04: fb ff 01 57 calli 8001160 <__ashlsi3> 8040c08: 39 6b dd c4 ori r11,r11,0xddc4 8040c0c: b5 61 08 00 add r1,r11,r1 8040c10: 28 21 00 00 lw r1,(r1+0) 8040c14: e3 ff ff c9 bi 8040b38 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8040c18: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8040c1c: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 8040c20: fb ff b5 8f calli 802e25c <_Thread_Clear_state> <== NOT EXECUTED 8040c24: e3 ff ff f3 bi 8040bf0 <== NOT EXECUTED 08012244 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 8012244: 37 9c ff e8 addi sp,sp,-24 8012248: 5b 8b 00 14 sw (sp+20),r11 801224c: 5b 8c 00 10 sw (sp+16),r12 8012250: 5b 8d 00 0c sw (sp+12),r13 8012254: 5b 8e 00 08 sw (sp+8),r14 8012258: 5b 9d 00 04 sw (sp+4),ra 801225c: b8 40 60 00 mv r12,r2 8012260: b8 20 68 00 mv r13,r1 8012264: b8 60 70 00 mv r14,r3 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 8012268: 44 40 00 1b be r2,r0,80122d4 return RTEMS_INVALID_ADDRESS; if ( !size ) 801226c: 44 60 00 1a be r3,r0,80122d4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 8012270: 78 0b 08 03 mvhi r11,0x803 8012274: 39 6b ec e0 ori r11,r11,0xece0 8012278: 29 61 00 00 lw r1,(r11+0) 801227c: f8 00 0b 7a calli 8015064 <_API_Mutex_Lock> 8012280: 78 01 08 03 mvhi r1,0x803 8012284: b9 a0 10 00 mv r2,r13 8012288: 38 21 ea f4 ori r1,r1,0xeaf4 801228c: 37 83 00 18 addi r3,sp,24 8012290: f8 00 13 f3 calli 801725c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 8012294: 2b 8d 00 18 lw r13,(sp+24) 8012298: 45 a0 00 18 be r13,r0,80122f8 801229c: 34 01 00 01 mvi r1,1 80122a0: 34 0c 00 04 mvi r12,4 80122a4: 45 a1 00 02 be r13,r1,80122ac case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122a8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 80122ac: 29 61 00 00 lw r1,(r11+0) 80122b0: f8 00 0b 89 calli 80150d4 <_API_Mutex_Unlock> return return_status; } 80122b4: b9 80 08 00 mv r1,r12 80122b8: 2b 9d 00 04 lw ra,(sp+4) 80122bc: 2b 8b 00 14 lw r11,(sp+20) 80122c0: 2b 8c 00 10 lw r12,(sp+16) 80122c4: 2b 8d 00 0c lw r13,(sp+12) 80122c8: 2b 8e 00 08 lw r14,(sp+8) 80122cc: 37 9c 00 18 addi sp,sp,24 80122d0: c3 a0 00 00 ret return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 80122d4: 34 0c 00 09 mvi r12,9 } 80122d8: b9 80 08 00 mv r1,r12 80122dc: 2b 9d 00 04 lw ra,(sp+4) 80122e0: 2b 8b 00 14 lw r11,(sp+20) 80122e4: 2b 8c 00 10 lw r12,(sp+16) 80122e8: 2b 8d 00 0c lw r13,(sp+12) 80122ec: 2b 8e 00 08 lw r14,(sp+8) 80122f0: 37 9c 00 18 addi sp,sp,24 80122f4: c3 a0 00 00 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122f8: b9 80 10 00 mv r2,r12 80122fc: 34 21 00 68 addi r1,r1,104 8012300: b9 c0 18 00 mv r3,r14 8012304: f8 00 11 bc calli 80169f4 <_Heap_Size_of_alloc_area> 8012308: 34 0c 00 09 mvi r12,9 801230c: 44 2d ff e8 be r1,r13,80122ac 8012310: 34 0c 00 00 mvi r12,0 8012314: e3 ff ff e6 bi 80122ac 080058f0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 80058f0: 37 9c ff f0 addi sp,sp,-16 80058f4: 5b 9b 00 08 sw (sp+8),fp 80058f8: 34 1b 00 10 mvi fp,16 80058fc: b7 7c d8 00 add fp,fp,sp 8005900: 5b 8b 00 10 sw (sp+16),r11 8005904: 5b 8c 00 0c sw (sp+12),r12 8005908: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 800590c: 78 0b 08 07 mvhi r11,0x807 8005910: 39 6b 50 e0 ori r11,r11,0x50e0 8005914: 29 62 00 00 lw r2,(r11+0) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 8005918: 28 41 00 c4 lw r1,(r2+196) 800591c: 53 61 00 19 bgeu fp,r1,8005980 8005920: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 8005924: 78 02 08 07 mvhi r2,0x807 8005928: 38 42 24 a8 ori r2,r2,0x24a8 800592c: 28 43 00 00 lw r3,(r2+0) 8005930: 34 02 00 01 mvi r2,1 8005934: 44 60 00 07 be r3,r0,8005950 pattern_ok = (!memcmp( 8005938: 78 02 08 07 mvhi r2,0x807 800593c: 38 42 4e 78 ori r2,r2,0x4e78 8005940: 34 21 00 08 addi r1,r1,8 8005944: 34 03 00 10 mvi r3,16 8005948: f8 01 15 10 calli 804ad88 800594c: 64 22 00 00 cmpei r2,r1,0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 8005950: 45 80 00 03 be r12,r0,800595c 8005954: 34 01 00 00 mvi r1,0 8005958: 5c 41 00 04 bne r2,r1,8005968 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 800595c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8005960: fb ff ff b5 calli 8005834 <== NOT EXECUTED 8005964: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return true; } 8005968: 2b 9d 00 04 lw ra,(sp+4) 800596c: 2b 8b 00 10 lw r11,(sp+16) 8005970: 2b 8c 00 0c lw r12,(sp+12) 8005974: 2b 9b 00 08 lw fp,(sp+8) 8005978: 37 9c 00 10 addi sp,sp,16 800597c: c3 a0 00 00 ret } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 8005980: 28 4c 00 c0 lw r12,(r2+192) 8005984: b4 2c 60 00 add r12,r1,r12 8005988: f1 9b 60 00 cmpgeu r12,r12,fp 800598c: e3 ff ff e6 bi 8005924 08005810 : void rtems_stack_checker_report_usage( void ) { 8005810: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8005814: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 8005818: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800581c: 38 42 8f dc ori r2,r2,0x8fdc <== NOT EXECUTED 8005820: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8005824: fb ff ff d7 calli 8005780 <== NOT EXECUTED } 8005828: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800582c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8005830: c3 a0 00 00 ret <== NOT EXECUTED 08005780 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 8005780: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8005784: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005788: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 800578c: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8005790: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8005794: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED print_context = context; 8005798: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED print_handler = print; 800579c: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 80057a0: b8 40 68 00 mv r13,r2 <== NOT EXECUTED print_context = context; 80057a4: 39 6b 24 ac ori r11,r11,0x24ac <== NOT EXECUTED print_handler = print; 80057a8: 39 8c 24 b0 ori r12,r12,0x24b0 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 80057ac: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80057b0: 38 42 51 d0 ori r2,r2,0x51d0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 80057b4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = print; 80057b8: 59 8d 00 00 sw (r12+0),r13 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 80057bc: b8 20 70 00 mv r14,r1 <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 80057c0: d9 a0 00 00 call r13 <== NOT EXECUTED (*print)( context, 80057c4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80057c8: 38 42 51 e8 ori r2,r2,0x51e8 <== NOT EXECUTED 80057cc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 80057d0: d9 a0 00 00 call r13 <== 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 ); 80057d4: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED 80057d8: 38 21 55 e8 ori r1,r1,0x55e8 <== NOT EXECUTED 80057dc: f8 00 19 aa calli 800be84 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 80057e0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80057e4: fb ff ff 81 calli 80055e8 <== NOT EXECUTED print_context = NULL; 80057e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED print_handler = NULL; 80057ec: 59 81 00 00 sw (r12+0),r1 <== 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; 80057f0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = NULL; } 80057f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80057f8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80057fc: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8005800: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8005804: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8005808: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800580c: c3 a0 00 00 ret <== NOT EXECUTED 08005990 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 8005990: 37 9c ff f4 addi sp,sp,-12 8005994: 5b 9b 00 08 sw (sp+8),fp 8005998: 34 1b 00 0c mvi fp,12 800599c: b7 7c d8 00 add fp,fp,sp 80059a0: 5b 8b 00 0c sw (sp+12),r11 80059a4: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 80059a8: 28 22 00 c4 lw r2,(r1+196) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 80059ac: b8 20 58 00 mv r11,r1 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 80059b0: 34 41 00 08 addi r1,r2,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 80059b4: 54 5b 00 04 bgu r2,fp,80059c4 void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 80059b8: 29 63 00 c0 lw r3,(r11+192) 80059bc: b4 43 10 00 add r2,r2,r3 80059c0: 50 5b 00 0d bgeu r2,fp,80059f4 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 80059c4: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80059c8: 38 42 4e 78 ori r2,r2,0x4e78 <== NOT EXECUTED 80059cc: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 80059d0: f8 01 14 ee calli 804ad88 <== NOT EXECUTED 80059d4: 64 22 00 00 cmpei r2,r1,0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 80059d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80059dc: fb ff ff 96 calli 8005834 <== NOT EXECUTED } } 80059e0: 2b 9d 00 04 lw ra,(sp+4) 80059e4: 2b 8b 00 0c lw r11,(sp+12) 80059e8: 2b 9b 00 08 lw fp,(sp+8) 80059ec: 37 9c 00 0c addi sp,sp,12 80059f0: c3 a0 00 00 ret /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 80059f4: 78 02 08 07 mvhi r2,0x807 80059f8: 38 42 4e 78 ori r2,r2,0x4e78 80059fc: 34 03 00 10 mvi r3,16 8005a00: f8 01 14 e2 calli 804ad88 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 8005a04: 34 02 00 00 mvi r2,0 8005a08: 5c 22 ff f4 bne r1,r2,80059d8 8005a0c: e3 ff ff f5 bi 80059e0 0801ef0c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801ef0c: 37 9c ff e8 addi sp,sp,-24 801ef10: 5b 8b 00 14 sw (sp+20),r11 801ef14: 5b 8c 00 10 sw (sp+16),r12 801ef18: 5b 8d 00 0c sw (sp+12),r13 801ef1c: 5b 8e 00 08 sw (sp+8),r14 801ef20: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801ef24: 34 0c 00 00 mvi r12,0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801ef28: b8 40 58 00 mv r11,r2 801ef2c: b8 20 68 00 mv r13,r1 801ef30: b8 60 70 00 mv r14,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801ef34: 34 04 00 09 mvi r4,9 801ef38: 44 4c 00 12 be r2,r12,801ef80 return RTEMS_INVALID_ADDRESS; errno = 0; 801ef3c: f8 00 a1 11 calli 8047380 <__errno> 801ef40: 58 2c 00 00 sw (r1+0),r12 *n = 0; 801ef44: 59 6c 00 00 sw (r11+0),r12 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 801ef48: b9 a0 08 00 mv r1,r13 801ef4c: 37 82 00 18 addi r2,sp,24 801ef50: 34 03 00 10 mvi r3,16 801ef54: f8 00 c4 25 calli 804ffe8 801ef58: b8 20 60 00 mv r12,r1 #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 ) 801ef5c: 45 c0 00 17 be r14,r0,801efb8 *endptr = end; 801ef60: 2b 82 00 18 lw r2,(sp+24) 801ef64: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) 801ef68: 34 04 00 0b mvi r4,11 801ef6c: 44 4d 00 05 be r2,r13,801ef80 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801ef70: 34 01 ff ff mvi r1,-1 801ef74: 45 81 00 0b be r12,r1,801efa0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 801ef78: 59 6c 00 00 sw (r11+0),r12 801ef7c: 34 04 00 00 mvi r4,0 return RTEMS_SUCCESSFUL; } 801ef80: b8 80 08 00 mv r1,r4 801ef84: 2b 9d 00 04 lw ra,(sp+4) 801ef88: 2b 8b 00 14 lw r11,(sp+20) 801ef8c: 2b 8c 00 10 lw r12,(sp+16) 801ef90: 2b 8d 00 0c lw r13,(sp+12) 801ef94: 2b 8e 00 08 lw r14,(sp+8) 801ef98: 37 9c 00 18 addi sp,sp,24 801ef9c: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801efa0: f8 00 a0 f8 calli 8047380 <__errno> <== NOT EXECUTED 801efa4: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801efa8: 34 01 00 22 mvi r1,34 <== NOT EXECUTED 801efac: 34 04 00 0a mvi r4,10 <== NOT EXECUTED 801efb0: 5c 41 ff f2 bne r2,r1,801ef78 <== NOT EXECUTED 801efb4: e3 ff ff f3 bi 801ef80 <== NOT EXECUTED 801efb8: 2b 82 00 18 lw r2,(sp+24) 801efbc: e3 ff ff eb bi 801ef68 08003834 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003834: 34 03 00 09 mvi r3,9 case B110: baud_index = 3; break; 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; 8003838: b8 20 10 00 mv r2,r1 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800383c: 44 23 00 0a be r1,r3,8003864 8003840: 48 23 00 0b bg r1,r3,800386c 8003844: 34 03 00 04 mvi r3,4 8003848: 44 23 00 07 be r1,r3,8003864 800384c: 48 23 00 22 bg r1,r3,80038d4 8003850: 34 01 00 01 mvi r1,1 8003854: 44 41 00 04 be r2,r1,8003864 8003858: 48 41 00 2a bg r2,r1,8003900 800385c: 44 40 00 02 be r2,r0,8003864 case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 8003860: 34 02 ff ff mvi r2,-1 default: baud_index = -1; break; } return baud_index; } 8003864: b8 40 08 00 mv r1,r2 8003868: c3 a0 00 00 ret rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800386c: 34 03 00 0e mvi r3,14 <== NOT EXECUTED 8003870: 44 23 ff fd be r1,r3,8003864 <== NOT EXECUTED 8003874: 48 23 00 0c bg r1,r3,80038a4 <== NOT EXECUTED 8003878: 34 03 00 0b mvi r3,11 <== NOT EXECUTED 800387c: 44 23 ff fa be r1,r3,8003864 <== 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; 8003880: 34 02 00 0a mvi r2,10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003884: 48 61 ff f8 bg r3,r1,8003864 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 8003888: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800388c: 34 01 00 0c mvi r1,12 <== NOT EXECUTED 8003890: 44 41 ff f5 be r2,r1,8003864 <== NOT EXECUTED 8003894: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8003898: 44 41 ff f3 be r2,r1,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 800389c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038a0: e3 ff ff f1 bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038a4: 34 03 10 02 mvi r3,4098 <== 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; 80038a8: 34 02 00 11 mvi r2,17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038ac: 44 23 ff ee be r1,r3,8003864 <== NOT EXECUTED 80038b0: 48 23 00 19 bg r1,r3,8003914 <== NOT EXECUTED 80038b4: 34 03 00 0f mvi r3,15 <== NOT EXECUTED case B1200: baud_index = 9; break; 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; 80038b8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038bc: 44 23 ff ea be r1,r3,8003864 <== NOT EXECUTED 80038c0: 34 03 10 01 mvi r3,4097 <== 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; 80038c4: 34 02 00 10 mvi r2,16 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038c8: 44 23 ff e7 be r1,r3,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 80038cc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038d0: e3 ff ff e5 bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038d4: 34 03 00 06 mvi r3,6 <== NOT EXECUTED 80038d8: 44 23 ff e3 be r1,r3,8003864 <== 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; 80038dc: 34 02 00 05 mvi r2,5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038e0: 48 61 ff e1 bg r3,r1,8003864 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 80038e4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038e8: 34 01 00 07 mvi r1,7 <== NOT EXECUTED 80038ec: 44 41 ff de be r2,r1,8003864 <== NOT EXECUTED 80038f0: 34 01 00 08 mvi r1,8 <== NOT EXECUTED 80038f4: 44 41 ff dc be r2,r1,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 80038f8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038fc: e3 ff ff da bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003900: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003904: 44 41 ff d8 be r2,r1,8003864 <== NOT EXECUTED 8003908: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 800390c: 5c 41 ff d5 bne r2,r1,8003860 <== NOT EXECUTED 8003910: e3 ff ff d5 bi 8003864 <== NOT EXECUTED 8003914: 34 03 10 03 mvi r3,4099 <== 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; 8003918: 34 02 00 12 mvi r2,18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800391c: 44 23 ff d2 be r1,r3,8003864 <== NOT EXECUTED 8003920: 34 03 10 04 mvi r3,4100 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 8003924: 34 02 00 13 mvi r2,19 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003928: 5c 23 ff ce bne r1,r3,8003860 <== NOT EXECUTED 800392c: e3 ff ff ce bi 8003864 <== NOT EXECUTED 08003930 : int termios_baud ) { int32_t baud; switch (termios_baud) { 8003930: 34 03 00 09 mvi r3,9 case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 8003934: 34 02 04 b0 mvi r2,1200 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003938: 44 23 00 0d be r1,r3,800396c 800393c: 48 23 00 0e bg r1,r3,8003974 8003940: 34 03 00 04 mvi r3,4 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 8003944: 34 02 00 86 mvi r2,134 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003948: 44 23 00 09 be r1,r3,800396c 800394c: 48 23 00 26 bg r1,r3,80039e4 8003950: 34 03 00 01 mvi r3,1 8003954: 34 02 00 32 mvi r2,50 8003958: 44 23 00 05 be r1,r3,800396c 800395c: 48 23 00 2f bg r1,r3,8003a18 8003960: b8 20 10 00 mv r2,r1 8003964: 44 20 00 02 be r1,r0,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8003968: 34 02 ff ff mvi r2,-1 default: baud = -1; break; } return baud; } 800396c: b8 40 08 00 mv r1,r2 8003970: c3 a0 00 00 ret int termios_baud ) { int32_t baud; switch (termios_baud) { 8003974: 34 03 00 0e mvi r3,14 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 8003978: 34 02 4b 00 mvi r2,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { 800397c: 44 23 ff fc be r1,r3,800396c 8003980: 48 23 00 0e bg r1,r3,80039b8 8003984: 34 03 00 0b mvi r3,11 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 8003988: 34 02 09 60 mvi r2,2400 int termios_baud ) { int32_t baud; switch (termios_baud) { 800398c: 44 23 ff f8 be r1,r3,800396c case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 8003990: 34 02 07 08 mvi r2,1800 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003994: 48 61 ff f6 bg r3,r1,800396c 8003998: 34 03 00 0c mvi r3,12 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 800399c: 34 02 12 c0 mvi r2,4800 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039a0: 44 23 ff f3 be r1,r3,800396c 80039a4: 34 03 00 0d mvi r3,13 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 80039a8: 34 02 25 80 mvi r2,9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039ac: 44 23 ff f0 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 80039b0: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80039b4: e3 ff ff ee bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 80039b8: 34 02 10 02 mvi r2,4098 80039bc: 44 22 00 25 be r1,r2,8003a50 80039c0: 48 22 00 1d bg r1,r2,8003a34 80039c4: 34 03 00 0f mvi r3,15 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 80039c8: 38 02 96 00 mvu r2,0x9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039cc: 44 23 ff e8 be r1,r3,800396c 80039d0: 34 03 10 01 mvi r3,4097 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 80039d4: 38 02 e1 00 mvu r2,0xe100 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039d8: 44 23 ff e5 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 80039dc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80039e0: e3 ff ff e3 bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 80039e4: 34 03 00 06 mvi r3,6 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 80039e8: 34 02 00 c8 mvi r2,200 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039ec: 44 23 ff e0 be r1,r3,800396c case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 80039f0: 34 02 00 96 mvi r2,150 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039f4: 48 61 ff de bg r3,r1,800396c 80039f8: 34 03 00 07 mvi r3,7 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 80039fc: 34 02 01 2c mvi r2,300 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a00: 44 23 ff db be r1,r3,800396c 8003a04: 34 03 00 08 mvi r3,8 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 8003a08: 34 02 02 58 mvi r2,600 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a0c: 44 23 ff d8 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8003a10: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003a14: e3 ff ff d6 bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a18: 34 03 00 02 mvi r3,2 8003a1c: 34 02 00 4b mvi r2,75 8003a20: 44 23 ff d3 be r1,r3,800396c 8003a24: 34 03 00 03 mvi r3,3 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 8003a28: 34 02 00 6e mvi r2,110 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a2c: 5c 23 ff cf bne r1,r3,8003968 8003a30: e3 ff ff cf bi 800396c 8003a34: 34 02 10 03 mvi r2,4099 8003a38: 44 22 00 09 be r1,r2,8003a5c 8003a3c: 34 02 10 04 mvi r2,4100 8003a40: 5c 22 ff ca bne r1,r2,8003968 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 8003a44: 78 02 00 07 mvhi r2,0x7 8003a48: 38 42 08 00 ori r2,r2,0x800 case B460800: baud = 460800; break; 8003a4c: e3 ff ff c8 bi 800396c case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 8003a50: 78 02 00 01 mvhi r2,0x1 8003a54: 38 42 c2 00 ori r2,r2,0xc200 case B115200: baud = 115200; break; 8003a58: e3 ff ff c5 bi 800396c 8003a5c: 78 02 00 03 mvhi r2,0x3 8003a60: 38 42 84 00 ori r2,r2,0x8400 case B230400: baud = 230400; break; 8003a64: e3 ff ff c2 bi 800396c 08003bf8 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003bf8: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003bfc: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c00: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003c04: 38 c6 42 34 ori r6,r6,0x4234 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003c08: 38 a5 42 38 ori r5,r5,0x4238 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c0c: 38 84 42 3c ori r4,r4,0x423c <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003c10: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003c14: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c18: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8003c1c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8003c20: c3 a0 00 00 ret <== NOT EXECUTED 08005490 : } } rtems_status_code rtems_termios_close (void *arg) { 8005490: 37 9c ff e8 addi sp,sp,-24 8005494: 5b 8b 00 18 sw (sp+24),r11 8005498: 5b 8c 00 14 sw (sp+20),r12 800549c: 5b 8d 00 10 sw (sp+16),r13 80054a0: 5b 8e 00 0c sw (sp+12),r14 80054a4: 5b 8f 00 08 sw (sp+8),r15 80054a8: 5b 9d 00 04 sw (sp+4),ra 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); 80054ac: 78 0c 08 02 mvhi r12,0x802 80054b0: 39 8c 49 4c ori r12,r12,0x494c rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 80054b4: 28 24 00 00 lw r4,(r1+0) } } rtems_status_code rtems_termios_close (void *arg) { 80054b8: b8 20 78 00 mv r15,r1 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); 80054bc: 29 81 00 00 lw r1,(r12+0) 80054c0: 34 02 00 00 mvi r2,0 80054c4: b8 40 18 00 mv r3,r2 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 80054c8: 28 8b 00 38 lw r11,(r4+56) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 80054cc: f8 00 04 fb calli 80068b8 if (sc != RTEMS_SUCCESSFUL) 80054d0: 5c 20 00 62 bne r1,r0,8005658 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 80054d4: 29 6d 00 08 lw r13,(r11+8) 80054d8: 35 ad ff ff addi r13,r13,-1 80054dc: 59 6d 00 08 sw (r11+8),r13 80054e0: 5d a1 00 2e bne r13,r1,8005598 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 80054e4: 29 61 00 cc lw r1,(r11+204) 80054e8: 78 0e 08 02 mvhi r14,0x802 80054ec: 34 02 00 05 mvi r2,5 80054f0: 39 ce 47 7c ori r14,r14,0x477c 80054f4: fb ff ef f2 calli 80014bc <__ashlsi3> 80054f8: b5 c1 08 00 add r1,r14,r1 80054fc: 28 2e 00 04 lw r14,(r1+4) 8005500: 45 cd 00 43 be r14,r13,800560c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 8005504: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005508: d9 c0 00 00 call r14 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 800550c: 29 62 00 b4 lw r2,(r11+180) <== NOT EXECUTED 8005510: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8005514: 44 41 00 48 be r2,r1,8005634 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 8005518: 29 64 00 9c lw r4,(r11+156) 800551c: 44 80 00 05 be r4,r0,8005530 (*tty->device.lastClose)(tty->major, tty->minor, arg); 8005520: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8005524: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 8005528: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 800552c: d8 80 00 00 call r4 <== NOT EXECUTED if (tty->forw == NULL) { 8005530: 29 61 00 00 lw r1,(r11+0) 8005534: 44 20 00 27 be r1,r0,80055d0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 8005538: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 800553c: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED } if (tty->back == NULL) { 8005540: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 8005544: 44 40 00 2c be r2,r0,80055f4 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 8005548: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 800554c: 29 61 00 14 lw r1,(r11+20) 8005550: f8 00 04 a7 calli 80067ec rtems_semaphore_delete (tty->osem); 8005554: 29 61 00 18 lw r1,(r11+24) 8005558: f8 00 04 a5 calli 80067ec rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 800555c: 29 61 00 8c lw r1,(r11+140) 8005560: f8 00 04 a3 calli 80067ec if ((tty->device.pollRead == NULL) || 8005564: 29 61 00 a0 lw r1,(r11+160) 8005568: 44 20 00 17 be r1,r0,80055c4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 800556c: 29 62 00 b4 lw r2,(r11+180) 8005570: 34 01 00 02 mvi r1,2 8005574: 44 41 00 14 be r2,r1,80055c4 rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 8005578: 29 61 00 58 lw r1,(r11+88) 800557c: f8 00 1c 9e calli 800c7f4 free (tty->rawOutBuf.theBuf); 8005580: 29 61 00 7c lw r1,(r11+124) 8005584: f8 00 1c 9c calli 800c7f4 free (tty->cbuf); 8005588: 29 61 00 1c lw r1,(r11+28) 800558c: f8 00 1c 9a calli 800c7f4 free (tty); 8005590: b9 60 08 00 mv r1,r11 8005594: f8 00 1c 98 calli 800c7f4 } rtems_semaphore_release (rtems_termios_ttyMutex); 8005598: 29 81 00 00 lw r1,(r12+0) 800559c: f8 00 05 28 calli 8006a3c return RTEMS_SUCCESSFUL; } 80055a0: 34 01 00 00 mvi r1,0 80055a4: 2b 9d 00 04 lw ra,(sp+4) 80055a8: 2b 8b 00 18 lw r11,(sp+24) 80055ac: 2b 8c 00 14 lw r12,(sp+20) 80055b0: 2b 8d 00 10 lw r13,(sp+16) 80055b4: 2b 8e 00 0c lw r14,(sp+12) 80055b8: 2b 8f 00 08 lw r15,(sp+8) 80055bc: 37 9c 00 18 addi sp,sp,24 80055c0: c3 a0 00 00 ret rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 80055c4: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 80055c8: f8 00 04 89 calli 80067ec <== NOT EXECUTED 80055cc: e3 ff ff eb bi 8005578 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 80055d0: 29 62 00 04 lw r2,(r11+4) 80055d4: 78 03 08 02 mvhi r3,0x802 80055d8: 38 63 49 50 ori r3,r3,0x4950 80055dc: 58 62 00 00 sw (r3+0),r2 if ( rtems_termios_ttyTail != NULL ) { 80055e0: 44 41 00 1f be r2,r1,800565c rtems_termios_ttyTail->forw = NULL; 80055e4: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 80055e8: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 80055ec: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 80055f0: 5c 40 ff d6 bne r2,r0,8005548 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 80055f4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80055f8: 38 63 49 54 ori r3,r3,0x4954 <== NOT EXECUTED 80055fc: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 8005600: 44 22 ff d3 be r1,r2,800554c <== NOT EXECUTED rtems_termios_ttyHead->back = NULL; 8005604: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8005608: e3 ff ff d1 bi 800554c <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 800560c: 29 61 00 18 lw r1,(r11+24) 8005610: b9 c0 10 00 mv r2,r14 8005614: b9 c0 18 00 mv r3,r14 8005618: f8 00 04 a8 calli 80068b8 if (sc != RTEMS_SUCCESSFUL) { 800561c: 5d c1 00 0f bne r14,r1,8005658 rtems_fatal_error_occurred (sc); } drainOutput (tty); 8005620: b9 60 08 00 mv r1,r11 8005624: fb ff fd 71 calli 8004be8 } if (tty->device.outputUsesInterrupts 8005628: 29 62 00 b4 lw r2,(r11+180) 800562c: 34 01 00 02 mvi r1,2 8005630: 5c 41 ff ba bne r2,r1,8005518 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 8005634: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005638: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800563c: f8 00 03 2e calli 80062f4 <== NOT EXECUTED 8005640: b8 20 68 00 mv r13,r1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005644: 5c 20 00 05 bne r1,r0,8005658 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 8005648: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 800564c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005650: f8 00 03 29 calli 80062f4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005654: 44 2d ff b1 be r1,r13,8005518 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8005658: f8 00 06 c4 calli 8007168 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 800565c: 78 01 08 02 mvhi r1,0x802 8005660: 38 21 49 54 ori r1,r1,0x4954 8005664: 58 22 00 00 sw (r1+0),r2 8005668: e3 ff ff b9 bi 800554c 08003eb4 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 8003eb4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003eb8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003ebc: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003ec0: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003ec4: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED 8003ec8: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003ecc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003ed0: 44 82 00 11 be r4,r2,8003f14 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 8003ed4: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED 8003ed8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8003edc: 44 62 00 05 be r3,r2,8003ef0 <== 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); 8003ee0: fb ff ff 59 calli 8003c44 <== NOT EXECUTED } } 8003ee4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003ee8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003eec: c3 a0 00 00 ret <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8003ef0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8003ef4: 38 42 47 7c ori r2,r2,0x477c <== NOT EXECUTED 8003ef8: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED 8003efc: 44 40 00 0a be r2,r0,8003f24 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8003f00: d8 40 00 00 call r2 <== NOT EXECUTED 8003f04: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 8003f08: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003f0c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003f10: c3 a0 00 00 ret <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 8003f14: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED 8003f18: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8003f1c: f8 00 08 f6 calli 80062f4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 8003f20: 5c 20 00 05 bne r1,r0,8003f34 <== 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); 8003f24: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } 8003f28: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003f2c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003f30: c3 a0 00 00 ret <== NOT EXECUTED * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8003f34: f8 00 0c 8d calli 8007168 <== NOT EXECUTED 08003f38 : * 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) { 8003f38: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED 8003f3c: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED 8003f40: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED 8003f44: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED 8003f48: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED 8003f4c: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED 8003f50: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED 8003f54: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED 8003f58: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED 8003f5c: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED 8003f60: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED 8003f64: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED 8003f68: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED 8003f6c: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED 8003f70: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED 8003f74: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED 8003f78: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED 8003f7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8003f80: b8 20 58 00 mv r11,r1 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 8003f84: 28 21 00 cc lw r1,(r1+204) <== 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) { 8003f88: b8 40 68 00 mv r13,r2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 8003f8c: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8003f90: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003f94: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003f98: 34 02 00 04 mvi r2,4 <== 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) { 8003f9c: b8 60 78 00 mv r15,r3 <== 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) { 8003fa0: 39 ce 47 7c ori r14,r14,0x477c <== NOT EXECUTED 8003fa4: fb ff f5 46 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8003fa8: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8003fac: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED 8003fb0: 44 80 00 31 be r4,r0,8004074 <== NOT EXECUTED while (len--) { 8003fb4: 45 e0 00 10 be r15,r0,8003ff4 <== NOT EXECUTED 8003fb8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003fbc: e0 00 00 07 bi 8003fd8 <== NOT EXECUTED 8003fc0: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8003fc4: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003fc8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003fcc: fb ff f5 3c calli 80014bc <__ashlsi3> <== NOT EXECUTED 8003fd0: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8003fd4: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003fd8: b5 ac 08 00 add r1,r13,r12 <== NOT EXECUTED 8003fdc: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8003fe0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8003fe4: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8003fe8: d8 80 00 00 call 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--) { 8003fec: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8003ff0: 5d ec ff f4 bne r15,r12,8003fc0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8003ff4: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED 8003ff8: 5c 60 00 1d bne r3,r0,800406c <== NOT EXECUTED 8003ffc: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED 8004000: 44 83 00 1b be r4,r3,800406c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8004004: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8004008: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 800400c: b8 60 80 00 mv r16,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); 8004010: d8 80 00 00 call r4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8004014: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004018: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 800401c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8004020: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004024: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED 8004028: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED 800402c: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED 8004030: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED 8004034: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED 8004038: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED 800403c: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED 8004040: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED 8004044: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED 8004048: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED 800404c: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED 8004050: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED 8004054: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED 8004058: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED 800405c: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED 8004060: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED 8004064: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED 8004068: c3 a0 00 00 ret <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 800406c: 34 10 00 00 mvi r16,0 <== NOT EXECUTED 8004070: e3 ff ff eb bi 800401c <== 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, 8004074: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED 8004078: 5b 81 00 48 sw (sp+72),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); 800407c: b8 80 88 00 mv r17,r4 <== NOT EXECUTED 8004080: 35 78 00 30 addi r24,r11,48 <== NOT EXECUTED 8004084: b8 80 80 00 mv r16,r4 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 8004088: 34 14 00 20 mvi r20,32 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 800408c: 34 13 ff fe mvi r19,-2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 8004090: 34 15 ff df mvi r21,-33 <== NOT EXECUTED /* 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, 8004094: 34 17 00 01 mvi r23,1 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 8004098: 34 16 04 00 mvi r22,1024 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 800409c: 34 1b 01 00 mvi fp,256 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 80040a0: 34 19 ff ef mvi r25,-17 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 80040a4: 45 e0 00 38 be r15,r0,8004184 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 80040a8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 80040ac: 41 ae 00 00 lbu r14,(r13+0) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 80040b0: 20 63 02 00 andi r3,r3,0x200 <== NOT EXECUTED 80040b4: 44 60 00 05 be r3,r0,80040c8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 80040b8: 41 63 00 4a lbu r3,(r11+74) <== NOT EXECUTED 80040bc: 44 6e 00 52 be r3,r14,8004204 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 80040c0: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED 80040c4: 44 6e 00 36 be r3,r14,800419c <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 80040c8: 5e 20 00 39 bne r17,r0,80041ac <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 80040cc: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED 80040d0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80040d4: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 80040d8: f8 00 71 e0 calli 8020858 <__umodsi3> <== NOT EXECUTED 80040dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 80040e0: 90 00 90 00 rcsr r18,IE <== NOT EXECUTED 80040e4: a2 53 18 00 and r3,r18,r19 <== NOT EXECUTED 80040e8: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 80040ec: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 80040f0: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED 80040f4: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80040f8: c8 83 18 00 sub r3,r4,r3 <== NOT EXECUTED 80040fc: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8004100: f8 00 71 d6 calli 8020858 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 8004104: 29 63 00 c0 lw r3,(r11+192) <== NOT EXECUTED 8004108: 50 61 00 0d bgeu r3,r1,800413c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 800410c: 29 63 00 b8 lw r3,(r11+184) <== 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) 8004110: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8004114: 5c 60 00 0a bne r3,r0,800413c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 8004118: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 800411c: 38 63 00 01 ori r3,r3,0x1 <== NOT EXECUTED 8004120: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 8004124: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004128: 20 63 04 02 andi r3,r3,0x402 <== NOT EXECUTED 800412c: 44 76 00 42 be r3,r22,8004234 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 8004130: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004134: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED 8004138: 44 3b 00 4d be r1,fp,800426c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 800413c: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 8004140: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004144: 44 6c 00 36 be r3,r12,800421c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 8004148: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED 800414c: b4 6c 18 00 add r3,r3,r12 <== NOT EXECUTED 8004150: 30 6e 00 00 sb (r3+0),r14 <== 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 )) { 8004154: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 8004158: 59 6c 00 60 sw (r11+96),r12 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 800415c: 5c 60 00 07 bne r3,r0,8004178 <== NOT EXECUTED 8004160: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED 8004164: 44 83 00 05 be r4,r3,8004178 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8004168: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 800416c: bb 00 08 00 mv r1,r24 <== NOT EXECUTED 8004170: d8 80 00 00 call r4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8004174: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 8004178: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 800417c: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 8004180: 5d e0 ff ca bne r15,r0,80040a8 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 8004184: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8004188: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 800418c: b4 50 10 00 add r2,r2,r16 <== NOT EXECUTED 8004190: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8004194: f8 00 0a 2a calli 8006a3c <== NOT EXECUTED return dropped; 8004198: e3 ff ff a1 bi 800401c <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 800419c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80041a0: a0 39 08 00 and r1,r1,r25 <== NOT EXECUTED 80041a4: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 80041a8: 34 11 00 01 mvi r17,1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 80041ac: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 80041b0: 20 63 00 30 andi r3,r3,0x30 <== NOT EXECUTED 80041b4: 5c 74 ff f1 bne r3,r20,8004178 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 80041b8: 90 00 60 00 rcsr r12,IE <== NOT EXECUTED 80041bc: a1 93 18 00 and r3,r12,r19 <== NOT EXECUTED 80041c0: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 80041c4: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80041c8: 29 61 00 94 lw r1,(r11+148) <== 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; 80041cc: a0 75 18 00 and r3,r3,r21 <== NOT EXECUTED 80041d0: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80041d4: 5c 20 00 03 bne r1,r0,80041e0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80041d8: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED 80041dc: e3 ff ff e7 bi 8004178 <== 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, 80041e0: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 80041e4: 29 62 00 84 lw r2,(r11+132) <== 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, 80041e8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80041ec: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80041f0: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80041f4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80041f8: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80041fc: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED 8004200: e3 ff ff de bi 8004178 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 8004204: 41 64 00 49 lbu r4,(r11+73) <== NOT EXECUTED 8004208: 44 83 00 07 be r4,r3,8004224 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 800420c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004210: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED 8004214: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 8004218: e3 ff ff e4 bi 80041a8 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 800421c: 36 10 00 01 addi r16,r16,1 <== NOT EXECUTED 8004220: e3 ff ff d6 bi 8004178 <== 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; 8004224: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004228: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED 800422c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 8004230: e3 ff ff de bi 80041a8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 8004234: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004238: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 800423c: 5c 20 00 03 bne r1,r0,8004248 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 8004240: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8004244: 5c 41 ff be bne r2,r1,800413c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 8004248: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 800424c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004250: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 8004254: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED 8004258: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 800425c: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED 8004260: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004264: d8 80 00 00 call r4 <== NOT EXECUTED 8004268: e3 ff ff b5 bi 800413c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 800426c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 8004270: 29 62 00 ac lw r2,(r11+172) <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 8004274: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED 8004278: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 800427c: 44 40 ff b0 be r2,r0,800413c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 8004280: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004284: d8 40 00 00 call r2 <== NOT EXECUTED 8004288: e3 ff ff ad bi 800413c <== NOT EXECUTED 08003a68 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 8003a68: 37 9c ff f8 addi sp,sp,-8 8003a6c: 5b 8b 00 08 sw (sp+8),r11 8003a70: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 8003a74: 78 05 08 02 mvhi r5,0x802 8003a78: 38 a5 49 4c ori r5,r5,0x494c 8003a7c: 28 ab 00 00 lw r11,(r5+0) 8003a80: 45 60 00 05 be r11,r0,8003a94 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 8003a84: 2b 9d 00 04 lw ra,(sp+4) 8003a88: 2b 8b 00 08 lw r11,(sp+8) 8003a8c: 37 9c 00 08 addi sp,sp,8 8003a90: c3 a0 00 00 ret /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 8003a94: 78 01 54 52 mvhi r1,0x5452 8003a98: 38 21 6d 69 ori r1,r1,0x6d69 8003a9c: 34 02 00 01 mvi r2,1 8003aa0: 34 03 00 54 mvi r3,84 8003aa4: b9 60 20 00 mv r4,r11 8003aa8: f8 00 0a c7 calli 80065c4 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 8003aac: 44 2b ff f6 be r1,r11,8003a84 rtems_fatal_error_occurred (sc); 8003ab0: f8 00 0d ae calli 8007168 <== NOT EXECUTED 0800502c : } } rtems_status_code rtems_termios_ioctl (void *arg) { 800502c: 37 9c ff e8 addi sp,sp,-24 8005030: 5b 8b 00 18 sw (sp+24),r11 8005034: 5b 8c 00 14 sw (sp+20),r12 8005038: 5b 8d 00 10 sw (sp+16),r13 800503c: 5b 8e 00 0c sw (sp+12),r14 8005040: 5b 8f 00 08 sw (sp+8),r15 8005044: 5b 9d 00 04 sw (sp+4),ra 8005048: b8 20 60 00 mv r12,r1 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 800504c: 28 21 00 00 lw r1,(r1+0) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 8005050: 34 02 00 00 mvi r2,0 8005054: 59 82 00 0c sw (r12+12),r2 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005058: 28 2b 00 38 lw r11,(r1+56) 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); 800505c: b8 40 18 00 mv r3,r2 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; 8005060: 29 8e 00 08 lw r14,(r12+8) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8005064: 29 61 00 18 lw r1,(r11+24) 8005068: f8 00 06 14 calli 80068b8 800506c: b8 20 68 00 mv r13,r1 if (sc != RTEMS_SUCCESSFUL) { 8005070: 5c 20 00 1e bne r1,r0,80050e8 args->ioctl_return = sc; return sc; } switch (args->command) { 8005074: 29 81 00 04 lw r1,(r12+4) 8005078: 34 02 00 04 mvi r2,4 800507c: 44 22 00 15 be r1,r2,80050d0 8005080: 54 22 00 24 bgu r1,r2,8005110 8005084: 34 02 00 02 mvi r2,2 8005088: 44 22 00 2d be r1,r2,800513c 800508c: 54 22 00 d9 bgu r1,r2,80053f0 8005090: 34 02 00 01 mvi r2,1 8005094: 44 22 00 c3 be r1,r2,80053a0 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 8005098: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 800509c: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 80050a0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80050a4: 39 ad 47 7c ori r13,r13,0x477c <== NOT EXECUTED 80050a8: fb ff f1 05 calli 80014bc <__ashlsi3> <== NOT EXECUTED 80050ac: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 80050b0: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 80050b4: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED 80050b8: 44 60 00 0a be r3,r0,80050e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 80050bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80050c0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80050c4: d8 60 00 00 call r3 <== NOT EXECUTED 80050c8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 80050cc: e0 00 00 05 bi 80050e0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 80050d0: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 80050d4: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED 80050d8: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 80050dc: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 80050e0: 29 61 00 18 lw r1,(r11+24) 80050e4: f8 00 06 56 calli 8006a3c args->ioctl_return = sc; return sc; } 80050e8: b9 a0 08 00 mv r1,r13 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 80050ec: 59 8d 00 0c sw (r12+12),r13 return sc; } 80050f0: 2b 9d 00 04 lw ra,(sp+4) 80050f4: 2b 8b 00 18 lw r11,(sp+24) 80050f8: 2b 8c 00 14 lw r12,(sp+20) 80050fc: 2b 8d 00 10 lw r13,(sp+16) 8005100: 2b 8e 00 0c lw r14,(sp+12) 8005104: 2b 8f 00 08 lw r15,(sp+8) 8005108: 37 9c 00 18 addi sp,sp,24 800510c: c3 a0 00 00 ret sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 8005110: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED 8005114: 38 42 66 7f ori r2,r2,0x667f <== NOT EXECUTED 8005118: 44 22 00 72 be r1,r2,80052e0 <== NOT EXECUTED 800511c: 54 22 00 7e bgu r1,r2,8005314 <== NOT EXECUTED 8005120: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005124: 5c 22 ff dd bne r1,r2,8005098 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 8005128: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800512c: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED 8005130: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8005134: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED break; 8005138: e3 ff ff ea bi 80050e0 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 800513c: 29 81 00 08 lw r1,(r12+8) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005140: 29 63 00 b8 lw r3,(r11+184) case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8005144: 28 22 00 00 lw r2,(r1+0) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005148: 20 63 02 00 andi r3,r3,0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 800514c: 59 62 00 30 sw (r11+48),r2 8005150: 28 24 00 04 lw r4,(r1+4) 8005154: 59 64 00 34 sw (r11+52),r4 8005158: 28 24 00 08 lw r4,(r1+8) 800515c: 59 64 00 38 sw (r11+56),r4 8005160: 28 24 00 0c lw r4,(r1+12) 8005164: 59 64 00 3c sw (r11+60),r4 8005168: 28 24 00 10 lw r4,(r1+16) 800516c: 59 64 00 40 sw (r11+64),r4 8005170: 28 24 00 14 lw r4,(r1+20) 8005174: 59 64 00 44 sw (r11+68),r4 8005178: 28 24 00 18 lw r4,(r1+24) 800517c: 59 64 00 48 sw (r11+72),r4 8005180: 28 24 00 1c lw r4,(r1+28) 8005184: 59 64 00 4c sw (r11+76),r4 8005188: 28 21 00 20 lw r1,(r1+32) 800518c: 59 61 00 50 sw (r11+80),r1 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005190: 44 60 00 15 be r3,r0,80051e4 8005194: 20 42 04 00 andi r2,r2,0x400 8005198: 5c 40 00 13 bne r2,r0,80051e4 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 800519c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80051a0: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED 80051a4: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 80051a8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 80051ac: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80051b0: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80051b4: 44 20 00 0c be r1,r0,80051e4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 80051b8: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 80051bc: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 80051c0: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED 80051c4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 80051c8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80051cc: 34 01 ff df mvi r1,-33 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80051d0: 29 63 00 94 lw r3,(r11+148) <== 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; 80051d4: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 80051d8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80051dc: 5c 60 00 8a bne r3,r0,8005404 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80051e0: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 80051e4: 29 61 00 b8 lw r1,(r11+184) 80051e8: 20 21 04 00 andi r1,r1,0x400 80051ec: 44 20 00 0c be r1,r0,800521c 80051f0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 80051f4: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED 80051f8: 5c 20 00 09 bne r1,r0,800521c <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 80051fc: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005200: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED 8005204: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005208: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 800520c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005210: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED 8005214: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005218: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 800521c: 29 61 00 b8 lw r1,(r11+184) 8005220: 20 21 01 00 andi r1,r1,0x100 8005224: 44 20 00 76 be r1,r0,80053fc 8005228: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED 800522c: 48 02 00 12 bg r0,r2,8005274 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 8005230: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005234: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED 8005238: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 800523c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 8005240: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005244: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 8005248: 44 20 00 06 be r1,r0,8005260 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 800524c: 29 63 00 b0 lw r3,(r11+176) <== 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) && 8005250: 44 60 00 04 be r3,r0,8005260 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 8005254: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005258: d8 60 00 00 call r3 <== NOT EXECUTED 800525c: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 8005260: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005264: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED 8005268: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 800526c: 59 61 00 b8 sw (r11+184),r1 <== 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) { 8005270: 4c 40 00 04 bge r2,r0,8005280 tty->flow_ctrl |= FL_MDRTS; 8005274: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005278: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED 800527c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 8005280: 29 61 00 30 lw r1,(r11+48) 8005284: 20 22 10 00 andi r2,r1,0x1000 8005288: 44 40 00 04 be r2,r0,8005298 tty->flow_ctrl |= FL_MDXOF; 800528c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005290: 38 42 04 00 ori r2,r2,0x400 <== NOT EXECUTED 8005294: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 8005298: 20 21 04 00 andi r1,r1,0x400 800529c: 44 20 00 04 be r1,r0,80052ac tty->flow_ctrl |= FL_MDXON; 80052a0: 29 61 00 b8 lw r1,(r11+184) 80052a4: 38 21 02 00 ori r1,r1,0x200 80052a8: 59 61 00 b8 sw (r11+184),r1 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) { 80052ac: 29 6e 00 3c lw r14,(r11+60) 80052b0: 34 01 00 00 mvi r1,0 80052b4: 21 ce 00 02 andi r14,r14,0x2 80052b8: 45 c1 00 5c be r14,r1,8005428 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 80052bc: 59 61 00 74 sw (r11+116),r1 /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 80052c0: 59 61 00 6c sw (r11+108),r1 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 80052c4: 59 61 00 70 sw (r11+112),r1 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 80052c8: 29 63 00 a8 lw r3,(r11+168) 80052cc: 44 60 ff 85 be r3,r0,80050e0 (*tty->device.setAttributes)(tty->minor, &tty->termios); 80052d0: 29 61 00 10 lw r1,(r11+16) 80052d4: 35 62 00 30 addi r2,r11,48 80052d8: d8 60 00 00 call r3 80052dc: e3 ff ff 81 bi 80050e0 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 80052e0: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED 80052e4: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 80052e8: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED if ( rawnc < 0 ) 80052ec: 4c 20 00 03 bge r1,r0,80052f8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 80052f0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80052f4: b4 22 08 00 add r1,r1,r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 80052f8: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED 80052fc: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8005300: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED 8005304: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED 8005308: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800530c: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED 8005310: e3 ff ff 74 bi 80050e0 <== 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) { 8005314: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED 8005318: 38 42 74 1a ori r2,r2,0x741a <== NOT EXECUTED 800531c: 44 22 00 1d be r1,r2,8005390 <== NOT EXECUTED 8005320: 78 02 80 04 mvhi r2,0x8004 <== NOT EXECUTED 8005324: 38 42 74 1b ori r2,r2,0x741b <== NOT EXECUTED 8005328: 5c 22 ff 5c bne r1,r2,8005098 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 800532c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8005330: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005334: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8005338: fb ff f0 61 calli 80014bc <__ashlsi3> <== NOT EXECUTED 800533c: 39 ce 47 7c ori r14,r14,0x477c <== NOT EXECUTED 8005340: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8005344: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8005348: 44 40 00 04 be r2,r0,8005358 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 800534c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005350: d8 40 00 00 call r2 <== NOT EXECUTED 8005354: b8 20 68 00 mv r13,r1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 8005358: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 800535c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005360: 59 62 00 d0 sw (r11+208),r2 <== 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); 8005364: 28 21 00 00 lw r1,(r1+0) <== 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) { 8005368: 34 02 00 05 mvi r2,5 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 800536c: 59 61 00 cc sw (r11+204),r1 <== 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) { 8005370: fb ff f0 53 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8005374: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8005378: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 800537c: 44 40 ff 59 be r2,r0,80050e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 8005380: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005384: d8 40 00 00 call r2 <== NOT EXECUTED 8005388: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800538c: e3 ff ff 55 bi 80050e0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 8005390: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED 8005394: 29 64 00 cc lw r4,(r11+204) <== NOT EXECUTED 8005398: 58 24 00 00 sw (r1+0),r4 <== NOT EXECUTED break; 800539c: e3 ff ff 51 bi 80050e0 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 80053a0: 29 62 00 30 lw r2,(r11+48) 80053a4: 29 81 00 08 lw r1,(r12+8) 80053a8: 58 22 00 00 sw (r1+0),r2 80053ac: 29 64 00 34 lw r4,(r11+52) 80053b0: 58 24 00 04 sw (r1+4),r4 80053b4: 29 62 00 38 lw r2,(r11+56) 80053b8: 58 22 00 08 sw (r1+8),r2 80053bc: 29 64 00 3c lw r4,(r11+60) 80053c0: 58 24 00 0c sw (r1+12),r4 80053c4: 29 62 00 40 lw r2,(r11+64) 80053c8: 58 22 00 10 sw (r1+16),r2 80053cc: 29 64 00 44 lw r4,(r11+68) 80053d0: 58 24 00 14 sw (r1+20),r4 80053d4: 29 62 00 48 lw r2,(r11+72) 80053d8: 58 22 00 18 sw (r1+24),r2 80053dc: 29 64 00 4c lw r4,(r11+76) 80053e0: 58 24 00 1c sw (r1+28),r4 80053e4: 29 62 00 50 lw r2,(r11+80) 80053e8: 58 22 00 20 sw (r1+32),r2 break; 80053ec: e3 ff ff 3d bi 80050e0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 80053f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80053f4: fb ff fd fd calli 8004be8 <== NOT EXECUTED break; 80053f8: e3 ff ff 3a bi 80050e0 <== NOT EXECUTED 80053fc: 29 62 00 38 lw r2,(r11+56) 8005400: e3 ff ff 9c bi 8005270 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, 8005404: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8005408: 29 62 00 84 lw r2,(r11+132) <== 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, 800540c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8005410: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005414: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8005418: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 800541c: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8005420: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED 8005424: e3 ff ff 70 bi 80051e4 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 8005428: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED 800542c: f8 00 03 12 calli 8006074 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 8005430: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005434: f8 00 6c 7a calli 802061c <__mulsi3> <== NOT EXECUTED 8005438: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 800543c: f8 00 6c f7 calli 8020818 <__udivsi3> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8005440: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 8005444: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8005448: 44 4e 00 07 be r2,r14,8005464 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 800544c: 41 62 00 47 lbu r2,(r11+71) <== 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; 8005450: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 8005454: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 8005458: 44 40 00 09 be r2,r0,800547c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 800545c: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED 8005460: e3 ff ff 9a bi 80052c8 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 8005464: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8005468: 44 22 00 07 be r1,r2,8005484 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 800546c: 59 62 00 74 sw (r11+116),r2 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 8005470: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 8005474: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED 8005478: e3 ff ff 94 bi 80052c8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 800547c: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED 8005480: e3 ff ff 92 bi 80052c8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 8005484: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8005488: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED 800548c: e3 ff ff 8f bi 80052c8 <== NOT EXECUTED 08003ab4 : int32_t baud ) { int termios_baud; switch (baud) { 8003ab4: 34 03 04 b0 mvi r3,1200 case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 8003ab8: 34 02 00 09 mvi r2,9 int32_t baud ) { int termios_baud; switch (baud) { 8003abc: 44 23 00 0d be r1,r3,8003af0 8003ac0: 48 23 00 0e bg r1,r3,8003af8 8003ac4: 34 03 00 86 mvi r3,134 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 8003ac8: 34 02 00 04 mvi r2,4 int32_t baud ) { int termios_baud; switch (baud) { 8003acc: 44 23 00 09 be r1,r3,8003af0 8003ad0: 48 23 00 24 bg r1,r3,8003b60 8003ad4: 34 03 00 32 mvi r3,50 8003ad8: 34 02 00 01 mvi r2,1 8003adc: 44 23 00 05 be r1,r3,8003af0 8003ae0: 48 23 00 2f bg r1,r3,8003b9c 8003ae4: b8 20 10 00 mv r2,r1 8003ae8: 44 20 00 02 be r1,r0,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003aec: 34 02 ff ff mvi r2,-1 default: termios_baud = -1; break; } return termios_baud; } 8003af0: b8 40 08 00 mv r1,r2 8003af4: c3 a0 00 00 ret int32_t baud ) { int termios_baud; switch (baud) { 8003af8: 34 03 4b 00 mvi r3,19200 case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 8003afc: 34 02 00 0e mvi r2,14 int32_t baud ) { int termios_baud; switch (baud) { 8003b00: 44 23 ff fc be r1,r3,8003af0 8003b04: 48 23 00 0a bg r1,r3,8003b2c 8003b08: 34 03 09 60 mvi r3,2400 case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 8003b0c: 34 02 00 0b mvi r2,11 int32_t baud ) { int termios_baud; switch (baud) { 8003b10: 44 23 ff f8 be r1,r3,8003af0 8003b14: 48 23 00 32 bg r1,r3,8003bdc 8003b18: 34 03 07 08 mvi r3,1800 case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 8003b1c: 34 02 00 0a mvi r2,10 int32_t baud ) { int termios_baud; switch (baud) { 8003b20: 44 23 ff f4 be r1,r3,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003b24: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003b28: e3 ff ff f2 bi 8003af0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8003b2c: 78 03 00 01 mvhi r3,0x1 8003b30: 38 63 c2 00 ori r3,r3,0xc200 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 8003b34: 34 02 10 02 mvi r2,4098 int32_t baud ) { int termios_baud; switch (baud) { 8003b38: 44 23 ff ee be r1,r3,8003af0 8003b3c: 48 23 00 1f bg r1,r3,8003bb8 8003b40: 38 03 96 00 mvu r3,0x9600 case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 8003b44: 34 02 00 0f mvi r2,15 int32_t baud ) { int termios_baud; switch (baud) { 8003b48: 44 23 ff ea be r1,r3,8003af0 8003b4c: 38 03 e1 00 mvu r3,0xe100 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 8003b50: 34 02 10 01 mvi r2,4097 int32_t baud ) { int termios_baud; switch (baud) { 8003b54: 44 23 ff e7 be r1,r3,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003b58: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003b5c: e3 ff ff e5 bi 8003af0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8003b60: 34 03 00 c8 mvi r3,200 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 8003b64: 34 02 00 06 mvi r2,6 int32_t baud ) { int termios_baud; switch (baud) { 8003b68: 44 23 ff e2 be r1,r3,8003af0 8003b6c: 48 23 00 05 bg r1,r3,8003b80 8003b70: 34 03 00 96 mvi r3,150 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 8003b74: 34 02 00 05 mvi r2,5 int32_t baud ) { int termios_baud; switch (baud) { 8003b78: 5c 23 ff dd bne r1,r3,8003aec 8003b7c: e3 ff ff dd bi 8003af0 8003b80: 34 03 01 2c mvi r3,300 case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 8003b84: 34 02 00 07 mvi r2,7 int32_t baud ) { int termios_baud; switch (baud) { 8003b88: 44 23 ff da be r1,r3,8003af0 8003b8c: 34 03 02 58 mvi r3,600 case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 8003b90: 34 02 00 08 mvi r2,8 int32_t baud ) { int termios_baud; switch (baud) { 8003b94: 5c 23 ff d6 bne r1,r3,8003aec 8003b98: e3 ff ff d6 bi 8003af0 8003b9c: 34 03 00 4b mvi r3,75 8003ba0: 34 02 00 02 mvi r2,2 8003ba4: 44 23 ff d3 be r1,r3,8003af0 8003ba8: 34 03 00 6e mvi r3,110 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 8003bac: 34 02 00 03 mvi r2,3 int32_t baud ) { int termios_baud; switch (baud) { 8003bb0: 5c 23 ff cf bne r1,r3,8003aec 8003bb4: e3 ff ff cf bi 8003af0 8003bb8: 78 03 00 03 mvhi r3,0x3 8003bbc: 38 63 84 00 ori r3,r3,0x8400 case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 8003bc0: 34 02 10 03 mvi r2,4099 int32_t baud ) { int termios_baud; switch (baud) { 8003bc4: 44 23 ff cb be r1,r3,8003af0 8003bc8: 78 03 00 07 mvhi r3,0x7 8003bcc: 38 63 08 00 ori r3,r3,0x800 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 8003bd0: 34 02 10 04 mvi r2,4100 int32_t baud ) { int termios_baud; switch (baud) { 8003bd4: 5c 23 ff c6 bne r1,r3,8003aec 8003bd8: e3 ff ff c6 bi 8003af0 8003bdc: 34 03 12 c0 mvi r3,4800 case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 8003be0: 34 02 00 0c mvi r2,12 int32_t baud ) { int termios_baud; switch (baud) { 8003be4: 44 23 ff c3 be r1,r3,8003af0 8003be8: 34 03 25 80 mvi r3,9600 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 8003bec: 34 02 00 0d mvi r2,13 int32_t baud ) { int termios_baud; switch (baud) { 8003bf0: 5c 23 ff bf bne r1,r3,8003aec 8003bf4: e3 ff ff bf bi 8003af0 0800566c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 800566c: 37 9c ff c4 addi sp,sp,-60 8005670: 5b 8b 00 3c sw (sp+60),r11 8005674: 5b 8c 00 38 sw (sp+56),r12 8005678: 5b 8d 00 34 sw (sp+52),r13 800567c: 5b 8e 00 30 sw (sp+48),r14 8005680: 5b 8f 00 2c sw (sp+44),r15 8005684: 5b 90 00 28 sw (sp+40),r16 8005688: 5b 91 00 24 sw (sp+36),r17 800568c: 5b 92 00 20 sw (sp+32),r18 8005690: 5b 93 00 1c sw (sp+28),r19 8005694: 5b 94 00 18 sw (sp+24),r20 8005698: 5b 95 00 14 sw (sp+20),r21 800569c: 5b 96 00 10 sw (sp+16),r22 80056a0: 5b 97 00 0c sw (sp+12),r23 80056a4: 5b 98 00 08 sw (sp+8),r24 80056a8: 5b 9d 00 04 sw (sp+4),ra struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056ac: 78 0d 08 02 mvhi r13,0x802 80056b0: 39 ad 49 4c ori r13,r13,0x494c rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056b4: b8 20 60 00 mv r12,r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056b8: 29 a1 00 00 lw r1,(r13+0) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056bc: b8 40 78 00 mv r15,r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056c0: 34 02 00 00 mvi r2,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056c4: b8 60 90 00 mv r18,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056c8: b8 40 18 00 mv r3,r2 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056cc: b8 80 98 00 mv r19,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056d0: f8 00 04 7a calli 80068b8 80056d4: b8 20 70 00 mv r14,r1 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 80056d8: 5c 20 00 1d bne r1,r0,800574c return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 80056dc: 78 10 08 02 mvhi r16,0x802 80056e0: 3a 10 49 54 ori r16,r16,0x4954 80056e4: 2a 0b 00 00 lw r11,(r16+0) 80056e8: 5d 61 00 04 bne r11,r1,80056f8 80056ec: e0 00 00 38 bi 80057cc 80056f0: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED 80056f4: 45 60 00 36 be r11,r0,80057cc <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 80056f8: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED 80056fc: 5c ac ff fd bne r5,r12,80056f0 <== NOT EXECUTED 8005700: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005704: 5c 2f ff fb bne r1,r15,80056f0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 8005708: 29 62 00 08 lw r2,(r11+8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 800570c: 2a 43 00 00 lw r3,(r18+0) if (!tty->refcount++) { 8005710: 34 41 00 01 addi r1,r2,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8005714: 58 6b 00 38 sw (r3+56),r11 if (!tty->refcount++) { 8005718: 59 61 00 08 sw (r11+8),r1 800571c: 5c 40 00 0a bne r2,r0,8005744 if (tty->device.firstOpen) 8005720: 29 64 00 98 lw r4,(r11+152) 8005724: 44 82 00 05 be r4,r2,8005738 (*tty->device.firstOpen)(major, minor, arg); 8005728: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800572c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005730: ba 40 18 00 mv r3,r18 <== NOT EXECUTED 8005734: d8 80 00 00 call r4 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8005738: 29 62 00 b4 lw r2,(r11+180) 800573c: 34 01 00 02 mvi r1,2 8005740: 44 41 00 15 be r2,r1,8005794 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 8005744: 29 a1 00 00 lw r1,(r13+0) 8005748: f8 00 04 bd calli 8006a3c return RTEMS_SUCCESSFUL; } 800574c: b9 c0 08 00 mv r1,r14 8005750: 2b 9d 00 04 lw ra,(sp+4) 8005754: 2b 8b 00 3c lw r11,(sp+60) 8005758: 2b 8c 00 38 lw r12,(sp+56) 800575c: 2b 8d 00 34 lw r13,(sp+52) 8005760: 2b 8e 00 30 lw r14,(sp+48) 8005764: 2b 8f 00 2c lw r15,(sp+44) 8005768: 2b 90 00 28 lw r16,(sp+40) 800576c: 2b 91 00 24 lw r17,(sp+36) 8005770: 2b 92 00 20 lw r18,(sp+32) 8005774: 2b 93 00 1c lw r19,(sp+28) 8005778: 2b 94 00 18 lw r20,(sp+24) 800577c: 2b 95 00 14 lw r21,(sp+20) 8005780: 2b 96 00 10 lw r22,(sp+16) 8005784: 2b 97 00 0c lw r23,(sp+12) 8005788: 2b 98 00 08 lw r24,(sp+8) 800578c: 37 9c 00 3c addi sp,sp,60 8005790: c3 a0 00 00 ret (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 8005794: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005798: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800579c: 38 42 5b b8 ori r2,r2,0x5bb8 <== NOT EXECUTED 80057a0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80057a4: f8 00 05 ae calli 8006e5c <== NOT EXECUTED 80057a8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 80057ac: 5c 20 00 c0 bne r1,r0,8005aac <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 80057b0: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 80057b4: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 80057b8: 38 42 5b 2c ori r2,r2,0x5b2c <== NOT EXECUTED 80057bc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80057c0: f8 00 05 a7 calli 8006e5c <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 80057c4: 44 2c ff e0 be r1,r12,8005744 <== NOT EXECUTED 80057c8: e0 00 00 b9 bi 8005aac <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 80057cc: 34 01 00 01 mvi r1,1 80057d0: 34 02 00 e8 mvi r2,232 80057d4: f8 00 1b e9 calli 800c778 if (tty == NULL) { 80057d8: 34 14 00 00 mvi r20,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 80057dc: b8 20 88 00 mv r17,r1 80057e0: b8 20 58 00 mv r11,r1 if (tty == NULL) { 80057e4: 44 34 00 9c be r1,r20,8005a54 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 80057e8: 78 01 08 02 mvhi r1,0x802 80057ec: 38 21 42 38 ori r1,r1,0x4238 80057f0: 28 21 00 00 lw r1,(r1+0) 80057f4: 5a 21 00 64 sw (r17+100),r1 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 80057f8: 2a 21 00 64 lw r1,(r17+100) 80057fc: f8 00 1d 06 calli 800cc14 8005800: 5a 21 00 58 sw (r17+88),r1 if (tty->rawInBuf.theBuf == NULL) { 8005804: 44 20 00 92 be r1,r0,8005a4c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 8005808: 78 01 08 02 mvhi r1,0x802 800580c: 38 21 42 3c ori r1,r1,0x423c 8005810: 28 21 00 00 lw r1,(r1+0) 8005814: 5a 21 00 88 sw (r17+136),r1 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 8005818: 2a 21 00 88 lw r1,(r17+136) 800581c: f8 00 1c fe calli 800cc14 8005820: 5a 21 00 7c sw (r17+124),r1 if (tty->rawOutBuf.theBuf == NULL) { 8005824: 44 20 00 90 be r1,r0,8005a64 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 8005828: 78 01 08 02 mvhi r1,0x802 800582c: 38 21 42 34 ori r1,r1,0x4234 8005830: 28 21 00 00 lw r1,(r1+0) 8005834: f8 00 1c f8 calli 800cc14 8005838: 5a 21 00 1c sw (r17+28),r1 if (tty->cbuf == NULL) { 800583c: 44 20 00 9d be r1,r0,8005ab0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 8005840: 2a 01 00 00 lw r1,(r16+0) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 8005844: 5a 34 00 d4 sw (r17+212),r20 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 8005848: 5a 34 00 04 sw (r17+4),r20 } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; tty->tty_snd.sw_arg = NULL; 800584c: 5a 34 00 d8 sw (r17+216),r20 tty->tty_rcv.sw_pfn = NULL; 8005850: 5a 34 00 dc sw (r17+220),r20 tty->tty_rcv.sw_arg = NULL; 8005854: 5a 34 00 e0 sw (r17+224),r20 tty->tty_rcvwakeup = 0; 8005858: 5a 34 00 e4 sw (r17+228),r20 /* * link tty */ tty->forw = rtems_termios_ttyHead; 800585c: 5a 21 00 00 sw (r17+0),r1 tty->back = NULL; if (rtems_termios_ttyHead != NULL) 8005860: 44 20 00 02 be r1,r0,8005868 rtems_termios_ttyHead->back = tty; 8005864: 58 31 00 04 sw (r1+4),r17 <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 8005868: 78 01 08 02 mvhi r1,0x802 800586c: 38 21 49 50 ori r1,r1,0x4950 8005870: 28 22 00 00 lw r2,(r1+0) */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 8005874: 5a 11 00 00 sw (r16+0),r17 if (rtems_termios_ttyTail == NULL) 8005878: 44 40 00 ab be r2,r0,8005b24 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 800587c: 78 10 08 02 mvhi r16,0x802 8005880: 3a 10 42 40 ori r16,r16,0x4240 8005884: 42 02 00 00 lbu r2,(r16+0) 8005888: 78 01 54 52 mvhi r1,0x5452 800588c: 38 21 69 00 ori r1,r1,0x6900 8005890: b8 41 08 00 or r1,r2,r1 8005894: 34 03 00 54 mvi r3,84 8005898: 34 02 00 01 mvi r2,1 800589c: 34 04 00 00 mvi r4,0 80058a0: 36 25 00 14 addi r5,r17,20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 80058a4: 5a 2f 00 10 sw (r17+16),r15 tty->major = major; 80058a8: 5a 2c 00 0c sw (r17+12),r12 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 80058ac: f8 00 03 46 calli 80065c4 80058b0: b8 20 a0 00 mv r20,r1 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) 80058b4: 5c 20 00 7e bne r1,r0,8005aac rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 80058b8: 42 01 00 00 lbu r1,(r16+0) 80058bc: 78 02 54 52 mvhi r2,0x5452 80058c0: 38 42 6f 00 ori r2,r2,0x6f00 80058c4: b8 22 08 00 or r1,r1,r2 80058c8: 34 03 00 54 mvi r3,84 80058cc: 34 02 00 01 mvi r2,1 80058d0: ba 80 20 00 mv r4,r20 80058d4: 36 25 00 18 addi r5,r17,24 80058d8: f8 00 03 3b calli 80065c4 80058dc: b8 20 a8 00 mv r21,r1 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) 80058e0: 5c 34 00 73 bne r1,r20,8005aac rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 80058e4: 42 02 00 00 lbu r2,(r16+0) 80058e8: 78 01 54 52 mvhi r1,0x5452 80058ec: 38 21 78 00 ori r1,r1,0x7800 80058f0: b8 41 08 00 or r1,r2,r1 80058f4: 34 03 00 20 mvi r3,32 80058f8: ba a0 10 00 mv r2,r21 80058fc: ba a0 20 00 mv r4,r21 8005900: 36 25 00 8c addi r5,r17,140 8005904: f8 00 03 30 calli 80065c4 8005908: b8 20 a0 00 mv r20,r1 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 800590c: 5c 35 00 68 bne r1,r21,8005aac tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 8005910: 2a 62 00 00 lw r2,(r19+0) 8005914: 2a 61 00 1c lw r1,(r19+28) 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; 8005918: 5a 34 00 94 sw (r17+148),r20 /* * Set callbacks */ tty->device = *callbacks; 800591c: 5a 22 00 98 sw (r17+152),r2 8005920: 2a 62 00 04 lw r2,(r19+4) 8005924: 5a 22 00 9c sw (r17+156),r2 8005928: 2a 62 00 08 lw r2,(r19+8) 800592c: 5a 22 00 a0 sw (r17+160),r2 8005930: 2a 62 00 0c lw r2,(r19+12) 8005934: 5a 22 00 a4 sw (r17+164),r2 8005938: 2a 62 00 10 lw r2,(r19+16) 800593c: 5a 22 00 a8 sw (r17+168),r2 8005940: 2a 62 00 14 lw r2,(r19+20) 8005944: 5a 22 00 ac sw (r17+172),r2 8005948: 2a 73 00 18 lw r19,(r19+24) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 800594c: 34 02 00 02 mvi r2,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 8005950: 5a 21 00 b4 sw (r17+180),r1 8005954: 5a 33 00 b0 sw (r17+176),r19 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8005958: 44 22 00 5b be r1,r2,8005ac4 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 800595c: 2a 21 00 a0 lw r1,(r17+160) 8005960: 44 20 00 49 be r1,r0,8005a84 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 8005964: 2a 22 00 b4 lw r2,(r17+180) 8005968: 34 01 00 02 mvi r1,2 800596c: 44 41 00 46 be r2,r1,8005a84 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; 8005970: 34 01 00 00 mvi r1,0 8005974: 5a 21 00 b8 sw (r17+184),r1 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005978: 34 18 25 02 mvi r24,9474 /* 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; 800597c: 2a 21 00 64 lw r1,(r17+100) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005980: 5a 38 00 30 sw (r17+48),r24 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 8005984: 34 18 18 05 mvi r24,6149 8005988: 5a 38 00 34 sw (r17+52),r24 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 800598c: 34 18 08 bd mvi r24,2237 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'; 8005990: 34 03 00 00 mvi r3,0 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 8005994: 34 0a 00 11 mvi r10,17 tty->termios.c_cc[VSTOP] = '\023'; 8005998: 34 09 00 13 mvi r9,19 tty->termios.c_cc[VSUSP] = '\032'; 800599c: 34 08 00 1a mvi r8,26 tty->termios.c_cc[VREPRINT] = '\022'; 80059a0: 34 07 00 12 mvi r7,18 tty->termios.c_cc[VDISCARD] = '\017'; 80059a4: 34 06 00 0f mvi r6,15 tty->termios.c_cc[VWERASE] = '\027'; 80059a8: 34 05 00 17 mvi r5,23 tty->termios.c_cc[VLNEXT] = '\026'; 80059ac: 34 04 00 16 mvi r4,22 /* 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; 80059b0: 34 02 00 01 mvi 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; 80059b4: 5a 38 00 38 sw (r17+56),r24 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 80059b8: 34 17 00 03 mvi r23,3 tty->termios.c_cc[VQUIT] = '\034'; 80059bc: 34 16 00 1c mvi r22,28 tty->termios.c_cc[VERASE] = '\177'; 80059c0: 34 15 00 7f mvi r21,127 tty->termios.c_cc[VKILL] = '\025'; 80059c4: 34 14 00 15 mvi r20,21 tty->termios.c_cc[VEOF] = '\004'; 80059c8: 34 13 00 04 mvi r19,4 * 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; 80059cc: 38 18 82 3b mvu r24,0x823b 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'; tty->termios.c_cc[VEOL2] = '\000'; 80059d0: 32 23 00 51 sb (r17+81),r3 tty->termios.c_cc[VSTART] = '\021'; 80059d4: 32 2a 00 49 sb (r17+73),r10 tty->termios.c_cc[VSTOP] = '\023'; 80059d8: 32 29 00 4a sb (r17+74),r9 tty->termios.c_cc[VSUSP] = '\032'; 80059dc: 32 28 00 4b sb (r17+75),r8 tty->termios.c_cc[VREPRINT] = '\022'; 80059e0: 32 27 00 4d sb (r17+77),r7 tty->termios.c_cc[VDISCARD] = '\017'; 80059e4: 32 26 00 4e sb (r17+78),r6 tty->termios.c_cc[VWERASE] = '\027'; 80059e8: 32 25 00 4f sb (r17+79),r5 tty->termios.c_cc[VLNEXT] = '\026'; 80059ec: 32 24 00 50 sb (r17+80),r4 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'; 80059f0: 32 23 00 4c sb (r17+76),r3 * 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; 80059f4: 5a 38 00 3c sw (r17+60),r24 tty->termios.c_cc[VINTR] = '\003'; 80059f8: 32 37 00 41 sb (r17+65),r23 tty->termios.c_cc[VQUIT] = '\034'; 80059fc: 32 36 00 42 sb (r17+66),r22 tty->termios.c_cc[VERASE] = '\177'; 8005a00: 32 35 00 43 sb (r17+67),r21 tty->termios.c_cc[VKILL] = '\025'; 8005a04: 32 34 00 44 sb (r17+68),r20 tty->termios.c_cc[VEOF] = '\004'; 8005a08: 32 33 00 45 sb (r17+69),r19 /* 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; 8005a0c: fb ff ee d4 calli 800155c <__lshrsi3> tty->highwater = tty->rawInBuf.Size * 3/4; 8005a10: 2a 23 00 64 lw r3,(r17+100) /* 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; 8005a14: 5a 21 00 bc sw (r17+188),r1 tty->highwater = tty->rawInBuf.Size * 3/4; 8005a18: 34 02 00 02 mvi r2,2 8005a1c: b4 63 08 00 add r1,r3,r3 8005a20: b4 23 08 00 add r1,r1,r3 8005a24: fb ff ee ce calli 800155c <__lshrsi3> /* * Bump name characer */ if (c++ == 'z') 8005a28: 42 02 00 00 lbu r2,(r16+0) 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; 8005a2c: 5a 21 00 c0 sw (r17+192),r1 /* * Bump name characer */ if (c++ == 'z') 8005a30: 34 41 00 01 addi r1,r2,1 8005a34: 32 01 00 00 sb (r16+0),r1 8005a38: 34 01 00 7a mvi r1,122 8005a3c: 5c 41 ff 33 bne r2,r1,8005708 c = 'a'; 8005a40: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 8005a44: 32 01 00 00 sb (r16+0),r1 <== NOT EXECUTED 8005a48: e3 ff ff 30 bi 8005708 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 8005a4c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005a50: f8 00 1b 69 calli 800c7f4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005a54: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8005a58: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 8005a5c: f8 00 03 f8 calli 8006a3c <== NOT EXECUTED return RTEMS_NO_MEMORY; 8005a60: e3 ff ff 3b bi 800574c <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 8005a64: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 8005a68: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 8005a6c: f8 00 1b 62 calli 800c7f4 <== NOT EXECUTED free(tty); 8005a70: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005a74: f8 00 1b 60 calli 800c7f4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005a78: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8005a7c: f8 00 03 f0 calli 8006a3c <== NOT EXECUTED return RTEMS_NO_MEMORY; 8005a80: e3 ff ff 33 bi 800574c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 8005a84: 42 03 00 00 lbu r3,(r16+0) <== NOT EXECUTED 8005a88: 78 01 54 52 mvhi r1,0x5452 <== NOT EXECUTED 8005a8c: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 8005a90: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005a94: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 8005a98: b8 40 20 00 mv r4,r2 <== NOT EXECUTED 8005a9c: 34 03 00 24 mvi r3,36 <== NOT EXECUTED 8005aa0: 36 25 00 68 addi r5,r17,104 <== NOT EXECUTED 8005aa4: f8 00 02 c8 calli 80065c4 <== 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) 8005aa8: 44 20 ff b2 be r1,r0,8005970 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8005aac: f8 00 05 af calli 8007168 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 8005ab0: 2a 21 00 7c lw r1,(r17+124) <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 8005ab4: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 8005ab8: f8 00 1b 4f calli 800c7f4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 8005abc: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED 8005ac0: e3 ff ff eb bi 8005a6c <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 8005ac4: 42 02 00 00 lbu r2,(r16+0) <== NOT EXECUTED 8005ac8: 78 01 54 78 mvhi r1,0x5478 <== NOT EXECUTED 8005acc: 38 21 54 00 ori r1,r1,0x5400 <== NOT EXECUTED 8005ad0: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 8005ad4: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005ad8: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8005adc: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005ae0: ba 80 28 00 mv r5,r20 <== NOT EXECUTED 8005ae4: 36 26 00 c8 addi r6,r17,200 <== NOT EXECUTED 8005ae8: f8 00 04 1e calli 8006b60 <== NOT EXECUTED 8005aec: b8 20 98 00 mv r19,r1 <== 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) 8005af0: 5c 34 ff ef bne r1,r20,8005aac <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 8005af4: 42 01 00 00 lbu r1,(r16+0) <== NOT EXECUTED 8005af8: 78 02 52 78 mvhi r2,0x5278 <== NOT EXECUTED 8005afc: 38 42 54 00 ori r2,r2,0x5400 <== NOT EXECUTED 8005b00: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED 8005b04: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005b08: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8005b0c: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005b10: ba 60 28 00 mv r5,r19 <== NOT EXECUTED 8005b14: 36 26 00 c4 addi r6,r17,196 <== NOT EXECUTED 8005b18: f8 00 04 12 calli 8006b60 <== 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) 8005b1c: 44 33 ff 90 be r1,r19,800595c <== NOT EXECUTED 8005b20: e3 ff ff e3 bi 8005aac <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 8005b24: 58 31 00 00 sw (r1+0),r17 8005b28: e3 ff ff 55 bi 800587c 0800428c : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 800428c: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 8004290: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED 8004294: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED 8004298: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED 800429c: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED 80042a0: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED 80042a4: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED 80042a8: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED 80042ac: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED 80042b0: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED 80042b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80042b8: 28 64 00 b4 lw r4,(r3+180) <== NOT EXECUTED * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 80042bc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 80042c0: b8 40 80 00 mv r16,r2 <== NOT EXECUTED 80042c4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED const unsigned char *buf = _buf; 80042c8: b8 20 88 00 mv r17,r1 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80042cc: 44 80 00 39 be r4,r0,80043b0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 80042d0: 29 6f 00 80 lw r15,(r11+128) <== NOT EXECUTED while (len) { 80042d4: 44 40 00 3c be r2,r0,80043c4 <== NOT EXECUTED * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 80042d8: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 80042dc: 34 0e 00 02 mvi r14,2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 80042e0: 34 13 00 01 mvi r19,1 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 80042e4: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 80042e8: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 80042ec: f8 00 71 5b calli 8020858 <__umodsi3> <== NOT EXECUTED 80042f0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED rtems_interrupt_disable (level); 80042f4: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED 80042f8: a0 8d 08 00 and r1,r4,r13 <== NOT EXECUTED 80042fc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 8004300: 29 6c 00 84 lw r12,(r11+132) <== NOT EXECUTED 8004304: b8 80 90 00 mv r18,r4 <== NOT EXECUTED 8004308: 5d 8f 00 0e bne r12,r15,8004340 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 800430c: 59 6e 00 94 sw (r11+148),r14 <== NOT EXECUTED rtems_interrupt_enable (level); 8004310: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 8004314: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004318: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800431c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004320: f8 00 09 66 calli 80068b8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004324: 5c 20 00 34 bne r1,r0,80043f4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004328: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED 800432c: a0 8d 28 00 and r5,r4,r13 <== NOT EXECUTED 8004330: d0 05 00 00 wcsr IE,r5 <== 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) { 8004334: 29 65 00 84 lw r5,(r11+132) <== NOT EXECUTED 8004338: 44 ac ff f5 be r5,r12,800430c <== NOT EXECUTED 800433c: b8 80 90 00 mv r18,r4 <== 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++; 8004340: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8004344: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8004348: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800434c: 42 22 00 00 lbu r2,(r17+0) <== NOT EXECUTED 8004350: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 8004354: 29 61 00 94 lw r1,(r11+148) <== 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; 8004358: 59 6f 00 80 sw (r11+128),r15 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 800435c: 5c 20 00 08 bne r1,r0,800437c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 8004360: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004364: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED 8004368: 44 41 00 0a be r2,r1,8004390 <== 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; 800436c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004370: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED 8004374: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 8004378: 59 73 00 94 sw (r11+148),r19 <== NOT EXECUTED } rtems_interrupt_enable (level); 800437c: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED len--; 8004380: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 8004384: 46 00 00 10 be r16,r0,80043c4 <== 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++; 8004388: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED 800438c: e3 ff ff d6 bi 80042e4 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 8004390: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8004394: 29 62 00 84 lw r2,(r11+132) <== 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, 8004398: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 800439c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80043a0: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80043a4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80043a8: d8 80 00 00 call r4 <== NOT EXECUTED 80043ac: e3 ff ff f3 bi 8004378 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 80043b0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80043b4: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80043b8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80043bc: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 80043c0: d8 80 00 00 call r4 <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 80043c4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80043c8: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED 80043cc: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED 80043d0: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED 80043d4: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED 80043d8: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED 80043dc: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED 80043e0: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED 80043e4: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED 80043e8: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED 80043ec: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 80043f0: c3 a0 00 00 ret <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 80043f4: f8 00 0b 5d calli 8007168 <== NOT EXECUTED 08004c88 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 8004c88: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED 8004c8c: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED 8004c90: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED 8004c94: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED 8004c98: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED 8004c9c: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED 8004ca0: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED 8004ca4: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED 8004ca8: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED 8004cac: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED 8004cb0: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED 8004cb4: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED 8004cb8: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED 8004cbc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004cc0: b8 20 80 00 mv r16,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004cc4: 28 21 00 00 lw r1,(r1+0) <== 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); 8004cc8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004ccc: b8 40 18 00 mv r3,r2 <== 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; 8004cd0: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED uint32_t count = args->count; 8004cd4: 2a 0e 00 14 lw r14,(r16+20) <== NOT EXECUTED char *buffer = args->buffer; 8004cd8: 2a 0f 00 10 lw r15,(r16+16) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004cdc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004ce0: f8 00 06 f6 calli 80068b8 <== NOT EXECUTED 8004ce4: b8 20 88 00 mv r17,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8004ce8: 5c 20 00 14 bne r1,r0,8004d38 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 8004cec: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004cf0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004cf4: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004cf8: fb ff f1 f1 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004cfc: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8004d00: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004d04: fb ff f1 ee calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004d08: 39 8c 47 7c ori r12,r12,0x477c <== NOT EXECUTED 8004d0c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8004d10: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8004d14: 44 71 00 19 be r3,r17,8004d78 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 8004d18: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8004d1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004d20: d8 60 00 00 call r3 <== NOT EXECUTED 8004d24: b8 20 88 00 mv r17,r1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 8004d28: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; 8004d2c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004d30: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 8004d34: f8 00 07 42 calli 8006a3c <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 8004d38: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004d3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004d40: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED 8004d44: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED 8004d48: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED 8004d4c: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED 8004d50: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED 8004d54: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED 8004d58: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED 8004d5c: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED 8004d60: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED 8004d64: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED 8004d68: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED 8004d6c: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED 8004d70: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED 8004d74: c3 a0 00 00 ret <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 8004d78: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8004d7c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004d80: 44 41 00 16 be r2,r1,8004dd8 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004d84: 45 c0 00 0d be r14,r0,8004db8 <== NOT EXECUTED 8004d88: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED 8004d8c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004d90: 4c 61 00 0a bge r3,r1,8004db8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 8004d94: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED count--; 8004d98: 35 ce ff ff addi r14,r14,-1 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 8004d9c: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8004da0: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004da4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED 8004da8: 31 e1 00 00 sb (r15+0),r1 <== NOT EXECUTED 8004dac: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED 8004db0: 35 ef 00 01 addi r15,r15,1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004db4: 5d c0 ff f6 bne r14,r0,8004d8c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8004db8: 2a 02 00 14 lw r2,(r16+20) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 8004dbc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004dc0: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8004dc4: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED 8004dc8: 5a 0e 00 1c sw (r16+28),r14 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 8004dcc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004dd0: f8 00 07 1b calli 8006a3c <== NOT EXECUTED return sc; 8004dd4: e3 ff ff d9 bi 8004d38 <== 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; 8004dd8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 8004ddc: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 8004de0: 59 71 00 20 sw (r11+32),r17 <== NOT EXECUTED tty->read_start_column = tty->column; 8004de4: 59 61 00 2c sw (r11+44),r1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 8004de8: 59 71 00 24 sw (r11+36),r17 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 8004dec: 44 40 00 03 be r2,r0,8004df8 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 8004df0: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED 8004df4: 44 20 00 5a be r1,r0,8004f5c <== 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; 8004df8: 29 6d 00 74 lw r13,(r11+116) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004dfc: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004e00: 39 8c 42 34 ori r12,r12,0x4234 <== 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, 8004e04: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED 8004e08: 34 12 00 01 mvi r18,1 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 8004e0c: 34 14 ff fe mvi r20,-2 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004e10: 34 13 02 02 mvi r19,514 <== 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; 8004e14: 34 15 ff fb mvi r21,-5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004e18: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004e1c: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004e20: 44 61 00 05 be r3,r1,8004e34 <== NOT EXECUTED 8004e24: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8004e28: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004e2c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004e30: 48 22 00 08 bg r1,r2,8004e50 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 8004e34: 46 40 ff d4 be r18,r0,8004d84 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 8004e38: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 8004e3c: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED 8004e40: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8004e44: f8 00 06 9d calli 80068b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 8004e48: 44 20 ff f4 be r1,r0,8004e18 <== NOT EXECUTED 8004e4c: e3 ff ff ce bi 8004d84 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 8004e50: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004e54: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004e58: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8004e5c: f8 00 6e 7f calli 8020858 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 8004e60: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED 8004e64: b4 81 20 00 add r4,r4,r1 <== NOT EXECUTED 8004e68: 40 8d 00 00 lbu r13,(r4+0) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 8004e6c: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 8004e70: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED 8004e74: 29 65 00 64 lw r5,(r11+100) <== NOT EXECUTED 8004e78: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004e7c: b4 a4 20 00 add r4,r5,r4 <== NOT EXECUTED 8004e80: c8 81 08 00 sub r1,r4,r1 <== NOT EXECUTED 8004e84: f8 00 6e 75 calli 8020858 <__umodsi3> <== NOT EXECUTED 8004e88: 29 63 00 bc lw r3,(r11+188) <== NOT EXECUTED 8004e8c: 50 23 00 11 bgeu r1,r3,8004ed0 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 8004e90: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004e94: a0 74 18 00 and r3,r3,r20 <== NOT EXECUTED 8004e98: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004e9c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004ea0: 20 63 02 02 andi r3,r3,0x202 <== NOT EXECUTED 8004ea4: 44 73 00 23 be r3,r19,8004f30 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 8004ea8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004eac: 20 63 01 00 andi r3,r3,0x100 <== NOT EXECUTED 8004eb0: 44 60 00 08 be r3,r0,8004ed0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 8004eb4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004eb8: 29 63 00 b0 lw r3,(r11+176) <== 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; 8004ebc: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED 8004ec0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004ec4: 44 60 00 03 be r3,r0,8004ed0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 8004ec8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ecc: d8 60 00 00 call r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 8004ed0: 29 63 00 3c lw r3,(r11+60) <== NOT EXECUTED 8004ed4: 20 63 00 02 andi r3,r3,0x2 <== NOT EXECUTED 8004ed8: 44 60 00 0e be r3,r0,8004f10 <== NOT EXECUTED if (siproc (c, tty)) 8004edc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004ee0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004ee4: fb ff fe db calli 8004a50 <== NOT EXECUTED 8004ee8: 5c 20 00 10 bne r1,r0,8004f28 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004eec: 29 65 00 5c lw r5,(r11+92) <== NOT EXECUTED 8004ef0: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 8004ef4: 29 6d 00 70 lw r13,(r11+112) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004ef8: 44 a4 ff cf be r5,r4,8004e34 <== NOT EXECUTED 8004efc: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED 8004f00: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004f04: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 8004f08: 48 83 ff d2 bg r4,r3,8004e50 <== NOT EXECUTED 8004f0c: e3 ff ff ca bi 8004e34 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 8004f10: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004f14: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f18: fb ff fe ce calli 8004a50 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8004f1c: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED 8004f20: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004f24: 48 61 ff f2 bg r3,r1,8004eec <== NOT EXECUTED 8004f28: 34 12 00 00 mvi r18,0 <== NOT EXECUTED 8004f2c: e3 ff ff f0 bi 8004eec <== 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)) 8004f30: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8004f34: 44 20 00 04 be r1,r0,8004f44 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 8004f38: 29 61 00 b8 lw r1,(r11+184) <== 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)) 8004f3c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004f40: 44 20 ff da be r1,r0,8004ea8 <== 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, 8004f44: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004f48: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004f4c: ba c0 10 00 mv r2,r22 <== NOT EXECUTED 8004f50: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004f54: d8 80 00 00 call r4 <== NOT EXECUTED 8004f58: e3 ff ff de bi 8004ed0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8004f5c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004f60: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004f64: 44 20 00 14 be r1,r0,8004fb4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004f68: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004f6c: d8 40 00 00 call r2 <== NOT EXECUTED 8004f70: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8004f74: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f78: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 8004f7c: 4c 60 00 21 bge r3,r0,8005000 <== NOT EXECUTED rtems_task_wake_after (1); 8004f80: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004f84: f8 00 07 e3 calli 8006f10 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8004f88: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004f8c: e3 ff ff f7 bi 8004f68 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 8004f90: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f94: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED 8004f98: fb ff fe ae calli 8004a50 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8004f9c: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 8004fa0: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004fa4: 4c 22 ff 78 bge r1,r2,8004d84 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 8004fa8: 44 40 00 05 be r2,r0,8004fbc <== NOT EXECUTED 8004fac: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8004fb0: 44 20 00 03 be r1,r0,8004fbc <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 8004fb4: f8 00 04 3b calli 80060a0 <== NOT EXECUTED 8004fb8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004fbc: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004fc0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004fc4: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8004fc8: 4c 20 ff f2 bge r1,r0,8004f90 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 8004fcc: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 8004fd0: 44 40 00 10 be r2,r0,8005010 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 8004fd4: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8004fd8: 44 20 00 03 be r1,r0,8004fe4 <== NOT EXECUTED 8004fdc: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004fe0: 5c 20 00 0e bne r1,r0,8005018 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 8004fe4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004fe8: f8 00 07 ca calli 8006f10 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004fec: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004ff0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ff4: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8004ff8: 4c 20 ff e6 bge r1,r0,8004f90 <== NOT EXECUTED 8004ffc: e3 ff ff f4 bi 8004fcc <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8005000: fb ff fe 94 calli 8004a50 <== NOT EXECUTED 8005004: 5c 20 ff 60 bne r1,r0,8004d84 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8005008: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 800500c: e3 ff ff d7 bi 8004f68 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 8005010: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8005014: 44 22 ff 5c be r1,r2,8004d84 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 8005018: f8 00 04 22 calli 80060a0 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 800501c: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED 8005020: c8 2c 08 00 sub r1,r1,r12 <== NOT EXECUTED 8005024: 54 22 ff 58 bgu r1,r2,8004d84 <== NOT EXECUTED 8005028: e3 ff ff ef bi 8004fe4 <== NOT EXECUTED 08003c44 : * 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) { 8003c44: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8003c48: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8003c4c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8003c50: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8003c54: 5b 9d 00 04 sw (sp+4),ra <== 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)) 8003c58: 28 22 00 b8 lw r2,(r1+184) <== 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) { 8003c5c: b8 20 58 00 mv r11,r1 <== 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)) 8003c60: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED 8003c64: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED 8003c68: 44 41 00 52 be r2,r1,8003db0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 8003c6c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003c70: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003c74: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED 8003c78: 44 41 00 66 be r2,r1,8003e10 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 8003c7c: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 8003c80: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED 8003c84: 44 62 00 1d be r3,r2,8003cf8 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 8003c88: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8003c8c: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8003c90: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8003c94: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 8003c98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 8003c9c: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED tty->t_dqlen = 0; 8003ca0: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED rtems_interrupt_enable(level); 8003ca4: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 8003ca8: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003cac: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003cb0: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003cb4: f8 00 72 e9 calli 8020858 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 8003cb8: 29 62 00 94 lw r2,(r11+148) <== 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; 8003cbc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 8003cc0: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 8003cc4: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003cc8: 44 41 00 37 be r2,r1,8003da4 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 8003ccc: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003cd0: 44 2c 00 14 be r1,r12,8003d20 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 8003cd4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003cd8: 34 01 02 10 mvi r1,528 <== NOT EXECUTED 8003cdc: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED 8003ce0: 44 41 00 65 be r2,r1,8003e74 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 8003ce4: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003ce8: 50 2c 00 1f bgeu r1,r12,8003d64 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 8003cec: 29 6d 00 88 lw r13,(r11+136) <== NOT EXECUTED 8003cf0: c9 ac 68 00 sub r13,r13,r12 <== NOT EXECUTED 8003cf4: e0 00 00 1e bi 8003d6c <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 8003cf8: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8003cfc: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 8003d00: 44 41 00 6a be r2,r1,8003ea8 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003d04: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003d08: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003d0c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003d10: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003d14: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003d18: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003d1c: c3 a0 00 00 ret <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8003d20: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 8003d24: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8003d28: 59 64 00 94 sw (r11+148),r4 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8003d2c: b8 60 68 00 mv r13,r3 <== NOT EXECUTED 8003d30: 44 64 00 05 be r3,r4,8003d44 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 8003d34: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED 8003d38: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003d3c: b8 80 68 00 mv r13,r4 <== NOT EXECUTED 8003d40: d8 60 00 00 call r3 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003d44: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED } return nToSend; } 8003d48: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003d4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003d50: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003d54: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003d58: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003d5c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003d60: c3 a0 00 00 ret <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 8003d64: 29 6d 00 80 lw r13,(r11+128) <== NOT EXECUTED 8003d68: c9 ac 68 00 sub r13,r13,r12 <== 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)) { 8003d6c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d70: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED 8003d74: 44 20 00 02 be r1,r0,8003d7c <== NOT EXECUTED 8003d78: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 8003d7c: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003d80: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003d84: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 8003d88: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003d8c: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003d90: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 8003d94: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8003d98: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003d9c: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED 8003da0: e3 ff ff ea bi 8003d48 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003da4: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003da8: f8 00 0b 25 calli 8006a3c <== NOT EXECUTED 8003dac: e3 ff ff c8 bi 8003ccc <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 8003db0: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003db4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003db8: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED 8003dbc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003dc0: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 8003dc4: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003dc8: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003dcc: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003dd0: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8003dd4: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003dd8: 29 63 00 b8 lw r3,(r11+184) <== 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--; 8003ddc: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003de0: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED 8003de4: 59 63 00 b8 sw (r11+184),r3 <== 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--; 8003de8: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 8003dec: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003df0: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003df4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003df8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003dfc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003e00: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003e04: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003e08: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003e0c: c3 a0 00 00 ret <== 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, 8003e10: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003e14: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003e18: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED 8003e1c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003e20: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 8003e24: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003e28: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003e2c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003e30: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8003e34: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8003e38: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED 8003e3c: 34 03 ff fd mvi r3,-3 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003e40: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8003e44: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 8003e48: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003e4c: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 8003e50: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003e54: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003e58: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003e5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003e60: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003e64: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003e68: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003e6c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003e70: c3 a0 00 00 ret <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 8003e74: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003e78: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003e7c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003e80: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 8003e84: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 8003e88: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003e8c: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 8003e90: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED 8003e94: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 8003e98: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003e9c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003ea0: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED 8003ea4: e3 ff ff a9 bi 8003d48 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003ea8: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003eac: f8 00 0a e4 calli 8006a3c <== NOT EXECUTED 8003eb0: e3 ff ff 95 bi 8003d04 <== NOT EXECUTED 08005bb8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005bb8: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8005bbc: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 8005bc0: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 8005bc4: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8005bc8: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 8005bcc: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 8005bd0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005bd4: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005bd8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8005bdc: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED 8005be0: 37 8e 00 23 addi r14,sp,35 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 8005be4: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005be8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005bec: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8005bf0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005bf4: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005bf8: f8 00 01 46 calli 8006110 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 8005bfc: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8005c00: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8005c04: 5c 60 00 13 bne r3,r0,8005c50 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 8005c08: 29 63 00 a0 lw r3,(r11+160) <== NOT EXECUTED 8005c0c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005c10: d8 60 00 00 call r3 <== NOT EXECUTED 8005c14: b8 20 28 00 mv r5,r1 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 8005c18: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 8005c1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005c20: 34 03 00 01 mvi r3,1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 8005c24: 44 ad ff f1 be r5,r13,8005be8 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 8005c28: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 8005c2c: fb ff f8 c3 calli 8003f38 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005c30: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005c34: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8005c38: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005c3c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005c40: f8 00 01 34 calli 8006110 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 8005c44: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8005c48: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8005c4c: 44 60 ff ef be r3,r0,8005c08 <== NOT EXECUTED tty->rxTaskId = 0; 8005c50: 59 6f 00 c4 sw (r11+196),r15 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8005c54: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8005c58: f8 00 04 29 calli 8006cfc <== NOT EXECUTED 8005c5c: e3 ff ff e3 bi 8005be8 <== NOT EXECUTED 08003c24 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 8003c24: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003c28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 8003c2c: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED 8003c30: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003c34: f8 00 09 b0 calli 80062f4 <== NOT EXECUTED } 8003c38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003c3c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003c40: c3 a0 00 00 ret <== NOT EXECUTED 08005b2c : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 8005b2c: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 8005b30: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005b34: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8005b38: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8005b3c: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8005b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005b44: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8005b48: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8005b4c: 39 ad 47 7c ori r13,r13,0x477c <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 8005b50: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED 8005b54: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005b58: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005b5c: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED 8005b60: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005b64: f8 00 01 6b calli 8006110 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 8005b68: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b6c: 34 02 00 04 mvi r2,4 <== 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) { 8005b70: 21 8c 00 01 andi r12,r12,0x1 <== NOT EXECUTED 8005b74: 5d 80 00 0d bne r12,r0,8005ba8 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b78: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED 8005b7c: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 8005b80: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8005b84: fb ff ee 4e calli 80014bc <__ashlsi3> <== NOT EXECUTED 8005b88: b5 a1 10 00 add r2,r13,r1 <== NOT EXECUTED 8005b8c: 28 42 00 04 lw r2,(r2+4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8005b90: b9 60 08 00 mv r1,r11 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b94: 44 4c 00 02 be r2,r12,8005b9c <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8005b98: d8 40 00 00 call r2 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 8005b9c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005ba0: fb ff f8 29 calli 8003c44 <== NOT EXECUTED 8005ba4: e3 ff ff ec bi 8005b54 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 8005ba8: 59 6e 00 c8 sw (r11+200),r14 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8005bac: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8005bb0: f8 00 04 53 calli 8006cfc <== NOT EXECUTED 8005bb4: e3 ff ff e8 bi 8005b54 <== NOT EXECUTED 08004ad8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 8004ad8: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 8004adc: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8004ae0: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8004ae4: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8004ae8: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8004aec: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8004af0: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8004af4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004af8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004afc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004b00: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004b04: b8 40 18 00 mv r3,r2 <== NOT EXECUTED rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004b08: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004b0c: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004b10: f8 00 07 6a calli 80068b8 <== NOT EXECUTED 8004b14: b8 20 70 00 mv r14,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8004b18: 5c 20 00 12 bne r1,r0,8004b60 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 8004b1c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004b20: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004b24: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004b28: fb ff f2 65 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004b2c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8004b30: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004b34: fb ff f2 62 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004b38: 39 8c 47 7c ori r12,r12,0x477c <== NOT EXECUTED 8004b3c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8004b40: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED 8004b44: 44 6e 00 11 be r3,r14,8004b88 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 8004b48: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8004b4c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004b50: d8 60 00 00 call r3 <== NOT EXECUTED 8004b54: b8 20 70 00 mv r14,r1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 8004b58: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004b5c: f8 00 07 b8 calli 8006a3c <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 8004b60: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8004b64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004b68: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8004b6c: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8004b70: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8004b74: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8004b78: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8004b7c: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8004b80: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 8004b84: c3 a0 00 00 ret <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 8004b88: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED 8004b8c: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 8004b90: 44 20 00 11 be r1,r0,8004bd4 <== NOT EXECUTED uint32_t count = args->count; 8004b94: 29 af 00 14 lw r15,(r13+20) <== NOT EXECUTED char *buffer = args->buffer; 8004b98: 29 b0 00 10 lw r16,(r13+16) <== NOT EXECUTED while (count--) 8004b9c: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED 8004ba0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8004ba4: 45 e0 00 08 be r15,r0,8004bc4 <== NOT EXECUTED oproc (*buffer++, tty); 8004ba8: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED 8004bac: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004bb0: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8004bb4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004bb8: fb ff fe 10 calli 80043f8 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 8004bbc: 5d ec ff fb bne r15,r12,8004ba8 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 8004bc0: 29 a1 00 14 lw r1,(r13+20) <== NOT EXECUTED 8004bc4: 59 a1 00 1c sw (r13+28),r1 <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 8004bc8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004bcc: f8 00 07 9c calli 8006a3c <== NOT EXECUTED return sc; 8004bd0: e3 ff ff e4 bi 8004b60 <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 8004bd4: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED 8004bd8: 29 a2 00 14 lw r2,(r13+20) <== NOT EXECUTED 8004bdc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004be0: fb ff fd ab calli 800428c <== NOT EXECUTED 8004be4: e3 ff ff f7 bi 8004bc0 <== NOT EXECUTED 08006f7c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006f7c: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006f80: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8006f84: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8006f88: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8006f8c: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8006f90: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8006f94: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8006f98: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8006f9c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 8006fa0: 78 04 20 00 mvhi r4,0x2000 <== NOT EXECUTED 8006fa4: 38 84 00 00 ori r4,r4,0x0 <== NOT EXECUTED 8006fa8: a0 24 78 00 and r15,r1,r4 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006fac: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8006fb0: b8 40 80 00 mv r16,r2 <== NOT EXECUTED 8006fb4: b8 60 70 00 mv r14,r3 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 8006fb8: 45 e0 00 0f be r15,r0,8006ff4 <== NOT EXECUTED { if (rtems_panic_in_progress++) 8006fbc: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED 8006fc0: 38 a5 a8 1c ori r5,r5,0xa81c <== NOT EXECUTED 8006fc4: 28 a4 00 00 lw r4,(r5+0) <== NOT EXECUTED 8006fc8: 34 81 00 01 addi r1,r4,1 <== NOT EXECUTED 8006fcc: 58 a1 00 00 sw (r5+0),r1 <== NOT EXECUTED 8006fd0: 44 80 00 07 be r4,r0,8006fec <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8006fd4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006fd8: 38 21 a9 b4 ori r1,r1,0xa9b4 <== NOT EXECUTED 8006fdc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006fe0: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 8006fe4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 8006fe8: 28 a1 00 00 lw r1,(r5+0) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 8006fec: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8006ff0: 48 22 00 37 bg r1,r2,80070cc <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 8006ff4: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED 8006ff8: 39 6b a1 e8 ori r11,r11,0xa1e8 <== NOT EXECUTED 8006ffc: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007000: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8007004: f8 00 35 db calli 8014770 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007008: 78 06 40 00 mvhi r6,0x4000 <== NOT EXECUTED 800700c: 38 c6 00 00 ori r6,r6,0x0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 8007010: 78 05 8f ff mvhi r5,0x8fff <== NOT EXECUTED 8007014: 38 a5 ff ff ori r5,r5,0xffff <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007018: a1 86 30 00 and r6,r12,r6 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 800701c: a1 85 88 00 and r17,r12,r5 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007020: b8 c0 68 00 mv r13,r6 <== NOT EXECUTED 8007024: 5c c0 00 46 bne r6,r0,800713c <== 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); 8007028: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800702c: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 8007030: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8007034: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007038: f8 00 4c 35 calli 801a10c <== NOT EXECUTED 800703c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED if (status) 8007040: 5e 20 00 2e bne r17,r0,80070f8 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 8007044: 45 a0 00 0d be r13,r0,8007078 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 8007048: 4c 0d 00 05 bge r0,r13,800705c <== NOT EXECUTED 800704c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007050: f8 00 3a a8 calli 8015af0 <== NOT EXECUTED 8007054: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8007058: 5c 20 00 3c bne r1,r0,8007148 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 800705c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007060: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8007064: 38 42 74 24 ori r2,r2,0x7424 <== NOT EXECUTED 8007068: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 800706c: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8007070: f8 00 36 cd calli 8014ba4 <== NOT EXECUTED 8007074: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 8007078: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800707c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8007080: 38 42 6c 5c ori r2,r2,0x6c5c <== NOT EXECUTED 8007084: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007088: f8 00 36 c7 calli 8014ba4 <== NOT EXECUTED 800708c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED (void) fflush(stderr); 8007090: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007094: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007098: f8 00 35 b6 calli 8014770 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 800709c: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED 80070a0: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED 80070a4: a1 82 60 00 and r12,r12,r2 <== 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"); 80070a8: b6 0e 08 00 add r1,r16,r14 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 80070ac: 45 80 00 09 be r12,r0,80070d0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 80070b0: 45 e0 00 1e be r15,r0,8007128 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 80070b4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 80070b8: 38 42 74 38 ori r2,r2,0x7438 <== NOT EXECUTED 80070bc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80070c0: f8 00 00 40 calli 80071c0 <== NOT EXECUTED _exit(local_errno); 80070c4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80070c8: f8 00 03 88 calli 8007ee8 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 80070cc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } return chars_written; } 80070d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80070d4: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 80070d8: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 80070dc: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 80070e0: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 80070e4: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 80070e8: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 80070ec: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 80070f0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 80070f4: c3 a0 00 00 ret <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 80070f8: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 80070fc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8007100: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED 8007104: fb ff ff 95 calli 8006f58 <== NOT EXECUTED 8007108: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800710c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8007110: 38 42 74 04 ori r2,r2,0x7404 <== NOT EXECUTED 8007114: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8007118: f8 00 36 a3 calli 8014ba4 <== NOT EXECUTED 800711c: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED if (local_errno) 8007120: 45 a0 ff d6 be r13,r0,8007078 <== NOT EXECUTED 8007124: e3 ff ff c9 bi 8007048 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 8007128: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800712c: 38 42 74 50 ori r2,r2,0x7450 <== NOT EXECUTED 8007130: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8007134: f8 00 00 23 calli 80071c0 <== NOT EXECUTED abort(); 8007138: f8 00 34 6e calli 80142f0 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 800713c: f8 00 34 7d calli 8014330 <__errno> <== NOT EXECUTED 8007140: 28 2d 00 00 lw r13,(r1+0) <== NOT EXECUTED 8007144: e3 ff ff b9 bi 8007028 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 8007148: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800714c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007150: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED 8007154: f8 00 3a 67 calli 8015af0 <== NOT EXECUTED 8007158: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800715c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8007160: 38 42 74 14 ori r2,r2,0x7414 <== NOT EXECUTED 8007164: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8007168: f8 00 36 8f calli 8014ba4 <== NOT EXECUTED 800716c: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 8007170: e3 ff ff c2 bi 8007078 <== NOT EXECUTED 08029cb8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029cb8: 37 9c ff d4 addi sp,sp,-44 8029cbc: 5b 8b 00 2c sw (sp+44),r11 8029cc0: 5b 8c 00 28 sw (sp+40),r12 8029cc4: 5b 8d 00 24 sw (sp+36),r13 8029cc8: 5b 8e 00 20 sw (sp+32),r14 8029ccc: 5b 8f 00 1c sw (sp+28),r15 8029cd0: 5b 90 00 18 sw (sp+24),r16 8029cd4: 5b 91 00 14 sw (sp+20),r17 8029cd8: 5b 92 00 10 sw (sp+16),r18 8029cdc: 5b 93 00 0c sw (sp+12),r19 8029ce0: 5b 94 00 08 sw (sp+8),r20 8029ce4: 5b 9d 00 04 sw (sp+4),ra 8029ce8: 78 10 7f ff mvhi r16,0x7fff 8029cec: 34 0c 00 00 mvi r12,0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029cf0: 78 13 08 07 mvhi r19,0x807 limit++; continue; } sign = 1; } if (!isdigit(c)) 8029cf4: 78 0e 08 07 mvhi r14,0x807 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029cf8: b8 20 58 00 mv r11,r1 8029cfc: b8 40 a0 00 mv r20,r2 8029d00: 3a 10 ff ff ori r16,r16,0xffff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029d04: 3a 73 1a c8 ori r19,r19,0x1ac8 limit++; continue; } sign = 1; } if (!isdigit(c)) 8029d08: 39 ce 1a b8 ori r14,r14,0x1ab8 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029d0c: b9 80 78 00 mv r15,r12 int sign = 0; int d; for (;;) { c = getc(fp); if (c == ':') 8029d10: 34 11 00 3a mvi r17,58 break; if (sign == 0) { if (c == '-') { 8029d14: 34 12 00 2d mvi r18,45 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029d18: 29 63 00 04 lw r3,(r11+4) 8029d1c: 34 63 ff ff addi r3,r3,-1 8029d20: 59 63 00 04 sw (r11+4),r3 8029d24: 4c 60 00 1b bge r3,r0,8029d90 8029d28: 2a 61 00 00 lw r1,(r19+0) <== NOT EXECUTED 8029d2c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8029d30: f8 00 8d d5 calli 804d484 <__srget_r> <== NOT EXECUTED 8029d34: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if (c == ':') 8029d38: 45 b1 00 1b be r13,r17,8029da4 <== NOT EXECUTED break; if (sign == 0) { 8029d3c: 5d e0 00 03 bne r15,r0,8029d48 if (c == '-') { sign = -1; limit++; continue; 8029d40: 34 0f 00 01 mvi r15,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 8029d44: 45 b2 00 32 be r13,r18,8029e0c limit++; continue; } sign = 1; } if (!isdigit(c)) 8029d48: 29 c1 00 00 lw r1,(r14+0) 8029d4c: b4 2d 08 00 add r1,r1,r13 8029d50: 40 21 00 01 lbu r1,(r1+1) 8029d54: 20 21 00 04 andi r1,r1,0x4 8029d58: 44 20 00 1f be r1,r0,8029dd4 return 0; d = c - '0'; if ((i > (limit / 10)) 8029d5c: ba 00 08 00 mv r1,r16 8029d60: 34 02 00 0a mvi r2,10 8029d64: fb ff 66 38 calli 8003644 <__udivsi3> 8029d68: 55 81 00 1b bgu r12,r1,8029dd4 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 8029d6c: 35 ad ff d0 addi r13,r13,-48 if ((i > (limit / 10)) 8029d70: 45 81 00 14 be r12,r1,8029dc0 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 8029d74: b5 8c 60 00 add r12,r12,r12 8029d78: b9 80 08 00 mv r1,r12 8029d7c: 34 02 00 02 mvi r2,2 8029d80: fb ff 5c f8 calli 8001160 <__ashlsi3> 8029d84: b5 81 60 00 add r12,r12,r1 8029d88: b5 ac 60 00 add r12,r13,r12 8029d8c: e3 ff ff e3 bi 8029d18 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029d90: 29 63 00 00 lw r3,(r11+0) 8029d94: 40 6d 00 00 lbu r13,(r3+0) 8029d98: 34 61 00 01 addi r1,r3,1 8029d9c: 59 61 00 00 sw (r11+0),r1 if (c == ':') 8029da0: 5d b1 ff e7 bne r13,r17,8029d3c if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 8029da4: 45 e0 00 0c be r15,r0,8029dd4 return 0; *val = i * sign; 8029da8: b9 e0 08 00 mv r1,r15 8029dac: b9 80 10 00 mv r2,r12 8029db0: fb ff 66 05 calli 80035c4 <__mulsi3> 8029db4: 5a 81 00 00 sw (r20+0),r1 8029db8: 34 01 00 01 mvi r1,1 return 1; 8029dbc: e0 00 00 07 bi 8029dd8 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 8029dc0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8029dc4: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8029dc8: fb ff 66 2f calli 8003684 <__umodsi3> <== NOT EXECUTED 8029dcc: 55 a1 00 02 bgu r13,r1,8029dd4 <== NOT EXECUTED 8029dd0: e3 ff ff e9 bi 8029d74 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 8029dd4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8029dd8: 2b 9d 00 04 lw ra,(sp+4) 8029ddc: 2b 8b 00 2c lw r11,(sp+44) 8029de0: 2b 8c 00 28 lw r12,(sp+40) 8029de4: 2b 8d 00 24 lw r13,(sp+36) 8029de8: 2b 8e 00 20 lw r14,(sp+32) 8029dec: 2b 8f 00 1c lw r15,(sp+28) 8029df0: 2b 90 00 18 lw r16,(sp+24) 8029df4: 2b 91 00 14 lw r17,(sp+20) 8029df8: 2b 92 00 10 lw r18,(sp+16) 8029dfc: 2b 93 00 0c lw r19,(sp+12) 8029e00: 2b 94 00 08 lw r20,(sp+8) 8029e04: 37 9c 00 2c addi sp,sp,44 8029e08: c3 a0 00 00 ret if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 8029e0c: b6 0f 80 00 add r16,r16,r15 <== NOT EXECUTED 8029e10: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED continue; 8029e14: e3 ff ff c1 bi 8029d18 <== NOT EXECUTED 08029e18 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8029e18: 37 9c ff d8 addi sp,sp,-40 8029e1c: 5b 8b 00 28 sw (sp+40),r11 8029e20: 5b 8c 00 24 sw (sp+36),r12 8029e24: 5b 8d 00 20 sw (sp+32),r13 8029e28: 5b 8e 00 1c sw (sp+28),r14 8029e2c: 5b 8f 00 18 sw (sp+24),r15 8029e30: 5b 90 00 14 sw (sp+20),r16 8029e34: 5b 91 00 10 sw (sp+16),r17 8029e38: 5b 92 00 0c sw (sp+12),r18 8029e3c: 5b 93 00 08 sw (sp+8),r19 8029e40: 5b 9d 00 04 sw (sp+4),ra 8029e44: b8 60 58 00 mv r11,r3 int c; *name = *bufp; 8029e48: 28 63 00 00 lw r3,(r3+0) for (;;) { c = getc(fp); 8029e4c: 78 12 08 07 mvhi r18,0x807 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8029e50: b8 20 60 00 mv r12,r1 int c; *name = *bufp; 8029e54: 58 43 00 00 sw (r2+0),r3 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8029e58: b8 80 68 00 mv r13,r4 8029e5c: b8 a0 98 00 mv r19,r5 int c; *name = *bufp; for (;;) { c = getc(fp); 8029e60: 3a 52 1a c8 ori r18,r18,0x1ac8 if (c == ':') { 8029e64: 34 0e 00 3a mvi r14,58 if (nlFlag) return 0; break; } if (c == '\n') { 8029e68: 34 0f 00 0a mvi r15,10 if (!nlFlag) return 0; break; } if (c == EOF) 8029e6c: 34 10 ff ff mvi r16,-1 return 0; if (*nleft < 2) 8029e70: 34 11 00 01 mvi r17,1 { int c; *name = *bufp; for (;;) { c = getc(fp); 8029e74: 29 81 00 04 lw r1,(r12+4) 8029e78: 34 21 ff ff addi r1,r1,-1 8029e7c: 59 81 00 04 sw (r12+4),r1 8029e80: 4c 20 00 12 bge r1,r0,8029ec8 8029e84: 2a 41 00 00 lw r1,(r18+0) 8029e88: b9 80 10 00 mv r2,r12 8029e8c: f8 00 8d 7e calli 804d484 <__srget_r> if (c == ':') { 8029e90: 44 2e 00 13 be r1,r14,8029edc if (nlFlag) return 0; break; } if (c == '\n') { 8029e94: 44 2f 00 1e be r1,r15,8029f0c if (!nlFlag) return 0; break; } if (c == EOF) 8029e98: 44 30 00 1e be r1,r16,8029f10 return 0; if (*nleft < 2) 8029e9c: 29 a2 00 00 lw r2,(r13+0) 8029ea0: 52 22 00 1c bgeu r17,r2,8029f10 return 0; **bufp = c; 8029ea4: 29 62 00 00 lw r2,(r11+0) 8029ea8: 30 41 00 00 sb (r2+0),r1 ++(*bufp); 8029eac: 29 62 00 00 lw r2,(r11+0) --(*nleft); 8029eb0: 29 a1 00 00 lw r1,(r13+0) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 8029eb4: 34 42 00 01 addi r2,r2,1 --(*nleft); 8029eb8: 34 21 ff ff addi r1,r1,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 8029ebc: 59 62 00 00 sw (r11+0),r2 --(*nleft); 8029ec0: 59 a1 00 00 sw (r13+0),r1 } 8029ec4: e3 ff ff ec bi 8029e74 { int c; *name = *bufp; for (;;) { c = getc(fp); 8029ec8: 29 81 00 00 lw r1,(r12+0) 8029ecc: 34 22 00 01 addi r2,r1,1 8029ed0: 40 21 00 00 lbu r1,(r1+0) 8029ed4: 59 82 00 00 sw (r12+0),r2 if (c == ':') { 8029ed8: 5c 2e ff ef bne r1,r14,8029e94 if (nlFlag) 8029edc: 5e 60 00 0d bne r19,r0,8029f10 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 8029ee0: 29 63 00 00 lw r3,(r11+0) 8029ee4: 34 02 00 00 mvi r2,0 ++(*bufp); --(*nleft); 8029ee8: 34 01 00 01 mvi r1,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 8029eec: 30 62 00 00 sb (r3+0),r2 ++(*bufp); 8029ef0: 29 63 00 00 lw r3,(r11+0) --(*nleft); 8029ef4: 29 a2 00 00 lw r2,(r13+0) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 8029ef8: b4 61 18 00 add r3,r3,r1 --(*nleft); 8029efc: 34 42 ff ff addi r2,r2,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 8029f00: 59 63 00 00 sw (r11+0),r3 --(*nleft); 8029f04: 59 a2 00 00 sw (r13+0),r2 return 1; 8029f08: e0 00 00 03 bi 8029f14 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 8029f0c: 5e 60 ff f5 bne r19,r0,8029ee0 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 8029f10: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8029f14: 2b 9d 00 04 lw ra,(sp+4) 8029f18: 2b 8b 00 28 lw r11,(sp+40) 8029f1c: 2b 8c 00 24 lw r12,(sp+36) 8029f20: 2b 8d 00 20 lw r13,(sp+32) 8029f24: 2b 8e 00 1c lw r14,(sp+28) 8029f28: 2b 8f 00 18 lw r15,(sp+24) 8029f2c: 2b 90 00 14 lw r16,(sp+20) 8029f30: 2b 91 00 10 lw r17,(sp+16) 8029f34: 2b 92 00 0c lw r18,(sp+12) 8029f38: 2b 93 00 08 lw r19,(sp+8) 8029f3c: 37 9c 00 28 addi sp,sp,40 8029f40: c3 a0 00 00 ret 08029f44 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8029f44: 37 9c ff d8 addi sp,sp,-40 8029f48: 5b 8b 00 18 sw (sp+24),r11 8029f4c: 5b 8c 00 14 sw (sp+20),r12 8029f50: 5b 8d 00 10 sw (sp+16),r13 8029f54: 5b 8e 00 0c sw (sp+12),r14 8029f58: 5b 8f 00 08 sw (sp+8),r15 8029f5c: 5b 9d 00 04 sw (sp+4),ra int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029f60: 37 8c 00 20 addi r12,sp,32 8029f64: 37 8b 00 1c addi r11,sp,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8029f68: 5b 83 00 20 sw (sp+32),r3 8029f6c: 5b 84 00 1c sw (sp+28),r4 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029f70: b9 80 18 00 mv r3,r12 8029f74: b9 60 20 00 mv r4,r11 8029f78: 34 05 00 00 mvi r5,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8029f7c: b8 20 68 00 mv r13,r1 8029f80: b8 40 70 00 mv r14,r2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029f84: fb ff ff a5 calli 8029e18 8029f88: 5c 20 00 0a bne r1,r0,8029fb0 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 8029f8c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8029f90: 2b 9d 00 04 lw ra,(sp+4) 8029f94: 2b 8b 00 18 lw r11,(sp+24) 8029f98: 2b 8c 00 14 lw r12,(sp+20) 8029f9c: 2b 8d 00 10 lw r13,(sp+16) 8029fa0: 2b 8e 00 0c lw r14,(sp+12) 8029fa4: 2b 8f 00 08 lw r15,(sp+8) 8029fa8: 37 9c 00 28 addi sp,sp,40 8029fac: c3 a0 00 00 ret int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 8029fb0: b9 a0 08 00 mv r1,r13 8029fb4: 35 c2 00 04 addi r2,r14,4 8029fb8: b9 80 18 00 mv r3,r12 8029fbc: b9 60 20 00 mv r4,r11 8029fc0: 34 05 00 00 mvi r5,0 8029fc4: fb ff ff 95 calli 8029e18 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029fc8: 44 20 ff f1 be r1,r0,8029f8c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 8029fcc: b9 a0 08 00 mv r1,r13 8029fd0: 37 82 00 28 addi r2,sp,40 8029fd4: fb ff ff 39 calli 8029cb8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029fd8: 44 20 ff ed be r1,r0,8029f8c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 8029fdc: b9 a0 08 00 mv r1,r13 8029fe0: b9 80 18 00 mv r3,r12 8029fe4: b9 60 20 00 mv r4,r11 8029fe8: 37 82 00 24 addi r2,sp,36 8029fec: 34 05 00 01 mvi r5,1 8029ff0: fb ff ff 8a calli 8029e18 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8029ff4: 44 20 ff e6 be r1,r0,8029f8c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 8029ff8: 2f 82 00 2a lhu r2,(sp+42) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8029ffc: 2b 8b 00 24 lw r11,(sp+36) 802a000: 34 01 00 01 mvi r1,1 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; 802a004: 0d c2 00 08 sh (r14+8),r2 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a008: 41 62 00 00 lbu r2,(r11+0) 802a00c: b9 60 18 00 mv r3,r11 802a010: 34 04 00 17 mvi r4,23 802a014: 44 40 00 0a be r2,r0,802a03c 802a018: 34 63 00 01 addi r3,r3,1 if(*cp == ',') memcount++; 802a01c: 64 44 00 2c cmpei r4,r2,44 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a020: 40 62 00 00 lbu r2,(r3+0) if(*cp == ',') memcount++; 802a024: b4 24 08 00 add r1,r1,r4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a028: 5c 40 ff fc bne r2,r0,802a018 802a02c: 34 21 00 01 addi r1,r1,1 802a030: 34 02 00 02 mvi r2,2 802a034: fb ff 5c 4b calli 8001160 <__ashlsi3> 802a038: 34 24 00 0f addi r4,r1,15 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 802a03c: 2b 81 00 1c lw r1,(sp+28) 802a040: 54 81 ff d3 bgu r4,r1,8029f8c return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 802a044: 2b 82 00 20 lw r2,(sp+32) 802a048: 34 01 ff f0 mvi r1,-16 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a04c: 34 0c 00 01 mvi r12,1 /* * 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); 802a050: 34 42 00 0f addi r2,r2,15 802a054: a0 41 08 00 and r1,r2,r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 802a058: 58 2b 00 00 sw (r1+0),r11 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a05c: 2b 8b 00 24 lw r11,(sp+36) /* * 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); 802a060: 59 c1 00 0c sw (r14+12),r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a064: 34 03 00 04 mvi r3,4 802a068: 41 62 00 00 lbu r2,(r11+0) 802a06c: b5 6c 58 00 add r11,r11,r12 802a070: 44 40 00 0a be r2,r0,802a098 if(*cp == ',') { 802a074: 34 0d 00 2c mvi r13,44 802a078: 44 4d 00 0e be r2,r13,802a0b0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a07c: 41 62 00 00 lbu r2,(r11+0) 802a080: 35 6b 00 01 addi r11,r11,1 802a084: 5c 40 ff fd bne r2,r0,802a078 802a088: b9 80 08 00 mv r1,r12 802a08c: 34 02 00 02 mvi r2,2 802a090: fb ff 5c 34 calli 8001160 <__ashlsi3> 802a094: b8 20 18 00 mv r3,r1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 802a098: 29 c2 00 0c lw r2,(r14+12) 802a09c: 34 01 00 01 mvi r1,1 802a0a0: b4 43 18 00 add r3,r2,r3 802a0a4: 34 02 00 00 mvi r2,0 802a0a8: 58 62 00 00 sw (r3+0),r2 return 1; 802a0ac: e3 ff ff b9 bi 8029f90 * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 802a0b0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a0b4: 31 61 ff ff sb (r11+-1),r1 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 802a0b8: 29 cf 00 0c lw r15,(r14+12) <== NOT EXECUTED 802a0bc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a0c0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 802a0c4: fb ff 5c 27 calli 8001160 <__ashlsi3> <== NOT EXECUTED 802a0c8: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 802a0cc: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 802a0d0: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 802a0d4: e3 ff ff ea bi 802a07c <== NOT EXECUTED 0802a130 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a130: 37 9c ff dc addi sp,sp,-36 802a134: 5b 8b 00 14 sw (sp+20),r11 802a138: 5b 8c 00 10 sw (sp+16),r12 802a13c: 5b 8d 00 0c sw (sp+12),r13 802a140: 5b 8e 00 08 sw (sp+8),r14 802a144: 5b 9d 00 04 sw (sp+4),ra int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a148: 37 8c 00 1c addi r12,sp,28 802a14c: 37 8b 00 18 addi r11,sp,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a150: 5b 83 00 1c sw (sp+28),r3 802a154: 5b 84 00 18 sw (sp+24),r4 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a158: b9 80 18 00 mv r3,r12 802a15c: b9 60 20 00 mv r4,r11 802a160: 34 05 00 00 mvi r5,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a164: b8 20 68 00 mv r13,r1 802a168: b8 40 70 00 mv r14,r2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a16c: fb ff ff 2b calli 8029e18 802a170: 5c 20 00 09 bne r1,r0,802a194 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 802a174: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802a178: 2b 9d 00 04 lw ra,(sp+4) 802a17c: 2b 8b 00 14 lw r11,(sp+20) 802a180: 2b 8c 00 10 lw r12,(sp+16) 802a184: 2b 8d 00 0c lw r13,(sp+12) 802a188: 2b 8e 00 08 lw r14,(sp+8) 802a18c: 37 9c 00 24 addi sp,sp,36 802a190: c3 a0 00 00 ret ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 802a194: b9 a0 08 00 mv r1,r13 802a198: 35 c2 00 04 addi r2,r14,4 802a19c: b9 80 18 00 mv r3,r12 802a1a0: b9 60 20 00 mv r4,r11 802a1a4: 34 05 00 00 mvi r5,0 802a1a8: fb ff ff 1c calli 8029e18 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a1ac: 44 20 ff f2 be r1,r0,802a174 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 802a1b0: b9 a0 08 00 mv r1,r13 802a1b4: 37 82 00 24 addi r2,sp,36 802a1b8: fb ff fe c0 calli 8029cb8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a1bc: 44 20 ff ee be r1,r0,802a174 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 802a1c0: b9 a0 08 00 mv r1,r13 802a1c4: 37 82 00 20 addi r2,sp,32 802a1c8: fb ff fe bc calli 8029cb8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a1cc: 44 20 ff ea be r1,r0,802a174 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 802a1d0: b9 a0 08 00 mv r1,r13 802a1d4: 35 c2 00 0c addi r2,r14,12 802a1d8: b9 80 18 00 mv r3,r12 802a1dc: b9 60 20 00 mv r4,r11 802a1e0: 34 05 00 00 mvi r5,0 802a1e4: fb ff ff 0d calli 8029e18 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a1e8: 44 20 ff e3 be r1,r0,802a174 || !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) 802a1ec: b9 a0 08 00 mv r1,r13 802a1f0: 35 c2 00 10 addi r2,r14,16 802a1f4: b9 80 18 00 mv r3,r12 802a1f8: b9 60 20 00 mv r4,r11 802a1fc: 34 05 00 00 mvi r5,0 802a200: fb ff ff 06 calli 8029e18 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a204: 44 20 ff dc be r1,r0,802a174 || !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) 802a208: b9 a0 08 00 mv r1,r13 802a20c: 35 c2 00 14 addi r2,r14,20 802a210: b9 80 18 00 mv r3,r12 802a214: b9 60 20 00 mv r4,r11 802a218: 34 05 00 00 mvi r5,0 802a21c: fb ff fe ff calli 8029e18 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a220: 44 20 ff d5 be r1,r0,802a174 || !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)) 802a224: b9 a0 08 00 mv r1,r13 802a228: b9 80 18 00 mv r3,r12 802a22c: b9 60 20 00 mv r4,r11 802a230: 35 c2 00 18 addi r2,r14,24 802a234: 34 05 00 01 mvi r5,1 802a238: fb ff fe f8 calli 8029e18 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a23c: 44 20 ff ce be r1,r0,802a174 || !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; 802a240: 2f 82 00 26 lhu r2,(sp+38) pwd->pw_gid = pwgid; 802a244: 34 01 00 01 mvi r1,1 || !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; 802a248: 0d c2 00 08 sh (r14+8),r2 pwd->pw_gid = pwgid; 802a24c: 2b 82 00 20 lw r2,(sp+32) 802a250: 0d c2 00 0a sh (r14+10),r2 return 1; 802a254: e3 ff ff c9 bi 802a178 08029c50 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 8029c50: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8029c54: 38 42 12 f0 ori r2,r2,0x12f0 <== NOT EXECUTED 8029c58: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8029c5c: 0c 41 00 34 sh (r2+52),r1 <== NOT EXECUTED return 0; } 8029c60: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8029c64: c3 a0 00 00 ret <== NOT EXECUTED 0802a3cc : return NULL; return &grent; } void setgrent(void) { 802a3cc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a3d0: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802a3d4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 802a3d8: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802a3dc: 39 6b 4c a0 ori r11,r11,0x4ca0 <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 802a3e0: fb ff ff b4 calli 802a2b0 <== NOT EXECUTED if (group_fp != NULL) 802a3e4: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 802a3e8: 44 20 00 02 be r1,r0,802a3f0 <== NOT EXECUTED fclose(group_fp); 802a3ec: f8 00 74 47 calli 8047508 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 802a3f0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 802a3f4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802a3f8: 38 42 cf bc ori r2,r2,0xcfbc <== NOT EXECUTED 802a3fc: 38 21 49 24 ori r1,r1,0x4924 <== NOT EXECUTED 802a400: f8 00 76 e7 calli 8047f9c <== NOT EXECUTED 802a404: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } 802a408: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a40c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802a410: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a414: c3 a0 00 00 ret <== NOT EXECUTED 0802a610 : return NULL; return &pwent; } void setpwent(void) { 802a610: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a614: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802a618: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 802a61c: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802a620: 39 6b 4b b8 ori r11,r11,0x4bb8 <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 802a624: fb ff ff 23 calli 802a2b0 <== NOT EXECUTED if (passwd_fp != NULL) 802a628: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 802a62c: 44 20 00 02 be r1,r0,802a634 <== NOT EXECUTED fclose(passwd_fp); 802a630: f8 00 73 b6 calli 8047508 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 802a634: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 802a638: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802a63c: 38 42 cf bc ori r2,r2,0xcfbc <== NOT EXECUTED 802a640: 38 21 48 74 ori r1,r1,0x4874 <== NOT EXECUTED 802a644: f8 00 76 56 calli 8047f9c <== NOT EXECUTED 802a648: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } 802a64c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a650: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802a654: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a658: c3 a0 00 00 ret <== NOT EXECUTED 08007bdc : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 8007bdc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8007be0: 38 42 12 f0 ori r2,r2,0x12f0 <== NOT EXECUTED 8007be4: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8007be8: 0c 41 00 32 sh (r2+50),r1 <== NOT EXECUTED return 0; } 8007bec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8007bf0: c3 a0 00 00 ret <== NOT EXECUTED 08004a50 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8004a50: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004a54: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004a58: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004a5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8004a60: 28 43 00 3c lw r3,(r2+60) <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8004a64: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED 8004a68: b8 40 58 00 mv r11,r2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8004a6c: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED 8004a70: 5c 20 00 0a bne r1,r0,8004a98 <== 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); 8004a74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a78: fb ff ff 7b calli 8004864 <== NOT EXECUTED 8004a7c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED } return i; } 8004a80: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004a88: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004a8c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004a90: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004a94: c3 a0 00 00 ret <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004a98: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 8004a9c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004aa0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004aa4: f8 00 07 85 calli 80068b8 <== NOT EXECUTED i = iproc (c, tty); 8004aa8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004aac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004ab0: fb ff ff 6d calli 8004864 <== NOT EXECUTED 8004ab4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 8004ab8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004abc: f8 00 07 e0 calli 8006a3c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 8004ac0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004ac4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004ac8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004acc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004ad0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004ad4: c3 a0 00 00 ret <== NOT EXECUTED 08009560 : int _STAT_NAME( const char *path, struct stat *buf ) { 8009560: 37 9c ff dc addi sp,sp,-36 8009564: 5b 8b 00 10 sw (sp+16),r11 8009568: 5b 8c 00 0c sw (sp+12),r12 800956c: 5b 8d 00 08 sw (sp+8),r13 8009570: 5b 9d 00 04 sw (sp+4),ra 8009574: b8 40 60 00 mv r12,r2 8009578: b8 20 58 00 mv r11,r1 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 800957c: 44 40 00 26 be r2,r0,8009614 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 8009580: f8 01 15 6a calli 804eb28 8009584: 37 8d 00 14 addi r13,sp,20 8009588: b8 20 10 00 mv r2,r1 800958c: 34 03 00 00 mvi r3,0 8009590: b9 60 08 00 mv r1,r11 8009594: b9 a0 20 00 mv r4,r13 8009598: 34 05 00 01 mvi r5,1 800959c: fb ff f8 f9 calli 8007980 80095a0: b8 20 18 00 mv r3,r1 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 80095a4: 34 0b ff ff mvi r11,-1 80095a8: 5c 20 00 14 bne r1,r0,80095f8 return -1; if ( !loc.handlers->fstat_h ){ 80095ac: 2b 81 00 1c lw r1,(sp+28) 80095b0: 28 22 00 18 lw r2,(r1+24) 80095b4: 44 43 00 23 be r2,r3,8009640 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 80095b8: b8 60 10 00 mv r2,r3 80095bc: b9 80 08 00 mv r1,r12 80095c0: 34 03 00 48 mvi r3,72 80095c4: f8 01 06 db calli 804b130 status = (*loc.handlers->fstat_h)( &loc, buf ); 80095c8: 2b 83 00 1c lw r3,(sp+28) 80095cc: b9 80 10 00 mv r2,r12 80095d0: b9 a0 08 00 mv r1,r13 80095d4: 28 63 00 18 lw r3,(r3+24) 80095d8: d8 60 00 00 call r3 80095dc: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 80095e0: 2b 81 00 20 lw r1,(sp+32) 80095e4: 44 20 00 05 be r1,r0,80095f8 80095e8: 28 22 00 1c lw r2,(r1+28) 80095ec: 44 40 00 03 be r2,r0,80095f8 80095f0: b9 a0 08 00 mv r1,r13 80095f4: d8 40 00 00 call r2 return status; } 80095f8: b9 60 08 00 mv r1,r11 80095fc: 2b 9d 00 04 lw ra,(sp+4) 8009600: 2b 8b 00 10 lw r11,(sp+16) 8009604: 2b 8c 00 0c lw r12,(sp+12) 8009608: 2b 8d 00 08 lw r13,(sp+8) 800960c: 37 9c 00 24 addi sp,sp,36 8009610: c3 a0 00 00 ret /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 8009614: f8 00 f7 5b calli 8047380 <__errno> 8009618: 34 02 00 0e mvi r2,14 800961c: 34 0b ff ff mvi r11,-1 8009620: 58 22 00 00 sw (r1+0),r2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 8009624: b9 60 08 00 mv r1,r11 8009628: 2b 9d 00 04 lw ra,(sp+4) 800962c: 2b 8b 00 10 lw r11,(sp+16) 8009630: 2b 8c 00 0c lw r12,(sp+12) 8009634: 2b 8d 00 08 lw r13,(sp+8) 8009638: 37 9c 00 24 addi sp,sp,36 800963c: c3 a0 00 00 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 8009640: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8009644: 44 22 00 05 be r1,r2,8009658 <== NOT EXECUTED 8009648: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 800964c: 44 62 00 03 be r3,r2,8009658 <== NOT EXECUTED 8009650: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8009654: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009658: f8 00 f7 4a calli 8047380 <__errno> <== NOT EXECUTED 800965c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009660: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009664: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8009668: e3 ff ff e4 bi 80095f8 <== NOT EXECUTED 0802b72c : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 802b72c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 802b730: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 802b734: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802b738: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 802b73c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802b740: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 802b744: b8 40 58 00 mv r11,r2 <== 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 ) ) 802b748: 37 8d 00 14 addi r13,sp,20 <== NOT EXECUTED 802b74c: f8 00 8c f7 calli 804eb28 <== NOT EXECUTED 802b750: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802b754: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 802b758: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b75c: b9 a0 20 00 mv r4,r13 <== NOT EXECUTED 802b760: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 802b764: fb ff 70 87 calli 8007980 <== NOT EXECUTED 802b768: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 802b76c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b770: 5c 20 00 1f bne r1,r0,802b7ec <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 802b774: 2b 82 00 24 lw r2,(sp+36) <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 802b778: 28 41 00 28 lw r1,(r2+40) <== NOT EXECUTED 802b77c: 28 21 00 44 lw r1,(r1+68) <== NOT EXECUTED 802b780: 44 23 00 22 be r1,r3,802b808 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 802b784: 59 63 00 34 sw (r11+52),r3 <== NOT EXECUTED 802b788: 59 63 00 00 sw (r11+0),r3 <== NOT EXECUTED 802b78c: 59 63 00 04 sw (r11+4),r3 <== NOT EXECUTED 802b790: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 802b794: 59 63 00 0c sw (r11+12),r3 <== NOT EXECUTED 802b798: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED 802b79c: 59 63 00 14 sw (r11+20),r3 <== NOT EXECUTED 802b7a0: 59 63 00 18 sw (r11+24),r3 <== NOT EXECUTED 802b7a4: 59 63 00 1c sw (r11+28),r3 <== NOT EXECUTED 802b7a8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 802b7ac: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED 802b7b0: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED 802b7b4: 59 63 00 2c sw (r11+44),r3 <== NOT EXECUTED 802b7b8: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 802b7bc: 28 43 00 28 lw r3,(r2+40) <== NOT EXECUTED 802b7c0: 34 41 00 1c addi r1,r2,28 <== NOT EXECUTED 802b7c4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802b7c8: 28 63 00 44 lw r3,(r3+68) <== NOT EXECUTED 802b7cc: d8 60 00 00 call r3 <== NOT EXECUTED 802b7d0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 802b7d4: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802b7d8: 44 20 00 05 be r1,r0,802b7ec <== NOT EXECUTED 802b7dc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b7e0: 44 40 00 03 be r2,r0,802b7ec <== NOT EXECUTED 802b7e4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802b7e8: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 802b7ec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b7f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b7f4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802b7f8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802b7fc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802b800: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802b804: c3 a0 00 00 ret <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b808: f8 00 6e de calli 8047380 <__errno> <== NOT EXECUTED 802b80c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b810: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802b814: e3 ff ff f6 bi 802b7ec <== NOT EXECUTED 0802b818 : int symlink( const char *actualpath, const char *sympath ) { 802b818: 37 9c ff d8 addi sp,sp,-40 802b81c: 5b 8b 00 10 sw (sp+16),r11 802b820: 5b 8c 00 0c sw (sp+12),r12 802b824: 5b 8d 00 08 sw (sp+8),r13 802b828: 5b 9d 00 04 sw (sp+4),ra rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b82c: 40 43 00 00 lbu r3,(r2+0) int symlink( const char *actualpath, const char *sympath ) { 802b830: b8 20 68 00 mv r13,r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b834: 64 65 00 5c cmpei r5,r3,92 802b838: 64 64 00 2f cmpei r4,r3,47 802b83c: b8 a4 20 00 or r4,r5,r4 802b840: 5c 80 00 02 bne r4,r0,802b848 802b844: 5c 64 00 2f bne r3,r4,802b900 802b848: 78 03 08 07 mvhi r3,0x807 802b84c: 38 63 12 f0 ori r3,r3,0x12f0 802b850: 28 63 00 00 lw r3,(r3+0) 802b854: 34 04 00 01 mvi r4,1 802b858: 28 61 00 18 lw r1,(r3+24) 802b85c: 5b 81 00 14 sw (sp+20),r1 802b860: 28 61 00 1c lw r1,(r3+28) 802b864: 5b 81 00 18 sw (sp+24),r1 802b868: 28 61 00 20 lw r1,(r3+32) 802b86c: 5b 81 00 1c sw (sp+28),r1 802b870: 28 61 00 24 lw r1,(r3+36) 802b874: 5b 81 00 20 sw (sp+32),r1 if ( !loc.ops->evalformake_h ) { 802b878: 2b 81 00 20 lw r1,(sp+32) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b87c: 28 63 00 28 lw r3,(r3+40) if ( !loc.ops->evalformake_h ) { 802b880: 28 25 00 04 lw r5,(r1+4) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b884: 5b 83 00 24 sw (sp+36),r3 if ( !loc.ops->evalformake_h ) { 802b888: 44 a0 00 2e be r5,r0,802b940 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 802b88c: 37 8c 00 14 addi r12,sp,20 802b890: b4 44 08 00 add r1,r2,r4 802b894: 37 83 00 28 addi r3,sp,40 802b898: b9 80 10 00 mv r2,r12 802b89c: d8 a0 00 00 call r5 802b8a0: b8 20 18 00 mv r3,r1 if ( result != 0 ) 802b8a4: 34 0b ff ff mvi r11,-1 802b8a8: 5c 20 00 0f bne r1,r0,802b8e4 return -1; if ( !loc.ops->symlink_h ) { 802b8ac: 2b 81 00 20 lw r1,(sp+32) 802b8b0: 28 24 00 38 lw r4,(r1+56) 802b8b4: 44 83 00 2e be r4,r3,802b96c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 802b8b8: 2b 83 00 28 lw r3,(sp+40) 802b8bc: b9 a0 10 00 mv r2,r13 802b8c0: b9 80 08 00 mv r1,r12 802b8c4: d8 80 00 00 call r4 802b8c8: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 802b8cc: 2b 81 00 20 lw r1,(sp+32) 802b8d0: 44 20 00 05 be r1,r0,802b8e4 802b8d4: 28 22 00 1c lw r2,(r1+28) 802b8d8: 44 40 00 03 be r2,r0,802b8e4 802b8dc: b9 80 08 00 mv r1,r12 802b8e0: d8 40 00 00 call r2 return result; } 802b8e4: b9 60 08 00 mv r1,r11 802b8e8: 2b 9d 00 04 lw ra,(sp+4) 802b8ec: 2b 8b 00 10 lw r11,(sp+16) 802b8f0: 2b 8c 00 0c lw r12,(sp+12) 802b8f4: 2b 8d 00 08 lw r13,(sp+8) 802b8f8: 37 9c 00 28 addi sp,sp,40 802b8fc: c3 a0 00 00 ret rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b900: 78 01 08 07 mvhi r1,0x807 802b904: 38 21 12 f0 ori r1,r1,0x12f0 802b908: 28 23 00 00 lw r3,(r1+0) 802b90c: 28 61 00 04 lw r1,(r3+4) 802b910: 5b 81 00 14 sw (sp+20),r1 802b914: 28 61 00 08 lw r1,(r3+8) 802b918: 5b 81 00 18 sw (sp+24),r1 802b91c: 28 61 00 0c lw r1,(r3+12) 802b920: 5b 81 00 1c sw (sp+28),r1 802b924: 28 61 00 10 lw r1,(r3+16) 802b928: 5b 81 00 20 sw (sp+32),r1 if ( !loc.ops->evalformake_h ) { 802b92c: 2b 81 00 20 lw r1,(sp+32) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b930: 28 63 00 14 lw r3,(r3+20) if ( !loc.ops->evalformake_h ) { 802b934: 28 25 00 04 lw r5,(r1+4) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b938: 5b 83 00 24 sw (sp+36),r3 if ( !loc.ops->evalformake_h ) { 802b93c: 5c a0 ff d4 bne r5,r0,802b88c if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b940: f8 00 6e 90 calli 8047380 <__errno> <== NOT EXECUTED 802b944: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b948: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802b94c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 802b950: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b954: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b958: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802b95c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802b960: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802b964: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 802b968: c3 a0 00 00 ret <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 802b96c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b970: 44 44 ff f4 be r2,r4,802b940 <== NOT EXECUTED 802b974: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b978: d8 40 00 00 call r2 <== NOT EXECUTED 802b97c: e3 ff ff f1 bi 802b940 <== NOT EXECUTED 08012c60 : int tcsetattr( int fd, int opt, struct termios *tp ) { 8012c60: 37 9c ff f4 addi sp,sp,-12 8012c64: 5b 8b 00 0c sw (sp+12),r11 8012c68: 5b 8c 00 08 sw (sp+8),r12 8012c6c: 5b 9d 00 04 sw (sp+4),ra 8012c70: b8 60 58 00 mv r11,r3 8012c74: b8 20 60 00 mv r12,r1 switch (opt) { 8012c78: 44 40 00 0c be r2,r0,8012ca8 8012c7c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8012c80: 44 43 00 13 be r2,r3,8012ccc <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8012c84: f8 00 13 9a calli 8017aec <__errno> <== NOT EXECUTED 8012c88: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8012c8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8012c90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 8012c94: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8012c98: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8012c9c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8012ca0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8012ca4: c3 a0 00 00 ret <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 8012ca8: b9 80 08 00 mv r1,r12 8012cac: b9 60 18 00 mv r3,r11 8012cb0: 34 02 00 02 mvi r2,2 8012cb4: f8 00 0f 19 calli 8016918 } } 8012cb8: 2b 9d 00 04 lw ra,(sp+4) 8012cbc: 2b 8b 00 0c lw r11,(sp+12) 8012cc0: 2b 8c 00 08 lw r12,(sp+8) 8012cc4: 37 9c 00 0c addi sp,sp,12 8012cc8: c3 a0 00 00 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 8012ccc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8012cd0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8012cd4: f8 00 0f 11 calli 8016918 <== NOT EXECUTED 8012cd8: 4c 20 ff f4 bge r1,r0,8012ca8 <== NOT EXECUTED 8012cdc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8012ce0: e3 ff ff ed bi 8012c94 <== NOT EXECUTED 0800b7f8 : #include int unlink( const char *path ) { 800b7f8: 37 9c ff c4 addi sp,sp,-60 800b7fc: 5b 8b 00 14 sw (sp+20),r11 800b800: 5b 8c 00 10 sw (sp+16),r12 800b804: 5b 8d 00 0c sw (sp+12),r13 800b808: 5b 8e 00 08 sw (sp+8),r14 800b80c: 5b 9d 00 04 sw (sp+4),ra 800b810: b8 20 60 00 mv r12,r1 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 800b814: fb ff d5 4e calli 8000d4c 800b818: b8 20 58 00 mv r11,r1 if ( parentpathlen == 0 ) 800b81c: 5c 20 00 6e bne r1,r0,800b9d4 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800b820: 41 82 00 00 lbu r2,(r12+0) 800b824: 64 43 00 5c cmpei r3,r2,92 800b828: 64 41 00 2f cmpei r1,r2,47 800b82c: b8 61 08 00 or r1,r3,r1 800b830: 44 2b 00 4e be r1,r11,800b968 800b834: 78 01 08 01 mvhi r1,0x801 800b838: 38 21 c1 10 ori r1,r1,0xc110 800b83c: 28 22 00 00 lw r2,(r1+0) 800b840: 34 0d 00 00 mvi r13,0 800b844: 28 41 00 18 lw r1,(r2+24) 800b848: 5b 81 00 2c sw (sp+44),r1 800b84c: 28 41 00 1c lw r1,(r2+28) 800b850: 5b 81 00 30 sw (sp+48),r1 800b854: 28 41 00 20 lw r1,(r2+32) 800b858: 5b 81 00 34 sw (sp+52),r1 800b85c: 28 41 00 24 lw r1,(r2+36) 800b860: 5b 81 00 38 sw (sp+56),r1 800b864: 28 42 00 28 lw r2,(r2+40) 800b868: 5b 82 00 3c sw (sp+60),r2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800b86c: 2b 82 00 2c lw r2,(sp+44) name = path + parentpathlen; 800b870: b5 8b 58 00 add r11,r12,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800b874: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800b878: 5b 82 00 18 sw (sp+24),r2 800b87c: 2b 82 00 30 lw r2,(sp+48) 800b880: 5b 82 00 1c sw (sp+28),r2 800b884: 2b 82 00 34 lw r2,(sp+52) 800b888: 5b 82 00 20 sw (sp+32),r2 800b88c: 2b 82 00 38 lw r2,(sp+56) 800b890: 5b 82 00 24 sw (sp+36),r2 800b894: 2b 82 00 3c lw r2,(sp+60) 800b898: 5b 82 00 28 sw (sp+40),r2 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800b89c: f8 00 05 99 calli 800cf00 800b8a0: b8 20 10 00 mv r2,r1 800b8a4: b9 60 08 00 mv r1,r11 800b8a8: fb ff d5 10 calli 8000ce8 800b8ac: b5 61 60 00 add r12,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 800b8b0: b9 80 08 00 mv r1,r12 800b8b4: f8 00 05 93 calli 800cf00 800b8b8: 34 03 00 00 mvi r3,0 800b8bc: 37 8b 00 18 addi r11,sp,24 800b8c0: b8 20 10 00 mv r2,r1 800b8c4: b9 60 20 00 mv r4,r11 800b8c8: b9 80 08 00 mv r1,r12 800b8cc: b8 60 28 00 mv r5,r3 800b8d0: fb ff d5 3c calli 8000dc0 0, &loc, false ); if ( result != 0 ) { 800b8d4: 5c 20 00 35 bne r1,r0,800b9a8 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 800b8d8: 2b 83 00 24 lw r3,(sp+36) 800b8dc: 28 62 00 10 lw r2,(r3+16) 800b8e0: 44 41 00 58 be r2,r1,800ba40 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 ) { 800b8e4: b9 60 08 00 mv r1,r11 800b8e8: d8 40 00 00 call r2 800b8ec: 34 02 00 01 mvi r2,1 800b8f0: 44 22 00 42 be r1,r2,800b9f8 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 800b8f4: 2b 81 00 24 lw r1,(sp+36) 800b8f8: 28 23 00 0c lw r3,(r1+12) 800b8fc: 44 60 00 61 be r3,r0,800ba80 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800b900: 37 8e 00 2c addi r14,sp,44 800b904: b9 60 10 00 mv r2,r11 800b908: b9 c0 08 00 mv r1,r14 800b90c: d8 60 00 00 call r3 rtems_filesystem_freenode( &loc ); 800b910: 2b 82 00 24 lw r2,(sp+36) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800b914: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 800b918: 44 40 00 05 be r2,r0,800b92c 800b91c: 28 42 00 1c lw r2,(r2+28) 800b920: 44 40 00 03 be r2,r0,800b92c 800b924: b9 60 08 00 mv r1,r11 800b928: d8 40 00 00 call r2 if ( free_parentloc ) 800b92c: 45 a0 00 07 be r13,r0,800b948 rtems_filesystem_freenode( &parentloc ); 800b930: 2b 81 00 38 lw r1,(sp+56) 800b934: 44 20 00 05 be r1,r0,800b948 800b938: 28 22 00 1c lw r2,(r1+28) 800b93c: 44 40 00 03 be r2,r0,800b948 800b940: b9 c0 08 00 mv r1,r14 800b944: d8 40 00 00 call r2 return result; } 800b948: b9 80 08 00 mv r1,r12 800b94c: 2b 9d 00 04 lw ra,(sp+4) 800b950: 2b 8b 00 14 lw r11,(sp+20) 800b954: 2b 8c 00 10 lw r12,(sp+16) 800b958: 2b 8d 00 0c lw r13,(sp+12) 800b95c: 2b 8e 00 08 lw r14,(sp+8) 800b960: 37 9c 00 3c addi sp,sp,60 800b964: c3 a0 00 00 ret */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800b968: 44 40 ff b3 be r2,r0,800b834 <== NOT EXECUTED 800b96c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800b970: 38 21 c1 10 ori r1,r1,0xc110 <== NOT EXECUTED 800b974: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800b978: b9 60 68 00 mv r13,r11 <== NOT EXECUTED 800b97c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800b980: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 800b984: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800b988: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 800b98c: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 800b990: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 800b994: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 800b998: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 800b99c: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 800b9a0: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 800b9a4: e3 ff ff b2 bi 800b86c <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 800b9a8: 5d a0 00 03 bne r13,r0,800b9b4 result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 800b9ac: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 800b9b0: e3 ff ff e6 bi 800b948 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 800b9b4: 2b 81 00 38 lw r1,(sp+56) 800b9b8: 44 20 ff fd be r1,r0,800b9ac 800b9bc: 28 22 00 1c lw r2,(r1+28) 800b9c0: 44 40 ff fb be r2,r0,800b9ac 800b9c4: 37 81 00 2c addi r1,sp,44 800b9c8: d8 40 00 00 call r2 800b9cc: 34 0c ff ff mvi r12,-1 800b9d0: e3 ff ff de bi 800b948 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 800b9d4: b9 80 08 00 mv r1,r12 800b9d8: b9 60 10 00 mv r2,r11 800b9dc: 34 03 00 02 mvi r3,2 800b9e0: 37 84 00 2c addi r4,sp,44 800b9e4: 34 05 00 00 mvi r5,0 800b9e8: fb ff d5 39 calli 8000ecc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 800b9ec: 5c 20 ff f0 bne r1,r0,800b9ac 800b9f0: 34 0d 00 01 mvi r13,1 800b9f4: e3 ff ff 9e bi 800b86c rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 800b9f8: 2b 81 00 24 lw r1,(sp+36) 800b9fc: 44 20 00 05 be r1,r0,800ba10 800ba00: 28 22 00 1c lw r2,(r1+28) 800ba04: 44 40 00 03 be r2,r0,800ba10 800ba08: b9 60 08 00 mv r1,r11 800ba0c: d8 40 00 00 call r2 if ( free_parentloc ) 800ba10: 45 a0 00 07 be r13,r0,800ba2c rtems_filesystem_freenode( &parentloc ); 800ba14: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 800ba18: 44 20 00 05 be r1,r0,800ba2c <== NOT EXECUTED 800ba1c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800ba20: 44 40 00 03 be r2,r0,800ba2c <== NOT EXECUTED 800ba24: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 800ba28: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 800ba2c: f8 00 00 65 calli 800bbc0 <__errno> 800ba30: 34 02 00 15 mvi r2,21 800ba34: 58 22 00 00 sw (r1+0),r2 800ba38: 34 0c ff ff mvi r12,-1 800ba3c: e3 ff ff c3 bi 800b948 rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 800ba40: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 800ba44: 44 62 00 03 be r3,r2,800ba50 <== NOT EXECUTED 800ba48: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ba4c: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); if ( free_parentloc ) 800ba50: 45 a0 00 07 be r13,r0,800ba6c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 800ba54: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 800ba58: 44 20 00 05 be r1,r0,800ba6c <== NOT EXECUTED 800ba5c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800ba60: 44 40 00 03 be r2,r0,800ba6c <== NOT EXECUTED 800ba64: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 800ba68: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800ba6c: f8 00 00 55 calli 800bbc0 <__errno> <== NOT EXECUTED 800ba70: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800ba74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800ba78: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 800ba7c: e3 ff ff b3 bi 800b948 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 800ba80: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800ba84: 44 43 ff f3 be r2,r3,800ba50 <== NOT EXECUTED 800ba88: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ba8c: d8 40 00 00 call r2 <== NOT EXECUTED 800ba90: e3 ff ff f0 bi 800ba50 <== NOT EXECUTED 08009998 : */ int unmount( const char *path ) { 8009998: 37 9c ff dc addi sp,sp,-36 800999c: 5b 8b 00 10 sw (sp+16),r11 80099a0: 5b 8c 00 0c sw (sp+12),r12 80099a4: 5b 8d 00 08 sw (sp+8),r13 80099a8: 5b 9d 00 04 sw (sp+4),ra 80099ac: b8 20 58 00 mv r11,r1 * 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 ) ) 80099b0: 37 8c 00 14 addi r12,sp,20 80099b4: f8 01 14 5d calli 804eb28 80099b8: b8 20 10 00 mv r2,r1 80099bc: 34 03 00 00 mvi r3,0 80099c0: b9 60 08 00 mv r1,r11 80099c4: b9 80 20 00 mv r4,r12 80099c8: 34 05 00 01 mvi r5,1 80099cc: fb ff f7 ed calli 8007980 80099d0: 5c 20 00 2d bne r1,r0,8009a84 return -1; mt_entry = loc.mt_entry; 80099d4: 2b 8b 00 24 lw r11,(sp+36) fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 80099d8: 2b 81 00 14 lw r1,(sp+20) 80099dc: 29 62 00 1c lw r2,(r11+28) 80099e0: 5c 41 00 51 bne r2,r1,8009b24 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 80099e4: 2b 81 00 20 lw r1,(sp+32) 80099e8: 44 20 00 05 be r1,r0,80099fc 80099ec: 28 22 00 1c lw r2,(r1+28) 80099f0: 44 40 00 03 be r2,r0,80099fc 80099f4: b9 80 08 00 mv r1,r12 80099f8: d8 40 00 00 call r2 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; 80099fc: 29 61 00 14 lw r1,(r11+20) 8009a00: 28 21 00 28 lw r1,(r1+40) 8009a04: 44 20 00 5f be r1,r0,8009b80 fs_root_loc = &mt_entry->mt_fs_root; 8009a08: 29 61 00 28 lw r1,(r11+40) 8009a0c: 28 21 00 2c lw r1,(r1+44) 8009a10: 44 20 00 5c be r1,r0,8009b80 * 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 ) 8009a14: 78 01 08 07 mvhi r1,0x807 8009a18: 38 21 12 f0 ori r1,r1,0x12f0 8009a1c: 28 21 00 00 lw r1,(r1+0) 8009a20: 28 21 00 14 lw r1,(r1+20) 8009a24: 44 2b 00 1f be r1,r11,8009aa0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009a28: 78 01 08 07 mvhi r1,0x807 8009a2c: 38 21 4e d8 ori r1,r1,0x4ed8 8009a30: 28 22 00 00 lw r2,(r1+0) 8009a34: 34 21 00 04 addi r1,r1,4 8009a38: 44 41 00 09 be r2,r1,8009a5c !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 ) { 8009a3c: 29 63 00 2c lw r3,(r11+44) 8009a40: 28 44 00 18 lw r4,(r2+24) 8009a44: 5c 83 00 04 bne r4,r3,8009a54 8009a48: e0 00 00 16 bi 8009aa0 <== NOT EXECUTED 8009a4c: 28 44 00 18 lw r4,(r2+24) 8009a50: 44 64 00 14 be r3,r4,8009aa0 * 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 ) { 8009a54: 28 42 00 00 lw r2,(r2+0) /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009a58: 5c 41 ff fd bne r2,r1,8009a4c * 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 ) 8009a5c: b9 60 08 00 mv r1,r11 8009a60: fb ff f8 ec calli 8007e10 8009a64: 34 02 00 01 mvi r2,1 8009a68: 44 22 00 0e be r1,r2,8009aa0 * 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 ) 8009a6c: 29 62 00 14 lw r2,(r11+20) 8009a70: b9 60 08 00 mv r1,r11 8009a74: 28 42 00 28 lw r2,(r2+40) 8009a78: d8 40 00 00 call r2 8009a7c: b8 20 60 00 mv r12,r1 8009a80: 44 20 00 12 be r1,r0,8009ac8 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 8009a84: 34 01 ff ff mvi r1,-1 } 8009a88: 2b 9d 00 04 lw ra,(sp+4) 8009a8c: 2b 8b 00 10 lw r11,(sp+16) 8009a90: 2b 8c 00 0c lw r12,(sp+12) 8009a94: 2b 8d 00 08 lw r13,(sp+8) 8009a98: 37 9c 00 24 addi sp,sp,36 8009a9c: c3 a0 00 00 ret * 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 ); 8009aa0: f8 00 f6 38 calli 8047380 <__errno> 8009aa4: 34 02 00 10 mvi r2,16 8009aa8: 58 22 00 00 sw (r1+0),r2 8009aac: 34 01 ff ff mvi r1,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8009ab0: 2b 9d 00 04 lw ra,(sp+4) 8009ab4: 2b 8b 00 10 lw r11,(sp+16) 8009ab8: 2b 8c 00 0c lw r12,(sp+12) 8009abc: 2b 8d 00 08 lw r13,(sp+8) 8009ac0: 37 9c 00 24 addi sp,sp,36 8009ac4: c3 a0 00 00 ret * 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){ 8009ac8: 29 62 00 28 lw r2,(r11+40) 8009acc: b9 60 08 00 mv r1,r11 8009ad0: 28 42 00 2c lw r2,(r2+44) 8009ad4: d8 40 00 00 call r2 8009ad8: b8 20 68 00 mv r13,r1 8009adc: 5c 2c 00 22 bne r1,r12,8009b64 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8009ae0: b9 60 08 00 mv r1,r11 8009ae4: f8 00 05 f4 calli 800b2b4 <_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 ); 8009ae8: 29 61 00 14 lw r1,(r11+20) 8009aec: 44 2d 00 05 be r1,r13,8009b00 8009af0: 28 22 00 1c lw r2,(r1+28) 8009af4: 44 4d 00 03 be r2,r13,8009b00 8009af8: 35 61 00 08 addi r1,r11,8 8009afc: d8 40 00 00 call r2 free( mt_entry ); 8009b00: b9 60 08 00 mv r1,r11 8009b04: fb ff f7 d7 calli 8007a60 8009b08: 34 01 00 00 mvi r1,0 return 0; } 8009b0c: 2b 9d 00 04 lw ra,(sp+4) 8009b10: 2b 8b 00 10 lw r11,(sp+16) 8009b14: 2b 8c 00 0c lw r12,(sp+12) 8009b18: 2b 8d 00 08 lw r13,(sp+8) 8009b1c: 37 9c 00 24 addi sp,sp,36 8009b20: c3 a0 00 00 ret /* * 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 ); 8009b24: 2b 81 00 20 lw r1,(sp+32) 8009b28: 44 20 00 05 be r1,r0,8009b3c 8009b2c: 28 22 00 1c lw r2,(r1+28) 8009b30: 44 40 00 03 be r2,r0,8009b3c 8009b34: b9 80 08 00 mv r1,r12 8009b38: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EACCES ); 8009b3c: f8 00 f6 11 calli 8047380 <__errno> 8009b40: 34 02 00 0d mvi r2,13 8009b44: 58 22 00 00 sw (r1+0),r2 8009b48: 34 01 ff ff mvi r1,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8009b4c: 2b 9d 00 04 lw ra,(sp+4) 8009b50: 2b 8b 00 10 lw r11,(sp+16) 8009b54: 2b 8c 00 0c lw r12,(sp+12) 8009b58: 2b 8d 00 08 lw r13,(sp+8) 8009b5c: 37 9c 00 24 addi sp,sp,36 8009b60: c3 a0 00 00 ret * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 8009b64: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 8009b68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009b6c: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED 8009b70: d8 40 00 00 call r2 <== NOT EXECUTED 8009b74: 44 20 ff c4 be r1,r0,8009a84 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8009b78: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8009b7c: f8 00 04 bc calli 800ae6c <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009b80: f8 00 f6 00 calli 8047380 <__errno> <== NOT EXECUTED 8009b84: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009b88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009b8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8009b90: e3 ff ff be bi 8009a88 <== NOT EXECUTED 0802ba60 : int utime( const char *path, const struct utimbuf *times ) { 802ba60: 37 9c ff dc addi sp,sp,-36 802ba64: 5b 8b 00 10 sw (sp+16),r11 802ba68: 5b 8c 00 0c sw (sp+12),r12 802ba6c: 5b 8d 00 08 sw (sp+8),r13 802ba70: 5b 9d 00 04 sw (sp+4),ra 802ba74: b8 20 58 00 mv r11,r1 802ba78: b8 40 68 00 mv r13,r2 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 802ba7c: 37 8c 00 14 addi r12,sp,20 802ba80: f8 00 8c 2a calli 804eb28 802ba84: b8 20 10 00 mv r2,r1 802ba88: 34 03 00 00 mvi r3,0 802ba8c: b9 60 08 00 mv r1,r11 802ba90: b9 80 20 00 mv r4,r12 802ba94: 34 05 00 01 mvi r5,1 802ba98: fb ff 6f ba calli 8007980 802ba9c: 34 0b ff ff mvi r11,-1 802baa0: 5c 20 00 0f bne r1,r0,802badc return -1; if ( !temp_loc.ops->utime_h ){ 802baa4: 2b 82 00 20 lw r2,(sp+32) 802baa8: 28 44 00 30 lw r4,(r2+48) 802baac: 44 81 00 13 be r4,r1,802baf8 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 ); 802bab0: 29 a3 00 04 lw r3,(r13+4) 802bab4: 29 a2 00 00 lw r2,(r13+0) 802bab8: b9 80 08 00 mv r1,r12 802babc: d8 80 00 00 call r4 802bac0: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 802bac4: 2b 81 00 20 lw r1,(sp+32) 802bac8: 44 20 00 05 be r1,r0,802badc 802bacc: 28 22 00 1c lw r2,(r1+28) 802bad0: 44 40 00 03 be r2,r0,802badc 802bad4: b9 80 08 00 mv r1,r12 802bad8: d8 40 00 00 call r2 return result; } 802badc: b9 60 08 00 mv r1,r11 802bae0: 2b 9d 00 04 lw ra,(sp+4) 802bae4: 2b 8b 00 10 lw r11,(sp+16) 802bae8: 2b 8c 00 0c lw r12,(sp+12) 802baec: 2b 8d 00 08 lw r13,(sp+8) 802baf0: 37 9c 00 24 addi sp,sp,36 802baf4: c3 a0 00 00 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 802baf8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 802bafc: 44 44 00 03 be r2,r4,802bb08 <== NOT EXECUTED 802bb00: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802bb04: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802bb08: f8 00 6e 1e calli 8047380 <__errno> <== NOT EXECUTED 802bb0c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802bb10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802bb14: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802bb18: e3 ff ff f1 bi 802badc <== NOT EXECUTED 0801a630 : ssize_t write( int fd, const void *buffer, size_t count ) { 801a630: 37 9c ff e8 addi sp,sp,-24 801a634: 5b 8b 00 14 sw (sp+20),r11 801a638: 5b 8c 00 10 sw (sp+16),r12 801a63c: 5b 8d 00 0c sw (sp+12),r13 801a640: 5b 8e 00 08 sw (sp+8),r14 801a644: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801a648: 78 04 08 01 mvhi r4,0x801 801a64c: 38 84 c0 10 ori r4,r4,0xc010 801a650: 28 84 00 00 lw r4,(r4+0) ssize_t write( int fd, const void *buffer, size_t count ) { 801a654: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801a658: 54 81 00 06 bgu r4,r1,801a670 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 801a65c: fb ff c5 59 calli 800bbc0 <__errno> <== NOT EXECUTED 801a660: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801a664: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a668: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a66c: e0 00 00 27 bi 801a708 <== NOT EXECUTED { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801a670: 34 02 00 03 mvi r2,3 801a674: 5b 83 00 18 sw (sp+24),r3 801a678: 78 0c 08 01 mvhi r12,0x801 801a67c: fb ff 96 dd calli 80001f0 <__ashlsi3> 801a680: 34 02 00 03 mvi r2,3 801a684: 39 8c c6 9c ori r12,r12,0xc69c 801a688: b8 20 70 00 mv r14,r1 801a68c: fb ff 96 d9 calli 80001f0 <__ashlsi3> 801a690: 29 8b 00 00 lw r11,(r12+0) 801a694: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801a698: 2b 83 00 18 lw r3,(sp+24) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801a69c: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 801a6a0: 29 61 00 18 lw r1,(r11+24) 801a6a4: 20 22 01 00 andi r2,r1,0x100 801a6a8: 44 40 ff ed be r2,r0,801a65c rtems_libio_check_buffer( buffer ); 801a6ac: 45 a0 00 1f be r13,r0,801a728 rtems_libio_check_count( count ); 801a6b0: b8 60 60 00 mv r12,r3 801a6b4: 44 60 00 15 be r3,r0,801a708 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 801a6b8: 20 21 00 04 andi r1,r1,0x4 801a6bc: 44 20 00 1b be r1,r0,801a728 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 801a6c0: 29 61 00 40 lw r1,(r11+64) 801a6c4: 28 24 00 0c lw r4,(r1+12) 801a6c8: 44 80 00 1d be r4,r0,801a73c rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 801a6cc: b9 a0 10 00 mv r2,r13 801a6d0: b9 60 08 00 mv r1,r11 801a6d4: d8 80 00 00 call r4 801a6d8: b8 20 60 00 mv r12,r1 if ( rc > 0 ) 801a6dc: 4c 01 00 0b bge r0,r1,801a708 iop->offset += rc; 801a6e0: 34 02 00 1f mvi r2,31 801a6e4: fb ff 97 13 calli 8000330 <__ashrsi3> 801a6e8: 29 62 00 14 lw r2,(r11+20) 801a6ec: 29 64 00 10 lw r4,(r11+16) 801a6f0: b5 82 10 00 add r2,r12,r2 801a6f4: f5 82 18 00 cmpgu r3,r12,r2 801a6f8: b4 24 08 00 add r1,r1,r4 801a6fc: b4 61 08 00 add r1,r3,r1 801a700: 59 62 00 14 sw (r11+20),r2 801a704: 59 61 00 10 sw (r11+16),r1 return rc; } 801a708: b9 80 08 00 mv r1,r12 801a70c: 2b 9d 00 04 lw ra,(sp+4) 801a710: 2b 8b 00 14 lw r11,(sp+20) 801a714: 2b 8c 00 10 lw r12,(sp+16) 801a718: 2b 8d 00 0c lw r13,(sp+12) 801a71c: 2b 8e 00 08 lw r14,(sp+8) 801a720: 37 9c 00 18 addi sp,sp,24 801a724: c3 a0 00 00 ret rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 801a728: fb ff c5 26 calli 800bbc0 <__errno> <== NOT EXECUTED 801a72c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801a730: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a734: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a738: e3 ff ff f4 bi 801a708 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801a73c: fb ff c5 21 calli 800bbc0 <__errno> <== NOT EXECUTED 801a740: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801a744: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801a748: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801a74c: e3 ff ff ef bi 801a708 <== NOT EXECUTED 08003da8 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003da8: 37 9c ff e4 addi sp,sp,-28 8003dac: 5b 8b 00 1c sw (sp+28),r11 8003db0: 5b 8c 00 18 sw (sp+24),r12 8003db4: 5b 8d 00 14 sw (sp+20),r13 8003db8: 5b 8e 00 10 sw (sp+16),r14 8003dbc: 5b 8f 00 0c sw (sp+12),r15 8003dc0: 5b 90 00 08 sw (sp+8),r16 8003dc4: 5b 9d 00 04 sw (sp+4),ra int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 8003dc8: 78 04 08 02 mvhi r4,0x802 8003dcc: 38 84 10 10 ori r4,r4,0x1010 8003dd0: 28 84 00 00 lw r4,(r4+0) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003dd4: b8 40 58 00 mv r11,r2 8003dd8: b8 60 68 00 mv r13,r3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 8003ddc: 54 81 00 06 bgu r4,r1,8003df4 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 8003de0: f8 00 29 bb calli 800e4cc <__errno> 8003de4: 34 02 00 09 mvi r2,9 8003de8: 58 22 00 00 sw (r1+0),r2 8003dec: 34 0e ff ff mvi r14,-1 8003df0: e0 00 00 16 bi 8003e48 rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8003df4: 34 02 00 03 mvi r2,3 8003df8: fb ff f4 30 calli 8000eb8 <__ashlsi3> 8003dfc: 78 0c 08 02 mvhi r12,0x802 8003e00: 34 02 00 03 mvi r2,3 8003e04: 39 8c 1e 70 ori r12,r12,0x1e70 8003e08: b8 20 70 00 mv r14,r1 8003e0c: fb ff f4 2b calli 8000eb8 <__ashlsi3> 8003e10: 29 8f 00 00 lw r15,(r12+0) 8003e14: b5 c1 08 00 add r1,r14,r1 8003e18: b5 e1 78 00 add r15,r15,r1 rtems_libio_check_is_open( iop ); 8003e1c: 29 e1 00 18 lw r1,(r15+24) 8003e20: 20 22 01 00 andi r2,r1,0x100 8003e24: 44 40 ff ef be r2,r0,8003de0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8003e28: 20 21 00 04 andi r1,r1,0x4 8003e2c: 44 20 00 03 be r1,r0,8003e38 /* * Argument validation on IO vector */ if ( !iov ) 8003e30: 45 60 00 02 be r11,r0,8003e38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003e34: 49 a0 00 0f bg r13,r0,8003e70 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 8003e38: f8 00 29 a5 calli 800e4cc <__errno> 8003e3c: 34 02 00 16 mvi r2,22 8003e40: 58 22 00 00 sw (r1+0),r2 8003e44: 34 0e ff ff mvi r14,-1 if (bytes != iov[ v ].iov_len) break; } return total; } 8003e48: b9 c0 08 00 mv r1,r14 8003e4c: 2b 9d 00 04 lw ra,(sp+4) 8003e50: 2b 8b 00 1c lw r11,(sp+28) 8003e54: 2b 8c 00 18 lw r12,(sp+24) 8003e58: 2b 8d 00 14 lw r13,(sp+20) 8003e5c: 2b 8e 00 10 lw r14,(sp+16) 8003e60: 2b 8f 00 0c lw r15,(sp+12) 8003e64: 2b 90 00 08 lw r16,(sp+8) 8003e68: 37 9c 00 1c addi sp,sp,28 8003e6c: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003e70: 34 01 04 00 mvi r1,1024 8003e74: 4c 2d 00 02 bge r1,r13,8003e7c 8003e78: e3 ff ff f0 bi 8003e38 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 8003e7c: 29 e1 00 40 lw r1,(r15+64) 8003e80: 28 21 00 0c lw r1,(r1+12) 8003e84: 44 20 00 39 be r1,r0,8003f68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003e88: 34 06 00 00 mvi r6,0 8003e8c: b9 60 20 00 mv r4,r11 8003e90: 34 08 00 01 mvi r8,1 8003e94: b8 c0 38 00 mv r7,r6 8003e98: e0 00 00 0d bi 8003ecc 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 ) 8003e9c: 28 82 00 04 lw r2,(r4+4) * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 8003ea0: 34 84 00 08 addi r4,r4,8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 8003ea4: b4 e2 28 00 add r5,r7,r2 if ( total < old || total > SSIZE_MAX ) 8003ea8: e8 e5 38 00 cmpg r7,r7,r5 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 ) 8003eac: 64 42 00 00 cmpei r2,r2,0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003eb0: 68 a3 7f ff cmpgi r3,r5,32767 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 ) 8003eb4: c8 02 10 00 sub r2,r0,r2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003eb8: b8 67 38 00 or r7,r3,r7 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 ) 8003ebc: a1 02 40 00 and r8,r8,r2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003ec0: 5c e0 ff de bne r7,r0,8003e38 * 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++ ) { 8003ec4: 4c cd 00 06 bge r6,r13,8003edc 8003ec8: b8 a0 38 00 mv r7,r5 if ( !iov[v].iov_base ) 8003ecc: 28 82 00 00 lw r2,(r4+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++ ) { 8003ed0: 34 c6 00 01 addi r6,r6,1 if ( !iov[v].iov_base ) 8003ed4: 5c 40 ff f2 bne r2,r0,8003e9c 8003ed8: e3 ff ff d8 bi 8003e38 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 8003edc: b9 00 60 00 mv r12,r8 <== NOT EXECUTED 8003ee0: b9 00 70 00 mv r14,r8 <== NOT EXECUTED 8003ee4: 5d 00 00 07 bne r8,r0,8003f00 <== 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 ) 8003ee8: 29 63 00 04 lw r3,(r11+4) <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003eec: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 8003ef0: 5c 60 00 06 bne r3,r0,8003f08 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003ef4: 35 6b 00 08 addi r11,r11,8 <== NOT EXECUTED 8003ef8: 49 ac ff fc bg r13,r12,8003ee8 <== NOT EXECUTED 8003efc: e3 ff ff d3 bi 8003e48 <== NOT EXECUTED } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 8003f00: b8 e0 70 00 mv r14,r7 <== NOT EXECUTED 8003f04: e3 ff ff d1 bi 8003e48 <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 8003f08: 29 e1 00 40 lw r1,(r15+64) <== NOT EXECUTED 8003f0c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8003f10: 28 24 00 0c lw r4,(r1+12) <== NOT EXECUTED 8003f14: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8003f18: d8 80 00 00 call r4 <== NOT EXECUTED 8003f1c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003f20: 34 02 00 1f mvi r2,31 <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 8003f24: 4c 20 00 03 bge r1,r0,8003f30 <== NOT EXECUTED 8003f28: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED 8003f2c: e3 ff ff c7 bi 8003e48 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 8003f30: 44 20 00 0b be r1,r0,8003f5c <== NOT EXECUTED iop->offset += bytes; 8003f34: fb ff f4 31 calli 8000ff8 <__ashrsi3> <== NOT EXECUTED 8003f38: 29 e2 00 14 lw r2,(r15+20) <== NOT EXECUTED 8003f3c: 29 e4 00 10 lw r4,(r15+16) <== NOT EXECUTED total += bytes; 8003f40: b5 d0 70 00 add r14,r14,r16 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003f44: b6 02 10 00 add r2,r16,r2 <== NOT EXECUTED 8003f48: f6 02 18 00 cmpgu r3,r16,r2 <== NOT EXECUTED 8003f4c: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 8003f50: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003f54: 59 e1 00 10 sw (r15+16),r1 <== NOT EXECUTED 8003f58: 59 e2 00 14 sw (r15+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 8003f5c: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 8003f60: 46 01 ff e5 be r16,r1,8003ef4 <== NOT EXECUTED 8003f64: e3 ff ff b9 bi 8003e48 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003f68: f8 00 29 59 calli 800e4cc <__errno> <== NOT EXECUTED 8003f6c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8003f70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8003f74: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED 8003f78: e3 ff ff b4 bi 8003e48 <== NOT EXECUTED