08009d54 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 8009d54: 37 9c ff ec addi sp,sp,-20 8009d58: 5b 8b 00 14 sw (sp+20),r11 8009d5c: 5b 8c 00 10 sw (sp+16),r12 8009d60: 5b 8d 00 0c sw (sp+12),r13 8009d64: 5b 8e 00 08 sw (sp+8),r14 8009d68: 5b 9d 00 04 sw (sp+4),ra 8009d6c: b8 40 70 00 mv r14,r2 8009d70: b8 20 60 00 mv r12,r1 8009d74: b8 60 10 00 mv r2,r3 8009d78: b8 a0 68 00 mv r13,r5 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 8009d7c: b8 20 58 00 mv r11,r1 8009d80: 44 20 00 42 be r1,r0,8009e88 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 8009d84: 78 05 08 01 mvhi r5,0x801 8009d88: 38 a5 c1 10 ori r5,r5,0xc110 8009d8c: 28 a3 00 00 lw r3,(r5+0) 8009d90: b9 c0 08 00 mv r1,r14 8009d94: 28 63 00 2c lw r3,(r3+44) 8009d98: a4 60 18 00 not r3,r3 8009d9c: a0 83 18 00 and r3,r4,r3 8009da0: fb ff ff b2 calli 8009c68 8009da4: b8 20 58 00 mv r11,r1 if ( !node ) 8009da8: 44 20 00 38 be r1,r0,8009e88 return NULL; /* * Set the type specific information */ switch (type) { 8009dac: 35 c1 ff ff addi r1,r14,-1 8009db0: 34 02 00 06 mvi r2,6 8009db4: 54 22 00 22 bgu r1,r2,8009e3c 8009db8: 78 0e 08 01 mvhi r14,0x801 8009dbc: 34 02 00 02 mvi r2,2 8009dc0: fb ff d9 0c calli 80001f0 <__ashlsi3> 8009dc4: 39 ce a8 20 ori r14,r14,0xa820 8009dc8: b5 c1 08 00 add r1,r14,r1 8009dcc: 28 21 00 00 lw r1,(r1+0) 8009dd0: c0 20 00 00 b r1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8009dd4: 35 62 00 54 addi r2,r11,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8009dd8: 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); 8009ddc: 59 62 00 50 sw (r11+80),r2 the_chain->permanent_null = NULL; 8009de0: 34 02 00 00 mvi r2,0 8009de4: 59 62 00 54 sw (r11+84),r2 the_chain->last = _Chain_Head(the_chain); 8009de8: 59 61 00 58 sw (r11+88),r1 8009dec: e0 00 00 1c bi 8009e5c 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; 8009df0: 29 a1 00 04 lw r1,(r13+4) 8009df4: 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; 8009df8: 29 ad 00 00 lw r13,(r13+0) 8009dfc: 59 6d 00 50 sw (r11+80),r13 node->info.device.minor = info->device.minor; break; 8009e00: e0 00 00 17 bi 8009e5c case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 8009e04: 34 01 00 00 mvi r1,0 <== NOT EXECUTED node->info.linearfile.direct = 0; 8009e08: 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; 8009e0c: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED 8009e10: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 8009e14: 34 02 00 00 mvi r2,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 8009e18: 59 62 00 60 sw (r11+96),r2 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 8009e1c: 59 62 00 50 sw (r11+80),r2 8009e20: 59 62 00 54 sw (r11+84),r2 node->info.file.indirect = 0; 8009e24: 59 62 00 58 sw (r11+88),r2 node->info.file.doubly_indirect = 0; 8009e28: 59 62 00 5c sw (r11+92),r2 node->info.file.triply_indirect = 0; break; 8009e2c: e0 00 00 0c bi 8009e5c case IMFS_FIFO: node->info.fifo.pipe = NULL; 8009e30: 34 01 00 00 mvi r1,0 8009e34: 59 61 00 50 sw (r11+80),r1 break; 8009e38: e0 00 00 09 bi 8009e5c default: assert(0); 8009e3c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8009e40: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 8009e44: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 8009e48: 38 21 a7 d0 ori r1,r1,0xa7d0 <== NOT EXECUTED 8009e4c: 38 63 a8 3c ori r3,r3,0xa83c <== NOT EXECUTED 8009e50: 38 84 a8 1c ori r4,r4,0xa81c <== NOT EXECUTED 8009e54: 34 02 00 5c mvi r2,92 <== NOT EXECUTED 8009e58: fb ff f3 ff calli 8006e54 <__assert_func> <== NOT EXECUTED /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 8009e5c: 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; 8009e60: 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 ); 8009e64: b9 60 10 00 mv r2,r11 fs_info = parent_loc->mt_entry->fs_info; 8009e68: 28 63 00 34 lw r3,(r3+52) node->Parent = parent; 8009e6c: 59 61 00 08 sw (r11+8),r1 8009e70: 34 21 00 50 addi r1,r1,80 node->st_ino = ++fs_info->ino_count; 8009e74: 28 64 00 00 lw r4,(r3+0) 8009e78: 34 84 00 01 addi r4,r4,1 8009e7c: 58 64 00 00 sw (r3+0),r4 8009e80: 59 64 00 38 sw (r11+56),r4 8009e84: fb ff e2 e7 calli 8002a20 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 8009e88: b9 60 08 00 mv r1,r11 8009e8c: 2b 9d 00 04 lw ra,(sp+4) 8009e90: 2b 8b 00 14 lw r11,(sp+20) 8009e94: 2b 8c 00 10 lw r12,(sp+16) 8009e98: 2b 8d 00 0c lw r13,(sp+12) 8009e9c: 2b 8e 00 08 lw r14,(sp+8) 8009ea0: 37 9c 00 14 addi sp,sp,20 8009ea4: c3 a0 00 00 ret 08002c50 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 8002c50: 37 9c ff dc addi sp,sp,-36 8002c54: 5b 8b 00 24 sw (sp+36),r11 8002c58: 5b 8c 00 20 sw (sp+32),r12 8002c5c: 5b 8d 00 1c sw (sp+28),r13 8002c60: 5b 8e 00 18 sw (sp+24),r14 8002c64: 5b 8f 00 14 sw (sp+20),r15 8002c68: 5b 90 00 10 sw (sp+16),r16 8002c6c: 5b 91 00 0c sw (sp+12),r17 8002c70: 5b 92 00 08 sw (sp+8),r18 8002c74: 5b 9d 00 04 sw (sp+4),ra 8002c78: 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 ); 8002c7c: 5c 20 00 09 bne r1,r0,8002ca0 8002c80: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c84: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002c88: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002c8c: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002c90: 38 63 3a ec ori r3,r3,0x3aec <== NOT EXECUTED 8002c94: 38 84 39 ec ori r4,r4,0x39ec <== NOT EXECUTED 8002c98: 34 02 00 84 mvi r2,132 <== NOT EXECUTED 8002c9c: e0 00 00 09 bi 8002cc0 <== NOT EXECUTED assert( level >= 0 ); 8002ca0: 4c 40 00 09 bge r2,r0,8002cc4 8002ca4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ca8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002cac: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002cb0: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002cb4: 38 63 3a ec ori r3,r3,0x3aec <== NOT EXECUTED 8002cb8: 38 84 39 fc ori r4,r4,0x39fc <== NOT EXECUTED 8002cbc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8002cc0: f8 00 02 25 calli 8003554 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 8002cc4: 28 22 00 4c lw r2,(r1+76) 8002cc8: 34 03 00 01 mvi r3,1 8002ccc: 44 43 00 09 be r2,r3,8002cf0 8002cd0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002cd4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002cd8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002cdc: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002ce0: 38 63 3a ec ori r3,r3,0x3aec <== NOT EXECUTED 8002ce4: 38 84 3a 08 ori r4,r4,0x3a08 <== NOT EXECUTED 8002ce8: 34 02 00 88 mvi r2,136 <== NOT EXECUTED 8002cec: e3 ff ff f5 bi 8002cc0 <== NOT EXECUTED the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002cf0: 78 0c 08 02 mvhi r12,0x802 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8002cf4: 34 32 00 54 addi r18,r1,84 8002cf8: 39 8c 61 90 ori r12,r12,0x6190 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) 8002cfc: b8 40 88 00 mv r17,r2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002d00: 28 2b 00 50 lw r11,(r1+80) the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002d04: 78 10 08 02 mvhi r16,0x802 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002d08: 35 af 00 01 addi r15,r13,1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002d0c: e0 00 00 11 bi 8002d50 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 8002d10: 34 0e 00 00 mvi r14,0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002d14: 29 82 00 00 lw r2,(r12+0) 8002d18: ba 00 08 00 mv r1,r16 !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++ ) 8002d1c: 35 ce 00 01 addi r14,r14,1 fprintf(stdout, "...." ); 8002d20: 28 42 00 08 lw r2,(r2+8) 8002d24: 38 21 3a 30 ori r1,r1,0x3a30 8002d28: f8 00 36 59 calli 801068c !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++ ) 8002d2c: 4d ae ff fa bge r13,r14,8002d14 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 8002d30: b9 60 08 00 mv r1,r11 8002d34: fb ff ff 4f calli 8002a70 if ( the_jnode->type == IMFS_DIRECTORY ) 8002d38: 29 61 00 4c lw r1,(r11+76) 8002d3c: 5c 31 00 04 bne r1,r17,8002d4c IMFS_dump_directory( the_jnode, level + 1 ); 8002d40: b9 60 08 00 mv r1,r11 8002d44: b9 e0 10 00 mv r2,r15 8002d48: fb ff ff c2 calli 8002c50 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 ) { 8002d4c: 29 6b 00 00 lw r11,(r11+0) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002d50: 5d 72 ff f0 bne r11,r18,8002d10 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 8002d54: 2b 9d 00 04 lw ra,(sp+4) 8002d58: 2b 8b 00 24 lw r11,(sp+36) 8002d5c: 2b 8c 00 20 lw r12,(sp+32) 8002d60: 2b 8d 00 1c lw r13,(sp+28) 8002d64: 2b 8e 00 18 lw r14,(sp+24) 8002d68: 2b 8f 00 14 lw r15,(sp+20) 8002d6c: 2b 90 00 10 lw r16,(sp+16) 8002d70: 2b 91 00 0c lw r17,(sp+12) 8002d74: 2b 92 00 08 lw r18,(sp+8) 8002d78: 37 9c 00 24 addi sp,sp,36 8002d7c: c3 a0 00 00 ret 08005fbc : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8005fbc: 37 9c ff 80 addi sp,sp,-128 8005fc0: 5b 8b 00 44 sw (sp+68),r11 8005fc4: 5b 8c 00 40 sw (sp+64),r12 8005fc8: 5b 8d 00 3c sw (sp+60),r13 8005fcc: 5b 8e 00 38 sw (sp+56),r14 8005fd0: 5b 8f 00 34 sw (sp+52),r15 8005fd4: 5b 90 00 30 sw (sp+48),r16 8005fd8: 5b 91 00 2c sw (sp+44),r17 8005fdc: 5b 92 00 28 sw (sp+40),r18 8005fe0: 5b 93 00 24 sw (sp+36),r19 8005fe4: 5b 94 00 20 sw (sp+32),r20 8005fe8: 5b 95 00 1c sw (sp+28),r21 8005fec: 5b 96 00 18 sw (sp+24),r22 8005ff0: 5b 97 00 14 sw (sp+20),r23 8005ff4: 5b 98 00 10 sw (sp+16),r24 8005ff8: 5b 99 00 0c sw (sp+12),r25 8005ffc: 5b 9b 00 08 sw (sp+8),fp 8006000: 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; 8006004: 34 0d 00 01 mvi r13,1 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006008: 78 13 08 01 mvhi r19,0x801 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 800600c: b8 80 58 00 mv r11,r4 8006010: b8 20 88 00 mv r17,r1 8006014: b8 40 70 00 mv r14,r2 8006018: b8 60 80 00 mv r16,r3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 800601c: 3a 73 c1 10 ori r19,r19,0xc110 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8006020: 28 8c 00 00 lw r12,(r4+0) 8006024: 34 0f 00 00 mvi r15,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 ); 8006028: 37 96 00 48 addi r22,sp,72 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 800602c: b9 a0 a8 00 mv r21,r13 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006030: 34 1b 00 40 mvi fp,64 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006034: 34 19 00 03 mvi r25,3 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8006038: 34 14 00 04 mvi r20,4 result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 ) 800603c: 34 18 ff ff mvi r24,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006040: 34 17 00 02 mvi r23,2 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8006044: e0 00 00 58 bi 80061a4 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8006048: 37 84 00 80 addi r4,sp,128 800604c: b6 2f 08 00 add r1,r17,r15 8006050: b9 c0 10 00 mv r2,r14 8006054: ba c0 18 00 mv r3,r22 8006058: f8 00 02 60 calli 80069d8 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 800605c: 29 64 00 00 lw r4,(r11+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 ); 8006060: b8 20 68 00 mv r13,r1 pathnamelen -= len; 8006064: 2b 92 00 80 lw r18,(sp+128) i += len; if ( !pathloc->node_access ) 8006068: 44 80 00 47 be r4,r0,8006184 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 800606c: 44 20 00 06 be r1,r0,8006084 if ( node->type == IMFS_DIRECTORY ) 8006070: 29 81 00 4c lw r1,(r12+76) 8006074: 5c 35 00 04 bne r1,r21,8006084 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006078: 28 81 00 30 lw r1,(r4+48) 800607c: 20 21 00 40 andi r1,r1,0x40 8006080: 5c 3b 00 84 bne r1,fp,8006290 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8006084: c9 d2 70 00 sub r14,r14,r18 i += len; 8006088: b5 f2 78 00 add r15,r15,r18 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 800608c: b8 80 60 00 mv r12,r4 switch( type ) { 8006090: 45 b9 00 1e be r13,r25,8006108 8006094: 45 b4 00 41 be r13,r20,8006198 8006098: 5d b7 00 43 bne r13,r23,80061a4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 800609c: 2a 61 00 00 lw r1,(r19+0) 80060a0: 28 21 00 18 lw r1,(r1+24) 80060a4: 44 81 00 40 be r4,r1,80061a4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 80060a8: 29 65 00 10 lw r5,(r11+16) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 80060ac: 28 a1 00 1c lw r1,(r5+28) 80060b0: 5c 81 00 11 bne r4,r1,80060f4 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 80060b4: 37 8c 00 6c addi r12,sp,108 80060b8: 34 a2 00 08 addi r2,r5,8 80060bc: 34 03 00 14 mvi r3,20 80060c0: b9 80 08 00 mv r1,r12 80060c4: f8 00 16 34 calli 800b994 *pathloc = newloc; 80060c8: b9 80 10 00 mv r2,r12 80060cc: 34 03 00 14 mvi r3,20 80060d0: b9 60 08 00 mv r1,r11 80060d4: f8 00 16 30 calli 800b994 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 80060d8: 29 62 00 0c lw r2,(r11+12) 80060dc: c9 f2 08 00 sub r1,r15,r18 80060e0: b6 21 08 00 add r1,r17,r1 80060e4: 28 45 00 00 lw r5,(r2+0) 80060e8: ba 00 18 00 mv r3,r16 80060ec: b6 4e 10 00 add r2,r18,r14 80060f0: e0 00 00 46 bi 8006208 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 80060f4: 28 8c 00 08 lw r12,(r4+8) 80060f8: 5d 80 00 26 bne r12,r0,8006190 rtems_set_errno_and_return_minus_one( ENOENT ); 80060fc: f8 00 13 80 calli 800aefc <__errno> 8006100: 58 2d 00 00 sw (r1+0),r13 8006104: e0 00 00 66 bi 800629c case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8006108: 28 81 00 4c lw r1,(r4+76) 800610c: 5c 2d 00 07 bne r1,r13,8006128 IMFS_evaluate_hard_link( pathloc, 0 ); 8006110: b9 60 08 00 mv r1,r11 8006114: 34 02 00 00 mvi r2,0 8006118: fb ff ff 44 calli 8005e28 node = pathloc->node_access; 800611c: 29 6c 00 00 lw r12,(r11+0) if ( !node ) 8006120: 5d 80 00 0a bne r12,r0,8006148 8006124: e0 00 00 0b bi 8006150 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8006128: 5c 34 00 08 bne r1,r20,8006148 result = IMFS_evaluate_sym_link( pathloc, 0 ); 800612c: b9 60 08 00 mv r1,r11 8006130: 34 02 00 00 mvi r2,0 8006134: fb ff ff 5f calli 8005eb0 8006138: b8 20 60 00 mv r12,r1 node = pathloc->node_access; 800613c: 29 61 00 00 lw r1,(r11+0) if ( result == -1 ) 8006140: 45 98 00 40 be r12,r24,8006240 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8006144: b8 20 60 00 mv r12,r1 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8006148: 29 81 00 4c lw r1,(r12+76) 800614c: 44 35 00 04 be r1,r21,800615c rtems_set_errno_and_return_minus_one( ENOTDIR ); 8006150: f8 00 13 6b calli 800aefc <__errno> 8006154: 34 02 00 14 mvi r2,20 8006158: e0 00 00 50 bi 8006298 /* * 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 ) { 800615c: 29 92 00 5c lw r18,(r12+92) 8006160: 46 40 00 04 be r18,r0,8006170 newloc = node->info.directory.mt_fs->mt_fs_root; 8006164: 37 8c 00 6c addi r12,sp,108 8006168: 36 42 00 1c addi r2,r18,28 800616c: e0 00 00 19 bi 80061d0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8006170: b9 80 08 00 mv r1,r12 8006174: ba c0 10 00 mv r2,r22 8006178: f8 00 01 ea calli 8006920 800617c: b8 20 60 00 mv r12,r1 if ( !node ) 8006180: 5c 32 00 04 bne r1,r18,8006190 rtems_set_errno_and_return_minus_one( ENOENT ); 8006184: f8 00 13 5e calli 800aefc <__errno> 8006188: 34 02 00 02 mvi r2,2 800618c: e0 00 00 43 bi 8006298 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8006190: 59 6c 00 00 sw (r11+0),r12 8006194: e0 00 00 04 bi 80061a4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8006198: f8 00 13 59 calli 800aefc <__errno> 800619c: 34 02 00 5b mvi r2,91 80061a0: e0 00 00 3e bi 8006298 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 80061a4: 7d a1 00 00 cmpnei r1,r13,0 80061a8: 7d ad 00 04 cmpnei r13,r13,4 80061ac: a1 a1 68 00 and r13,r13,r1 80061b0: 5d a0 ff a6 bne r13,r0,8006048 * 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 ) { 80061b4: 29 82 00 4c lw r2,(r12+76) 80061b8: 34 01 00 01 mvi r1,1 80061bc: 5c 41 00 17 bne r2,r1,8006218 if ( node->info.directory.mt_fs != NULL ) { 80061c0: 29 83 00 5c lw r3,(r12+92) 80061c4: 44 60 00 15 be r3,r0,8006218 newloc = node->info.directory.mt_fs->mt_fs_root; 80061c8: 37 8c 00 6c addi r12,sp,108 80061cc: 34 62 00 1c addi r2,r3,28 80061d0: 34 03 00 14 mvi r3,20 80061d4: b9 80 08 00 mv r1,r12 80061d8: f8 00 15 ef calli 800b994 *pathloc = newloc; 80061dc: b9 80 10 00 mv r2,r12 80061e0: 34 03 00 14 mvi r3,20 80061e4: b9 60 08 00 mv r1,r11 80061e8: f8 00 15 eb calli 800b994 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80061ec: 29 61 00 0c lw r1,(r11+12) 80061f0: 2b 82 00 80 lw r2,(sp+128) 80061f4: ba 00 18 00 mv r3,r16 80061f8: 28 25 00 00 lw r5,(r1+0) 80061fc: c9 e2 08 00 sub r1,r15,r2 8006200: b6 21 08 00 add r1,r17,r1 8006204: b5 c2 10 00 add r2,r14,r2 8006208: b9 60 20 00 mv r4,r11 800620c: d8 a0 00 00 call r5 8006210: b8 20 60 00 mv r12,r1 8006214: e0 00 00 0b bi 8006240 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8006218: b9 60 08 00 mv r1,r11 800621c: fb ff fe cb calli 8005d48 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8006220: 34 02 00 06 mvi r2,6 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8006224: 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 ) 8006228: ba 00 08 00 mv r1,r16 800622c: fb ff e7 f1 calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8006230: 29 62 00 00 lw r2,(r11+0) 8006234: 28 42 00 30 lw r2,(r2+48) 8006238: a0 22 10 00 and r2,r1,r2 800623c: 5c 41 00 15 bne r2,r1,8006290 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8006240: b9 80 08 00 mv r1,r12 8006244: 2b 9d 00 04 lw ra,(sp+4) 8006248: 2b 8b 00 44 lw r11,(sp+68) 800624c: 2b 8c 00 40 lw r12,(sp+64) 8006250: 2b 8d 00 3c lw r13,(sp+60) 8006254: 2b 8e 00 38 lw r14,(sp+56) 8006258: 2b 8f 00 34 lw r15,(sp+52) 800625c: 2b 90 00 30 lw r16,(sp+48) 8006260: 2b 91 00 2c lw r17,(sp+44) 8006264: 2b 92 00 28 lw r18,(sp+40) 8006268: 2b 93 00 24 lw r19,(sp+36) 800626c: 2b 94 00 20 lw r20,(sp+32) 8006270: 2b 95 00 1c lw r21,(sp+28) 8006274: 2b 96 00 18 lw r22,(sp+24) 8006278: 2b 97 00 14 lw r23,(sp+20) 800627c: 2b 98 00 10 lw r24,(sp+16) 8006280: 2b 99 00 0c lw r25,(sp+12) 8006284: 2b 9b 00 08 lw fp,(sp+8) 8006288: 37 9c 00 80 addi sp,sp,128 800628c: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006290: f8 00 13 1b calli 800aefc <__errno> 8006294: 34 02 00 0d mvi r2,13 8006298: 58 22 00 00 sw (r1+0),r2 800629c: 34 0c ff ff mvi r12,-1 80062a0: e3 ff ff e8 bi 8006240 08005e28 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005e28: 37 9c ff f4 addi sp,sp,-12 8005e2c: 5b 8b 00 0c sw (sp+12),r11 8005e30: 5b 8c 00 08 sw (sp+8),r12 8005e34: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8005e38: 28 23 00 00 lw r3,(r1+0) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005e3c: b8 40 60 00 mv r12,r2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8005e40: 34 02 00 03 mvi r2,3 8005e44: 28 64 00 4c lw r4,(r3+76) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005e48: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8005e4c: 44 82 00 04 be r4,r2,8005e5c rtems_fatal_error_occurred (0xABCD0000); 8005e50: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8005e54: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005e58: fb ff f2 01 calli 800265c <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 8005e5c: 28 63 00 50 lw r3,(r3+80) 8005e60: 58 23 00 00 sw (r1+0),r3 IMFS_Set_handlers( node ); 8005e64: fb ff ff b9 calli 8005d48 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8005e68: 34 02 00 06 mvi r2,6 8005e6c: b9 80 08 00 mv r1,r12 8005e70: fb ff e8 e0 calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8005e74: 29 62 00 00 lw r2,(r11+0) 8005e78: 28 42 00 30 lw r2,(r2+48) 8005e7c: a0 22 10 00 and r2,r1,r2 8005e80: 5c 41 00 07 bne r2,r1,8005e9c 8005e84: 34 01 00 00 mvi r1,0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8005e88: 2b 9d 00 04 lw ra,(sp+4) 8005e8c: 2b 8b 00 0c lw r11,(sp+12) 8005e90: 2b 8c 00 08 lw r12,(sp+8) 8005e94: 37 9c 00 0c addi sp,sp,12 8005e98: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8005e9c: f8 00 14 18 calli 800aefc <__errno> <== NOT EXECUTED 8005ea0: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8005ea4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8005ea8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8005eac: e3 ff ff f7 bi 8005e88 <== NOT EXECUTED 08005dec : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 8005dec: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8005df0: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8005df4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005df8: 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 ) 8005dfc: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8005e00: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 8005e04: fb ff e8 fb calli 80001f0 <__ashlsi3> <== NOT EXECUTED 8005e08: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8005e0c: 28 42 00 30 lw r2,(r2+48) <== NOT EXECUTED 8005e10: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED return 1; return 0; } 8005e14: e4 41 08 00 cmpe r1,r2,r1 <== NOT EXECUTED 8005e18: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8005e1c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8005e20: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8005e24: c3 a0 00 00 ret <== NOT EXECUTED 08005eb0 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005eb0: 37 9c ff f0 addi sp,sp,-16 8005eb4: 5b 8b 00 10 sw (sp+16),r11 8005eb8: 5b 8c 00 0c sw (sp+12),r12 8005ebc: 5b 8d 00 08 sw (sp+8),r13 8005ec0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8005ec4: 28 2c 00 00 lw r12,(r1+0) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005ec8: b8 40 68 00 mv r13,r2 8005ecc: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8005ed0: 29 82 00 4c lw r2,(r12+76) 8005ed4: 34 01 00 04 mvi r1,4 8005ed8: 44 41 00 04 be r2,r1,8005ee8 rtems_fatal_error_occurred (0xABCD0000); 8005edc: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8005ee0: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005ee4: e0 00 00 05 bi 8005ef8 <== NOT EXECUTED if ( !jnode->Parent ) 8005ee8: 29 81 00 08 lw r1,(r12+8) 8005eec: 5c 20 00 04 bne r1,r0,8005efc rtems_fatal_error_occurred( 0xBAD00000 ); 8005ef0: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8005ef4: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005ef8: fb ff f1 d9 calli 800265c <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8005efc: 59 61 00 00 sw (r11+0),r1 rtems_filesystem_get_sym_start_loc( 8005f00: 29 81 00 50 lw r1,(r12+80) 8005f04: 40 25 00 00 lbu r5,(r1+0) 8005f08: 64 a4 00 5c cmpei r4,r5,92 8005f0c: 64 a1 00 2f cmpei r1,r5,47 8005f10: b8 81 20 00 or r4,r4,r1 8005f14: 5c 80 00 03 bne r4,r0,8005f20 8005f18: b8 80 08 00 mv r1,r4 8005f1c: 5c a4 00 09 bne r5,r4,8005f40 8005f20: 78 04 08 01 mvhi r4,0x801 8005f24: 38 84 c1 10 ori r4,r4,0xc110 8005f28: 28 82 00 00 lw r2,(r4+0) 8005f2c: b9 60 08 00 mv r1,r11 8005f30: 34 03 00 14 mvi r3,20 8005f34: 34 42 00 18 addi r2,r2,24 8005f38: f8 00 16 97 calli 800b994 8005f3c: 34 01 00 01 mvi r1,1 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 8005f40: 29 8c 00 50 lw r12,(r12+80) 8005f44: b5 81 60 00 add r12,r12,r1 8005f48: b9 80 08 00 mv r1,r12 8005f4c: f8 00 18 bc calli 800c23c 8005f50: b8 20 10 00 mv r2,r1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8005f54: b9 a0 18 00 mv r3,r13 8005f58: b9 60 20 00 mv r4,r11 8005f5c: b9 80 08 00 mv r1,r12 8005f60: f8 00 00 17 calli 8005fbc 8005f64: b8 20 60 00 mv r12,r1 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8005f68: b9 60 08 00 mv r1,r11 8005f6c: fb ff ff 77 calli 8005d48 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8005f70: 34 02 00 06 mvi r2,6 8005f74: b9 a0 08 00 mv r1,r13 8005f78: fb ff e8 9e calli 80001f0 <__ashlsi3> if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 8005f7c: 29 62 00 00 lw r2,(r11+0) 8005f80: 28 42 00 30 lw r2,(r2+48) 8005f84: a0 22 10 00 and r2,r1,r2 8005f88: 5c 41 00 08 bne r2,r1,8005fa8 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8005f8c: b9 80 08 00 mv r1,r12 8005f90: 2b 9d 00 04 lw ra,(sp+4) 8005f94: 2b 8b 00 10 lw r11,(sp+16) 8005f98: 2b 8c 00 0c lw r12,(sp+12) 8005f9c: 2b 8d 00 08 lw r13,(sp+8) 8005fa0: 37 9c 00 10 addi sp,sp,16 8005fa4: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8005fa8: f8 00 13 d5 calli 800aefc <__errno> <== NOT EXECUTED 8005fac: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8005fb0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8005fb4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8005fb8: e3 ff ff f5 bi 8005f8c <== NOT EXECUTED 08006848 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8006848: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 800684c: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8006850: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8006854: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8006858: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 800685c: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8006860: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8006864: b8 20 60 00 mv r12,r1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8006868: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED 800686c: f8 00 0b dd calli 80097e0 <== NOT EXECUTED 8006870: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (! err) { 8006874: 5c 20 00 0d bne r1,r0,80068a8 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 8006878: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 800687c: 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) 8006880: 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; 8006884: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8006888: 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) 800688c: f8 00 02 9a calli 80072f4 <== NOT EXECUTED 8006890: 5c 2b 00 0b bne r1,r11,80068bc <== NOT EXECUTED 8006894: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED 8006898: 5c 20 00 09 bne r1,r0,80068bc <== NOT EXECUTED free(jnode); 800689c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80068a0: f8 00 01 d8 calli 8007000 <== NOT EXECUTED 80068a4: e0 00 00 06 bi 80068bc <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 80068a8: 4c 20 00 05 bge r1,r0,80068bc <== NOT EXECUTED 80068ac: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80068b0: f8 00 11 93 calli 800aefc <__errno> <== NOT EXECUTED 80068b4: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80068b8: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 80068bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80068c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80068c4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80068c8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80068cc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80068d0: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80068d4: c3 a0 00 00 ret <== NOT EXECUTED 080066e4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 80066e4: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 80066e8: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 80066ec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int err; if (command == FIONBIO) { 80066f0: 78 04 80 04 mvhi r4,0x8004 <== NOT EXECUTED 80066f4: 38 84 66 7e ori r4,r4,0x667e <== NOT EXECUTED 80066f8: 5c 44 00 0e bne r2,r4,8006730 <== NOT EXECUTED if (buffer == NULL) 80066fc: 34 0b ff f2 mvi r11,-14 <== NOT EXECUTED 8006700: 44 60 00 12 be r3,r0,8006748 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8006704: 28 6b 00 00 lw r11,(r3+0) <== NOT EXECUTED 8006708: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 800670c: 45 60 00 05 be r11,r0,8006720 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8006710: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED 8006714: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 8006718: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 800671c: e0 00 00 0f bi 8006758 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8006720: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED 8006724: a0 43 10 00 and r2,r2,r3 <== NOT EXECUTED 8006728: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 800672c: e0 00 00 0b bi 8006758 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8006730: 28 25 00 3c lw r5,(r1+60) <== NOT EXECUTED 8006734: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006738: 28 a1 00 50 lw r1,(r5+80) <== NOT EXECUTED 800673c: f8 00 0b 19 calli 80093a0 <== NOT EXECUTED 8006740: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006744: 4c 20 00 05 bge r1,r0,8006758 <== NOT EXECUTED 8006748: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 800674c: f8 00 11 ec calli 800aefc <__errno> <== NOT EXECUTED 8006750: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006754: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006758: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800675c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006760: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006764: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006768: c3 a0 00 00 ret <== NOT EXECUTED 08006678 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8006678: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800667c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006680: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006684: b8 20 28 00 mv r5,r1 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 8006688: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 800668c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8006690: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 8006694: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006698: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED 800669c: f8 00 0b 24 calli 800932c <== NOT EXECUTED 80066a0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 80066a4: 4c 20 00 07 bge r1,r0,80066c0 <== NOT EXECUTED 80066a8: f8 00 12 15 calli 800aefc <__errno> <== NOT EXECUTED 80066ac: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80066b0: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80066b4: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80066b8: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 80066bc: e0 00 00 04 bi 80066cc <== NOT EXECUTED 80066c0: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 80066c4: fb ff e7 1b calli 8000330 <__ashrsi3> <== NOT EXECUTED 80066c8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } 80066cc: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 80066d0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80066d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80066d8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80066dc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80066e0: c3 a0 00 00 ret <== NOT EXECUTED 080067dc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 80067dc: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80067e0: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80067e4: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80067e8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 80067ec: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 80067f0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 80067f4: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 80067f8: f8 00 0b 7f calli 80095f4 <== NOT EXECUTED 80067fc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) 8006800: 4c 01 00 07 bge r0,r1,800681c <== NOT EXECUTED IMFS_update_atime(jnode); 8006804: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006808: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800680c: f8 00 02 72 calli 80071d4 <== NOT EXECUTED 8006810: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006814: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED 8006818: e0 00 00 06 bi 8006830 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 800681c: 44 20 00 05 be r1,r0,8006830 <== NOT EXECUTED 8006820: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006824: f8 00 11 b6 calli 800aefc <__errno> <== NOT EXECUTED 8006828: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 800682c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006830: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006834: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006838: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800683c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006840: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8006844: c3 a0 00 00 ret <== NOT EXECUTED 0800676c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 800676c: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006770: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006774: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006778: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 800677c: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8006780: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006784: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006788: f8 00 0b 26 calli 8009420 <== NOT EXECUTED 800678c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) { 8006790: 4c 01 00 08 bge r0,r1,80067b0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8006794: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006798: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800679c: f8 00 02 8e calli 80071d4 <== NOT EXECUTED 80067a0: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 80067a4: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED 80067a8: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED 80067ac: e0 00 00 06 bi 80067c4 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 80067b0: 44 20 00 05 be r1,r0,80067c4 <== NOT EXECUTED 80067b4: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80067b8: f8 00 11 d1 calli 800aefc <__errno> <== NOT EXECUTED 80067bc: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80067c0: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 80067c4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80067c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80067cc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80067d0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80067d4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80067d8: c3 a0 00 00 ret <== NOT EXECUTED 08006920 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8006920: 37 9c ff f0 addi sp,sp,-16 8006924: 5b 8b 00 10 sw (sp+16),r11 8006928: 5b 8c 00 0c sw (sp+12),r12 800692c: 5b 8d 00 08 sw (sp+8),r13 8006930: 5b 9d 00 04 sw (sp+4),ra 8006934: b8 20 58 00 mv r11,r1 8006938: b8 40 60 00 mv r12,r2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 800693c: 5c 20 00 09 bne r1,r0,8006960 8006940: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8006944: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 8006948: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 800694c: 38 21 a5 10 ori r1,r1,0xa510 <== NOT EXECUTED 8006950: 38 63 a5 70 ori r3,r3,0xa570 <== NOT EXECUTED 8006954: 38 84 a5 5c ori r4,r4,0xa55c <== NOT EXECUTED 8006958: 34 02 00 2a mvi r2,42 <== NOT EXECUTED 800695c: f8 00 01 3e calli 8006e54 <__assert_func> <== NOT EXECUTED if ( !name ) 8006960: 44 40 00 16 be r2,r0,80069b8 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 8006964: 78 02 08 01 mvhi r2,0x801 8006968: 38 42 a5 68 ori r2,r2,0xa568 800696c: b9 80 08 00 mv r1,r12 8006970: f8 00 15 e3 calli 800c0fc 8006974: 44 20 00 12 be r1,r0,80069bc return directory; if ( !strcmp( name, dotdotname ) ) 8006978: 78 02 08 01 mvhi r2,0x801 800697c: 38 42 a5 6c ori r2,r2,0xa56c 8006980: b9 80 08 00 mv r1,r12 8006984: f8 00 15 de calli 800c0fc 8006988: 5c 20 00 03 bne r1,r0,8006994 return directory->Parent; 800698c: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 8006990: e0 00 00 0b bi 80069bc <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8006994: 35 6d 00 54 addi r13,r11,84 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8006998: 29 6b 00 50 lw r11,(r11+80) 800699c: e0 00 00 06 bi 80069b4 !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 ) ) 80069a0: b9 80 08 00 mv r1,r12 80069a4: 35 62 00 0c addi r2,r11,12 80069a8: f8 00 15 d5 calli 800c0fc 80069ac: 44 20 00 04 be r1,r0,80069bc the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 80069b0: 29 6b 00 00 lw r11,(r11+0) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 80069b4: 5d 6d ff fb bne r11,r13,80069a0 80069b8: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 80069bc: b9 60 08 00 mv r1,r11 80069c0: 2b 9d 00 04 lw ra,(sp+4) 80069c4: 2b 8b 00 10 lw r11,(sp+16) 80069c8: 2b 8c 00 0c lw r12,(sp+12) 80069cc: 2b 8d 00 08 lw r13,(sp+8) 80069d0: 37 9c 00 10 addi sp,sp,16 80069d4: c3 a0 00 00 ret 0800c8b4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800c8b4: 37 9c ff d8 addi sp,sp,-40 800c8b8: 5b 8b 00 14 sw (sp+20),r11 800c8bc: 5b 8c 00 10 sw (sp+16),r12 800c8c0: 5b 8d 00 0c sw (sp+12),r13 800c8c4: 5b 8e 00 08 sw (sp+8),r14 800c8c8: 5b 9d 00 04 sw (sp+4),ra 800c8cc: b8 20 68 00 mv r13,r1 * 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; 800c8d0: 37 8c 00 18 addi r12,sp,24 800c8d4: 35 a2 00 1c addi r2,r13,28 800c8d8: b9 80 08 00 mv r1,r12 800c8dc: 34 03 00 14 mvi r3,20 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 800c8e0: 29 ab 00 1c lw r11,(r13+28) loc = temp_mt_entry->mt_fs_root; 800c8e4: f8 00 15 b6 calli 8011fbc /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 800c8e8: 34 01 00 00 mvi r1,0 800c8ec: 59 a1 00 1c sw (r13+28),r1 do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 800c8f0: 34 0d 00 01 mvi r13,1 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800c8f4: b9 80 08 00 mv r1,r12 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 800c8f8: 5b 8b 00 18 sw (sp+24),r11 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 800c8fc: 29 6e 00 08 lw r14,(r11+8) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800c900: fb ff fc f5 calli 800bcd4 if ( jnode->type != IMFS_DIRECTORY ) { 800c904: 29 62 00 4c lw r2,(r11+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800c908: 35 61 00 54 addi r1,r11,84 800c90c: 5c 4d 00 03 bne r2,r13,800c918 800c910: 29 62 00 50 lw r2,(r11+80) 800c914: 5c 41 00 06 bne r2,r1,800c92c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 800c918: 34 01 00 00 mvi r1,0 800c91c: b9 80 10 00 mv r2,r12 800c920: fb ff d6 65 calli 80022b4 if (result != 0) 800c924: 5c 20 00 0b bne r1,r0,800c950 800c928: b9 c0 58 00 mv r11,r14 return -1; jnode = next; } if ( jnode != NULL ) { 800c92c: 45 60 00 0b be r11,r0,800c958 if ( jnode->type == IMFS_DIRECTORY ) { 800c930: 29 61 00 4c lw r1,(r11+76) 800c934: 5c 2d ff f0 bne r1,r13,800c8f4 800c938: 29 61 00 50 lw r1,(r11+80) 800c93c: 35 62 00 54 addi r2,r11,84 800c940: 44 22 ff ed be r1,r2,800c8f4 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 800c944: b8 20 58 00 mv r11,r1 } } } while (jnode != NULL); 800c948: 5c 20 ff eb bne r1,r0,800c8f4 800c94c: e0 00 00 03 bi 800c958 <== NOT EXECUTED 800c950: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800c954: e0 00 00 02 bi 800c95c <== NOT EXECUTED 800c958: 34 01 00 00 mvi r1,0 return 0; } 800c95c: 2b 9d 00 04 lw ra,(sp+4) 800c960: 2b 8b 00 14 lw r11,(sp+20) 800c964: 2b 8c 00 10 lw r12,(sp+16) 800c968: 2b 8d 00 0c lw r13,(sp+12) 800c96c: 2b 8e 00 08 lw r14,(sp+8) 800c970: 37 9c 00 28 addi sp,sp,40 800c974: c3 a0 00 00 ret 08006ad4 : 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 ) { 8006ad4: 37 9c ff ec addi sp,sp,-20 8006ad8: 5b 8b 00 14 sw (sp+20),r11 8006adc: 5b 8c 00 10 sw (sp+16),r12 8006ae0: 5b 8d 00 0c sw (sp+12),r13 8006ae4: 5b 8e 00 08 sw (sp+8),r14 8006ae8: 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, 8006aec: 78 05 08 01 mvhi r5,0x801 8006af0: 38 a5 c0 14 ori r5,r5,0xc014 8006af4: 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 ) { 8006af8: b8 20 58 00 mv r11,r1 8006afc: b8 40 70 00 mv r14,r2 8006b00: b8 60 68 00 mv r13,r3 8006b04: b8 80 60 00 mv r12,r4 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8006b08: 34 05 00 00 mvi r5,0 8006b0c: 34 01 00 10 mvi r1,16 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8006b10: 34 02 00 06 mvi r2,6 8006b14: 34 a5 00 01 addi r5,r5,1 8006b18: 44 26 00 04 be r1,r6,8006b28 8006b1c: b4 21 08 00 add r1,r1,r1 8006b20: 5c a2 ff fd bne r5,r2,8006b14 8006b24: 34 01 00 80 mvi r1,128 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8006b28: 78 05 08 01 mvhi r5,0x801 8006b2c: 38 a5 c6 24 ori r5,r5,0xc624 8006b30: 58 a1 00 00 sw (r5+0),r1 /* * 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(); 8006b34: f8 00 0c 77 calli 8009d10 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; 8006b38: 78 02 08 01 mvhi r2,0x801 /* * 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(); 8006b3c: 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; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8006b40: 38 42 a7 a0 ori r2,r2,0xa7a0 8006b44: 34 03 00 30 mvi r3,48 * * 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; 8006b48: 59 6e 00 28 sw (r11+40),r14 * 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; 8006b4c: 59 6c 00 24 sw (r11+36),r12 temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8006b50: 35 61 00 38 addi r1,r11,56 8006b54: f8 00 13 90 calli 800b994 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8006b58: 34 02 00 0c mvi r2,12 8006b5c: 34 01 00 01 mvi r1,1 8006b60: f8 00 00 d0 calli 8006ea0 8006b64: b8 20 10 00 mv r2,r1 8006b68: 29 61 00 1c lw r1,(r11+28) if ( !fs_info ) { 8006b6c: 5c 40 00 07 bne r2,r0,8006b88 free(temp_mt_entry->mt_fs_root.node_access); 8006b70: f8 00 01 24 calli 8007000 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8006b74: f8 00 10 e2 calli 800aefc <__errno> <== NOT EXECUTED 8006b78: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006b7c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006b80: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006b84: e0 00 00 09 bi 8006ba8 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8006b88: 34 04 00 01 mvi r4,1 8006b8c: 58 44 00 00 sw (r2+0),r4 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; 8006b90: 58 24 00 38 sw (r1+56),r4 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; 8006b94: 59 62 00 34 sw (r11+52),r2 * 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; 8006b98: 58 4c 00 08 sw (r2+8),r12 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8006b9c: 58 4d 00 04 sw (r2+4),r13 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 8006ba0: f8 00 09 e5 calli 8009334 8006ba4: 34 01 00 00 mvi r1,0 return 0; } 8006ba8: 2b 9d 00 04 lw ra,(sp+4) 8006bac: 2b 8b 00 14 lw r11,(sp+20) 8006bb0: 2b 8c 00 10 lw r12,(sp+16) 8006bb4: 2b 8d 00 0c lw r13,(sp+12) 8006bb8: 2b 8e 00 08 lw r14,(sp+8) 8006bbc: 37 9c 00 14 addi sp,sp,20 8006bc0: c3 a0 00 00 ret 08001f2c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8001f2c: 37 9c ff a8 addi sp,sp,-88 8001f30: 5b 8b 00 10 sw (sp+16),r11 8001f34: 5b 8c 00 0c sw (sp+12),r12 8001f38: 5b 8d 00 08 sw (sp+8),r13 8001f3c: 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; 8001f40: 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 */ ) { 8001f44: 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 ) 8001f48: 34 02 00 07 mvi r2,7 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8001f4c: 5b 84 00 38 sw (sp+56),r4 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 8001f50: 2c 81 00 34 lhu r1,(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 */ ) { 8001f54: b8 60 60 00 mv r12,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 ) 8001f58: 50 41 00 04 bgeu r2,r1,8001f68 rtems_set_errno_and_return_minus_one( EMLINK ); 8001f5c: f8 00 3d 72 calli 8011524 <__errno> 8001f60: 34 02 00 1f mvi r2,31 8001f64: e0 00 00 12 bi 8001fac /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 8001f68: b8 60 08 00 mv r1,r3 8001f6c: f8 00 42 1f calli 80127e8 8001f70: 37 8b 00 14 addi r11,sp,20 8001f74: b8 20 10 00 mv r2,r1 8001f78: b9 60 18 00 mv r3,r11 8001f7c: 37 84 00 58 addi r4,sp,88 8001f80: b9 80 08 00 mv r1,r12 8001f84: f8 00 2a ab calli 800ca30 * 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( 8001f88: b9 a0 08 00 mv r1,r13 8001f8c: b9 60 18 00 mv r3,r11 8001f90: 34 02 00 03 mvi r2,3 8001f94: 38 04 a1 ff mvu r4,0xa1ff 8001f98: 37 85 00 38 addi r5,sp,56 8001f9c: f8 00 26 f9 calli 800bb80 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 8001fa0: 5c 20 00 06 bne r1,r0,8001fb8 rtems_set_errno_and_return_minus_one( ENOMEM ); 8001fa4: f8 00 3d 60 calli 8011524 <__errno> <== NOT EXECUTED 8001fa8: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8001fac: 58 22 00 00 sw (r1+0),r2 8001fb0: 34 01 ff ff mvi r1,-1 8001fb4: e0 00 00 0c bi 8001fe4 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 8001fb8: 2b 83 00 38 lw r3,(sp+56) IMFS_update_ctime( info.hard_link.link_node ); 8001fbc: 34 02 00 00 mvi r2,0 8001fc0: 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++; 8001fc4: 2c 64 00 34 lhu r4,(r3+52) 8001fc8: 34 84 00 01 addi r4,r4,1 8001fcc: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( info.hard_link.link_node ); 8001fd0: f8 00 02 9c calli 8002a40 8001fd4: 2b 82 00 38 lw r2,(sp+56) 8001fd8: 2b 83 00 50 lw r3,(sp+80) 8001fdc: 34 01 00 00 mvi r1,0 8001fe0: 58 43 00 48 sw (r2+72),r3 return 0; } 8001fe4: 2b 9d 00 04 lw ra,(sp+4) 8001fe8: 2b 8b 00 10 lw r11,(sp+16) 8001fec: 2b 8c 00 0c lw r12,(sp+12) 8001ff0: 2b 8d 00 08 lw r13,(sp+8) 8001ff4: 37 9c 00 58 addi sp,sp,88 8001ff8: c3 a0 00 00 ret 0800fd00 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 800fd00: 37 9c ff f4 addi sp,sp,-12 800fd04: 5b 8b 00 0c sw (sp+12),r11 800fd08: 5b 8c 00 08 sw (sp+8),r12 800fd0c: 5b 9d 00 04 sw (sp+4),ra block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 800fd10: 5c 20 00 09 bne r1,r0,800fd34 800fd14: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fd18: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fd1c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fd20: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fd24: 38 63 1d 40 ori r3,r3,0x1d40 <== NOT EXECUTED 800fd28: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 800fd2c: 34 02 01 69 mvi r2,361 <== NOT EXECUTED 800fd30: e0 00 00 0b bi 800fd5c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 800fd34: 28 24 00 4c lw r4,(r1+76) 800fd38: 34 03 00 05 mvi r3,5 800fd3c: 44 83 00 09 be r4,r3,800fd60 800fd40: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fd44: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fd48: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fd4c: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fd50: 38 63 1d 40 ori r3,r3,0x1d40 <== NOT EXECUTED 800fd54: 38 84 1b e4 ori r4,r4,0x1be4 <== NOT EXECUTED 800fd58: 34 02 01 6d mvi r2,365 <== NOT EXECUTED 800fd5c: fb ff f3 da calli 800ccc4 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 800fd60: 34 03 00 01 mvi r3,1 800fd64: fb ff fe 45 calli 800f678 if ( *block_entry_ptr ) 800fd68: 28 2b 00 00 lw r11,(r1+0) 800fd6c: 34 02 00 00 mvi r2,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 ); 800fd70: b8 20 60 00 mv r12,r1 if ( *block_entry_ptr ) 800fd74: 5d 62 00 06 bne r11,r2,800fd8c #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 800fd78: fb ff fe 30 calli 800f638 if ( !memory ) 800fd7c: 34 02 00 01 mvi r2,1 800fd80: 44 2b 00 03 be r1,r11,800fd8c return 1; *block_entry_ptr = memory; 800fd84: 59 81 00 00 sw (r12+0),r1 800fd88: b9 60 10 00 mv r2,r11 return 0; } 800fd8c: b8 40 08 00 mv r1,r2 800fd90: 2b 9d 00 04 lw ra,(sp+4) 800fd94: 2b 8b 00 0c lw r11,(sp+12) 800fd98: 2b 8c 00 08 lw r12,(sp+8) 800fd9c: 37 9c 00 0c addi sp,sp,12 800fda0: c3 a0 00 00 ret 0800fda4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 800fda4: 37 9c ff e0 addi sp,sp,-32 800fda8: 5b 8b 00 20 sw (sp+32),r11 800fdac: 5b 8c 00 1c sw (sp+28),r12 800fdb0: 5b 8d 00 18 sw (sp+24),r13 800fdb4: 5b 8e 00 14 sw (sp+20),r14 800fdb8: 5b 8f 00 10 sw (sp+16),r15 800fdbc: 5b 90 00 0c sw (sp+12),r16 800fdc0: 5b 91 00 08 sw (sp+8),r17 800fdc4: 5b 9d 00 04 sw (sp+4),ra 800fdc8: b8 20 58 00 mv r11,r1 800fdcc: b8 40 68 00 mv r13,r2 /* * Perform internal consistency checks */ assert( the_jnode ); 800fdd0: 5c 20 00 09 bne r1,r0,800fdf4 800fdd4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fdd8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fddc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fde0: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fde4: 38 63 1d 58 ori r3,r3,0x1d58 <== NOT EXECUTED 800fde8: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 800fdec: 34 02 01 31 mvi r2,305 <== NOT EXECUTED 800fdf0: e0 00 00 0b bi 800fe1c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 800fdf4: 28 22 00 4c lw r2,(r1+76) 800fdf8: 34 01 00 05 mvi r1,5 800fdfc: 44 41 00 09 be r2,r1,800fe20 800fe00: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fe04: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fe08: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fe0c: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fe10: 38 63 1d 58 ori r3,r3,0x1d58 <== NOT EXECUTED 800fe14: 38 84 1b e4 ori r4,r4,0x1be4 <== NOT EXECUTED 800fe18: 34 02 01 35 mvi r2,309 <== NOT EXECUTED 800fe1c: fb ff f3 aa calli 800ccc4 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 800fe20: 78 01 08 02 mvhi r1,0x802 800fe24: 38 21 36 4c ori r1,r1,0x364c 800fe28: 28 2c 00 00 lw r12,(r1+0) 800fe2c: 34 02 00 02 mvi r2,2 800fe30: b9 80 08 00 mv r1,r12 800fe34: fb ff c3 8e calli 8000c6c <__lshrsi3> 800fe38: b8 20 10 00 mv r2,r1 800fe3c: b8 20 70 00 mv r14,r1 800fe40: 34 21 00 01 addi r1,r1,1 800fe44: f8 00 41 79 calli 8020428 <__mulsi3> 800fe48: b9 c0 10 00 mv r2,r14 800fe4c: 34 21 00 01 addi r1,r1,1 800fe50: f8 00 41 76 calli 8020428 <__mulsi3> 800fe54: 34 21 ff ff addi r1,r1,-1 800fe58: b9 80 10 00 mv r2,r12 800fe5c: f8 00 41 73 calli 8020428 <__mulsi3> 800fe60: 54 2d 00 04 bgu r1,r13,800fe70 rtems_set_errno_and_return_minus_one( EINVAL ); 800fe64: f8 00 05 b0 calli 8011524 <__errno> <== NOT EXECUTED 800fe68: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800fe6c: e0 00 00 26 bi 800ff04 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 800fe70: b9 a0 08 00 mv r1,r13 800fe74: 34 02 00 1f mvi r2,31 800fe78: fb ff c3 a5 calli 8000d0c <__ashrsi3> 800fe7c: 29 6f 00 50 lw r15,(r11+80) 800fe80: b8 20 70 00 mv r14,r1 800fe84: 29 70 00 54 lw r16,(r11+84) 800fe88: 48 2f 00 04 bg r1,r15,800fe98 800fe8c: 5c 2f 00 25 bne r1,r15,800ff20 800fe90: 55 b0 00 02 bgu r13,r16,800fe98 800fe94: e0 00 00 23 bi 800ff20 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 800fe98: b9 80 10 00 mv r2,r12 800fe9c: b9 a0 08 00 mv r1,r13 800fea0: f8 00 41 82 calli 80204a8 <__divsi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 800fea4: 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; 800fea8: b8 20 88 00 mv r17,r1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 800feac: b9 80 08 00 mv r1,r12 800feb0: fb ff c3 97 calli 8000d0c <__ashrsi3> 800feb4: b8 20 18 00 mv r3,r1 800feb8: b9 80 20 00 mv r4,r12 800febc: b9 e0 08 00 mv r1,r15 800fec0: ba 00 10 00 mv r2,r16 800fec4: f8 00 2c 28 calli 801af64 <__divdi3> 800fec8: b8 40 78 00 mv r15,r2 800fecc: b8 40 60 00 mv r12,r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 800fed0: e0 00 00 11 bi 800ff14 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 800fed4: b9 60 08 00 mv r1,r11 800fed8: b9 80 10 00 mv r2,r12 800fedc: fb ff ff 89 calli 800fd00 800fee0: 44 20 00 0c be r1,r0,800ff10 800fee4: e0 00 00 05 bi 800fef8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 800fee8: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800feec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800fef0: fb ff fe bd calli 800f9e4 <== 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-- ) { 800fef4: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED 800fef8: 51 8f ff fc bgeu r12,r15,800fee8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 800fefc: f8 00 05 8a calli 8011524 <__errno> <== NOT EXECUTED 800ff00: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 800ff04: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800ff08: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800ff0c: e0 00 00 06 bi 800ff24 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 800ff10: 35 8c 00 01 addi r12,r12,1 800ff14: 52 2c ff f0 bgeu r17,r12,800fed4 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 800ff18: 59 6d 00 54 sw (r11+84),r13 800ff1c: 59 6e 00 50 sw (r11+80),r14 800ff20: 34 01 00 00 mvi r1,0 return 0; } 800ff24: 2b 9d 00 04 lw ra,(sp+4) 800ff28: 2b 8b 00 20 lw r11,(sp+32) 800ff2c: 2b 8c 00 1c lw r12,(sp+28) 800ff30: 2b 8d 00 18 lw r13,(sp+24) 800ff34: 2b 8e 00 14 lw r14,(sp+20) 800ff38: 2b 8f 00 10 lw r15,(sp+16) 800ff3c: 2b 90 00 0c lw r16,(sp+12) 800ff40: 2b 91 00 08 lw r17,(sp+8) 800ff44: 37 9c 00 20 addi sp,sp,32 800ff48: c3 a0 00 00 ret 0800f678 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 800f678: 37 9c ff e4 addi sp,sp,-28 800f67c: 5b 8b 00 1c sw (sp+28),r11 800f680: 5b 8c 00 18 sw (sp+24),r12 800f684: 5b 8d 00 14 sw (sp+20),r13 800f688: 5b 8e 00 10 sw (sp+16),r14 800f68c: 5b 8f 00 0c sw (sp+12),r15 800f690: 5b 90 00 08 sw (sp+8),r16 800f694: 5b 9d 00 04 sw (sp+4),ra 800f698: b8 20 60 00 mv r12,r1 800f69c: b8 40 68 00 mv r13,r2 800f6a0: b8 60 70 00 mv r14,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 800f6a4: 5c 20 00 09 bne r1,r0,800f6c8 800f6a8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800f6ac: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800f6b0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800f6b4: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800f6b8: 38 63 1c a8 ori r3,r3,0x1ca8 <== NOT EXECUTED 800f6bc: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 800f6c0: 34 02 03 88 mvi r2,904 <== NOT EXECUTED 800f6c4: e0 00 00 0b bi 800f6f0 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 800f6c8: 28 22 00 4c lw r2,(r1+76) 800f6cc: 34 01 00 05 mvi r1,5 800f6d0: 44 41 00 09 be r2,r1,800f6f4 800f6d4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800f6d8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800f6dc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800f6e0: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800f6e4: 38 63 1c a8 ori r3,r3,0x1ca8 <== NOT EXECUTED 800f6e8: 38 84 1b e4 ori r4,r4,0x1be4 <== NOT EXECUTED 800f6ec: 34 02 03 8c mvi r2,908 <== NOT EXECUTED 800f6f0: fb ff f5 75 calli 800ccc4 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 800f6f4: 78 01 08 02 mvhi r1,0x802 800f6f8: 38 21 36 4c ori r1,r1,0x364c 800f6fc: 28 21 00 00 lw r1,(r1+0) 800f700: 34 02 00 02 mvi r2,2 800f704: fb ff c5 5a calli 8000c6c <__lshrsi3> 800f708: b8 20 58 00 mv r11,r1 800f70c: 34 21 ff ff addi r1,r1,-1 800f710: 55 a1 00 0f bgu r13,r1,800f74c #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 800f714: 29 8b 00 58 lw r11,(r12+88) if ( malloc_it ) { 800f718: 45 c0 00 0a be r14,r0,800f740 if ( !p ) { 800f71c: 5d 60 00 04 bne r11,r0,800f72c p = memfile_alloc_block(); 800f720: fb ff ff c6 calli 800f638 if ( !p ) 800f724: 44 2b 00 7d be r1,r11,800f918 return 0; info->indirect = p; 800f728: 59 81 00 58 sw (r12+88),r1 } return &info->indirect[ my_block ]; 800f72c: 34 02 00 02 mvi r2,2 800f730: b9 a0 08 00 mv r1,r13 800f734: fb ff c5 26 calli 8000bcc <__ashlsi3> 800f738: 29 82 00 58 lw r2,(r12+88) 800f73c: e0 00 00 75 bi 800f910 } if ( !p ) return 0; return &info->indirect[ my_block ]; 800f740: b9 a0 08 00 mv r1,r13 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 800f744: 5d 6e 00 60 bne r11,r14,800f8c4 800f748: e0 00 00 74 bi 800f918 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 800f74c: 35 61 00 01 addi r1,r11,1 <== NOT EXECUTED 800f750: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800f754: f8 00 43 35 calli 8020428 <__mulsi3> <== NOT EXECUTED 800f758: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800f75c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800f760: 55 a1 00 28 bgu r13,r1,800f800 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 800f764: c9 ab 68 00 sub r13,r13,r11 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800f768: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800f76c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f770: f8 00 43 bd calli 8020664 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800f774: b9 60 10 00 mv r2,r11 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800f778: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800f77c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f780: f8 00 43 a9 calli 8020624 <__udivsi3> <== NOT EXECUTED 800f784: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->doubly_indirect; 800f788: 29 8b 00 5c lw r11,(r12+92) <== NOT EXECUTED if ( malloc_it ) { 800f78c: 45 c0 00 15 be r14,r0,800f7e0 <== NOT EXECUTED if ( !p ) { 800f790: 5d 60 00 05 bne r11,r0,800f7a4 <== NOT EXECUTED p = memfile_alloc_block(); 800f794: fb ff ff a9 calli 800f638 <== NOT EXECUTED 800f798: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p ) 800f79c: 44 20 00 5f be r1,r0,800f918 <== NOT EXECUTED return 0; info->doubly_indirect = p; 800f7a0: 59 81 00 5c sw (r12+92),r1 <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 800f7a4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f7a8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f7ac: fb ff c5 08 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f7b0: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 800f7b4: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED if ( !p1 ) { 800f7b8: 5d 80 00 05 bne r12,r0,800f7cc <== NOT EXECUTED p1 = memfile_alloc_block(); 800f7bc: fb ff ff 9f calli 800f638 <== NOT EXECUTED 800f7c0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p1 ) 800f7c4: 44 20 00 55 be r1,r0,800f918 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 800f7c8: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 800f7cc: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800f7d0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f7d4: fb ff c4 fe calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f7d8: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800f7dc: e0 00 00 50 bi 800f91c <== NOT EXECUTED } if ( !p ) 800f7e0: 45 6e 00 4e be r11,r14,800f918 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 800f7e4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f7e8: fb ff c4 f9 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f7ec: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 800f7f0: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 800f7f4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 800f7f8: 5d 60 00 33 bne r11,r0,800f8c4 <== NOT EXECUTED 800f7fc: e0 00 00 47 bi 800f918 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 800f800: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 800f804: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800f808: f8 00 43 08 calli 8020428 <__mulsi3> <== NOT EXECUTED 800f80c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800f810: 55 a1 00 42 bgu r13,r1,800f918 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 800f814: c9 af 68 00 sub r13,r13,r15 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800f818: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800f81c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f820: f8 00 43 91 calli 8020664 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800f824: b9 60 10 00 mv r2,r11 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 800f828: b8 20 80 00 mv r16,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 800f82c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f830: f8 00 43 7d calli 8020624 <__udivsi3> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 800f834: b9 60 10 00 mv r2,r11 <== 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; 800f838: b8 20 68 00 mv r13,r1 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 800f83c: f8 00 43 7a calli 8020624 <__udivsi3> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 800f840: b9 60 10 00 mv r2,r11 <== 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; 800f844: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 800f848: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f84c: f8 00 43 86 calli 8020664 <__umodsi3> <== NOT EXECUTED 800f850: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->triply_indirect; 800f854: 29 8b 00 60 lw r11,(r12+96) <== NOT EXECUTED if ( malloc_it ) { 800f858: 45 c0 00 1f be r14,r0,800f8d4 <== NOT EXECUTED if ( !p ) { 800f85c: 5d 60 00 05 bne r11,r0,800f870 <== NOT EXECUTED p = memfile_alloc_block(); 800f860: fb ff ff 76 calli 800f638 <== NOT EXECUTED 800f864: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p ) 800f868: 44 20 00 2c be r1,r0,800f918 <== NOT EXECUTED return 0; info->triply_indirect = p; 800f86c: 59 81 00 60 sw (r12+96),r1 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 800f870: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800f874: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f878: fb ff c4 d5 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f87c: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 800f880: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED if ( !p1 ) { 800f884: 5d 80 00 05 bne r12,r0,800f898 <== NOT EXECUTED p1 = memfile_alloc_block(); 800f888: fb ff ff 6c calli 800f638 <== NOT EXECUTED 800f88c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p1 ) 800f890: 44 20 00 22 be r1,r0,800f918 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 800f894: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 800f898: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f89c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f8a0: fb ff c4 cb calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f8a4: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 800f8a8: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p2 ) { 800f8ac: 5d 60 00 05 bne r11,r0,800f8c0 <== NOT EXECUTED p2 = memfile_alloc_block(); 800f8b0: fb ff ff 62 calli 800f638 <== NOT EXECUTED 800f8b4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p2 ) 800f8b8: 44 20 00 18 be r1,r0,800f918 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 800f8bc: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 800f8c0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 800f8c4: 34 02 00 02 mvi r2,2 800f8c8: fb ff c4 c1 calli 8000bcc <__ashlsi3> 800f8cc: b5 61 08 00 add r1,r11,r1 800f8d0: e0 00 00 13 bi 800f91c } if ( !p ) 800f8d4: 45 6e 00 11 be r11,r14,800f918 <== 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 ]; 800f8d8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800f8dc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f8e0: fb ff c4 bb calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f8e4: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 800f8e8: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p1 ) 800f8ec: 45 60 00 0b be r11,r0,800f918 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 800f8f0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f8f4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800f8f8: fb ff c4 b5 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f8fc: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 800f900: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800f904: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 800f908: fb ff c4 b1 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 800f90c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800f910: b4 41 08 00 add r1,r2,r1 800f914: e0 00 00 02 bi 800f91c 800f918: 34 01 00 00 mvi r1,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 800f91c: 2b 9d 00 04 lw ra,(sp+4) 800f920: 2b 8b 00 1c lw r11,(sp+28) 800f924: 2b 8c 00 18 lw r12,(sp+24) 800f928: 2b 8d 00 14 lw r13,(sp+20) 800f92c: 2b 8e 00 10 lw r14,(sp+16) 800f930: 2b 8f 00 0c lw r15,(sp+12) 800f934: 2b 90 00 08 lw r16,(sp+8) 800f938: 37 9c 00 1c addi sp,sp,28 800f93c: c3 a0 00 00 ret 08010430 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 8010430: 37 9c ff d4 addi sp,sp,-44 8010434: 5b 8b 00 24 sw (sp+36),r11 8010438: 5b 8c 00 20 sw (sp+32),r12 801043c: 5b 8d 00 1c sw (sp+28),r13 8010440: 5b 8e 00 18 sw (sp+24),r14 8010444: 5b 8f 00 14 sw (sp+20),r15 8010448: 5b 90 00 10 sw (sp+16),r16 801044c: 5b 91 00 0c sw (sp+12),r17 8010450: 5b 92 00 08 sw (sp+8),r18 8010454: 5b 9d 00 04 sw (sp+4),ra 8010458: b8 20 60 00 mv r12,r1 801045c: b8 40 68 00 mv r13,r2 8010460: b8 60 80 00 mv r16,r3 8010464: b8 80 58 00 mv r11,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 8010468: 5c 20 00 09 bne r1,r0,801048c 801046c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010470: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010474: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010478: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 801047c: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 8010480: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 8010484: 34 02 02 4c mvi r2,588 <== NOT EXECUTED 8010488: e0 00 00 0c bi 80104b8 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 801048c: 28 21 00 4c lw r1,(r1+76) 8010490: 34 03 00 01 mvi r3,1 8010494: 34 22 ff fb addi r2,r1,-5 8010498: 50 62 00 09 bgeu r3,r2,80104bc 801049c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80104a0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80104a4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80104a8: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80104ac: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 80104b0: 38 84 1c 54 ori r4,r4,0x1c54 <== NOT EXECUTED 80104b4: 34 02 02 51 mvi r2,593 <== NOT EXECUTED 80104b8: fb ff f2 03 calli 800ccc4 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 80104bc: 5e 00 00 09 bne r16,r0,80104e0 80104c0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80104c4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80104c8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80104cc: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80104d0: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 80104d4: 38 84 1c a0 ori r4,r4,0x1ca0 <== NOT EXECUTED 80104d8: 34 02 02 5a mvi r2,602 <== NOT EXECUTED 80104dc: e3 ff ff f7 bi 80104b8 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 80104e0: 5c 80 00 06 bne r4,r0,80104f8 rtems_set_errno_and_return_minus_one( EINVAL ); 80104e4: f8 00 04 10 calli 8011524 <__errno> <== NOT EXECUTED 80104e8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80104ec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80104f0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80104f4: e0 00 00 88 bi 8010714 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 80104f8: 34 02 00 06 mvi r2,6 80104fc: 29 8e 00 50 lw r14,(r12+80) 8010500: 29 8f 00 54 lw r15,(r12+84) 8010504: 5c 22 00 19 bne r1,r2,8010568 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 8010508: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 801050c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010510: fb ff c1 ff calli 8000d0c <__ashrsi3> <== NOT EXECUTED 8010514: c9 ed 18 00 sub r3,r15,r13 <== NOT EXECUTED 8010518: f4 6f 10 00 cmpgu r2,r3,r15 <== NOT EXECUTED 801051c: c9 c1 08 00 sub r1,r14,r1 <== NOT EXECUTED 8010520: c8 22 70 00 sub r14,r1,r2 <== 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; 8010524: 29 82 00 58 lw r2,(r12+88) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 8010528: 48 0e 00 04 bg r0,r14,8010538 <== NOT EXECUTED 801052c: 5c 0e 00 04 bne r0,r14,801053c <== NOT EXECUTED 8010530: 55 63 00 02 bgu r11,r3,8010538 <== NOT EXECUTED 8010534: e0 00 00 02 bi 801053c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 8010538: c9 ed 58 00 sub r11,r15,r13 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 801053c: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8010540: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8010544: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8010548: f8 00 06 9d calli 8011fbc <== NOT EXECUTED IMFS_update_atime( the_jnode ); 801054c: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8010550: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8010554: fb ff c9 3b calli 8002a40 <== NOT EXECUTED 8010558: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 801055c: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED return my_length; 8010560: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010564: e0 00 00 6c bi 8010714 <== 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 ) 8010568: b4 8d 08 00 add r1,r4,r13 801056c: 48 0e 00 04 bg r0,r14,801057c 8010570: 5c 0e 00 04 bne r0,r14,8010580 8010574: 54 2f 00 02 bgu r1,r15,801057c 8010578: e0 00 00 02 bi 8010580 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 801057c: c9 ed 58 00 sub r11,r15,r13 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010580: 78 01 08 02 mvhi r1,0x802 8010584: 38 21 36 4c ori r1,r1,0x364c 8010588: 28 32 00 00 lw r18,(r1+0) 801058c: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 8010590: ba 00 78 00 mv r15,r16 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010594: ba 40 10 00 mv r2,r18 8010598: f8 00 3f f7 calli 8020574 <__modsi3> 801059c: b8 20 88 00 mv r17,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 80105a0: ba 40 10 00 mv r2,r18 80105a4: b9 a0 08 00 mv r1,r13 80105a8: f8 00 3f c0 calli 80204a8 <__divsi3> 80105ac: b8 20 68 00 mv r13,r1 if ( start_offset ) { 80105b0: ba 20 70 00 mv r14,r17 80105b4: 46 20 00 1a be r17,r0,801061c 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 ); 80105b8: b9 80 08 00 mv r1,r12 80105bc: b9 a0 10 00 mv r2,r13 80105c0: 34 03 00 00 mvi r3,0 80105c4: fb ff fc 2d calli 800f678 assert( block_ptr ); 80105c8: 5c 20 00 09 bne r1,r0,80105ec 80105cc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80105d0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80105d4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80105d8: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80105dc: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 80105e0: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 80105e4: 34 02 02 96 mvi r2,662 <== NOT EXECUTED 80105e8: e3 ff ff b4 bi 80104b8 <== NOT EXECUTED */ 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; 80105ec: ca 51 90 00 sub r18,r18,r17 80105f0: b9 60 70 00 mv r14,r11 80105f4: 52 4b 00 02 bgeu r18,r11,80105fc 80105f8: ba 40 70 00 mv r14,r18 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 ); 80105fc: 28 22 00 00 lw r2,(r1+0) 8010600: b9 c0 18 00 mv r3,r14 8010604: ba 00 08 00 mv r1,r16 8010608: b4 51 10 00 add r2,r2,r17 801060c: f8 00 06 6c calli 8011fbc dest += to_copy; 8010610: b6 0e 78 00 add r15,r16,r14 block++; 8010614: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8010618: c9 6e 58 00 sub r11,r11,r14 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 801061c: 78 01 08 02 mvhi r1,0x802 8010620: 38 21 36 4c ori r1,r1,0x364c while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010624: b8 20 88 00 mv r17,r1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8010628: 28 30 00 00 lw r16,(r1+0) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 801062c: e0 00 00 16 bi 8010684 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010630: b9 80 08 00 mv r1,r12 8010634: b9 a0 10 00 mv r2,r13 8010638: 34 03 00 00 mvi r3,0 801063c: fb ff fc 0f calli 800f678 assert( block_ptr ); 8010640: 5c 20 00 09 bne r1,r0,8010664 8010644: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010648: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801064c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010650: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 8010654: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 8010658: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 801065c: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED 8010660: e3 ff ff 96 bi 80104b8 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 8010664: 28 22 00 00 lw r2,(r1+0) 8010668: ba 00 18 00 mv r3,r16 801066c: b9 e0 08 00 mv r1,r15 8010670: f8 00 06 53 calli 8011fbc dest += to_copy; 8010674: b5 f0 78 00 add r15,r15,r16 block++; 8010678: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 801067c: c9 70 58 00 sub r11,r11,r16 copied += to_copy; 8010680: b5 d0 70 00 add r14,r14,r16 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010684: 2a 21 00 00 lw r1,(r17+0) 8010688: 51 61 ff ea bgeu r11,r1,8010630 /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); 801068c: 54 2b 00 09 bgu r1,r11,80106b0 8010690: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010694: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010698: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801069c: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80106a0: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 80106a4: 38 84 1c 28 ori r4,r4,0x1c28 <== NOT EXECUTED 80106a8: 34 02 02 b5 mvi r2,693 <== NOT EXECUTED 80106ac: e3 ff ff 83 bi 80104b8 <== NOT EXECUTED if ( my_length ) { 80106b0: 45 60 00 13 be r11,r0,80106fc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 80106b4: b9 a0 10 00 mv r2,r13 80106b8: b9 80 08 00 mv r1,r12 80106bc: 34 03 00 00 mvi r3,0 80106c0: fb ff fb ee calli 800f678 assert( block_ptr ); 80106c4: 5c 20 00 09 bne r1,r0,80106e8 80106c8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80106cc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80106d0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80106d4: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80106d8: 38 63 1c dc ori r3,r3,0x1cdc <== NOT EXECUTED 80106dc: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 80106e0: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED 80106e4: e3 ff ff 75 bi 80104b8 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 80106e8: 28 22 00 00 lw r2,(r1+0) 80106ec: b9 60 18 00 mv r3,r11 80106f0: b9 e0 08 00 mv r1,r15 80106f4: f8 00 06 32 calli 8011fbc copied += my_length; 80106f8: b5 6e 70 00 add r14,r11,r14 } IMFS_update_atime( the_jnode ); 80106fc: 37 81 00 28 addi r1,sp,40 8010700: 34 02 00 00 mvi r2,0 8010704: fb ff c8 cf calli 8002a40 8010708: 2b 81 00 28 lw r1,(sp+40) 801070c: 59 81 00 40 sw (r12+64),r1 return copied; 8010710: b9 c0 08 00 mv r1,r14 } 8010714: 2b 9d 00 04 lw ra,(sp+4) 8010718: 2b 8b 00 24 lw r11,(sp+36) 801071c: 2b 8c 00 20 lw r12,(sp+32) 8010720: 2b 8d 00 1c lw r13,(sp+28) 8010724: 2b 8e 00 18 lw r14,(sp+24) 8010728: 2b 8f 00 14 lw r15,(sp+20) 801072c: 2b 90 00 10 lw r16,(sp+16) 8010730: 2b 91 00 0c lw r17,(sp+12) 8010734: 2b 92 00 08 lw r18,(sp+8) 8010738: 37 9c 00 2c addi sp,sp,44 801073c: c3 a0 00 00 ret 0800fa3c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 800fa3c: 37 9c ff e0 addi sp,sp,-32 800fa40: 5b 8b 00 20 sw (sp+32),r11 800fa44: 5b 8c 00 1c sw (sp+28),r12 800fa48: 5b 8d 00 18 sw (sp+24),r13 800fa4c: 5b 8e 00 14 sw (sp+20),r14 800fa50: 5b 8f 00 10 sw (sp+16),r15 800fa54: 5b 90 00 0c sw (sp+12),r16 800fa58: 5b 91 00 08 sw (sp+8),r17 800fa5c: 5b 9d 00 04 sw (sp+4),ra 800fa60: b8 20 58 00 mv r11,r1 /* * Perform internal consistency checks */ assert( the_jnode ); 800fa64: 5c 20 00 09 bne r1,r0,800fa88 800fa68: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fa6c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fa70: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fa74: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fa78: 38 63 1c f0 ori r3,r3,0x1cf0 <== NOT EXECUTED 800fa7c: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 800fa80: 34 02 01 ee mvi r2,494 <== NOT EXECUTED 800fa84: e0 00 00 0b bi 800fab0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 800fa88: 28 22 00 4c lw r2,(r1+76) 800fa8c: 34 01 00 05 mvi r1,5 800fa90: 44 41 00 09 be r2,r1,800fab4 800fa94: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800fa98: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fa9c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800faa0: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800faa4: 38 63 1c f0 ori r3,r3,0x1cf0 <== NOT EXECUTED 800faa8: 38 84 1b e4 ori r4,r4,0x1be4 <== NOT EXECUTED 800faac: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED 800fab0: fb ff f4 85 calli 800ccc4 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 800fab4: 78 01 08 02 mvhi r1,0x802 800fab8: 38 21 36 4c ori r1,r1,0x364c 800fabc: 28 21 00 00 lw r1,(r1+0) 800fac0: 34 02 00 02 mvi r2,2 800fac4: fb ff c4 6a calli 8000c6c <__lshrsi3> 800fac8: b8 20 60 00 mv r12,r1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 800facc: 29 61 00 58 lw r1,(r11+88) 800fad0: 44 20 00 04 be r1,r0,800fae0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 800fad4: 35 61 00 58 addi r1,r11,88 800fad8: b9 80 10 00 mv r2,r12 800fadc: fb ff ff 99 calli 800f940 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 800fae0: 29 61 00 5c lw r1,(r11+92) 800fae4: 44 20 00 15 be r1,r0,800fb38 800fae8: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; iinfo.file; 800faf4: b9 a0 70 00 mv r14,r13 <== NOT EXECUTED 800faf8: e0 00 00 09 bi 800fb1c <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 800fafc: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 800fb00: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 800fb04: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 800fb08: 44 40 00 03 be r2,r0,800fb14 <== NOT EXECUTED memfile_free_blocks_in_table( 800fb0c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800fb10: fb ff ff 8c calli 800f940 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 800fb28: 54 2e ff f5 bgu r1,r14,800fafc <== 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 ); 800fb2c: 35 61 00 5c addi r1,r11,92 <== NOT EXECUTED 800fb30: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800fb34: fb ff ff 83 calli 800f940 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 800fb38: 29 61 00 60 lw r1,(r11+96) 800fb3c: 44 20 00 24 be r1,r0,800fbcc 800fb40: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; iinfo.file; 800fb4c: b9 a0 80 00 mv r16,r13 <== NOT EXECUTED 800fb50: e0 00 00 18 bi 800fbb0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 800fb54: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 800fb58: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 800fb5c: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 800fb60: 45 c0 00 18 be r14,r0,800fbc0 <== NOT EXECUTED 800fb64: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 800fb68: e0 00 00 08 bi 800fb88 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 800fb74: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800fb78: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800fb7c: fb ff ff 71 calli 800f940 <== 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 800fb94: 54 31 ff f6 bgu r1,r17,800fb6c <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 800fb98: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 800fb9c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 800fbbc: 54 30 ff e6 bgu r1,r16,800fb54 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 800fbc0: 35 61 00 60 addi r1,r11,96 <== NOT EXECUTED 800fbc4: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800fbc8: fb ff ff 5e calli 800f940 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 800fbcc: 34 01 00 00 mvi r1,0 800fbd0: 2b 9d 00 04 lw ra,(sp+4) 800fbd4: 2b 8b 00 20 lw r11,(sp+32) 800fbd8: 2b 8c 00 1c lw r12,(sp+28) 800fbdc: 2b 8d 00 18 lw r13,(sp+24) 800fbe0: 2b 8e 00 14 lw r14,(sp+20) 800fbe4: 2b 8f 00 10 lw r15,(sp+16) 800fbe8: 2b 90 00 0c lw r16,(sp+12) 800fbec: 2b 91 00 08 lw r17,(sp+8) 800fbf0: 37 9c 00 20 addi sp,sp,32 800fbf4: c3 a0 00 00 ret 0800f9e4 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 800f9e4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800f9e8: 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 ); 800f9ec: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 800f9f0: fb ff ff 22 calli 800f678 <== NOT EXECUTED assert( block_ptr ); 800f9f4: 5c 20 00 09 bne r1,r0,800fa18 <== NOT EXECUTED 800f9f8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800f9fc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800fa00: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800fa04: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800fa08: 38 63 1d 24 ori r3,r3,0x1d24 <== NOT EXECUTED 800fa0c: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 800fa10: 34 02 01 96 mvi r2,406 <== NOT EXECUTED 800fa14: fb ff f4 ac calli 800ccc4 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 800fa18: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED *block_ptr = 0; 800fa1c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 800fa20: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED memfile_free_block( ptr ); 800fa24: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800fa28: fb ff fe f9 calli 800f60c <== NOT EXECUTED } return 1; } 800fa2c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800fa30: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800fa34: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800fa38: c3 a0 00 00 ret <== NOT EXECUTED 08010064 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 8010064: 37 9c ff d0 addi sp,sp,-48 8010068: 5b 8b 00 28 sw (sp+40),r11 801006c: 5b 8c 00 24 sw (sp+36),r12 8010070: 5b 8d 00 20 sw (sp+32),r13 8010074: 5b 8e 00 1c sw (sp+28),r14 8010078: 5b 8f 00 18 sw (sp+24),r15 801007c: 5b 90 00 14 sw (sp+20),r16 8010080: 5b 91 00 10 sw (sp+16),r17 8010084: 5b 92 00 0c sw (sp+12),r18 8010088: 5b 93 00 08 sw (sp+8),r19 801008c: 5b 9d 00 04 sw (sp+4),ra 8010090: b8 20 58 00 mv r11,r1 8010094: b8 40 60 00 mv r12,r2 8010098: b8 60 88 00 mv r17,r3 801009c: b8 80 78 00 mv r15,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 80100a0: 5c 20 00 09 bne r1,r0,80100c4 80100a4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80100a8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80100ac: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80100b0: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80100b4: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 80100b8: 38 84 1b d8 ori r4,r4,0x1bd8 <== NOT EXECUTED 80100bc: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED 80100c0: e0 00 00 0b bi 80100ec <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 80100c4: 28 22 00 4c lw r2,(r1+76) 80100c8: 34 01 00 05 mvi r1,5 80100cc: 44 41 00 09 be r2,r1,80100f0 80100d0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80100d4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80100d8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80100dc: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80100e0: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 80100e4: 38 84 1b e4 ori r4,r4,0x1be4 <== NOT EXECUTED 80100e8: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED 80100ec: fb ff f2 f6 calli 800ccc4 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 80100f0: 5c 60 00 09 bne r3,r0,8010114 80100f4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80100f8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80100fc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010100: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 8010104: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 8010108: 38 84 1c 20 ori r4,r4,0x1c20 <== NOT EXECUTED 801010c: 34 02 02 ef mvi r2,751 <== NOT EXECUTED 8010110: e3 ff ff f7 bi 80100ec <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 8010114: 5c 80 00 04 bne r4,r0,8010124 rtems_set_errno_and_return_minus_one( EINVAL ); 8010118: f8 00 05 03 calli 8011524 <__errno> <== NOT EXECUTED 801011c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010120: e0 00 00 0d bi 8010154 <== 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 ) { 8010124: 29 61 00 50 lw r1,(r11+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; 8010128: b4 8c 10 00 add r2,r4,r12 if ( last_byte > the_jnode->info.file.size ) { 801012c: 48 01 00 05 bg r0,r1,8010140 8010130: 5c 20 00 0c bne r1,r0,8010160 8010134: 29 61 00 54 lw r1,(r11+84) 8010138: 54 41 00 02 bgu r2,r1,8010140 801013c: e0 00 00 09 bi 8010160 <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, last_byte ); 8010140: b9 60 08 00 mv r1,r11 8010144: fb ff ff 18 calli 800fda4 if ( status ) 8010148: 44 20 00 06 be r1,r0,8010160 rtems_set_errno_and_return_minus_one( ENOSPC ); 801014c: f8 00 04 f6 calli 8011524 <__errno> <== NOT EXECUTED 8010150: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010154: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010158: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801015c: e0 00 00 66 bi 80102f4 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010160: 78 01 08 02 mvhi r1,0x802 8010164: 38 21 36 4c ori r1,r1,0x364c 8010168: 28 33 00 00 lw r19,(r1+0) 801016c: b9 80 08 00 mv r1,r12 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 8010170: b9 e0 68 00 mv r13,r15 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010174: ba 60 10 00 mv r2,r19 8010178: f8 00 40 ff calli 8020574 <__modsi3> 801017c: b8 20 90 00 mv r18,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010180: ba 60 10 00 mv r2,r19 8010184: b9 80 08 00 mv r1,r12 8010188: f8 00 40 c8 calli 80204a8 <__divsi3> 801018c: b8 20 70 00 mv r14,r1 if ( start_offset ) { 8010190: ba 20 80 00 mv r16,r17 8010194: ba 40 60 00 mv r12,r18 8010198: 46 40 00 19 be r18,r0,80101fc 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 ); 801019c: b9 60 08 00 mv r1,r11 80101a0: b9 c0 10 00 mv r2,r14 80101a4: 34 03 00 00 mvi r3,0 80101a8: fb ff fd 34 calli 800f678 assert( block_ptr ); 80101ac: 5c 20 00 09 bne r1,r0,80101d0 80101b0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80101b4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80101b8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80101bc: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80101c0: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 80101c4: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 80101c8: 34 02 03 1c mvi r2,796 <== NOT EXECUTED 80101cc: e3 ff ff c8 bi 80100ec <== NOT EXECUTED */ 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; 80101d0: ca 72 60 00 sub r12,r19,r18 80101d4: 51 ec 00 02 bgeu r15,r12,80101dc 80101d8: b9 e0 60 00 mv r12,r15 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 ); 80101dc: 28 21 00 00 lw r1,(r1+0) 80101e0: ba 20 10 00 mv r2,r17 80101e4: b9 80 18 00 mv r3,r12 80101e8: b4 32 08 00 add r1,r1,r18 80101ec: f8 00 07 74 calli 8011fbc src += to_copy; 80101f0: b6 2c 80 00 add r16,r17,r12 block++; 80101f4: 35 ce 00 01 addi r14,r14,1 my_length -= to_copy; 80101f8: c9 ec 68 00 sub r13,r15,r12 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 80101fc: 78 01 08 02 mvhi r1,0x802 8010200: 38 21 36 4c ori r1,r1,0x364c while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010204: b8 20 88 00 mv r17,r1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8010208: 28 2f 00 00 lw r15,(r1+0) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 801020c: e0 00 00 16 bi 8010264 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010210: b9 60 08 00 mv r1,r11 8010214: b9 c0 10 00 mv r2,r14 8010218: 34 03 00 00 mvi r3,0 801021c: fb ff fd 17 calli 800f678 assert( block_ptr ); 8010220: 5c 20 00 09 bne r1,r0,8010244 8010224: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010228: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801022c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010230: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 8010234: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 8010238: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 801023c: 34 02 03 30 mvi r2,816 <== NOT EXECUTED 8010240: e3 ff ff ab bi 80100ec <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 8010244: 28 21 00 00 lw r1,(r1+0) 8010248: ba 00 10 00 mv r2,r16 801024c: b9 e0 18 00 mv r3,r15 8010250: f8 00 07 5b calli 8011fbc src += to_copy; 8010254: b6 0f 80 00 add r16,r16,r15 block++; 8010258: 35 ce 00 01 addi r14,r14,1 my_length -= to_copy; 801025c: c9 af 68 00 sub r13,r13,r15 * * 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( 8010260: b5 8f 60 00 add r12,r12,r15 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010264: 2a 21 00 00 lw r1,(r17+0) 8010268: 51 a1 ff ea bgeu r13,r1,8010210 /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); 801026c: 54 2d 00 09 bgu r1,r13,8010290 8010270: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010274: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010278: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801027c: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 8010280: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 8010284: 38 84 1c 28 ori r4,r4,0x1c28 <== NOT EXECUTED 8010288: 34 02 03 41 mvi r2,833 <== NOT EXECUTED 801028c: e3 ff ff 98 bi 80100ec <== NOT EXECUTED to_copy = my_length; if ( my_length ) { 8010290: 45 a0 00 13 be r13,r0,80102dc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010294: b9 c0 10 00 mv r2,r14 8010298: b9 60 08 00 mv r1,r11 801029c: 34 03 00 00 mvi r3,0 80102a0: fb ff fc f6 calli 800f678 assert( block_ptr ); 80102a4: 5c 20 00 09 bne r1,r0,80102c8 80102a8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80102ac: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80102b0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80102b4: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 80102b8: 38 63 1c c8 ori r3,r3,0x1cc8 <== NOT EXECUTED 80102bc: 38 84 1c 14 ori r4,r4,0x1c14 <== NOT EXECUTED 80102c0: 34 02 03 46 mvi r2,838 <== NOT EXECUTED 80102c4: e3 ff ff 8a bi 80100ec <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 80102c8: 28 21 00 00 lw r1,(r1+0) 80102cc: ba 00 10 00 mv r2,r16 80102d0: b9 a0 18 00 mv r3,r13 80102d4: f8 00 07 3a calli 8011fbc my_length = 0; copied += to_copy; 80102d8: b5 8d 60 00 add r12,r12,r13 } IMFS_mtime_ctime_update( the_jnode ); 80102dc: 37 81 00 2c addi r1,sp,44 80102e0: 34 02 00 00 mvi r2,0 80102e4: fb ff c9 d7 calli 8002a40 80102e8: 2b 81 00 2c lw r1,(sp+44) 80102ec: 59 61 00 48 sw (r11+72),r1 80102f0: 59 61 00 44 sw (r11+68),r1 return copied; } 80102f4: b9 80 08 00 mv r1,r12 80102f8: 2b 9d 00 04 lw ra,(sp+4) 80102fc: 2b 8b 00 28 lw r11,(sp+40) 8010300: 2b 8c 00 24 lw r12,(sp+36) 8010304: 2b 8d 00 20 lw r13,(sp+32) 8010308: 2b 8e 00 1c lw r14,(sp+28) 801030c: 2b 8f 00 18 lw r15,(sp+24) 8010310: 2b 90 00 14 lw r16,(sp+20) 8010314: 2b 91 00 10 lw r17,(sp+16) 8010318: 2b 92 00 0c lw r18,(sp+12) 801031c: 2b 93 00 08 lw r19,(sp+8) 8010320: 37 9c 00 30 addi sp,sp,48 8010324: c3 a0 00 00 ret 08006bc4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8006bc4: 37 9c ff a8 addi sp,sp,-88 8006bc8: 5b 8b 00 18 sw (sp+24),r11 8006bcc: 5b 8c 00 14 sw (sp+20),r12 8006bd0: 5b 8d 00 10 sw (sp+16),r13 8006bd4: 5b 8e 00 0c sw (sp+12),r14 8006bd8: 5b 8f 00 08 sw (sp+8),r15 8006bdc: 5b 9d 00 04 sw (sp+4),ra 8006be0: b8 40 58 00 mv r11,r2 8006be4: b8 20 78 00 mv r15,r1 8006be8: b8 60 70 00 mv r14,r3 8006bec: b8 80 68 00 mv r13,r4 8006bf0: b8 a0 60 00 mv r12,r5 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 ); 8006bf4: f8 00 15 92 calli 800c23c 8006bf8: b8 20 10 00 mv r2,r1 8006bfc: 37 83 00 1c addi r3,sp,28 8006c00: b9 e0 08 00 mv r1,r15 8006c04: 37 84 00 58 addi r4,sp,88 8006c08: fb ff ff 74 calli 80069d8 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8006c0c: 21 66 f0 00 andi r6,r11,0xf000 8006c10: 34 01 40 00 mvi r1,16384 8006c14: 44 c1 00 12 be r6,r1,8006c5c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8006c18: 38 01 80 00 mvu r1,0x8000 8006c1c: 34 02 00 05 mvi r2,5 8006c20: 44 c1 00 10 be r6,r1,8006c60 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8006c24: 64 c2 20 00 cmpei r2,r6,8192 8006c28: 64 c1 60 00 cmpei r1,r6,24576 8006c2c: b8 41 08 00 or r1,r2,r1 8006c30: 44 20 00 05 be r1,r0,8006c44 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8006c34: 5b 8e 00 40 sw (sp+64),r14 8006c38: 5b 8d 00 44 sw (sp+68),r13 8006c3c: 34 02 00 02 mvi r2,2 8006c40: e0 00 00 08 bi 8006c60 } else if (S_ISFIFO(mode)) 8006c44: 34 01 10 00 mvi r1,4096 8006c48: 34 02 00 07 mvi r2,7 8006c4c: 44 c1 00 05 be r6,r1,8006c60 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8006c50: f8 00 10 ab calli 800aefc <__errno> <== NOT EXECUTED 8006c54: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8006c58: e0 00 00 0b bi 8006c84 <== NOT EXECUTED 8006c5c: 34 02 00 01 mvi r2,1 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 8006c60: b9 80 08 00 mv r1,r12 8006c64: b9 60 20 00 mv r4,r11 8006c68: 37 83 00 1c addi r3,sp,28 8006c6c: 37 85 00 40 addi r5,sp,64 8006c70: f8 00 0c 39 calli 8009d54 new_name, mode, &info ); if ( !new_node ) 8006c74: 34 02 00 00 mvi r2,0 8006c78: 5c 22 00 05 bne r1,r2,8006c8c rtems_set_errno_and_return_minus_one( ENOMEM ); 8006c7c: f8 00 10 a0 calli 800aefc <__errno> <== NOT EXECUTED 8006c80: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006c84: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006c88: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED return 0; } 8006c8c: b8 40 08 00 mv r1,r2 8006c90: 2b 9d 00 04 lw ra,(sp+4) 8006c94: 2b 8b 00 18 lw r11,(sp+24) 8006c98: 2b 8c 00 14 lw r12,(sp+20) 8006c9c: 2b 8d 00 10 lw r13,(sp+16) 8006ca0: 2b 8e 00 0c lw r14,(sp+12) 8006ca4: 2b 8f 00 08 lw r15,(sp+8) 8006ca8: 37 9c 00 58 addi sp,sp,88 8006cac: c3 a0 00 00 ret 080020e8 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 80020e8: 37 9c ff fc addi sp,sp,-4 80020ec: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 80020f0: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 80020f4: 34 03 00 01 mvi r3,1 80020f8: 28 44 00 4c lw r4,(r2+76) 80020fc: 44 83 00 06 be r4,r3,8002114 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8002100: f8 00 3d 09 calli 8011524 <__errno> <== NOT EXECUTED 8002104: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002108: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800210c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002110: e0 00 00 03 bi 800211c <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 8002114: 58 41 00 5c sw (r2+92),r1 8002118: 34 01 00 00 mvi r1,0 return 0; } 800211c: 2b 9d 00 04 lw ra,(sp+4) 8002120: 37 9c 00 04 addi sp,sp,4 8002124: c3 a0 00 00 ret 08002a70 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 8002a70: 37 9c ff f0 addi sp,sp,-16 8002a74: 5b 8b 00 10 sw (sp+16),r11 8002a78: 5b 8c 00 0c sw (sp+12),r12 8002a7c: 5b 8d 00 08 sw (sp+8),r13 8002a80: 5b 9d 00 04 sw (sp+4),ra 8002a84: b8 20 58 00 mv r11,r1 assert( the_jnode ); 8002a88: 5c 20 00 09 bne r1,r0,8002aac 8002a8c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002a90: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002a94: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002a98: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002a9c: 38 63 3b 00 ori r3,r3,0x3b00 <== NOT EXECUTED 8002aa0: 38 84 39 74 ori r4,r4,0x3974 <== NOT EXECUTED 8002aa4: 34 02 00 38 mvi r2,56 <== NOT EXECUTED 8002aa8: e0 00 00 39 bi 8002b8c <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 8002aac: 78 0c 08 02 mvhi r12,0x802 8002ab0: 39 8c 61 90 ori r12,r12,0x6190 8002ab4: 29 82 00 00 lw r2,(r12+0) 8002ab8: 34 21 00 0c addi r1,r1,12 8002abc: 28 42 00 08 lw r2,(r2+8) 8002ac0: f8 00 36 f3 calli 801068c switch( the_jnode->type ) { 8002ac4: 29 63 00 4c lw r3,(r11+76) 8002ac8: 34 02 00 06 mvi r2,6 8002acc: 34 61 ff ff addi r1,r3,-1 8002ad0: 54 22 00 4a bgu r1,r2,8002bf8 8002ad4: 34 02 00 02 mvi r2,2 8002ad8: 78 0d 08 02 mvhi r13,0x802 8002adc: fb ff fd d0 calli 800221c <__ashlsi3> 8002ae0: 39 ad 3a d0 ori r13,r13,0x3ad0 8002ae4: b5 a1 08 00 add r1,r13,r1 8002ae8: 28 22 00 00 lw r2,(r1+0) 8002aec: c0 40 00 00 b r2 case IMFS_DIRECTORY: fprintf(stdout, "/" ); 8002af0: 29 82 00 00 lw r2,(r12+0) 8002af4: 34 01 00 2f mvi r1,47 8002af8: 28 42 00 08 lw r2,(r2+8) 8002afc: f8 00 36 8e calli 8010534 break; 8002b00: e0 00 00 4b bi 8002c2c case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 8002b04: 29 81 00 00 lw r1,(r12+0) 8002b08: 78 02 08 02 mvhi r2,0x802 8002b0c: 29 64 00 54 lw r4,(r11+84) 8002b10: 29 63 00 50 lw r3,(r11+80) 8002b14: 28 21 00 08 lw r1,(r1+8) 8002b18: 38 42 39 80 ori r2,r2,0x3980 8002b1c: e0 00 00 07 bi 8002b38 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 8002b20: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8002b24: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED 8002b28: 29 63 00 54 lw r3,(r11+84) <== NOT EXECUTED 8002b2c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002b30: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002b34: 38 42 39 94 ori r2,r2,0x3994 <== NOT EXECUTED 8002b38: f8 00 36 5e calli 80104b0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 8002b3c: e0 00 00 3c bi 8002c2c the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 8002b40: 29 81 00 00 lw r1,(r12+0) 8002b44: 29 63 00 54 lw r3,(r11+84) 8002b48: 78 02 08 02 mvhi r2,0x802 8002b4c: 28 21 00 08 lw r1,(r1+8) 8002b50: 38 42 39 a4 ori r2,r2,0x39a4 8002b54: f8 00 36 57 calli 80104b0 (uint32_t)the_jnode->info.file.size ); #endif break; 8002b58: e0 00 00 35 bi 8002c2c case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 8002b5c: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002b60: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002b64: 38 21 39 b0 ori r1,r1,0x39b0 <== NOT EXECUTED 8002b68: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002b6c: f8 00 36 c8 calli 801068c <== NOT EXECUTED assert(0); 8002b70: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002b74: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002b78: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002b7c: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002b80: 38 63 3b 00 ori r3,r3,0x3b00 <== NOT EXECUTED 8002b84: 38 84 39 c4 ori r4,r4,0x39c4 <== NOT EXECUTED 8002b88: 34 02 00 5d mvi r2,93 <== NOT EXECUTED 8002b8c: f8 00 02 72 calli 8003554 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 8002b90: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002b94: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002b98: 38 21 39 b0 ori r1,r1,0x39b0 <== NOT EXECUTED 8002b9c: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002ba0: f8 00 36 bb calli 801068c <== NOT EXECUTED assert(0); 8002ba4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ba8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002bac: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002bb0: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002bb4: 38 63 3b 00 ori r3,r3,0x3b00 <== NOT EXECUTED 8002bb8: 38 84 39 c4 ori r4,r4,0x39c4 <== NOT EXECUTED 8002bbc: 34 02 00 62 mvi r2,98 <== NOT EXECUTED 8002bc0: e3 ff ff f3 bi 8002b8c <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 8002bc4: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002bc8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002bcc: 38 21 39 c8 ori r1,r1,0x39c8 <== NOT EXECUTED 8002bd0: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002bd4: f8 00 36 ae calli 801068c <== NOT EXECUTED assert(0); 8002bd8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002bdc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002be0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002be4: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002be8: 38 63 3b 00 ori r3,r3,0x3b00 <== NOT EXECUTED 8002bec: 38 84 39 c4 ori r4,r4,0x39c4 <== NOT EXECUTED 8002bf0: 34 02 00 67 mvi r2,103 <== NOT EXECUTED 8002bf4: e3 ff ff e6 bi 8002b8c <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 8002bf8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8002bfc: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002c00: 38 42 39 dc ori r2,r2,0x39dc <== NOT EXECUTED 8002c04: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002c08: f8 00 36 2a calli 80104b0 <== NOT EXECUTED assert(0); 8002c0c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c10: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002c14: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002c18: 38 21 39 28 ori r1,r1,0x3928 <== NOT EXECUTED 8002c1c: 38 63 3b 00 ori r3,r3,0x3b00 <== NOT EXECUTED 8002c20: 38 84 39 c4 ori r4,r4,0x39c4 <== NOT EXECUTED 8002c24: 34 02 00 6c mvi r2,108 <== NOT EXECUTED 8002c28: e3 ff ff d9 bi 8002b8c <== NOT EXECUTED break; } puts(""); 8002c2c: 78 01 08 02 mvhi r1,0x802 8002c30: 38 21 33 94 ori r1,r1,0x3394 8002c34: f8 00 3e 45 calli 8012548 } 8002c38: 2b 9d 00 04 lw ra,(sp+4) 8002c3c: 2b 8b 00 10 lw r11,(sp+16) 8002c40: 2b 8c 00 0c lw r12,(sp+12) 8002c44: 2b 8d 00 08 lw r13,(sp+8) 8002c48: 37 9c 00 10 addi sp,sp,16 8002c4c: c3 a0 00 00 ret 08002134 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 8002134: 37 9c ff fc addi sp,sp,-4 8002138: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; int i; node = loc->node_access; 800213c: 28 24 00 00 lw r4,(r1+0) if ( node->type != IMFS_SYM_LINK ) 8002140: 34 05 00 04 mvi r5,4 8002144: 34 01 00 00 mvi r1,0 8002148: 28 86 00 4c lw r6,(r4+76) 800214c: 44 c5 00 08 be r6,r5,800216c rtems_set_errno_and_return_minus_one( EINVAL ); 8002150: f8 00 3c f5 calli 8011524 <__errno> <== NOT EXECUTED 8002154: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002158: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800215c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002160: e0 00 00 09 bi 8002184 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 8002164: 30 c5 00 00 sb (r6+0),r5 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++ ) 8002168: 34 21 00 01 addi r1,r1,1 buf[i] = node->info.sym_link.name[i]; 800216c: b4 41 30 00 add r6,r2,r1 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++ ) 8002170: 50 23 00 05 bgeu r1,r3,8002184 8002174: 28 85 00 50 lw r5,(r4+80) 8002178: b4 a1 28 00 add r5,r5,r1 800217c: 40 a5 00 00 lbu r5,(r5+0) 8002180: 5c a0 ff f9 bne r5,r0,8002164 buf[i] = node->info.sym_link.name[i]; return i; } 8002184: 2b 9d 00 04 lw ra,(sp+4) 8002188: 37 9c 00 04 addi sp,sp,4 800218c: c3 a0 00 00 ret 08002190 : 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 */ ) { 8002190: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8002194: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8002198: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 800219c: 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; 80021a0: 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 */ ) { 80021a4: 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 ); 80021a8: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 80021ac: 35 61 00 0c addi r1,r11,12 <== NOT EXECUTED 80021b0: 34 03 00 20 mvi r3,32 <== NOT EXECUTED 80021b4: f8 00 41 b8 calli 8012894 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 80021b8: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 80021bc: 44 20 00 03 be r1,r0,80021c8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 80021c0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80021c4: f8 00 0a d2 calli 8004d0c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 80021c8: 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 ); 80021cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80021d0: 34 61 00 50 addi r1,r3,80 <== NOT EXECUTED the_jnode->Parent = new_parent; 80021d4: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 80021d8: f8 00 0a c1 calli 8004cdc <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 80021dc: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 80021e0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80021e4: f8 00 02 17 calli 8002a40 <== NOT EXECUTED 80021e8: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 80021ec: 59 61 00 48 sw (r11+72),r1 <== NOT EXECUTED return 0; } 80021f0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80021f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80021f8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80021fc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002200: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8002204: c3 a0 00 00 ret <== NOT EXECUTED 08006cbc : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8006cbc: 37 9c ff ec addi sp,sp,-20 8006cc0: 5b 8b 00 0c sw (sp+12),r11 8006cc4: 5b 8c 00 08 sw (sp+8),r12 8006cc8: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8006ccc: 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 */ ) { 8006cd0: 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 ) { 8006cd4: 29 61 00 08 lw r1,(r11+8) 8006cd8: 44 20 00 05 be r1,r0,8006cec */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8006cdc: b9 60 08 00 mv r1,r11 8006ce0: f8 00 04 dc calli 8008050 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8006ce4: 34 01 00 00 mvi r1,0 8006ce8: 59 61 00 08 sw (r11+8),r1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8006cec: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8006cf0: 34 02 00 00 mvi r2,0 8006cf4: 37 81 00 10 addi r1,sp,16 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8006cf8: 34 63 ff ff addi r3,r3,-1 8006cfc: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8006d00: f8 00 01 35 calli 80071d4 8006d04: 2b 81 00 10 lw r1,(sp+16) 8006d08: 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) ) { 8006d0c: b9 60 08 00 mv r1,r11 8006d10: f8 00 01 79 calli 80072f4 8006d14: 5c 20 00 12 bne r1,r0,8006d5c 8006d18: 2d 63 00 34 lhu r3,(r11+52) 8006d1c: 5c 61 00 10 bne r3,r1,8006d5c /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8006d20: 78 01 08 01 mvhi r1,0x801 8006d24: 38 21 c1 10 ori r1,r1,0xc110 8006d28: 28 21 00 00 lw r1,(r1+0) 8006d2c: 29 82 00 00 lw r2,(r12+0) 8006d30: 28 24 00 04 lw r4,(r1+4) 8006d34: 5c 82 00 02 bne r4,r2,8006d3c rtems_filesystem_current.node_access = NULL; 8006d38: 58 23 00 04 sw (r1+4),r3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 8006d3c: 29 62 00 4c lw r2,(r11+76) 8006d40: 34 01 00 04 mvi r1,4 8006d44: 5c 41 00 04 bne r2,r1,8006d54 if ( the_jnode->info.sym_link.name ) 8006d48: 29 61 00 50 lw r1,(r11+80) 8006d4c: 44 20 00 02 be r1,r0,8006d54 free( (void*) the_jnode->info.sym_link.name ); 8006d50: f8 00 00 ac calli 8007000 } free( the_jnode ); 8006d54: b9 60 08 00 mv r1,r11 8006d58: f8 00 00 aa calli 8007000 } return 0; } 8006d5c: 34 01 00 00 mvi r1,0 8006d60: 2b 9d 00 04 lw ra,(sp+4) 8006d64: 2b 8b 00 0c lw r11,(sp+12) 8006d68: 2b 8c 00 08 lw r12,(sp+8) 8006d6c: 37 9c 00 14 addi sp,sp,20 8006d70: c3 a0 00 00 ret 08006d74 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8006d74: 37 9c ff f0 addi sp,sp,-16 8006d78: 5b 8b 00 10 sw (sp+16),r11 8006d7c: 5b 8c 00 0c sw (sp+12),r12 8006d80: 5b 8d 00 08 sw (sp+8),r13 8006d84: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8006d88: 28 2c 00 00 lw r12,(r1+0) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8006d8c: b8 40 58 00 mv r11,r2 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8006d90: 34 02 00 05 mvi r2,5 8006d94: 29 81 00 4c lw r1,(r12+76) 8006d98: 34 21 ff fe addi r1,r1,-2 8006d9c: 54 22 00 12 bgu r1,r2,8006de4 8006da0: 78 0d 08 01 mvhi r13,0x801 8006da4: 34 02 00 02 mvi r2,2 8006da8: fb ff e5 12 calli 80001f0 <__ashlsi3> 8006dac: 39 ad a6 00 ori r13,r13,0xa600 8006db0: b5 a1 08 00 add r1,r13,r1 8006db4: 28 21 00 00 lw r1,(r1+0) 8006db8: c0 20 00 00 b r1 case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8006dbc: 29 81 00 54 lw r1,(r12+84) 8006dc0: 29 82 00 50 lw r2,(r12+80) 8006dc4: 59 61 00 1c sw (r11+28),r1 8006dc8: 59 62 00 18 sw (r11+24),r2 break; 8006dcc: e0 00 00 0b bi 8006df8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8006dd0: 29 81 00 54 lw r1,(r12+84) 8006dd4: e0 00 00 02 bi 8006ddc case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8006dd8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006ddc: 59 61 00 20 sw (r11+32),r1 break; 8006de0: e0 00 00 06 bi 8006df8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8006de4: f8 00 10 46 calli 800aefc <__errno> <== NOT EXECUTED 8006de8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8006dec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006df0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006df4: e0 00 00 12 bi 8006e3c <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8006df8: 29 82 00 38 lw r2,(r12+56) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8006dfc: 2d 81 00 34 lhu r1,(r12+52) buf->st_ino = the_jnode->st_ino; 8006e00: 59 62 00 08 sw (r11+8),r2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8006e04: 29 82 00 30 lw r2,(r12+48) buf->st_nlink = the_jnode->st_nlink; 8006e08: 0d 61 00 10 sh (r11+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; 8006e0c: 29 81 00 40 lw r1,(r12+64) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8006e10: 59 62 00 0c sw (r11+12),r2 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8006e14: 2d 82 00 3c lhu r2,(r12+60) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 8006e18: 59 61 00 24 sw (r11+36),r1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8006e1c: 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; 8006e20: 0d 62 00 12 sh (r11+18),r2 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 8006e24: 29 82 00 44 lw r2,(r12+68) 8006e28: 59 62 00 2c sw (r11+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; 8006e2c: 2d 82 00 3e lhu r2,(r12+62) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8006e30: 29 8c 00 48 lw r12,(r12+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; 8006e34: 0d 62 00 14 sh (r11+20),r2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8006e38: 59 6c 00 34 sw (r11+52),r12 return 0; } 8006e3c: 2b 9d 00 04 lw ra,(sp+4) 8006e40: 2b 8b 00 10 lw r11,(sp+16) 8006e44: 2b 8c 00 0c lw r12,(sp+12) 8006e48: 2b 8d 00 08 lw r13,(sp+8) 8006e4c: 37 9c 00 10 addi sp,sp,16 8006e50: c3 a0 00 00 ret 08002208 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8002208: 37 9c ff ac addi sp,sp,-84 800220c: 5b 8b 00 14 sw (sp+20),r11 8002210: 5b 8c 00 10 sw (sp+16),r12 8002214: 5b 8d 00 0c sw (sp+12),r13 8002218: 5b 8e 00 08 sw (sp+8),r14 800221c: 5b 9d 00 04 sw (sp+4),ra 8002220: b8 20 68 00 mv r13,r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8002224: 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 ) { 8002228: b8 60 60 00 mv r12,r3 800222c: b8 40 70 00 mv r14,r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8002230: 37 8b 00 18 addi r11,sp,24 8002234: f8 00 41 6d calli 80127e8 8002238: b8 20 10 00 mv r2,r1 800223c: b9 60 18 00 mv r3,r11 8002240: 37 84 00 54 addi r4,sp,84 8002244: b9 80 08 00 mv r1,r12 8002248: f8 00 29 fa calli 800ca30 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 800224c: b9 c0 08 00 mv r1,r14 8002250: f8 00 41 43 calli 801275c 8002254: 5b 81 00 3c sw (sp+60),r1 if (info.sym_link.name == NULL) { 8002258: 44 20 00 0b be r1,r0,8002284 * 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( 800225c: 34 02 00 04 mvi r2,4 8002260: b9 a0 08 00 mv r1,r13 8002264: b9 60 18 00 mv r3,r11 8002268: 38 04 a1 ff mvu r4,0xa1ff 800226c: 37 85 00 3c addi r5,sp,60 8002270: f8 00 26 44 calli 800bb80 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 8002274: 34 02 00 00 mvi r2,0 8002278: 5c 22 00 07 bne r1,r2,8002294 free(info.sym_link.name); 800227c: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8002280: f8 00 01 c2 calli 8002988 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8002284: f8 00 3c a8 calli 8011524 <__errno> <== NOT EXECUTED 8002288: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 800228c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002290: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED } return 0; } 8002294: b8 40 08 00 mv r1,r2 8002298: 2b 9d 00 04 lw ra,(sp+4) 800229c: 2b 8b 00 14 lw r11,(sp+20) 80022a0: 2b 8c 00 10 lw r12,(sp+16) 80022a4: 2b 8d 00 0c lw r13,(sp+12) 80022a8: 2b 8e 00 08 lw r14,(sp+8) 80022ac: 37 9c 00 54 addi sp,sp,84 80022b0: c3 a0 00 00 ret 080022b4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 80022b4: 37 9c ff cc addi sp,sp,-52 80022b8: 5b 8b 00 18 sw (sp+24),r11 80022bc: 5b 8c 00 14 sw (sp+20),r12 80022c0: 5b 8d 00 10 sw (sp+16),r13 80022c4: 5b 8e 00 0c sw (sp+12),r14 80022c8: 5b 8f 00 08 sw (sp+8),r15 80022cc: 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; 80022d0: 28 4b 00 00 lw r11,(r2+0) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 80022d4: b8 20 70 00 mv r14,r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 80022d8: 34 01 00 03 mvi r1,3 80022dc: 29 63 00 4c lw r3,(r11+76) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 80022e0: b8 40 60 00 mv r12,r2 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 80022e4: 5c 61 00 23 bne r3,r1,8002370 if ( !node->info.hard_link.link_node ) 80022e8: 29 6f 00 50 lw r15,(r11+80) 80022ec: 5d e0 00 06 bne r15,r0,8002304 rtems_set_errno_and_return_minus_one( EINVAL ); 80022f0: f8 00 3c 8d calli 8011524 <__errno> <== NOT EXECUTED 80022f4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80022f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80022fc: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8002300: e0 00 00 22 bi 8002388 <== NOT EXECUTED the_link = *loc; 8002304: 37 8d 00 1c addi r13,sp,28 8002308: 34 03 00 14 mvi r3,20 800230c: b9 a0 08 00 mv r1,r13 8002310: f8 00 3f 2b calli 8011fbc the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 8002314: b9 a0 08 00 mv r1,r13 if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; 8002318: 5b 8f 00 1c sw (sp+28),r15 IMFS_Set_handlers( &the_link ); 800231c: f8 00 26 6e calli 800bcd4 /* * 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) 8002320: 29 61 00 50 lw r1,(r11+80) 8002324: 34 03 00 01 mvi r3,1 8002328: 2c 22 00 34 lhu r2,(r1+52) 800232c: 5c 43 00 09 bne r2,r3,8002350 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 8002330: 2b 83 00 24 lw r3,(sp+36) 8002334: b9 a0 10 00 mv r2,r13 8002338: b9 c0 08 00 mv r1,r14 800233c: 28 63 00 34 lw r3,(r3+52) 8002340: d8 60 00 00 call r3 if ( result != 0 ) 8002344: 34 03 ff ff mvi r3,-1 8002348: 44 20 00 0a be r1,r0,8002370 800234c: e0 00 00 0f bi 8002388 return -1; } else { node->info.hard_link.link_node->st_nlink --; 8002350: 34 42 ff ff addi r2,r2,-1 8002354: 0c 22 00 34 sh (r1+52),r2 IMFS_update_ctime( node->info.hard_link.link_node ); 8002358: 34 02 00 00 mvi r2,0 800235c: 37 81 00 30 addi r1,sp,48 8002360: f8 00 01 b8 calli 8002a40 8002364: 29 61 00 50 lw r1,(r11+80) 8002368: 2b 82 00 30 lw r2,(sp+48) 800236c: 58 22 00 48 sw (r1+72),r2 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 8002370: 29 83 00 08 lw r3,(r12+8) 8002374: b9 c0 08 00 mv r1,r14 8002378: b9 80 10 00 mv r2,r12 800237c: 28 63 00 34 lw r3,(r3+52) 8002380: d8 60 00 00 call r3 8002384: b8 20 18 00 mv r3,r1 return result; } 8002388: b8 60 08 00 mv r1,r3 800238c: 2b 9d 00 04 lw ra,(sp+4) 8002390: 2b 8b 00 18 lw r11,(sp+24) 8002394: 2b 8c 00 14 lw r12,(sp+20) 8002398: 2b 8d 00 10 lw r13,(sp+16) 800239c: 2b 8e 00 0c lw r14,(sp+12) 80023a0: 2b 8f 00 08 lw r15,(sp+8) 80023a4: 37 9c 00 34 addi sp,sp,52 80023a8: c3 a0 00 00 ret 080023ac : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 80023ac: 37 9c ff fc addi sp,sp,-4 80023b0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 80023b4: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 80023b8: 34 01 00 01 mvi r1,1 80023bc: 28 43 00 4c lw r3,(r2+76) 80023c0: 44 61 00 04 be r3,r1,80023d0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 80023c4: f8 00 3c 58 calli 8011524 <__errno> <== NOT EXECUTED 80023c8: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 80023cc: e0 00 00 06 bi 80023e4 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 80023d0: 28 43 00 5c lw r3,(r2+92) 80023d4: 34 01 00 00 mvi r1,0 80023d8: 5c 61 00 06 bne r3,r1,80023f0 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 80023dc: f8 00 3c 52 calli 8011524 <__errno> <== NOT EXECUTED 80023e0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80023e4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80023e8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80023ec: e0 00 00 02 bi 80023f4 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 80023f0: 58 41 00 5c sw (r2+92),r1 return 0; } 80023f4: 2b 9d 00 04 lw ra,(sp+4) 80023f8: 37 9c 00 04 addi sp,sp,4 80023fc: c3 a0 00 00 ret 08000f98 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 8000f98: 37 9c ff f0 addi sp,sp,-16 8000f9c: 5b 8b 00 10 sw (sp+16),r11 8000fa0: 5b 8c 00 0c sw (sp+12),r12 8000fa4: 5b 8d 00 08 sw (sp+8),r13 8000fa8: 5b 9d 00 04 sw (sp+4),ra #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 8000fac: 78 04 08 01 mvhi r4,0x801 8000fb0: 38 84 c6 10 ori r4,r4,0xc610 8000fb4: 28 84 00 00 lw r4,(r4+0) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 8000fb8: b8 20 58 00 mv r11,r1 8000fbc: b8 40 60 00 mv r12,r2 8000fc0: b8 60 68 00 mv r13,r3 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 8000fc4: 44 80 00 03 be r4,r0,8000fd0 (*rtems_malloc_statistics_helpers->initialize)(); 8000fc8: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8000fcc: d8 20 00 00 call r1 <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 8000fd0: f8 00 19 8b calli 80075fc /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 8000fd4: 78 01 08 01 mvhi r1,0x801 8000fd8: 38 21 c6 14 ori r1,r1,0xc614 8000fdc: 28 21 00 00 lw r1,(r1+0) 8000fe0: 44 20 00 08 be r1,r0,8001000 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 8000fe4: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED 8000fe8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8000fec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000ff0: d8 80 00 00 call r4 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 8000ff4: b5 6c 60 00 add r12,r11,r12 <== NOT EXECUTED 8000ff8: c9 81 60 00 sub r12,r12,r1 <== NOT EXECUTED 8000ffc: b8 20 58 00 mv r11,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 ( 8001000: 78 01 08 01 mvhi r1,0x801 8001004: 38 21 c6 0d ori r1,r1,0xc60d 8001008: 40 22 00 00 lbu r2,(r1+0) 800100c: 5c 40 00 08 bne r2,r0,800102c !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 8001010: 78 01 08 01 mvhi r1,0x801 8001014: 38 21 c0 c4 ori r1,r1,0xc0c4 8001018: 40 21 00 28 lbu r1,(r1+40) 800101c: 44 22 00 04 be r1,r2,800102c ) { memset( heap_begin, 0, heap_size ); 8001020: b9 60 08 00 mv r1,r11 8001024: b9 80 18 00 mv r3,r12 8001028: f8 00 2a b9 calli 800bb0c * 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 ) { 800102c: 78 01 08 01 mvhi r1,0x801 8001030: 38 21 c6 0d ori r1,r1,0xc60d 8001034: 40 2d 00 00 lbu r13,(r1+0) 8001038: 5d a0 00 0b bne r13,r0,8001064 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 800103c: 78 01 08 01 mvhi r1,0x801 8001040: 38 21 c0 1c ori r1,r1,0xc01c 8001044: 28 21 00 00 lw r1,(r1+0) 8001048: b9 60 10 00 mv r2,r11 800104c: b9 80 18 00 mv r3,r12 8001050: 34 04 00 08 mvi r4,8 8001054: f8 00 07 a5 calli 8002ee8 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 8001058: 5c 2d 00 03 bne r1,r13,8001064 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 800105c: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 8001060: f8 00 05 7f calli 800265c <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 8001064: 78 01 08 01 mvhi r1,0x801 8001068: 38 21 c0 1c ori r1,r1,0xc01c 800106c: 78 0b 08 01 mvhi r11,0x801 8001070: 39 6b c6 a8 ori r11,r11,0xc6a8 8001074: 28 21 00 00 lw r1,(r1+0) 8001078: 29 6c 00 00 lw r12,(r11+0) 800107c: f8 00 0b 03 calli 8003c88 <_Protected_heap_Get_size> 8001080: b4 2c 08 00 add r1,r1,r12 8001084: 59 61 00 00 sw (r11+0),r1 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 8001088: 2b 9d 00 04 lw ra,(sp+4) 800108c: 2b 8b 00 10 lw r11,(sp+16) 8001090: 2b 8c 00 0c lw r12,(sp+12) 8001094: 2b 8d 00 08 lw r13,(sp+8) 8001098: 37 9c 00 10 addi sp,sp,16 800109c: c3 a0 00 00 ret 080053d0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 80053d0: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 80053d4: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 80053d8: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 80053dc: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 80053e0: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 80053e4: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 80053e8: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 80053ec: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 80053f0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80053f4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 80053f8: 44 20 00 4f be r1,r0,8005534 <== NOT EXECUTED return; if ( !print_handler ) 80053fc: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005400: 38 21 c4 b0 ori r1,r1,0xc4b0 <== NOT EXECUTED 8005404: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED 8005408: 45 c0 00 4b be r14,r0,8005534 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 800540c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8005410: 5d 61 00 08 bne r11,r1,8005430 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 8005414: 78 0c 08 06 mvhi r12,0x806 <== NOT EXECUTED 8005418: 39 8c ee 88 ori r12,r12,0xee88 <== NOT EXECUTED 800541c: 29 81 00 04 lw r1,(r12+4) <== NOT EXECUTED 8005420: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8005424: b9 60 80 00 mv r16,r11 <== NOT EXECUTED 8005428: 5c 2b 00 04 bne r1,r11,8005438 <== NOT EXECUTED 800542c: e0 00 00 42 bi 8005534 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 8005430: 29 70 01 10 lw r16,(r11+272) <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 8005434: 35 6c 00 c0 addi r12,r11,192 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 8005438: 29 8f 00 04 lw r15,(r12+4) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 800543c: 29 8d 00 00 lw r13,(r12+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); 8005440: 35 ef 00 10 addi r15,r15,16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 8005444: 35 ad ff f0 addi r13,r13,-16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 8005448: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800544c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8005450: fb ff ff c8 calli 8005370 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 8005454: b5 ed 78 00 add r15,r15,r13 <== NOT EXECUTED 8005458: c9 e1 78 00 sub r15,r15,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 ) 800545c: 5c 20 00 02 bne r1,r0,8005464 <== NOT EXECUTED 8005460: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8005464: 78 04 08 06 mvhi r4,0x806 <== NOT EXECUTED 8005468: 38 84 c4 ac ori r4,r4,0xc4ac <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 800546c: 45 60 00 0e be r11,r0,80054a4 <== NOT EXECUTED (*print_handler)( 8005470: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 8005474: 28 91 00 00 lw r17,(r4+0) <== NOT EXECUTED 8005478: 37 83 00 24 addi r3,sp,36 <== NOT EXECUTED 800547c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005480: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005484: f8 00 11 be calli 8009b7c <== NOT EXECUTED 8005488: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800548c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8005490: 38 42 06 88 ori r2,r2,0x688 <== NOT EXECUTED 8005494: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005498: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800549c: d9 c0 00 00 call r14 <== NOT EXECUTED 80054a0: e0 00 00 06 bi 80054b8 <== 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 ); 80054a4: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 80054a8: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80054ac: 38 42 06 98 ori r2,r2,0x698 <== NOT EXECUTED 80054b0: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80054b4: d9 c0 00 00 call r14 <== NOT EXECUTED } (*print_handler)( 80054b8: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED 80054bc: 29 83 00 04 lw r3,(r12+4) <== NOT EXECUTED 80054c0: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 80054c4: 78 0c 08 06 mvhi r12,0x806 <== NOT EXECUTED 80054c8: 39 6b c4 b0 ori r11,r11,0xc4b0 <== NOT EXECUTED 80054cc: 39 8c c4 ac ori r12,r12,0xc4ac <== NOT EXECUTED 80054d0: 29 67 00 00 lw r7,(r11+0) <== NOT EXECUTED 80054d4: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80054d8: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 80054dc: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80054e0: 38 42 06 a8 ori r2,r2,0x6a8 <== NOT EXECUTED 80054e4: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED 80054e8: ba 00 28 00 mv r5,r16 <== NOT EXECUTED 80054ec: b9 a0 30 00 mv r6,r13 <== NOT EXECUTED 80054f0: d8 e0 00 00 call r7 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 80054f4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80054f8: 38 42 c4 a8 ori r2,r2,0xc4a8 <== NOT EXECUTED 80054fc: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8005500: 5c 20 00 07 bne r1,r0,800551c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 8005504: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 8005508: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800550c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005510: 38 42 06 c8 ori r2,r2,0x6c8 <== NOT EXECUTED 8005514: d8 60 00 00 call r3 <== NOT EXECUTED 8005518: e0 00 00 07 bi 8005534 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 800551c: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 8005520: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005524: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005528: 38 42 06 d8 ori r2,r2,0x6d8 <== NOT EXECUTED 800552c: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 8005530: d8 80 00 00 call r4 <== NOT EXECUTED } } 8005534: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8005538: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 800553c: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 8005540: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8005544: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8005548: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 800554c: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 8005550: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8005554: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 8005558: c3 a0 00 00 ret <== NOT EXECUTED 08005370 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 8005370: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8005374: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8005378: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 800537c: 34 2b 00 10 addi r11,r1,16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 8005380: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8005384: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005388: fb ff ef 94 calli 80011d8 <__lshrsi3> <== NOT EXECUTED 800538c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005390: fb ff ef 6a calli 8001138 <__ashlsi3> <== NOT EXECUTED if (*base != U32_PATTERN) 8005394: 78 02 a5 a5 mvhi r2,0xa5a5 <== 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++) 8005398: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED if (*base != U32_PATTERN) 800539c: 38 42 a5 a5 ori r2,r2,0xa5a5 <== 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++) 80053a0: e0 00 00 06 bi 80053b8 <== NOT EXECUTED if (*base != U32_PATTERN) 80053a4: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 80053a8: 44 62 00 03 be r3,r2,80053b4 <== NOT EXECUTED return (void *) base; 80053ac: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80053b0: e0 00 00 04 bi 80053c0 <== 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++) 80053b4: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED 80053b8: 54 2b ff fb bgu r1,r11,80053a4 <== NOT EXECUTED 80053bc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 80053c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80053c4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80053c8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80053cc: c3 a0 00 00 ret <== NOT EXECUTED 08005610 : * * 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) { 8005610: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8005614: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8005618: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 800561c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8005620: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005624: 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"); 8005628: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 800562c: 38 21 07 44 ori r1,r1,0x744 <== 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) { 8005630: 20 4d 00 ff andi r13,r2,0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 8005634: 29 6c 00 c4 lw r12,(r11+196) <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 8005638: f8 00 0c db calli 80089a4 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 800563c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005640: 38 21 07 54 ori r1,r1,0x754 <== NOT EXECUTED 8005644: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8005648: f8 00 0c d7 calli 80089a4 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 800564c: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED 8005650: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005654: 38 21 07 74 ori r1,r1,0x774 <== NOT EXECUTED 8005658: f8 00 0c d3 calli 80089a4 <== NOT EXECUTED printk( 800565c: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED 8005660: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005664: 38 21 07 88 ori r1,r1,0x788 <== NOT EXECUTED 8005668: f8 00 0c cf calli 80089a4 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 800566c: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 8005670: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 8005674: 34 02 00 20 mvi r2,32 <== NOT EXECUTED 8005678: f8 00 11 41 calli 8009b7c <== NOT EXECUTED 800567c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8005680: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005684: 38 21 07 9c ori r1,r1,0x79c <== NOT EXECUTED 8005688: f8 00 0c c7 calli 80089a4 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 800568c: 29 62 00 c0 lw r2,(r11+192) <== NOT EXECUTED 8005690: 29 63 00 c4 lw r3,(r11+196) <== NOT EXECUTED 8005694: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005698: 38 21 07 b4 ori r1,r1,0x7b4 <== NOT EXECUTED 800569c: b4 62 20 00 add r4,r3,r2 <== NOT EXECUTED 80056a0: f8 00 0c c1 calli 80089a4 <== 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) { 80056a4: 5d a0 00 07 bne r13,r0,80056c0 <== NOT EXECUTED printk( 80056a8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80056ac: 38 21 07 e8 ori r1,r1,0x7e8 <== NOT EXECUTED 80056b0: 35 84 00 18 addi r4,r12,24 <== NOT EXECUTED 80056b4: 34 02 00 10 mvi r2,16 <== NOT EXECUTED 80056b8: 35 83 00 08 addi r3,r12,8 <== NOT EXECUTED 80056bc: f8 00 0c ba calli 80089a4 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 80056c0: 34 01 00 81 mvi r1,129 <== NOT EXECUTED 80056c4: f8 00 13 a3 calli 800a550 <== NOT EXECUTED 08014994 <_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 ) { 8014994: 37 9c ff e4 addi sp,sp,-28 8014998: 5b 8b 00 1c sw (sp+28),r11 801499c: 5b 8c 00 18 sw (sp+24),r12 80149a0: 5b 8d 00 14 sw (sp+20),r13 80149a4: 5b 8e 00 10 sw (sp+16),r14 80149a8: 5b 8f 00 0c sw (sp+12),r15 80149ac: 5b 90 00 08 sw (sp+8),r16 80149b0: 5b 9d 00 04 sw (sp+4),ra 80149b4: b8 20 58 00 mv r11,r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80149b8: 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 ) { 80149bc: b8 60 70 00 mv r14,r3 80149c0: b8 40 80 00 mv r16,r2 80149c4: b8 c0 78 00 mv r15,r6 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 80149c8: 50 23 00 03 bgeu r1,r3,80149d4 <_CORE_message_queue_Broadcast+0x40> 80149cc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80149d0: e0 00 00 13 bi 8014a1c <_CORE_message_queue_Broadcast+0x88> <== NOT EXECUTED * 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 ) { 80149d4: 29 63 00 48 lw r3,(r11+72) 80149d8: 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))) { 80149dc: b8 60 68 00 mv r13,r3 * 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 ) { 80149e0: 44 61 00 08 be r3,r1,8014a00 <_CORE_message_queue_Broadcast+0x6c> *count = 0; 80149e4: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 80149e8: e0 00 00 0d bi 8014a1c <_CORE_message_queue_Broadcast+0x88> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 80149ec: 29 81 00 2c lw r1,(r12+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 80149f0: 35 ad 00 01 addi r13,r13,1 80149f4: f8 00 26 9f calli 801e470 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 80149f8: 29 81 00 28 lw r1,(r12+40) 80149fc: 58 2e 00 00 sw (r1+0),r14 * 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))) { 8014a00: b9 60 08 00 mv r1,r11 8014a04: f8 00 0b d3 calli 8017950 <_Thread_queue_Dequeue> 8014a08: b8 20 60 00 mv r12,r1 8014a0c: ba 00 10 00 mv r2,r16 8014a10: b9 c0 18 00 mv r3,r14 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 8014a14: 5c 20 ff f6 bne r1,r0,80149ec <_CORE_message_queue_Broadcast+0x58> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 8014a18: 59 ed 00 00 sw (r15+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 8014a1c: 2b 9d 00 04 lw ra,(sp+4) 8014a20: 2b 8b 00 1c lw r11,(sp+28) 8014a24: 2b 8c 00 18 lw r12,(sp+24) 8014a28: 2b 8d 00 14 lw r13,(sp+20) 8014a2c: 2b 8e 00 10 lw r14,(sp+16) 8014a30: 2b 8f 00 0c lw r15,(sp+12) 8014a34: 2b 90 00 08 lw r16,(sp+8) 8014a38: 37 9c 00 1c addi sp,sp,28 8014a3c: c3 a0 00 00 ret 08008104 <_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 ) { 8008104: 37 9c ff fc addi sp,sp,-4 8008108: 5b 9d 00 04 sw (sp+4),ra { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 800810c: 78 03 08 01 mvhi r3,0x801 8008110: 38 63 c8 e0 ori r3,r3,0xc8e0 8008114: 28 63 00 00 lw r3,(r3+0) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 8008118: 34 04 00 00 mvi r4,0 800811c: 58 64 00 34 sw (r3+52),r4 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 8008120: 28 25 00 50 lw r5,(r1+80) 8008124: 44 a4 00 34 be r5,r4,80081f4 <_CORE_mutex_Seize_interrupt_trylock+0xf0> the_mutex->lock = CORE_MUTEX_LOCKED; 8008128: 58 24 00 50 sw (r1+80),r4 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 800812c: 28 65 00 08 lw r5,(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; 8008130: 28 24 00 48 lw r4,(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; 8008134: 58 23 00 5c sw (r1+92),r3 the_mutex->holder_id = executing->Object.id; 8008138: 58 25 00 60 sw (r1+96),r5 the_mutex->nest_count = 1; 800813c: 34 05 00 01 mvi r5,1 8008140: 58 25 00 54 sw (r1+84),r5 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 8008144: 34 05 00 02 mvi r5,2 8008148: 44 85 00 03 be r4,r5,8008154 <_CORE_mutex_Seize_interrupt_trylock+0x50> 800814c: 34 05 00 03 mvi r5,3 8008150: 5c 85 00 06 bne r4,r5,8008168 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 8008154: 28 65 00 1c lw r5,(r3+28) 8008158: 34 a5 00 01 addi r5,r5,1 800815c: 58 65 00 1c sw (r3+28),r5 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 8008160: 34 05 00 03 mvi r5,3 8008164: 44 85 00 04 be r4,r5,8008174 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( *level_p ); 8008168: 28 41 00 00 lw r1,(r2+0) 800816c: d0 01 00 00 wcsr IE,r1 8008170: e0 00 00 2d bi 8008224 <_CORE_mutex_Seize_interrupt_trylock+0x120> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 8008174: 28 25 00 4c lw r5,(r1+76) current = executing->current_priority; 8008178: 28 64 00 14 lw r4,(r3+20) if ( current == ceiling ) { 800817c: 5c 85 00 04 bne r4,r5,800818c <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( *level_p ); 8008180: 28 41 00 00 lw r1,(r2+0) 8008184: d0 01 00 00 wcsr IE,r1 8008188: e0 00 00 27 bi 8008224 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } if ( current > ceiling ) { 800818c: 50 a4 00 0e bgeu r5,r4,80081c4 <_CORE_mutex_Seize_interrupt_trylock+0xc0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8008190: 78 03 08 01 mvhi r3,0x801 8008194: 38 63 c8 24 ori r3,r3,0xc824 8008198: 28 64 00 00 lw r4,(r3+0) 800819c: 34 84 00 01 addi r4,r4,1 80081a0: 58 64 00 00 sw (r3+0),r4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 80081a4: 28 42 00 00 lw r2,(r2+0) 80081a8: d0 02 00 00 wcsr IE,r2 _Thread_Change_priority( 80081ac: 28 22 00 4c lw r2,(r1+76) 80081b0: 28 21 00 5c lw r1,(r1+92) 80081b4: 34 03 00 00 mvi r3,0 80081b8: fb ff ee b6 calli 8003c90 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 80081bc: fb ff f0 26 calli 8004254 <_Thread_Enable_dispatch> 80081c0: e0 00 00 19 bi 8008224 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 80081c4: 34 04 00 06 mvi r4,6 80081c8: 58 64 00 34 sw (r3+52),r4 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 80081cc: 34 04 00 00 mvi r4,0 80081d0: 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; 80081d4: 34 04 00 01 mvi r4,1 80081d8: 58 24 00 50 sw (r1+80),r4 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 80081dc: 28 61 00 1c lw r1,(r3+28) 80081e0: 34 21 ff ff addi r1,r1,-1 80081e4: 58 61 00 1c sw (r3+28),r1 _ISR_Enable( *level_p ); 80081e8: 28 41 00 00 lw r1,(r2+0) 80081ec: d0 01 00 00 wcsr IE,r1 80081f0: e0 00 00 0d bi 8008224 <_CORE_mutex_Seize_interrupt_trylock+0x120> /* * 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 ) ) { 80081f4: 28 24 00 5c lw r4,(r1+92) 80081f8: 5c 83 00 12 bne r4,r3,8008240 <_CORE_mutex_Seize_interrupt_trylock+0x13c> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 80081fc: 28 23 00 40 lw r3,(r1+64) 8008200: 44 60 00 04 be r3,r0,8008210 <_CORE_mutex_Seize_interrupt_trylock+0x10c> 8008204: 34 01 00 01 mvi r1,1 8008208: 5c 61 00 0e bne r3,r1,8008240 <_CORE_mutex_Seize_interrupt_trylock+0x13c> 800820c: e0 00 00 08 bi 800822c <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 8008210: 28 23 00 54 lw r3,(r1+84) 8008214: 34 63 00 01 addi r3,r3,1 8008218: 58 23 00 54 sw (r1+84),r3 _ISR_Enable( *level_p ); 800821c: 28 41 00 00 lw r1,(r2+0) 8008220: d0 01 00 00 wcsr IE,r1 8008224: 34 01 00 00 mvi r1,0 8008228: e0 00 00 07 bi 8008244 <_CORE_mutex_Seize_interrupt_trylock+0x140> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 800822c: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8008230: 58 81 00 34 sw (r4+52),r1 <== NOT EXECUTED _ISR_Enable( *level_p ); 8008234: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8008238: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 800823c: e3 ff ff fa bi 8008224 <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED 8008240: 34 01 00 01 mvi r1,1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 8008244: 2b 9d 00 04 lw ra,(sp+4) 8008248: 37 9c 00 04 addi sp,sp,4 800824c: c3 a0 00 00 ret 08008268 <_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 ) { 8008268: 37 9c ff f8 addi sp,sp,-8 800826c: 5b 8b 00 08 sw (sp+8),r11 8008270: 5b 9d 00 04 sw (sp+4),ra 8008274: 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)) ) { 8008278: fb ff f1 06 calli 8004690 <_Thread_queue_Dequeue> 800827c: 34 02 00 00 mvi r2,0 8008280: 5c 22 00 0e bne r1,r2,80082b8 <_CORE_semaphore_Surrender+0x50> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 8008284: 90 00 08 00 rcsr r1,IE 8008288: 34 02 ff fe mvi r2,-2 800828c: a0 22 10 00 and r2,r1,r2 8008290: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8008294: 29 62 00 48 lw r2,(r11+72) 8008298: 29 63 00 40 lw r3,(r11+64) 800829c: 54 62 00 03 bgu r3,r2,80082a8 <_CORE_semaphore_Surrender+0x40> 80082a0: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 80082a4: e0 00 00 04 bi 80082b4 <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED the_semaphore->count += 1; 80082a8: 34 42 00 01 addi r2,r2,1 80082ac: 59 62 00 48 sw (r11+72),r2 80082b0: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 80082b4: d0 01 00 00 wcsr IE,r1 } return status; } 80082b8: b8 40 08 00 mv r1,r2 80082bc: 2b 9d 00 04 lw ra,(sp+4) 80082c0: 2b 8b 00 08 lw r11,(sp+8) 80082c4: 37 9c 00 08 addi sp,sp,8 80082c8: c3 a0 00 00 ret 0800d988 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800d988: 37 9c ff f8 addi sp,sp,-8 800d98c: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800d990: 37 82 00 08 addi r2,sp,8 800d994: fb ff e3 6f calli 8006750 <_Thread_Get> switch ( location ) { 800d998: 2b 82 00 08 lw r2,(sp+8) 800d99c: 5c 40 00 1d bne r2,r0,800da10 <_Event_Timeout+0x88> * * 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 ); 800d9a0: 90 00 18 00 rcsr r3,IE 800d9a4: 34 02 ff fe mvi r2,-2 800d9a8: a0 62 10 00 and r2,r3,r2 800d9ac: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800d9b0: 78 02 08 02 mvhi r2,0x802 800d9b4: 38 42 39 70 ori r2,r2,0x3970 800d9b8: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800d9bc: 34 04 00 00 mvi r4,0 800d9c0: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800d9c4: 5c 22 00 08 bne r1,r2,800d9e4 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800d9c8: 78 02 08 02 mvhi r2,0x802 800d9cc: 38 42 3b b0 ori r2,r2,0x3bb0 800d9d0: 28 45 00 00 lw r5,(r2+0) 800d9d4: 34 04 00 01 mvi r4,1 800d9d8: 5c a4 00 03 bne r5,r4,800d9e4 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800d9dc: 34 04 00 02 mvi r4,2 <== NOT EXECUTED 800d9e0: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800d9e4: 34 02 00 06 mvi r2,6 800d9e8: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800d9ec: d0 03 00 00 wcsr IE,r3 800d9f0: 78 02 10 03 mvhi r2,0x1003 800d9f4: 38 42 ff f8 ori r2,r2,0xfff8 800d9f8: f8 00 05 3d calli 800eeec <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800d9fc: 78 01 08 02 mvhi r1,0x802 800da00: 38 21 38 b4 ori r1,r1,0x38b4 800da04: 28 22 00 00 lw r2,(r1+0) 800da08: 34 42 ff ff addi r2,r2,-1 800da0c: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800da10: 2b 9d 00 04 lw ra,(sp+4) 800da14: 37 9c 00 08 addi sp,sp,8 800da18: c3 a0 00 00 ret 0800e320 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e320: 37 9c ff e8 addi sp,sp,-24 800e324: 5b 8b 00 18 sw (sp+24),r11 800e328: 5b 8c 00 14 sw (sp+20),r12 800e32c: 5b 8d 00 10 sw (sp+16),r13 800e330: 5b 8e 00 0c sw (sp+12),r14 800e334: 5b 8f 00 08 sw (sp+8),r15 800e338: 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; 800e33c: 28 2d 00 18 lw r13,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800e340: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e344: 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; 800e348: f0 4d 68 00 cmpgeu r13,r2,r13 * 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 ) { 800e34c: f4 a2 08 00 cmpgu r1,r5,r2 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e350: b8 80 78 00 mv r15,r4 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; 800e354: a0 2d 68 00 and r13,r1,r13 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; 800e358: 29 6c 00 24 lw r12,(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; 800e35c: 34 01 00 01 mvi r1,1 800e360: 5d a0 00 26 bne r13,r0,800e3f8 <_Heap_Extend+0xd8> * 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 ) { 800e364: 34 01 00 02 mvi r1,2 800e368: 5c 45 00 24 bne r2,r5,800e3f8 <_Heap_Extend+0xd8> { 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; 800e36c: b4 62 18 00 add r3,r3,r2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 800e370: c8 6c 70 00 sub r14,r3,r12 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 800e374: 29 62 00 10 lw r2,(r11+16) 800e378: 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; 800e37c: 59 63 00 1c sw (r11+28),r3 800e380: b9 c0 08 00 mv r1,r14 800e384: fb ff d7 ed calli 8004338 <__umodsi3> 800e388: c9 c1 08 00 sub r1,r14,r1 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; 800e38c: 59 e1 00 00 sw (r15+0),r1 if( extend_size >= heap->min_block_size ) { 800e390: 29 62 00 14 lw r2,(r11+20) 800e394: 50 22 00 02 bgeu r1,r2,800e39c <_Heap_Extend+0x7c> 800e398: e0 00 00 17 bi 800e3f4 <_Heap_Extend+0xd4> <== NOT EXECUTED uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800e39c: 29 84 00 04 lw r4,(r12+4) 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 = 800e3a0: 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); 800e3a4: b4 2c 10 00 add r2,r1,r12 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800e3a8: 20 84 00 01 andi r4,r4,0x1 800e3ac: b8 24 20 00 or r4,r1,r4 800e3b0: c8 62 18 00 sub r3,r3,r2 800e3b4: 59 84 00 04 sw (r12+4),r4 800e3b8: 38 63 00 01 ori r3,r3,0x1 800e3bc: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800e3c0: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800e3c4: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800e3c8: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800e3cc: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800e3d0: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800e3d4: 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; 800e3d8: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800e3dc: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800e3e0: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800e3e4: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800e3e8: b9 60 08 00 mv r1,r11 800e3ec: 35 82 00 08 addi r2,r12,8 800e3f0: fb ff e7 af calli 80082ac <_Heap_Free> 800e3f4: b9 a0 08 00 mv r1,r13 } return HEAP_EXTEND_SUCCESSFUL; } 800e3f8: 2b 9d 00 04 lw ra,(sp+4) 800e3fc: 2b 8b 00 18 lw r11,(sp+24) 800e400: 2b 8c 00 14 lw r12,(sp+20) 800e404: 2b 8d 00 10 lw r13,(sp+16) 800e408: 2b 8e 00 0c lw r14,(sp+12) 800e40c: 2b 8f 00 08 lw r15,(sp+8) 800e410: 37 9c 00 18 addi sp,sp,24 800e414: c3 a0 00 00 ret 08008614 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 8008614: 37 9c ff f4 addi sp,sp,-12 8008618: 5b 8b 00 0c sw (sp+12),r11 800861c: 5b 8c 00 08 sw (sp+8),r12 8008620: 5b 9d 00 04 sw (sp+4),ra 8008624: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8008628: 28 22 00 10 lw r2,(r1+16) 800862c: b8 20 58 00 mv r11,r1 8008630: b8 60 08 00 mv r1,r3 8008634: 34 6c ff f8 addi r12,r3,-8 8008638: f8 00 42 a5 calli 80190cc <__umodsi3> 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; 800863c: 29 66 00 20 lw r6,(r11+32) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8008640: c9 81 08 00 sub r1,r12,r1 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 8008644: 50 26 00 03 bgeu r1,r6,8008650 <_Heap_Free+0x3c> 8008648: 34 02 00 00 mvi r2,0 800864c: e0 00 00 03 bi 8008658 <_Heap_Free+0x44> 8008650: 29 62 00 24 lw r2,(r11+36) 8008654: f0 41 10 00 cmpgeu r2,r2,r1 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 8008658: 44 40 00 66 be r2,r0,80087f0 <_Heap_Free+0x1dc> - 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; 800865c: 28 25 00 04 lw r5,(r1+4) 8008660: 34 02 ff fe mvi r2,-2 8008664: a0 a2 10 00 and r2,r5,r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8008668: b4 22 18 00 add r3,r1,r2 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 800866c: 50 66 00 03 bgeu r3,r6,8008678 <_Heap_Free+0x64> 8008670: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8008674: e0 00 00 03 bi 8008680 <_Heap_Free+0x6c> <== NOT EXECUTED 8008678: 29 64 00 24 lw r4,(r11+36) 800867c: f0 83 20 00 cmpgeu r4,r4,r3 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8008680: 44 80 00 5c be r4,r0,80087f0 <_Heap_Free+0x1dc> 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; 8008684: 28 64 00 04 lw r4,(r3+4) _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 8008688: 20 87 00 01 andi r7,r4,0x1 800868c: 44 e0 00 59 be r7,r0,80087f0 <_Heap_Free+0x1dc> return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 8008690: 29 68 00 24 lw r8,(r11+36) - 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; 8008694: 34 07 ff fe mvi r7,-2 8008698: a0 87 20 00 and r4,r4,r7 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 800869c: 34 07 00 00 mvi r7,0 80086a0: 45 03 00 05 be r8,r3,80086b4 <_Heap_Free+0xa0> 80086a4: b4 64 38 00 add r7,r3,r4 80086a8: 28 e7 00 04 lw r7,(r7+4) 80086ac: 20 e7 00 01 andi r7,r7,0x1 80086b0: 18 e7 00 01 xori r7,r7,0x1 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 80086b4: 20 a5 00 01 andi r5,r5,0x1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 80086b8: 20 e7 00 ff andi r7,r7,0xff && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 80086bc: 5c a0 00 23 bne r5,r0,8008748 <_Heap_Free+0x134> uintptr_t const prev_size = block->prev_size; 80086c0: 28 25 00 00 lw r5,(r1+0) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80086c4: c8 25 08 00 sub r1,r1,r5 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 80086c8: f0 26 30 00 cmpgeu r6,r1,r6 80086cc: f1 01 40 00 cmpgeu r8,r8,r1 80086d0: c8 06 30 00 sub r6,r0,r6 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 80086d4: a1 06 40 00 and r8,r8,r6 80086d8: 45 00 00 46 be r8,r0,80087f0 <_Heap_Free+0x1dc> return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 80086dc: 28 26 00 04 lw r6,(r1+4) 80086e0: 20 c6 00 01 andi r6,r6,0x1 80086e4: 44 c0 00 43 be r6,r0,80087f0 <_Heap_Free+0x1dc> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 80086e8: 44 e0 00 0f be r7,r0,8008724 <_Heap_Free+0x110> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 80086ec: 29 68 00 38 lw r8,(r11+56) } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 80086f0: 28 66 00 0c lw r6,(r3+12) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 80086f4: 28 67 00 08 lw r7,(r3+8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 80086f8: b4 44 20 00 add r4,r2,r4 80086fc: b4 85 28 00 add r5,r4,r5 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 8008700: 35 03 ff ff addi r3,r8,-1 8008704: 59 63 00 38 sw (r11+56),r3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 8008708: b4 25 20 00 add r4,r1,r5 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 800870c: 38 a3 00 01 ori r3,r5,0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8008710: 58 e6 00 0c sw (r7+12),r6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 8008714: 58 85 00 00 sw (r4+0),r5 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8008718: 58 23 00 04 sw (r1+4),r3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 800871c: 58 c7 00 08 sw (r6+8),r7 8008720: e0 00 00 29 bi 80087c4 <_Heap_Free+0x1b0> next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 8008724: b4 45 28 00 add r5,r2,r5 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8008728: 38 a4 00 01 ori r4,r5,0x1 800872c: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8008730: 28 64 00 04 lw r4,(r3+4) 8008734: 34 01 ff fe mvi r1,-2 next_block->prev_size = size; 8008738: 58 65 00 00 sw (r3+0),r5 _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 800873c: a0 81 08 00 and r1,r4,r1 8008740: 58 61 00 04 sw (r3+4),r1 8008744: e0 00 00 20 bi 80087c4 <_Heap_Free+0x1b0> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 8008748: 44 e0 00 0d be r7,r0,800877c <_Heap_Free+0x168> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 800874c: 28 65 00 0c lw r5,(r3+12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 8008750: 28 66 00 08 lw r6,(r3+8) uintptr_t const size = block_size + next_block_size; 8008754: b4 82 18 00 add r3,r4,r2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 8008758: 58 25 00 0c sw (r1+12),r5 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 800875c: 58 26 00 08 sw (r1+8),r6 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 8008760: b4 23 38 00 add r7,r1,r3 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8008764: 38 64 00 01 ori r4,r3,0x1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 8008768: 58 e3 00 00 sw (r7+0),r3 new_block->prev = prev; next->prev = new_block; 800876c: 58 c1 00 0c sw (r6+12),r1 prev->next = new_block; 8008770: 58 a1 00 08 sw (r5+8),r1 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8008774: 58 24 00 04 sw (r1+4),r4 8008778: e0 00 00 13 bi 80087c4 <_Heap_Free+0x1b0> next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 800877c: 38 44 00 01 ori r4,r2,0x1 8008780: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8008784: 28 65 00 04 lw r5,(r3+4) 8008788: 34 04 ff fe mvi r4,-2 next_block->prev_size = block_size; 800878c: 58 62 00 00 sw (r3+0),r2 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8008790: a0 a4 20 00 and r4,r5,r4 8008794: 58 64 00 04 sw (r3+4),r4 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 8008798: 29 63 00 38 lw r3,(r11+56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 800879c: 29 64 00 08 lw r4,(r11+8) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 80087a0: 29 65 00 3c lw r5,(r11+60) new_block->next = next; new_block->prev = block_before; 80087a4: 58 2b 00 0c sw (r1+12),r11 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 80087a8: 58 24 00 08 sw (r1+8),r4 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 80087ac: 34 63 00 01 addi r3,r3,1 new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 80087b0: 58 81 00 0c sw (r4+12),r1 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 80087b4: 59 61 00 08 sw (r11+8),r1 80087b8: 59 63 00 38 sw (r11+56),r3 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 80087bc: 50 a3 00 02 bgeu r5,r3,80087c4 <_Heap_Free+0x1b0> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 80087c0: 59 63 00 3c sw (r11+60),r3 } } /* Statistics */ --stats->used_blocks; 80087c4: 29 63 00 40 lw r3,(r11+64) ++stats->frees; 80087c8: 29 61 00 50 lw r1,(r11+80) stats->free_size += block_size; 80087cc: 29 64 00 30 lw r4,(r11+48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 80087d0: 34 63 ff ff addi r3,r3,-1 ++stats->frees; 80087d4: 34 21 00 01 addi r1,r1,1 stats->free_size += block_size; 80087d8: b4 82 10 00 add r2,r4,r2 } } /* Statistics */ --stats->used_blocks; ++stats->frees; 80087dc: 59 61 00 50 sw (r11+80),r1 stats->free_size += block_size; 80087e0: 59 62 00 30 sw (r11+48),r2 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 80087e4: 59 63 00 40 sw (r11+64),r3 ++stats->frees; stats->free_size += block_size; 80087e8: 34 01 00 01 mvi r1,1 return( true ); 80087ec: e0 00 00 02 bi 80087f4 <_Heap_Free+0x1e0> 80087f0: 34 01 00 00 mvi r1,0 } 80087f4: 2b 9d 00 04 lw ra,(sp+4) 80087f8: 2b 8b 00 0c lw r11,(sp+12) 80087fc: 2b 8c 00 08 lw r12,(sp+8) 8008800: 37 9c 00 0c addi sp,sp,12 8008804: c3 a0 00 00 ret 08019c68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 8019c68: 37 9c ff f0 addi sp,sp,-16 8019c6c: 5b 8b 00 10 sw (sp+16),r11 8019c70: 5b 8c 00 0c sw (sp+12),r12 8019c74: 5b 8d 00 08 sw (sp+8),r13 8019c78: 5b 9d 00 04 sw (sp+4),ra 8019c7c: b8 40 60 00 mv r12,r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8019c80: 28 22 00 10 lw r2,(r1+16) 8019c84: b8 20 58 00 mv r11,r1 8019c88: b9 80 08 00 mv r1,r12 8019c8c: b8 60 68 00 mv r13,r3 8019c90: fb ff fd 0f calli 80190cc <__umodsi3> 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; 8019c94: 29 62 00 20 lw r2,(r11+32) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 8019c98: 35 84 ff f8 addi r4,r12,-8 8019c9c: c8 81 20 00 sub r4,r4,r1 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 8019ca0: 50 82 00 03 bgeu r4,r2,8019cac <_Heap_Size_of_alloc_area+0x44> 8019ca4: 34 01 00 00 mvi r1,0 8019ca8: e0 00 00 03 bi 8019cb4 <_Heap_Size_of_alloc_area+0x4c> 8019cac: 29 61 00 24 lw r1,(r11+36) 8019cb0: f0 24 08 00 cmpgeu r1,r1,r4 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 8019cb4: 44 20 00 13 be r1,r0,8019d00 <_Heap_Size_of_alloc_area+0x98> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8019cb8: 28 83 00 04 lw r3,(r4+4) 8019cbc: 34 01 ff fe mvi r1,-2 8019cc0: a0 61 08 00 and r1,r3,r1 8019cc4: b4 81 20 00 add r4,r4,r1 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 8019cc8: 50 82 00 03 bgeu r4,r2,8019cd4 <_Heap_Size_of_alloc_area+0x6c> 8019ccc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8019cd0: e0 00 00 03 bi 8019cdc <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED 8019cd4: 29 61 00 24 lw r1,(r11+36) 8019cd8: f0 24 08 00 cmpgeu r1,r1,r4 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 8019cdc: 44 20 00 09 be r1,r0,8019d00 <_Heap_Size_of_alloc_area+0x98> 8019ce0: 28 81 00 04 lw r1,(r4+4) 8019ce4: 20 21 00 01 andi r1,r1,0x1 8019ce8: 44 20 00 06 be r1,r0,8019d00 <_Heap_Size_of_alloc_area+0x98> || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 8019cec: c8 8c 20 00 sub r4,r4,r12 8019cf0: 34 84 00 04 addi r4,r4,4 8019cf4: 59 a4 00 00 sw (r13+0),r4 8019cf8: 34 01 00 01 mvi r1,1 return true; 8019cfc: e0 00 00 02 bi 8019d04 <_Heap_Size_of_alloc_area+0x9c> 8019d00: 34 01 00 00 mvi r1,0 } 8019d04: 2b 9d 00 04 lw ra,(sp+4) 8019d08: 2b 8b 00 10 lw r11,(sp+16) 8019d0c: 2b 8c 00 0c lw r12,(sp+12) 8019d10: 2b 8d 00 08 lw r13,(sp+8) 8019d14: 37 9c 00 10 addi sp,sp,16 8019d18: c3 a0 00 00 ret 08003ba8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003ba8: 37 9c ff ac addi sp,sp,-84 8003bac: 5b 8b 00 50 sw (sp+80),r11 8003bb0: 5b 8c 00 4c sw (sp+76),r12 8003bb4: 5b 8d 00 48 sw (sp+72),r13 8003bb8: 5b 8e 00 44 sw (sp+68),r14 8003bbc: 5b 8f 00 40 sw (sp+64),r15 8003bc0: 5b 90 00 3c sw (sp+60),r16 8003bc4: 5b 91 00 38 sw (sp+56),r17 8003bc8: 5b 92 00 34 sw (sp+52),r18 8003bcc: 5b 93 00 30 sw (sp+48),r19 8003bd0: 5b 94 00 2c sw (sp+44),r20 8003bd4: 5b 95 00 28 sw (sp+40),r21 8003bd8: 5b 96 00 24 sw (sp+36),r22 8003bdc: 5b 97 00 20 sw (sp+32),r23 8003be0: 5b 98 00 1c sw (sp+28),r24 8003be4: 5b 99 00 18 sw (sp+24),r25 8003be8: 5b 9b 00 14 sw (sp+20),fp 8003bec: 5b 9d 00 10 sw (sp+16),ra 8003bf0: 20 63 00 ff andi r3,r3,0xff 8003bf4: b8 20 68 00 mv r13,r1 8003bf8: b8 40 70 00 mv r14,r2 uintptr_t const page_size = heap->page_size; 8003bfc: 28 2f 00 10 lw r15,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003c00: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003c04: 28 32 00 24 lw r18,(r1+36) Heap_Block *block = heap->first_block; 8003c08: 28 2b 00 20 lw r11,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003c0c: 5c 60 00 04 bne r3,r0,8003c1c <_Heap_Walk+0x74> 8003c10: 78 0c 08 00 mvhi r12,0x800 8003c14: 39 8c 3b 84 ori r12,r12,0x3b84 8003c18: e0 00 00 03 bi 8003c24 <_Heap_Walk+0x7c> 8003c1c: 78 0c 08 00 mvhi r12,0x800 8003c20: 39 8c 40 d4 ori r12,r12,0x40d4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003c24: 78 02 08 01 mvhi r2,0x801 8003c28: 38 42 ea 08 ori r2,r2,0xea08 8003c2c: 28 42 00 00 lw r2,(r2+0) 8003c30: 34 01 00 03 mvi r1,3 8003c34: 5c 41 01 0c bne r2,r1,8004064 <_Heap_Walk+0x4bc> 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)( 8003c38: 29 a1 00 08 lw r1,(r13+8) 8003c3c: 29 a6 00 18 lw r6,(r13+24) 8003c40: 29 a7 00 1c lw r7,(r13+28) 8003c44: 5b 81 00 08 sw (sp+8),r1 8003c48: 29 a1 00 0c lw r1,(r13+12) 8003c4c: 78 03 08 01 mvhi r3,0x801 8003c50: 5b 92 00 04 sw (sp+4),r18 8003c54: 5b 81 00 0c sw (sp+12),r1 8003c58: 38 63 b4 e4 ori r3,r3,0xb4e4 8003c5c: b9 c0 08 00 mv r1,r14 8003c60: 34 02 00 00 mvi r2,0 8003c64: b9 e0 20 00 mv r4,r15 8003c68: ba 60 28 00 mv r5,r19 8003c6c: b9 60 40 00 mv r8,r11 8003c70: d9 80 00 00 call r12 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8003c74: 5d e0 00 05 bne r15,r0,8003c88 <_Heap_Walk+0xe0> (*printer)( source, true, "page size is zero\n" ); 8003c78: 78 03 08 01 mvhi r3,0x801 8003c7c: b9 c0 08 00 mv r1,r14 8003c80: 38 63 b5 78 ori r3,r3,0xb578 8003c84: e0 00 00 3b bi 8003d70 <_Heap_Walk+0x1c8> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8003c88: 21 f0 00 07 andi r16,r15,0x7 8003c8c: 46 00 00 06 be r16,r0,8003ca4 <_Heap_Walk+0xfc> (*printer)( 8003c90: 78 03 08 01 mvhi r3,0x801 8003c94: b9 c0 08 00 mv r1,r14 8003c98: 38 63 b5 8c ori r3,r3,0xb58c 8003c9c: b9 e0 20 00 mv r4,r15 8003ca0: e0 00 01 09 bi 80040c4 <_Heap_Walk+0x51c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8003ca4: ba 60 08 00 mv r1,r19 8003ca8: b9 e0 10 00 mv r2,r15 8003cac: fb ff f4 05 calli 8000cc0 <__umodsi3> 8003cb0: b8 20 88 00 mv r17,r1 8003cb4: 44 30 00 08 be r1,r16,8003cd4 <_Heap_Walk+0x12c> (*printer)( 8003cb8: 78 03 08 01 mvhi r3,0x801 8003cbc: b9 c0 08 00 mv r1,r14 8003cc0: 38 63 b5 ac ori r3,r3,0xb5ac 8003cc4: ba 60 20 00 mv r4,r19 8003cc8: 34 02 00 01 mvi r2,1 8003ccc: d9 80 00 00 call r12 8003cd0: e0 00 00 5a bi 8003e38 <_Heap_Walk+0x290> ); return false; } if ( 8003cd4: 35 61 00 08 addi r1,r11,8 8003cd8: b9 e0 10 00 mv r2,r15 8003cdc: fb ff f3 f9 calli 8000cc0 <__umodsi3> 8003ce0: b8 20 80 00 mv r16,r1 8003ce4: 44 31 00 08 be r1,r17,8003d04 <_Heap_Walk+0x15c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 8003ce8: 78 03 08 01 mvhi r3,0x801 8003cec: b9 c0 08 00 mv r1,r14 8003cf0: 38 63 b5 d0 ori r3,r3,0xb5d0 8003cf4: b9 60 20 00 mv r4,r11 8003cf8: 34 02 00 01 mvi r2,1 8003cfc: d9 80 00 00 call r12 8003d00: e0 00 00 92 bi 8003f48 <_Heap_Walk+0x3a0> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8003d04: 29 71 00 04 lw r17,(r11+4) 8003d08: 22 31 00 01 andi r17,r17,0x1 8003d0c: 5e 21 00 07 bne r17,r1,8003d28 <_Heap_Walk+0x180> (*printer)( 8003d10: 78 03 08 01 mvhi r3,0x801 8003d14: b9 c0 08 00 mv r1,r14 8003d18: 38 63 b6 04 ori r3,r3,0xb604 8003d1c: 34 02 00 01 mvi r2,1 8003d20: d9 80 00 00 call r12 8003d24: e0 00 00 89 bi 8003f48 <_Heap_Walk+0x3a0> ); return false; } if ( first_block->prev_size != page_size ) { 8003d28: 29 79 00 00 lw r25,(r11+0) 8003d2c: 47 2f 00 07 be r25,r15,8003d48 <_Heap_Walk+0x1a0> (*printer)( 8003d30: 78 03 08 01 mvhi r3,0x801 8003d34: b9 c0 08 00 mv r1,r14 8003d38: 38 63 b6 34 ori r3,r3,0xb634 8003d3c: bb 20 20 00 mv r4,r25 8003d40: b9 e0 28 00 mv r5,r15 8003d44: e0 00 00 3b bi 8003e30 <_Heap_Walk+0x288> ); return false; } if ( _Heap_Is_free( last_block ) ) { 8003d48: 2a 41 00 04 lw r1,(r18+4) 8003d4c: 34 02 ff fe mvi r2,-2 8003d50: a0 22 08 00 and r1,r1,r2 8003d54: b6 41 08 00 add r1,r18,r1 8003d58: 28 2f 00 04 lw r15,(r1+4) 8003d5c: 21 ef 00 01 andi r15,r15,0x1 8003d60: 5d f0 00 07 bne r15,r16,8003d7c <_Heap_Walk+0x1d4> (*printer)( 8003d64: 78 03 08 01 mvhi r3,0x801 8003d68: b9 c0 08 00 mv r1,r14 8003d6c: 38 63 b6 60 ori r3,r3,0xb660 8003d70: 34 02 00 01 mvi r2,1 8003d74: d9 80 00 00 call r12 8003d78: e0 00 00 a5 bi 800400c <_Heap_Walk+0x464> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003d7c: 29 a4 00 08 lw r4,(r13+8) ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003d80: b8 40 a8 00 mv r21,r2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 8003d84: 29 b4 00 10 lw r20,(r13+16) 8003d88: b9 a0 88 00 mv r17,r13 8003d8c: b8 80 b0 00 mv r22,r4 8003d90: e0 00 00 2e bi 8003e48 <_Heap_Walk+0x2a0> 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 8003d94: 29 a1 00 20 lw r1,(r13+32) 8003d98: 34 0f 00 00 mvi r15,0 8003d9c: 52 c1 00 02 bgeu r22,r1,8003da4 <_Heap_Walk+0x1fc> 8003da0: e0 00 00 03 bi 8003dac <_Heap_Walk+0x204> 8003da4: 29 af 00 24 lw r15,(r13+36) 8003da8: f1 f6 78 00 cmpgeu r15,r15,r22 ); return false; } if ( 8003dac: 36 c1 00 08 addi r1,r22,8 8003db0: ba 80 10 00 mv r2,r20 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 8003db4: 5d e0 00 06 bne r15,r0,8003dcc <_Heap_Walk+0x224> (*printer)( 8003db8: 78 03 08 01 mvhi r3,0x801 8003dbc: ba c0 20 00 mv r4,r22 8003dc0: b9 c0 08 00 mv r1,r14 8003dc4: 38 63 b6 78 ori r3,r3,0xb678 8003dc8: e0 00 00 8f bi 8004004 <_Heap_Walk+0x45c> ); return false; } if ( 8003dcc: fb ff f3 bd calli 8000cc0 <__umodsi3> 8003dd0: 44 20 00 06 be r1,r0,8003de8 <_Heap_Walk+0x240> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 8003dd4: 78 03 08 01 mvhi r3,0x801 8003dd8: ba c0 20 00 mv r4,r22 8003ddc: b9 c0 08 00 mv r1,r14 8003de0: 38 63 b6 98 ori r3,r3,0xb698 8003de4: e0 00 00 b8 bi 80040c4 <_Heap_Walk+0x51c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003de8: 2a c3 00 04 lw r3,(r22+4) 8003dec: a0 75 18 00 and r3,r3,r21 8003df0: b6 c3 18 00 add r3,r22,r3 8003df4: 28 70 00 04 lw r16,(r3+4) 8003df8: 22 10 00 01 andi r16,r16,0x1 8003dfc: 46 01 00 07 be r16,r1,8003e18 <_Heap_Walk+0x270> (*printer)( 8003e00: 78 03 08 01 mvhi r3,0x801 8003e04: b8 20 78 00 mv r15,r1 8003e08: ba c0 20 00 mv r4,r22 8003e0c: b9 c0 08 00 mv r1,r14 8003e10: 38 63 b6 c8 ori r3,r3,0xb6c8 8003e14: e0 00 00 7c bi 8004004 <_Heap_Walk+0x45c> ); return false; } if ( free_block->prev != prev_block ) { 8003e18: 2a c5 00 0c lw r5,(r22+12) 8003e1c: 44 b1 00 09 be r5,r17,8003e40 <_Heap_Walk+0x298> (*printer)( 8003e20: 78 03 08 01 mvhi r3,0x801 8003e24: ba c0 20 00 mv r4,r22 8003e28: b9 c0 08 00 mv r1,r14 8003e2c: 38 63 b6 e4 ori r3,r3,0xb6e4 8003e30: 34 02 00 01 mvi r2,1 8003e34: d9 80 00 00 call r12 8003e38: ba 00 08 00 mv r1,r16 8003e3c: e0 00 00 8b bi 8004068 <_Heap_Walk+0x4c0> return false; } prev_block = free_block; free_block = free_block->next; 8003e40: ba c0 88 00 mv r17,r22 8003e44: 2a d6 00 08 lw r22,(r22+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 ) { 8003e48: 5e cd ff d3 bne r22,r13,8003d94 <_Heap_Walk+0x1ec> 8003e4c: e0 00 00 7a bi 8004034 <_Heap_Walk+0x48c> - 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; 8003e50: 29 6f 00 04 lw r15,(r11+4) 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 ) { 8003e54: 21 e2 00 01 andi r2,r15,0x1 8003e58: a1 fb 78 00 and r15,r15,fp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8003e5c: b5 6f 80 00 add r16,r11,r15 8003e60: 44 40 00 09 be r2,r0,8003e84 <_Heap_Walk+0x2dc> (*printer)( 8003e64: 78 03 08 01 mvhi r3,0x801 8003e68: b9 c0 08 00 mv r1,r14 8003e6c: 34 02 00 00 mvi r2,0 8003e70: 38 63 b7 18 ori r3,r3,0xb718 8003e74: b9 60 20 00 mv r4,r11 8003e78: b9 e0 28 00 mv r5,r15 8003e7c: d9 80 00 00 call r12 8003e80: e0 00 00 08 bi 8003ea0 <_Heap_Walk+0x2f8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8003e84: 29 66 00 00 lw r6,(r11+0) 8003e88: 78 03 08 01 mvhi r3,0x801 8003e8c: b9 c0 08 00 mv r1,r14 8003e90: 38 63 b7 30 ori r3,r3,0xb730 8003e94: b9 60 20 00 mv r4,r11 8003e98: b9 e0 28 00 mv r5,r15 8003e9c: d9 80 00 00 call r12 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 8003ea0: 29 a1 00 20 lw r1,(r13+32) 8003ea4: 52 01 00 03 bgeu r16,r1,8003eb0 <_Heap_Walk+0x308> 8003ea8: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 8003eac: e0 00 00 03 bi 8003eb8 <_Heap_Walk+0x310> <== NOT EXECUTED 8003eb0: 29 b1 00 24 lw r17,(r13+36) 8003eb4: f2 30 88 00 cmpgeu r17,r17,r16 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8003eb8: 5e 20 00 05 bne r17,r0,8003ecc <_Heap_Walk+0x324> (*printer)( 8003ebc: 78 03 08 01 mvhi r3,0x801 8003ec0: b9 c0 08 00 mv r1,r14 8003ec4: 38 63 b7 58 ori r3,r3,0xb758 8003ec8: e0 00 00 1c bi 8003f38 <_Heap_Walk+0x390> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8003ecc: b9 e0 08 00 mv r1,r15 8003ed0: bb 20 10 00 mv r2,r25 8003ed4: fb ff f3 7b calli 8000cc0 <__umodsi3> 8003ed8: b8 20 88 00 mv r17,r1 8003edc: 44 20 00 09 be r1,r0,8003f00 <_Heap_Walk+0x358> (*printer)( 8003ee0: 78 03 08 01 mvhi r3,0x801 8003ee4: b9 c0 08 00 mv r1,r14 8003ee8: 38 63 b7 88 ori r3,r3,0xb788 8003eec: b9 60 20 00 mv r4,r11 8003ef0: b9 e0 28 00 mv r5,r15 8003ef4: 34 02 00 01 mvi r2,1 8003ef8: d9 80 00 00 call r12 8003efc: e0 00 00 74 bi 80040cc <_Heap_Walk+0x524> ); return false; } if ( block_size < min_block_size ) { 8003f00: 51 f3 00 0a bgeu r15,r19,8003f28 <_Heap_Walk+0x380> (*printer)( 8003f04: 78 03 08 01 mvhi r3,0x801 8003f08: b9 c0 08 00 mv r1,r14 8003f0c: 38 63 b7 b8 ori r3,r3,0xb7b8 8003f10: b9 60 20 00 mv r4,r11 8003f14: b9 e0 28 00 mv r5,r15 8003f18: ba 60 30 00 mv r6,r19 8003f1c: 34 02 00 01 mvi r2,1 8003f20: d9 80 00 00 call r12 8003f24: e0 00 00 09 bi 8003f48 <_Heap_Walk+0x3a0> ); return false; } if ( next_block_begin <= block_begin ) { 8003f28: 56 0b 00 0a bgu r16,r11,8003f50 <_Heap_Walk+0x3a8> (*printer)( 8003f2c: 78 03 08 01 mvhi r3,0x801 8003f30: b9 c0 08 00 mv r1,r14 8003f34: 38 63 b7 e4 ori r3,r3,0xb7e4 8003f38: b9 60 20 00 mv r4,r11 8003f3c: ba 00 28 00 mv r5,r16 8003f40: 34 02 00 01 mvi r2,1 8003f44: d9 80 00 00 call r12 8003f48: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 8003f4c: e0 00 00 47 bi 8004068 <_Heap_Walk+0x4c0> } if ( !_Heap_Is_prev_used( next_block ) ) { 8003f50: 2a 03 00 04 lw r3,(r16+4) 8003f54: 20 63 00 01 andi r3,r3,0x1 8003f58: 5c 60 00 35 bne r3,r0,800402c <_Heap_Walk+0x484> 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; 8003f5c: 29 6f 00 04 lw r15,(r11+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)( 8003f60: 29 65 00 0c lw r5,(r11+12) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003f64: 29 a1 00 08 lw r1,(r13+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; 8003f68: a1 fb 88 00 and r17,r15,fp 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; 8003f6c: 29 a3 00 0c lw r3,(r13+12) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8003f70: b5 71 50 00 add r10,r11,r17 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003f74: ba a0 30 00 mv r6,r21 8003f78: 44 a1 00 04 be r5,r1,8003f88 <_Heap_Walk+0x3e0> "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)" : ""), 8003f7c: ba 80 30 00 mv r6,r20 8003f80: 5c ad 00 02 bne r5,r13,8003f88 <_Heap_Walk+0x3e0> 8003f84: ba c0 30 00 mv r6,r22 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)( 8003f88: 29 67 00 08 lw r7,(r11+8) 8003f8c: ba e0 40 00 mv r8,r23 8003f90: 44 e3 00 04 be r7,r3,8003fa0 <_Heap_Walk+0x3f8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8003f94: ba 80 40 00 mv r8,r20 8003f98: 5c ed 00 02 bne r7,r13,8003fa0 <_Heap_Walk+0x3f8> 8003f9c: bb 00 40 00 mv r8,r24 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)( 8003fa0: 78 03 08 01 mvhi r3,0x801 8003fa4: 5b 8a 00 54 sw (sp+84),r10 8003fa8: b9 c0 08 00 mv r1,r14 8003fac: 34 02 00 00 mvi r2,0 8003fb0: 38 63 b8 48 ori r3,r3,0xb848 8003fb4: b9 60 20 00 mv r4,r11 8003fb8: d9 80 00 00 call r12 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8003fbc: 2b 8a 00 54 lw r10,(sp+84) 8003fc0: 29 46 00 00 lw r6,(r10+0) 8003fc4: 46 26 00 0a be r17,r6,8003fec <_Heap_Walk+0x444> (*printer)( 8003fc8: 78 03 08 01 mvhi r3,0x801 8003fcc: b9 c0 08 00 mv r1,r14 8003fd0: 38 63 b8 74 ori r3,r3,0xb874 8003fd4: b9 60 20 00 mv r4,r11 8003fd8: ba 20 28 00 mv r5,r17 8003fdc: b9 40 38 00 mv r7,r10 8003fe0: 34 02 00 01 mvi r2,1 8003fe4: d9 80 00 00 call r12 8003fe8: e0 00 00 39 bi 80040cc <_Heap_Walk+0x524> ); return false; } if ( !prev_used ) { 8003fec: 21 ef 00 01 andi r15,r15,0x1 8003ff0: 5d e0 00 09 bne r15,r0,8004014 <_Heap_Walk+0x46c> (*printer)( 8003ff4: 78 03 08 01 mvhi r3,0x801 8003ff8: b9 c0 08 00 mv r1,r14 8003ffc: 38 63 b8 b0 ori r3,r3,0xb8b0 8004000: b9 60 20 00 mv r4,r11 8004004: 34 02 00 01 mvi r2,1 8004008: d9 80 00 00 call r12 800400c: b9 e0 08 00 mv r1,r15 8004010: e0 00 00 16 bi 8004068 <_Heap_Walk+0x4c0> 8004014: 29 a3 00 08 lw r3,(r13+8) 8004018: e0 00 00 03 bi 8004024 <_Heap_Walk+0x47c> { 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 ) { if ( free_block == block ) { 800401c: 44 6b 00 04 be r3,r11,800402c <_Heap_Walk+0x484> return true; } free_block = free_block->next; 8004020: 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 ) { 8004024: 5c 6d ff fe bne r3,r13,800401c <_Heap_Walk+0x474> 8004028: e0 00 00 23 bi 80040b4 <_Heap_Walk+0x50c> 800402c: ba 00 58 00 mv r11,r16 8004030: e0 00 00 0c bi 8004060 <_Heap_Walk+0x4b8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004034: 78 18 08 01 mvhi r24,0x801 8004038: 78 14 08 01 mvhi r20,0x801 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)( 800403c: 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)" : ""), 8004040: 78 16 08 01 mvhi r22,0x801 8004044: 78 15 08 01 mvhi r21,0x801 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004048: 3b 18 b8 3c ori r24,r24,0xb83c 800404c: 3a 94 b8 ac ori r20,r20,0xb8ac 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)( 8004050: 3a f7 b8 30 ori r23,r23,0xb830 "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)" : ""), 8004054: 3a d6 b8 24 ori r22,r22,0xb824 8004058: 3a b5 b8 18 ori r21,r21,0xb818 - 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; 800405c: 34 1b ff fe mvi fp,-2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8004060: 5d 72 ff 7c bne r11,r18,8003e50 <_Heap_Walk+0x2a8> 8004064: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 8004068: 2b 9d 00 10 lw ra,(sp+16) 800406c: 2b 8b 00 50 lw r11,(sp+80) 8004070: 2b 8c 00 4c lw r12,(sp+76) 8004074: 2b 8d 00 48 lw r13,(sp+72) 8004078: 2b 8e 00 44 lw r14,(sp+68) 800407c: 2b 8f 00 40 lw r15,(sp+64) 8004080: 2b 90 00 3c lw r16,(sp+60) 8004084: 2b 91 00 38 lw r17,(sp+56) 8004088: 2b 92 00 34 lw r18,(sp+52) 800408c: 2b 93 00 30 lw r19,(sp+48) 8004090: 2b 94 00 2c lw r20,(sp+44) 8004094: 2b 95 00 28 lw r21,(sp+40) 8004098: 2b 96 00 24 lw r22,(sp+36) 800409c: 2b 97 00 20 lw r23,(sp+32) 80040a0: 2b 98 00 1c lw r24,(sp+28) 80040a4: 2b 99 00 18 lw r25,(sp+24) 80040a8: 2b 9b 00 14 lw fp,(sp+20) 80040ac: 37 9c 00 54 addi sp,sp,84 80040b0: c3 a0 00 00 ret return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80040b4: 78 03 08 01 mvhi r3,0x801 80040b8: b9 c0 08 00 mv r1,r14 80040bc: 38 63 b8 e0 ori r3,r3,0xb8e0 80040c0: b9 60 20 00 mv r4,r11 80040c4: 34 02 00 01 mvi r2,1 80040c8: d9 80 00 00 call r12 80040cc: 34 01 00 00 mvi r1,0 80040d0: e3 ff ff e6 bi 8004068 <_Heap_Walk+0x4c0> 08003394 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 8003394: 37 9c ff f4 addi sp,sp,-12 8003398: 5b 8b 00 0c sw (sp+12),r11 800339c: 5b 8c 00 08 sw (sp+8),r12 80033a0: 5b 9d 00 04 sw (sp+4),ra _ISR_Signals_to_thread_executing = false; 80033a4: 78 03 08 01 mvhi r3,0x801 _ISR_Nest_level = 0; 80033a8: 78 02 08 01 mvhi r2,0x801 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 80033ac: 34 04 00 00 mvi r4,0 80033b0: 38 63 c9 78 ori r3,r3,0xc978 _ISR_Nest_level = 0; 80033b4: 38 42 c8 bc ori r2,r2,0xc8bc * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 80033b8: 30 64 00 00 sb (r3+0),r4 _ISR_Nest_level = 0; 80033bc: 58 44 00 00 sw (r2+0),r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 80033c0: 34 01 00 80 mvi r1,128 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; 80033c4: b8 80 60 00 mv r12,r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 80033c8: f8 00 09 2f calli 8005884 <_Workspace_Allocate_or_fatal_error> _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 80033cc: 78 0b 08 01 mvhi r11,0x801 80033d0: 78 02 08 01 mvhi r2,0x801 80033d4: 38 42 c0 bc ori r2,r2,0xc0bc 80033d8: 39 6b c0 c4 ori r11,r11,0xc0c4 80033dc: 28 44 00 00 lw r4,(r2+0) 80033e0: 29 63 00 1c lw r3,(r11+28) _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 80033e4: 78 02 08 01 mvhi r2,0x801 80033e8: 38 42 c8 a0 ori r2,r2,0xc8a0 80033ec: 58 41 00 00 sw (r2+0),r1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 80033f0: 50 64 00 05 bgeu r3,r4,8003404 <_ISR_Handler_initialization+0x70> _Internal_error_Occurred( 80033f4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80033f8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80033fc: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 8003400: fb ff ff d6 calli 8003358 <_Internal_error_Occurred> <== NOT EXECUTED INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 8003404: b8 60 08 00 mv r1,r3 8003408: f8 00 09 1f calli 8005884 <_Workspace_Allocate_or_fatal_error> Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 800340c: 29 64 00 1c lw r4,(r11+28) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 8003410: 78 02 08 01 mvhi r2,0x801 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003414: 78 03 08 01 mvhi r3,0x801 8003418: b4 24 20 00 add r4,r1,r4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 800341c: 38 42 c8 34 ori r2,r2,0xc834 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003420: 38 63 c7 b8 ori r3,r3,0xc7b8 8003424: 58 64 00 00 sw (r3+0),r4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 8003428: 58 41 00 00 sw (r2+0),r1 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 800342c: 2b 9d 00 04 lw ra,(sp+4) 8003430: 2b 8b 00 0c lw r11,(sp+12) 8003434: 2b 8c 00 08 lw r12,(sp+8) 8003438: 37 9c 00 0c addi sp,sp,12 800343c: c3 a0 00 00 ret 080039ac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 80039ac: 37 9c ff e4 addi sp,sp,-28 80039b0: 5b 8b 00 1c sw (sp+28),r11 80039b4: 5b 8c 00 18 sw (sp+24),r12 80039b8: 5b 8d 00 14 sw (sp+20),r13 80039bc: 5b 8e 00 10 sw (sp+16),r14 80039c0: 5b 8f 00 0c sw (sp+12),r15 80039c4: 5b 90 00 08 sw (sp+8),r16 80039c8: 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; 80039cc: 34 06 00 00 mvi r6,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 80039d0: b8 20 58 00 mv r11,r1 80039d4: 20 a5 ff ff andi r5,r5,0xffff 80039d8: b8 40 78 00 mv r15,r2 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 80039dc: 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; 80039e0: 0c 26 00 10 sh (r1+16),r6 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 80039e4: 0d 63 00 04 sh (r11+4),r3 information->size = size; information->local_table = 0; 80039e8: 58 26 00 1c sw (r1+28),r6 information->inactive_per_block = 0; 80039ec: 58 26 00 30 sw (r1+48),r6 information->object_blocks = 0; 80039f0: 58 26 00 34 sw (r1+52),r6 information->inactive = 0; 80039f4: 0c 26 00 2c sh (r1+44),r6 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 80039f8: 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; 80039fc: 78 10 08 01 mvhi r16,0x801 8003a00: 34 02 00 02 mvi r2,2 8003a04: b9 e0 08 00 mv r1,r15 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003a08: b8 60 70 00 mv r14,r3 8003a0c: b8 80 60 00 mv r12,r4 8003a10: b8 e0 68 00 mv r13,r7 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003a14: 3a 10 c7 bc ori r16,r16,0xc7bc 8003a18: fb ff f1 f6 calli 80001f0 <__ashlsi3> 8003a1c: b6 01 08 00 add r1,r16,r1 8003a20: 28 30 00 00 lw r16,(r1+0) 8003a24: 34 02 00 02 mvi r2,2 8003a28: b9 c0 08 00 mv r1,r14 8003a2c: fb ff f1 f1 calli 80001f0 <__ashlsi3> 8003a30: b6 01 08 00 add r1,r16,r1 8003a34: 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; 8003a38: 34 02 00 1f mvi r2,31 8003a3c: b9 80 08 00 mv r1,r12 8003a40: fb ff f2 14 calli 8000290 <__lshrsi3> 8003a44: 20 23 00 ff andi r3,r1,0xff maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003a48: 78 02 7f ff mvhi r2,0x7fff 8003a4c: 38 42 ff ff ori r2,r2,0xffff _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 8003a50: 31 63 00 12 sb (r11+18),r3 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003a54: a1 82 60 00 and r12,r12,r2 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 8003a58: 44 60 00 06 be r3,r0,8003a70 <_Objects_Initialize_information+0xc4> 8003a5c: 5d 80 00 05 bne r12,r0,8003a70 <_Objects_Initialize_information+0xc4> _Internal_error_Occurred( 8003a60: b9 80 08 00 mv r1,r12 8003a64: 34 02 00 01 mvi r2,1 8003a68: 34 03 00 14 mvi r3,20 8003a6c: fb ff fe 3b calli 8003358 <_Internal_error_Occurred> 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; 8003a70: 78 01 08 01 mvhi r1,0x801 8003a74: 38 21 c6 20 ori r1,r1,0xc620 8003a78: 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 = 8003a7c: 34 02 00 18 mvi r2,24 8003a80: b9 e0 08 00 mv r1,r15 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 8003a84: 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 = 8003a88: fb ff f1 da calli 80001f0 <__ashlsi3> 8003a8c: 78 02 00 01 mvhi r2,0x1 8003a90: 38 42 00 00 ori r2,r2,0x0 8003a94: b8 22 78 00 or r15,r1,r2 8003a98: 34 02 00 1b mvi r2,27 8003a9c: b9 c0 08 00 mv r1,r14 8003aa0: fb ff f1 d4 calli 80001f0 <__ashlsi3> 8003aa4: 7d 83 00 00 cmpnei r3,r12,0 8003aa8: b9 e1 08 00 or r1,r15,r1 8003aac: b8 23 08 00 or r1,r1,r3 8003ab0: 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) ) 8003ab4: 21 a2 00 03 andi r2,r13,0x3 8003ab8: b9 a0 08 00 mv r1,r13 8003abc: 44 40 00 04 be r2,r0,8003acc <_Objects_Initialize_information+0x120> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 8003ac0: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED 8003ac4: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED 8003ac8: a1 a1 08 00 and r1,r13,r1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003acc: 35 63 00 24 addi r3,r11,36 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8003ad0: 35 62 00 20 addi r2,r11,32 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 8003ad4: 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; 8003ad8: 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); 8003adc: 59 63 00 20 sw (r11+32),r3 the_chain->permanent_null = NULL; 8003ae0: 59 61 00 24 sw (r11+36),r1 the_chain->last = _Chain_Head(the_chain); 8003ae4: 59 62 00 28 sw (r11+40),r2 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 8003ae8: 45 81 00 03 be r12,r1,8003af4 <_Objects_Initialize_information+0x148> /* * 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 ); 8003aec: b9 60 08 00 mv r1,r11 8003af0: fb ff fe 85 calli 8003504 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 8003af4: 2b 9d 00 04 lw ra,(sp+4) 8003af8: 2b 8b 00 1c lw r11,(sp+28) 8003afc: 2b 8c 00 18 lw r12,(sp+24) 8003b00: 2b 8d 00 14 lw r13,(sp+20) 8003b04: 2b 8e 00 10 lw r14,(sp+16) 8003b08: 2b 8f 00 0c lw r15,(sp+12) 8003b0c: 2b 90 00 08 lw r16,(sp+8) 8003b10: 37 9c 00 1c addi sp,sp,28 8003b14: c3 a0 00 00 ret 080082cc <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 80082cc: 37 9c ff e4 addi sp,sp,-28 80082d0: 5b 8b 00 0c sw (sp+12),r11 80082d4: 5b 8c 00 08 sw (sp+8),r12 80082d8: 5b 9d 00 04 sw (sp+4),ra 80082dc: 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 ); 80082e0: 90 00 60 00 rcsr r12,IE 80082e4: 34 01 ff fe mvi r1,-2 80082e8: a1 81 08 00 and r1,r12,r1 80082ec: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 80082f0: 78 02 08 01 mvhi r2,0x801 80082f4: 38 42 c8 b4 ori r2,r2,0xc8b4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 80082f8: 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; 80082fc: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008300: 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; 8008304: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008308: 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; 800830c: 5b 81 00 14 sw (sp+20),r1 8008310: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008314: b8 60 20 00 mv r4,r3 8008318: 44 60 00 03 be r3,r0,8008324 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 800831c: d8 60 00 00 call r3 <== NOT EXECUTED 8008320: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008324: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008328: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 800832c: 37 81 00 10 addi r1,sp,16 8008330: 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 ); 8008334: 5b 83 00 18 sw (sp+24),r3 8008338: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 800833c: fb ff f3 7a calli 8005124 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 8008340: 2b 81 00 14 lw r1,(sp+20) 8008344: 59 61 00 04 sw (r11+4),r1 8008348: 2b 81 00 10 lw r1,(sp+16) 800834c: 59 61 00 00 sw (r11+0),r1 } 8008350: 2b 9d 00 04 lw ra,(sp+4) 8008354: 2b 8b 00 0c lw r11,(sp+12) 8008358: 2b 8c 00 08 lw r12,(sp+8) 800835c: 37 9c 00 1c addi sp,sp,28 8008360: c3 a0 00 00 ret 08008364 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 8008364: 37 9c ff e4 addi sp,sp,-28 8008368: 5b 8b 00 0c sw (sp+12),r11 800836c: 5b 8c 00 08 sw (sp+8),r12 8008370: 5b 9d 00 04 sw (sp+4),ra 8008374: 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 ); 8008378: 90 00 60 00 rcsr r12,IE 800837c: 34 01 ff fe mvi r1,-2 8008380: a1 81 08 00 and r1,r12,r1 8008384: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8008388: 78 02 08 01 mvhi r2,0x801 800838c: 38 42 c8 a4 ori r2,r2,0xc8a4 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008390: 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; 8008394: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008398: 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; 800839c: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 80083a0: 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; 80083a4: 5b 81 00 14 sw (sp+20),r1 80083a8: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 80083ac: b8 60 20 00 mv r4,r3 80083b0: 44 60 00 03 be r3,r0,80083bc <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 80083b4: d8 60 00 00 call r3 <== NOT EXECUTED 80083b8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 80083bc: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 80083c0: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 80083c4: 37 81 00 10 addi r1,sp,16 80083c8: 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 ); 80083cc: 5b 83 00 18 sw (sp+24),r3 80083d0: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 80083d4: fb ff f3 54 calli 8005124 <_Timespec_Add_to> *uptime = up; 80083d8: 2b 81 00 14 lw r1,(sp+20) 80083dc: 59 61 00 04 sw (r11+4),r1 80083e0: 2b 81 00 10 lw r1,(sp+16) 80083e4: 59 61 00 00 sw (r11+0),r1 } 80083e8: 2b 9d 00 04 lw ra,(sp+4) 80083ec: 2b 8b 00 0c lw r11,(sp+12) 80083f0: 2b 8c 00 08 lw r12,(sp+8) 80083f4: 37 9c 00 1c addi sp,sp,28 80083f8: c3 a0 00 00 ret 0800456c <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 800456c: 37 9c ff f0 addi sp,sp,-16 8004570: 5b 8b 00 10 sw (sp+16),r11 8004574: 5b 8c 00 0c sw (sp+12),r12 8004578: 5b 8d 00 08 sw (sp+8),r13 800457c: 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; 8004580: 78 01 08 01 mvhi r1,0x801 8004584: 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) 8004588: 28 22 00 20 lw r2,(r1+32) 800458c: 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; 8004590: 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) 8004594: 64 42 00 00 cmpei r2,r2,0 8004598: 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; 800459c: 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) 80045a0: 99 22 48 00 xor r9,r9,r2 80045a4: b9 20 58 00 mv r11,r9 80045a8: 45 20 00 05 be r9,r0,80045bc <_Thread_Handler_initialization+0x50> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 80045ac: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80045b0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80045b4: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 80045b8: fb ff fb 68 calli 8003358 <_Internal_error_Occurred> <== NOT EXECUTED _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 80045bc: 78 0c 08 01 mvhi r12,0x801 80045c0: 39 8c c0 c0 ori r12,r12,0xc0c0 80045c4: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 80045c8: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 80045cc: 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( 80045d0: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 80045d4: 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; 80045d8: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 80045dc: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 80045e0: 78 06 08 01 mvhi r6,0x801 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 80045e4: 38 63 c8 c4 ori r3,r3,0xc8c4 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 80045e8: 38 c6 c7 b4 ori r6,r6,0xc7b4 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 80045ec: 39 08 c8 f0 ori r8,r8,0xc8f0 _Thread_Executing = NULL; 80045f0: 38 a5 c8 e0 ori r5,r5,0xc8e0 _Thread_Heir = NULL; 80045f4: 38 84 c8 b0 ori r4,r4,0xc8b0 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 80045f8: 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( 80045fc: 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; 8004600: 58 ca 00 00 sw (r6+0),r10 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004604: 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( 8004608: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 800460c: 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( 8004610: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004614: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004618: 58 a9 00 00 sw (r5+0),r9 _Thread_Heir = NULL; 800461c: 58 89 00 00 sw (r4+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004620: fb ff ee f4 calli 80001f0 <__ashlsi3> 8004624: f8 00 04 98 calli 8005884 <_Workspace_Allocate_or_fatal_error> 8004628: 78 02 08 01 mvhi r2,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 800462c: 41 83 00 00 lbu r3,(r12+0) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004630: 38 42 c7 b0 ori r2,r2,0xc7b0 8004634: 58 41 00 00 sw (r2+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; 8004638: 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); 800463c: 34 22 00 04 addi r2,r1,4 8004640: 58 22 00 00 sw (r1+0),r2 the_chain->permanent_null = NULL; 8004644: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004648: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 800464c: 35 6b 00 01 addi r11,r11,1 8004650: 34 21 00 0c addi r1,r1,12 8004654: 50 6b ff fa bgeu r3,r11,800463c <_Thread_Handler_initialization+0xd0> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004658: 34 02 00 01 mvi r2,1 800465c: 78 01 08 01 mvhi r1,0x801 8004660: 38 21 c9 80 ori r1,r1,0xc980 8004664: b8 40 18 00 mv r3,r2 8004668: b8 40 20 00 mv r4,r2 800466c: 34 05 01 38 mvi r5,312 8004670: 34 07 00 08 mvi r7,8 8004674: fb ff fc ce calli 80039ac <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004678: 2b 9d 00 04 lw ra,(sp+4) 800467c: 2b 8b 00 10 lw r11,(sp+16) 8004680: 2b 8c 00 0c lw r12,(sp+12) 8004684: 2b 8d 00 08 lw r13,(sp+8) 8004688: 37 9c 00 10 addi sp,sp,16 800468c: c3 a0 00 00 ret 08005be8 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005be8: 37 9c ff f0 addi sp,sp,-16 8005bec: 5b 8b 00 08 sw (sp+8),r11 8005bf0: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005bf4: 28 25 00 10 lw r5,(r1+16) 8005bf8: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005bfc: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005c00: 20 a5 00 01 andi r5,r5,0x1 8005c04: 5c a4 00 16 bne r5,r4,8005c5c <_Thread_Restart+0x74> _Thread_Set_transient( the_thread ); 8005c08: 5b 82 00 10 sw (sp+16),r2 8005c0c: 5b 83 00 0c sw (sp+12),r3 8005c10: f8 00 00 bb calli 8005efc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8005c14: 2b 82 00 10 lw r2,(sp+16) 8005c18: 2b 83 00 0c lw r3,(sp+12) 8005c1c: b9 60 08 00 mv r1,r11 8005c20: f8 00 11 96 calli 800a278 <_Thread_Reset> _Thread_Load_environment( the_thread ); 8005c24: b9 60 08 00 mv r1,r11 8005c28: f8 00 10 6b calli 8009dd4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 8005c2c: b9 60 08 00 mv r1,r11 8005c30: f8 00 11 2e calli 800a0e8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8005c34: b9 60 08 00 mv r1,r11 8005c38: f8 00 02 52 calli 8006580 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8005c3c: 78 01 08 02 mvhi r1,0x802 8005c40: 38 21 09 40 ori r1,r1,0x940 8005c44: 28 21 00 00 lw r1,(r1+0) 8005c48: 34 04 00 01 mvi r4,1 8005c4c: 5d 61 00 04 bne r11,r1,8005c5c <_Thread_Restart+0x74> #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 ); 8005c50: 35 61 00 cc addi r1,r11,204 8005c54: f8 00 03 d0 calli 8006b94 <_CPU_Context_restore> 8005c58: 34 04 00 01 mvi r4,1 <== NOT EXECUTED return true; } return false; } 8005c5c: b8 80 08 00 mv r1,r4 8005c60: 2b 9d 00 04 lw ra,(sp+4) 8005c64: 2b 8b 00 08 lw r11,(sp+8) 8005c68: 37 9c 00 10 addi sp,sp,16 8005c6c: c3 a0 00 00 ret 08004910 <_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 ) { 8004910: 37 9c ff ec addi sp,sp,-20 8004914: 5b 8b 00 14 sw (sp+20),r11 8004918: 5b 8c 00 10 sw (sp+16),r12 800491c: 5b 8d 00 0c sw (sp+12),r13 8004920: 5b 8e 00 08 sw (sp+8),r14 8004924: 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; 8004928: 28 4d 00 14 lw r13,(r2+20) Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 800492c: b8 40 58 00 mv r11,r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004930: 34 44 00 3c addi r4,r2,60 8004934: 59 64 00 38 sw (r11+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004938: 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; 800493c: 34 04 00 00 mvi r4,0 8004940: b8 20 60 00 mv r12,r1 8004944: 59 64 00 3c sw (r11+60),r4 the_chain->last = _Chain_Head(the_chain); 8004948: 59 62 00 40 sw (r11+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 ]; 800494c: b9 a0 08 00 mv r1,r13 8004950: 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 ) { 8004954: 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 ]; 8004958: fb ff ee 4e calli 8000290 <__lshrsi3> 800495c: b4 21 10 00 add r2,r1,r1 8004960: b4 41 08 00 add r1,r2,r1 8004964: 34 02 00 02 mvi r2,2 8004968: fb ff ee 22 calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 800496c: 21 a2 00 20 andi r2,r13,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 ]; 8004970: b5 81 08 00 add r1,r12,r1 block_state = the_thread_queue->state; 8004974: 29 87 00 38 lw r7,(r12+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004978: 5c 40 00 23 bne r2,r0,8004a04 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800497c: 34 28 00 04 addi r8,r1,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004980: 34 03 ff fe mvi r3,-2 8004984: 90 00 20 00 rcsr r4,IE 8004988: a0 83 30 00 and r6,r4,r3 800498c: d0 06 00 00 wcsr IE,r6 search_thread = (Thread_Control *) header->first; 8004990: 34 05 ff ff mvi r5,-1 8004994: 28 22 00 00 lw r2,(r1+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004998: e0 00 00 0b bi 80049c4 <_Thread_queue_Enqueue_priority+0xb4> search_priority = search_thread->current_priority; 800499c: 28 45 00 14 lw r5,(r2+20) if ( priority <= search_priority ) 80049a0: 50 ad 00 0a bgeu r5,r13,80049c8 <_Thread_queue_Enqueue_priority+0xb8> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 80049a4: d0 04 00 00 wcsr IE,r4 80049a8: d0 06 00 00 wcsr IE,r6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 80049ac: 28 49 00 10 lw r9,(r2+16) 80049b0: a0 e9 48 00 and r9,r7,r9 80049b4: 5d 20 00 03 bne r9,r0,80049c0 <_Thread_queue_Enqueue_priority+0xb0> _ISR_Enable( level ); 80049b8: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED goto restart_forward_search; 80049bc: e3 ff ff f2 bi 8004984 <_Thread_queue_Enqueue_priority+0x74> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 80049c0: 28 42 00 00 lw r2,(r2+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 ) ) { 80049c4: 5c 48 ff f6 bne r2,r8,800499c <_Thread_queue_Enqueue_priority+0x8c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 80049c8: 29 83 00 30 lw r3,(r12+48) 80049cc: 34 01 00 01 mvi r1,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; 80049d0: b8 80 38 00 mv r7,r4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 80049d4: 5c 61 00 3b bne r3,r1,8004ac0 <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 80049d8: 34 01 00 00 mvi r1,0 80049dc: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 80049e0: 45 a5 00 2f be r13,r5,8004a9c <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 80049e4: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 80049e8: 59 62 00 00 sw (r11+0),r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 80049ec: 59 6c 00 44 sw (r11+68),r12 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; 80049f0: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 80049f4: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 80049f8: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 80049fc: d0 04 00 00 wcsr IE,r4 8004a00: e0 00 00 25 bi 8004a94 <_Thread_queue_Enqueue_priority+0x184> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8004a04: 78 04 08 01 mvhi r4,0x801 8004a08: 38 84 c0 c0 ori r4,r4,0xc0c0 _ISR_Disable( level ); 8004a0c: 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; 8004a10: 40 86 00 00 lbu r6,(r4+0) 8004a14: 34 c6 00 01 addi r6,r6,1 _ISR_Disable( level ); 8004a18: 90 00 28 00 rcsr r5,IE 8004a1c: a0 a3 40 00 and r8,r5,r3 8004a20: d0 08 00 00 wcsr IE,r8 search_thread = (Thread_Control *) header->last; 8004a24: 28 22 00 08 lw r2,(r1+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004a28: e0 00 00 0b bi 8004a54 <_Thread_queue_Enqueue_priority+0x144> search_priority = search_thread->current_priority; 8004a2c: 28 46 00 14 lw r6,(r2+20) if ( priority >= search_priority ) 8004a30: 51 a6 00 0a bgeu r13,r6,8004a58 <_Thread_queue_Enqueue_priority+0x148> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004a34: d0 05 00 00 wcsr IE,r5 8004a38: d0 08 00 00 wcsr IE,r8 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004a3c: 28 49 00 10 lw r9,(r2+16) 8004a40: a0 e9 48 00 and r9,r7,r9 8004a44: 5d 20 00 03 bne r9,r0,8004a50 <_Thread_queue_Enqueue_priority+0x140> _ISR_Enable( level ); 8004a48: d0 05 00 00 wcsr IE,r5 goto restart_reverse_search; 8004a4c: e3 ff ff f1 bi 8004a10 <_Thread_queue_Enqueue_priority+0x100> } search_thread = (Thread_Control *) 8004a50: 28 42 00 04 lw r2,(r2+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 ) ) { 8004a54: 5c 41 ff f6 bne r2,r1,8004a2c <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004a58: 29 83 00 30 lw r3,(r12+48) 8004a5c: 34 01 00 01 mvi r1,1 8004a60: b8 a0 38 00 mv r7,r5 8004a64: 5c 61 00 17 bne r3,r1,8004ac0 <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004a68: 34 01 00 00 mvi r1,0 8004a6c: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 8004a70: b8 a0 20 00 mv r4,r5 8004a74: 45 a6 00 0a be r13,r6,8004a9c <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004a78: 28 41 00 00 lw r1,(r2+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004a7c: 59 62 00 04 sw (r11+4),r2 search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004a80: 59 6c 00 44 sw (r11+68),r12 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8004a84: 59 61 00 00 sw (r11+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004a88: 58 4b 00 00 sw (r2+0),r11 next_node->previous = the_node; 8004a8c: 58 2b 00 04 sw (r1+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004a90: d0 05 00 00 wcsr IE,r5 8004a94: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004a98: e0 00 00 0c bi 8004ac8 <_Thread_queue_Enqueue_priority+0x1b8> 8004a9c: 34 42 00 3c addi r2,r2,60 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 8004aa0: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004aa4: 59 62 00 00 sw (r11+0),r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004aa8: 59 6c 00 44 sw (r11+68),r12 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; 8004aac: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 8004ab0: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 8004ab4: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004ab8: d0 04 00 00 wcsr IE,r4 8004abc: e3 ff ff f6 bi 8004a94 <_Thread_queue_Enqueue_priority+0x184> * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 8004ac0: 29 81 00 30 lw r1,(r12+48) <== NOT EXECUTED * 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; 8004ac4: 59 c7 00 00 sw (r14+0),r7 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004ac8: 2b 9d 00 04 lw ra,(sp+4) 8004acc: 2b 8b 00 14 lw r11,(sp+20) 8004ad0: 2b 8c 00 10 lw r12,(sp+16) 8004ad4: 2b 8d 00 0c lw r13,(sp+12) 8004ad8: 2b 8e 00 08 lw r14,(sp+8) 8004adc: 37 9c 00 14 addi sp,sp,20 8004ae0: c3 a0 00 00 ret 08008ea4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 8008ea4: 37 9c ff fc addi sp,sp,-4 8008ea8: 5b 9d 00 04 sw (sp+4),ra 8008eac: b8 20 10 00 mv r2,r1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 8008eb0: 28 21 00 44 lw r1,(r1+68) * 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. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 8008eb4: 28 24 00 30 lw r4,(r1+48) 8008eb8: 44 80 00 0c be r4,r0,8008ee8 <_Thread_queue_Process_timeout+0x44> 8008ebc: 78 03 08 01 mvhi r3,0x801 8008ec0: 38 63 c8 e0 ori r3,r3,0xc8e0 8008ec4: 28 63 00 00 lw r3,(r3+0) 8008ec8: 5c 43 00 08 bne r2,r3,8008ee8 <_Thread_queue_Process_timeout+0x44> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 8008ecc: 34 03 00 03 mvi r3,3 8008ed0: 44 83 00 0a be r4,r3,8008ef8 <_Thread_queue_Process_timeout+0x54> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 8008ed4: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 8008ed8: 58 23 00 30 sw (r1+48),r3 <== NOT EXECUTED */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 8008edc: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8008ee0: 58 41 00 34 sw (r2+52),r1 <== NOT EXECUTED 8008ee4: e0 00 00 05 bi 8008ef8 <_Thread_queue_Process_timeout+0x54> <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 8008ee8: 28 21 00 3c lw r1,(r1+60) 8008eec: 58 41 00 34 sw (r2+52),r1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 8008ef0: 28 41 00 44 lw r1,(r2+68) 8008ef4: fb ff ff 93 calli 8008d40 <_Thread_queue_Extract> } } 8008ef8: 2b 9d 00 04 lw ra,(sp+4) 8008efc: 37 9c 00 04 addi sp,sp,4 8008f00: c3 a0 00 00 ret 08013c60 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 8013c60: 37 9c ff a4 addi sp,sp,-92 8013c64: 5b 8b 00 44 sw (sp+68),r11 8013c68: 5b 8c 00 40 sw (sp+64),r12 8013c6c: 5b 8d 00 3c sw (sp+60),r13 8013c70: 5b 8e 00 38 sw (sp+56),r14 8013c74: 5b 8f 00 34 sw (sp+52),r15 8013c78: 5b 90 00 30 sw (sp+48),r16 8013c7c: 5b 91 00 2c sw (sp+44),r17 8013c80: 5b 92 00 28 sw (sp+40),r18 8013c84: 5b 93 00 24 sw (sp+36),r19 8013c88: 5b 94 00 20 sw (sp+32),r20 8013c8c: 5b 95 00 1c sw (sp+28),r21 8013c90: 5b 96 00 18 sw (sp+24),r22 8013c94: 5b 97 00 14 sw (sp+20),r23 8013c98: 5b 98 00 10 sw (sp+16),r24 8013c9c: 5b 99 00 0c sw (sp+12),r25 8013ca0: 5b 9b 00 08 sw (sp+8),fp 8013ca4: 5b 9d 00 04 sw (sp+4),ra static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8013ca8: 78 11 08 03 mvhi r17,0x803 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 8013cac: b8 20 58 00 mv r11,r1 8013cb0: 37 82 00 54 addi r2,sp,84 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8013cb4: 34 01 00 00 mvi r1,0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8013cb8: 37 96 00 58 addi r22,sp,88 8013cbc: 37 8e 00 48 addi r14,sp,72 8013cc0: 37 92 00 4c addi r18,sp,76 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8013cc4: 78 10 08 03 mvhi r16,0x803 8013cc8: 78 0d 08 03 mvhi r13,0x803 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8013ccc: 5b 96 00 54 sw (sp+84),r22 the_chain->permanent_null = NULL; 8013cd0: 5b 81 00 58 sw (sp+88),r1 the_chain->last = _Chain_Head(the_chain); 8013cd4: 5b 82 00 5c sw (sp+92),r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8013cd8: 5b 92 00 48 sw (sp+72),r18 the_chain->permanent_null = NULL; 8013cdc: 5b 81 00 4c sw (sp+76),r1 the_chain->last = _Chain_Head(the_chain); 8013ce0: 5b 8e 00 50 sw (sp+80),r14 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8013ce4: 3a 31 dd 7c ori r17,r17,0xdd7c static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8013ce8: 3a 10 dc bc ori r16,r16,0xdcbc */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 8013cec: b8 20 a8 00 mv r21,r1 8013cf0: 39 ad dc 2c ori r13,r13,0xdc2c */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8013cf4: 35 74 00 30 addi r20,r11,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 ); 8013cf8: 35 6f 00 68 addi r15,r11,104 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 8013cfc: 35 7b 00 08 addi fp,r11,8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8013d00: 35 79 00 40 addi r25,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 ); 8013d04: 34 18 00 01 mvi r24,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 ) { 8013d08: 34 17 00 03 mvi r23,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 ); 8013d0c: 34 13 ff fe mvi r19,-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; 8013d10: 37 81 00 54 addi r1,sp,84 8013d14: 59 61 00 78 sw (r11+120),r1 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8013d18: 2a 22 00 00 lw r2,(r17+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 8013d1c: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8013d20: ba 80 08 00 mv r1,r20 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8013d24: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8013d28: c8 43 10 00 sub r2,r2,r3 8013d2c: b9 c0 18 00 mv r3,r14 8013d30: f8 00 14 36 calli 8018e08 <_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; 8013d34: 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(); 8013d38: 2a 0c 00 00 lw r12,(r16+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 ) { 8013d3c: 50 4c 00 06 bgeu r2,r12,8013d54 <_Timer_server_Body+0xf4> /* * 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 ); 8013d40: c9 82 10 00 sub r2,r12,r2 8013d44: b9 e0 08 00 mv r1,r15 8013d48: b9 c0 18 00 mv r3,r14 8013d4c: f8 00 14 2f calli 8018e08 <_Watchdog_Adjust_to_chain> 8013d50: e0 00 00 06 bi 8013d68 <_Timer_server_Body+0x108> } else if ( snapshot < last_snapshot ) { 8013d54: 51 82 00 05 bgeu r12,r2,8013d68 <_Timer_server_Body+0x108> /* * 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 ); 8013d58: c8 4c 18 00 sub r3,r2,r12 8013d5c: b9 e0 08 00 mv r1,r15 8013d60: 34 02 00 01 mvi r2,1 8013d64: f8 00 13 f1 calli 8018d28 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 8013d68: 59 6c 00 74 sw (r11+116),r12 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 8013d6c: 29 61 00 78 lw r1,(r11+120) 8013d70: f8 00 02 ec calli 8014920 <_Chain_Get> if ( timer == NULL ) { 8013d74: 44 20 00 0b be r1,r0,8013da0 <_Timer_server_Body+0x140> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8013d78: 28 23 00 38 lw r3,(r1+56) 8013d7c: 5c 78 00 04 bne r3,r24,8013d8c <_Timer_server_Body+0x12c> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8013d80: 34 22 00 10 addi r2,r1,16 8013d84: ba 80 08 00 mv r1,r20 8013d88: e0 00 00 04 bi 8013d98 <_Timer_server_Body+0x138> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8013d8c: 5c 77 ff f8 bne r3,r23,8013d6c <_Timer_server_Body+0x10c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 8013d90: 34 22 00 10 addi r2,r1,16 8013d94: b9 e0 08 00 mv r1,r15 8013d98: f8 00 14 47 calli 8018eb4 <_Watchdog_Insert> 8013d9c: e3 ff ff f4 bi 8013d6c <_Timer_server_Body+0x10c> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 8013da0: 90 00 10 00 rcsr r2,IE 8013da4: a0 53 08 00 and r1,r2,r19 8013da8: d0 01 00 00 wcsr IE,r1 if ( _Chain_Is_empty( insert_chain ) ) { 8013dac: 2b 81 00 54 lw r1,(sp+84) 8013db0: 5c 36 00 06 bne r1,r22,8013dc8 <_Timer_server_Body+0x168> ts->insert_chain = NULL; 8013db4: 59 75 00 78 sw (r11+120),r21 _ISR_Enable( level ); 8013db8: 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 ) ) { 8013dbc: 2b 81 00 48 lw r1,(sp+72) 8013dc0: 5c 32 00 04 bne r1,r18,8013dd0 <_Timer_server_Body+0x170> 8013dc4: e0 00 00 17 bi 8013e20 <_Timer_server_Body+0x1c0> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 8013dc8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 8013dcc: e3 ff ff d3 bi 8013d18 <_Timer_server_Body+0xb8> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 8013dd0: 90 00 10 00 rcsr r2,IE 8013dd4: a0 53 08 00 and r1,r2,r19 8013dd8: 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)); 8013ddc: 2b 84 00 48 lw r4,(sp+72) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 8013de0: 5c 92 00 03 bne r4,r18,8013dec <_Timer_server_Body+0x18c> 8013de4: 34 04 00 00 mvi r4,0 8013de8: e0 00 00 04 bi 8013df8 <_Timer_server_Body+0x198> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 8013dec: 28 83 00 00 lw r3,(r4+0) the_chain->first = new_first; 8013df0: 5b 83 00 48 sw (sp+72),r3 new_first->previous = _Chain_Head(the_chain); 8013df4: 58 6e 00 04 sw (r3+4),r14 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 8013df8: 44 80 00 08 be r4,r0,8013e18 <_Timer_server_Body+0x1b8> watchdog->state = WATCHDOG_INACTIVE; 8013dfc: 58 95 00 08 sw (r4+8),r21 _ISR_Enable( level ); 8013e00: 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 ); 8013e04: 28 82 00 24 lw r2,(r4+36) 8013e08: 28 83 00 1c lw r3,(r4+28) 8013e0c: 28 81 00 20 lw r1,(r4+32) 8013e10: d8 60 00 00 call r3 } 8013e14: e3 ff ff ef bi 8013dd0 <_Timer_server_Body+0x170> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 8013e18: d0 02 00 00 wcsr IE,r2 8013e1c: e3 ff ff bd bi 8013d10 <_Timer_server_Body+0xb0> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 8013e20: 34 01 00 00 mvi r1,0 8013e24: 31 61 00 7c sb (r11+124),r1 8013e28: 29 a1 00 00 lw r1,(r13+0) 8013e2c: 34 21 00 01 addi r1,r1,1 8013e30: 59 a1 00 00 sw (r13+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 8013e34: 29 61 00 00 lw r1,(r11+0) 8013e38: 34 02 00 08 mvi r2,8 8013e3c: f8 00 10 c3 calli 8018148 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 8013e40: b9 60 08 00 mv r1,r11 8013e44: fb ff ff 4d calli 8013b78 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 8013e48: b9 60 08 00 mv r1,r11 8013e4c: fb ff ff 68 calli 8013bec <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 8013e50: f8 00 0d 9e calli 80174c8 <_Thread_Enable_dispatch> ts->active = true; 8013e54: 34 01 00 01 mvi r1,1 8013e58: 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 ); 8013e5c: bb 60 08 00 mv r1,fp 8013e60: f8 00 14 74 calli 8019030 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8013e64: bb 20 08 00 mv r1,r25 8013e68: f8 00 14 72 calli 8019030 <_Watchdog_Remove> 8013e6c: e3 ff ff a9 bi 8013d10 <_Timer_server_Body+0xb0> 0803d16c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 803d16c: 28 24 00 00 lw r4,(r1+0) 803d170: 28 43 00 00 lw r3,(r2+0) 803d174: 4c 64 00 03 bge r3,r4,803d180 <_Timespec_Greater_than+0x14> 803d178: 34 01 00 01 mvi r1,1 803d17c: c3 a0 00 00 ret return true; if ( lhs->tv_sec < rhs->tv_sec ) 803d180: 4c 83 00 03 bge r4,r3,803d18c <_Timespec_Greater_than+0x20> 803d184: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 803d188: c3 a0 00 00 ret <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 803d18c: 28 23 00 04 lw r3,(r1+4) 803d190: 28 41 00 04 lw r1,(r2+4) 803d194: 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; } 803d198: c3 a0 00 00 ret 08005884 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005884: 37 9c ff fc addi sp,sp,-4 8005888: 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 ); 800588c: 34 03 00 00 mvi r3,0 8005890: b8 20 10 00 mv r2,r1 8005894: 78 01 08 01 mvhi r1,0x801 8005898: 38 21 c8 48 ori r1,r1,0xc848 800589c: b8 60 20 00 mv r4,r3 80058a0: f8 00 0a d7 calli 80083fc <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 80058a4: 5c 20 00 04 bne r1,r0,80058b4 <_Workspace_Allocate_or_fatal_error+0x30> _Internal_error_Occurred( 80058a8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80058ac: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 80058b0: fb ff f6 aa calli 8003358 <_Internal_error_Occurred> <== NOT EXECUTED true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 80058b4: 2b 9d 00 04 lw ra,(sp+4) 80058b8: 37 9c 00 04 addi sp,sp,4 80058bc: c3 a0 00 00 ret 08024f10 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 8024f10: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8024f14: c3 a0 00 00 ret <== NOT EXECUTED 08019604 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 8019604: 37 9c ff f8 addi sp,sp,-8 8019608: 5b 9d 00 04 sw (sp+4),ra 801960c: 5b 81 00 08 sw (sp+8),r1 8019610: f8 00 02 7c calli 801a000 <__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(); 8019614: fb ff ff d9 calli 8019578 rtems_shutdown_executive(status); 8019618: 2b 81 00 08 lw r1,(sp+8) 801961c: f8 00 00 61 calli 80197a0 8019620: e0 00 00 00 bi 8019620 <_exit+0x1c> <== NOT EXECUTED 0803c014 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 803c014: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 803c018: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return fcntl( fd, cmd, arg ); 803c01c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 803c020: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 803c024: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 803c028: fb ff ff 69 calli 803bdcc <== NOT EXECUTED } 803c02c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803c030: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 803c034: c3 a0 00 00 ret <== NOT EXECUTED 08024edc <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 8024edc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8024ee0: c3 a0 00 00 ret <== NOT EXECUTED 0800724c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 800724c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007250: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return gettimeofday( tp, tzp ); 8007254: fb ff ff e0 calli 80071d4 <== NOT EXECUTED } 8007258: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800725c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007260: c3 a0 00 00 ret <== NOT EXECUTED 08024f08 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 8024f08: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8024f0c: c3 a0 00 00 ret <== NOT EXECUTED 0802802c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 802802c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8028030: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return link( existing, new ); 8028034: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8028038: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802803c: fb ff ff 7e calli 8027e34 <== NOT EXECUTED } 8028040: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028044: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8028048: c3 a0 00 00 ret <== NOT EXECUTED 080282e8 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 80282e8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80282ec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 80282f0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 80282f4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80282f8: fb ff ff c2 calli 8028200 <== NOT EXECUTED } 80282fc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028300: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8028304: c3 a0 00 00 ret <== NOT EXECUTED 0801975c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 801975c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8019760: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return realloc( ptr, size ); 8019764: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8019768: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 801976c: f8 00 00 1b calli 80197d8 <== NOT EXECUTED } 8019770: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8019774: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8019778: c3 a0 00 00 ret <== NOT EXECUTED 0805f1b8 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 805f1b8: 37 9c ff a4 addi sp,sp,-92 <== NOT EXECUTED 805f1bc: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 805f1c0: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 805f1c4: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 805f1c8: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 805f1cc: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 805f1d0: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 805f1d4: 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 ); 805f1d8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 805f1dc: b8 40 70 00 mv r14,r2 <== NOT EXECUTED 805f1e0: 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 ); 805f1e4: fb fe a0 6f calli 80073a0 <== NOT EXECUTED 805f1e8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 805f1ec: 5c 20 00 19 bne r1,r0,805f250 <_rename_r+0x98> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 805f1f0: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED 805f1f4: 64 43 00 5c cmpei r3,r2,92 <== NOT EXECUTED 805f1f8: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 805f1fc: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 805f200: 5c 2d 00 02 bne r1,r13,805f208 <_rename_r+0x50> <== NOT EXECUTED 805f204: 5c 40 00 0a bne r2,r0,805f22c <_rename_r+0x74> <== NOT EXECUTED 805f208: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 805f20c: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 805f210: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 805f214: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f218: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 805f21c: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 805f220: fb ff 9c 63 calli 80463ac <== NOT EXECUTED 805f224: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 805f228: e0 00 00 13 bi 805f274 <_rename_r+0xbc> <== NOT EXECUTED 805f22c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 805f230: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 805f234: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 805f238: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f23c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 805f240: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 805f244: fb ff 9c 5a calli 80463ac <== NOT EXECUTED 805f248: b9 a0 58 00 mv r11,r13 <== NOT EXECUTED 805f24c: e0 00 00 0a bi 805f274 <_rename_r+0xbc> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 805f250: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 805f254: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 805f258: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 805f25c: 37 84 00 34 addi r4,sp,52 <== NOT EXECUTED 805f260: 34 05 00 00 mvi r5,0 <== NOT EXECUTED 805f264: fb fe a0 9d calli 80074d8 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 805f268: 34 0b 00 01 mvi r11,1 <== NOT EXECUTED 805f26c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 805f270: 5c 20 00 a6 bne r1,r0,805f508 <_rename_r+0x350> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 805f274: 37 90 00 48 addi r16,sp,72 <== NOT EXECUTED 805f278: 37 8c 00 34 addi r12,sp,52 <== NOT EXECUTED 805f27c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 805f280: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 805f284: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 805f288: fb ff 9c 49 calli 80463ac <== NOT EXECUTED name = old + old_parent_pathlen; 805f28c: b5 cd 68 00 add r13,r14,r13 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 805f290: b9 a0 08 00 mv r1,r13 <== 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; 805f294: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 805f298: fb ff ab 8d calli 804a0cc <== NOT EXECUTED 805f29c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 805f2a0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f2a4: fb fe a0 30 calli 8007364 <== NOT EXECUTED 805f2a8: b5 a1 68 00 add r13,r13,r1 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 805f2ac: b9 a0 08 00 mv r1,r13 <== 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 ) ); 805f2b0: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 805f2b4: fb ff ab 86 calli 804a0cc <== NOT EXECUTED 805f2b8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 805f2bc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 805f2c0: ba 00 20 00 mv r4,r16 <== NOT EXECUTED 805f2c4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f2c8: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 805f2cc: fb fe a0 49 calli 80073f0 <== NOT EXECUTED 805f2d0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 805f2d4: 44 20 00 0b be r1,r0,805f300 <_rename_r+0x148> <== NOT EXECUTED if ( free_old_parentloc ) 805f2d8: 45 60 00 07 be r11,r0,805f2f4 <_rename_r+0x13c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 805f2dc: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 805f2e0: 44 20 00 05 be r1,r0,805f2f4 <_rename_r+0x13c> <== NOT EXECUTED 805f2e4: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 805f2e8: 44 60 00 03 be r3,r0,805f2f4 <_rename_r+0x13c> <== NOT EXECUTED 805f2ec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 805f2f0: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 805f2f4: fb ff 8d 8c calli 8042924 <__errno> <== NOT EXECUTED 805f2f8: 58 2d 00 00 sw (r1+0),r13 <== NOT EXECUTED 805f2fc: e0 00 00 2a bi 805f3a4 <_rename_r+0x1ec> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 805f300: 41 e2 00 00 lbu r2,(r15+0) <== NOT EXECUTED 805f304: 64 4c 00 5c cmpei r12,r2,92 <== NOT EXECUTED 805f308: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 805f30c: b9 81 60 00 or r12,r12,r1 <== NOT EXECUTED 805f310: 5d 8d 00 02 bne r12,r13,805f318 <_rename_r+0x160> <== NOT EXECUTED 805f314: 5c 4c 00 0a bne r2,r12,805f33c <_rename_r+0x184> <== NOT EXECUTED 805f318: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 805f31c: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 805f320: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 805f324: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 805f328: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 805f32c: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 805f330: fb ff 9c 1f calli 80463ac <== NOT EXECUTED 805f334: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED 805f338: e0 00 00 08 bi 805f358 <_rename_r+0x1a0> <== NOT EXECUTED 805f33c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 805f340: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 805f344: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 805f348: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 805f34c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 805f350: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 805f354: fb ff 9c 16 calli 80463ac <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 805f358: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 805f35c: 28 24 00 04 lw r4,(r1+4) <== NOT EXECUTED 805f360: 5c 80 00 13 bne r4,r0,805f3ac <_rename_r+0x1f4> <== NOT EXECUTED if ( free_old_parentloc ) 805f364: 45 64 00 07 be r11,r4,805f380 <_rename_r+0x1c8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 805f368: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 805f36c: 44 20 00 05 be r1,r0,805f380 <_rename_r+0x1c8> <== NOT EXECUTED 805f370: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f374: 44 40 00 03 be r2,r0,805f380 <_rename_r+0x1c8> <== NOT EXECUTED 805f378: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f37c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 805f380: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 805f384: 44 20 00 05 be r1,r0,805f398 <_rename_r+0x1e0> <== NOT EXECUTED 805f388: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f38c: 44 40 00 03 be r2,r0,805f398 <_rename_r+0x1e0> <== NOT EXECUTED 805f390: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 805f394: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 805f398: fb ff 8d 63 calli 8042924 <__errno> <== NOT EXECUTED 805f39c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 805f3a0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 805f3a4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 805f3a8: e0 00 00 58 bi 805f508 <_rename_r+0x350> <== NOT EXECUTED } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 805f3ac: 37 8d 00 20 addi r13,sp,32 <== NOT EXECUTED 805f3b0: b5 ec 08 00 add r1,r15,r12 <== NOT EXECUTED 805f3b4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 805f3b8: 37 83 00 5c addi r3,sp,92 <== NOT EXECUTED 805f3bc: d8 80 00 00 call r4 <== NOT EXECUTED 805f3c0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( result != 0 ) { 805f3c4: 44 20 00 17 be r1,r0,805f420 <_rename_r+0x268> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 805f3c8: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 805f3cc: 44 20 00 05 be r1,r0,805f3e0 <_rename_r+0x228> <== NOT EXECUTED 805f3d0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f3d4: 44 40 00 03 be r2,r0,805f3e0 <_rename_r+0x228> <== NOT EXECUTED 805f3d8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f3dc: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 805f3e0: 45 60 00 07 be r11,r0,805f3fc <_rename_r+0x244> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 805f3e4: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 805f3e8: 44 20 00 05 be r1,r0,805f3fc <_rename_r+0x244> <== NOT EXECUTED 805f3ec: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f3f0: 44 40 00 03 be r2,r0,805f3fc <_rename_r+0x244> <== NOT EXECUTED 805f3f4: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f3f8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 805f3fc: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 805f400: 44 20 00 05 be r1,r0,805f414 <_rename_r+0x25c> <== NOT EXECUTED 805f404: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f408: 44 40 00 03 be r2,r0,805f414 <_rename_r+0x25c> <== NOT EXECUTED 805f40c: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 805f410: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 805f414: fb ff 8d 44 calli 8042924 <__errno> <== NOT EXECUTED 805f418: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 805f41c: e3 ff ff e2 bi 805f3a4 <_rename_r+0x1ec> <== 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 ) { 805f420: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED 805f424: 2b 83 00 44 lw r3,(sp+68) <== NOT EXECUTED 805f428: 2b 82 00 2c lw r2,(sp+44) <== NOT EXECUTED 805f42c: 44 61 00 16 be r3,r1,805f484 <_rename_r+0x2cc> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 805f430: 44 40 00 05 be r2,r0,805f444 <_rename_r+0x28c> <== NOT EXECUTED 805f434: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 805f438: 44 40 00 03 be r2,r0,805f444 <_rename_r+0x28c> <== NOT EXECUTED 805f43c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f440: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 805f444: 45 60 00 07 be r11,r0,805f460 <_rename_r+0x2a8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 805f448: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 805f44c: 44 20 00 05 be r1,r0,805f460 <_rename_r+0x2a8> <== NOT EXECUTED 805f450: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f454: 44 40 00 03 be r2,r0,805f460 <_rename_r+0x2a8> <== NOT EXECUTED 805f458: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f45c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 805f460: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 805f464: 44 20 00 05 be r1,r0,805f478 <_rename_r+0x2c0> <== NOT EXECUTED 805f468: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f46c: 44 40 00 03 be r2,r0,805f478 <_rename_r+0x2c0> <== NOT EXECUTED 805f470: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 805f474: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 805f478: fb ff 8d 2b calli 8042924 <__errno> <== NOT EXECUTED 805f47c: 34 02 00 12 mvi r2,18 <== NOT EXECUTED 805f480: e3 ff ff c8 bi 805f3a0 <_rename_r+0x1e8> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 805f484: 28 45 00 40 lw r5,(r2+64) <== NOT EXECUTED 805f488: 5c a0 00 07 bne r5,r0,805f4a4 <_rename_r+0x2ec> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 805f48c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 805f490: 44 45 00 03 be r2,r5,805f49c <_rename_r+0x2e4> <== NOT EXECUTED 805f494: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f498: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 805f49c: 45 60 ff b9 be r11,r0,805f380 <_rename_r+0x1c8> <== NOT EXECUTED 805f4a0: e3 ff ff b2 bi 805f368 <_rename_r+0x1b0> <== 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 ); 805f4a4: 2b 84 00 5c lw r4,(sp+92) <== NOT EXECUTED 805f4a8: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f4ac: 37 82 00 48 addi r2,sp,72 <== NOT EXECUTED 805f4b0: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 805f4b4: d8 a0 00 00 call r5 <== NOT EXECUTED 805f4b8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 805f4bc: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 805f4c0: 44 20 00 05 be r1,r0,805f4d4 <_rename_r+0x31c> <== NOT EXECUTED 805f4c4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f4c8: 44 40 00 03 be r2,r0,805f4d4 <_rename_r+0x31c> <== NOT EXECUTED 805f4cc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 805f4d0: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 805f4d4: 45 60 00 07 be r11,r0,805f4f0 <_rename_r+0x338> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 805f4d8: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 805f4dc: 44 20 00 05 be r1,r0,805f4f0 <_rename_r+0x338> <== NOT EXECUTED 805f4e0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f4e4: 44 40 00 03 be r2,r0,805f4f0 <_rename_r+0x338> <== NOT EXECUTED 805f4e8: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 805f4ec: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 805f4f0: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 805f4f4: 44 20 00 05 be r1,r0,805f508 <_rename_r+0x350> <== NOT EXECUTED 805f4f8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 805f4fc: 44 40 00 03 be r2,r0,805f508 <_rename_r+0x350> <== NOT EXECUTED 805f500: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 805f504: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 805f508: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 805f50c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 805f510: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 805f514: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 805f518: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 805f51c: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 805f520: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 805f524: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 805f528: 37 9c 00 5c addi sp,sp,92 <== NOT EXECUTED 805f52c: c3 a0 00 00 ret <== NOT EXECUTED 08008fdc <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 8008fdc: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8008fe0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 8008fe4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8008fe8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8008fec: fb ff ff c2 calli 8008ef4 <== NOT EXECUTED } 8008ff0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008ff4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8008ff8: c3 a0 00 00 ret <== NOT EXECUTED 0800ae14 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 800ae14: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800ae18: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return unlink( path ); 800ae1c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800ae20: fb ff ff 6d calli 800abd4 <== NOT EXECUTED } 800ae24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ae28: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800ae2c: c3 a0 00 00 ret <== NOT EXECUTED 080267a4 : #include int chdir( const char *pathname ) { 80267a4: 37 9c ff e0 addi sp,sp,-32 80267a8: 5b 8b 00 0c sw (sp+12),r11 80267ac: 5b 8c 00 08 sw (sp+8),r12 80267b0: 5b 9d 00 04 sw (sp+4),ra 80267b4: 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 ); 80267b8: f8 00 8e 45 calli 804a0cc /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 80267bc: 34 03 00 01 mvi r3,1 80267c0: 37 8b 00 10 addi r11,sp,16 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 80267c4: b8 20 10 00 mv r2,r1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 80267c8: b9 60 20 00 mv r4,r11 80267cc: b9 80 08 00 mv r1,r12 80267d0: b8 60 28 00 mv r5,r3 80267d4: fb ff 83 41 calli 80074d8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 80267d8: 34 02 ff ff mvi r2,-1 80267dc: 5c 20 00 2b bne r1,r0,8026888 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 80267e0: 2b 83 00 1c lw r3,(sp+28) 80267e4: 28 62 00 10 lw r2,(r3+16) 80267e8: 5c 41 00 08 bne r2,r1,8026808 rtems_filesystem_freenode( &loc ); 80267ec: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 80267f0: 44 62 00 03 be r3,r2,80267fc <== NOT EXECUTED 80267f4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80267f8: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 80267fc: f8 00 70 4a calli 8042924 <__errno> <== NOT EXECUTED 8026800: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026804: e0 00 00 0d bi 8026838 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 8026808: b9 60 08 00 mv r1,r11 802680c: d8 40 00 00 call r2 8026810: 34 02 00 01 mvi r2,1 8026814: 44 22 00 0c be r1,r2,8026844 rtems_filesystem_freenode( &loc ); 8026818: 2b 81 00 1c lw r1,(sp+28) 802681c: 44 20 00 05 be r1,r0,8026830 8026820: 28 22 00 1c lw r2,(r1+28) 8026824: 44 40 00 03 be r2,r0,8026830 8026828: b9 60 08 00 mv r1,r11 802682c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8026830: f8 00 70 3d calli 8042924 <__errno> 8026834: 34 02 00 14 mvi r2,20 8026838: 58 22 00 00 sw (r1+0),r2 802683c: 34 02 ff ff mvi r2,-1 8026840: e0 00 00 12 bi 8026888 } rtems_filesystem_freenode( &rtems_filesystem_current ); 8026844: 78 01 08 06 mvhi r1,0x806 8026848: 38 21 b2 f0 ori r1,r1,0xb2f0 802684c: 28 21 00 00 lw r1,(r1+0) 8026850: 28 22 00 10 lw r2,(r1+16) 8026854: 44 40 00 05 be r2,r0,8026868 8026858: 28 42 00 1c lw r2,(r2+28) 802685c: 44 40 00 03 be r2,r0,8026868 8026860: 34 21 00 04 addi r1,r1,4 8026864: d8 40 00 00 call r2 rtems_filesystem_current = loc; 8026868: 78 01 08 06 mvhi r1,0x806 802686c: 38 21 b2 f0 ori r1,r1,0xb2f0 8026870: 28 21 00 00 lw r1,(r1+0) 8026874: 37 82 00 10 addi r2,sp,16 8026878: 34 03 00 14 mvi r3,20 802687c: 34 21 00 04 addi r1,r1,4 8026880: f8 00 7e cb calli 80463ac 8026884: 34 02 00 00 mvi r2,0 return 0; } 8026888: b8 40 08 00 mv r1,r2 802688c: 2b 9d 00 04 lw ra,(sp+4) 8026890: 2b 8b 00 0c lw r11,(sp+12) 8026894: 2b 8c 00 08 lw r12,(sp+8) 8026898: 37 9c 00 20 addi sp,sp,32 802689c: c3 a0 00 00 ret 08007198 : int chmod( const char *path, mode_t mode ) { 8007198: 37 9c ff dc addi sp,sp,-36 800719c: 5b 8b 00 10 sw (sp+16),r11 80071a0: 5b 8c 00 0c sw (sp+12),r12 80071a4: 5b 8d 00 08 sw (sp+8),r13 80071a8: 5b 9d 00 04 sw (sp+4),ra 80071ac: b8 20 60 00 mv r12,r1 80071b0: 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 ); 80071b4: 37 8b 00 14 addi r11,sp,20 80071b8: f8 01 0b c5 calli 804a0cc 80071bc: b8 20 10 00 mv r2,r1 80071c0: 34 03 00 00 mvi r3,0 80071c4: b9 80 08 00 mv r1,r12 80071c8: b9 60 20 00 mv r4,r11 80071cc: 34 05 00 01 mvi r5,1 80071d0: f8 00 00 c2 calli 80074d8 if ( status != 0 ) 80071d4: 34 0c ff ff mvi r12,-1 80071d8: 5c 20 00 23 bne r1,r0,8007264 return -1; if ( !loc.handlers ){ 80071dc: 2b 83 00 1c lw r3,(sp+28) 80071e0: 5c 61 00 0a bne r3,r1,8007208 rtems_filesystem_freenode( &loc ); 80071e4: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 80071e8: 44 23 00 05 be r1,r3,80071fc <== NOT EXECUTED 80071ec: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80071f0: 44 43 00 03 be r2,r3,80071fc <== NOT EXECUTED 80071f4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80071f8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 80071fc: f8 00 ed ca calli 8042924 <__errno> <== NOT EXECUTED 8007200: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8007204: e0 00 00 0b bi 8007230 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 8007208: 28 63 00 1c lw r3,(r3+28) 800720c: 5c 60 00 0c bne r3,r0,800723c rtems_filesystem_freenode( &loc ); 8007210: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007214: 44 23 00 05 be r1,r3,8007228 <== NOT EXECUTED 8007218: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800721c: 44 40 00 03 be r2,r0,8007228 <== NOT EXECUTED 8007220: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007224: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8007228: f8 00 ed bf calli 8042924 <__errno> <== NOT EXECUTED 800722c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007230: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007234: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8007238: e0 00 00 0b bi 8007264 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 800723c: b9 a0 10 00 mv r2,r13 8007240: b9 60 08 00 mv r1,r11 8007244: d8 60 00 00 call r3 8007248: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 800724c: 2b 81 00 20 lw r1,(sp+32) 8007250: 44 20 00 05 be r1,r0,8007264 8007254: 28 22 00 1c lw r2,(r1+28) 8007258: 44 40 00 03 be r2,r0,8007264 800725c: b9 60 08 00 mv r1,r11 8007260: d8 40 00 00 call r2 return result; } 8007264: b9 80 08 00 mv r1,r12 8007268: 2b 9d 00 04 lw ra,(sp+4) 800726c: 2b 8b 00 10 lw r11,(sp+16) 8007270: 2b 8c 00 0c lw r12,(sp+12) 8007274: 2b 8d 00 08 lw r13,(sp+8) 8007278: 37 9c 00 24 addi sp,sp,36 800727c: c3 a0 00 00 ret 080268a0 : int chown( const char *path, uid_t owner, gid_t group ) { 80268a0: 37 9c ff d8 addi sp,sp,-40 80268a4: 5b 8b 00 14 sw (sp+20),r11 80268a8: 5b 8c 00 10 sw (sp+16),r12 80268ac: 5b 8d 00 0c sw (sp+12),r13 80268b0: 5b 8e 00 08 sw (sp+8),r14 80268b4: 5b 9d 00 04 sw (sp+4),ra 80268b8: b8 20 60 00 mv r12,r1 80268bc: 20 4e ff ff andi r14,r2,0xffff 80268c0: 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 ) ) 80268c4: 37 8b 00 18 addi r11,sp,24 80268c8: f8 00 8e 01 calli 804a0cc 80268cc: b8 20 10 00 mv r2,r1 80268d0: 34 03 00 00 mvi r3,0 80268d4: b9 80 08 00 mv r1,r12 80268d8: b9 60 20 00 mv r4,r11 80268dc: 34 05 00 01 mvi r5,1 80268e0: fb ff 82 fe calli 80074d8 80268e4: 34 0c ff ff mvi r12,-1 80268e8: 5c 20 00 18 bne r1,r0,8026948 return -1; if ( !loc.ops->chown_h ) { 80268ec: 2b 85 00 24 lw r5,(sp+36) 80268f0: 28 a4 00 18 lw r4,(r5+24) 80268f4: 5c 81 00 0a bne r4,r1,802691c rtems_filesystem_freenode( &loc ); 80268f8: 28 a2 00 1c lw r2,(r5+28) <== NOT EXECUTED 80268fc: 44 44 00 03 be r2,r4,8026908 <== NOT EXECUTED 8026900: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8026904: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026908: f8 00 70 07 calli 8042924 <__errno> <== NOT EXECUTED 802690c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026910: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026914: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8026918: e0 00 00 0c bi 8026948 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 802691c: b9 c0 10 00 mv r2,r14 8026920: b9 a0 18 00 mv r3,r13 8026924: b9 60 08 00 mv r1,r11 8026928: d8 80 00 00 call r4 802692c: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 8026930: 2b 81 00 24 lw r1,(sp+36) 8026934: 44 20 00 05 be r1,r0,8026948 8026938: 28 22 00 1c lw r2,(r1+28) 802693c: 44 40 00 03 be r2,r0,8026948 8026940: b9 60 08 00 mv r1,r11 8026944: d8 40 00 00 call r2 return result; } 8026948: b9 80 08 00 mv r1,r12 802694c: 2b 9d 00 04 lw ra,(sp+4) 8026950: 2b 8b 00 14 lw r11,(sp+20) 8026954: 2b 8c 00 10 lw r12,(sp+16) 8026958: 2b 8d 00 0c lw r13,(sp+12) 802695c: 2b 8e 00 08 lw r14,(sp+8) 8026960: 37 9c 00 28 addi sp,sp,40 8026964: c3 a0 00 00 ret 08026968 : #include int chroot( const char *pathname ) { 8026968: 37 9c ff dc addi sp,sp,-36 802696c: 5b 8b 00 10 sw (sp+16),r11 8026970: 5b 8c 00 0c sw (sp+12),r12 8026974: 5b 8d 00 08 sw (sp+8),r13 8026978: 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) { 802697c: 78 0b 08 06 mvhi r11,0x806 8026980: 39 6b b2 f0 ori r11,r11,0xb2f0 8026984: 29 6c 00 00 lw r12,(r11+0) 8026988: 78 02 08 06 mvhi r2,0x806 802698c: 38 42 ee e4 ori r2,r2,0xeee4 #include int chroot( const char *pathname ) { 8026990: b8 20 68 00 mv r13,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) { 8026994: 5d 82 00 08 bne r12,r2,80269b4 rtems_libio_set_private_env(); /* try to set a new private env*/ 8026998: f8 00 07 6a calli 8028740 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 802699c: 29 61 00 00 lw r1,(r11+0) 80269a0: 5c 2c 00 05 bne r1,r12,80269b4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 80269a4: f8 00 6f e0 calli 8042924 <__errno> <== NOT EXECUTED 80269a8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80269ac: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80269b0: e0 00 00 0a bi 80269d8 <== NOT EXECUTED } result = chdir(pathname); 80269b4: b9 a0 08 00 mv r1,r13 80269b8: fb ff ff 7b calli 80267a4 80269bc: b8 20 58 00 mv r11,r1 if (result) { 80269c0: 44 20 00 08 be r1,r0,80269e0 rtems_set_errno_and_return_minus_one( errno ); 80269c4: f8 00 6f d8 calli 8042924 <__errno> <== NOT EXECUTED 80269c8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 80269cc: f8 00 6f d6 calli 8042924 <__errno> <== NOT EXECUTED 80269d0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80269d4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED 80269d8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80269dc: e0 00 00 1b bi 8026a48 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 80269e0: 78 01 08 06 mvhi r1,0x806 80269e4: 34 02 00 01 mvi r2,1 80269e8: 38 21 13 ec ori r1,r1,0x13ec 80269ec: b9 60 18 00 mv r3,r11 80269f0: 37 84 00 14 addi r4,sp,20 80269f4: b9 60 28 00 mv r5,r11 80269f8: fb ff 82 b8 calli 80074d8 80269fc: b8 20 10 00 mv r2,r1 8026a00: 5c 2b ff f1 bne r1,r11,80269c4 /* 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); 8026a04: 78 01 08 06 mvhi r1,0x806 8026a08: 38 21 b2 f0 ori r1,r1,0xb2f0 8026a0c: 28 21 00 00 lw r1,(r1+0) 8026a10: 28 23 00 24 lw r3,(r1+36) 8026a14: 44 62 00 05 be r3,r2,8026a28 8026a18: 28 63 00 1c lw r3,(r3+28) 8026a1c: 44 62 00 03 be r3,r2,8026a28 8026a20: 34 21 00 18 addi r1,r1,24 8026a24: d8 60 00 00 call r3 rtems_filesystem_root = loc; 8026a28: 78 01 08 06 mvhi r1,0x806 8026a2c: 38 21 b2 f0 ori r1,r1,0xb2f0 8026a30: 28 21 00 00 lw r1,(r1+0) 8026a34: 37 82 00 14 addi r2,sp,20 8026a38: 34 03 00 14 mvi r3,20 8026a3c: 34 21 00 18 addi r1,r1,24 8026a40: f8 00 7e 5b calli 80463ac 8026a44: 34 01 00 00 mvi r1,0 return 0; } 8026a48: 2b 9d 00 04 lw ra,(sp+4) 8026a4c: 2b 8b 00 10 lw r11,(sp+16) 8026a50: 2b 8c 00 0c lw r12,(sp+12) 8026a54: 2b 8d 00 08 lw r13,(sp+8) 8026a58: 37 9c 00 24 addi sp,sp,36 8026a5c: c3 a0 00 00 ret 08004afc : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004afc: 37 9c ff f0 addi sp,sp,-16 8004b00: 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; 8004b04: 28 23 00 3c lw r3,(r1+60) #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004b08: 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; 8004b0c: 34 01 00 00 mvi r1,0 args.mode = 0; 8004b10: 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; 8004b14: 5b 81 00 0c sw (sp+12),r1 args.mode = 0; status = rtems_io_close( 8004b18: 28 62 00 0c lw r2,(r3+12) 8004b1c: 28 61 00 08 lw r1,(r3+8) 8004b20: 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; 8004b24: 5b 84 00 08 sw (sp+8),r4 args.flags = 0; args.mode = 0; status = rtems_io_close( 8004b28: f8 00 04 e9 calli 8005ecc np->major, np->minor, (void *) &args ); if ( status ) { 8004b2c: b8 20 10 00 mv r2,r1 8004b30: 44 20 00 03 be r1,r0,8004b3c return rtems_deviceio_errno(status); 8004b34: f8 00 00 48 calli 8004c54 <== NOT EXECUTED 8004b38: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 8004b3c: b8 40 08 00 mv r1,r2 8004b40: 2b 9d 00 04 lw ra,(sp+4) 8004b44: 37 9c 00 10 addi sp,sp,16 8004b48: c3 a0 00 00 ret 08004b58 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8004b58: 37 9c ff e0 addi sp,sp,-32 8004b5c: 5b 8b 00 20 sw (sp+32),r11 8004b60: 5b 8c 00 1c sw (sp+28),r12 8004b64: 5b 8d 00 18 sw (sp+24),r13 8004b68: 5b 8e 00 14 sw (sp+20),r14 8004b6c: 5b 8f 00 10 sw (sp+16),r15 8004b70: 5b 90 00 0c sw (sp+12),r16 8004b74: 5b 91 00 08 sw (sp+8),r17 8004b78: 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; 8004b7c: 28 8c 00 00 lw r12,(r4+0) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8004b80: b8 80 58 00 mv r11,r4 8004b84: b8 20 88 00 mv r17,r1 8004b88: b8 40 80 00 mv r16,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) 8004b8c: 45 80 00 05 be r12,r0,8004ba0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8004b90: 78 0d 08 00 mvhi r13,0x800 8004b94: 39 ad c0 14 ori r13,r13,0xc014 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) 8004b98: 34 0e 00 00 mvi r14,0 8004b9c: e0 00 00 1c bi 8004c0c rtems_set_errno_and_return_minus_one( EFAULT ); 8004ba0: f8 00 0e 12 calli 80083e8 <__errno> <== NOT EXECUTED 8004ba4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8004ba8: e0 00 00 1f bi 8004c24 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 8004bac: 29 8f 00 00 lw r15,(r12+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 ); for (i = 0; i < rtems_device_table_size; i++) { 8004bb0: 35 ce 00 01 addi r14,r14,1 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8004bb4: b9 e0 10 00 mv r2,r15 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++) { if (!device_name_table[i].device_name) 8004bb8: 45 e0 00 14 be r15,r0,8004c08 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8004bbc: f8 00 12 a0 calli 800963c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8004bc0: b5 f0 78 00 add r15,r15,r16 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) 8004bc4: 5c 20 00 11 bne r1,r0,8004c08 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8004bc8: 41 e5 00 00 lbu r5,(r15+0) 8004bcc: 5c a1 00 0f bne r5,r1,8004c08 /* 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; 8004bd0: 78 02 08 00 mvhi r2,0x800 8004bd4: 38 42 c1 7c ori r2,r2,0xc17c 8004bd8: 28 41 00 00 lw r1,(r2+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; 8004bdc: 78 03 08 00 mvhi r3,0x800 pathloc->ops = &devFS_ops; 8004be0: 78 02 08 00 mvhi r2,0x800 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004be4: 28 21 00 28 lw r1,(r1+40) 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; 8004be8: 38 63 c1 44 ori r3,r3,0xc144 pathloc->ops = &devFS_ops; 8004bec: 38 42 c0 fc ori r2,r2,0xc0fc pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004bf0: 59 61 00 10 sw (r11+16),r1 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 8004bf4: 59 6c 00 00 sw (r11+0),r12 pathloc->handlers = &devFS_file_handlers; 8004bf8: 59 63 00 08 sw (r11+8),r3 pathloc->ops = &devFS_ops; 8004bfc: 59 62 00 0c sw (r11+12),r2 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004c00: b8 a0 08 00 mv r1,r5 return 0; 8004c04: e0 00 00 0a bi 8004c2c /* 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++) { 8004c08: 35 8c 00 14 addi r12,r12,20 8004c0c: 29 a2 00 00 lw r2,(r13+0) if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8004c10: ba 20 08 00 mv r1,r17 8004c14: ba 00 18 00 mv r3,r16 /* 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++) { 8004c18: 54 4e ff e5 bgu r2,r14,8004bac pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8004c1c: f8 00 0d f3 calli 80083e8 <__errno> 8004c20: 34 02 00 02 mvi r2,2 8004c24: 58 22 00 00 sw (r1+0),r2 8004c28: 34 01 ff ff mvi r1,-1 } 8004c2c: 2b 9d 00 04 lw ra,(sp+4) 8004c30: 2b 8b 00 20 lw r11,(sp+32) 8004c34: 2b 8c 00 1c lw r12,(sp+28) 8004c38: 2b 8d 00 18 lw r13,(sp+24) 8004c3c: 2b 8e 00 14 lw r14,(sp+20) 8004c40: 2b 8f 00 10 lw r15,(sp+16) 8004c44: 2b 90 00 0c lw r16,(sp+12) 8004c48: 2b 91 00 08 lw r17,(sp+8) 8004c4c: 37 9c 00 20 addi sp,sp,32 8004c50: c3 a0 00 00 ret 080007e8 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 80007e8: 37 9c ff f0 addi sp,sp,-16 80007ec: 5b 8b 00 10 sw (sp+16),r11 80007f0: 5b 8c 00 0c sw (sp+12),r12 80007f4: 5b 8d 00 08 sw (sp+8),r13 80007f8: 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( 80007fc: 78 0b 08 00 mvhi r11,0x800 8000800: 39 6b c0 14 ori r11,r11,0xc014 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8000804: b8 20 60 00 mv r12,r1 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 8000808: 29 61 00 00 lw r1,(r11+0) 800080c: 34 02 00 02 mvi r2,2 8000810: fb ff fe 52 calli 8000158 <__ashlsi3> 8000814: 34 02 00 02 mvi r2,2 8000818: b8 20 68 00 mv r13,r1 800081c: fb ff fe 4f calli 8000158 <__ashlsi3> 8000820: b5 a1 08 00 add r1,r13,r1 8000824: f8 00 0f 9f calli 80046a0 <_Workspace_Allocate> 8000828: b8 20 68 00 mv r13,r1 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 800082c: 5c 20 00 06 bne r1,r0,8000844 rtems_set_errno_and_return_minus_one( ENOMEM ); 8000830: f8 00 1e ee calli 80083e8 <__errno> <== NOT EXECUTED 8000834: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000838: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800083c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000840: e0 00 00 13 bi 800088c <== NOT EXECUTED memset( 8000844: 29 61 00 00 lw r1,(r11+0) 8000848: 34 02 00 02 mvi r2,2 800084c: fb ff fe 43 calli 8000158 <__ashlsi3> 8000850: 34 02 00 02 mvi r2,2 8000854: b8 20 58 00 mv r11,r1 8000858: fb ff fe 40 calli 8000158 <__ashlsi3> 800085c: b5 61 18 00 add r3,r11,r1 8000860: 34 02 00 00 mvi r2,0 8000864: b9 a0 08 00 mv r1,r13 8000868: f8 00 21 c3 calli 8008f74 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; 800086c: 78 03 08 00 mvhi r3,0x800 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000870: 78 02 08 00 mvhi r2,0x800 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; 8000874: 38 63 c1 44 ori r3,r3,0xc144 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000878: 38 42 c0 fc ori r2,r2,0xc0fc /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 800087c: 59 8d 00 1c sw (r12+28),r13 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: 59 83 00 24 sw (r12+36),r3 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000884: 59 82 00 28 sw (r12+40),r2 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 8000888: 34 01 00 00 mvi r1,0 return 0; } 800088c: 2b 9d 00 04 lw ra,(sp+4) 8000890: 2b 8b 00 10 lw r11,(sp+16) 8000894: 2b 8c 00 0c lw r12,(sp+12) 8000898: 2b 8d 00 08 lw r13,(sp+8) 800089c: 37 9c 00 10 addi sp,sp,16 80008a0: c3 a0 00 00 ret 08000a40 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8000a40: 37 9c ff ec addi sp,sp,-20 8000a44: 5b 9d 00 04 sw (sp+4),ra 8000a48: 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; 8000a4c: 28 21 00 3c lw r1,(r1+60) args.iop = iop; args.command = command; 8000a50: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8000a54: 5b 83 00 10 sw (sp+16),r3 status = rtems_io_control( 8000a58: 28 22 00 0c lw r2,(r1+12) 8000a5c: 28 21 00 08 lw r1,(r1+8) 8000a60: 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; 8000a64: 5b 84 00 08 sw (sp+8),r4 args.command = command; args.buffer = buffer; status = rtems_io_control( 8000a68: f8 00 06 b5 calli 800253c np->major, np->minor, (void *) &args ); if ( status ) 8000a6c: 44 20 00 03 be r1,r0,8000a78 return rtems_deviceio_errno(status); 8000a70: f8 00 10 79 calli 8004c54 <== NOT EXECUTED 8000a74: e0 00 00 02 bi 8000a7c <== NOT EXECUTED return args.ioctl_return; 8000a78: 2b 81 00 14 lw r1,(sp+20) } 8000a7c: 2b 9d 00 04 lw ra,(sp+4) 8000a80: 37 9c 00 14 addi sp,sp,20 8000a84: c3 a0 00 00 ret 080008a4 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008a4: 37 9c ff d8 addi sp,sp,-40 80008a8: 5b 8b 00 28 sw (sp+40),r11 80008ac: 5b 8c 00 24 sw (sp+36),r12 80008b0: 5b 8d 00 20 sw (sp+32),r13 80008b4: 5b 8e 00 1c sw (sp+28),r14 80008b8: 5b 8f 00 18 sw (sp+24),r15 80008bc: 5b 90 00 14 sw (sp+20),r16 80008c0: 5b 91 00 10 sw (sp+16),r17 80008c4: 5b 92 00 0c sw (sp+12),r18 80008c8: 5b 93 00 08 sw (sp+8),r19 80008cc: 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') && 80008d0: 40 26 00 00 lbu r6,(r1+0) const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008d4: b8 20 58 00 mv r11,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') && 80008d8: 34 01 00 64 mvi r1,100 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008dc: b8 40 88 00 mv r17,r2 80008e0: b8 60 98 00 mv r19,r3 80008e4: 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') && 80008e8: 5c c1 00 0a bne r6,r1,8000910 80008ec: 41 62 00 01 lbu r2,(r11+1) 80008f0: 34 01 00 65 mvi r1,101 80008f4: 5c 41 00 07 bne r2,r1,8000910 (path[2] == 'v') && (path[3] == '\0')) 80008f8: 41 62 00 02 lbu r2,(r11+2) 80008fc: 34 01 00 76 mvi r1,118 8000900: 5c 41 00 04 bne r2,r1,8000910 8000904: 41 62 00 03 lbu r2,(r11+3) 8000908: b8 40 08 00 mv r1,r2 800090c: 44 40 00 3f be r2,r0,8000a08 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 8000910: 22 21 f0 00 andi r1,r17,0xf000 8000914: 7c 22 60 00 cmpnei r2,r1,24576 8000918: 7c 2f 20 00 cmpnei r15,r1,8192 800091c: a1 e2 78 00 and r15,r15,r2 8000920: 45 e0 00 04 be r15,r0,8000930 rtems_set_errno_and_return_minus_one( EINVAL ); 8000924: f8 00 1e b1 calli 80083e8 <__errno> <== NOT EXECUTED 8000928: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800092c: e0 00 00 0a bi 8000954 <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8000930: 28 b0 00 00 lw r16,(r5+0) if (!device_name_table) 8000934: 46 0f 00 06 be r16,r15,800094c rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000938: 78 0e 08 00 mvhi r14,0x800 800093c: 39 ce c0 14 ori r14,r14,0xc014 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; if (!device_name_table) 8000940: ba 00 60 00 mv r12,r16 8000944: 34 0d ff ff mvi r13,-1 8000948: e0 00 00 11 bi 800098c rtems_set_errno_and_return_minus_one( EFAULT ); 800094c: f8 00 1e a7 calli 80083e8 <__errno> <== NOT EXECUTED 8000950: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000954: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000958: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800095c: e0 00 00 2b bi 8000a08 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 8000960: 29 85 00 00 lw r5,(r12+0) /* 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++){ 8000964: 35 8c 00 14 addi r12,r12,20 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000968: 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) 800096c: 44 a0 00 06 be r5,r0,8000984 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000970: f8 00 22 b8 calli 8009450 <== NOT EXECUTED 8000974: 5c 20 00 05 bne r1,r0,8000988 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 8000978: f8 00 1e 9c calli 80083e8 <__errno> <== NOT EXECUTED 800097c: 34 02 00 11 mvi r2,17 <== NOT EXECUTED 8000980: e3 ff ff f5 bi 8000954 <== NOT EXECUTED 8000984: b9 e0 68 00 mv r13,r15 /* 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++){ 8000988: 35 ef 00 01 addi r15,r15,1 800098c: 29 c2 00 00 lw r2,(r14+0) if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000990: b9 60 08 00 mv r1,r11 /* 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++){ 8000994: 54 4f ff f3 bgu r2,r15,8000960 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 8000998: 34 01 ff ff mvi r1,-1 800099c: 5d a1 00 06 bne r13,r1,80009b4 rtems_set_errno_and_return_minus_one( ENOMEM ); 80009a0: f8 00 1e 92 calli 80083e8 <__errno> <== NOT EXECUTED 80009a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80009a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80009ac: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80009b0: e0 00 00 16 bi 8000a08 <== NOT EXECUTED _ISR_Disable(level); 80009b4: 90 00 70 00 rcsr r14,IE 80009b8: 34 01 ff fe mvi r1,-2 80009bc: a1 c1 08 00 and r1,r14,r1 80009c0: d0 01 00 00 wcsr IE,r1 device_name_table[slot].device_name = (char *)path; 80009c4: 34 02 00 02 mvi r2,2 80009c8: b9 a0 08 00 mv r1,r13 80009cc: fb ff fd e3 calli 8000158 <__ashlsi3> 80009d0: 34 02 00 02 mvi r2,2 80009d4: b8 20 60 00 mv r12,r1 80009d8: fb ff fd e0 calli 8000158 <__ashlsi3> 80009dc: b5 81 08 00 add r1,r12,r1 80009e0: b6 01 60 00 add r12,r16,r1 80009e4: 59 8b 00 00 sw (r12+0),r11 device_name_table[slot].device_name_length = strlen(path); 80009e8: b9 60 08 00 mv r1,r11 80009ec: f8 00 22 e9 calli 8009590 80009f0: 59 81 00 04 sw (r12+4),r1 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 80009f4: 59 91 00 10 sw (r12+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; 80009f8: 59 93 00 08 sw (r12+8),r19 device_name_table[slot].minor = minor; 80009fc: 59 92 00 0c sw (r12+12),r18 device_name_table[slot].mode = mode; _ISR_Enable(level); 8000a00: d0 0e 00 00 wcsr IE,r14 8000a04: 34 01 00 00 mvi r1,0 return 0; } 8000a08: 2b 9d 00 04 lw ra,(sp+4) 8000a0c: 2b 8b 00 28 lw r11,(sp+40) 8000a10: 2b 8c 00 24 lw r12,(sp+36) 8000a14: 2b 8d 00 20 lw r13,(sp+32) 8000a18: 2b 8e 00 1c lw r14,(sp+28) 8000a1c: 2b 8f 00 18 lw r15,(sp+24) 8000a20: 2b 90 00 14 lw r16,(sp+20) 8000a24: 2b 91 00 10 lw r17,(sp+16) 8000a28: 2b 92 00 0c lw r18,(sp+12) 8000a2c: 2b 93 00 08 lw r19,(sp+8) 8000a30: 37 9c 00 28 addi sp,sp,40 8000a34: c3 a0 00 00 ret 08000a88 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8000a88: 37 9c ff f0 addi sp,sp,-16 8000a8c: 5b 9d 00 04 sw (sp+4),ra 8000a90: 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; 8000a94: 28 21 00 18 lw r1,(r1+24) args.mode = mode; 8000a98: 5b 84 00 10 sw (sp+16),r4 status = rtems_io_open( 8000a9c: 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; 8000aa0: 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; 8000aa4: 28 a1 00 3c lw r1,(r5+60) args.iop = iop; 8000aa8: 5b 85 00 08 sw (sp+8),r5 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 8000aac: 28 22 00 0c lw r2,(r1+12) 8000ab0: 28 21 00 08 lw r1,(r1+8) 8000ab4: f8 00 07 12 calli 80026fc np->major, np->minor, (void *) &args ); if ( status ) 8000ab8: b8 20 10 00 mv r2,r1 8000abc: 44 20 00 03 be r1,r0,8000ac8 return rtems_deviceio_errno(status); 8000ac0: f8 00 10 65 calli 8004c54 <== NOT EXECUTED 8000ac4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 8000ac8: b8 40 08 00 mv r1,r2 8000acc: 2b 9d 00 04 lw ra,(sp+4) 8000ad0: 37 9c 00 10 addi sp,sp,16 8000ad4: c3 a0 00 00 ret 08000ad8 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8000ad8: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8000adc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000ae0: 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; 8000ae4: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED 8000ae8: 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; 8000aec: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED 8000af0: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED 8000af4: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED args.buffer = buffer; args.count = count; 8000af8: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8000afc: 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; 8000b00: 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; 8000b04: 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; 8000b08: 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; 8000b0c: 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( 8000b10: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8000b14: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8000b18: 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; 8000b1c: 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( 8000b20: f8 00 07 1c calli 8002790 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 8000b24: 44 20 00 03 be r1,r0,8000b30 <== NOT EXECUTED return rtems_deviceio_errno(status); 8000b28: f8 00 10 4b calli 8004c54 <== NOT EXECUTED 8000b2c: e0 00 00 02 bi 8000b34 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8000b30: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8000b34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000b38: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000b3c: c3 a0 00 00 ret <== NOT EXECUTED 08000b40 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8000b40: 37 9c ff fc addi sp,sp,-4 8000b44: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 8000b48: 28 21 00 00 lw r1,(r1+0) if (!the_dev) 8000b4c: 5c 20 00 06 bne r1,r0,8000b64 rtems_set_errno_and_return_minus_one( EFAULT ); 8000b50: f8 00 1e 26 calli 80083e8 <__errno> <== NOT EXECUTED 8000b54: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000b58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000b5c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000b60: e0 00 00 08 bi 8000b80 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000b64: 28 23 00 0c lw r3,(r1+12) buf->st_mode = the_dev->mode; 8000b68: 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 ); 8000b6c: 28 21 00 08 lw r1,(r1+8) 8000b70: 58 43 00 1c sw (r2+28),r3 buf->st_mode = the_dev->mode; 8000b74: 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 ); 8000b78: 58 41 00 18 sw (r2+24),r1 buf->st_mode = the_dev->mode; 8000b7c: 34 01 00 00 mvi r1,0 return 0; } 8000b80: 2b 9d 00 04 lw ra,(sp+4) 8000b84: 37 9c 00 04 addi sp,sp,4 8000b88: c3 a0 00 00 ret 08000b8c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8000b8c: 37 9c ff dc addi sp,sp,-36 8000b90: 5b 9d 00 04 sw (sp+4),ra 8000b94: 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; 8000b98: 28 21 00 18 lw r1,(r1+24) 8000b9c: 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; 8000ba0: 28 81 00 14 lw r1,(r4+20) 8000ba4: 5b 81 00 14 sw (sp+20),r1 8000ba8: 28 81 00 10 lw r1,(r4+16) args.buffer = (void *) buffer; args.count = count; 8000bac: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 8000bb0: 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; 8000bb4: 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; 8000bb8: 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; 8000bbc: 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; 8000bc0: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000bc4: 28 22 00 0c lw r2,(r1+12) 8000bc8: 28 21 00 08 lw r1,(r1+8) 8000bcc: 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; 8000bd0: 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( 8000bd4: f8 00 07 14 calli 8002824 np->major, np->minor, (void *) &args ); if ( status ) 8000bd8: 44 20 00 03 be r1,r0,8000be4 return rtems_deviceio_errno(status); 8000bdc: f8 00 10 1e calli 8004c54 <== NOT EXECUTED 8000be0: e0 00 00 02 bi 8000be8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8000be4: 2b 81 00 24 lw r1,(sp+36) } 8000be8: 2b 9d 00 04 lw ra,(sp+4) 8000bec: 37 9c 00 24 addi sp,sp,36 8000bf0: c3 a0 00 00 ret 08009294 : */ int device_close( rtems_libio_t *iop ) { 8009294: 37 9c ff f0 addi sp,sp,-16 8009298: 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; 800929c: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = 0; 80092a0: 34 02 00 00 mvi r2,0 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 80092a4: 5b 81 00 08 sw (sp+8),r1 args.flags = 0; args.mode = 0; 80092a8: 5b 82 00 10 sw (sp+16),r2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; 80092ac: 5b 82 00 0c sw (sp+12),r2 args.mode = 0; status = rtems_io_close( 80092b0: 28 62 00 54 lw r2,(r3+84) 80092b4: 28 61 00 50 lw r1,(r3+80) 80092b8: 37 83 00 08 addi r3,sp,8 80092bc: f8 00 04 61 calli 800a440 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 80092c0: b8 20 10 00 mv r2,r1 80092c4: 44 20 00 03 be r1,r0,80092d0 return rtems_deviceio_errno(status); 80092c8: f8 00 06 20 calli 800ab48 <== NOT EXECUTED 80092cc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 80092d0: b8 40 08 00 mv r1,r2 80092d4: 2b 9d 00 04 lw ra,(sp+4) 80092d8: 37 9c 00 10 addi sp,sp,16 80092dc: c3 a0 00 00 ret 08009188 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8009188: 37 9c ff ec addi sp,sp,-20 800918c: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 8009190: 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; 8009194: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8009198: 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; 800919c: 5b 81 00 08 sw (sp+8),r1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 80091a0: 28 82 00 54 lw r2,(r4+84) 80091a4: 28 81 00 50 lw r1,(r4+80) 80091a8: 37 83 00 08 addi r3,sp,8 80091ac: f8 00 04 ca calli 800a4d4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 80091b0: 44 20 00 03 be r1,r0,80091bc return rtems_deviceio_errno(status); 80091b4: f8 00 06 65 calli 800ab48 <== NOT EXECUTED 80091b8: e0 00 00 02 bi 80091c0 <== NOT EXECUTED return args.ioctl_return; 80091bc: 2b 81 00 14 lw r1,(sp+20) } 80091c0: 2b 9d 00 04 lw ra,(sp+4) 80091c4: 37 9c 00 14 addi sp,sp,20 80091c8: c3 a0 00 00 ret 080092e0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 80092e0: 37 9c ff f0 addi sp,sp,-16 80092e4: 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; 80092e8: 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; 80092ec: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = iop->flags; args.mode = mode; 80092f0: 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; 80092f4: 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; 80092f8: 5b 81 00 08 sw (sp+8),r1 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 80092fc: 28 62 00 54 lw r2,(r3+84) 8009300: 28 61 00 50 lw r1,(r3+80) 8009304: 37 83 00 08 addi r3,sp,8 8009308: f8 00 04 98 calli 800a568 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800930c: b8 20 10 00 mv r2,r1 8009310: 44 20 00 03 be r1,r0,800931c return rtems_deviceio_errno(status); 8009314: f8 00 06 0d calli 800ab48 <== NOT EXECUTED 8009318: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 800931c: b8 40 08 00 mv r1,r2 8009320: 2b 9d 00 04 lw ra,(sp+4) 8009324: 37 9c 00 10 addi sp,sp,16 8009328: c3 a0 00 00 ret 08009230 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8009230: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009234: 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; 8009238: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 800923c: 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; 8009240: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED 8009244: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8009248: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED args.buffer = buffer; 800924c: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8009250: 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; 8009254: 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; 8009258: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 800925c: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8009260: 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; 8009264: 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( 8009268: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED 800926c: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED 8009270: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8009274: f8 00 04 e2 calli 800a5fc <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009278: 44 20 00 03 be r1,r0,8009284 <== NOT EXECUTED return rtems_deviceio_errno(status); 800927c: f8 00 06 33 calli 800ab48 <== NOT EXECUTED 8009280: e0 00 00 02 bi 8009288 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8009284: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8009288: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800928c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009290: c3 a0 00 00 ret <== NOT EXECUTED 080091cc : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 80091cc: 37 9c ff dc addi sp,sp,-36 80091d0: 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; 80091d4: 28 24 00 18 lw r4,(r1+24) 80091d8: 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; 80091dc: 28 24 00 14 lw r4,(r1+20) 80091e0: 5b 84 00 14 sw (sp+20),r4 80091e4: 28 24 00 10 lw r4,(r1+16) args.buffer = (void *) buffer; 80091e8: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 80091ec: 34 02 00 00 mvi r2,0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 80091f0: 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; 80091f4: 28 24 00 3c lw r4,(r1+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 80091f8: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 80091fc: 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; 8009200: 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( 8009204: 28 82 00 54 lw r2,(r4+84) 8009208: 28 81 00 50 lw r1,(r4+80) 800920c: 37 83 00 08 addi r3,sp,8 8009210: f8 00 05 20 calli 800a690 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009214: 44 20 00 03 be r1,r0,8009220 return rtems_deviceio_errno(status); 8009218: f8 00 06 4c calli 800ab48 <== NOT EXECUTED 800921c: e0 00 00 02 bi 8009224 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8009220: 2b 81 00 24 lw r1,(sp+36) } 8009224: 2b 9d 00 04 lw ra,(sp+4) 8009228: 37 9c 00 24 addi sp,sp,36 800922c: c3 a0 00 00 ret 080047a0 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 80047a0: 37 9c ff f0 addi sp,sp,-16 80047a4: 5b 8b 00 10 sw (sp+16),r11 80047a8: 5b 8c 00 0c sw (sp+12),r12 80047ac: 5b 8d 00 08 sw (sp+8),r13 80047b0: 5b 9d 00 04 sw (sp+4),ra 80047b4: b8 20 58 00 mv r11,r1 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 80047b8: 28 21 00 b4 lw r1,(r1+180) 80047bc: 44 20 00 17 be r1,r0,8004818 rtems_interrupt_disable (level); 80047c0: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 80047c4: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 80047c8: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 80047cc: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 80047d0: 34 0d 00 02 mvi r13,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); 80047d4: 34 0c ff fe mvi r12,-2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 80047d8: e0 00 00 0c bi 8004808 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 80047dc: 59 6d 00 94 sw (r11+148),r13 <== NOT EXECUTED rtems_interrupt_enable (level); 80047e0: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 80047e4: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 80047e8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80047ec: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 80047f0: f8 00 06 81 calli 80061f4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 80047f4: 44 20 00 02 be r1,r0,80047fc <== NOT EXECUTED rtems_fatal_error_occurred (sc); 80047f8: f8 00 08 77 calli 80069d4 <== NOT EXECUTED rtems_interrupt_disable (level); 80047fc: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004800: a0 2c 10 00 and r2,r1,r12 <== NOT EXECUTED 8004804: 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) { 8004808: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED 800480c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED 8004810: 5c 62 ff f3 bne r3,r2,80047dc <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 8004814: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } } 8004818: 2b 9d 00 04 lw ra,(sp+4) 800481c: 2b 8b 00 10 lw r11,(sp+16) 8004820: 2b 8c 00 0c lw r12,(sp+12) 8004824: 2b 8d 00 08 lw r13,(sp+8) 8004828: 37 9c 00 10 addi sp,sp,16 800482c: c3 a0 00 00 ret 08001d6c : int dup2( int fildes, int fildes2 ) { 8001d6c: 37 9c ff a4 addi sp,sp,-92 8001d70: 5b 8b 00 14 sw (sp+20),r11 8001d74: 5b 8c 00 10 sw (sp+16),r12 8001d78: 5b 8d 00 0c sw (sp+12),r13 8001d7c: 5b 8e 00 08 sw (sp+8),r14 8001d80: 5b 9d 00 04 sw (sp+4),ra /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d84: 37 8d 00 18 addi r13,sp,24 int dup2( int fildes, int fildes2 ) { 8001d88: b8 40 58 00 mv r11,r2 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d8c: b9 a0 10 00 mv r2,r13 if ( status == -1 ) 8001d90: 34 0c ff ff mvi r12,-1 int dup2( int fildes, int fildes2 ) { 8001d94: b8 20 70 00 mv r14,r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001d98: f8 00 01 f4 calli 8002568 if ( status == -1 ) 8001d9c: 44 2c 00 0a be r1,r12,8001dc4 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 8001da0: b9 a0 10 00 mv r2,r13 8001da4: b9 60 08 00 mv r1,r11 8001da8: f8 00 01 f0 calli 8002568 if ( status == -1 ) 8001dac: 44 2c 00 06 be r1,r12,8001dc4 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001db0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8001db4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8001db8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8001dbc: f8 00 00 ac calli 800206c <== NOT EXECUTED 8001dc0: e0 00 00 02 bi 8001dc8 <== NOT EXECUTED 8001dc4: 34 01 ff ff mvi r1,-1 } 8001dc8: 2b 9d 00 04 lw ra,(sp+4) 8001dcc: 2b 8b 00 14 lw r11,(sp+20) 8001dd0: 2b 8c 00 10 lw r12,(sp+16) 8001dd4: 2b 8d 00 0c lw r13,(sp+12) 8001dd8: 2b 8e 00 08 lw r14,(sp+8) 8001ddc: 37 9c 00 5c addi sp,sp,92 8001de0: c3 a0 00 00 ret 080041c0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 80041c0: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 80041c4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80041c8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80041cc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80041d0: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80041d4: 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) { 80041d8: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80041dc: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 80041e0: 44 20 00 19 be r1,r0,8004244 <== NOT EXECUTED 80041e4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80041e8: 38 21 32 c8 ori r1,r1,0x32c8 <== NOT EXECUTED 80041ec: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80041f0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80041f4: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED 80041f8: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 80041fc: fb ff f4 a4 calli 800148c <__lshrsi3> <== NOT EXECUTED 8004200: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED 8004204: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 8004208: 44 20 00 0f be r1,r0,8004244 <== NOT EXECUTED 800420c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004210: 45 81 00 0d be r12,r1,8004244 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 8004214: 34 04 00 5e mvi r4,94 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 8004218: 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; 800421c: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 8004220: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004224: 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] = '^'; 8004228: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 800422c: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 8004230: fb ff ff 2e calli 8003ee8 <== NOT EXECUTED tty->column += 2; 8004234: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004238: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED 800423c: 59 61 00 28 sw (r11+40),r1 <== 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')) { 8004240: e0 00 00 04 bi 8004250 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 8004244: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004248: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800424c: fb ff ff 7d calli 8004040 <== NOT EXECUTED } } 8004250: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004254: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004258: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800425c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8004260: c3 a0 00 00 ret <== NOT EXECUTED 080271d8 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 80271d8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80271dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp != NULL) 80271e0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80271e4: 38 21 ec a0 ori r1,r1,0xeca0 <== NOT EXECUTED 80271e8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80271ec: 44 20 00 02 be r1,r0,80271f4 <== NOT EXECUTED fclose(group_fp); 80271f0: f8 00 6e 2f calli 8042aac <== NOT EXECUTED } 80271f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80271f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80271fc: c3 a0 00 00 ret <== NOT EXECUTED 08027200 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 8027200: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027204: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp != NULL) 8027208: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 802720c: 38 21 eb b8 ori r1,r1,0xebb8 <== NOT EXECUTED 8027210: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027214: 44 20 00 02 be r1,r0,802721c <== NOT EXECUTED fclose(passwd_fp); 8027218: f8 00 6e 25 calli 8042aac <== NOT EXECUTED } 802721c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027220: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027224: c3 a0 00 00 ret <== NOT EXECUTED 08004264 : * 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) { 8004264: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8004268: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 800426c: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8004270: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8004274: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8004278: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 800427c: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8004280: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8004284: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004288: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (tty->ccount == 0) 800428c: 28 21 00 20 lw r1,(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) { 8004290: b8 40 70 00 mv r14,r2 <== NOT EXECUTED if (tty->ccount == 0) 8004294: 44 20 00 6f be r1,r0,8004450 <== NOT EXECUTED return; if (lineFlag) { 8004298: 44 40 00 67 be r2,r0,8004434 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 800429c: 29 6c 00 3c lw r12,(r11+60) <== NOT EXECUTED 80042a0: 21 81 00 08 andi r1,r12,0x8 <== NOT EXECUTED 80042a4: 5c 20 00 03 bne r1,r0,80042b0 <== NOT EXECUTED tty->ccount = 0; 80042a8: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED return; 80042ac: e0 00 00 69 bi 8004450 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 80042b0: 21 8c 00 10 andi r12,r12,0x10 <== NOT EXECUTED 80042b4: 5d 80 00 60 bne r12,r0,8004434 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 80042b8: 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; 80042bc: 59 6c 00 20 sw (r11+32),r12 <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 80042c0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80042c4: fb ff ff bf calli 80041c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 80042c8: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80042cc: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80042d0: 44 2c 00 60 be r1,r12,8004450 <== NOT EXECUTED echo ('\n', tty); 80042d4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80042d8: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 80042dc: e0 00 00 0e bi 8004314 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 80042e0: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80042e4: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 80042e8: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 80042ec: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 80042f0: b4 83 20 00 add r4,r4,r3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80042f4: 20 22 00 08 andi r2,r1,0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 80042f8: 40 8c 00 00 lbu r12,(r4+0) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80042fc: 44 40 00 4c be r2,r0,800442c <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 8004300: 5d c0 00 07 bne r14,r0,800431c <== NOT EXECUTED 8004304: 20 22 00 10 andi r2,r1,0x10 <== NOT EXECUTED 8004308: 5c 4e 00 05 bne r2,r14,800431c <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 800430c: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004310: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004314: fb ff ff ab calli 80041c0 <== NOT EXECUTED 8004318: e0 00 00 4e bi 8004450 <== NOT EXECUTED } else if (c == '\t') { 800431c: 5d 90 00 22 bne r12,r16,80043a4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 8004320: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 8004324: 29 6c 00 2c lw r12,(r11+44) <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 8004328: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 800432c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004330: e0 00 00 10 bi 8004370 <== NOT EXECUTED c = tty->cbuf[i++]; 8004334: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004338: b4 82 20 00 add r4,r4,r2 <== NOT EXECUTED 800433c: 40 84 00 00 lbu r4,(r4+0) <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 8004340: b4 a4 30 00 add r6,r5,r4 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 8004344: 5c 90 00 03 bne r4,r16,8004350 <== NOT EXECUTED col = (col | 7) + 1; 8004348: 39 8c 00 07 ori r12,r12,0x7 <== NOT EXECUTED 800434c: e0 00 00 07 bi 8004368 <== NOT EXECUTED } else if (iscntrl (c)) { 8004350: 40 c4 00 01 lbu r4,(r6+1) <== NOT EXECUTED 8004354: 20 84 00 20 andi r4,r4,0x20 <== NOT EXECUTED 8004358: 44 80 00 04 be r4,r0,8004368 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 800435c: 44 20 00 04 be r1,r0,800436c <== NOT EXECUTED col += 2; 8004360: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED 8004364: e0 00 00 02 bi 800436c <== NOT EXECUTED } else { col++; 8004368: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 800436c: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004370: 5c 43 ff f1 bne r2,r3,8004334 <== NOT EXECUTED 8004374: e0 00 00 05 bi 8004388 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 8004378: fb ff fe dc calli 8003ee8 <== NOT EXECUTED tty->column--; 800437c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004380: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004384: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 8004388: 29 64 00 28 lw r4,(r11+40) <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 800438c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004390: 38 21 13 c4 ori r1,r1,0x13c4 <== NOT EXECUTED 8004394: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004398: b9 60 18 00 mv r3,r11 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 800439c: 48 8c ff f7 bg r4,r12,8004378 <== NOT EXECUTED 80043a0: e0 00 00 23 bi 800442c <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 80043a4: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED 80043a8: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 80043ac: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 80043b0: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED 80043b4: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 80043b8: 44 40 00 0c be r2,r0,80043e8 <== NOT EXECUTED 80043bc: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 80043c0: 44 20 00 0a be r1,r0,80043e8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 80043c4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80043c8: 38 21 13 c8 ori r1,r1,0x13c8 <== NOT EXECUTED 80043cc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80043d0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80043d4: fb ff fe c5 calli 8003ee8 <== NOT EXECUTED if (tty->column) 80043d8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80043dc: 44 20 00 03 be r1,r0,80043e8 <== NOT EXECUTED tty->column--; 80043e0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80043e4: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 80043e8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 80043ec: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED 80043f0: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 80043f4: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80043f8: 44 20 00 04 be r1,r0,8004408 <== NOT EXECUTED 80043fc: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004400: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8004404: 44 20 00 0a be r1,r0,800442c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 8004408: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800440c: 38 21 13 c8 ori r1,r1,0x13c8 <== NOT EXECUTED 8004410: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004414: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004418: fb ff fe b4 calli 8003ee8 <== NOT EXECUTED if (tty->column) 800441c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004420: 44 20 00 03 be r1,r0,800442c <== NOT EXECUTED tty->column--; 8004424: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004428: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } } } if (!lineFlag) 800442c: 5d c0 00 07 bne r14,r0,8004448 <== NOT EXECUTED 8004430: e0 00 00 08 bi 8004450 <== NOT EXECUTED 8004434: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8004438: 39 ad 32 c8 ori r13,r13,0x32c8 <== 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') { 800443c: 34 10 00 09 mvi r16,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); 8004440: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 8004444: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 8004448: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 800444c: 5c 60 ff a5 bne r3,r0,80042e0 <== NOT EXECUTED } } if (!lineFlag) break; } } 8004450: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004454: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8004458: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 800445c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8004460: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8004464: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8004468: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 800446c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8004470: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8004474: c3 a0 00 00 ret <== NOT EXECUTED 0803bc3c : #include int fchdir( int fd ) { 803bc3c: 37 9c ff c0 addi sp,sp,-64 <== NOT EXECUTED 803bc40: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 803bc44: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 803bc48: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 803bc4c: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 803bc50: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 803bc54: 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 ); 803bc58: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 803bc5c: 38 42 b0 10 ori r2,r2,0xb010 <== NOT EXECUTED 803bc60: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 803bc64: 54 41 00 02 bgu r2,r1,803bc6c <== NOT EXECUTED 803bc68: e0 00 00 0e bi 803bca0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 803bc6c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803bc70: fb ff 15 32 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803bc74: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803bc78: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 803bc7c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 803bc80: 39 6b ee 90 ori r11,r11,0xee90 <== NOT EXECUTED 803bc84: fb ff 15 2d calli 8001138 <__ashlsi3> <== NOT EXECUTED 803bc88: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 803bc8c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 803bc90: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 803bc94: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 803bc98: 20 23 01 00 andi r3,r1,0x100 <== NOT EXECUTED 803bc9c: 5c 60 00 04 bne r3,r0,803bcac <== NOT EXECUTED 803bca0: f8 00 1b 21 calli 8042924 <__errno> <== NOT EXECUTED 803bca4: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803bca8: e0 00 00 15 bi 803bcfc <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 803bcac: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 803bcb0: 5c 20 00 04 bne r1,r0,803bcc0 <== NOT EXECUTED 803bcb4: f8 00 1b 1c calli 8042924 <__errno> <== NOT EXECUTED 803bcb8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 803bcbc: e0 00 00 10 bi 803bcfc <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 803bcc0: 28 41 00 28 lw r1,(r2+40) <== NOT EXECUTED 803bcc4: 44 20 00 03 be r1,r0,803bcd0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 803bcc8: 28 23 00 10 lw r3,(r1+16) <== NOT EXECUTED 803bccc: 5c 60 00 04 bne r3,r0,803bcdc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 803bcd0: f8 00 1b 15 calli 8042924 <__errno> <== NOT EXECUTED 803bcd4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 803bcd8: e0 00 00 09 bi 803bcfc <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 803bcdc: 34 4e 00 1c addi r14,r2,28 <== NOT EXECUTED 803bce0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803bce4: d8 60 00 00 call r3 <== NOT EXECUTED 803bce8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803bcec: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 803bcf0: 45 a1 00 05 be r13,r1,803bd04 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 803bcf4: f8 00 1b 0c calli 8042924 <__errno> <== NOT EXECUTED 803bcf8: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 803bcfc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 803bd00: e0 00 00 1b bi 803bd6c <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803bd04: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 803bd08: 39 6b b2 f0 ori r11,r11,0xb2f0 <== NOT EXECUTED 803bd0c: 29 6f 00 00 lw r15,(r11+0) <== NOT EXECUTED 803bd10: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED 803bd14: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803bd18: 35 ef 00 04 addi r15,r15,4 <== NOT EXECUTED 803bd1c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 803bd20: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803bd24: f8 00 29 a2 calli 80463ac <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 803bd28: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 803bd2c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803bd30: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 803bd34: f8 00 29 9e calli 80463ac <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803bd38: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 803bd3c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803bd40: 38 21 13 ec ori r1,r1,0x13ec <== NOT EXECUTED 803bd44: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 803bd48: 37 84 00 30 addi r4,sp,48 <== NOT EXECUTED 803bd4c: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 803bd50: fb ff 2d e2 calli 80074d8 <== NOT EXECUTED 803bd54: 44 20 00 08 be r1,r0,803bd74 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 803bd58: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 803bd5c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 803bd60: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803bd64: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803bd68: f8 00 29 91 calli 80463ac <== NOT EXECUTED 803bd6c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 803bd70: e0 00 00 0f bi 803bdac <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 803bd74: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED 803bd78: 44 41 00 05 be r2,r1,803bd8c <== NOT EXECUTED 803bd7c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 803bd80: 44 40 00 03 be r2,r0,803bd8c <== NOT EXECUTED 803bd84: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803bd88: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_current = loc; 803bd8c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803bd90: 38 21 b2 f0 ori r1,r1,0xb2f0 <== NOT EXECUTED 803bd94: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 803bd98: 37 82 00 30 addi r2,sp,48 <== NOT EXECUTED 803bd9c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803bda0: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803bda4: f8 00 29 82 calli 80463ac <== NOT EXECUTED 803bda8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; } 803bdac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803bdb0: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 803bdb4: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 803bdb8: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 803bdbc: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 803bdc0: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 803bdc4: 37 9c 00 40 addi sp,sp,64 <== NOT EXECUTED 803bdc8: c3 a0 00 00 ret <== NOT EXECUTED 08026d14 : int fchmod( int fd, mode_t mode ) { 8026d14: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8026d18: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8026d1c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8026d20: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8026d24: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026d28: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8026d2c: 38 63 b0 10 ori r3,r3,0xb010 <== NOT EXECUTED 8026d30: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 8026d34: b8 40 60 00 mv r12,r2 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026d38: 54 61 00 02 bgu r3,r1,8026d40 <== NOT EXECUTED 8026d3c: e0 00 00 0e bi 8026d74 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8026d40: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026d44: fb ff 68 fd calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026d48: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026d4c: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 8026d50: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8026d54: 39 6b ee 90 ori r11,r11,0xee90 <== NOT EXECUTED 8026d58: fb ff 68 f8 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026d5c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8026d60: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8026d64: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8026d68: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 8026d6c: 20 62 01 00 andi r2,r3,0x100 <== NOT EXECUTED 8026d70: 5c 40 00 04 bne r2,r0,8026d80 <== NOT EXECUTED 8026d74: f8 00 6e ec calli 8042924 <__errno> <== NOT EXECUTED 8026d78: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026d7c: e0 00 00 0b bi 8026da8 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8026d80: 20 63 00 04 andi r3,r3,0x4 <== NOT EXECUTED 8026d84: 5c 60 00 04 bne r3,r0,8026d94 <== NOT EXECUTED 8026d88: f8 00 6e e7 calli 8042924 <__errno> <== NOT EXECUTED 8026d8c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026d90: e0 00 00 06 bi 8026da8 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 8026d94: 28 22 00 40 lw r2,(r1+64) <== NOT EXECUTED 8026d98: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8026d9c: 5c 40 00 06 bne r2,r0,8026db4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026da0: f8 00 6e e1 calli 8042924 <__errno> <== NOT EXECUTED 8026da4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026da8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026dac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026db0: e0 00 00 06 bi 8026dc8 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 8026db4: 28 23 00 24 lw r3,(r1+36) <== NOT EXECUTED 8026db8: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8026dbc: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026dc0: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8026dc4: d8 60 00 00 call r3 <== NOT EXECUTED } 8026dc8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026dcc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8026dd0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8026dd4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8026dd8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8026ddc: c3 a0 00 00 ret <== NOT EXECUTED 08026de0 : int fchown( int fd, uid_t owner, gid_t group ) { 8026de0: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8026de4: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8026de8: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8026dec: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8026df0: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8026df4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026df8: 78 04 08 06 mvhi r4,0x806 <== NOT EXECUTED 8026dfc: 38 84 b0 10 ori r4,r4,0xb010 <== NOT EXECUTED 8026e00: 28 84 00 00 lw r4,(r4+0) <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 8026e04: 20 4d ff ff andi r13,r2,0xffff <== NOT EXECUTED 8026e08: 20 6c ff ff andi r12,r3,0xffff <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026e0c: 54 81 00 02 bgu r4,r1,8026e14 <== NOT EXECUTED 8026e10: e0 00 00 0e bi 8026e48 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8026e14: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026e18: fb ff 68 c8 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026e1c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026e20: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 8026e24: b8 20 70 00 mv r14,r1 <== NOT EXECUTED 8026e28: 39 6b ee 90 ori r11,r11,0xee90 <== NOT EXECUTED 8026e2c: fb ff 68 c3 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026e30: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8026e34: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8026e38: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8026e3c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8026e40: 20 82 01 00 andi r2,r4,0x100 <== NOT EXECUTED 8026e44: 5c 40 00 04 bne r2,r0,8026e54 <== NOT EXECUTED 8026e48: f8 00 6e b7 calli 8042924 <__errno> <== NOT EXECUTED 8026e4c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026e50: e0 00 00 0b bi 8026e7c <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8026e54: 20 84 00 04 andi r4,r4,0x4 <== NOT EXECUTED 8026e58: 5c 80 00 04 bne r4,r0,8026e68 <== NOT EXECUTED 8026e5c: f8 00 6e b2 calli 8042924 <__errno> <== NOT EXECUTED 8026e60: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026e64: e0 00 00 06 bi 8026e7c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 8026e68: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 8026e6c: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 8026e70: 5c 80 00 06 bne r4,r0,8026e88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026e74: f8 00 6e ac calli 8042924 <__errno> <== NOT EXECUTED 8026e78: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026e7c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026e80: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026e84: e0 00 00 05 bi 8026e98 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 8026e88: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026e8c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8026e90: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8026e94: d8 80 00 00 call r4 <== NOT EXECUTED } 8026e98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026e9c: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 8026ea0: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8026ea4: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8026ea8: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8026eac: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8026eb0: c3 a0 00 00 ret <== NOT EXECUTED 0803bdcc : int fcntl( int fd, int cmd, ... ) { 803bdcc: 37 9c ff c4 addi sp,sp,-60 803bdd0: 5b 8b 00 20 sw (sp+32),r11 803bdd4: 5b 8c 00 1c sw (sp+28),r12 803bdd8: 5b 8d 00 18 sw (sp+24),r13 803bddc: 5b 8e 00 14 sw (sp+20),r14 803bde0: 5b 8f 00 10 sw (sp+16),r15 803bde4: 5b 90 00 0c sw (sp+12),r16 803bde8: 5b 91 00 08 sw (sp+8),r17 803bdec: 5b 9d 00 04 sw (sp+4),ra int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 803bdf0: 78 09 08 06 mvhi r9,0x806 803bdf4: 39 29 b0 10 ori r9,r9,0xb010 803bdf8: 29 2d 00 00 lw r13,(r9+0) int fcntl( int fd, int cmd, ... ) { 803bdfc: 5b 83 00 28 sw (sp+40),r3 803be00: 5b 84 00 2c sw (sp+44),r4 803be04: 5b 85 00 30 sw (sp+48),r5 803be08: 5b 86 00 34 sw (sp+52),r6 803be0c: 5b 87 00 38 sw (sp+56),r7 803be10: 5b 88 00 3c sw (sp+60),r8 803be14: 5b 82 00 24 sw (sp+36),r2 803be18: b8 40 78 00 mv r15,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, ...)); 803be1c: 37 8b 00 28 addi r11,sp,40 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 803be20: 55 a1 00 02 bgu r13,r1,803be28 803be24: e0 00 00 0e bi 803be5c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 803be28: 78 03 08 06 mvhi r3,0x806 803be2c: 38 63 ee 90 ori r3,r3,0xee90 803be30: 34 02 00 03 mvi r2,3 803be34: 28 71 00 00 lw r17,(r3+0) 803be38: fb ff 14 c0 calli 8001138 <__ashlsi3> 803be3c: 34 02 00 03 mvi r2,3 803be40: b8 20 60 00 mv r12,r1 803be44: fb ff 14 bd calli 8001138 <__ashlsi3> 803be48: b5 81 08 00 add r1,r12,r1 803be4c: b6 21 60 00 add r12,r17,r1 rtems_libio_check_is_open(iop); 803be50: 29 8e 00 18 lw r14,(r12+24) 803be54: 21 c1 01 00 andi r1,r14,0x100 803be58: 5c 20 00 04 bne r1,r0,803be68 803be5c: f8 00 1a b2 calli 8042924 <__errno> <== NOT EXECUTED 803be60: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803be64: e0 00 00 54 bi 803bfb4 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 803be68: 34 01 00 09 mvi r1,9 803be6c: 55 e1 00 50 bgu r15,r1,803bfac 803be70: 78 10 08 06 mvhi r16,0x806 803be74: b9 e0 08 00 mv r1,r15 803be78: 34 02 00 02 mvi r2,2 803be7c: fb ff 14 af calli 8001138 <__ashlsi3> 803be80: 3a 10 86 dc ori r16,r16,0x86dc 803be84: b6 01 08 00 add r1,r16,r1 803be88: 28 21 00 00 lw r1,(r1+0) 803be8c: c0 20 00 00 b r1 case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 803be90: 29 6e 00 00 lw r14,(r11+0) if ( fd2 ) 803be94: 45 c0 00 0d be r14,r0,803bec8 diop = rtems_libio_iop( fd2 ); 803be98: 55 ae 00 03 bgu r13,r14,803bea4 <== NOT EXECUTED 803be9c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 803bea0: e0 00 00 0e bi 803bed8 <== NOT EXECUTED 803bea4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803bea8: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803beac: fb ff 14 a3 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803beb0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803beb4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803beb8: fb ff 14 a0 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803bebc: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 803bec0: b6 21 68 00 add r13,r17,r1 <== NOT EXECUTED 803bec4: e0 00 00 05 bi 803bed8 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 803bec8: fb ff 2e dc calli 8007a38 803becc: b8 20 68 00 mv r13,r1 if ( diop == 0 ) { 803bed0: 34 0b ff ff mvi r11,-1 803bed4: 44 2e 00 45 be r1,r14,803bfe8 ret = -1; break; } } diop->handlers = iop->handlers; 803bed8: 29 81 00 40 lw r1,(r12+64) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 803bedc: 34 03 00 14 mvi r3,20 803bee0: 35 82 00 1c addi r2,r12,28 ret = -1; break; } } diop->handlers = iop->handlers; 803bee4: 59 a1 00 40 sw (r13+64),r1 diop->file_info = iop->file_info; 803bee8: 29 81 00 3c lw r1,(r12+60) 803beec: 59 a1 00 3c sw (r13+60),r1 diop->flags = iop->flags; 803bef0: 29 81 00 18 lw r1,(r12+24) 803bef4: 59 a1 00 18 sw (r13+24),r1 diop->pathinfo = iop->pathinfo; 803bef8: 35 a1 00 1c addi r1,r13,28 803befc: f8 00 29 2c calli 80463ac ret = (int) (diop - rtems_libio_iops); 803bf00: 78 01 08 06 mvhi r1,0x806 803bf04: 38 21 ee 90 ori r1,r1,0xee90 803bf08: 28 21 00 00 lw r1,(r1+0) 803bf0c: 34 02 00 03 mvi r2,3 803bf10: c9 a1 08 00 sub r1,r13,r1 803bf14: fb ff 14 d9 calli 8001278 <__ashrsi3> 803bf18: 78 02 38 e3 mvhi r2,0x38e3 803bf1c: 38 42 8e 39 ori r2,r2,0x8e39 803bf20: fb ff 1d 9f calli 800359c <__mulsi3> 803bf24: e0 00 00 12 bi 803bf6c break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 803bf28: b9 c0 08 00 mv r1,r14 803bf2c: 34 02 00 0b mvi r2,11 803bf30: fb ff 14 aa calli 80011d8 <__lshrsi3> 803bf34: 20 2b 00 01 andi r11,r1,0x1 803bf38: e0 00 00 21 bi 803bfbc * 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 ) ) 803bf3c: 29 6b 00 00 lw r11,(r11+0) 803bf40: 45 60 00 05 be r11,r0,803bf54 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 803bf44: 39 ce 08 00 ori r14,r14,0x800 803bf48: 59 8e 00 18 sw (r12+24),r14 803bf4c: 34 0b 00 00 mvi r11,0 803bf50: e0 00 00 1b bi 803bfbc else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 803bf54: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED 803bf58: a1 c1 70 00 and r14,r14,r1 <== NOT EXECUTED 803bf5c: 59 8e 00 18 sw (r12+24),r14 <== NOT EXECUTED 803bf60: e0 00 00 17 bi 803bfbc <== NOT EXECUTED break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 803bf64: b9 c0 08 00 mv r1,r14 803bf68: fb ff 2e 2e calli 8007820 803bf6c: b8 20 58 00 mv r11,r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 803bf70: 48 01 00 1e bg r0,r1,803bfe8 803bf74: e0 00 00 12 bi 803bfbc 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 ) ); 803bf78: 29 61 00 00 lw r1,(r11+0) /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 803bf7c: 34 0b 00 00 mvi r11,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 ) ); 803bf80: fb ff 2e e7 calli 8007b1c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 803bf84: 29 83 00 18 lw r3,(r12+24) 803bf88: 34 02 fd fe mvi r2,-514 803bf8c: 20 21 02 01 andi r1,r1,0x201 803bf90: a0 62 10 00 and r2,r3,r2 803bf94: b8 22 08 00 or r1,r1,r2 803bf98: 59 81 00 18 sw (r12+24),r1 803bf9c: e0 00 00 08 bi 803bfbc errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 803bfa0: f8 00 1a 61 calli 8042924 <__errno> 803bfa4: 34 02 00 86 mvi r2,134 803bfa8: e0 00 00 03 bi 803bfb4 ret = -1; break; default: errno = EINVAL; 803bfac: f8 00 1a 5e calli 8042924 <__errno> 803bfb0: 34 02 00 16 mvi r2,22 803bfb4: 58 22 00 00 sw (r1+0),r2 803bfb8: e0 00 00 0b bi 803bfe4 * 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) { 803bfbc: 29 81 00 40 lw r1,(r12+64) 803bfc0: 28 23 00 30 lw r3,(r1+48) 803bfc4: 44 60 00 09 be r3,r0,803bfe8 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 803bfc8: b9 80 10 00 mv r2,r12 803bfcc: b9 e0 08 00 mv r1,r15 803bfd0: d8 60 00 00 call r3 803bfd4: b8 20 60 00 mv r12,r1 if (err) { 803bfd8: 44 20 00 04 be r1,r0,803bfe8 errno = err; 803bfdc: f8 00 1a 52 calli 8042924 <__errno> <== NOT EXECUTED 803bfe0: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 803bfe4: 34 0b ff ff mvi r11,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 803bfe8: b9 60 08 00 mv r1,r11 803bfec: 2b 9d 00 04 lw ra,(sp+4) 803bff0: 2b 8b 00 20 lw r11,(sp+32) 803bff4: 2b 8c 00 1c lw r12,(sp+28) 803bff8: 2b 8d 00 18 lw r13,(sp+24) 803bffc: 2b 8e 00 14 lw r14,(sp+20) 803c000: 2b 8f 00 10 lw r15,(sp+16) 803c004: 2b 90 00 0c lw r16,(sp+12) 803c008: 2b 91 00 08 lw r17,(sp+8) 803c00c: 37 9c 00 3c addi sp,sp,60 803c010: c3 a0 00 00 ret 08009900 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8009900: 37 9c ff dc addi sp,sp,-36 8009904: 5b 8b 00 20 sw (sp+32),r11 8009908: 5b 8c 00 1c sw (sp+28),r12 800990c: 5b 8d 00 18 sw (sp+24),r13 8009910: 5b 8e 00 14 sw (sp+20),r14 8009914: 5b 8f 00 10 sw (sp+16),r15 8009918: 5b 90 00 0c sw (sp+12),r16 800991c: 5b 91 00 08 sw (sp+8),r17 8009920: 5b 9d 00 04 sw (sp+4),ra ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8009924: 78 03 08 01 mvhi r3,0x801 8009928: 38 63 c6 28 ori r3,r3,0xc628 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800992c: b8 20 70 00 mv r14,r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8009930: 28 61 00 00 lw r1,(r3+0) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8009934: b8 40 78 00 mv r15,r2 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8009938: 34 02 00 00 mvi r2,0 800993c: b8 40 18 00 mv r3,r2 8009940: fb ff f8 47 calli 8007a5c 8009944: b8 20 80 00 mv r16,r1 8009948: 34 0c ff fc mvi r12,-4 800994c: 5c 20 00 bc bne r1,r0,8009c3c RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 8009950: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED if (pipe == NULL) { 8009954: 5d 61 00 42 bne r11,r1,8009a5c <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8009958: 34 01 00 34 mvi r1,52 <== NOT EXECUTED 800995c: fb ff f7 47 calli 8007678 <== NOT EXECUTED 8009960: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8009964: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (pipe == NULL) 8009968: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED 800996c: 44 20 00 4a be r1,r0,8009a94 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 8009970: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8009974: 34 03 00 34 mvi r3,52 <== NOT EXECUTED 8009978: f8 00 08 65 calli 800bb0c <== NOT EXECUTED pipe->Size = PIPE_BUF; 800997c: 34 02 02 00 mvi r2,512 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 8009980: b8 40 08 00 mv r1,r2 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 8009984: 59 a2 00 04 sw (r13+4),r2 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 8009988: fb ff f7 3c calli 8007678 <== NOT EXECUTED 800998c: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED if (! pipe->Buffer) 8009990: 44 20 00 30 be r1,r0,8009a50 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 8009994: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 8009998: 39 8c c1 58 ori r12,r12,0xc158 <== NOT EXECUTED 800999c: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED 80099a0: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 80099a4: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 80099a8: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 80099ac: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 80099b0: 35 a4 00 2c addi r4,r13,44 <== NOT EXECUTED 80099b4: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 80099b8: f8 00 01 99 calli 800a01c <== NOT EXECUTED 80099bc: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 80099c0: 5c 20 00 21 bne r1,r0,8009a44 <== 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( 80099c4: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 80099c8: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 80099cc: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED 80099d0: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 80099d4: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 80099d8: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 80099dc: 35 a4 00 30 addi r4,r13,48 <== NOT EXECUTED 80099e0: f8 00 01 8f calli 800a01c <== NOT EXECUTED 80099e4: b8 20 88 00 mv r17,r1 <== NOT EXECUTED 80099e8: 5c 30 00 15 bne r1,r16,8009a3c <== 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( 80099ec: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 80099f0: 78 02 50 49 mvhi r2,0x5049 <== NOT EXECUTED 80099f4: 38 42 73 00 ori r2,r2,0x7300 <== NOT EXECUTED 80099f8: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED 80099fc: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 8009a00: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009a04: ba 20 20 00 mv r4,r17 <== NOT EXECUTED 8009a08: 35 a5 00 28 addi r5,r13,40 <== NOT EXECUTED 8009a0c: fb ff e1 40 calli 8001f0c <== NOT EXECUTED 8009a10: 5c 31 00 09 bne r1,r17,8009a34 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 8009a14: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 8009a18: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 8009a1c: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED 8009a20: 34 02 00 7a mvi r2,122 <== NOT EXECUTED 8009a24: 5c 22 00 0e bne r1,r2,8009a5c <== NOT EXECUTED c = 'a'; 8009a28: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 8009a2c: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED 8009a30: e0 00 00 0b bi 8009a5c <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 8009a34: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED 8009a38: f8 00 01 b6 calli 800a110 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 8009a3c: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED 8009a40: f8 00 01 b4 calli 800a110 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 8009a44: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8009a48: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 8009a4c: fb ff f5 6d calli 8007000 <== NOT EXECUTED err_buf: free(pipe); 8009a50: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8009a54: fb ff f5 6b calli 8007000 <== NOT EXECUTED 8009a58: e0 00 00 0f bi 8009a94 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8009a5c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009a60: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009a64: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009a68: fb ff f7 fd calli 8007a5c <== NOT EXECUTED 8009a6c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8009a70: 44 20 00 02 be r1,r0,8009a78 <== NOT EXECUTED 8009a74: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 8009a78: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8009a7c: 5c 20 00 06 bne r1,r0,8009a94 <== NOT EXECUTED if (err) 8009a80: 45 81 00 04 be r12,r1,8009a90 <== NOT EXECUTED pipe_free(pipe); 8009a84: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009a88: fb ff ff 44 calli 8009798 <== NOT EXECUTED 8009a8c: e0 00 00 02 bi 8009a94 <== NOT EXECUTED else *pipep = pipe; 8009a90: 59 cb 00 00 sw (r14+0),r11 <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 8009a94: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8009a98: 38 21 c6 28 ori r1,r1,0xc628 <== NOT EXECUTED 8009a9c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8009aa0: fb ff f8 3f calli 8007b9c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 8009aa4: 5d 80 00 66 bne r12,r0,8009c3c <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 8009aa8: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 8009aac: 34 03 00 04 mvi r3,4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 8009ab0: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 8009ab4: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED 8009ab8: 44 23 00 24 be r1,r3,8009b48 <== NOT EXECUTED 8009abc: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 8009ac0: 44 22 00 44 be r1,r2,8009bd0 <== NOT EXECUTED 8009ac4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8009ac8: 5c 22 00 56 bne r1,r2,8009c20 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009acc: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009ad0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009ad4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009ad8: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8009adc: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009ae0: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 8009ae4: 5c 20 00 04 bne r1,r0,8009af4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8009ae8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8009aec: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 8009af0: f8 00 01 a8 calli 800a190 <== NOT EXECUTED if (pipe->Writers == 0) { 8009af4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8009af8: 5c 20 00 4a bne r1,r0,8009c20 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 8009afc: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 8009b00: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 8009b04: 5c 41 00 47 bne r2,r1,8009c20 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 8009b08: 29 70 00 24 lw r16,(r11+36) <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 8009b0c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009b10: fb ff f8 23 calli 8007b9c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 8009b14: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 8009b18: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009b1c: f8 00 01 bc calli 800a20c <== NOT EXECUTED 8009b20: b8 20 68 00 mv r13,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8009b24: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8009b28: 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)) 8009b2c: 5c 20 00 40 bne r1,r0,8009c2c <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8009b30: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009b34: fb ff f7 ca calli 8007a5c <== NOT EXECUTED 8009b38: 5c 2d 00 3d bne r1,r13,8009c2c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 8009b3c: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 8009b40: 46 01 ff f3 be r16,r1,8009b0c <== NOT EXECUTED 8009b44: e0 00 00 37 bi 8009c20 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 8009b48: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8009b4c: 5c 20 00 05 bne r1,r0,8009b60 <== NOT EXECUTED 8009b50: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 8009b54: 44 40 00 03 be r2,r0,8009b60 <== NOT EXECUTED 8009b58: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED 8009b5c: e0 00 00 35 bi 8009c30 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 8009b60: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009b64: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 8009b68: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009b6c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 8009b70: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009b74: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8009b78: 5c 20 00 04 bne r1,r0,8009b88 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 8009b7c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 8009b80: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 8009b84: f8 00 01 83 calli 800a190 <== NOT EXECUTED if (pipe->Readers == 0) { 8009b88: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8009b8c: 5c 20 00 25 bne r1,r0,8009c20 <== NOT EXECUTED prevCounter = pipe->readerCounter; 8009b90: 29 70 00 20 lw r16,(r11+32) <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 8009b94: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009b98: fb ff f8 01 calli 8007b9c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 8009b9c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8009ba0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009ba4: f8 00 01 9a calli 800a20c <== NOT EXECUTED 8009ba8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8009bac: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8009bb0: 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)) 8009bb4: 5c 20 00 1e bne r1,r0,8009c2c <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8009bb8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009bbc: fb ff f7 a8 calli 8007a5c <== NOT EXECUTED 8009bc0: 5c 2d 00 1b bne r1,r13,8009c2c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 8009bc4: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8009bc8: 46 01 ff f3 be r16,r1,8009b94 <== NOT EXECUTED 8009bcc: e0 00 00 15 bi 8009c20 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8009bd0: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009bd4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8009bd8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009bdc: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8009be0: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8009be4: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 8009be8: 5c 20 00 04 bne r1,r0,8009bf8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8009bec: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8009bf0: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 8009bf4: f8 00 01 67 calli 800a190 <== NOT EXECUTED pipe->writerCounter ++; 8009bf8: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009bfc: 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 ++; 8009c00: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009c04: 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 ++; 8009c08: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8009c0c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8009c10: 5c 20 00 04 bne r1,r0,8009c20 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 8009c14: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 8009c18: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 8009c1c: f8 00 01 5d calli 800a190 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 8009c20: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009c24: fb ff f7 de calli 8007b9c <== NOT EXECUTED return 0; 8009c28: e0 00 00 05 bi 8009c3c <== NOT EXECUTED 8009c2c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 8009c30: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8009c34: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8009c38: fb ff fe ea calli 80097e0 <== NOT EXECUTED return err; } 8009c3c: b9 80 08 00 mv r1,r12 8009c40: 2b 9d 00 04 lw ra,(sp+4) 8009c44: 2b 8b 00 20 lw r11,(sp+32) 8009c48: 2b 8c 00 1c lw r12,(sp+28) 8009c4c: 2b 8d 00 18 lw r13,(sp+24) 8009c50: 2b 8e 00 14 lw r14,(sp+20) 8009c54: 2b 8f 00 10 lw r15,(sp+16) 8009c58: 2b 90 00 0c lw r16,(sp+12) 8009c5c: 2b 91 00 08 lw r17,(sp+8) 8009c60: 37 9c 00 24 addi sp,sp,36 8009c64: c3 a0 00 00 ret 08009268 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009268: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 800926c: 38 21 ee d8 ori r1,r1,0xeed8 <== NOT EXECUTED 8009270: 34 23 00 04 addi r3,r1,4 <== NOT EXECUTED 8009274: e0 00 00 06 bi 800928c <== 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 ) { 8009278: 28 25 00 18 lw r5,(r1+24) <== NOT EXECUTED 800927c: 28 44 00 10 lw r4,(r2+16) <== NOT EXECUTED 8009280: 5c a4 00 03 bne r5,r4,800928c <== NOT EXECUTED 8009284: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8009288: c3 a0 00 00 ret <== 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 ) { 800928c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8009290: 5c 23 ff fa bne r1,r3,8009278 <== NOT EXECUTED 8009294: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return true; } } return false; } 8009298: c3 a0 00 00 ret <== NOT EXECUTED 08007000 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8007000: 37 9c ff f4 addi sp,sp,-12 8007004: 5b 8b 00 0c sw (sp+12),r11 8007008: 5b 8c 00 08 sw (sp+8),r12 800700c: 5b 9d 00 04 sw (sp+4),ra 8007010: 78 02 08 01 mvhi r2,0x801 8007014: 38 42 c6 a8 ori r2,r2,0xc6a8 8007018: 28 43 00 0c lw r3,(r2+12) 800701c: b8 20 58 00 mv r11,r1 8007020: 34 61 00 01 addi r1,r3,1 8007024: 58 41 00 0c sw (r2+12),r1 if ( !ptr ) 8007028: 45 60 00 1f be r11,r0,80070a4 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 800702c: 78 01 08 01 mvhi r1,0x801 8007030: 38 21 c9 c0 ori r1,r1,0xc9c0 8007034: 28 22 00 00 lw r2,(r1+0) 8007038: 34 01 00 03 mvi r1,3 800703c: 5c 41 00 06 bne r2,r1,8007054 8007040: f8 00 01 65 calli 80075d4 8007044: 5c 20 00 04 bne r1,r0,8007054 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 8007048: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800704c: f8 00 01 74 calli 800761c <== NOT EXECUTED return; 8007050: e0 00 00 15 bi 80070a4 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8007054: 78 01 08 01 mvhi r1,0x801 8007058: 38 21 c6 10 ori r1,r1,0xc610 800705c: 28 21 00 00 lw r1,(r1+0) 8007060: 44 20 00 04 be r1,r0,8007070 (*rtems_malloc_statistics_helpers->at_free)(ptr); 8007064: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 8007068: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800706c: d8 40 00 00 call r2 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 8007070: 78 0c 08 01 mvhi r12,0x801 8007074: 39 8c c0 1c ori r12,r12,0xc01c 8007078: 29 81 00 00 lw r1,(r12+0) 800707c: b9 60 10 00 mv r2,r11 8007080: f8 00 06 7b calli 8008a6c <_Protected_heap_Free> 8007084: 5c 20 00 08 bne r1,r0,80070a4 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 8007088: 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", 800708c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007090: 38 21 a6 58 ori r1,r1,0xa658 <== NOT EXECUTED 8007094: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED 8007098: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 800709c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80070a0: fb ff ea 96 calli 8001af8 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 80070a4: 2b 9d 00 04 lw ra,(sp+4) 80070a8: 2b 8b 00 0c lw r11,(sp+12) 80070ac: 2b 8c 00 08 lw r12,(sp+8) 80070b0: 37 9c 00 0c addi sp,sp,12 80070b4: c3 a0 00 00 ret 08028614 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 8028614: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8028618: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802861c: 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 8028620: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8028624: 38 42 ee e4 ori r2,r2,0xeee4 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 8028628: 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 802862c: 44 22 00 0f be r1,r2,8028668 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 8028630: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED 8028634: 44 20 00 05 be r1,r0,8028648 <== NOT EXECUTED 8028638: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802863c: 44 40 00 03 be r2,r0,8028648 <== NOT EXECUTED 8028640: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED 8028644: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 8028648: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 802864c: 44 20 00 05 be r1,r0,8028660 <== NOT EXECUTED 8028650: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028654: 44 40 00 03 be r2,r0,8028660 <== NOT EXECUTED 8028658: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 802865c: d8 40 00 00 call r2 <== NOT EXECUTED free(env); 8028660: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028664: fb ff 7b da calli 80075cc <== NOT EXECUTED } } 8028668: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802866c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8028670: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8028674: c3 a0 00 00 ret <== NOT EXECUTED 0801928c : int fstat( int fd, struct stat *sbuf ) { 801928c: 37 9c ff ec addi sp,sp,-20 8019290: 5b 8b 00 14 sw (sp+20),r11 8019294: 5b 8c 00 10 sw (sp+16),r12 8019298: 5b 8d 00 0c sw (sp+12),r13 801929c: 5b 8e 00 08 sw (sp+8),r14 80192a0: 5b 9d 00 04 sw (sp+4),ra 80192a4: b8 40 60 00 mv r12,r2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 80192a8: 5c 40 00 04 bne r2,r0,80192b8 rtems_set_errno_and_return_minus_one( EFAULT ); 80192ac: fb ff c7 14 calli 800aefc <__errno> 80192b0: 34 02 00 0e mvi r2,14 80192b4: e0 00 00 14 bi 8019304 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 80192b8: 78 02 08 01 mvhi r2,0x801 80192bc: 38 42 c0 10 ori r2,r2,0xc010 80192c0: 28 42 00 00 lw r2,(r2+0) 80192c4: 50 22 00 0e bgeu r1,r2,80192fc 80192c8: 34 02 00 03 mvi r2,3 80192cc: fb ff 9b c9 calli 80001f0 <__ashlsi3> 80192d0: 78 0d 08 01 mvhi r13,0x801 80192d4: 39 ad c6 9c ori r13,r13,0xc69c 80192d8: 34 02 00 03 mvi r2,3 80192dc: b8 20 70 00 mv r14,r1 80192e0: fb ff 9b c4 calli 80001f0 <__ashlsi3> 80192e4: 29 ab 00 00 lw r11,(r13+0) 80192e8: b5 c1 08 00 add r1,r14,r1 80192ec: b5 61 58 00 add r11,r11,r1 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 80192f0: 29 61 00 18 lw r1,(r11+24) 80192f4: 20 21 01 00 andi r1,r1,0x100 80192f8: 5c 20 00 06 bne r1,r0,8019310 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 80192fc: fb ff c7 00 calli 800aefc <__errno> 8019300: 34 02 00 09 mvi r2,9 8019304: 58 22 00 00 sw (r1+0),r2 8019308: 34 01 ff ff mvi r1,-1 801930c: e0 00 00 11 bi 8019350 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 8019310: 29 61 00 40 lw r1,(r11+64) 8019314: 44 20 ff fa be r1,r0,80192fc rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 8019318: 28 21 00 18 lw r1,(r1+24) 801931c: 5c 20 00 04 bne r1,r0,801932c rtems_set_errno_and_return_minus_one( ENOTSUP ); 8019320: fb ff c6 f7 calli 800aefc <__errno> <== NOT EXECUTED 8019324: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8019328: e3 ff ff f7 bi 8019304 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 801932c: 34 02 00 00 mvi r2,0 8019330: 34 03 00 48 mvi r3,72 8019334: b9 80 08 00 mv r1,r12 8019338: fb ff c9 f5 calli 800bb0c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 801933c: 29 63 00 40 lw r3,(r11+64) 8019340: 35 61 00 1c addi r1,r11,28 8019344: b9 80 10 00 mv r2,r12 8019348: 28 63 00 18 lw r3,(r3+24) 801934c: d8 60 00 00 call r3 } 8019350: 2b 9d 00 04 lw ra,(sp+4) 8019354: 2b 8b 00 14 lw r11,(sp+20) 8019358: 2b 8c 00 10 lw r12,(sp+16) 801935c: 2b 8d 00 0c lw r13,(sp+12) 8019360: 2b 8e 00 08 lw r14,(sp+8) 8019364: 37 9c 00 14 addi sp,sp,20 8019368: c3 a0 00 00 ret 08026fb4 : #include int fsync( int fd ) { 8026fb4: 37 9c ff f4 addi sp,sp,-12 8026fb8: 5b 8b 00 0c sw (sp+12),r11 8026fbc: 5b 8c 00 08 sw (sp+8),r12 8026fc0: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026fc4: 78 02 08 06 mvhi r2,0x806 8026fc8: 38 42 b0 10 ori r2,r2,0xb010 8026fcc: 28 42 00 00 lw r2,(r2+0) 8026fd0: 54 41 00 02 bgu r2,r1,8026fd8 8026fd4: e0 00 00 15 bi 8027028 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8026fd8: 34 02 00 03 mvi r2,3 8026fdc: fb ff 68 57 calli 8001138 <__ashlsi3> 8026fe0: 34 02 00 03 mvi r2,3 8026fe4: 78 0b 08 06 mvhi r11,0x806 8026fe8: b8 20 60 00 mv r12,r1 8026fec: 39 6b ee 90 ori r11,r11,0xee90 8026ff0: fb ff 68 52 calli 8001138 <__ashlsi3> 8026ff4: 29 62 00 00 lw r2,(r11+0) 8026ff8: b5 81 08 00 add r1,r12,r1 8026ffc: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 8027000: 28 22 00 18 lw r2,(r1+24) 8027004: 20 43 01 00 andi r3,r2,0x100 8027008: 44 60 00 08 be r3,r0,8027028 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 802700c: 20 42 00 04 andi r2,r2,0x4 8027010: 5c 40 00 04 bne r2,r0,8027020 8027014: f8 00 6e 44 calli 8042924 <__errno> 8027018: 34 02 00 16 mvi r2,22 802701c: e0 00 00 0a bi 8027044 /* * Now process the fsync(). */ if ( !iop->handlers ) 8027020: 28 22 00 40 lw r2,(r1+64) 8027024: 5c 40 00 04 bne r2,r0,8027034 rtems_set_errno_and_return_minus_one( EBADF ); 8027028: f8 00 6e 3f calli 8042924 <__errno> <== NOT EXECUTED 802702c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8027030: e0 00 00 05 bi 8027044 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 8027034: 28 42 00 28 lw r2,(r2+40) 8027038: 5c 40 00 06 bne r2,r0,8027050 rtems_set_errno_and_return_minus_one( ENOTSUP ); 802703c: f8 00 6e 3a calli 8042924 <__errno> 8027040: 34 02 00 86 mvi r2,134 8027044: 58 22 00 00 sw (r1+0),r2 8027048: 34 01 ff ff mvi r1,-1 802704c: e0 00 00 02 bi 8027054 return (*iop->handlers->fsync_h)( iop ); 8027050: d8 40 00 00 call r2 } 8027054: 2b 9d 00 04 lw ra,(sp+4) 8027058: 2b 8b 00 0c lw r11,(sp+12) 802705c: 2b 8c 00 08 lw r12,(sp+8) 8027060: 37 9c 00 0c addi sp,sp,12 8027064: c3 a0 00 00 ret 080070b8 : int ftruncate( int fd, off_t length ) { 80070b8: 37 9c ff d8 addi sp,sp,-40 80070bc: 5b 8b 00 14 sw (sp+20),r11 80070c0: 5b 8c 00 10 sw (sp+16),r12 80070c4: 5b 8d 00 0c sw (sp+12),r13 80070c8: 5b 8e 00 08 sw (sp+8),r14 80070cc: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 80070d0: 78 03 08 01 mvhi r3,0x801 80070d4: 38 63 c0 10 ori r3,r3,0xc010 80070d8: 28 63 00 00 lw r3,(r3+0) int ftruncate( int fd, off_t length ) { 80070dc: b8 40 68 00 mv r13,r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 80070e0: 54 61 00 02 bgu r3,r1,80070e8 80070e4: e0 00 00 0e bi 800711c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 80070e8: 34 02 00 03 mvi r2,3 80070ec: fb ff e4 41 calli 80001f0 <__ashlsi3> 80070f0: 78 0c 08 01 mvhi r12,0x801 80070f4: 39 8c c6 9c ori r12,r12,0xc69c 80070f8: 34 02 00 03 mvi r2,3 80070fc: b8 20 70 00 mv r14,r1 8007100: fb ff e4 3c calli 80001f0 <__ashlsi3> 8007104: 29 8b 00 00 lw r11,(r12+0) 8007108: b5 c1 08 00 add r1,r14,r1 800710c: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 8007110: 29 61 00 18 lw r1,(r11+24) 8007114: 20 21 01 00 andi r1,r1,0x100 8007118: 5c 20 00 04 bne r1,r0,8007128 800711c: f8 00 0f 78 calli 800aefc <__errno> <== NOT EXECUTED 8007120: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8007124: e0 00 00 1b bi 8007190 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8007128: 37 8c 00 18 addi r12,sp,24 800712c: b9 80 08 00 mv r1,r12 8007130: 35 62 00 1c addi r2,r11,28 8007134: 34 03 00 14 mvi r3,20 8007138: f8 00 12 17 calli 800b994 if ( !loc.ops->node_type_h ) 800713c: 2b 81 00 24 lw r1,(sp+36) 8007140: 28 24 00 10 lw r4,(r1+16) 8007144: 44 80 00 11 be r4,r0,8007188 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8007148: b9 80 08 00 mv r1,r12 800714c: d8 80 00 00 call r4 8007150: 34 02 00 01 mvi r2,1 8007154: 5c 22 00 04 bne r1,r2,8007164 rtems_set_errno_and_return_minus_one( EISDIR ); 8007158: f8 00 0f 69 calli 800aefc <__errno> 800715c: 34 02 00 15 mvi r2,21 8007160: e0 00 00 0c bi 8007190 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8007164: 29 61 00 18 lw r1,(r11+24) 8007168: 20 21 00 04 andi r1,r1,0x4 800716c: 5c 20 00 04 bne r1,r0,800717c 8007170: f8 00 0f 63 calli 800aefc <__errno> <== NOT EXECUTED 8007174: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8007178: e0 00 00 06 bi 8007190 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 800717c: 29 61 00 40 lw r1,(r11+64) 8007180: 28 2c 00 20 lw r12,(r1+32) 8007184: 5d 80 00 06 bne r12,r0,800719c rtems_set_errno_and_return_minus_one( ENOTSUP ); 8007188: f8 00 0f 5d calli 800aefc <__errno> <== NOT EXECUTED 800718c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007190: 58 22 00 00 sw (r1+0),r2 8007194: 34 01 ff ff mvi r1,-1 8007198: e0 00 00 08 bi 80071b8 return (*iop->handlers->ftruncate_h)( iop, length ); 800719c: 34 02 00 1f mvi r2,31 80071a0: b9 a0 08 00 mv r1,r13 80071a4: fb ff e4 63 calli 8000330 <__ashrsi3> 80071a8: b8 20 10 00 mv r2,r1 80071ac: b9 a0 18 00 mv r3,r13 80071b0: b9 60 08 00 mv r1,r11 80071b4: d9 80 00 00 call r12 } 80071b8: 2b 9d 00 04 lw ra,(sp+4) 80071bc: 2b 8b 00 14 lw r11,(sp+20) 80071c0: 2b 8c 00 10 lw r12,(sp+16) 80071c4: 2b 8d 00 0c lw r13,(sp+12) 80071c8: 2b 8e 00 08 lw r14,(sp+8) 80071cc: 37 9c 00 28 addi sp,sp,40 80071d0: c3 a0 00 00 ret 0805f044 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 805f044: 37 9c ff d4 addi sp,sp,-44 805f048: 5b 8b 00 18 sw (sp+24),r11 805f04c: 5b 8c 00 14 sw (sp+20),r12 805f050: 5b 8d 00 10 sw (sp+16),r13 805f054: 5b 8e 00 0c sw (sp+12),r14 805f058: 5b 8f 00 08 sw (sp+8),r15 805f05c: 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 ); 805f060: 78 04 08 06 mvhi r4,0x806 805f064: 38 84 b0 10 ori r4,r4,0xb010 805f068: 28 84 00 00 lw r4,(r4+0) int getdents( int dd_fd, char *dd_buf, int dd_len ) { 805f06c: b8 40 78 00 mv r15,r2 805f070: b8 60 70 00 mv r14,r3 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 805f074: 54 81 00 03 bgu r4,r1,805f080 805f078: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 805f07c: e0 00 00 0b bi 805f0a8 <== NOT EXECUTED 805f080: 34 02 00 03 mvi r2,3 805f084: fb fe 88 2d calli 8001138 <__ashlsi3> 805f088: 78 0c 08 06 mvhi r12,0x806 805f08c: 39 8c ee 90 ori r12,r12,0xee90 805f090: 34 02 00 03 mvi r2,3 805f094: b8 20 68 00 mv r13,r1 805f098: fb fe 88 28 calli 8001138 <__ashlsi3> 805f09c: 29 8b 00 00 lw r11,(r12+0) 805f0a0: b5 a1 08 00 add r1,r13,r1 805f0a4: b5 61 58 00 add r11,r11,r1 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 805f0a8: 37 8d 00 1c addi r13,sp,28 805f0ac: 34 0c 00 14 mvi r12,20 805f0b0: b9 a0 08 00 mv r1,r13 805f0b4: 35 62 00 1c addi r2,r11,28 805f0b8: b9 80 18 00 mv r3,r12 805f0bc: fb ff 9c bc calli 80463ac if ( !loc.ops->node_type_h ) 805f0c0: 2b 81 00 28 lw r1,(sp+40) 805f0c4: 28 24 00 10 lw r4,(r1+16) 805f0c8: 44 80 00 0c be r4,r0,805f0f8 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 805f0cc: b9 a0 08 00 mv r1,r13 805f0d0: d8 80 00 00 call r4 805f0d4: 34 02 00 01 mvi r2,1 805f0d8: 44 22 00 05 be r1,r2,805f0ec rtems_set_errno_and_return_minus_one( ENOTDIR ); 805f0dc: fb ff 8e 12 calli 8042924 <__errno> 805f0e0: 58 2c 00 00 sw (r1+0),r12 805f0e4: 34 01 ff ff mvi r1,-1 805f0e8: e0 00 00 0c bi 805f118 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 805f0ec: 29 61 00 40 lw r1,(r11+64) 805f0f0: 28 24 00 08 lw r4,(r1+8) 805f0f4: 5c 80 00 05 bne r4,r0,805f108 rtems_set_errno_and_return_minus_one( ENOTSUP ); 805f0f8: fb ff 8e 0b calli 8042924 <__errno> <== NOT EXECUTED 805f0fc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 805f100: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 805f104: e3 ff ff f8 bi 805f0e4 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 805f108: b9 60 08 00 mv r1,r11 805f10c: b9 e0 10 00 mv r2,r15 805f110: b9 c0 18 00 mv r3,r14 805f114: d8 80 00 00 call r4 } 805f118: 2b 9d 00 04 lw ra,(sp+4) 805f11c: 2b 8b 00 18 lw r11,(sp+24) 805f120: 2b 8c 00 14 lw r12,(sp+20) 805f124: 2b 8d 00 10 lw r13,(sp+16) 805f128: 2b 8e 00 0c lw r14,(sp+12) 805f12c: 2b 8f 00 08 lw r15,(sp+8) 805f130: 37 9c 00 2c addi sp,sp,44 805f134: c3 a0 00 00 ret 080271ac : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 80271ac: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80271b0: 38 21 b2 f0 ori r1,r1,0xb2f0 <== NOT EXECUTED 80271b4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Gid; } 80271b8: 2c 21 00 34 lhu r1,(r1+52) <== NOT EXECUTED 80271bc: c3 a0 00 00 ret <== NOT EXECUTED 08027938 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 8027938: 37 9c ff e0 addi sp,sp,-32 802793c: 5b 8b 00 20 sw (sp+32),r11 8027940: 5b 8c 00 1c sw (sp+28),r12 8027944: 5b 8d 00 18 sw (sp+24),r13 8027948: 5b 8e 00 14 sw (sp+20),r14 802794c: 5b 8f 00 10 sw (sp+16),r15 8027950: 5b 90 00 0c sw (sp+12),r16 8027954: 5b 91 00 08 sw (sp+8),r17 8027958: 5b 9d 00 04 sw (sp+4),ra 802795c: b8 20 68 00 mv r13,r1 8027960: b8 40 88 00 mv r17,r2 8027964: b8 60 58 00 mv r11,r3 8027968: b8 80 80 00 mv r16,r4 802796c: b8 a0 78 00 mv r15,r5 8027970: b8 c0 70 00 mv r14,r6 FILE *fp; int match; init_etc_passwd_group(); 8027974: fb ff ff a3 calli 8027800 if ((fp = fopen("/etc/group", "r")) == NULL) { 8027978: 78 01 08 05 mvhi r1,0x805 802797c: 78 02 08 06 mvhi r2,0x806 8027980: 38 21 fe 34 ori r1,r1,0xfe34 8027984: 38 42 78 ac ori r2,r2,0x78ac 8027988: f8 00 6e ee calli 8043540 802798c: b8 20 60 00 mv r12,r1 8027990: 5c 20 00 05 bne r1,r0,80279a4 errno = EINVAL; 8027994: f8 00 6b e4 calli 8042924 <__errno> <== NOT EXECUTED 8027998: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802799c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80279a0: e0 00 00 0d bi 80279d4 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 80279a4: b9 60 10 00 mv r2,r11 80279a8: ba 00 18 00 mv r3,r16 80279ac: b9 e0 20 00 mv r4,r15 80279b0: b9 80 08 00 mv r1,r12 80279b4: fb ff fe c1 calli 80274b8 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 80279b8: 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)) { 80279bc: 5c 20 00 08 bne r1,r0,80279dc errno = EINVAL; 80279c0: f8 00 6b d9 calli 8042924 <__errno> <== NOT EXECUTED 80279c4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80279c8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 80279cc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80279d0: f8 00 6c 37 calli 8042aac <== NOT EXECUTED 80279d4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 80279d8: e0 00 00 0d bi 8027a0c <== NOT EXECUTED } if (name) { 80279dc: 45 a0 00 05 be r13,r0,80279f0 match = (strcmp(grp->gr_name, name) == 0); 80279e0: 29 61 00 00 lw r1,(r11+0) 80279e4: f8 00 88 3e calli 8049adc 80279e8: 64 27 00 00 cmpei r7,r1,0 80279ec: e0 00 00 03 bi 80279f8 } else { match = (grp->gr_gid == gid); 80279f0: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 80279f4: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED } if (match) { 80279f8: 44 e0 ff eb be r7,r0,80279a4 fclose(fp); 80279fc: b9 80 08 00 mv r1,r12 8027a00: f8 00 6c 2b calli 8042aac *result = grp; 8027a04: 34 01 00 00 mvi r1,0 8027a08: 59 cb 00 00 sw (r14+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 8027a0c: 2b 9d 00 04 lw ra,(sp+4) 8027a10: 2b 8b 00 20 lw r11,(sp+32) 8027a14: 2b 8c 00 1c lw r12,(sp+28) 8027a18: 2b 8d 00 18 lw r13,(sp+24) 8027a1c: 2b 8e 00 14 lw r14,(sp+20) 8027a20: 2b 8f 00 10 lw r15,(sp+16) 8027a24: 2b 90 00 0c lw r16,(sp+12) 8027a28: 2b 91 00 08 lw r17,(sp+8) 8027a2c: 37 9c 00 20 addi sp,sp,32 8027a30: c3 a0 00 00 ret 08027638 : return NULL; return p; } struct group *getgrent(void) { 8027638: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802763c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp == NULL) 8027640: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027644: 38 21 ec a0 ori r1,r1,0xeca0 <== NOT EXECUTED 8027648: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802764c: 44 20 00 0b be r1,r0,8027678 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 8027650: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027654: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8027658: 38 42 ed 6c ori r2,r2,0xed6c <== NOT EXECUTED 802765c: 38 63 ec a4 ori r3,r3,0xeca4 <== NOT EXECUTED 8027660: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027664: fb ff ff 95 calli 80274b8 <== NOT EXECUTED 8027668: 44 20 00 04 be r1,r0,8027678 <== NOT EXECUTED 802766c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027670: 38 21 ed 6c ori r1,r1,0xed6c <== NOT EXECUTED 8027674: e0 00 00 02 bi 802767c <== NOT EXECUTED 8027678: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &grent; } 802767c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027680: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027684: c3 a0 00 00 ret <== NOT EXECUTED 08027a70 : struct group *getgrgid( gid_t gid ) { 8027a70: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027a74: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 8027a78: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027a7c: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8027a80: 38 42 ed 6c ori r2,r2,0xed6c <== NOT EXECUTED 8027a84: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027a88: 38 63 ec a4 ori r3,r3,0xeca4 <== NOT EXECUTED 8027a8c: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027a90: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027a94: fb ff ff e8 calli 8027a34 <== NOT EXECUTED 8027a98: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8027a9c: 5c 22 00 02 bne r1,r2,8027aa4 <== NOT EXECUTED return NULL; return p; 8027aa0: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 8027aa4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027aa8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027aac: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8027ab0: c3 a0 00 00 ret <== NOT EXECUTED 08027a34 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 8027a34: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027a38: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027a3c: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 8027a40: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 8027a44: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 8027a48: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 8027a4c: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 8027a50: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 8027a54: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 8027a58: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 8027a5c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8027a60: fb ff ff b6 calli 8027938 <== NOT EXECUTED } 8027a64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027a68: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027a6c: c3 a0 00 00 ret <== NOT EXECUTED 08024ed4 : */ pid_t getpid( void ) { return _Objects_Local_node; } 8024ed4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8024ed8: c3 a0 00 00 ret <== NOT EXECUTED 08027b74 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 8027b74: 37 9c ff e0 addi sp,sp,-32 8027b78: 5b 8b 00 20 sw (sp+32),r11 8027b7c: 5b 8c 00 1c sw (sp+28),r12 8027b80: 5b 8d 00 18 sw (sp+24),r13 8027b84: 5b 8e 00 14 sw (sp+20),r14 8027b88: 5b 8f 00 10 sw (sp+16),r15 8027b8c: 5b 90 00 0c sw (sp+12),r16 8027b90: 5b 91 00 08 sw (sp+8),r17 8027b94: 5b 9d 00 04 sw (sp+4),ra 8027b98: b8 20 68 00 mv r13,r1 8027b9c: b8 40 88 00 mv r17,r2 8027ba0: b8 60 58 00 mv r11,r3 8027ba4: b8 80 80 00 mv r16,r4 8027ba8: b8 a0 78 00 mv r15,r5 8027bac: b8 c0 70 00 mv r14,r6 FILE *fp; int match; init_etc_passwd_group(); 8027bb0: fb ff ff 14 calli 8027800 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 8027bb4: 78 01 08 05 mvhi r1,0x805 8027bb8: 78 02 08 06 mvhi r2,0x806 8027bbc: 38 21 fd 84 ori r1,r1,0xfd84 8027bc0: 38 42 78 ac ori r2,r2,0x78ac 8027bc4: f8 00 6e 5f calli 8043540 8027bc8: b8 20 60 00 mv r12,r1 8027bcc: 5c 20 00 05 bne r1,r0,8027be0 errno = EINVAL; 8027bd0: f8 00 6b 55 calli 8042924 <__errno> <== NOT EXECUTED 8027bd4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027bd8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8027bdc: e0 00 00 0d bi 8027c10 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 8027be0: b9 60 10 00 mv r2,r11 8027be4: ba 00 18 00 mv r3,r16 8027be8: b9 e0 20 00 mv r4,r15 8027bec: b9 80 08 00 mv r1,r12 8027bf0: fb ff fe a6 calli 8027688 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 8027bf4: 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)) { 8027bf8: 5c 20 00 08 bne r1,r0,8027c18 errno = EINVAL; 8027bfc: f8 00 6b 4a calli 8042924 <__errno> <== NOT EXECUTED 8027c00: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027c04: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 8027c08: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027c0c: f8 00 6b a8 calli 8042aac <== NOT EXECUTED 8027c10: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8027c14: e0 00 00 0d bi 8027c48 <== NOT EXECUTED } if (name) { 8027c18: 45 a0 00 05 be r13,r0,8027c2c match = (strcmp(pwd->pw_name, name) == 0); 8027c1c: 29 61 00 00 lw r1,(r11+0) 8027c20: f8 00 87 af calli 8049adc 8027c24: 64 27 00 00 cmpei r7,r1,0 8027c28: e0 00 00 03 bi 8027c34 } else { match = (pwd->pw_uid == uid); 8027c2c: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 8027c30: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED } if (match) { 8027c34: 44 e0 ff eb be r7,r0,8027be0 fclose(fp); 8027c38: b9 80 08 00 mv r1,r12 8027c3c: f8 00 6b 9c calli 8042aac *result = pwd; 8027c40: 34 01 00 00 mvi r1,0 8027c44: 59 cb 00 00 sw (r14+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 8027c48: 2b 9d 00 04 lw ra,(sp+4) 8027c4c: 2b 8b 00 20 lw r11,(sp+32) 8027c50: 2b 8c 00 1c lw r12,(sp+28) 8027c54: 2b 8d 00 18 lw r13,(sp+24) 8027c58: 2b 8e 00 14 lw r14,(sp+20) 8027c5c: 2b 8f 00 10 lw r15,(sp+16) 8027c60: 2b 90 00 0c lw r16,(sp+12) 8027c64: 2b 91 00 08 lw r17,(sp+8) 8027c68: 37 9c 00 20 addi sp,sp,32 8027c6c: c3 a0 00 00 ret 080277b0 : return NULL; return p; } struct passwd *getpwent(void) { 80277b0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80277b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp == NULL) 80277b8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80277bc: 38 21 eb b8 ori r1,r1,0xebb8 <== NOT EXECUTED 80277c0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80277c4: 44 20 00 0b be r1,r0,80277f0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 80277c8: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80277cc: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 80277d0: 38 42 ec 84 ori r2,r2,0xec84 <== NOT EXECUTED 80277d4: 38 63 eb bc ori r3,r3,0xebbc <== NOT EXECUTED 80277d8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 80277dc: fb ff ff ab calli 8027688 <== NOT EXECUTED 80277e0: 44 20 00 04 be r1,r0,80277f0 <== NOT EXECUTED 80277e4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80277e8: 38 21 ec 84 ori r1,r1,0xec84 <== NOT EXECUTED 80277ec: e0 00 00 02 bi 80277f4 <== NOT EXECUTED 80277f0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &pwent; } 80277f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80277f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80277fc: c3 a0 00 00 ret <== NOT EXECUTED 08027cac : struct passwd *getpwuid( uid_t uid ) { 8027cac: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027cb0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 8027cb4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027cb8: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8027cbc: 38 42 ec 84 ori r2,r2,0xec84 <== NOT EXECUTED 8027cc0: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027cc4: 38 63 eb bc ori r3,r3,0xebbc <== NOT EXECUTED 8027cc8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027ccc: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027cd0: fb ff ff e8 calli 8027c70 <== NOT EXECUTED 8027cd4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8027cd8: 5c 22 00 02 bne r1,r2,8027ce0 <== NOT EXECUTED return NULL; return p; 8027cdc: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 8027ce0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027ce4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027ce8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8027cec: c3 a0 00 00 ret <== NOT EXECUTED 08027c70 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 8027c70: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027c74: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027c78: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 8027c7c: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 8027c80: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 8027c84: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 8027c88: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 8027c8c: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 8027c90: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 8027c94: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 8027c98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8027c9c: fb ff ff b6 calli 8027b74 <== NOT EXECUTED } 8027ca0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027ca4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027ca8: c3 a0 00 00 ret <== NOT EXECUTED 080071d4 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 80071d4: 37 9c ff ec addi sp,sp,-20 80071d8: 5b 8b 00 0c sw (sp+12),r11 80071dc: 5b 8c 00 08 sw (sp+8),r12 80071e0: 5b 9d 00 04 sw (sp+4),ra 80071e4: b8 20 58 00 mv r11,r1 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 80071e8: 5c 20 00 06 bne r1,r0,8007200 errno = EFAULT; 80071ec: f8 00 0f 44 calli 800aefc <__errno> <== NOT EXECUTED 80071f0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80071f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80071f8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 80071fc: e0 00 00 0f bi 8007238 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 8007200: 90 00 60 00 rcsr r12,IE 8007204: 34 01 ff fe mvi r1,-2 8007208: a1 81 08 00 and r1,r12,r1 800720c: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 8007210: 37 81 00 10 addi r1,sp,16 8007214: f8 00 04 2e calli 80082cc <_TOD_Get> _ISR_Enable(level); 8007218: 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; 800721c: 2b 82 00 10 lw r2,(sp+16) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8007220: 2b 81 00 14 lw r1,(sp+20) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 8007224: 59 62 00 00 sw (r11+0),r2 time->tv_usec = useconds; 8007228: 34 02 03 e8 mvi r2,1000 800722c: f8 00 47 39 calli 8018f10 <__divsi3> 8007230: 59 61 00 04 sw (r11+4),r1 8007234: 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; } 8007238: 2b 9d 00 04 lw ra,(sp+4) 800723c: 2b 8b 00 0c lw r11,(sp+12) 8007240: 2b 8c 00 08 lw r12,(sp+8) 8007244: 37 9c 00 14 addi sp,sp,20 8007248: c3 a0 00 00 ret 08007734 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 8007734: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8007738: 38 21 b2 f0 ori r1,r1,0xb2f0 <== NOT EXECUTED 800773c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Uid; } 8007740: 2c 21 00 32 lhu r1,(r1+50) <== NOT EXECUTED 8007744: c3 a0 00 00 ret <== NOT EXECUTED 08010bf0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8010bf0: 37 9c ff e8 addi sp,sp,-24 8010bf4: 5b 8b 00 10 sw (sp+16),r11 8010bf8: 5b 8c 00 0c sw (sp+12),r12 8010bfc: 5b 8d 00 08 sw (sp+8),r13 8010c00: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8010c04: 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 */ ) { 8010c08: b8 40 60 00 mv r12,r2 8010c0c: 29 62 00 50 lw r2,(r11+80) 8010c10: 35 61 00 54 addi r1,r11,84 8010c14: 44 41 00 04 be r2,r1,8010c24 /* * 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 ); 8010c18: f8 00 02 43 calli 8011524 <__errno> 8010c1c: 34 02 00 5a mvi r2,90 8010c20: e0 00 00 08 bi 8010c40 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 8010c24: 29 81 00 10 lw r1,(r12+16) 8010c28: 28 21 00 1c lw r1,(r1+28) 8010c2c: 44 2b 00 03 be r1,r11,8010c38 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 8010c30: 29 6d 00 5c lw r13,(r11+92) 8010c34: 45 a0 00 06 be r13,r0,8010c4c rtems_set_errno_and_return_minus_one( EBUSY ); 8010c38: f8 00 02 3b calli 8011524 <__errno> 8010c3c: 34 02 00 10 mvi r2,16 8010c40: 58 22 00 00 sw (r1+0),r2 8010c44: 34 01 ff ff mvi r1,-1 8010c48: e0 00 00 1d bi 8010cbc /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8010c4c: 29 61 00 08 lw r1,(r11+8) 8010c50: 44 2d 00 04 be r1,r13,8010c60 8010c54: b9 60 08 00 mv r1,r11 8010c58: fb ff d0 2d calli 8004d0c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8010c5c: 59 6d 00 08 sw (r11+8),r13 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8010c60: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8010c64: 34 02 00 00 mvi r2,0 8010c68: 37 81 00 14 addi r1,sp,20 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8010c6c: 34 63 ff ff addi r3,r3,-1 8010c70: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8010c74: fb ff c7 73 calli 8002a40 8010c78: 2b 81 00 14 lw r1,(sp+20) 8010c7c: 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) ) { 8010c80: b9 60 08 00 mv r1,r11 8010c84: fb ff f0 bf calli 800cf80 8010c88: 5c 20 00 0c bne r1,r0,8010cb8 8010c8c: 2d 62 00 34 lhu r2,(r11+52) 8010c90: 5c 41 00 0a bne r2,r1,8010cb8 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8010c94: 78 01 08 02 mvhi r1,0x802 8010c98: 38 21 30 f8 ori r1,r1,0x30f8 8010c9c: 28 21 00 00 lw r1,(r1+0) 8010ca0: 29 83 00 00 lw r3,(r12+0) 8010ca4: 28 24 00 04 lw r4,(r1+4) 8010ca8: 5c 83 00 02 bne r4,r3,8010cb0 rtems_filesystem_current.node_access = NULL; 8010cac: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 8010cb0: b9 60 08 00 mv r1,r11 8010cb4: fb ff c7 35 calli 8002988 8010cb8: 34 01 00 00 mvi r1,0 } return 0; } 8010cbc: 2b 9d 00 04 lw ra,(sp+4) 8010cc0: 2b 8b 00 10 lw r11,(sp+16) 8010cc4: 2b 8c 00 0c lw r12,(sp+12) 8010cc8: 2b 8d 00 08 lw r13,(sp+8) 8010ccc: 37 9c 00 18 addi sp,sp,24 8010cd0: c3 a0 00 00 ret 08005558 : int ioctl( int fd, ioctl_command_t command, ... ) { 8005558: 37 9c ff d4 addi sp,sp,-44 800555c: 5b 8b 00 10 sw (sp+16),r11 8005560: 5b 8c 00 0c sw (sp+12),r12 8005564: 5b 8d 00 08 sw (sp+8),r13 8005568: 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 ); 800556c: 78 09 08 02 mvhi r9,0x802 8005570: 39 29 30 10 ori r9,r9,0x3010 8005574: 29 29 00 00 lw r9,(r9+0) int ioctl( int fd, ioctl_command_t command, ... ) { 8005578: 5b 83 00 18 sw (sp+24),r3 800557c: 5b 84 00 1c sw (sp+28),r4 8005580: 5b 85 00 20 sw (sp+32),r5 8005584: 5b 86 00 24 sw (sp+36),r6 8005588: 5b 87 00 28 sw (sp+40),r7 800558c: 5b 88 00 2c sw (sp+44),r8 8005590: 5b 82 00 14 sw (sp+20),r2 8005594: 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 ); 8005598: 55 21 00 02 bgu r9,r1,80055a0 800559c: e0 00 00 11 bi 80055e0 iop = rtems_libio_iop( fd ); 80055a0: 34 02 00 03 mvi r2,3 80055a4: fb ff ed 91 calli 8000be8 <__ashlsi3> 80055a8: 34 02 00 03 mvi r2,3 80055ac: 78 0b 08 02 mvhi r11,0x802 80055b0: b8 20 68 00 mv r13,r1 80055b4: 39 6b 37 78 ori r11,r11,0x3778 80055b8: fb ff ed 8c calli 8000be8 <__ashlsi3> 80055bc: 29 62 00 00 lw r2,(r11+0) 80055c0: b5 a1 08 00 add r1,r13,r1 80055c4: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 80055c8: 28 22 00 18 lw r2,(r1+24) 80055cc: 20 42 01 00 andi r2,r2,0x100 80055d0: 44 40 00 04 be r2,r0,80055e0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 80055d4: 28 24 00 40 lw r4,(r1+64) iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 80055d8: 2b 83 00 18 lw r3,(sp+24) /* * Now process the ioctl(). */ if ( !iop->handlers ) 80055dc: 5c 80 00 04 bne r4,r0,80055ec rtems_set_errno_and_return_minus_one( EBADF ); 80055e0: f8 00 31 0a calli 8011a08 <__errno> 80055e4: 34 02 00 09 mvi r2,9 80055e8: e0 00 00 05 bi 80055fc if ( !iop->handlers->ioctl_h ) 80055ec: 28 84 00 10 lw r4,(r4+16) 80055f0: 5c 80 00 06 bne r4,r0,8005608 rtems_set_errno_and_return_minus_one( ENOTSUP ); 80055f4: f8 00 31 05 calli 8011a08 <__errno> <== NOT EXECUTED 80055f8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80055fc: 58 22 00 00 sw (r1+0),r2 8005600: 34 01 ff ff mvi r1,-1 8005604: e0 00 00 03 bi 8005610 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 8005608: b9 80 10 00 mv r2,r12 800560c: d8 80 00 00 call r4 return rc; } 8005610: 2b 9d 00 04 lw ra,(sp+4) 8005614: 2b 8b 00 10 lw r11,(sp+16) 8005618: 2b 8c 00 0c lw r12,(sp+12) 800561c: 2b 8d 00 08 lw r13,(sp+8) 8005620: 37 9c 00 2c addi sp,sp,44 8005624: c3 a0 00 00 ret 08004478 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 8004478: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 800447c: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004480: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004484: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004488: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 800448c: 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) { 8004490: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 8004494: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 8004498: 44 20 00 02 be r1,r0,80044a0 <== NOT EXECUTED c &= 0x7f; 800449c: 21 8c 00 7f andi r12,r12,0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 80044a0: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 80044a4: 44 20 00 0c be r1,r0,80044d4 <== NOT EXECUTED c = tolower (c); 80044a8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80044ac: 38 21 32 c8 ori r1,r1,0x32c8 <== NOT EXECUTED 80044b0: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80044b4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80044b8: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED 80044bc: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED 80044c0: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80044c4: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 80044c8: 5c 83 00 02 bne r4,r3,80044d0 <== NOT EXECUTED 80044cc: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED 80044d0: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (c == '\r') { 80044d4: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 80044d8: 5d 81 00 07 bne r12,r1,80044f4 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 80044dc: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED 80044e0: 5c 20 00 4f bne r1,r0,800461c <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 80044e4: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED 80044e8: 44 41 00 0a be r2,r1,8004510 <== NOT EXECUTED 80044ec: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED 80044f0: e0 00 00 08 bi 8004510 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 80044f4: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 80044f8: 5d 83 00 05 bne r12,r3,800450c <== NOT EXECUTED 80044fc: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED 8004500: 44 40 00 04 be r2,r0,8004510 <== NOT EXECUTED 8004504: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8004508: e0 00 00 02 bi 8004510 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 800450c: 45 80 00 30 be r12,r0,80045cc <== NOT EXECUTED 8004510: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED 8004514: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED 8004518: 44 20 00 2d be r1,r0,80045cc <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 800451c: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004520: 5c 2c 00 04 bne r1,r12,8004530 <== NOT EXECUTED erase (tty, 0); 8004524: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004528: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800452c: e0 00 00 05 bi 8004540 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 8004530: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED 8004534: 5c 2c 00 05 bne r1,r12,8004548 <== NOT EXECUTED erase (tty, 1); 8004538: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800453c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004540: fb ff ff 49 calli 8004264 <== NOT EXECUTED 8004544: e0 00 00 36 bi 800461c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 8004548: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED 800454c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004550: 44 6c 00 34 be r3,r12,8004620 <== NOT EXECUTED return 1; } else if (c == '\n') { 8004554: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004558: 5d 81 00 0f bne r12,r1,8004594 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 800455c: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED 8004560: 44 40 00 04 be r2,r0,8004570 <== NOT EXECUTED echo (c, tty); 8004564: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004568: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800456c: fb ff ff 15 calli 80041c0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 8004570: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004574: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004578: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 800457c: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED 8004580: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8004584: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED 8004588: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED 800458c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return 1; 8004590: e0 00 00 24 bi 8004620 <== NOT EXECUTED } else if ((c == tty->termios.c_cc[VEOL]) 8004594: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED 8004598: 44 2c 00 03 be r1,r12,80045a4 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 800459c: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED 80045a0: 5c 2c 00 0b bne r1,r12,80045cc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 80045a4: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED 80045a8: 44 40 00 04 be r2,r0,80045b8 <== NOT EXECUTED echo (c, tty); 80045ac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80045b0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80045b4: fb ff ff 03 calli 80041c0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 80045b8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 80045bc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80045c0: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 80045c4: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED 80045c8: e0 00 00 11 bi 800460c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 80045cc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80045d0: 38 21 32 34 ori r1,r1,0x3234 <== NOT EXECUTED 80045d4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80045d8: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80045dc: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80045e0: 4c 41 00 0f bge r2,r1,800461c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 80045e4: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80045e8: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED 80045ec: 44 20 00 04 be r1,r0,80045fc <== NOT EXECUTED echo (c, tty); 80045f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80045f4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80045f8: fb ff fe f2 calli 80041c0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 80045fc: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004600: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004604: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004608: 34 62 00 01 addi r2,r3,1 <== NOT EXECUTED 800460c: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED 8004610: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED 8004614: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED 8004618: e0 00 00 02 bi 8004620 <== NOT EXECUTED 800461c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } 8004620: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004624: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004628: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800462c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004630: c3 a0 00 00 ret <== NOT EXECUTED 08024f00 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 8024f00: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8024f04: c3 a0 00 00 ret <== NOT EXECUTED 08027e34 : int link( const char *existing, const char *new ) { 8027e34: 37 9c ff c4 addi sp,sp,-60 8027e38: 5b 8b 00 10 sw (sp+16),r11 8027e3c: 5b 8c 00 0c sw (sp+12),r12 8027e40: 5b 8d 00 08 sw (sp+8),r13 8027e44: 5b 9d 00 04 sw (sp+4),ra 8027e48: b8 20 58 00 mv r11,r1 8027e4c: b8 40 60 00 mv r12,r2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 8027e50: f8 00 88 9f calli 804a0cc 8027e54: b8 20 10 00 mv r2,r1 8027e58: 34 03 00 00 mvi r3,0 8027e5c: b9 60 08 00 mv r1,r11 8027e60: 37 84 00 28 addi r4,sp,40 8027e64: 34 05 00 01 mvi r5,1 8027e68: fb ff 7d 9c calli 80074d8 0, &existing_loc, true ); if ( result != 0 ) 8027e6c: 34 0b ff ff mvi r11,-1 8027e70: 5c 20 00 68 bne r1,r0,8028010 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 8027e74: 41 83 00 00 lbu r3,(r12+0) 8027e78: 64 6b 00 5c cmpei r11,r3,92 8027e7c: 64 62 00 2f cmpei r2,r3,47 8027e80: b9 62 58 00 or r11,r11,r2 8027e84: 5d 61 00 02 bne r11,r1,8027e8c 8027e88: 5c 6b 00 0a bne r3,r11,8027eb0 8027e8c: 78 03 08 06 mvhi r3,0x806 8027e90: 38 63 b2 f0 ori r3,r3,0xb2f0 8027e94: 28 62 00 00 lw r2,(r3+0) 8027e98: 37 81 00 14 addi r1,sp,20 8027e9c: 34 03 00 14 mvi r3,20 8027ea0: 34 42 00 18 addi r2,r2,24 8027ea4: f8 00 79 42 calli 80463ac 8027ea8: 34 0b 00 01 mvi r11,1 8027eac: e0 00 00 08 bi 8027ecc 8027eb0: 78 03 08 06 mvhi r3,0x806 8027eb4: 38 63 b2 f0 ori r3,r3,0xb2f0 8027eb8: 28 62 00 00 lw r2,(r3+0) 8027ebc: 37 81 00 14 addi r1,sp,20 8027ec0: 34 03 00 14 mvi r3,20 8027ec4: 34 42 00 04 addi r2,r2,4 8027ec8: f8 00 79 39 calli 80463ac if ( !parent_loc.ops->evalformake_h ) { 8027ecc: 2b 81 00 20 lw r1,(sp+32) 8027ed0: 28 24 00 04 lw r4,(r1+4) 8027ed4: 5c 80 00 07 bne r4,r0,8027ef0 rtems_filesystem_freenode( &existing_loc ); 8027ed8: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8027edc: 44 24 00 37 be r1,r4,8027fb8 <== NOT EXECUTED 8027ee0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027ee4: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8027ee8: 5c 40 00 33 bne r2,r0,8027fb4 <== NOT EXECUTED 8027eec: e0 00 00 33 bi 8027fb8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 8027ef0: 37 8d 00 14 addi r13,sp,20 8027ef4: b5 8b 08 00 add r1,r12,r11 8027ef8: b9 a0 10 00 mv r2,r13 8027efc: 37 83 00 3c addi r3,sp,60 8027f00: d8 80 00 00 call r4 8027f04: b8 20 58 00 mv r11,r1 if ( result != 0 ) { 8027f08: 44 20 00 0b be r1,r0,8027f34 rtems_filesystem_freenode( &existing_loc ); 8027f0c: 2b 81 00 34 lw r1,(sp+52) 8027f10: 44 20 00 05 be r1,r0,8027f24 8027f14: 28 22 00 1c lw r2,(r1+28) 8027f18: 44 40 00 03 be r2,r0,8027f24 8027f1c: 37 81 00 28 addi r1,sp,40 8027f20: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( result ); 8027f24: f8 00 6a 80 calli 8042924 <__errno> 8027f28: 58 2b 00 00 sw (r1+0),r11 8027f2c: 34 0b ff ff mvi r11,-1 8027f30: e0 00 00 38 bi 8028010 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 8027f34: 2b 81 00 38 lw r1,(sp+56) 8027f38: 2b 82 00 24 lw r2,(sp+36) 8027f3c: 44 41 00 10 be r2,r1,8027f7c rtems_filesystem_freenode( &existing_loc ); 8027f40: 2b 81 00 34 lw r1,(sp+52) 8027f44: 44 20 00 05 be r1,r0,8027f58 8027f48: 28 22 00 1c lw r2,(r1+28) 8027f4c: 44 40 00 03 be r2,r0,8027f58 8027f50: 37 81 00 28 addi r1,sp,40 8027f54: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 8027f58: 2b 81 00 20 lw r1,(sp+32) 8027f5c: 44 20 00 05 be r1,r0,8027f70 8027f60: 28 22 00 1c lw r2,(r1+28) 8027f64: 44 40 00 03 be r2,r0,8027f70 8027f68: 37 81 00 14 addi r1,sp,20 8027f6c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EXDEV ); 8027f70: f8 00 6a 6d calli 8042924 <__errno> 8027f74: 34 02 00 12 mvi r2,18 8027f78: e0 00 00 12 bi 8027fc0 } if ( !parent_loc.ops->link_h ) { 8027f7c: 2b 81 00 20 lw r1,(sp+32) 8027f80: 28 24 00 08 lw r4,(r1+8) 8027f84: 5c 80 00 11 bne r4,r0,8027fc8 rtems_filesystem_freenode( &existing_loc ); 8027f88: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8027f8c: 44 24 00 05 be r1,r4,8027fa0 <== NOT EXECUTED 8027f90: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027f94: 44 44 00 03 be r2,r4,8027fa0 <== NOT EXECUTED 8027f98: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8027f9c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 8027fa0: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8027fa4: 44 20 00 05 be r1,r0,8027fb8 <== NOT EXECUTED 8027fa8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027fac: 44 40 00 03 be r2,r0,8027fb8 <== NOT EXECUTED 8027fb0: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED 8027fb4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8027fb8: f8 00 6a 5b calli 8042924 <__errno> <== NOT EXECUTED 8027fbc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8027fc0: 58 22 00 00 sw (r1+0),r2 8027fc4: e3 ff ff da bi 8027f2c } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 8027fc8: 2b 83 00 3c lw r3,(sp+60) 8027fcc: 37 8c 00 28 addi r12,sp,40 8027fd0: b9 a0 10 00 mv r2,r13 8027fd4: b9 80 08 00 mv r1,r12 8027fd8: d8 80 00 00 call r4 8027fdc: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &existing_loc ); 8027fe0: 2b 81 00 34 lw r1,(sp+52) 8027fe4: 44 20 00 05 be r1,r0,8027ff8 8027fe8: 28 22 00 1c lw r2,(r1+28) 8027fec: 44 40 00 03 be r2,r0,8027ff8 8027ff0: b9 80 08 00 mv r1,r12 8027ff4: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 8027ff8: 2b 81 00 20 lw r1,(sp+32) 8027ffc: 44 20 00 05 be r1,r0,8028010 8028000: 28 22 00 1c lw r2,(r1+28) 8028004: 44 40 00 03 be r2,r0,8028010 8028008: 37 81 00 14 addi r1,sp,20 802800c: d8 40 00 00 call r2 return result; } 8028010: b9 60 08 00 mv r1,r11 8028014: 2b 9d 00 04 lw ra,(sp+4) 8028018: 2b 8b 00 10 lw r11,(sp+16) 802801c: 2b 8c 00 0c lw r12,(sp+12) 8028020: 2b 8d 00 08 lw r13,(sp+8) 8028024: 37 9c 00 3c addi sp,sp,60 8028028: c3 a0 00 00 ret 080193a8 : off_t lseek( int fd, off_t offset, int whence ) { 80193a8: 37 9c ff e8 addi sp,sp,-24 80193ac: 5b 8b 00 18 sw (sp+24),r11 80193b0: 5b 8c 00 14 sw (sp+20),r12 80193b4: 5b 8d 00 10 sw (sp+16),r13 80193b8: 5b 8e 00 0c sw (sp+12),r14 80193bc: 5b 8f 00 08 sw (sp+8),r15 80193c0: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 80193c4: 78 04 08 01 mvhi r4,0x801 80193c8: 38 84 c0 10 ori r4,r4,0xc010 80193cc: 28 84 00 00 lw r4,(r4+0) off_t lseek( int fd, off_t offset, int whence ) { 80193d0: b8 40 60 00 mv r12,r2 80193d4: b8 60 68 00 mv r13,r3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 80193d8: 54 81 00 02 bgu r4,r1,80193e0 80193dc: e0 00 00 0e bi 8019414 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 80193e0: 34 02 00 03 mvi r2,3 80193e4: fb ff 9b 83 calli 80001f0 <__ashlsi3> 80193e8: 78 0e 08 01 mvhi r14,0x801 80193ec: 39 ce c6 9c ori r14,r14,0xc69c 80193f0: 34 02 00 03 mvi r2,3 80193f4: b8 20 78 00 mv r15,r1 80193f8: fb ff 9b 7e calli 80001f0 <__ashlsi3> 80193fc: 29 cb 00 00 lw r11,(r14+0) 8019400: b5 e1 08 00 add r1,r15,r1 8019404: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 8019408: 29 61 00 18 lw r1,(r11+24) 801940c: 20 21 01 00 andi r1,r1,0x100 8019410: 5c 20 00 04 bne r1,r0,8019420 8019414: fb ff c6 ba calli 800aefc <__errno> <== NOT EXECUTED 8019418: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801941c: e0 00 00 29 bi 80194c0 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 8019420: 29 61 00 40 lw r1,(r11+64) 8019424: 28 21 00 14 lw r1,(r1+20) 8019428: 5c 20 00 04 bne r1,r0,8019438 rtems_set_errno_and_return_minus_one( ENOTSUP ); 801942c: fb ff c6 b4 calli 800aefc <__errno> <== NOT EXECUTED 8019430: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8019434: e0 00 00 23 bi 80194c0 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 8019438: 34 01 00 01 mvi r1,1 /* * Now process the lseek(). */ old_offset = iop->offset; 801943c: 29 6f 00 10 lw r15,(r11+16) 8019440: 29 6e 00 14 lw r14,(r11+20) switch ( whence ) { 8019444: 45 a1 00 0a be r13,r1,801946c 8019448: 34 01 00 02 mvi r1,2 801944c: 45 a1 00 0f be r13,r1,8019488 8019450: 5d a0 00 1a bne r13,r0,80194b8 case SEEK_SET: iop->offset = offset; 8019454: b9 80 08 00 mv r1,r12 8019458: 34 02 00 1f mvi r2,31 801945c: fb ff 9b b5 calli 8000330 <__ashrsi3> 8019460: 59 61 00 10 sw (r11+16),r1 8019464: 59 6c 00 14 sw (r11+20),r12 break; 8019468: e0 00 00 19 bi 80194cc case SEEK_CUR: iop->offset += offset; 801946c: 34 02 00 1f mvi r2,31 8019470: b9 80 08 00 mv r1,r12 8019474: fb ff 9b af calli 8000330 <__ashrsi3> 8019478: b5 8e 10 00 add r2,r12,r14 801947c: f5 82 18 00 cmpgu r3,r12,r2 8019480: b4 2f 08 00 add r1,r1,r15 8019484: e0 00 00 09 bi 80194a8 break; case SEEK_END: iop->offset = iop->size + offset; 8019488: 34 02 00 1f mvi r2,31 801948c: b9 80 08 00 mv r1,r12 8019490: fb ff 9b a8 calli 8000330 <__ashrsi3> 8019494: 29 62 00 0c lw r2,(r11+12) 8019498: 29 64 00 08 lw r4,(r11+8) 801949c: b5 82 10 00 add r2,r12,r2 80194a0: f5 82 18 00 cmpgu r3,r12,r2 80194a4: b4 24 08 00 add r1,r1,r4 80194a8: b4 61 08 00 add r1,r3,r1 80194ac: 59 61 00 10 sw (r11+16),r1 80194b0: 59 62 00 14 sw (r11+20),r2 break; 80194b4: e0 00 00 06 bi 80194cc default: rtems_set_errno_and_return_minus_one( EINVAL ); 80194b8: fb ff c6 91 calli 800aefc <__errno> 80194bc: 34 02 00 16 mvi r2,22 80194c0: 58 22 00 00 sw (r1+0),r2 80194c4: 34 0c ff ff mvi r12,-1 80194c8: e0 00 00 13 bi 8019514 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 80194cc: 29 6f 00 40 lw r15,(r11+64) 80194d0: 34 02 00 1f mvi r2,31 80194d4: b9 80 08 00 mv r1,r12 80194d8: fb ff 9b 96 calli 8000330 <__ashrsi3> 80194dc: 29 e5 00 14 lw r5,(r15+20) 80194e0: b8 20 10 00 mv r2,r1 80194e4: b9 80 18 00 mv r3,r12 80194e8: b9 a0 20 00 mv r4,r13 80194ec: b9 60 08 00 mv r1,r11 80194f0: d8 a0 00 00 call r5 if ( status == (off_t) -1 ) 80194f4: 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 ); 80194f8: b8 40 60 00 mv r12,r2 if ( status == (off_t) -1 ) 80194fc: 5c 41 00 06 bne r2,r1,8019514 iop->offset = old_offset; 8019500: b9 c0 08 00 mv r1,r14 8019504: 34 02 00 1f mvi r2,31 8019508: fb ff 9b 8a calli 8000330 <__ashrsi3> 801950c: 59 61 00 10 sw (r11+16),r1 8019510: 59 6e 00 14 sw (r11+20),r14 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 8019514: b9 80 08 00 mv r1,r12 8019518: 2b 9d 00 04 lw ra,(sp+4) 801951c: 2b 8b 00 18 lw r11,(sp+24) 8019520: 2b 8c 00 14 lw r12,(sp+20) 8019524: 2b 8d 00 10 lw r13,(sp+16) 8019528: 2b 8e 00 0c lw r14,(sp+12) 801952c: 2b 8f 00 08 lw r15,(sp+8) 8019530: 37 9c 00 18 addi sp,sp,24 8019534: c3 a0 00 00 ret 08028200 : int _STAT_NAME( const char *path, struct stat *buf ) { 8028200: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8028204: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8028208: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802820c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8028210: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028214: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8028218: b8 20 58 00 mv r11,r1 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 802821c: 5c 40 00 04 bne r2,r0,802822c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 8028220: f8 00 69 c1 calli 8042924 <__errno> <== NOT EXECUTED 8028224: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8028228: e0 00 00 16 bi 8028280 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 802822c: f8 00 87 a8 calli 804a0cc <== NOT EXECUTED 8028230: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8028234: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 8028238: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802823c: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8028240: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028244: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 8028248: fb ff 7c a4 calli 80074d8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 802824c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028250: 5c 20 00 1f bne r1,r0,80282cc <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 8028254: 2b 82 00 1c lw r2,(sp+28) <== NOT EXECUTED 8028258: 28 42 00 18 lw r2,(r2+24) <== NOT EXECUTED 802825c: 5c 41 00 0c bne r2,r1,802828c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8028260: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8028264: 44 22 00 05 be r1,r2,8028278 <== NOT EXECUTED 8028268: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 802826c: 44 62 00 03 be r3,r2,8028278 <== NOT EXECUTED 8028270: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028274: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028278: f8 00 69 ab calli 8042924 <__errno> <== NOT EXECUTED 802827c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028280: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028284: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028288: e0 00 00 11 bi 80282cc <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 802828c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028290: 34 03 00 48 mvi r3,72 <== NOT EXECUTED 8028294: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028298: f8 00 79 0f calli 80466d4 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 802829c: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 80282a0: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80282a4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80282a8: 28 63 00 18 lw r3,(r3+24) <== NOT EXECUTED 80282ac: d8 60 00 00 call r3 <== NOT EXECUTED 80282b0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 80282b4: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 80282b8: 44 20 00 05 be r1,r0,80282cc <== NOT EXECUTED 80282bc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80282c0: 44 40 00 03 be r2,r0,80282cc <== NOT EXECUTED 80282c4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80282c8: d8 40 00 00 call r2 <== NOT EXECUTED return status; } 80282cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80282d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80282d4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80282d8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80282dc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80282e0: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 80282e4: c3 a0 00 00 ret <== NOT EXECUTED 08007678 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8007678: 37 9c ff f0 addi sp,sp,-16 800767c: 5b 8b 00 10 sw (sp+16),r11 8007680: 5b 8c 00 0c sw (sp+12),r12 8007684: 5b 8d 00 08 sw (sp+8),r13 8007688: 5b 9d 00 04 sw (sp+4),ra 800768c: 78 03 08 01 mvhi r3,0x801 8007690: 38 63 c6 a8 ori r3,r3,0xc6a8 8007694: 28 62 00 04 lw r2,(r3+4) 8007698: b8 20 68 00 mv r13,r1 800769c: 34 41 00 01 addi r1,r2,1 80076a0: 58 61 00 04 sw (r3+4),r1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 80076a4: fb ff ff e7 calli 8007640 /* * Validate the parameters */ if ( !size ) 80076a8: 45 a0 00 30 be r13,r0,8007768 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 80076ac: 78 01 08 01 mvhi r1,0x801 80076b0: 38 21 c9 c0 ori r1,r1,0xc9c0 80076b4: 28 22 00 00 lw r2,(r1+0) 80076b8: 34 01 00 03 mvi r1,3 80076bc: 5c 41 00 03 bne r2,r1,80076c8 80076c0: fb ff ff c5 calli 80075d4 80076c4: 44 20 00 29 be r1,r0,8007768 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 80076c8: 78 01 08 01 mvhi r1,0x801 80076cc: 38 21 c0 1c ori r1,r1,0xc01c 80076d0: 28 21 00 00 lw r1,(r1+0) 80076d4: 34 03 00 00 mvi r3,0 80076d8: b9 a0 10 00 mv r2,r13 80076dc: b8 60 20 00 mv r4,r3 80076e0: f8 00 04 c9 calli 8008a04 <_Protected_heap_Allocate_aligned_with_boundary> 80076e4: 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; 80076e8: b8 20 60 00 mv r12,r1 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 80076ec: 5c 20 00 0e bne r1,r0,8007724 if (rtems_malloc_sbrk_helpers) 80076f0: 78 01 08 01 mvhi r1,0x801 80076f4: 38 21 c6 14 ori r1,r1,0xc614 80076f8: 28 21 00 00 lw r1,(r1+0) 80076fc: 44 2b 00 06 be r1,r11,8007714 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8007700: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007704: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007708: d8 40 00 00 call r2 <== NOT EXECUTED 800770c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !return_this ) { 8007710: 5c 20 00 05 bne r1,r0,8007724 <== NOT EXECUTED errno = ENOMEM; 8007714: f8 00 0d fa calli 800aefc <__errno> 8007718: 34 02 00 0c mvi r2,12 800771c: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 8007720: e0 00 00 13 bi 800776c } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8007724: 78 01 08 01 mvhi r1,0x801 8007728: 38 21 c6 18 ori r1,r1,0xc618 800772c: 28 21 00 00 lw r1,(r1+0) 8007730: 44 20 00 05 be r1,r0,8007744 (*rtems_malloc_dirty_helper)( return_this, size ); 8007734: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8007738: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800773c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007740: d8 60 00 00 call r3 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8007744: 78 01 08 01 mvhi r1,0x801 8007748: 38 21 c6 10 ori r1,r1,0xc610 800774c: 28 21 00 00 lw r1,(r1+0) 8007750: b9 80 58 00 mv r11,r12 8007754: 44 20 00 06 be r1,r0,800776c (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8007758: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800775c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007760: d8 40 00 00 call r2 <== NOT EXECUTED 8007764: e0 00 00 02 bi 800776c <== NOT EXECUTED 8007768: 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; } 800776c: b9 60 08 00 mv r1,r11 8007770: 2b 9d 00 04 lw ra,(sp+4) 8007774: 2b 8b 00 10 lw r11,(sp+16) 8007778: 2b 8c 00 0c lw r12,(sp+12) 800777c: 2b 8d 00 08 lw r13,(sp+8) 8007780: 37 9c 00 10 addi sp,sp,16 8007784: c3 a0 00 00 ret 0800761c : } void malloc_deferred_free( void *pointer ) { 800761c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007620: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8007624: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8007628: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800762c: 38 21 ca 18 ori r1,r1,0xca18 <== NOT EXECUTED 8007630: fb ff ec fc calli 8002a20 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 8007634: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007638: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800763c: c3 a0 00 00 ret <== NOT EXECUTED 08007640 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8007640: 37 9c ff f8 addi sp,sp,-8 8007644: 5b 8b 00 08 sw (sp+8),r11 8007648: 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 ); 800764c: 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) 8007650: e0 00 00 02 bi 8007658 free(to_be_freed); 8007654: fb ff fe 6b calli 8007000 <== NOT EXECUTED 8007658: b9 60 08 00 mv r1,r11 800765c: 38 21 ca 18 ori r1,r1,0xca18 8007660: f8 00 02 86 calli 8008078 <_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) 8007664: 5c 20 ff fc bne r1,r0,8007654 free(to_be_freed); } 8007668: 2b 9d 00 04 lw ra,(sp+4) 800766c: 2b 8b 00 08 lw r11,(sp+8) 8007670: 37 9c 00 08 addi sp,sp,8 8007674: c3 a0 00 00 ret 0800fbf8 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 800fbf8: 37 9c ff f8 addi sp,sp,-8 800fbfc: 5b 8b 00 08 sw (sp+8),r11 800fc00: 5b 9d 00 04 sw (sp+4),ra 800fc04: 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) ) { 800fc08: fb ff f4 de calli 800cf80 800fc0c: 5c 20 00 10 bne r1,r0,800fc4c 800fc10: 2d 62 00 34 lhu r2,(r11+52) 800fc14: 5c 41 00 0e bne r2,r1,800fc4c /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 800fc18: 78 01 08 02 mvhi r1,0x802 800fc1c: 38 21 30 f8 ori r1,r1,0x30f8 800fc20: 28 21 00 00 lw r1,(r1+0) 800fc24: 28 23 00 04 lw r3,(r1+4) 800fc28: 5c 6b 00 02 bne r3,r11,800fc30 rtems_filesystem_current.node_access = NULL; 800fc2c: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 800fc30: 29 62 00 4c lw r2,(r11+76) 800fc34: 34 01 00 06 mvi r1,6 800fc38: 44 41 00 03 be r2,r1,800fc44 IMFS_memfile_remove( the_jnode ); 800fc3c: b9 60 08 00 mv r1,r11 800fc40: fb ff ff 7f calli 800fa3c free( the_jnode ); 800fc44: b9 60 08 00 mv r1,r11 800fc48: fb ff cb 50 calli 8002988 } return 0; } 800fc4c: 34 01 00 00 mvi r1,0 800fc50: 2b 9d 00 04 lw ra,(sp+4) 800fc54: 2b 8b 00 08 lw r11,(sp+8) 800fc58: 37 9c 00 08 addi sp,sp,8 800fc5c: c3 a0 00 00 ret 0800f940 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 800f940: 37 9c ff e8 addi sp,sp,-24 800f944: 5b 8b 00 18 sw (sp+24),r11 800f948: 5b 8c 00 14 sw (sp+20),r12 800f94c: 5b 8d 00 10 sw (sp+16),r13 800f950: 5b 8e 00 0c sw (sp+12),r14 800f954: 5b 8f 00 08 sw (sp+8),r15 800f958: 5b 9d 00 04 sw (sp+4),ra 800f95c: b8 20 58 00 mv r11,r1 800f960: b8 40 78 00 mv r15,r2 /* * Perform internal consistency checks */ assert( block_table ); 800f964: 5c 20 00 09 bne r1,r0,800f988 800f968: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 800f96c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 800f970: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 800f974: 38 21 1b 90 ori r1,r1,0x1b90 <== NOT EXECUTED 800f978: 38 63 1d 04 ori r3,r3,0x1d04 <== NOT EXECUTED 800f97c: 38 84 1c 08 ori r4,r4,0x1c08 <== NOT EXECUTED 800f980: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED 800f984: fb ff f4 d0 calli 800ccc4 <__assert_func> <== NOT EXECUTED 800f988: 34 0c 00 00 mvi r12,0 800f98c: 28 2d 00 00 lw r13,(r1+0) */ b = *block_table; for ( i=0 ; i if ( b[i] ) { 800f998: 29 a1 00 00 lw r1,(r13+0) 800f99c: 44 20 00 03 be r1,r0,800f9a8 memfile_free_block( b[i] ); 800f9a0: fb ff ff 1b calli 800f60c b[i] = 0; 800f9a4: 59 ae 00 00 sw (r13+0),r14 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 800f9b4: 29 61 00 00 lw r1,(r11+0) 800f9b8: fb ff ff 15 calli 800f60c *block_table = 0; 800f9bc: 34 01 00 00 mvi r1,0 800f9c0: 59 61 00 00 sw (r11+0),r1 } 800f9c4: 2b 9d 00 04 lw ra,(sp+4) 800f9c8: 2b 8b 00 18 lw r11,(sp+24) 800f9cc: 2b 8c 00 14 lw r12,(sp+20) 800f9d0: 2b 8d 00 10 lw r13,(sp+16) 800f9d4: 2b 8e 00 0c lw r14,(sp+12) 800f9d8: 2b 8f 00 08 lw r15,(sp+8) 800f9dc: 37 9c 00 18 addi sp,sp,24 800f9e0: c3 a0 00 00 ret 0800ff4c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 800ff4c: 37 9c ff f0 addi sp,sp,-16 800ff50: 5b 8b 00 08 sw (sp+8),r11 800ff54: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 800ff58: 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 ) 800ff5c: 29 64 00 50 lw r4,(r11+80) 800ff60: 48 44 00 05 bg r2,r4,800ff74 800ff64: 5c 82 00 08 bne r4,r2,800ff84 800ff68: 29 64 00 54 lw r4,(r11+84) 800ff6c: 54 64 00 02 bgu r3,r4,800ff74 800ff70: e0 00 00 05 bi 800ff84 return IMFS_memfile_extend( the_jnode, length ); 800ff74: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ff78: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 800ff7c: fb ff ff 8a calli 800fda4 <== NOT EXECUTED 800ff80: e0 00 00 0b bi 800ffac <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 800ff84: 59 62 00 50 sw (r11+80),r2 800ff88: 59 63 00 54 sw (r11+84),r3 iop->size = the_jnode->info.file.size; 800ff8c: 58 22 00 08 sw (r1+8),r2 800ff90: 58 23 00 0c sw (r1+12),r3 IMFS_update_atime( the_jnode ); 800ff94: 34 02 00 00 mvi r2,0 800ff98: 37 81 00 0c addi r1,sp,12 800ff9c: fb ff ca a9 calli 8002a40 800ffa0: 2b 81 00 0c lw r1,(sp+12) 800ffa4: 59 61 00 40 sw (r11+64),r1 800ffa8: 34 01 00 00 mvi r1,0 return 0; } 800ffac: 2b 9d 00 04 lw ra,(sp+4) 800ffb0: 2b 8b 00 08 lw r11,(sp+8) 800ffb4: 37 9c 00 10 addi sp,sp,16 800ffb8: c3 a0 00 00 ret 0800ffbc : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 800ffbc: 37 9c ff f4 addi sp,sp,-12 800ffc0: 5b 8b 00 0c sw (sp+12),r11 800ffc4: 5b 8c 00 08 sw (sp+8),r12 800ffc8: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 800ffcc: 28 2c 00 3c lw r12,(r1+60) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 800ffd0: b8 20 58 00 mv r11,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 800ffd4: 34 01 00 06 mvi r1,6 800ffd8: 29 82 00 4c lw r2,(r12+76) 800ffdc: 5c 41 00 0c bne r2,r1,801000c if (iop->offset > the_jnode->info.linearfile.size) 800ffe0: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 800ffe4: 29 63 00 10 lw r3,(r11+16) <== NOT EXECUTED 800ffe8: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED 800ffec: 48 61 00 05 bg r3,r1,8010000 <== NOT EXECUTED 800fff0: 5c 61 00 15 bne r3,r1,8010044 <== NOT EXECUTED 800fff4: 29 63 00 14 lw r3,(r11+20) <== NOT EXECUTED 800fff8: 54 62 00 02 bgu r3,r2,8010000 <== NOT EXECUTED 800fffc: e0 00 00 12 bi 8010044 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 8010000: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED 8010004: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8010008: e0 00 00 0f bi 8010044 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 801000c: 29 62 00 14 lw r2,(r11+20) 8010010: b9 80 08 00 mv r1,r12 8010014: fb ff ff 64 calli 800fda4 8010018: 44 20 00 07 be r1,r0,8010034 rtems_set_errno_and_return_minus_one( ENOSPC ); 801001c: f8 00 05 42 calli 8011524 <__errno> <== NOT EXECUTED 8010020: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010024: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8010028: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801002c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010030: e0 00 00 07 bi 801004c <== NOT EXECUTED iop->size = the_jnode->info.file.size; 8010034: 29 81 00 50 lw r1,(r12+80) 8010038: 59 61 00 08 sw (r11+8),r1 801003c: 29 8c 00 54 lw r12,(r12+84) 8010040: 59 6c 00 0c sw (r11+12),r12 } return iop->offset; 8010044: 29 62 00 14 lw r2,(r11+20) 8010048: 29 63 00 10 lw r3,(r11+16) } 801004c: b8 60 08 00 mv r1,r3 8010050: 2b 9d 00 04 lw ra,(sp+4) 8010054: 2b 8b 00 0c lw r11,(sp+12) 8010058: 2b 8c 00 08 lw r12,(sp+8) 801005c: 37 9c 00 0c addi sp,sp,12 8010060: c3 a0 00 00 ret 0801037c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 801037c: 37 9c ff f4 addi sp,sp,-12 8010380: 5b 8b 00 0c sw (sp+12),r11 8010384: 5b 8c 00 08 sw (sp+8),r12 8010388: 5b 9d 00 04 sw (sp+4),ra 801038c: b8 20 60 00 mv r12,r1 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 8010390: 28 21 00 18 lw r1,(r1+24) 8010394: 34 02 00 00 mvi r2,0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010398: 29 8b 00 3c lw r11,(r12+60) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 801039c: 20 21 02 04 andi r1,r1,0x204 80103a0: 44 22 00 13 be r1,r2,80103ec && (the_jnode->type == IMFS_LINEAR_FILE)) { 80103a4: 29 63 00 4c lw r3,(r11+76) 80103a8: 34 01 00 06 mvi r1,6 80103ac: 5c 61 00 10 bne r3,r1,80103ec uint32_t count = the_jnode->info.linearfile.size; 80103b0: 29 64 00 54 lw r4,(r11+84) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 80103b4: 34 01 00 05 mvi r1,5 <== 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; 80103b8: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 80103bc: 59 61 00 4c sw (r11+76),r1 <== NOT EXECUTED the_jnode->info.file.size = 0; 80103c0: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED 80103c4: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 80103c8: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 80103cc: 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; 80103d0: 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) 80103d4: 44 82 00 06 be r4,r2,80103ec <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 80103d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80103dc: fb ff ff 22 calli 8010064 <== NOT EXECUTED 80103e0: 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) 80103e4: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80103e8: 44 43 00 0d be r2,r3,801041c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 80103ec: 29 81 00 18 lw r1,(r12+24) 80103f0: 20 21 02 00 andi r1,r1,0x200 80103f4: 44 20 00 05 be r1,r0,8010408 iop->offset = the_jnode->info.file.size; 80103f8: 29 61 00 50 lw r1,(r11+80) 80103fc: 59 81 00 10 sw (r12+16),r1 8010400: 29 61 00 54 lw r1,(r11+84) 8010404: 59 81 00 14 sw (r12+20),r1 iop->size = the_jnode->info.file.size; 8010408: 29 61 00 50 lw r1,(r11+80) 801040c: 59 81 00 08 sw (r12+8),r1 8010410: 29 6b 00 54 lw r11,(r11+84) 8010414: 34 01 00 00 mvi r1,0 8010418: 59 8b 00 0c sw (r12+12),r11 return 0; } 801041c: 2b 9d 00 04 lw ra,(sp+4) 8010420: 2b 8b 00 0c lw r11,(sp+12) 8010424: 2b 8c 00 08 lw r12,(sp+8) 8010428: 37 9c 00 0c addi sp,sp,12 801042c: c3 a0 00 00 ret 080010c4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80010c4: 37 9c ff cc addi sp,sp,-52 80010c8: 5b 8b 00 1c sw (sp+28),r11 80010cc: 5b 8c 00 18 sw (sp+24),r12 80010d0: 5b 8d 00 14 sw (sp+20),r13 80010d4: 5b 8e 00 10 sw (sp+16),r14 80010d8: 5b 8f 00 0c sw (sp+12),r15 80010dc: 5b 90 00 08 sw (sp+8),r16 80010e0: 5b 9d 00 04 sw (sp+4),ra 80010e4: 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) ) ) 80010e8: 20 42 f0 00 andi r2,r2,0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80010ec: b8 20 70 00 mv r14,r1 80010f0: b8 60 80 00 mv r16,r3 80010f4: b8 80 78 00 mv r15,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) ) ) 80010f8: 5c 40 00 04 bne r2,r0,8001108 rtems_set_errno_and_return_minus_one( EINVAL ); 80010fc: f8 00 27 80 calli 800aefc <__errno> <== NOT EXECUTED 8001100: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8001104: e0 00 00 1c bi 8001174 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 8001108: 40 25 00 00 lbu r5,(r1+0) 800110c: 64 ab 00 5c cmpei r11,r5,92 8001110: 64 a1 00 2f cmpei r1,r5,47 8001114: b9 61 58 00 or r11,r11,r1 8001118: 5d 60 00 02 bne r11,r0,8001120 800111c: 5c ab 00 0a bne r5,r11,8001144 8001120: 78 05 08 01 mvhi r5,0x801 8001124: 38 a5 c1 10 ori r5,r5,0xc110 8001128: 28 a2 00 00 lw r2,(r5+0) 800112c: 37 81 00 20 addi r1,sp,32 8001130: 34 03 00 14 mvi r3,20 8001134: 34 42 00 18 addi r2,r2,24 8001138: f8 00 2a 17 calli 800b994 800113c: 34 0b 00 01 mvi r11,1 8001140: e0 00 00 08 bi 8001160 8001144: 78 05 08 01 mvhi r5,0x801 8001148: 38 a5 c1 10 ori r5,r5,0xc110 800114c: 28 a2 00 00 lw r2,(r5+0) 8001150: 37 81 00 20 addi r1,sp,32 8001154: 34 03 00 14 mvi r3,20 8001158: 34 42 00 04 addi r2,r2,4 800115c: f8 00 2a 0e calli 800b994 if ( !temp_loc.ops->evalformake_h ) { 8001160: 2b 81 00 2c lw r1,(sp+44) 8001164: 28 25 00 04 lw r5,(r1+4) 8001168: 5c a0 00 06 bne r5,r0,8001180 rtems_set_errno_and_return_minus_one( ENOTSUP ); 800116c: f8 00 27 64 calli 800aefc <__errno> <== NOT EXECUTED 8001170: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8001174: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001178: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 800117c: e0 00 00 1d bi 80011f0 <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 8001180: 37 8c 00 20 addi r12,sp,32 8001184: b5 cb 08 00 add r1,r14,r11 8001188: b9 80 10 00 mv r2,r12 800118c: 37 83 00 34 addi r3,sp,52 8001190: d8 a0 00 00 call r5 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 8001194: 34 0b ff ff mvi r11,-1 8001198: 5c 20 00 16 bne r1,r0,80011f0 return -1; if ( !temp_loc.ops->mknod_h ) { 800119c: 2b 82 00 2c lw r2,(sp+44) 80011a0: 28 46 00 14 lw r6,(r2+20) 80011a4: 5c c1 00 06 bne r6,r1,80011bc rtems_filesystem_freenode( &temp_loc ); 80011a8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 80011ac: 44 46 ff f0 be r2,r6,800116c <== NOT EXECUTED 80011b0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80011b4: d8 40 00 00 call r2 <== NOT EXECUTED 80011b8: e3 ff ff ed bi 800116c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 80011bc: 2b 81 00 34 lw r1,(sp+52) 80011c0: b9 a0 10 00 mv r2,r13 80011c4: ba 00 18 00 mv r3,r16 80011c8: b9 e0 20 00 mv r4,r15 80011cc: b9 80 28 00 mv r5,r12 80011d0: d8 c0 00 00 call r6 80011d4: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 80011d8: 2b 81 00 2c lw r1,(sp+44) 80011dc: 44 20 00 05 be r1,r0,80011f0 80011e0: 28 22 00 1c lw r2,(r1+28) 80011e4: 44 40 00 03 be r2,r0,80011f0 80011e8: b9 80 08 00 mv r1,r12 80011ec: d8 40 00 00 call r2 return result; } 80011f0: b9 60 08 00 mv r1,r11 80011f4: 2b 9d 00 04 lw ra,(sp+4) 80011f8: 2b 8b 00 1c lw r11,(sp+28) 80011fc: 2b 8c 00 18 lw r12,(sp+24) 8001200: 2b 8d 00 14 lw r13,(sp+20) 8001204: 2b 8e 00 10 lw r14,(sp+16) 8001208: 2b 8f 00 0c lw r15,(sp+12) 800120c: 2b 90 00 08 lw r16,(sp+8) 8001210: 37 9c 00 34 addi sp,sp,52 8001214: c3 a0 00 00 ret 08001238 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 8001238: 37 9c ff c8 addi sp,sp,-56 800123c: 5b 8b 00 24 sw (sp+36),r11 8001240: 5b 8c 00 20 sw (sp+32),r12 8001244: 5b 8d 00 1c sw (sp+28),r13 8001248: 5b 8e 00 18 sw (sp+24),r14 800124c: 5b 8f 00 14 sw (sp+20),r15 8001250: 5b 90 00 10 sw (sp+16),r16 8001254: 5b 91 00 0c sw (sp+12),r17 8001258: 5b 92 00 08 sw (sp+8),r18 800125c: 5b 9d 00 04 sw (sp+4),ra 8001260: b8 40 80 00 mv r16,r2 8001264: b8 20 78 00 mv r15,r1 8001268: b8 60 90 00 mv r18,r3 800126c: b8 80 70 00 mv r14,r4 8001270: b8 a0 68 00 mv r13,r5 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 8001274: 44 40 00 03 be r2,r0,8001280 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 8001278: 34 01 00 01 mvi r1,1 800127c: 50 23 00 04 bgeu r1,r3,800128c options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 8001280: f8 00 27 1f calli 800aefc <__errno> 8001284: 34 02 00 16 mvi r2,22 8001288: e0 00 00 13 bi 80012d4 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 800128c: 28 4c 00 24 lw r12,(r2+36) 8001290: 5d 80 00 06 bne r12,r0,80012a8 errno = ENOTSUP; 8001294: f8 00 27 1a calli 800aefc <__errno> <== NOT EXECUTED 8001298: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800129c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80012a0: b9 80 88 00 mv r17,r12 <== NOT EXECUTED goto cleanup_and_bail; 80012a4: e0 00 00 67 bi 8001440 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 80012a8: 34 01 00 6c mvi r1,108 80012ac: 44 80 00 04 be r4,r0,80012bc size += strlen( device ) + 1; 80012b0: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80012b4: f8 00 2b e2 calli 800c23c <== NOT EXECUTED 80012b8: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); 80012bc: f8 00 18 ef calli 8007678 80012c0: b8 20 58 00 mv r11,r1 80012c4: b8 20 88 00 mv r17,r1 if ( !temp_mt_entry ) { 80012c8: 5c 20 00 05 bne r1,r0,80012dc errno = ENOMEM; 80012cc: f8 00 27 0c calli 800aefc <__errno> <== NOT EXECUTED 80012d0: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80012d4: 58 22 00 00 sw (r1+0),r2 80012d8: e0 00 00 63 bi 8001464 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 80012dc: 58 32 00 30 sw (r1+48),r18 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 80012e0: 59 61 00 2c sw (r11+44),r1 temp_mt_entry->options = options; if ( device ) { 80012e4: 45 c0 00 07 be r14,r0,8001300 temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 80012e8: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 80012ec: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 80012f0: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 80012f4: 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 ); 80012f8: f8 00 2b af calli 800c1b4 <== NOT EXECUTED 80012fc: e0 00 00 02 bi 8001304 <== NOT EXECUTED } else temp_mt_entry->dev = 0; 8001300: 58 2e 00 68 sw (r1+104),r14 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001304: 45 a0 00 32 be r13,r0,80013cc if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 8001308: b9 a0 08 00 mv r1,r13 800130c: f8 00 2b cc calli 800c23c * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 8001310: 37 8c 00 28 addi r12,sp,40 8001314: b8 20 10 00 mv r2,r1 8001318: 34 03 00 07 mvi r3,7 800131c: b9 a0 08 00 mv r1,r13 8001320: b9 80 20 00 mv r4,r12 8001324: 34 05 00 01 mvi r5,1 8001328: fb ff fe af calli 8000de4 800132c: 34 02 ff ff mvi r2,-1 8001330: 44 22 00 43 be r1,r2,800143c /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 8001334: 2b 81 00 34 lw r1,(sp+52) 8001338: 28 22 00 10 lw r2,(r1+16) 800133c: 5c 40 00 04 bne r2,r0,800134c errno = ENOTSUP; 8001340: f8 00 26 ef calli 800aefc <__errno> <== NOT EXECUTED 8001344: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8001348: e0 00 00 07 bi 8001364 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 800134c: b9 80 08 00 mv r1,r12 8001350: d8 40 00 00 call r2 8001354: 34 02 00 01 mvi r2,1 8001358: 44 22 00 05 be r1,r2,800136c errno = ENOTDIR; 800135c: f8 00 26 e8 calli 800aefc <__errno> 8001360: 34 02 00 14 mvi r2,20 8001364: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 8001368: e0 00 00 36 bi 8001440 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800136c: 78 03 08 01 mvhi r3,0x801 8001370: 38 63 c6 d8 ori r3,r3,0xc6d8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8001374: 34 62 00 04 addi r2,r3,4 !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 ) 8001378: 2b 81 00 28 lw r1,(sp+40) /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800137c: 28 63 00 00 lw r3,(r3+0) 8001380: e0 00 00 04 bi 8001390 !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 ) 8001384: 28 64 00 1c lw r4,(r3+28) 8001388: 44 81 00 04 be r4,r1,8001398 * 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 ) { 800138c: 28 63 00 00 lw r3,(r3+0) 8001390: 5c 62 ff fd bne r3,r2,8001384 8001394: e0 00 00 41 bi 8001498 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 8001398: f8 00 26 d9 calli 800aefc <__errno> 800139c: 34 02 00 10 mvi r2,16 80013a0: e0 00 00 03 bi 80013ac * 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; 80013a4: f8 00 26 d6 calli 800aefc <__errno> <== NOT EXECUTED 80013a8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80013ac: 58 22 00 00 sw (r1+0),r2 80013b0: 37 8c 00 28 addi r12,sp,40 goto cleanup_and_bail; 80013b4: e0 00 00 23 bi 8001440 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 80013b8: b9 60 08 00 mv r1,r11 80013bc: d8 40 00 00 call r2 80013c0: 37 8c 00 28 addi r12,sp,40 80013c4: 44 20 00 0a be r1,r0,80013ec 80013c8: e0 00 00 1e bi 8001440 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 80013cc: 59 6d 00 1c sw (r11+28),r13 temp_mt_entry->mt_fs_root.handlers = NULL; 80013d0: 59 6d 00 24 sw (r11+36),r13 temp_mt_entry->mt_fs_root.ops = NULL; 80013d4: 59 6d 00 28 sw (r11+40),r13 temp_mt_entry->mt_point_node.node_access = NULL; 80013d8: 59 6d 00 08 sw (r11+8),r13 temp_mt_entry->mt_point_node.handlers = NULL; 80013dc: 59 6d 00 10 sw (r11+16),r13 temp_mt_entry->mt_point_node.ops = NULL; 80013e0: 59 6d 00 14 sw (r11+20),r13 temp_mt_entry->mt_point_node.mt_entry = NULL; 80013e4: 59 6d 00 18 sw (r11+24),r13 80013e8: b9 a0 60 00 mv r12,r13 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 80013ec: 2a 02 00 24 lw r2,(r16+36) 80013f0: b9 60 08 00 mv r1,r11 80013f4: d8 40 00 00 call r2 80013f8: b8 20 68 00 mv r13,r1 80013fc: 44 20 00 07 be r1,r0,8001418 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 8001400: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8001404: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 8001408: 44 40 00 0e be r2,r0,8001440 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 800140c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001410: d8 40 00 00 call r2 <== NOT EXECUTED 8001414: e0 00 00 0b bi 8001440 <== 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 ); 8001418: 78 01 08 01 mvhi r1,0x801 800141c: b9 60 10 00 mv r2,r11 8001420: 38 21 c6 d8 ori r1,r1,0xc6d8 8001424: f8 00 05 7f calli 8002a20 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 8001428: b9 e0 10 00 mv r2,r15 800142c: 45 ed 00 0f be r15,r13,8001468 *mt_entry = temp_mt_entry; 8001430: 59 eb 00 00 sw (r15+0),r11 8001434: b9 a0 10 00 mv r2,r13 8001438: e0 00 00 0c bi 8001468 800143c: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8001440: ba 20 08 00 mv r1,r17 8001444: f8 00 16 ef calli 8007000 if ( loc_to_free ) 8001448: 45 80 00 07 be r12,r0,8001464 rtems_filesystem_freenode( loc_to_free ); 800144c: 29 81 00 0c lw r1,(r12+12) 8001450: 44 20 00 05 be r1,r0,8001464 8001454: 28 22 00 1c lw r2,(r1+28) 8001458: 44 40 00 03 be r2,r0,8001464 800145c: b9 80 08 00 mv r1,r12 8001460: d8 40 00 00 call r2 8001464: 34 02 ff ff mvi r2,-1 return -1; } 8001468: b8 40 08 00 mv r1,r2 800146c: 2b 9d 00 04 lw ra,(sp+4) 8001470: 2b 8b 00 24 lw r11,(sp+36) 8001474: 2b 8c 00 20 lw r12,(sp+32) 8001478: 2b 8d 00 1c lw r13,(sp+28) 800147c: 2b 8e 00 18 lw r14,(sp+24) 8001480: 2b 8f 00 14 lw r15,(sp+20) 8001484: 2b 90 00 10 lw r16,(sp+16) 8001488: 2b 91 00 0c lw r17,(sp+12) 800148c: 2b 92 00 08 lw r18,(sp+8) 8001490: 37 9c 00 38 addi sp,sp,56 8001494: c3 a0 00 00 ret * 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; 8001498: 2b 82 00 30 lw r2,(sp+48) temp_mt_entry->mt_point_node.ops = loc.ops; 800149c: 2b 83 00 34 lw r3,(sp+52) * 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; 80014a0: 59 61 00 08 sw (r11+8),r1 temp_mt_entry->mt_point_node.handlers = loc.handlers; 80014a4: 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; 80014a8: 2b 82 00 38 lw r2,(sp+56) * 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; 80014ac: 59 63 00 14 sw (r11+20),r3 temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 80014b0: 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 ){ 80014b4: 28 62 00 20 lw r2,(r3+32) 80014b8: 5c 40 ff c0 bne r2,r0,80013b8 80014bc: e3 ff ff ba bi 80013a4 <== NOT EXECUTED 08001554 : */ int newlib_free_buffers( FILE *fp ) { 8001554: 37 9c ff f4 addi sp,sp,-12 8001558: 5b 8b 00 0c sw (sp+12),r11 800155c: 5b 8c 00 08 sw (sp+8),r12 8001560: 5b 9d 00 04 sw (sp+4),ra 8001564: b8 20 58 00 mv r11,r1 switch ( fileno(fp) ) { 8001568: f8 00 27 89 calli 800b38c 800156c: 34 02 00 02 mvi r2,2 8001570: 54 22 00 0d bgu r1,r2,80015a4 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 8001574: 2d 61 00 0c lhu r1,(r11+12) 8001578: 34 0c 00 00 mvi r12,0 800157c: 20 21 00 80 andi r1,r1,0x80 8001580: 44 2c 00 0b be r1,r12,80015ac free( fp->_bf._base ); 8001584: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8001588: f8 00 16 9e calli 8007000 <== NOT EXECUTED fp->_flags &= ~__SMBF; 800158c: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 8001590: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED 8001594: 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; 8001598: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED 800159c: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED 80015a0: e0 00 00 03 bi 80015ac <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 80015a4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80015a8: f8 00 26 b7 calli 800b084 <== NOT EXECUTED } return 0; } 80015ac: 34 01 00 00 mvi r1,0 80015b0: 2b 9d 00 04 lw ra,(sp+4) 80015b4: 2b 8b 00 0c lw r11,(sp+12) 80015b8: 2b 8c 00 08 lw r12,(sp+8) 80015bc: 37 9c 00 0c addi sp,sp,12 80015c0: c3 a0 00 00 ret 0800183c : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 800183c: 37 9c ff f4 addi sp,sp,-12 8001840: 5b 8b 00 0c sw (sp+12),r11 8001844: 5b 8c 00 08 sw (sp+8),r12 8001848: 5b 9d 00 04 sw (sp+4),ra rtems_device_driver status; if ( !initialized ) { 800184c: 78 04 08 02 mvhi r4,0x802 8001850: 38 84 16 a4 ori r4,r4,0x16a4 8001854: 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)) ) { 8001858: b8 20 60 00 mv r12,r1 rtems_device_driver status; if ( !initialized ) { 800185c: 5d 60 00 0d bne r11,r0,8001890 initialized = 1; status = rtems_io_register_name( 8001860: 78 01 08 01 mvhi r1,0x801 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001864: 34 05 00 01 mvi r5,1 status = rtems_io_register_name( 8001868: 38 21 e2 7c ori r1,r1,0xe27c 800186c: b9 80 10 00 mv r2,r12 8001870: b9 60 18 00 mv r3,r11 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001874: 30 85 00 00 sb (r4+0),r5 status = rtems_io_register_name( 8001878: f8 00 00 54 calli 80019c8 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 800187c: 44 2b 00 02 be r1,r11,8001884 rtems_fatal_error_occurred(status); 8001880: f8 00 07 f1 calli 8003844 <== NOT EXECUTED NULL_major = major; 8001884: 78 03 08 02 mvhi r3,0x802 8001888: 38 63 17 48 ori r3,r3,0x1748 800188c: 58 6c 00 00 sw (r3+0),r12 } return RTEMS_SUCCESSFUL; } 8001890: 34 01 00 00 mvi r1,0 8001894: 2b 9d 00 04 lw ra,(sp+4) 8001898: 2b 8b 00 0c lw r11,(sp+12) 800189c: 2b 8c 00 08 lw r12,(sp+8) 80018a0: 37 9c 00 0c addi sp,sp,12 80018a4: c3 a0 00 00 ret 08001820 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 8001820: 44 60 00 03 be r3,r0,800182c rw_args->bytes_moved = rw_args->count; 8001824: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED 8001828: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED return NULL_SUCCESSFUL; } 800182c: 34 01 00 00 mvi r1,0 8001830: c3 a0 00 00 ret 08001814 : int open( const char *pathname, int flags, ... ) { 8001814: 37 9c ff ac addi sp,sp,-84 8001818: 5b 8b 00 24 sw (sp+36),r11 800181c: 5b 8c 00 20 sw (sp+32),r12 8001820: 5b 8d 00 1c sw (sp+28),r13 8001824: 5b 8e 00 18 sw (sp+24),r14 8001828: 5b 8f 00 14 sw (sp+20),r15 800182c: 5b 90 00 10 sw (sp+16),r16 8001830: 5b 91 00 0c sw (sp+12),r17 8001834: 5b 92 00 08 sw (sp+8),r18 8001838: 5b 9d 00 04 sw (sp+4),ra /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 800183c: 34 49 00 01 addi r9,r2,1 int open( const char *pathname, int flags, ... ) { 8001840: b8 40 70 00 mv r14,r2 8001844: 5b 82 00 3c sw (sp+60),r2 8001848: 5b 83 00 40 sw (sp+64),r3 800184c: 5b 84 00 44 sw (sp+68),r4 8001850: 5b 85 00 48 sw (sp+72),r5 8001854: 5b 86 00 4c sw (sp+76),r6 8001858: 5b 87 00 50 sw (sp+80),r7 800185c: 5b 88 00 54 sw (sp+84),r8 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001860: 21 22 00 01 andi r2,r9,0x1 int open( const char *pathname, int flags, ... ) { 8001864: b8 20 78 00 mv r15,r1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001868: 34 0d 00 04 mvi r13,4 800186c: 5c 40 00 02 bne r2,r0,8001874 8001870: b8 40 68 00 mv r13,r2 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 8001874: 21 29 00 02 andi r9,r9,0x2 8001878: 45 20 00 02 be r9,r0,8001880 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 800187c: 39 ad 00 02 ori r13,r13,0x2 va_start(ap, flags); mode = va_arg( ap, int ); 8001880: 2b 92 00 40 lw r18,(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(); 8001884: f8 00 17 06 calli 800749c 8001888: b8 20 58 00 mv r11,r1 if ( iop == 0 ) { 800188c: 34 0c 00 17 mvi r12,23 8001890: 44 20 00 76 be r1,r0,8001a68 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 8001894: b9 e0 08 00 mv r1,r15 8001898: f8 00 2a 69 calli 800c23c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 800189c: 37 91 00 28 addi r17,sp,40 80018a0: b8 20 10 00 mv r2,r1 80018a4: b9 a0 18 00 mv r3,r13 80018a8: b9 e0 08 00 mv r1,r15 80018ac: ba 20 20 00 mv r4,r17 80018b0: 34 05 00 01 mvi r5,1 80018b4: fb ff fd 4c calli 8000de4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 80018b8: 34 02 ff ff mvi r2,-1 80018bc: 5c 22 00 1f bne r1,r2,8001938 if ( errno != ENOENT ) { 80018c0: f8 00 25 8f calli 800aefc <__errno> 80018c4: 28 2c 00 00 lw r12,(r1+0) 80018c8: 34 01 00 02 mvi r1,2 80018cc: 5d 81 00 0b bne r12,r1,80018f8 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 80018d0: 21 c1 02 00 andi r1,r14,0x200 80018d4: b8 20 68 00 mv r13,r1 80018d8: 44 20 00 5a be r1,r0,8001a40 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 80018dc: 34 03 00 00 mvi r3,0 80018e0: b9 e0 08 00 mv r1,r15 80018e4: 3a 42 80 00 ori r2,r18,0x8000 80018e8: b8 60 20 00 mv r4,r3 80018ec: fb ff fd f6 calli 80010c4 80018f0: b8 20 80 00 mv r16,r1 if ( rc ) { 80018f4: 44 20 00 05 be r1,r0,8001908 rc = errno; 80018f8: f8 00 25 81 calli 800aefc <__errno> 80018fc: 28 2c 00 00 lw r12,(r1+0) 8001900: 34 0d 00 00 mvi r13,0 goto done; 8001904: e0 00 00 4e bi 8001a3c } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 8001908: b9 e0 08 00 mv r1,r15 800190c: f8 00 2a 4c calli 800c23c 8001910: b8 20 10 00 mv r2,r1 8001914: ba 00 18 00 mv r3,r16 8001918: b9 e0 08 00 mv r1,r15 800191c: ba 20 20 00 mv r4,r17 8001920: 34 05 00 01 mvi r5,1 8001924: fb ff fd 30 calli 8000de4 if ( status != 0 ) { /* The file did not exist */ 8001928: ba 00 68 00 mv r13,r16 800192c: 34 0c 00 0d mvi r12,13 8001930: 5c 30 00 44 bne r1,r16,8001a40 8001934: e0 00 00 06 bi 800194c rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 8001938: 21 c2 0a 00 andi r2,r14,0xa00 800193c: 34 01 0a 00 mvi r1,2560 8001940: ba 20 68 00 mv r13,r17 8001944: 34 0c 00 11 mvi r12,17 8001948: 44 41 00 3e be r2,r1,8001a40 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 800194c: 2b 81 00 30 lw r1,(sp+48) iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 8001950: 29 6c 00 18 lw r12,(r11+24) iop->pathinfo = loc; 8001954: 37 8d 00 28 addi r13,sp,40 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 8001958: 59 61 00 40 sw (r11+64),r1 iop->file_info = loc.node_access; 800195c: 2b 81 00 28 lw r1,(sp+40) 8001960: 59 61 00 3c sw (r11+60),r1 iop->flags |= rtems_libio_fcntl_flags( flags ); 8001964: b9 c0 08 00 mv r1,r14 8001968: f8 00 17 06 calli 8007580 800196c: b8 2c 08 00 or r1,r1,r12 8001970: 59 61 00 18 sw (r11+24),r1 iop->pathinfo = loc; 8001974: b9 a0 10 00 mv r2,r13 8001978: 35 61 00 1c addi r1,r11,28 800197c: 34 03 00 14 mvi r3,20 8001980: f8 00 28 05 calli 800b994 if ( !iop->handlers || !iop->handlers->open_h ) { 8001984: 29 61 00 40 lw r1,(r11+64) 8001988: 44 20 00 50 be r1,r0,8001ac8 800198c: 28 25 00 00 lw r5,(r1+0) 8001990: 44 a0 00 4e be r5,r0,8001ac8 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 8001994: b9 e0 10 00 mv r2,r15 8001998: ba 40 20 00 mv r4,r18 800199c: b9 60 08 00 mv r1,r11 80019a0: b9 c0 18 00 mv r3,r14 80019a4: d8 a0 00 00 call r5 80019a8: b8 20 60 00 mv r12,r1 if ( rc ) { 80019ac: 44 20 00 04 be r1,r0,80019bc rc = errno; 80019b0: f8 00 25 53 calli 800aefc <__errno> 80019b4: 28 2c 00 00 lw r12,(r1+0) goto done; 80019b8: e0 00 00 21 bi 8001a3c /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 80019bc: 21 ce 04 00 andi r14,r14,0x400 80019c0: 45 c1 00 2e be r14,r1,8001a78 rc = ftruncate( iop - rtems_libio_iops, 0 ); 80019c4: 78 01 08 01 mvhi r1,0x801 80019c8: 38 21 c6 9c ori r1,r1,0xc69c 80019cc: 28 21 00 00 lw r1,(r1+0) 80019d0: 34 02 00 03 mvi r2,3 80019d4: c9 61 08 00 sub r1,r11,r1 80019d8: fb ff fa 56 calli 8000330 <__ashrsi3> 80019dc: 78 02 38 e3 mvhi r2,0x38e3 80019e0: 38 42 8e 39 ori r2,r2,0x8e39 80019e4: f8 00 5d 2b calli 8018e90 <__mulsi3> 80019e8: b9 80 10 00 mv r2,r12 80019ec: f8 00 15 b3 calli 80070b8 80019f0: b8 20 60 00 mv r12,r1 if ( rc ) { 80019f4: 44 20 00 21 be r1,r0,8001a78 if(errno) rc = errno; 80019f8: f8 00 25 41 calli 800aefc <__errno> <== NOT EXECUTED 80019fc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001a00: 44 20 00 03 be r1,r0,8001a0c <== NOT EXECUTED 8001a04: f8 00 25 3e calli 800aefc <__errno> <== NOT EXECUTED 8001a08: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED close( iop - rtems_libio_iops ); 8001a0c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8001a10: 38 21 c6 9c ori r1,r1,0xc69c <== NOT EXECUTED 8001a14: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001a18: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8001a1c: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED 8001a20: fb ff fa 44 calli 8000330 <__ashrsi3> <== NOT EXECUTED 8001a24: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED 8001a28: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED 8001a2c: f8 00 5d 19 calli 8018e90 <__mulsi3> <== NOT EXECUTED 8001a30: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8001a34: f8 00 15 3a calli 8006f1c <== NOT EXECUTED 8001a38: b9 60 68 00 mv r13,r11 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 8001a3c: 45 80 00 0f be r12,r0,8001a78 if ( iop ) 8001a40: 45 60 00 03 be r11,r0,8001a4c rtems_libio_free( iop ); 8001a44: b9 60 08 00 mv r1,r11 8001a48: f8 00 16 77 calli 8007424 if ( loc_to_free ) 8001a4c: 45 a0 00 07 be r13,r0,8001a68 rtems_filesystem_freenode( loc_to_free ); 8001a50: 29 a1 00 0c lw r1,(r13+12) 8001a54: 44 20 00 05 be r1,r0,8001a68 8001a58: 28 22 00 1c lw r2,(r1+28) 8001a5c: 44 40 00 03 be r2,r0,8001a68 8001a60: b9 a0 08 00 mv r1,r13 8001a64: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( rc ); 8001a68: f8 00 25 25 calli 800aefc <__errno> 8001a6c: 58 2c 00 00 sw (r1+0),r12 8001a70: 34 01 ff ff mvi r1,-1 8001a74: e0 00 00 0a bi 8001a9c } return iop - rtems_libio_iops; 8001a78: 78 01 08 01 mvhi r1,0x801 8001a7c: 38 21 c6 9c ori r1,r1,0xc69c 8001a80: 28 21 00 00 lw r1,(r1+0) 8001a84: 34 02 00 03 mvi r2,3 8001a88: c9 61 08 00 sub r1,r11,r1 8001a8c: fb ff fa 29 calli 8000330 <__ashrsi3> 8001a90: 78 02 38 e3 mvhi r2,0x38e3 8001a94: 38 42 8e 39 ori r2,r2,0x8e39 8001a98: f8 00 5c fe calli 8018e90 <__mulsi3> } 8001a9c: 2b 9d 00 04 lw ra,(sp+4) 8001aa0: 2b 8b 00 24 lw r11,(sp+36) 8001aa4: 2b 8c 00 20 lw r12,(sp+32) 8001aa8: 2b 8d 00 1c lw r13,(sp+28) 8001aac: 2b 8e 00 18 lw r14,(sp+24) 8001ab0: 2b 8f 00 14 lw r15,(sp+20) 8001ab4: 2b 90 00 10 lw r16,(sp+16) 8001ab8: 2b 91 00 0c lw r17,(sp+12) 8001abc: 2b 92 00 08 lw r18,(sp+8) 8001ac0: 37 9c 00 54 addi sp,sp,84 8001ac4: c3 a0 00 00 ret if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 8001ac8: 37 8d 00 28 addi r13,sp,40 <== NOT EXECUTED 8001acc: 34 0c 00 86 mvi r12,134 <== NOT EXECUTED 8001ad0: e3 ff ff dc bi 8001a40 <== NOT EXECUTED 08001794 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 8001794: 37 9c ff f8 addi sp,sp,-8 8001798: 5b 8b 00 08 sw (sp+8),r11 800179c: 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) { 80017a0: 34 02 00 00 mvi r2,0 80017a4: 78 01 08 01 mvhi r1,0x801 80017a8: 38 21 a2 d0 ori r1,r1,0xa2d0 80017ac: b8 40 18 00 mv r3,r2 80017b0: f8 00 00 19 calli 8001814 80017b4: 34 0b ff ff mvi r11,-1 80017b8: 44 2b 00 13 be r1,r11,8001804 /* * 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) 80017bc: 78 01 08 01 mvhi r1,0x801 80017c0: 38 21 a2 d0 ori r1,r1,0xa2d0 80017c4: 34 02 00 01 mvi r2,1 80017c8: 34 03 00 00 mvi r3,0 80017cc: f8 00 00 12 calli 8001814 80017d0: 5c 2b 00 04 bne r1,r11,80017e0 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 80017d4: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80017d8: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED 80017dc: e0 00 00 09 bi 8001800 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 80017e0: 78 01 08 01 mvhi r1,0x801 80017e4: 38 21 a2 d0 ori r1,r1,0xa2d0 80017e8: 34 02 00 01 mvi r2,1 80017ec: 34 03 00 00 mvi r3,0 80017f0: f8 00 00 09 calli 8001814 80017f4: 5c 2b 00 04 bne r1,r11,8001804 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 80017f8: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80017fc: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED 8001800: f8 00 03 97 calli 800265c <== NOT EXECUTED } 8001804: 2b 9d 00 04 lw ra,(sp+4) 8001808: 2b 8b 00 08 lw r11,(sp+8) 800180c: 37 9c 00 08 addi sp,sp,8 8001810: c3 a0 00 00 ret 08004040 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 8004040: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004044: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8004048: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800404c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004050: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 8004054: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004058: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED 800405c: 44 20 00 51 be r1,r0,80041a0 <== NOT EXECUTED switch (c) { 8004060: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 8004064: 34 03 00 09 mvi r3,9 <== NOT EXECUTED 8004068: 44 23 00 23 be r1,r3,80040f4 <== NOT EXECUTED 800406c: 54 23 00 04 bgu r1,r3,800407c <== NOT EXECUTED 8004070: 34 03 00 08 mvi r3,8 <== NOT EXECUTED 8004074: 5c 23 00 33 bne r1,r3,8004140 <== NOT EXECUTED 8004078: e0 00 00 2e bi 8004130 <== NOT EXECUTED 800407c: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004080: 44 23 00 04 be r1,r3,8004090 <== NOT EXECUTED 8004084: 34 03 00 0d mvi r3,13 <== NOT EXECUTED 8004088: 5c 23 00 2e bne r1,r3,8004140 <== NOT EXECUTED 800408c: e0 00 00 0e bi 80040c4 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 8004090: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8004094: 44 40 00 03 be r2,r0,80040a0 <== NOT EXECUTED tty->column = 0; 8004098: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800409c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 80040a0: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED 80040a4: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 80040a8: 44 20 00 3e be r1,r0,80041a0 <== NOT EXECUTED rtems_termios_puts ("\r", 1, tty); 80040ac: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80040b0: 38 21 13 b4 ori r1,r1,0x13b4 <== NOT EXECUTED 80040b4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80040b8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80040bc: fb ff ff 8b calli 8003ee8 <== NOT EXECUTED 80040c0: e0 00 00 0b bi 80040ec <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 80040c4: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED 80040c8: 44 20 00 03 be r1,r0,80040d4 <== NOT EXECUTED 80040cc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80040d0: 44 20 00 38 be r1,r0,80041b0 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 80040d4: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED 80040d8: 44 20 00 31 be r1,r0,800419c <== NOT EXECUTED c = '\n'; 80040dc: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 80040e0: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 80040e4: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 80040e8: 44 40 00 2e be r2,r0,80041a0 <== NOT EXECUTED tty->column = 0; 80040ec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80040f0: e0 00 00 2b bi 800419c <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80040f4: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 80040f8: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80040fc: 34 02 00 08 mvi r2,8 <== NOT EXECUTED 8004100: 20 61 00 07 andi r1,r3,0x7 <== NOT EXECUTED 8004104: c8 41 10 00 sub r2,r2,r1 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 8004108: 34 01 18 00 mvi r1,6144 <== NOT EXECUTED 800410c: b4 43 18 00 add r3,r2,r3 <== NOT EXECUTED 8004110: 5c 81 00 06 bne r4,r1,8004128 <== NOT EXECUTED tty->column += i; rtems_termios_puts ( " ", i, tty); 8004114: 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; 8004118: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 800411c: 38 21 13 b8 ori r1,r1,0x13b8 <== NOT EXECUTED 8004120: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004124: e0 00 00 22 bi 80041ac <== NOT EXECUTED return; } tty->column += i; 8004128: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED break; 800412c: e0 00 00 1d bi 80041a0 <== NOT EXECUTED case '\b': if (tty->column > 0) 8004130: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004134: 4c 01 00 1b bge r0,r1,80041a0 <== NOT EXECUTED tty->column--; 8004138: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800413c: e0 00 00 18 bi 800419c <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 8004140: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED 8004144: 44 40 00 0c be r2,r0,8004174 <== NOT EXECUTED c = toupper(c); 8004148: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800414c: 38 42 32 c8 ori r2,r2,0x32c8 <== NOT EXECUTED 8004150: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED 8004154: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8004158: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800415c: 40 23 00 01 lbu r3,(r1+1) <== NOT EXECUTED 8004160: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8004164: 20 63 00 03 andi r3,r3,0x3 <== NOT EXECUTED 8004168: 5c 61 00 02 bne r3,r1,8004170 <== NOT EXECUTED 800416c: 34 42 ff e0 addi r2,r2,-32 <== NOT EXECUTED 8004170: 33 82 00 0c sb (sp+12),r2 <== NOT EXECUTED if (!iscntrl(c)) 8004174: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004178: 38 21 32 c8 ori r1,r1,0x32c8 <== NOT EXECUTED 800417c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8004180: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 8004184: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004188: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 800418c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004190: 5c 20 00 04 bne r1,r0,80041a0 <== NOT EXECUTED tty->column++; 8004194: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004198: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 800419c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED break; } } rtems_termios_puts (&c, 1, tty); 80041a0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80041a4: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED 80041a8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80041ac: fb ff ff 4f calli 8003ee8 <== NOT EXECUTED } 80041b0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80041b4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80041b8: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80041bc: c3 a0 00 00 ret <== NOT EXECUTED 0800a9a4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 800a9a4: 37 9c ff cc addi sp,sp,-52 800a9a8: 5b 8b 00 10 sw (sp+16),r11 800a9ac: 5b 8c 00 0c sw (sp+12),r12 800a9b0: 5b 8d 00 08 sw (sp+8),r13 800a9b4: 5b 9d 00 04 sw (sp+4),ra 800a9b8: 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) 800a9bc: 37 8b 00 14 addi r11,sp,20 800a9c0: 78 01 08 01 mvhi r1,0x801 800a9c4: 38 21 a8 5c ori r1,r1,0xa85c 800a9c8: 34 02 00 03 mvi r2,3 800a9cc: 34 03 00 07 mvi r3,7 800a9d0: b9 60 20 00 mv r4,r11 800a9d4: 34 05 00 01 mvi r5,1 800a9d8: fb ff d9 03 calli 8000de4 800a9dc: 44 20 00 0b be r1,r0,800aa08 != 0) { if (errno != ENOENT) 800a9e0: f8 00 01 47 calli 800aefc <__errno> 800a9e4: 28 22 00 00 lw r2,(r1+0) 800a9e8: 34 01 00 02 mvi r1,2 800a9ec: 5c 41 00 50 bne r2,r1,800ab2c return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 800a9f0: 78 01 08 01 mvhi r1,0x801 800a9f4: 38 21 a8 5c ori r1,r1,0xa85c 800a9f8: 34 02 03 ff mvi r2,1023 800a9fc: fb ff d9 a9 calli 80010a0 800aa00: 44 20 00 08 be r1,r0,800aa20 800aa04: e0 00 00 4a bi 800ab2c <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 800aa08: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED 800aa0c: 44 41 00 05 be r2,r1,800aa20 <== NOT EXECUTED 800aa10: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800aa14: 44 40 00 03 be r2,r0,800aa20 <== NOT EXECUTED 800aa18: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800aa1c: d8 40 00 00 call r2 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800aa20: 37 8b 00 28 addi r11,sp,40 800aa24: 78 02 08 01 mvhi r2,0x801 800aa28: 38 42 a8 64 ori r2,r2,0xa864 800aa2c: 34 03 00 0a mvi r3,10 800aa30: b9 60 08 00 mv r1,r11 800aa34: f8 00 03 d8 calli 800b994 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800aa38: 78 04 08 01 mvhi r4,0x801 800aa3c: 38 84 c6 2e ori r4,r4,0xc62e 800aa40: 2c 81 00 00 lhu r1,(r4+0) 800aa44: 78 02 08 01 mvhi r2,0x801 800aa48: 38 42 a8 70 ori r2,r2,0xa870 800aa4c: 34 25 00 01 addi r5,r1,1 800aa50: b8 20 18 00 mv r3,r1 800aa54: 0c 85 00 00 sh (r4+0),r5 800aa58: 37 81 00 32 addi r1,sp,50 800aa5c: f8 00 04 ce calli 800bd94 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 800aa60: b9 60 08 00 mv r1,r11 800aa64: 34 02 01 80 mvi r2,384 800aa68: f8 00 00 52 calli 800abb0 800aa6c: b8 20 60 00 mv r12,r1 800aa70: 44 20 00 03 be r1,r0,800aa7c if (errno != EEXIST){ 800aa74: f8 00 01 22 calli 800aefc <__errno> <== NOT EXECUTED 800aa78: e0 00 00 2d bi 800ab2c <== NOT EXECUTED return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 800aa7c: b9 60 08 00 mv r1,r11 800aa80: 34 02 40 00 mvi r2,16384 800aa84: fb ff db 64 calli 8001814 800aa88: 59 a1 00 00 sw (r13+0),r1 if (filsdes[0] < 0) { 800aa8c: 4c 2c 00 05 bge r1,r12,800aaa0 err = errno; 800aa90: f8 00 01 1b calli 800aefc <__errno> 800aa94: 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); 800aa98: b9 60 08 00 mv r1,r11 800aa9c: e0 00 00 21 bi 800ab20 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800aaa0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800aaa4: 38 42 c0 10 ori r2,r2,0xc010 <== NOT EXECUTED 800aaa8: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 800aaac: 54 41 00 03 bgu r2,r1,800aab8 <== NOT EXECUTED 800aab0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800aab4: e0 00 00 0b bi 800aae0 <== NOT EXECUTED 800aab8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800aabc: fb ff d5 cd calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800aac0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800aac4: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 800aac8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800aacc: 39 6b c6 9c ori r11,r11,0xc69c <== NOT EXECUTED 800aad0: fb ff d5 c8 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800aad4: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800aad8: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800aadc: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800aae0: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 800aae4: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800aae8: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800aaec: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 800aaf0: 58 43 00 18 sw (r2+24),r3 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800aaf4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800aaf8: fb ff db 47 calli 8001814 <== NOT EXECUTED 800aafc: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED if (filsdes[1] < 0) { 800ab00: 48 01 00 03 bg r0,r1,800ab0c <== NOT EXECUTED 800ab04: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800ab08: e0 00 00 05 bi 800ab1c <== NOT EXECUTED err = errno; 800ab0c: f8 00 00 fc calli 800aefc <__errno> <== NOT EXECUTED 800ab10: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED close(filsdes[0]); 800ab14: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800ab18: fb ff f1 01 calli 8006f1c <== NOT EXECUTED } unlink(fifopath); 800ab1c: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 800ab20: f8 00 00 2d calli 800abd4 } rtems_set_errno_and_return_minus_one(err); 800ab24: f8 00 00 f6 calli 800aefc <__errno> 800ab28: 58 2c 00 00 sw (r1+0),r12 } 800ab2c: 34 01 ff ff mvi r1,-1 800ab30: 2b 9d 00 04 lw ra,(sp+4) 800ab34: 2b 8b 00 10 lw r11,(sp+16) 800ab38: 2b 8c 00 0c lw r12,(sp+12) 800ab3c: 2b 8d 00 08 lw r13,(sp+8) 800ab40: 37 9c 00 34 addi sp,sp,52 800ab44: c3 a0 00 00 ret 08009798 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 8009798: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800979c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 80097a0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80097a4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 80097a8: 28 21 00 2c lw r1,(r1+44) <== NOT EXECUTED 80097ac: f8 00 02 59 calli 800a110 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 80097b0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 80097b4: f8 00 02 57 calli 800a110 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 80097b8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80097bc: fb ff f8 6c calli 800796c <== NOT EXECUTED free(pipe->Buffer); 80097c0: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 80097c4: fb ff f6 0f calli 8007000 <== NOT EXECUTED free(pipe); 80097c8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80097cc: fb ff f6 0d calli 8007000 <== NOT EXECUTED } 80097d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80097d4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80097d8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80097dc: c3 a0 00 00 ret <== NOT EXECUTED 080093a0 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 80093a0: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 80093a4: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 80093a8: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 80093ac: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 80093b0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (cmd == FIONREAD) { 80093b4: 78 05 40 04 mvhi r5,0x4004 <== NOT EXECUTED 80093b8: 38 a5 66 7f ori r5,r5,0x667f <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 80093bc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 80093c0: b8 60 68 00 mv r13,r3 <== NOT EXECUTED if (cmd == FIONREAD) { 80093c4: 34 04 ff ea mvi r4,-22 <== NOT EXECUTED 80093c8: 5c 45 00 0f bne r2,r5,8009404 <== NOT EXECUTED if (buffer == NULL) 80093cc: 34 04 ff f2 mvi r4,-14 <== NOT EXECUTED 80093d0: 44 60 00 0d be r3,r0,8009404 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 80093d4: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 80093d8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80093dc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 80093e0: fb ff f9 9f calli 8007a5c <== NOT EXECUTED 80093e4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 80093e8: 34 04 ff fc mvi r4,-4 <== NOT EXECUTED 80093ec: 5c 20 00 06 bne r1,r0,8009404 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 80093f0: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 80093f4: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 80093f8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80093fc: fb ff f9 e8 calli 8007b9c <== NOT EXECUTED 8009400: b9 80 20 00 mv r4,r12 <== NOT EXECUTED return 0; } return -EINVAL; } 8009404: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 8009408: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800940c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8009410: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8009414: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8009418: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800941c: c3 a0 00 00 ret <== NOT EXECUTED 0800932c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 800932c: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED 8009330: c3 a0 00 00 ret <== NOT EXECUTED 080095f4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 80095f4: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 80095f8: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 80095fc: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8009600: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8009604: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8009608: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 800960c: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8009610: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8009614: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8009618: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800961c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009620: b8 40 88 00 mv r17,r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009624: 34 02 00 00 mvi r2,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009628: b8 60 80 00 mv r16,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800962c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009630: b8 80 78 00 mv r15,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009634: fb ff f9 0a calli 8007a5c <== NOT EXECUTED 8009638: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800963c: 44 20 00 46 be r1,r0,8009754 <== NOT EXECUTED 8009640: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 8009644: e0 00 00 4a bi 800976c <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 8009648: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800964c: 44 2d 00 43 be r1,r13,8009758 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 8009650: 29 ee 00 18 lw r14,(r15+24) <== NOT EXECUTED 8009654: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED 8009658: 45 c0 00 03 be r14,r0,8009664 <== NOT EXECUTED 800965c: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 8009660: e0 00 00 3f bi 800975c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 8009664: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009668: 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 ++; 800966c: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 8009670: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009674: fb ff f9 4a calli 8007b9c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 8009678: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800967c: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 8009680: f8 00 02 e3 calli 800a20c <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 8009684: 34 02 00 00 mvi r2,0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 8009688: b8 20 68 00 mv r13,r1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800968c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 8009690: 44 2e 00 02 be r1,r14,8009698 <== NOT EXECUTED 8009694: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 8009698: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800969c: fb ff f8 f0 calli 8007a5c <== NOT EXECUTED 80096a0: 44 20 00 03 be r1,r0,80096ac <== NOT EXECUTED 80096a4: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 80096a8: e0 00 00 2f bi 8009764 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 80096ac: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED 80096b0: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 80096b4: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED if (ret != 0) 80096b8: 5d a1 00 29 bne r13,r1,800975c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 80096bc: 29 6d 00 0c lw r13,(r11+12) <== NOT EXECUTED 80096c0: 45 a0 ff e2 be r13,r0,8009648 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 80096c4: ca 0c 08 00 sub r1,r16,r12 <== NOT EXECUTED 80096c8: 50 2d 00 02 bgeu r1,r13,80096d0 <== NOT EXECUTED 80096cc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 80096d0: 29 65 00 08 lw r5,(r11+8) <== NOT EXECUTED 80096d4: 29 6e 00 04 lw r14,(r11+4) <== NOT EXECUTED 80096d8: 29 66 00 00 lw r6,(r11+0) <== NOT EXECUTED 80096dc: b6 2c 08 00 add r1,r17,r12 <== NOT EXECUTED 80096e0: c9 c5 70 00 sub r14,r14,r5 <== 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); 80096e4: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 80096e8: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { 80096ec: 4d cd 00 08 bge r14,r13,800970c <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 80096f0: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 80096f4: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 80096f8: f8 00 08 a7 calli 800b994 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 80096fc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8009700: b5 8e 08 00 add r1,r12,r14 <== NOT EXECUTED 8009704: b6 21 08 00 add r1,r17,r1 <== NOT EXECUTED 8009708: c9 ae 18 00 sub r3,r13,r14 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 800970c: f8 00 08 a2 calli 800b994 <== NOT EXECUTED pipe->Start += chunk; 8009710: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED pipe->Start %= pipe->Size; 8009714: 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; 8009718: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 800971c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Start %= pipe->Size; 8009720: f8 00 3e 6b calli 80190cc <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; 8009724: 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; 8009728: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Length -= chunk; 800972c: c8 4d 08 00 sub r1,r2,r13 <== NOT EXECUTED 8009730: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 8009734: 5c 20 00 02 bne r1,r0,800973c <== NOT EXECUTED pipe->Start = 0; 8009738: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED if (pipe->waitingWriters > 0) 800973c: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 8009740: 44 20 00 04 be r1,r0,8009750 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8009744: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8009748: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 800974c: f8 00 02 91 calli 800a190 <== NOT EXECUTED read += chunk; 8009750: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 8009754: 56 0c ff da bgu r16,r12,80096bc <== NOT EXECUTED 8009758: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 800975c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009760: fb ff f9 0f calli 8007b9c <== NOT EXECUTED out_nolock: if (read > 0) 8009764: 49 80 00 02 bg r12,r0,800976c <== NOT EXECUTED 8009768: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED return read; return ret; } 800976c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8009770: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009774: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8009778: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 800977c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8009780: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8009784: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8009788: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 800978c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8009790: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009794: c3 a0 00 00 ret <== NOT EXECUTED 080097e0 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 80097e0: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 80097e4: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 80097e8: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 80097ec: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 80097f0: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 80097f4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED pipe_control_t *pipe = *pipep; 80097f8: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 80097fc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8009800: 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, 8009804: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009808: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800980c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009810: fb ff f8 93 calli 8007a5c <== NOT EXECUTED 8009814: b8 20 18 00 mv r3,r1 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 8009818: 5c 20 00 15 bne r1,r0,800986c <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800981c: 29 8c 00 18 lw r12,(r12+24) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 8009820: 21 81 00 02 andi r1,r12,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); 8009824: 21 8c 00 06 andi r12,r12,0x6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 8009828: 44 23 00 04 be r1,r3,8009838 <== NOT EXECUTED pipe->Readers --; 800982c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8009830: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8009834: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 8009838: 21 81 00 04 andi r1,r12,0x4 <== NOT EXECUTED 800983c: 44 20 00 04 be r1,r0,800984c <== NOT EXECUTED pipe->Writers --; 8009840: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8009844: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8009848: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 800984c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009850: 38 42 c6 28 ori r2,r2,0xc628 <== NOT EXECUTED 8009854: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8009858: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800985c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009860: fb ff f8 7f calli 8007a5c <== NOT EXECUTED 8009864: 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) 8009868: 44 20 00 02 be r1,r0,8009870 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 800986c: fb ff e3 7c calli 800265c <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009870: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009874: fb ff f8 ca calli 8007b9c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 8009878: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800987c: 5c 4e 00 07 bne r2,r14,8009898 <== NOT EXECUTED 8009880: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED 8009884: 5d c2 00 05 bne r14,r2,8009898 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 8009888: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800988c: fb ff ff c3 calli 8009798 <== NOT EXECUTED *pipep = NULL; 8009890: 59 ae 00 00 sw (r13+0),r14 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 8009894: e0 00 00 0f bi 80098d0 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 8009898: 64 42 00 00 cmpei r2,r2,0 <== NOT EXECUTED 800989c: 7d 81 00 04 cmpnei r1,r12,4 <== NOT EXECUTED 80098a0: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 80098a4: 44 40 00 03 be r2,r0,80098b0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 80098a8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 80098ac: e0 00 00 07 bi 80098c8 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 80098b0: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 80098b4: 7d 8c 00 02 cmpnei r12,r12,2 <== NOT EXECUTED 80098b8: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED 80098bc: a1 81 60 00 and r12,r12,r1 <== NOT EXECUTED 80098c0: 45 82 00 04 be r12,r2,80098d0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 80098c4: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 80098c8: 37 82 00 18 addi r2,sp,24 <== NOT EXECUTED 80098cc: f8 00 02 31 calli 800a190 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 80098d0: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80098d4: 38 21 c6 28 ori r1,r1,0xc628 <== NOT EXECUTED 80098d8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80098dc: fb ff f8 b0 calli 8007b9c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 80098e0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80098e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80098e8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80098ec: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 80098f0: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 80098f4: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 80098f8: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED 80098fc: c3 a0 00 00 ret <== NOT EXECUTED 08009420 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 8009420: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 8009424: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 8009428: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800942c: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 8009430: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 8009434: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 8009438: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800943c: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 8009440: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 8009444: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8009448: b8 60 70 00 mv r14,r3 <== NOT EXECUTED 800944c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8009450: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 8009454: b8 80 90 00 mv r18,r4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 8009458: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 800945c: 44 60 00 5a be r3,r0,80095c4 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 8009460: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 8009464: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009468: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800946c: fb ff f9 7c calli 8007a5c <== NOT EXECUTED 8009470: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 8009474: 5c 20 00 54 bne r1,r0,80095c4 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 8009478: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800947c: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 8009480: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 8009484: 44 41 00 4c be r2,r1,80095b4 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 8009488: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 800948c: b9 c0 80 00 mv r16,r14 <== NOT EXECUTED 8009490: 50 2e 00 02 bgeu r1,r14,8009498 <== NOT EXECUTED 8009494: 34 10 00 01 mvi r16,1 <== NOT EXECUTED 8009498: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800949c: e0 00 00 44 bi 80095ac <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 80094a0: 2a 4f 00 18 lw r15,(r18+24) <== NOT EXECUTED 80094a4: 21 ef 00 01 andi r15,r15,0x1 <== NOT EXECUTED 80094a8: 45 e0 00 03 be r15,r0,80094b4 <== NOT EXECUTED 80094ac: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 80094b0: e0 00 00 41 bi 80095b4 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 80094b4: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 80094b8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 80094bc: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 80094c0: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED PIPE_UNLOCK(pipe); 80094c4: fb ff f9 b6 calli 8007b9c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 80094c8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 80094cc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 80094d0: f8 00 03 4f calli 800a20c <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 80094d4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 80094d8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 80094dc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 80094e0: 44 2f 00 02 be r1,r15,80094e8 <== NOT EXECUTED 80094e4: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 80094e8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80094ec: fb ff f9 5c calli 8007a5c <== NOT EXECUTED 80094f0: 44 20 00 03 be r1,r0,80094fc <== NOT EXECUTED 80094f4: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 80094f8: e0 00 00 31 bi 80095bc <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 80094fc: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED 8009500: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 8009504: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED if (ret != 0) 8009508: 5d a1 00 2b bne r13,r1,80095b4 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 800950c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8009510: 5c 2d 00 03 bne r1,r13,800951c <== NOT EXECUTED 8009514: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 8009518: e0 00 00 27 bi 80095b4 <== 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) { 800951c: 29 6f 00 04 lw r15,(r11+4) <== NOT EXECUTED 8009520: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8009524: c9 e1 68 00 sub r13,r15,r1 <== NOT EXECUTED 8009528: 56 0d ff de bgu r16,r13,80094a0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 800952c: c9 cc 10 00 sub r2,r14,r12 <== NOT EXECUTED 8009530: 50 4d 00 02 bgeu r2,r13,8009538 <== NOT EXECUTED 8009534: b8 40 68 00 mv r13,r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 8009538: 29 63 00 08 lw r3,(r11+8) <== NOT EXECUTED 800953c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8009540: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8009544: f8 00 3e e2 calli 80190cc <__umodsi3> <== NOT EXECUTED 8009548: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED 800954c: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 8009550: b6 2c 10 00 add r2,r17,r12 <== NOT EXECUTED if (chunk > chunk1) { 8009554: 4d ed 00 09 bge r15,r13,8009578 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 8009558: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800955c: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 8009560: f8 00 09 0d calli 800b994 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 8009564: b5 ec 10 00 add r2,r15,r12 <== NOT EXECUTED 8009568: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800956c: b6 22 10 00 add r2,r17,r2 <== NOT EXECUTED 8009570: c9 af 18 00 sub r3,r13,r15 <== NOT EXECUTED 8009574: e0 00 00 03 bi 8009580 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 8009578: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800957c: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8009580: f8 00 09 05 calli 800b994 <== NOT EXECUTED pipe->Length += chunk; 8009584: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 8009588: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 800958c: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 8009590: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED if (pipe->waitingReaders > 0) 8009594: 44 40 00 04 be r2,r0,80095a4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 8009598: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800959c: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 80095a0: f8 00 02 fc calli 800a190 <== NOT EXECUTED written += chunk; 80095a4: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED 80095a8: 34 10 00 01 mvi r16,1 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 80095ac: 55 cc ff dc bgu r14,r12,800951c <== NOT EXECUTED 80095b0: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 80095b4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80095b8: fb ff f9 79 calli 8007b9c <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 80095bc: 49 80 00 02 bg r12,r0,80095c4 <== NOT EXECUTED 80095c0: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED return written; return ret; } 80095c4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80095c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80095cc: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 80095d0: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 80095d4: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 80095d8: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 80095dc: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 80095e0: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 80095e4: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 80095e8: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 80095ec: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 80095f0: c3 a0 00 00 ret <== NOT EXECUTED 08019624 : ssize_t read( int fd, void *buffer, size_t count ) { 8019624: 37 9c ff e8 addi sp,sp,-24 8019628: 5b 8b 00 14 sw (sp+20),r11 801962c: 5b 8c 00 10 sw (sp+16),r12 8019630: 5b 8d 00 0c sw (sp+12),r13 8019634: 5b 8e 00 08 sw (sp+8),r14 8019638: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801963c: 78 04 08 01 mvhi r4,0x801 8019640: 38 84 c0 10 ori r4,r4,0xc010 8019644: 28 84 00 00 lw r4,(r4+0) ssize_t read( int fd, void *buffer, size_t count ) { 8019648: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801964c: 54 81 00 02 bgu r4,r1,8019654 8019650: e0 00 00 10 bi 8019690 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8019654: 34 02 00 03 mvi r2,3 8019658: 5b 83 00 18 sw (sp+24),r3 801965c: 78 0b 08 01 mvhi r11,0x801 8019660: fb ff 9a e4 calli 80001f0 <__ashlsi3> 8019664: 34 02 00 03 mvi r2,3 8019668: 39 6b c6 9c ori r11,r11,0xc69c 801966c: b8 20 70 00 mv r14,r1 8019670: fb ff 9a e0 calli 80001f0 <__ashlsi3> 8019674: 29 6c 00 00 lw r12,(r11+0) 8019678: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801967c: 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 ); 8019680: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 8019684: 29 81 00 18 lw r1,(r12+24) 8019688: 20 22 01 00 andi r2,r1,0x100 801968c: 5c 40 00 04 bne r2,r0,801969c 8019690: fb ff c6 1b calli 800aefc <__errno> 8019694: 34 02 00 09 mvi r2,9 8019698: e0 00 00 0e bi 80196d0 rtems_libio_check_buffer( buffer ); 801969c: 45 a0 00 05 be r13,r0,80196b0 rtems_libio_check_count( count ); 80196a0: b8 60 58 00 mv r11,r3 80196a4: 44 60 00 1d be r3,r0,8019718 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 80196a8: 20 21 00 02 andi r1,r1,0x2 80196ac: 5c 20 00 04 bne r1,r0,80196bc 80196b0: fb ff c6 13 calli 800aefc <__errno> <== NOT EXECUTED 80196b4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80196b8: e0 00 00 06 bi 80196d0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 80196bc: 29 81 00 40 lw r1,(r12+64) 80196c0: 28 24 00 08 lw r4,(r1+8) 80196c4: 5c 80 00 06 bne r4,r0,80196dc rtems_set_errno_and_return_minus_one( ENOTSUP ); 80196c8: fb ff c6 0d calli 800aefc <__errno> <== NOT EXECUTED 80196cc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80196d0: 58 22 00 00 sw (r1+0),r2 80196d4: 34 0b ff ff mvi r11,-1 80196d8: e0 00 00 10 bi 8019718 rc = (*iop->handlers->read_h)( iop, buffer, count ); 80196dc: b9 a0 10 00 mv r2,r13 80196e0: b9 80 08 00 mv r1,r12 80196e4: d8 80 00 00 call r4 80196e8: b8 20 58 00 mv r11,r1 if ( rc > 0 ) 80196ec: 4c 01 00 0b bge r0,r1,8019718 iop->offset += rc; 80196f0: 34 02 00 1f mvi r2,31 80196f4: fb ff 9b 0f calli 8000330 <__ashrsi3> 80196f8: 29 82 00 14 lw r2,(r12+20) 80196fc: 29 84 00 10 lw r4,(r12+16) 8019700: b5 62 10 00 add r2,r11,r2 8019704: f5 62 18 00 cmpgu r3,r11,r2 8019708: b4 24 08 00 add r1,r1,r4 801970c: b4 61 08 00 add r1,r3,r1 8019710: 59 82 00 14 sw (r12+20),r2 8019714: 59 81 00 10 sw (r12+16),r1 return rc; } 8019718: b9 60 08 00 mv r1,r11 801971c: 2b 9d 00 04 lw ra,(sp+4) 8019720: 2b 8b 00 14 lw r11,(sp+20) 8019724: 2b 8c 00 10 lw r12,(sp+16) 8019728: 2b 8d 00 0c lw r13,(sp+12) 801972c: 2b 8e 00 08 lw r14,(sp+8) 8019730: 37 9c 00 18 addi sp,sp,24 8019734: c3 a0 00 00 ret 08028898 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 8028898: 37 9c ff d8 addi sp,sp,-40 802889c: 5b 8b 00 14 sw (sp+20),r11 80288a0: 5b 8c 00 10 sw (sp+16),r12 80288a4: 5b 8d 00 0c sw (sp+12),r13 80288a8: 5b 8e 00 08 sw (sp+8),r14 80288ac: 5b 9d 00 04 sw (sp+4),ra 80288b0: b8 40 68 00 mv r13,r2 80288b4: b8 60 70 00 mv r14,r3 80288b8: b8 20 60 00 mv r12,r1 rtems_filesystem_location_info_t loc; int result; if (!buf) 80288bc: 5c 40 00 04 bne r2,r0,80288cc rtems_set_errno_and_return_minus_one( EFAULT ); 80288c0: f8 00 68 19 calli 8042924 <__errno> <== NOT EXECUTED 80288c4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80288c8: e0 00 00 14 bi 8028918 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 80288cc: f8 00 86 00 calli 804a0cc 80288d0: 34 03 00 00 mvi r3,0 80288d4: 37 8b 00 18 addi r11,sp,24 80288d8: b8 20 10 00 mv r2,r1 80288dc: b9 60 20 00 mv r4,r11 80288e0: b9 80 08 00 mv r1,r12 80288e4: b8 60 28 00 mv r5,r3 80288e8: fb ff 7a fc calli 80074d8 0, &loc, false ); if ( result != 0 ) 80288ec: 34 0c ff ff mvi r12,-1 80288f0: 5c 20 00 2a bne r1,r0,8028998 return -1; if ( !loc.ops->node_type_h ){ 80288f4: 2b 82 00 24 lw r2,(sp+36) 80288f8: 28 44 00 10 lw r4,(r2+16) 80288fc: 5c 81 00 0a bne r4,r1,8028924 rtems_filesystem_freenode( &loc ); 8028900: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028904: 44 44 00 03 be r2,r4,8028910 <== NOT EXECUTED 8028908: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802890c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028910: f8 00 68 05 calli 8042924 <__errno> <== NOT EXECUTED 8028914: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028918: 58 22 00 00 sw (r1+0),r2 802891c: 34 0c ff ff mvi r12,-1 8028920: e0 00 00 1e bi 8028998 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 8028924: b9 60 08 00 mv r1,r11 8028928: d8 80 00 00 call r4 802892c: 34 02 00 04 mvi r2,4 8028930: 2b 84 00 24 lw r4,(sp+36) 8028934: 44 22 00 09 be r1,r2,8028958 rtems_filesystem_freenode( &loc ); 8028938: 44 80 00 05 be r4,r0,802894c 802893c: 28 82 00 1c lw r2,(r4+28) 8028940: 44 40 00 03 be r2,r0,802894c 8028944: b9 60 08 00 mv r1,r11 8028948: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EINVAL ); 802894c: f8 00 67 f6 calli 8042924 <__errno> 8028950: 34 02 00 16 mvi r2,22 8028954: e3 ff ff f1 bi 8028918 } if ( !loc.ops->readlink_h ){ 8028958: 28 85 00 3c lw r5,(r4+60) 802895c: 5c a0 00 04 bne r5,r0,802896c rtems_filesystem_freenode( &loc ); 8028960: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED 8028964: 5c 45 ff e9 bne r2,r5,8028908 <== NOT EXECUTED 8028968: e3 ff ff ea bi 8028910 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 802896c: b9 a0 10 00 mv r2,r13 8028970: b9 c0 18 00 mv r3,r14 8028974: b9 60 08 00 mv r1,r11 8028978: d8 a0 00 00 call r5 802897c: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 8028980: 2b 81 00 24 lw r1,(sp+36) 8028984: 44 20 00 05 be r1,r0,8028998 8028988: 28 22 00 1c lw r2,(r1+28) 802898c: 44 40 00 03 be r2,r0,8028998 8028990: b9 60 08 00 mv r1,r11 8028994: d8 40 00 00 call r2 return result; } 8028998: b9 80 08 00 mv r1,r12 802899c: 2b 9d 00 04 lw ra,(sp+4) 80289a0: 2b 8b 00 14 lw r11,(sp+20) 80289a4: 2b 8c 00 10 lw r12,(sp+16) 80289a8: 2b 8d 00 0c lw r13,(sp+12) 80289ac: 2b 8e 00 08 lw r14,(sp+8) 80289b0: 37 9c 00 28 addi sp,sp,40 80289b4: c3 a0 00 00 ret 080032d0 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 80032d0: 37 9c ff e4 addi sp,sp,-28 80032d4: 5b 8b 00 1c sw (sp+28),r11 80032d8: 5b 8c 00 18 sw (sp+24),r12 80032dc: 5b 8d 00 14 sw (sp+20),r13 80032e0: 5b 8e 00 10 sw (sp+16),r14 80032e4: 5b 8f 00 0c sw (sp+12),r15 80032e8: 5b 90 00 08 sw (sp+8),r16 80032ec: 5b 9d 00 04 sw (sp+4),ra int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 80032f0: 78 04 08 02 mvhi r4,0x802 80032f4: 38 84 00 10 ori r4,r4,0x10 80032f8: 28 84 00 00 lw r4,(r4+0) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 80032fc: b8 40 68 00 mv r13,r2 8003300: b8 60 80 00 mv r16,r3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 8003304: 54 81 00 02 bgu r4,r1,800330c 8003308: e0 00 00 0e bi 8003340 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 800330c: 34 02 00 03 mvi r2,3 8003310: fb ff f6 e9 calli 8000eb4 <__ashlsi3> 8003314: 78 0b 08 02 mvhi r11,0x802 8003318: 34 02 00 03 mvi r2,3 800331c: 39 6b 0e 70 ori r11,r11,0xe70 8003320: b8 20 70 00 mv r14,r1 8003324: fb ff f6 e4 calli 8000eb4 <__ashlsi3> 8003328: 29 6c 00 00 lw r12,(r11+0) 800332c: b5 c1 08 00 add r1,r14,r1 8003330: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 8003334: 29 81 00 18 lw r1,(r12+24) 8003338: 20 22 01 00 andi r2,r1,0x100 800333c: 5c 40 00 04 bne r2,r0,800334c 8003340: f8 00 28 e8 calli 800d6e0 <__errno> <== NOT EXECUTED 8003344: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8003348: e0 00 00 1c bi 80033b8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 800334c: 20 21 00 02 andi r1,r1,0x2 8003350: 44 20 00 18 be r1,r0,80033b0 /* * Argument validation on IO vector */ if ( !iov ) 8003354: 45 a0 00 17 be r13,r0,80033b0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003358: 4a 00 00 02 bg r16,r0,8003360 800335c: e0 00 00 15 bi 80033b0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003360: 34 01 04 00 mvi r1,1024 8003364: 4c 30 00 02 bge r1,r16,800336c 8003368: e0 00 00 12 bi 80033b0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 800336c: 29 81 00 40 lw r1,(r12+64) 8003370: 28 21 00 08 lw r1,(r1+8) 8003374: 5c 20 00 04 bne r1,r0,8003384 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003378: f8 00 28 da calli 800d6e0 <__errno> <== NOT EXECUTED 800337c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8003380: e0 00 00 0e bi 80033b8 <== NOT EXECUTED 8003384: 34 02 00 00 mvi r2,0 8003388: b9 a0 08 00 mv r1,r13 800338c: b8 40 18 00 mv r3,r2 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 8003390: 28 24 00 00 lw r4,(r1+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++ ) { 8003394: 34 42 00 01 addi r2,r2,1 ssize_t old; if ( !iov[v].iov_base ) 8003398: 44 80 00 06 be r4,r0,80033b0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 800339c: 28 25 00 04 lw r5,(r1+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++ ) { 80033a0: 34 21 00 08 addi r1,r1,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; 80033a4: b4 65 20 00 add r4,r3,r5 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 80033a8: 44 a0 00 02 be r5,r0,80033b0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 80033ac: 4c 83 00 05 bge r4,r3,80033c0 rtems_set_errno_and_return_minus_one( EINVAL ); 80033b0: f8 00 28 cc calli 800d6e0 <__errno> 80033b4: 34 02 00 16 mvi r2,22 80033b8: 58 22 00 00 sw (r1+0),r2 80033bc: e0 00 00 10 bi 80033fc * 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++ ) { 80033c0: 4c 50 00 03 bge r2,r16,80033cc 80033c4: b8 80 18 00 mv r3,r4 80033c8: e3 ff ff f2 bi 8003390 80033cc: 34 0f 00 00 mvi r15,0 80033d0: b9 e0 58 00 mv r11,r15 /* * 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 ); 80033d4: 29 81 00 40 lw r1,(r12+64) 80033d8: 29 a2 00 00 lw r2,(r13+0) 80033dc: 29 a3 00 04 lw r3,(r13+4) 80033e0: 28 24 00 08 lw r4,(r1+8) 80033e4: b9 80 08 00 mv r1,r12 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80033e8: 35 ef 00 01 addi r15,r15,1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 80033ec: d8 80 00 00 call r4 80033f0: b8 20 70 00 mv r14,r1 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 80033f4: 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 ) 80033f8: 4c 20 00 03 bge r1,r0,8003404 80033fc: 34 0b ff ff mvi r11,-1 8003400: e0 00 00 10 bi 8003440 return -1; if ( bytes > 0 ) { 8003404: 44 20 00 0b be r1,r0,8003430 iop->offset += bytes; 8003408: fb ff f6 fb calli 8000ff4 <__ashrsi3> <== NOT EXECUTED 800340c: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED 8003410: 29 84 00 10 lw r4,(r12+16) <== NOT EXECUTED total += bytes; 8003414: b5 6e 58 00 add r11,r11,r14 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003418: b5 c2 10 00 add r2,r14,r2 <== NOT EXECUTED 800341c: f5 c2 18 00 cmpgu r3,r14,r2 <== NOT EXECUTED 8003420: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 8003424: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003428: 59 81 00 10 sw (r12+16),r1 <== NOT EXECUTED 800342c: 59 82 00 14 sw (r12+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 8003430: 29 a1 00 04 lw r1,(r13+4) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003434: 35 ad 00 08 addi r13,r13,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) 8003438: 5d c1 00 02 bne r14,r1,8003440 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 800343c: 4a 0f ff e6 bg r16,r15,80033d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 8003440: b9 60 08 00 mv r1,r11 8003444: 2b 9d 00 04 lw ra,(sp+4) 8003448: 2b 8b 00 1c lw r11,(sp+28) 800344c: 2b 8c 00 18 lw r12,(sp+24) 8003450: 2b 8d 00 14 lw r13,(sp+20) 8003454: 2b 8e 00 10 lw r14,(sp+16) 8003458: 2b 8f 00 0c lw r15,(sp+12) 800345c: 2b 90 00 08 lw r16,(sp+8) 8003460: 37 9c 00 1c addi sp,sp,28 8003464: c3 a0 00 00 ret 080197d8 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 80197d8: 37 9c ff e8 addi sp,sp,-24 80197dc: 5b 8b 00 14 sw (sp+20),r11 80197e0: 5b 8c 00 10 sw (sp+16),r12 80197e4: 5b 8d 00 0c sw (sp+12),r13 80197e8: 5b 8e 00 08 sw (sp+8),r14 80197ec: 5b 9d 00 04 sw (sp+4),ra 80197f0: 78 03 08 01 mvhi r3,0x801 80197f4: 38 63 c6 a8 ori r3,r3,0xc6a8 80197f8: 28 65 00 10 lw r5,(r3+16) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 80197fc: 78 04 08 01 mvhi r4,0x801 8019800: 38 84 c9 c0 ori r4,r4,0xc9c0 8019804: 28 84 00 00 lw r4,(r4+0) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 8019808: 34 a5 00 01 addi r5,r5,1 801980c: b8 20 58 00 mv r11,r1 8019810: 58 65 00 10 sw (r3+16),r5 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 8019814: 34 01 00 03 mvi r1,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 8019818: b8 40 60 00 mv r12,r2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801981c: 5c 81 00 09 bne r4,r1,8019840 if (_Thread_Dispatch_disable_level > 0) 8019820: 78 01 08 01 mvhi r1,0x801 8019824: 38 21 c8 24 ori r1,r1,0xc824 8019828: 28 22 00 00 lw r2,(r1+0) 801982c: 5c 40 00 36 bne r2,r0,8019904 return (void *) 0; if (_ISR_Nest_level > 0) 8019830: 78 01 08 01 mvhi r1,0x801 8019834: 38 21 c8 bc ori r1,r1,0xc8bc 8019838: 28 21 00 00 lw r1,(r1+0) 801983c: 5c 22 00 32 bne r1,r2,8019904 } /* * Continue with realloc(). */ if ( !ptr ) 8019840: 5d 60 00 05 bne r11,r0,8019854 return malloc( size ); 8019844: b9 80 08 00 mv r1,r12 8019848: fb ff b7 8c calli 8007678 801984c: b8 20 58 00 mv r11,r1 8019850: e0 00 00 2e bi 8019908 if ( !size ) { 8019854: 5d 80 00 05 bne r12,r0,8019868 free( ptr ); 8019858: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 801985c: fb ff b5 e9 calli 8007000 <== NOT EXECUTED 8019860: b9 80 58 00 mv r11,r12 <== NOT EXECUTED return (void *) 0; 8019864: e0 00 00 29 bi 8019908 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 8019868: 78 0d 08 01 mvhi r13,0x801 801986c: 39 ad c0 1c ori r13,r13,0xc01c 8019870: 29 a1 00 00 lw r1,(r13+0) 8019874: b9 60 10 00 mv r2,r11 8019878: 37 83 00 18 addi r3,sp,24 801987c: f8 00 00 70 calli 8019a3c <_Protected_heap_Get_block_size> 8019880: b8 20 70 00 mv r14,r1 8019884: 5c 20 00 06 bne r1,r0,801989c errno = EINVAL; 8019888: fb ff c5 9d calli 800aefc <__errno> 801988c: 34 02 00 16 mvi r2,22 8019890: 58 22 00 00 sw (r1+0),r2 8019894: b9 c0 58 00 mv r11,r14 return (void *) 0; 8019898: e0 00 00 1c bi 8019908 #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 ) ) { 801989c: 29 a1 00 00 lw r1,(r13+0) 80198a0: b9 60 10 00 mv r2,r11 80198a4: b9 80 18 00 mv r3,r12 80198a8: f8 00 00 7d calli 8019a9c <_Protected_heap_Resize_block> 80198ac: b8 20 70 00 mv r14,r1 80198b0: 5c 20 00 16 bne r1,r0,8019908 * 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 ); 80198b4: b9 80 08 00 mv r1,r12 80198b8: fb ff b7 70 calli 8007678 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 80198bc: 78 02 08 01 mvhi r2,0x801 80198c0: 38 42 c6 a8 ori r2,r2,0xc6a8 * 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 ); 80198c4: b8 20 68 00 mv r13,r1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 80198c8: 28 41 00 04 lw r1,(r2+4) 80198cc: 34 21 ff ff addi r1,r1,-1 80198d0: 58 41 00 04 sw (r2+4),r1 if ( !new_area ) { 80198d4: 45 ae 00 0c be r13,r14,8019904 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 80198d8: 2b 81 00 18 lw r1,(sp+24) 80198dc: b9 80 18 00 mv r3,r12 80198e0: 50 2c 00 02 bgeu r1,r12,80198e8 80198e4: b8 20 18 00 mv r3,r1 80198e8: b9 60 10 00 mv r2,r11 80198ec: b9 a0 08 00 mv r1,r13 80198f0: fb ff c8 29 calli 800b994 free( ptr ); 80198f4: b9 60 08 00 mv r1,r11 80198f8: fb ff b5 c2 calli 8007000 80198fc: b9 a0 58 00 mv r11,r13 return new_area; 8019900: e0 00 00 02 bi 8019908 8019904: 34 0b 00 00 mvi r11,0 } 8019908: b9 60 08 00 mv r1,r11 801990c: 2b 9d 00 04 lw ra,(sp+4) 8019910: 2b 8b 00 14 lw r11,(sp+20) 8019914: 2b 8c 00 10 lw r12,(sp+16) 8019918: 2b 8d 00 0c lw r13,(sp+12) 801991c: 2b 8e 00 08 lw r14,(sp+8) 8019920: 37 9c 00 18 addi sp,sp,24 8019924: c3 a0 00 00 ret 08008ca8 : #include int rmdir( const char *pathname ) { 8008ca8: 37 9c ff c0 addi sp,sp,-64 8008cac: 5b 8b 00 18 sw (sp+24),r11 8008cb0: 5b 8c 00 14 sw (sp+20),r12 8008cb4: 5b 8d 00 10 sw (sp+16),r13 8008cb8: 5b 8e 00 0c sw (sp+12),r14 8008cbc: 5b 8f 00 08 sw (sp+8),r15 8008cc0: 5b 9d 00 04 sw (sp+4),ra 8008cc4: b8 20 78 00 mv r15,r1 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 8008cc8: fb ff f9 b6 calli 80073a0 8008ccc: b8 20 68 00 mv r13,r1 if ( parentpathlen == 0 ) 8008cd0: 5c 20 00 19 bne r1,r0,8008d34 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 8008cd4: 41 e1 00 00 lbu r1,(r15+0) 8008cd8: 64 23 00 5c cmpei r3,r1,92 8008cdc: 64 22 00 2f cmpei r2,r1,47 8008ce0: b8 62 10 00 or r2,r3,r2 8008ce4: 5c 4d 00 02 bne r2,r13,8008cec 8008ce8: 5c 20 00 0a bne r1,r0,8008d10 <== NOT EXECUTED 8008cec: 78 01 08 06 mvhi r1,0x806 8008cf0: 38 21 b2 f0 ori r1,r1,0xb2f0 8008cf4: 28 22 00 00 lw r2,(r1+0) 8008cf8: 34 03 00 14 mvi r3,20 8008cfc: 37 81 00 30 addi r1,sp,48 8008d00: 34 42 00 18 addi r2,r2,24 8008d04: f8 00 f5 aa calli 80463ac 8008d08: 34 0c 00 00 mvi r12,0 8008d0c: e0 00 00 12 bi 8008d54 8008d10: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8008d14: 38 21 b2 f0 ori r1,r1,0xb2f0 <== NOT EXECUTED 8008d18: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8008d1c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8008d20: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8008d24: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 8008d28: f8 00 f5 a1 calli 80463ac <== NOT EXECUTED 8008d2c: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED 8008d30: e0 00 00 09 bi 8008d54 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 8008d34: b9 e0 08 00 mv r1,r15 8008d38: b9 a0 10 00 mv r2,r13 8008d3c: 34 03 00 02 mvi r3,2 8008d40: 37 84 00 30 addi r4,sp,48 8008d44: 34 05 00 00 mvi r5,0 8008d48: fb ff f9 e4 calli 80074d8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 8008d4c: 5c 20 00 60 bne r1,r0,8008ecc 8008d50: 34 0c 00 01 mvi r12,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8008d54: 37 8b 00 1c addi r11,sp,28 8008d58: 37 8e 00 30 addi r14,sp,48 8008d5c: 34 03 00 14 mvi r3,20 8008d60: b9 c0 10 00 mv r2,r14 8008d64: b9 60 08 00 mv r1,r11 8008d68: f8 00 f5 91 calli 80463ac name = pathname + parentpathlen; 8008d6c: b5 ed 68 00 add r13,r15,r13 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8008d70: b9 a0 08 00 mv r1,r13 8008d74: f8 01 04 d6 calli 804a0cc 8008d78: b8 20 10 00 mv r2,r1 8008d7c: b9 a0 08 00 mv r1,r13 8008d80: fb ff f9 79 calli 8007364 8008d84: b5 a1 68 00 add r13,r13,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8008d88: b9 a0 08 00 mv r1,r13 8008d8c: f8 01 04 d0 calli 804a0cc 8008d90: 34 03 00 00 mvi r3,0 8008d94: b8 20 10 00 mv r2,r1 8008d98: b9 60 20 00 mv r4,r11 8008d9c: b9 a0 08 00 mv r1,r13 8008da0: b8 60 28 00 mv r5,r3 8008da4: fb ff f9 93 calli 80073f0 0, &loc, false ); if ( result != 0 ) { 8008da8: 44 20 00 09 be r1,r0,8008dcc if ( free_parentloc ) 8008dac: 45 80 00 48 be r12,r0,8008ecc rtems_filesystem_freenode( &parentloc ); 8008db0: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8008db4: 44 20 00 46 be r1,r0,8008ecc <== NOT EXECUTED 8008db8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8008dbc: 44 40 00 44 be r2,r0,8008ecc <== NOT EXECUTED 8008dc0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8008dc4: d8 40 00 00 call r2 <== NOT EXECUTED 8008dc8: e0 00 00 41 bi 8008ecc <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 8008dcc: 2b 82 00 28 lw r2,(sp+40) 8008dd0: 28 43 00 10 lw r3,(r2+16) 8008dd4: 5c 61 00 04 bne r3,r1,8008de4 rtems_filesystem_freenode( &loc ); 8008dd8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8008ddc: 5c 43 00 1d bne r2,r3,8008e50 <== NOT EXECUTED 8008de0: e0 00 00 1e bi 8008e58 <== NOT EXECUTED 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 ){ 8008de4: b9 60 08 00 mv r1,r11 8008de8: d8 60 00 00 call r3 8008dec: 34 02 00 01 mvi r2,1 8008df0: 44 22 00 11 be r1,r2,8008e34 rtems_filesystem_freenode( &loc ); 8008df4: 2b 81 00 28 lw r1,(sp+40) 8008df8: 44 20 00 05 be r1,r0,8008e0c 8008dfc: 28 22 00 1c lw r2,(r1+28) 8008e00: 44 40 00 03 be r2,r0,8008e0c 8008e04: b9 60 08 00 mv r1,r11 8008e08: d8 40 00 00 call r2 if ( free_parentloc ) 8008e0c: 45 80 00 07 be r12,r0,8008e28 rtems_filesystem_freenode( &parentloc ); 8008e10: 2b 81 00 3c lw r1,(sp+60) 8008e14: 44 20 00 05 be r1,r0,8008e28 8008e18: 28 22 00 1c lw r2,(r1+28) 8008e1c: 44 40 00 03 be r2,r0,8008e28 8008e20: 37 81 00 30 addi r1,sp,48 8008e24: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8008e28: f8 00 e6 bf calli 8042924 <__errno> 8008e2c: 34 02 00 14 mvi r2,20 8008e30: e0 00 00 13 bi 8008e7c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 8008e34: 2b 81 00 24 lw r1,(sp+36) 8008e38: 28 23 00 34 lw r3,(r1+52) 8008e3c: 5c 60 00 12 bne r3,r0,8008e84 rtems_filesystem_freenode( &loc ); 8008e40: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8008e44: 44 23 00 05 be r1,r3,8008e58 <== NOT EXECUTED 8008e48: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8008e4c: 44 40 00 03 be r2,r0,8008e58 <== NOT EXECUTED 8008e50: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8008e54: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_parentloc ) 8008e58: 45 80 00 07 be r12,r0,8008e74 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 8008e5c: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8008e60: 44 20 00 05 be r1,r0,8008e74 <== NOT EXECUTED 8008e64: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8008e68: 44 40 00 03 be r2,r0,8008e74 <== NOT EXECUTED 8008e6c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8008e70: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8008e74: f8 00 e6 ac calli 8042924 <__errno> <== NOT EXECUTED 8008e78: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8008e7c: 58 22 00 00 sw (r1+0),r2 8008e80: e0 00 00 13 bi 8008ecc } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 8008e84: b9 c0 08 00 mv r1,r14 8008e88: b9 60 10 00 mv r2,r11 8008e8c: d8 60 00 00 call r3 8008e90: b8 20 68 00 mv r13,r1 rtems_filesystem_freenode( &loc ); 8008e94: 2b 81 00 28 lw r1,(sp+40) 8008e98: 44 20 00 05 be r1,r0,8008eac 8008e9c: 28 22 00 1c lw r2,(r1+28) 8008ea0: 44 40 00 03 be r2,r0,8008eac 8008ea4: b9 60 08 00 mv r1,r11 8008ea8: d8 40 00 00 call r2 if ( free_parentloc ) 8008eac: 45 80 00 09 be r12,r0,8008ed0 rtems_filesystem_freenode( &parentloc ); 8008eb0: 2b 81 00 3c lw r1,(sp+60) 8008eb4: 44 20 00 07 be r1,r0,8008ed0 8008eb8: 28 22 00 1c lw r2,(r1+28) 8008ebc: 44 40 00 05 be r2,r0,8008ed0 8008ec0: 37 81 00 30 addi r1,sp,48 8008ec4: d8 40 00 00 call r2 8008ec8: e0 00 00 02 bi 8008ed0 8008ecc: 34 0d ff ff mvi r13,-1 return result; } 8008ed0: b9 a0 08 00 mv r1,r13 8008ed4: 2b 9d 00 04 lw ra,(sp+4) 8008ed8: 2b 8b 00 18 lw r11,(sp+24) 8008edc: 2b 8c 00 14 lw r12,(sp+20) 8008ee0: 2b 8d 00 10 lw r13,(sp+16) 8008ee4: 2b 8e 00 0c lw r14,(sp+12) 8008ee8: 2b 8f 00 08 lw r15,(sp+8) 8008eec: 37 9c 00 40 addi sp,sp,64 8008ef0: c3 a0 00 00 ret 08012a50 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 8012a50: 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; } 8012a54: 38 21 91 ac ori r1,r1,0x91ac <== NOT EXECUTED 8012a58: c3 a0 00 00 ret <== NOT EXECUTED 0800f40c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800f40c: 37 9c ff f8 addi sp,sp,-8 800f410: 5b 8b 00 08 sw (sp+8),r11 800f414: 5b 9d 00 04 sw (sp+4),ra 800f418: b8 40 58 00 mv r11,r2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800f41c: f8 00 00 0a calli 800f444 if (nap) 800f420: 44 20 00 03 be r1,r0,800f42c return nap->name; 800f424: 28 21 00 00 lw r1,(r1+0) 800f428: e0 00 00 03 bi 800f434 return rtems_assoc_name_bad(local_value); 800f42c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800f430: f8 00 0d 88 calli 8012a50 <== NOT EXECUTED } 800f434: 2b 9d 00 04 lw ra,(sp+4) 800f438: 2b 8b 00 08 lw r11,(sp+8) 800f43c: 37 9c 00 08 addi sp,sp,8 800f440: c3 a0 00 00 ret 0800ae64 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800ae64: 37 9c ff f4 addi sp,sp,-12 800ae68: 5b 8b 00 0c sw (sp+12),r11 800ae6c: 5b 8c 00 08 sw (sp+8),r12 800ae70: 5b 9d 00 04 sw (sp+4),ra 800ae74: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800ae78: 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 ) { 800ae7c: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800ae80: 44 20 00 07 be r1,r0,800ae9c 800ae84: 78 02 08 01 mvhi r2,0x801 800ae88: 38 42 a8 50 ori r2,r2,0xa850 800ae8c: f8 00 04 9c calli 800c0fc 800ae90: 5c 20 00 03 bne r1,r0,800ae9c default_ap = ap++; 800ae94: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ae98: e0 00 00 05 bi 800aeac <== NOT EXECUTED 800ae9c: 34 01 00 00 mvi r1,0 800aea0: e0 00 00 04 bi 800aeb0 for ( ; ap->name; ap++) if (ap->local_value == local_value) 800aea4: 29 62 00 04 lw r2,(r11+4) 800aea8: 44 4c 00 05 be r2,r12,800aebc const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800aeac: 35 6b 00 0c addi r11,r11,12 800aeb0: 29 62 00 00 lw r2,(r11+0) 800aeb4: 5c 40 ff fc bne r2,r0,800aea4 800aeb8: b8 20 58 00 mv r11,r1 if (ap->local_value == local_value) return ap; return default_ap; } 800aebc: b9 60 08 00 mv r1,r11 800aec0: 2b 9d 00 04 lw ra,(sp+4) 800aec4: 2b 8b 00 0c lw r11,(sp+12) 800aec8: 2b 8c 00 08 lw r12,(sp+8) 800aecc: 37 9c 00 0c addi sp,sp,12 800aed0: c3 a0 00 00 ret 08009fac : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 8009fac: 37 9c ff f4 addi sp,sp,-12 8009fb0: 5b 8b 00 0c sw (sp+12),r11 8009fb4: 5b 8c 00 08 sw (sp+8),r12 8009fb8: 5b 9d 00 04 sw (sp+4),ra 8009fbc: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 8009fc0: 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 ) { 8009fc4: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 8009fc8: 44 20 00 07 be r1,r0,8009fe4 8009fcc: 78 02 08 01 mvhi r2,0x801 8009fd0: 38 42 a8 50 ori r2,r2,0xa850 8009fd4: f8 00 08 4a calli 800c0fc 8009fd8: 5c 20 00 03 bne r1,r0,8009fe4 default_ap = ap++; 8009fdc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009fe0: e0 00 00 05 bi 8009ff4 <== NOT EXECUTED 8009fe4: 34 01 00 00 mvi r1,0 8009fe8: e0 00 00 04 bi 8009ff8 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 8009fec: 29 62 00 08 lw r2,(r11+8) 8009ff0: 44 4c 00 05 be r2,r12,800a004 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 8009ff4: 35 6b 00 0c addi r11,r11,12 8009ff8: 29 62 00 00 lw r2,(r11+0) 8009ffc: 5c 40 ff fc bne r2,r0,8009fec 800a000: b8 20 58 00 mv r11,r1 if (ap->remote_value == remote_value) return ap; return default_ap; } 800a004: b9 60 08 00 mv r1,r11 800a008: 2b 9d 00 04 lw ra,(sp+4) 800a00c: 2b 8b 00 0c lw r11,(sp+12) 800a010: 2b 8c 00 08 lw r12,(sp+8) 800a014: 37 9c 00 0c addi sp,sp,12 800a018: c3 a0 00 00 ret 0800ab88 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800ab88: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800ab8c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800ab90: f8 00 00 b5 calli 800ae64 <== NOT EXECUTED if (nap) 800ab94: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800ab98: 44 20 00 02 be r1,r0,800aba0 <== NOT EXECUTED return nap->remote_value; 800ab9c: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED return 0; } 800aba0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800aba4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800aba8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800abac: c3 a0 00 00 ret <== NOT EXECUTED 08000e9c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 8000e9c: 37 9c ff f0 addi sp,sp,-16 8000ea0: 5b 8b 00 10 sw (sp+16),r11 8000ea4: 5b 8c 00 0c sw (sp+12),r12 8000ea8: 5b 8d 00 08 sw (sp+8),r13 8000eac: 5b 9d 00 04 sw (sp+4),ra const char *p; if ( !name ) 8000eb0: 34 0d 00 00 mvi r13,0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 8000eb4: b8 40 58 00 mv r11,r2 8000eb8: b8 60 60 00 mv r12,r3 const char *p; if ( !name ) 8000ebc: 44 2d 00 1d be r1,r13,8000f30 return NULL; if ( !value ) 8000ec0: 44 4d 00 1d be r2,r13,8000f34 return NULL; if ( !length ) 8000ec4: 44 6d 00 1b be r3,r13,8000f30 return NULL; value[0] = '\0'; 8000ec8: 30 4d 00 00 sb (r2+0),r13 p = rtems_bsp_cmdline_get_param_raw( name ); 8000ecc: f8 00 00 21 calli 8000f50 if ( !p ) 8000ed0: 44 2d 00 18 be r1,r13,8000f30 8000ed4: b9 a0 20 00 mv r4,r13 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; 8000ef4: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED 8000ef8: e0 00 00 03 bi 8000f04 <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000efc: 5d 00 00 02 bne r8,r0,8000f04 8000f00: 44 c3 00 0d be r6,r3,8000f34 break; value[i++] = *p++; value[i] = '\0'; 8000f04: 34 08 00 00 mvi r8,0 for (i=0 ; *p && i 8000f28: 55 82 ff f2 bgu r12,r2,8000ef0 8000f2c: e0 00 00 02 bi 8000f34 <== NOT EXECUTED 8000f30: 34 0b 00 00 mvi r11,0 return NULL; copy_string( p, value, length ); return value; } 8000f34: b9 60 08 00 mv r1,r11 8000f38: 2b 9d 00 04 lw ra,(sp+4) 8000f3c: 2b 8b 00 10 lw r11,(sp+16) 8000f40: 2b 8c 00 0c lw r12,(sp+12) 8000f44: 2b 8d 00 08 lw r13,(sp+8) 8000f48: 37 9c 00 10 addi sp,sp,16 8000f4c: c3 a0 00 00 ret 08000f88 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 8000f88: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8000f8c: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8000f90: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8000f94: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8000f98: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000f9c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8000fa0: 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 ); 8000fa4: fb ff ff be calli 8000e9c <== NOT EXECUTED 8000fa8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 8000fac: 44 20 00 1b be r1,r0,8001018 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 8000fb0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8000fb4: f8 00 2c 68 calli 800c154 <== NOT EXECUTED 8000fb8: b5 81 18 00 add r3,r12,r1 <== NOT EXECUTED if ( *rhs != '=' ) 8000fbc: 40 62 00 00 lbu r2,(r3+0) <== NOT EXECUTED 8000fc0: 34 01 00 3d mvi r1,61 <== NOT EXECUTED 8000fc4: 5c 41 00 15 bne r2,r1,8001018 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 8000fc8: 40 62 00 01 lbu r2,(r3+1) <== NOT EXECUTED 8000fcc: 34 01 00 22 mvi r1,34 <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 8000fd0: 34 64 00 01 addi r4,r3,1 <== NOT EXECUTED if ( *rhs == '\"' ) 8000fd4: 5c 41 00 02 bne r2,r1,8000fdc <== NOT EXECUTED rhs++; 8000fd8: 34 64 00 02 addi r4,r3,2 <== NOT EXECUTED 8000fdc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8000fe0: e0 00 00 03 bi 8000fec <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 8000fe4: 30 61 00 00 sb (r3+0),r1 <== NOT EXECUTED 8000fe8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 8000fec: 40 81 00 00 lbu r1,(r4+0) <== NOT EXECUTED *d++ = *rhs++; 8000ff0: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 8000ff4: 5c 20 ff fc bne r1,r0,8000fe4 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 8000ff8: 40 64 ff ff lbu r4,(r3+-1) <== NOT EXECUTED 8000ffc: 34 02 00 22 mvi r2,34 <== NOT EXECUTED 8001000: 34 61 ff ff addi r1,r3,-1 <== NOT EXECUTED 8001004: 5c 82 00 02 bne r4,r2,800100c <== NOT EXECUTED 8001008: b8 20 18 00 mv r3,r1 <== NOT EXECUTED d--; *d = '\0'; 800100c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001010: 30 61 00 00 sb (r3+0),r1 <== NOT EXECUTED return value; 8001014: e0 00 00 02 bi 800101c <== NOT EXECUTED 8001018: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED } 800101c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001020: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001024: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8001028: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800102c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8001030: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8001034: c3 a0 00 00 ret <== NOT EXECUTED 0800fc5c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 800fc5c: b8 20 18 00 mv r3,r1 if ( !routine ) 800fc60: 34 01 00 09 mvi r1,9 800fc64: 44 60 00 05 be r3,r0,800fc78 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 800fc68: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 800fc6c: 38 42 dd cc ori r2,r2,0xddcc <== NOT EXECUTED 800fc70: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 800fc74: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 800fc78: c3 a0 00 00 ret 080019c8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 80019c8: 37 9c ff 84 addi sp,sp,-124 80019cc: 5b 8b 00 44 sw (sp+68),r11 80019d0: 5b 8c 00 40 sw (sp+64),r12 80019d4: 5b 8d 00 3c sw (sp+60),r13 80019d8: 5b 8e 00 38 sw (sp+56),r14 80019dc: 5b 8f 00 34 sw (sp+52),r15 80019e0: 5b 90 00 30 sw (sp+48),r16 80019e4: 5b 91 00 2c sw (sp+44),r17 80019e8: 5b 92 00 28 sw (sp+40),r18 80019ec: 5b 93 00 24 sw (sp+36),r19 80019f0: 5b 94 00 20 sw (sp+32),r20 80019f4: 5b 95 00 1c sw (sp+28),r21 80019f8: 5b 96 00 18 sw (sp+24),r22 80019fc: 5b 97 00 14 sw (sp+20),r23 8001a00: 5b 98 00 10 sw (sp+16),r24 8001a04: 5b 99 00 0c sw (sp+12),r25 8001a08: 5b 9b 00 08 sw (sp+8),fp 8001a0c: 5b 9d 00 04 sw (sp+4),ra 8001a10: b8 40 68 00 mv r13,r2 8001a14: b8 20 70 00 mv r14,r1 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 8001a18: 44 40 00 5e be r2,r0,8001b90 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 8001a1c: 37 91 00 70 addi r17,sp,112 8001a20: ba 20 08 00 mv r1,r17 8001a24: f8 00 0c 1a calli 8004a8c <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 8001a28: 37 97 00 68 addi r23,sp,104 8001a2c: 78 01 08 02 mvhi r1,0x802 8001a30: 38 21 a8 50 ori r1,r1,0xa850 8001a34: ba 20 10 00 mv r2,r17 8001a38: ba e0 18 00 mv r3,r23 8001a3c: f8 00 16 82 calli 8007444 <_Timespec_Subtract> } } } #endif (*print)( 8001a40: 78 02 08 01 mvhi r2,0x801 8001a44: b9 c0 08 00 mv r1,r14 8001a48: 78 0b 08 02 mvhi r11,0x802 8001a4c: 38 42 f3 f8 ori r2,r2,0xf3f8 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001a50: 78 0f 08 02 mvhi r15,0x802 } } } #endif (*print)( 8001a54: d9 a0 00 00 call r13 8001a58: 39 6b a5 b8 ori r11,r11,0xa5b8 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001a5c: 39 ef a6 d8 ori r15,r15,0xa6d8 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 8001a60: 37 96 00 48 addi r22,sp,72 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 8001a64: 37 95 00 60 addi r21,sp,96 8001a68: 37 9b 00 78 addi fp,sp,120 /* * Print the information */ (*print)( context, 8001a6c: 78 19 08 01 mvhi r25,0x801 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 8001a70: 37 94 00 58 addi r20,sp,88 8001a74: 78 18 08 02 mvhi r24,0x802 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 8001a78: 29 61 00 00 lw r1,(r11+0) 8001a7c: 44 20 00 38 be r1,r0,8001b5c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 8001a80: 28 30 00 04 lw r16,(r1+4) if ( information ) { 8001a84: 34 13 00 04 mvi r19,4 8001a88: 34 12 00 01 mvi r18,1 8001a8c: 5e 00 00 30 bne r16,r0,8001b4c 8001a90: e0 00 00 33 bi 8001b5c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 8001a94: 2a 01 00 1c lw r1,(r16+28) api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001a98: 36 52 00 01 addi r18,r18,1 the_thread = (Thread_Control *)information->local_table[ i ]; 8001a9c: b4 33 08 00 add r1,r1,r19 8001aa0: 28 2c 00 00 lw r12,(r1+0) api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001aa4: 36 73 00 04 addi r19,r19,4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 8001aa8: 45 80 00 29 be r12,r0,8001b4c continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 8001aac: 29 81 00 08 lw r1,(r12+8) 8001ab0: f8 00 07 74 calli 8003880 (*print)( 8001ab4: 29 83 00 08 lw r3,(r12+8) 8001ab8: 78 02 08 01 mvhi r2,0x801 8001abc: 38 42 f5 6c ori r2,r2,0xf56c 8001ac0: b9 c0 08 00 mv r1,r14 8001ac4: ba c0 20 00 mv r4,r22 8001ac8: d9 a0 00 00 call r13 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 8001acc: 29 81 00 84 lw r1,(r12+132) 8001ad0: 5b 81 00 60 sw (sp+96),r1 8001ad4: 29 82 00 88 lw r2,(r12+136) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001ad8: 29 e1 00 00 lw r1,(r15+0) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 8001adc: 5b 82 00 64 sw (sp+100),r2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 8001ae0: 28 22 00 08 lw r2,(r1+8) 8001ae4: 29 81 00 08 lw r1,(r12+8) 8001ae8: 5c 41 00 09 bne r2,r1,8001b0c Timestamp_Control used; _Timestamp_Subtract( 8001aec: bb 00 08 00 mv r1,r24 8001af0: 38 21 a6 e0 ori r1,r1,0xa6e0 8001af4: ba 20 10 00 mv r2,r17 8001af8: ba 80 18 00 mv r3,r20 8001afc: f8 00 16 52 calli 8007444 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 8001b00: ba a0 08 00 mv r1,r21 8001b04: ba 80 10 00 mv r2,r20 8001b08: f8 00 15 e3 calli 8007294 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 8001b0c: 37 83 00 7c addi r3,sp,124 8001b10: bb 60 20 00 mv r4,fp 8001b14: ba a0 08 00 mv r1,r21 8001b18: ba e0 10 00 mv r2,r23 8001b1c: f8 00 15 f4 calli 80072ec <_Timespec_Divide> /* * Print the information */ (*print)( context, 8001b20: 2b 81 00 64 lw r1,(sp+100) 8001b24: 34 02 03 e8 mvi r2,1000 8001b28: f8 00 71 5c calli 801e098 <__udivsi3> 8001b2c: 2b 85 00 7c lw r5,(sp+124) 8001b30: 2b 86 00 78 lw r6,(sp+120) 8001b34: 2b 83 00 60 lw r3,(sp+96) 8001b38: bb 20 10 00 mv r2,r25 8001b3c: b8 20 20 00 mv r4,r1 8001b40: 38 42 f5 80 ori r2,r2,0xf580 8001b44: b9 c0 08 00 mv r1,r14 8001b48: d9 a0 00 00 call r13 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001b4c: 2e 01 00 10 lhu r1,(r16+16) the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 8001b50: 34 02 00 0d mvi r2,13 8001b54: ba c0 18 00 mv r3,r22 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001b58: 50 32 ff cf bgeu r1,r18,8001a94 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 8001b5c: 78 01 08 02 mvhi r1,0x802 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001b60: 35 6b 00 04 addi r11,r11,4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 8001b64: 38 21 a5 c8 ori r1,r1,0xa5c8 8001b68: 5d 61 ff c4 bne r11,r1,8001a78 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 8001b6c: 2b 81 00 6c lw r1,(sp+108) 8001b70: 34 02 03 e8 mvi r2,1000 8001b74: f8 00 71 49 calli 801e098 <__udivsi3> 8001b78: 2b 83 00 68 lw r3,(sp+104) 8001b7c: 78 02 08 01 mvhi r2,0x801 8001b80: b8 20 20 00 mv r4,r1 8001b84: 38 42 f5 98 ori r2,r2,0xf598 8001b88: b9 c0 08 00 mv r1,r14 8001b8c: d9 a0 00 00 call r13 "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 8001b90: 2b 9d 00 04 lw ra,(sp+4) 8001b94: 2b 8b 00 44 lw r11,(sp+68) 8001b98: 2b 8c 00 40 lw r12,(sp+64) 8001b9c: 2b 8d 00 3c lw r13,(sp+60) 8001ba0: 2b 8e 00 38 lw r14,(sp+56) 8001ba4: 2b 8f 00 34 lw r15,(sp+52) 8001ba8: 2b 90 00 30 lw r16,(sp+48) 8001bac: 2b 91 00 2c lw r17,(sp+44) 8001bb0: 2b 92 00 28 lw r18,(sp+40) 8001bb4: 2b 93 00 24 lw r19,(sp+36) 8001bb8: 2b 94 00 20 lw r20,(sp+32) 8001bbc: 2b 95 00 1c lw r21,(sp+28) 8001bc0: 2b 96 00 18 lw r22,(sp+24) 8001bc4: 2b 97 00 14 lw r23,(sp+20) 8001bc8: 2b 98 00 10 lw r24,(sp+16) 8001bcc: 2b 99 00 0c lw r25,(sp+12) 8001bd0: 2b 9b 00 08 lw fp,(sp+8) 8001bd4: 37 9c 00 7c addi sp,sp,124 8001bd8: c3 a0 00 00 ret 0800ab48 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 800ab48: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800ab4c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800ab50: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800ab54: b8 20 10 00 mv r2,r1 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 800ab58: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800ab5c: 38 21 a8 f4 ori r1,r1,0xa8f4 <== NOT EXECUTED 800ab60: f8 00 00 0a calli 800ab88 <== NOT EXECUTED 800ab64: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800ab68: 44 20 00 03 be r1,r0,800ab74 <== NOT EXECUTED { errno = rc; 800ab6c: f8 00 00 e4 calli 800aefc <__errno> <== NOT EXECUTED 800ab70: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED return -1; } return -1; } 800ab74: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800ab78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ab7c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800ab80: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800ab84: c3 a0 00 00 ret <== NOT EXECUTED 08006c58 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 8006c58: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006c5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006c60: 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); 8006c64: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 8006c68: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED 8006c6c: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED 8006c70: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED 8006c74: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 8006c78: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED 8006c7c: 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); 8006c80: fb ff ff 60 calli 8006a00 <== NOT EXECUTED va_end(arglist); return chars_written; } 8006c84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c88: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8006c8c: c3 a0 00 00 ret <== NOT EXECUTED 08000de4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000de4: 37 9c ff e4 addi sp,sp,-28 8000de8: 5b 8b 00 1c sw (sp+28),r11 8000dec: 5b 8c 00 18 sw (sp+24),r12 8000df0: 5b 8d 00 14 sw (sp+20),r13 8000df4: 5b 8e 00 10 sw (sp+16),r14 8000df8: 5b 8f 00 0c sw (sp+12),r15 8000dfc: 5b 90 00 08 sw (sp+8),r16 8000e00: 5b 9d 00 04 sw (sp+4),ra 8000e04: b8 20 60 00 mv r12,r1 8000e08: b8 40 80 00 mv r16,r2 8000e0c: b8 60 78 00 mv r15,r3 8000e10: b8 80 58 00 mv r11,r4 8000e14: b8 a0 70 00 mv r14,r5 /* * Verify Input parameters. */ if ( !pathname ) 8000e18: 5c 20 00 04 bne r1,r0,8000e28 rtems_set_errno_and_return_minus_one( EFAULT ); 8000e1c: f8 00 28 38 calli 800aefc <__errno> 8000e20: 34 02 00 0e mvi r2,14 8000e24: e0 00 00 04 bi 8000e34 if ( !pathloc ) 8000e28: 5c 80 00 06 bne r4,r0,8000e40 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000e2c: f8 00 28 34 calli 800aefc <__errno> <== NOT EXECUTED 8000e30: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000e34: 58 22 00 00 sw (r1+0),r2 8000e38: 34 01 ff ff mvi r1,-1 8000e3c: e0 00 00 1e bi 8000eb4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 8000e40: 40 21 00 00 lbu r1,(r1+0) 8000e44: 64 2d 00 5c cmpei r13,r1,92 8000e48: 64 22 00 2f cmpei r2,r1,47 8000e4c: b9 a2 68 00 or r13,r13,r2 8000e50: 5d a0 00 02 bne r13,r0,8000e58 8000e54: 5c 2d 00 0a bne r1,r13,8000e7c 8000e58: 78 01 08 01 mvhi r1,0x801 8000e5c: 38 21 c1 10 ori r1,r1,0xc110 8000e60: 28 24 00 00 lw r4,(r1+0) 8000e64: 34 03 00 14 mvi r3,20 8000e68: b9 60 08 00 mv r1,r11 8000e6c: 34 82 00 18 addi r2,r4,24 8000e70: f8 00 2a c9 calli 800b994 8000e74: 34 04 00 01 mvi r4,1 8000e78: e0 00 00 09 bi 8000e9c 8000e7c: 78 01 08 01 mvhi r1,0x801 8000e80: 38 21 c1 10 ori r1,r1,0xc110 8000e84: 28 24 00 00 lw r4,(r1+0) 8000e88: 34 03 00 14 mvi r3,20 8000e8c: b9 60 08 00 mv r1,r11 8000e90: 34 82 00 04 addi r2,r4,4 8000e94: f8 00 2a c0 calli 800b994 8000e98: b9 a0 20 00 mv r4,r13 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 8000e9c: ca 04 10 00 sub r2,r16,r4 8000ea0: b5 84 08 00 add r1,r12,r4 8000ea4: b9 e0 18 00 mv r3,r15 8000ea8: b9 60 20 00 mv r4,r11 8000eac: b9 c0 28 00 mv r5,r14 8000eb0: fb ff ff 93 calli 8000cfc pathnamelen - i, flags, pathloc, follow_link ); } 8000eb4: 2b 9d 00 04 lw ra,(sp+4) 8000eb8: 2b 8b 00 1c lw r11,(sp+28) 8000ebc: 2b 8c 00 18 lw r12,(sp+24) 8000ec0: 2b 8d 00 14 lw r13,(sp+20) 8000ec4: 2b 8e 00 10 lw r14,(sp+16) 8000ec8: 2b 8f 00 0c lw r15,(sp+12) 8000ecc: 2b 90 00 08 lw r16,(sp+8) 8000ed0: 37 9c 00 1c addi sp,sp,28 8000ed4: c3 a0 00 00 ret 08000cfc : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000cfc: 37 9c ff f0 addi sp,sp,-16 8000d00: 5b 8b 00 10 sw (sp+16),r11 8000d04: 5b 8c 00 0c sw (sp+12),r12 8000d08: 5b 8d 00 08 sw (sp+8),r13 8000d0c: 5b 9d 00 04 sw (sp+4),ra 8000d10: b8 a0 68 00 mv r13,r5 8000d14: b8 60 60 00 mv r12,r3 8000d18: b8 80 58 00 mv r11,r4 /* * Verify Input parameters. */ if ( !pathname ) 8000d1c: 5c 20 00 04 bne r1,r0,8000d2c rtems_set_errno_and_return_minus_one( EFAULT ); 8000d20: f8 00 28 77 calli 800aefc <__errno> <== NOT EXECUTED 8000d24: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000d28: e0 00 00 04 bi 8000d38 <== NOT EXECUTED if ( !pathloc ) 8000d2c: 5c 80 00 06 bne r4,r0,8000d44 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000d30: f8 00 28 73 calli 800aefc <__errno> <== NOT EXECUTED 8000d34: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000d38: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000d3c: 34 06 ff ff mvi r6,-1 <== NOT EXECUTED 8000d40: e0 00 00 22 bi 8000dc8 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 8000d44: 28 85 00 0c lw r5,(r4+12) 8000d48: 28 a6 00 00 lw r6,(r5+0) 8000d4c: 44 c0 00 18 be r6,r0,8000dac rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 8000d50: d8 c0 00 00 call r6 8000d54: b8 20 30 00 mv r6,r1 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 8000d58: 7d a5 00 00 cmpnei r5,r13,0 8000d5c: 64 21 00 00 cmpei r1,r1,0 8000d60: a0 25 28 00 and r5,r1,r5 8000d64: 44 a0 00 19 be r5,r0,8000dc8 if ( !pathloc->ops->node_type_h ){ 8000d68: 29 61 00 0c lw r1,(r11+12) 8000d6c: 28 24 00 10 lw r4,(r1+16) 8000d70: 44 80 00 0b be r4,r0,8000d9c rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 8000d74: b9 60 08 00 mv r1,r11 8000d78: d8 80 00 00 call r4 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 8000d7c: 34 21 ff fd addi r1,r1,-3 8000d80: 34 02 00 01 mvi r2,1 8000d84: 50 41 00 03 bgeu r2,r1,8000d90 8000d88: 34 06 00 00 mvi r6,0 8000d8c: e0 00 00 0f bi 8000dc8 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 8000d90: 29 61 00 0c lw r1,(r11+12) 8000d94: 28 24 00 34 lw r4,(r1+52) 8000d98: 5c 80 00 08 bne r4,r0,8000db8 rtems_filesystem_freenode( pathloc ); 8000d9c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000da0: 44 44 00 03 be r2,r4,8000dac <== NOT EXECUTED 8000da4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000da8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000dac: f8 00 28 54 calli 800aefc <__errno> <== NOT EXECUTED 8000db0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000db4: e3 ff ff e1 bi 8000d38 <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 8000db8: b9 60 08 00 mv r1,r11 8000dbc: b9 80 10 00 mv r2,r12 8000dc0: d8 80 00 00 call r4 8000dc4: b8 20 30 00 mv r6,r1 } } return result; } 8000dc8: b8 c0 08 00 mv r1,r6 8000dcc: 2b 9d 00 04 lw ra,(sp+4) 8000dd0: 2b 8b 00 10 lw r11,(sp+16) 8000dd4: 2b 8c 00 0c lw r12,(sp+12) 8000dd8: 2b 8d 00 08 lw r13,(sp+8) 8000ddc: 37 9c 00 10 addi sp,sp,16 8000de0: c3 a0 00 00 ret 08000b34 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8000b34: 37 9c ff d8 addi sp,sp,-40 8000b38: 5b 8b 00 10 sw (sp+16),r11 8000b3c: 5b 8c 00 0c sw (sp+12),r12 8000b40: 5b 8d 00 08 sw (sp+8),r13 8000b44: 5b 9d 00 04 sw (sp+4),ra /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b48: 78 0b 08 01 mvhi r11,0x801 8000b4c: 39 6b c1 10 ori r11,r11,0xc110 8000b50: 29 62 00 00 lw r2,(r11+0) 8000b54: 34 01 00 12 mvi r1,18 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b58: 34 0d 00 00 mvi r13,0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b5c: 58 41 00 2c sw (r2+44),r1 init_fs_mount_table(); 8000b60: f8 00 01 ae calli 8001218 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b64: 78 01 08 01 mvhi r1,0x801 8000b68: 38 21 a0 84 ori r1,r1,0xa084 8000b6c: 28 21 00 00 lw r1,(r1+0) 8000b70: 5c 2d 00 04 bne r1,r13,8000b80 rtems_fatal_error_occurred( 0xABCD0001 ); 8000b74: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000b78: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8000b7c: e0 00 00 0e bi 8000bb4 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 8000b80: 78 01 08 01 mvhi r1,0x801 8000b84: 38 21 c0 18 ori r1,r1,0xc018 8000b88: 28 24 00 00 lw r4,(r1+0) status = mount( 8000b8c: 37 81 00 28 addi r1,sp,40 8000b90: 28 82 00 00 lw r2,(r4+0) 8000b94: 28 85 00 0c lw r5,(r4+12) 8000b98: 28 83 00 04 lw r3,(r4+4) 8000b9c: 28 84 00 08 lw r4,(r4+8) 8000ba0: f8 00 01 a6 calli 8001238 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8000ba4: 34 02 ff ff mvi r2,-1 8000ba8: 5c 22 00 04 bne r1,r2,8000bb8 rtems_fatal_error_occurred( 0xABCD0002 ); 8000bac: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000bb0: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED 8000bb4: f8 00 06 aa calli 800265c <== NOT EXECUTED rtems_filesystem_link_counts = 0; 8000bb8: 29 61 00 00 lw r1,(r11+0) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bbc: 2b 82 00 28 lw r2,(sp+40) 8000bc0: 34 03 00 14 mvi r3,20 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8000bc4: 0c 2d 00 30 sh (r1+48),r13 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bc8: 34 42 00 1c addi r2,r2,28 8000bcc: 34 21 00 18 addi r1,r1,24 8000bd0: f8 00 2b 71 calli 800b994 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000bd4: 37 8c 00 14 addi r12,sp,20 8000bd8: 78 01 08 01 mvhi r1,0x801 8000bdc: b9 80 20 00 mv r4,r12 8000be0: b9 a0 28 00 mv r5,r13 8000be4: 34 02 00 01 mvi r2,1 8000be8: b9 a0 18 00 mv r3,r13 8000bec: 38 21 a2 e0 ori r1,r1,0xa2e0 8000bf0: f8 00 00 7d calli 8000de4 rtems_filesystem_root = loc; 8000bf4: 29 61 00 00 lw r1,(r11+0) 8000bf8: b9 80 10 00 mv r2,r12 8000bfc: 34 03 00 14 mvi r3,20 8000c00: 34 21 00 18 addi r1,r1,24 8000c04: f8 00 2b 64 calli 800b994 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c08: 78 01 08 01 mvhi r1,0x801 8000c0c: b9 a0 18 00 mv r3,r13 8000c10: b9 a0 28 00 mv r5,r13 8000c14: 34 02 00 01 mvi r2,1 8000c18: b9 80 20 00 mv r4,r12 8000c1c: 38 21 a2 e0 ori r1,r1,0xa2e0 8000c20: f8 00 00 71 calli 8000de4 rtems_filesystem_current = loc; 8000c24: 29 61 00 00 lw r1,(r11+0) 8000c28: b9 80 10 00 mv r2,r12 8000c2c: 34 03 00 14 mvi r3,20 8000c30: 34 21 00 04 addi r1,r1,4 8000c34: f8 00 2b 58 calli 800b994 * * 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); 8000c38: 78 01 08 01 mvhi r1,0x801 8000c3c: 38 21 a2 e4 ori r1,r1,0xa2e4 8000c40: 34 02 01 ff mvi r2,511 8000c44: f8 00 01 17 calli 80010a0 if ( status != 0 ) 8000c48: 44 20 00 04 be r1,r0,8000c58 rtems_fatal_error_occurred( 0xABCD0003 ); 8000c4c: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000c50: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED 8000c54: e3 ff ff d8 bi 8000bb4 <== NOT EXECUTED * 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. */ } 8000c58: 2b 9d 00 04 lw ra,(sp+4) 8000c5c: 2b 8b 00 10 lw r11,(sp+16) 8000c60: 2b 8c 00 0c lw r12,(sp+12) 8000c64: 2b 8d 00 08 lw r13,(sp+8) 8000c68: 37 9c 00 28 addi sp,sp,40 8000c6c: c3 a0 00 00 ret 08009258 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8009258: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 800925c: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 8009260: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED 8009264: c3 a0 00 00 ret <== NOT EXECUTED 080009e0 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 80009e0: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 80009e4: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 80009e8: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 80009ec: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 80009f0: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 80009f4: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 80009f8: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 80009fc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000a00: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8000a04: b8 20 78 00 mv r15,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 ); 8000a08: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED 8000a0c: f8 00 2e 0c calli 800c23c <== NOT EXECUTED 8000a10: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8000a14: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8000a18: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8000a1c: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8000a20: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8000a24: f8 00 00 f0 calli 8000de4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 8000a28: 2b 83 00 2c lw r3,(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 ); 8000a2c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED the_jnode = loc.node_access; 8000a30: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 8000a34: 28 62 00 10 lw r2,(r3+16) <== NOT EXECUTED 8000a38: 5c 40 00 0a bne r2,r0,8000a60 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000a3c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8000a40: 44 62 00 03 be r3,r2,8000a4c <== NOT EXECUTED 8000a44: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a48: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000a4c: f8 00 29 2c calli 800aefc <__errno> <== NOT EXECUTED 8000a50: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000a54: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a58: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a5c: e0 00 00 20 bi 8000adc <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 8000a60: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a64: d8 40 00 00 call r2 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 8000a68: 7c 22 00 02 cmpnei r2,r1,2 <== NOT EXECUTED 8000a6c: 7d ce 00 00 cmpnei r14,r14,0 <== NOT EXECUTED 8000a70: 2b 8c 00 2c lw r12,(sp+44) <== NOT EXECUTED 8000a74: b8 4e 70 00 or r14,r2,r14 <== NOT EXECUTED 8000a78: 45 c0 00 07 be r14,r0,8000a94 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000a7c: 45 80 00 15 be r12,r0,8000ad0 <== NOT EXECUTED 8000a80: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED 8000a84: 44 40 00 13 be r2,r0,8000ad0 <== NOT EXECUTED 8000a88: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a8c: d8 40 00 00 call r2 <== NOT EXECUTED 8000a90: e0 00 00 10 bi 8000ad0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 8000a94: 59 af 00 00 sw (r13+0),r15 <== NOT EXECUTED device_info->device_name_length = strlen( name ); 8000a98: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8000a9c: f8 00 2d e8 calli 800c23c <== NOT EXECUTED 8000aa0: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 8000aa4: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED 8000aa8: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 8000aac: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED 8000ab0: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000ab4: 45 8e 00 09 be r12,r14,8000ad8 <== NOT EXECUTED 8000ab8: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED 8000abc: 44 40 00 07 be r2,r0,8000ad8 <== NOT EXECUTED 8000ac0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000ac4: d8 40 00 00 call r2 <== NOT EXECUTED 8000ac8: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8000acc: e0 00 00 04 bi 8000adc <== NOT EXECUTED 8000ad0: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8000ad4: e0 00 00 02 bi 8000adc <== NOT EXECUTED 8000ad8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8000adc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ae0: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8000ae4: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8000ae8: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8000aec: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8000af0: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8000af4: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8000af8: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8000afc: c3 a0 00 00 ret <== NOT EXECUTED 08000ed8 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 8000ed8: 37 9c ff f8 addi sp,sp,-8 8000edc: 5b 8b 00 08 sw (sp+8),r11 8000ee0: 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) 8000ee4: 78 0b 08 01 mvhi r11,0x801 8000ee8: 39 6b c0 10 ori r11,r11,0xc010 8000eec: 29 61 00 00 lw r1,(r11+0) 8000ef0: 44 20 00 16 be r1,r0,8000f48 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 8000ef4: 34 02 00 48 mvi r2,72 8000ef8: f8 00 17 ea calli 8006ea0 8000efc: 78 02 08 01 mvhi r2,0x801 8000f00: 38 42 c6 9c ori r2,r2,0xc69c 8000f04: 58 41 00 00 sw (r2+0),r1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 8000f08: 5c 20 00 03 bne r1,r0,8000f14 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 8000f0c: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 8000f10: e0 00 00 18 bi 8000f70 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 8000f14: 78 02 08 01 mvhi r2,0x801 8000f18: 38 42 c6 a0 ori r2,r2,0xc6a0 8000f1c: 58 41 00 00 sw (r2+0),r1 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8000f20: 29 64 00 00 lw r4,(r11+0) 8000f24: 34 02 00 00 mvi r2,0 8000f28: e0 00 00 02 bi 8000f30 iop->data1 = iop + 1; 8000f2c: 58 21 ff f0 sw (r1+-16),r1 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++) 8000f30: 34 42 00 01 addi r2,r2,1 iop->data1 = iop + 1; 8000f34: b8 20 18 00 mv r3,r1 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++) 8000f38: 34 21 00 48 addi r1,r1,72 8000f3c: 54 82 ff fc bgu r4,r2,8000f2c iop->data1 = iop + 1; iop->data1 = NULL; 8000f40: 34 01 00 00 mvi r1,0 8000f44: 58 61 00 38 sw (r3+56),r1 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 8000f48: 78 01 4c 42 mvhi r1,0x4c42 8000f4c: 78 05 08 01 mvhi r5,0x801 8000f50: 34 03 00 54 mvi r3,84 8000f54: 38 21 49 4f ori r1,r1,0x494f 8000f58: 38 a5 c6 a4 ori r5,r5,0xc6a4 8000f5c: 34 02 00 01 mvi r2,1 8000f60: 34 04 00 00 mvi r4,0 8000f64: f8 00 03 ea calli 8001f0c 8000f68: 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 ) 8000f6c: 44 20 00 02 be r1,r0,8000f74 rtems_fatal_error_occurred( rc ); 8000f70: f8 00 05 bb calli 800265c <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 8000f74: 78 02 08 01 mvhi r2,0x801 8000f78: 38 42 c0 0c ori r2,r2,0xc00c 8000f7c: 28 41 00 00 lw r1,(r2+0) 8000f80: 44 23 00 02 be r1,r3,8000f88 (* rtems_fs_init_helper)(); 8000f84: d8 20 00 00 call r1 } 8000f88: 2b 9d 00 04 lw ra,(sp+4) 8000f8c: 2b 8b 00 08 lw r11,(sp+8) 8000f90: 37 9c 00 08 addi sp,sp,8 8000f94: c3 a0 00 00 ret 08028740 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 8028740: 37 9c ff d4 addi sp,sp,-44 8028744: 5b 8b 00 14 sw (sp+20),r11 8028748: 5b 8c 00 10 sw (sp+16),r12 802874c: 5b 8d 00 0c sw (sp+12),r13 8028750: 5b 8e 00 08 sw (sp+8),r14 8028754: 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); 8028758: 34 01 00 00 mvi r1,0 802875c: b8 20 10 00 mv r2,r1 8028760: 37 83 00 2c addi r3,sp,44 8028764: f8 00 05 bf calli 8029e60 8028768: b8 20 60 00 mv r12,r1 if (sc != RTEMS_SUCCESSFUL) return sc; 802876c: 5c 20 00 43 bne r1,r0,8028878 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 8028770: 78 0b 08 06 mvhi r11,0x806 8028774: 39 6b b2 f0 ori r11,r11,0xb2f0 8028778: 29 62 00 00 lw r2,(r11+0) 802877c: 78 01 08 06 mvhi r1,0x806 8028780: 38 21 ee e4 ori r1,r1,0xeee4 8028784: 5c 41 00 13 bne r2,r1,80287d0 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 8028788: 34 01 00 48 mvi r1,72 802878c: fb ff 7d 6f calli 8007d48 8028790: b8 20 68 00 mv r13,r1 if (!tmp) 8028794: 5c 20 00 03 bne r1,r0,80287a0 8028798: 34 0c 00 1a mvi r12,26 <== NOT EXECUTED 802879c: e0 00 00 37 bi 8028878 <== NOT EXECUTED #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); 80287a0: 78 03 08 02 mvhi r3,0x802 80287a4: 38 63 86 14 ori r3,r3,0x8614 80287a8: b9 80 08 00 mv r1,r12 80287ac: b9 60 10 00 mv r2,r11 80287b0: f8 00 06 d3 calli 802a2fc 80287b4: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) { 80287b8: 44 20 00 05 be r1,r0,80287cc /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 80287bc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80287c0: fb ff 7b 83 calli 80075cc <== NOT EXECUTED 80287c4: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED return sc; 80287c8: e0 00 00 2c bi 8028878 <== NOT EXECUTED } rtems_current_user_env = tmp; 80287cc: 59 6d 00 00 sw (r11+0),r13 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 80287d0: 78 0b 08 06 mvhi r11,0x806 80287d4: 39 6b b2 f0 ori r11,r11,0xb2f0 80287d8: 29 6d 00 00 lw r13,(r11+0) 80287dc: 78 02 08 06 mvhi r2,0x806 80287e0: 38 42 ee e4 ori r2,r2,0xeee4 80287e4: 34 03 00 48 mvi r3,72 80287e8: b9 a0 08 00 mv r1,r13 80287ec: f8 00 76 f0 calli 80463ac rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 80287f0: 78 01 08 06 mvhi r1,0x806 80287f4: 38 21 ee d8 ori r1,r1,0xeed8 80287f8: 28 22 00 00 lw r2,(r1+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*/ 80287fc: 2b 81 00 2c lw r1,(sp+44) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 8028800: 34 03 00 14 mvi r3,20 8028804: 34 42 00 1c addi r2,r2,28 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 8028808: 59 a1 00 00 sw (r13+0),r1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802880c: 35 a1 00 18 addi r1,r13,24 8028810: f8 00 76 e7 calli 80463ac * 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); 8028814: 37 8d 00 18 addi r13,sp,24 8028818: 34 03 00 00 mvi r3,0 802881c: 78 01 08 06 mvhi r1,0x806 8028820: b8 60 28 00 mv r5,r3 8028824: b9 a0 20 00 mv r4,r13 8028828: 34 02 00 01 mvi r2,1 802882c: 38 21 a1 28 ori r1,r1,0xa128 8028830: fb ff 7b 2a calli 80074d8 rtems_filesystem_root = loc; 8028834: 29 61 00 00 lw r1,(r11+0) 8028838: b9 a0 10 00 mv r2,r13 802883c: 34 03 00 14 mvi r3,20 8028840: 34 21 00 18 addi r1,r1,24 8028844: f8 00 76 da calli 80463ac rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8028848: 34 03 00 00 mvi r3,0 802884c: 78 01 08 06 mvhi r1,0x806 8028850: 34 02 00 01 mvi r2,1 8028854: b8 60 28 00 mv r5,r3 8028858: 38 21 a1 28 ori r1,r1,0xa128 802885c: b9 a0 20 00 mv r4,r13 8028860: fb ff 7b 1e calli 80074d8 rtems_filesystem_current = loc; 8028864: 29 61 00 00 lw r1,(r11+0) 8028868: b9 a0 10 00 mv r2,r13 802886c: 34 03 00 14 mvi r3,20 8028870: 34 21 00 04 addi r1,r1,4 8028874: f8 00 76 ce calli 80463ac return RTEMS_SUCCESSFUL; } 8028878: b9 80 08 00 mv r1,r12 802887c: 2b 9d 00 04 lw ra,(sp+4) 8028880: 2b 8b 00 14 lw r11,(sp+20) 8028884: 2b 8c 00 10 lw r12,(sp+16) 8028888: 2b 8d 00 0c lw r13,(sp+12) 802888c: 2b 8e 00 08 lw r14,(sp+8) 8028890: 37 9c 00 2c addi sp,sp,44 8028894: c3 a0 00 00 ret 08028678 : * 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) { 8028678: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 802867c: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8028680: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8028684: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028688: b8 20 60 00 mv r12,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); 802868c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8028690: 37 83 00 10 addi r3,sp,16 <== NOT EXECUTED 8028694: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028698: f8 00 05 f2 calli 8029e60 <== NOT EXECUTED 802869c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 80286a0: 5c 20 00 22 bne r1,r0,8028728 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 80286a4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80286a8: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 80286ac: 28 4b 00 00 lw r11,(r2+0) <== NOT EXECUTED 80286b0: 2b 83 00 10 lw r3,(sp+16) <== NOT EXECUTED 80286b4: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 80286b8: 5c 83 00 06 bne r4,r3,80286d0 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 80286bc: f8 00 07 40 calli 802a3bc <== NOT EXECUTED 80286c0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 80286c4: 5c 20 00 19 bne r1,r0,8028728 <== NOT EXECUTED free_user_env(tmp); 80286c8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80286cc: fb ff ff d2 calli 8028614 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 80286d0: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 80286d4: 39 6b b2 f0 ori r11,r11,0xb2f0 <== NOT EXECUTED 80286d8: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 80286dc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80286e0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80286e4: f8 00 07 59 calli 802a448 <== NOT EXECUTED 80286e8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 80286ec: 5c 20 00 0a bne r1,r0,8028714 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 80286f0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80286f4: 38 63 86 14 ori r3,r3,0x8614 <== NOT EXECUTED 80286f8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80286fc: f8 00 07 00 calli 802a2fc <== NOT EXECUTED 8028700: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8028704: 5c 20 00 04 bne r1,r0,8028714 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 8028708: 2b 81 00 14 lw r1,(sp+20) <== NOT EXECUTED 802870c: 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; 8028710: e0 00 00 06 bi 8028728 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 8028714: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8028718: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802871c: 38 21 b2 f0 ori r1,r1,0xb2f0 <== NOT EXECUTED 8028720: 38 42 ee e4 ori r2,r2,0xeee4 <== NOT EXECUTED 8028724: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED return sc; } 8028728: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 802872c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028730: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8028734: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8028738: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 802873c: c3 a0 00 00 ret <== NOT EXECUTED 08007284 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007284: 37 9c ff f8 addi sp,sp,-8 8007288: 5b 8b 00 08 sw (sp+8),r11 800728c: 5b 9d 00 04 sw (sp+4),ra uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007290: 34 03 00 06 mvi r3,6 8007294: 20 24 00 06 andi r4,r1,0x6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007298: b8 20 58 00 mv r11,r1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 800729c: 34 02 00 02 mvi r2,2 80072a0: 44 83 00 07 be r4,r3,80072bc fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 80072a4: a0 22 18 00 and r3,r1,r2 80072a8: 34 02 00 00 mvi r2,0 80072ac: 5c 62 00 04 bne r3,r2,80072bc 80072b0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80072b4: fb ff e3 f7 calli 8000290 <__lshrsi3> <== NOT EXECUTED 80072b8: 20 22 00 01 andi r2,r1,0x1 <== NOT EXECUTED 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 ) { 80072bc: 21 61 00 01 andi r1,r11,0x1 80072c0: 44 20 00 02 be r1,r0,80072c8 fcntl_flags |= O_NONBLOCK; 80072c4: 38 42 40 00 ori r2,r2,0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 80072c8: 21 61 02 00 andi r1,r11,0x200 80072cc: 44 20 00 02 be r1,r0,80072d4 fcntl_flags |= O_APPEND; 80072d0: 38 42 00 08 ori r2,r2,0x8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 80072d4: 21 6b 04 00 andi r11,r11,0x400 80072d8: 45 60 00 02 be r11,r0,80072e0 fcntl_flags |= O_CREAT; 80072dc: 38 42 02 00 ori r2,r2,0x200 } return fcntl_flags; } 80072e0: b8 40 08 00 mv r1,r2 80072e4: 2b 9d 00 04 lw ra,(sp+4) 80072e8: 2b 8b 00 08 lw r11,(sp+8) 80072ec: 37 9c 00 08 addi sp,sp,8 80072f0: c3 a0 00 00 ret 08007e58 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8007e58: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8007e5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 8007e60: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8007e64: 38 63 b0 1c ori r3,r3,0xb01c <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8007e68: b8 20 10 00 mv r2,r1 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 8007e6c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8007e70: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8007e74: f8 00 10 94 calli 800c0c4 <_Protected_heap_Get_block_size> <== NOT EXECUTED 8007e78: 44 20 00 0b be r1,r0,8007ea4 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 8007e7c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8007e80: 38 21 ee a8 ori r1,r1,0xeea8 <== NOT EXECUTED 8007e84: 2b 83 00 08 lw r3,(sp+8) <== NOT EXECUTED 8007e88: 28 22 00 2c lw r2,(r1+44) <== NOT EXECUTED 8007e8c: 28 24 00 28 lw r4,(r1+40) <== NOT EXECUTED 8007e90: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8007e94: f4 62 18 00 cmpgu r3,r3,r2 <== NOT EXECUTED 8007e98: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 8007e9c: b4 64 10 00 add r2,r3,r4 <== NOT EXECUTED 8007ea0: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED } } 8007ea4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007ea8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8007eac: c3 a0 00 00 ret <== NOT EXECUTED 08007eb0 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 8007eb0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8007eb4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8007eb8: 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 ) 8007ebc: 44 20 00 17 be r1,r0,8007f18 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 8007ec0: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8007ec4: 38 63 b0 1c ori r3,r3,0xb01c <== NOT EXECUTED 8007ec8: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 8007ecc: 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); 8007ed0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 8007ed4: 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); 8007ed8: f8 00 10 7b calli 800c0c4 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 8007edc: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8007ee0: 38 21 ee a8 ori r1,r1,0xeea8 <== NOT EXECUTED 8007ee4: 2b 84 00 08 lw r4,(sp+8) <== NOT EXECUTED 8007ee8: 28 22 00 24 lw r2,(r1+36) <== NOT EXECUTED 8007eec: 28 26 00 20 lw r6,(r1+32) <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8007ef0: 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); 8007ef4: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8007ef8: 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) 8007efc: 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); 8007f00: b4 86 20 00 add r4,r4,r6 <== NOT EXECUTED 8007f04: 58 24 00 20 sw (r1+32),r4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8007f08: 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); 8007f0c: 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) 8007f10: 50 a3 00 02 bgeu r5,r3,8007f18 <== NOT EXECUTED s->max_depth = current_depth; 8007f14: 58 23 00 18 sw (r1+24),r3 <== NOT EXECUTED } 8007f18: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007f1c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8007f20: c3 a0 00 00 ret <== NOT EXECUTED 08007f24 : #include #include static void rtems_malloc_statistics_initialize( void ) { 8007f24: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007f28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 8007f2c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8007f30: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8007f34: 34 03 00 30 mvi r3,48 <== NOT EXECUTED 8007f38: 38 21 ee a8 ori r1,r1,0xeea8 <== NOT EXECUTED 8007f3c: f8 00 f9 e6 calli 80466d4 <== NOT EXECUTED } 8007f40: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007f44: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007f48: c3 a0 00 00 ret <== NOT EXECUTED 0800d260 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800d260: 37 9c ff f0 addi sp,sp,-16 800d264: 5b 8b 00 10 sw (sp+16),r11 800d268: 5b 8c 00 0c sw (sp+12),r12 800d26c: 5b 8d 00 08 sw (sp+8),r13 800d270: 5b 9d 00 04 sw (sp+4),ra 800d274: b8 20 58 00 mv r11,r1 800d278: b8 40 60 00 mv r12,r2 800d27c: b8 60 68 00 mv r13,r3 void *return_this; /* * Parameter error checks */ if ( !pointer ) 800d280: 44 20 00 1f be r1,r0,800d2fc *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800d284: 78 01 08 02 mvhi r1,0x802 800d288: 38 21 3a 50 ori r1,r1,0x3a50 800d28c: 28 22 00 00 lw r2,(r1+0) * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; 800d290: 34 01 00 00 mvi r1,0 800d294: 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()) && 800d298: 34 01 00 03 mvi r1,3 800d29c: 5c 41 00 03 bne r2,r1,800d2a8 800d2a0: fb ff d6 44 calli 8002bb0 800d2a4: 44 20 00 16 be r1,r0,800d2fc /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800d2a8: fb ff d6 5d calli 8002c1c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 800d2ac: 78 01 08 02 mvhi r1,0x802 800d2b0: 38 21 30 1c ori r1,r1,0x301c 800d2b4: 28 21 00 00 lw r1,(r1+0) 800d2b8: b9 a0 10 00 mv r2,r13 800d2bc: b9 80 18 00 mv r3,r12 800d2c0: 34 04 00 00 mvi r4,0 800d2c4: fb ff e3 77 calli 80060a0 <_Protected_heap_Allocate_aligned_with_boundary> 800d2c8: b8 20 60 00 mv r12,r1 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 800d2cc: 34 02 00 0c mvi r2,12 800d2d0: 44 20 00 0c be r1,r0,800d300 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 800d2d4: 78 02 08 02 mvhi r2,0x802 800d2d8: 38 42 36 30 ori r2,r2,0x3630 800d2dc: 28 41 00 00 lw r1,(r2+0) 800d2e0: 44 20 00 04 be r1,r0,800d2f0 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 800d2e4: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800d2e8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800d2ec: 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; 800d2f0: 59 6c 00 00 sw (r11+0),r12 800d2f4: 34 02 00 00 mvi r2,0 return 0; 800d2f8: e0 00 00 02 bi 800d300 800d2fc: 34 02 00 16 mvi r2,22 } 800d300: b8 40 08 00 mv r1,r2 800d304: 2b 9d 00 04 lw ra,(sp+4) 800d308: 2b 8b 00 10 lw r11,(sp+16) 800d30c: 2b 8c 00 0c lw r12,(sp+12) 800d310: 2b 8d 00 08 lw r13,(sp+8) 800d314: 37 9c 00 10 addi sp,sp,16 800d318: c3 a0 00 00 ret 08006c0c : void rtems_panic( const char *printf_format, ... ) { 8006c0c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8006c10: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006c14: b8 20 48 00 mv r9,r1 <== NOT EXECUTED 8006c18: 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); 8006c1c: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 8006c20: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED 8006c24: 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); 8006c28: b9 20 10 00 mv r2,r9 <== NOT EXECUTED 8006c2c: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED 8006c30: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 8006c34: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8006c38: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED 8006c3c: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED 8006c40: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 8006c44: 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); 8006c48: fb ff ff 6e calli 8006a00 <== NOT EXECUTED va_end(arglist); } 8006c4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c50: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8006c54: c3 a0 00 00 ret <== NOT EXECUTED 08009334 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 8009334: 37 9c ff f8 addi sp,sp,-8 8009338: 5b 8b 00 08 sw (sp+8),r11 800933c: 5b 9d 00 04 sw (sp+4),ra if (!rtems_pipe_configured) 8009340: 78 01 08 01 mvhi r1,0x801 8009344: 38 21 c6 0c ori r1,r1,0xc60c 8009348: 40 21 00 00 lbu r1,(r1+0) 800934c: 44 20 00 11 be r1,r0,8009390 return; if (rtems_pipe_semaphore) 8009350: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 8009354: 38 a5 c6 28 ori r5,r5,0xc628 <== NOT EXECUTED 8009358: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED 800935c: 5d 60 00 0d bne r11,r0,8009390 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 8009360: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 8009364: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED 8009368: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800936c: 34 03 00 54 mvi r3,84 <== NOT EXECUTED 8009370: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8009374: fb ff e2 e6 calli 8001f0c <== 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) 8009378: 44 2b 00 02 be r1,r11,8009380 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 800937c: fb ff e4 b8 calli 800265c <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 8009380: f8 00 03 c3 calli 800a28c <== NOT EXECUTED rtems_pipe_no = now; 8009384: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009388: 38 42 c6 2e ori r2,r2,0xc62e <== NOT EXECUTED 800938c: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED } 8009390: 2b 9d 00 04 lw ra,(sp+4) 8009394: 2b 8b 00 08 lw r11,(sp+8) 8009398: 37 9c 00 08 addi sp,sp,8 800939c: c3 a0 00 00 ret 0803c6f4 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 803c6f4: 37 9c ff e8 addi sp,sp,-24 803c6f8: 5b 8b 00 14 sw (sp+20),r11 803c6fc: 5b 8c 00 10 sw (sp+16),r12 803c700: 5b 8d 00 0c sw (sp+12),r13 803c704: 5b 8e 00 08 sw (sp+8),r14 803c708: 5b 9d 00 04 sw (sp+4),ra 803c70c: b8 20 70 00 mv r14,r1 803c710: 78 01 08 06 mvhi r1,0x806 803c714: b8 40 60 00 mv r12,r2 803c718: 38 21 f4 9c ori r1,r1,0xf49c 803c71c: b9 c0 10 00 mv r2,r14 803c720: 37 83 00 18 addi r3,sp,24 803c724: fb ff 3d 77 calli 800bd00 <_Objects_Get> 803c728: 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 ) { 803c72c: 2b 81 00 18 lw r1,(sp+24) 803c730: 5c 20 00 61 bne r1,r0,803c8b4 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 803c734: 78 03 08 06 mvhi r3,0x806 803c738: 38 63 f0 e0 ori r3,r3,0xf0e0 803c73c: 28 61 00 00 lw r1,(r3+0) 803c740: 29 62 00 40 lw r2,(r11+64) 803c744: 44 41 00 04 be r2,r1,803c754 _Thread_Enable_dispatch(); 803c748: fb ff 40 19 calli 800c7ac <_Thread_Enable_dispatch> 803c74c: 34 0b 00 17 mvi r11,23 return RTEMS_NOT_OWNER_OF_RESOURCE; 803c750: e0 00 00 5a bi 803c8b8 } if ( length == RTEMS_PERIOD_STATUS ) { 803c754: 5d 80 00 0d bne r12,r0,803c788 switch ( the_period->state ) { 803c758: 29 61 00 38 lw r1,(r11+56) 803c75c: 34 02 00 04 mvi r2,4 803c760: 50 41 00 03 bgeu r2,r1,803c76c 803c764: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 803c768: e0 00 00 51 bi 803c8ac <== NOT EXECUTED 803c76c: 78 0b 08 06 mvhi r11,0x806 803c770: 34 02 00 02 mvi r2,2 803c774: 39 6b 87 04 ori r11,r11,0x8704 803c778: fb ff 12 70 calli 8001138 <__ashlsi3> 803c77c: b5 61 08 00 add r1,r11,r1 803c780: 28 2b 00 00 lw r11,(r1+0) 803c784: e0 00 00 4a bi 803c8ac } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 803c788: 90 00 68 00 rcsr r13,IE 803c78c: 34 01 ff fe mvi r1,-2 803c790: a1 a1 08 00 and r1,r13,r1 803c794: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 803c798: 29 63 00 38 lw r3,(r11+56) 803c79c: 34 01 00 02 mvi r1,2 803c7a0: 44 61 00 18 be r3,r1,803c800 803c7a4: 34 01 00 04 mvi r1,4 803c7a8: 44 61 00 35 be r3,r1,803c87c 803c7ac: 5c 60 00 42 bne r3,r0,803c8b4 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 803c7b0: d0 0d 00 00 wcsr IE,r13 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 803c7b4: b9 60 08 00 mv r1,r11 803c7b8: fb ff ff 31 calli 803c47c <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 803c7bc: 78 03 08 03 mvhi r3,0x803 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 803c7c0: 34 0d 00 00 mvi r13,0 the_watchdog->routine = routine; 803c7c4: 38 63 c8 d8 ori r3,r3,0xc8d8 the_period->state = RATE_MONOTONIC_ACTIVE; 803c7c8: 34 02 00 02 mvi r2,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803c7cc: 78 01 08 06 mvhi r1,0x806 803c7d0: 59 62 00 38 sw (r11+56),r2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 803c7d4: 59 63 00 2c sw (r11+44),r3 the_watchdog->id = id; 803c7d8: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 803c7dc: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803c7e0: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 803c7e4: 59 6d 00 18 sw (r11+24),r13 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 803c7e8: 59 6d 00 34 sw (r11+52),r13 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 803c7ec: 59 6c 00 3c sw (r11+60),r12 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803c7f0: 38 21 f1 00 ori r1,r1,0xf100 803c7f4: fb ff 44 cd calli 800db28 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 803c7f8: b9 a0 58 00 mv r11,r13 803c7fc: e0 00 00 2c bi 803c8ac case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 803c800: b9 60 08 00 mv r1,r11 803c804: fb ff ff 7c calli 803c5f4 <_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; 803c808: 34 01 00 01 mvi r1,1 the_period->next_length = length; 803c80c: 59 6c 00 3c sw (r11+60),r12 /* * 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; 803c810: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 803c814: d0 0d 00 00 wcsr IE,r13 _Thread_Executing->Wait.id = the_period->Object.id; 803c818: 78 01 08 06 mvhi r1,0x806 803c81c: 38 21 f0 e0 ori r1,r1,0xf0e0 803c820: 28 21 00 00 lw r1,(r1+0) 803c824: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803c828: 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; 803c82c: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803c830: fb ff 42 97 calli 800d28c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 803c834: 90 00 08 00 rcsr r1,IE 803c838: 34 02 ff fe mvi r2,-2 803c83c: a0 22 10 00 and r2,r1,r2 803c840: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 803c844: 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; 803c848: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 803c84c: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 803c850: 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 ) 803c854: 34 01 00 03 mvi r1,3 803c858: 5c 41 00 06 bne r2,r1,803c870 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803c85c: 78 01 08 06 mvhi r1,0x806 803c860: 38 21 f0 e0 ori r1,r1,0xf0e0 803c864: 28 21 00 00 lw r1,(r1+0) 803c868: 34 02 40 00 mvi r2,16384 803c86c: fb ff ba 87 calli 802b288 <_Thread_Clear_state> _Thread_Enable_dispatch(); 803c870: fb ff 3f cf calli 800c7ac <_Thread_Enable_dispatch> 803c874: 34 0b 00 00 mvi r11,0 return RTEMS_SUCCESSFUL; 803c878: e0 00 00 10 bi 803c8b8 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 803c87c: b9 60 08 00 mv r1,r11 803c880: fb ff ff 5d calli 803c5f4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 803c884: d0 0d 00 00 wcsr IE,r13 the_period->state = RATE_MONOTONIC_ACTIVE; 803c888: 34 02 00 02 mvi r2,2 803c88c: 78 01 08 06 mvhi r1,0x806 803c890: 59 62 00 38 sw (r11+56),r2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 803c894: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803c898: 35 62 00 10 addi r2,r11,16 the_period->next_length = length; 803c89c: 59 6c 00 3c sw (r11+60),r12 803c8a0: 38 21 f1 00 ori r1,r1,0xf100 803c8a4: fb ff 44 a1 calli 800db28 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 803c8a8: 34 0b 00 06 mvi r11,6 803c8ac: fb ff 3f c0 calli 800c7ac <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 803c8b0: e0 00 00 02 bi 803c8b8 803c8b4: 34 0b 00 04 mvi r11,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 803c8b8: b9 60 08 00 mv r1,r11 803c8bc: 2b 9d 00 04 lw ra,(sp+4) 803c8c0: 2b 8b 00 14 lw r11,(sp+20) 803c8c4: 2b 8c 00 10 lw r12,(sp+16) 803c8c8: 2b 8d 00 0c lw r13,(sp+12) 803c8cc: 2b 8e 00 08 lw r14,(sp+8) 803c8d0: 37 9c 00 18 addi sp,sp,24 803c8d4: c3 a0 00 00 ret 080056c8 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 80056c8: 37 9c ff f4 addi sp,sp,-12 80056cc: 5b 9b 00 08 sw (sp+8),fp 80056d0: 34 1b 00 0c mvi fp,12 80056d4: b7 7c d8 00 add fp,fp,sp 80056d8: 5b 8b 00 0c sw (sp+12),r11 80056dc: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 80056e0: 78 01 08 06 mvhi r1,0x806 80056e4: 38 21 f0 e0 ori r1,r1,0xf0e0 80056e8: 28 22 00 00 lw r2,(r1+0) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 80056ec: 28 41 00 c4 lw r1,(r2+196) 80056f0: 53 61 00 03 bgeu fp,r1,80056fc 80056f4: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80056f8: e0 00 00 04 bi 8005708 <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 80056fc: 28 4b 00 c0 lw r11,(r2+192) 8005700: b4 2b 58 00 add r11,r1,r11 8005704: f1 7b 58 00 cmpgeu r11,r11,fp /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 8005708: 78 02 08 06 mvhi r2,0x806 800570c: 38 42 c4 a8 ori r2,r2,0xc4a8 8005710: 28 43 00 00 lw r3,(r2+0) 8005714: 34 02 00 01 mvi r2,1 8005718: 44 60 00 07 be r3,r0,8005734 pattern_ok = (!memcmp( 800571c: 78 02 08 06 mvhi r2,0x806 8005720: 38 42 ee 78 ori r2,r2,0xee78 8005724: 34 21 00 08 addi r1,r1,8 8005728: 34 03 00 10 mvi r3,16 800572c: f8 01 03 00 calli 804632c 8005730: 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 ) 8005734: 45 60 00 03 be r11,r0,8005740 8005738: 34 01 00 00 mvi r1,0 800573c: 5c 41 00 06 bne r2,r1,8005754 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 8005740: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005744: 38 21 f0 e0 ori r1,r1,0xf0e0 <== NOT EXECUTED 8005748: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800574c: fb ff ff b1 calli 8005610 <== NOT EXECUTED 8005750: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return true; } 8005754: 2b 9d 00 04 lw ra,(sp+4) 8005758: 2b 8b 00 0c lw r11,(sp+12) 800575c: 2b 9b 00 08 lw fp,(sp+8) 8005760: 37 9c 00 0c addi sp,sp,12 8005764: c3 a0 00 00 ret 080055ec : void rtems_stack_checker_report_usage( void ) { 80055ec: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80055f0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 80055f4: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 80055f8: 38 42 89 e0 ori r2,r2,0x89e0 <== NOT EXECUTED 80055fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8005600: fb ff ff d7 calli 800555c <== NOT EXECUTED } 8005604: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8005608: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800560c: c3 a0 00 00 ret <== NOT EXECUTED 0800555c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 800555c: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8005560: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005564: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8005568: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 800556c: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8005570: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED print_context = context; 8005574: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED print_handler = print; 8005578: 78 0c 08 06 mvhi r12,0x806 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 800557c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED print_context = context; 8005580: 39 6b c4 ac ori r11,r11,0xc4ac <== NOT EXECUTED print_handler = print; 8005584: 39 8c c4 b0 ori r12,r12,0xc4b0 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 8005588: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800558c: 38 42 06 e0 ori r2,r2,0x6e0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 8005590: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = print; 8005594: 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 ) { 8005598: b8 20 70 00 mv r14,r1 <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 800559c: d9 a0 00 00 call r13 <== NOT EXECUTED (*print)( context, 80055a0: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80055a4: 38 42 06 f8 ori r2,r2,0x6f8 <== NOT EXECUTED 80055a8: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 80055ac: 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 ); 80055b0: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED 80055b4: 38 21 53 d0 ori r1,r1,0x53d0 <== NOT EXECUTED 80055b8: f8 00 17 c3 calli 800b4c4 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 80055bc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80055c0: fb ff ff 84 calli 80053d0 <== NOT EXECUTED print_context = NULL; 80055c4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED print_handler = NULL; 80055c8: 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; 80055cc: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = NULL; } 80055d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80055d4: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80055d8: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 80055dc: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 80055e0: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 80055e4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80055e8: c3 a0 00 00 ret <== NOT EXECUTED 08005768 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 8005768: 37 9c ff f0 addi sp,sp,-16 800576c: 5b 9b 00 08 sw (sp+8),fp 8005770: 34 1b 00 10 mvi fp,16 8005774: b7 7c d8 00 add fp,fp,sp 8005778: 5b 8b 00 10 sw (sp+16),r11 800577c: 5b 8c 00 0c sw (sp+12),r12 8005780: 5b 9d 00 04 sw (sp+4),ra 8005784: 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; 8005788: 28 21 00 c4 lw r1,(r1+196) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 800578c: 53 61 00 03 bgeu fp,r1,8005798 8005790: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8005794: e0 00 00 04 bi 80057a4 <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 8005798: 29 6c 00 c0 lw r12,(r11+192) 800579c: b4 2c 60 00 add r12,r1,r12 80057a0: f1 9b 60 00 cmpgeu r12,r12,fp /* * 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, 80057a4: 78 02 08 06 mvhi r2,0x806 80057a8: 38 42 ee 78 ori r2,r2,0xee78 80057ac: 34 21 00 08 addi r1,r1,8 80057b0: 34 03 00 10 mvi r3,16 80057b4: f8 01 02 de calli 804632c 80057b8: 64 22 00 00 cmpei r2,r1,0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 80057bc: 45 80 00 02 be r12,r0,80057c4 80057c0: 5c 40 00 03 bne r2,r0,80057cc Stack_check_report_blown_task( running, pattern_ok ); 80057c4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80057c8: fb ff ff 92 calli 8005610 <== NOT EXECUTED } } 80057cc: 2b 9d 00 04 lw ra,(sp+4) 80057d0: 2b 8b 00 10 lw r11,(sp+16) 80057d4: 2b 8c 00 0c lw r12,(sp+12) 80057d8: 2b 9b 00 08 lw fp,(sp+8) 80057dc: 37 9c 00 10 addi sp,sp,16 80057e0: c3 a0 00 00 ret 0801d008 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801d008: 37 9c ff e8 addi sp,sp,-24 801d00c: 5b 8b 00 14 sw (sp+20),r11 801d010: 5b 8c 00 10 sw (sp+16),r12 801d014: 5b 8d 00 0c sw (sp+12),r13 801d018: 5b 8e 00 08 sw (sp+8),r14 801d01c: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801d020: 34 0c 00 00 mvi r12,0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801d024: b8 40 58 00 mv r11,r2 801d028: b8 20 68 00 mv r13,r1 801d02c: b8 60 70 00 mv r14,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801d030: 34 04 00 09 mvi r4,9 801d034: 44 4c 00 18 be r2,r12,801d094 return RTEMS_INVALID_ADDRESS; errno = 0; 801d038: f8 00 96 3b calli 8042924 <__errno> 801d03c: 58 2c 00 00 sw (r1+0),r12 *n = 0; 801d040: 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 ); 801d044: b9 a0 08 00 mv r1,r13 801d048: 37 82 00 18 addi r2,sp,24 801d04c: 34 03 00 10 mvi r3,16 801d050: f8 00 b9 4f calli 804b58c 801d054: 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 ) 801d058: 45 c0 00 03 be r14,r0,801d064 *endptr = end; 801d05c: 2b 81 00 18 lw r1,(sp+24) 801d060: 59 c1 00 00 sw (r14+0),r1 /* nothing was converted */ if ( end == s ) 801d064: 2b 81 00 18 lw r1,(sp+24) 801d068: 34 04 00 0b mvi r4,11 801d06c: 44 2d 00 0a be r1,r13,801d094 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801d070: 34 01 ff ff mvi r1,-1 801d074: 5d 81 00 06 bne r12,r1,801d08c 801d078: f8 00 96 2b calli 8042924 <__errno> <== NOT EXECUTED 801d07c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801d080: 34 01 00 22 mvi r1,34 <== NOT EXECUTED 801d084: 34 04 00 0a mvi r4,10 <== NOT EXECUTED 801d088: 44 41 00 03 be r2,r1,801d094 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 801d08c: 59 6c 00 00 sw (r11+0),r12 801d090: 34 04 00 00 mvi r4,0 return RTEMS_SUCCESSFUL; } 801d094: b8 80 08 00 mv r1,r4 801d098: 2b 9d 00 04 lw ra,(sp+4) 801d09c: 2b 8b 00 14 lw r11,(sp+20) 801d0a0: 2b 8c 00 10 lw r12,(sp+16) 801d0a4: 2b 8d 00 0c lw r13,(sp+12) 801d0a8: 2b 8e 00 08 lw r14,(sp+8) 801d0ac: 37 9c 00 18 addi sp,sp,24 801d0b0: c3 a0 00 00 ret 08003554 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003554: 34 03 00 09 mvi r3,9 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 8003558: b8 20 10 00 mv r2,r1 int baud_index; switch (termios_baud) { 800355c: 44 23 00 38 be r1,r3,800363c 8003560: 48 23 00 18 bg r1,r3,80035c0 8003564: 34 03 00 04 mvi r3,4 8003568: 44 23 00 35 be r1,r3,800363c 800356c: 48 23 00 0b bg r1,r3,8003598 8003570: 34 02 00 01 mvi r2,1 8003574: 44 22 00 32 be r1,r2,800363c 8003578: 48 22 00 03 bg r1,r2,8003584 800357c: 5c 20 00 2f bne r1,r0,8003638 8003580: c3 a0 00 00 ret <== NOT EXECUTED 8003584: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003588: 44 22 00 2d be r1,r2,800363c <== NOT EXECUTED 800358c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8003590: 5c 22 00 2a bne r1,r2,8003638 <== NOT EXECUTED 8003594: c3 a0 00 00 ret <== NOT EXECUTED 8003598: 34 03 00 06 mvi r3,6 <== NOT EXECUTED 800359c: 44 23 00 28 be r1,r3,800363c <== 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; 80035a0: 34 01 00 05 mvi r1,5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80035a4: 48 62 00 26 bg r3,r2,800363c <== 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; 80035a8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80035ac: 34 02 00 07 mvi r2,7 <== NOT EXECUTED 80035b0: 44 22 00 23 be r1,r2,800363c <== NOT EXECUTED 80035b4: 34 02 00 08 mvi r2,8 <== NOT EXECUTED 80035b8: 5c 22 00 20 bne r1,r2,8003638 <== NOT EXECUTED 80035bc: c3 a0 00 00 ret <== NOT EXECUTED 80035c0: 34 03 00 0e mvi r3,14 <== NOT EXECUTED 80035c4: 44 23 00 1e be r1,r3,800363c <== NOT EXECUTED 80035c8: 48 23 00 0b bg r1,r3,80035f4 <== NOT EXECUTED 80035cc: 34 03 00 0b mvi r3,11 <== NOT EXECUTED 80035d0: 44 23 00 1b be r1,r3,800363c <== 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; 80035d4: 34 01 00 0a mvi r1,10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80035d8: 48 62 00 19 bg r3,r2,800363c <== 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; 80035dc: b8 40 08 00 mv r1,r2 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80035e0: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80035e4: 44 22 00 16 be r1,r2,800363c <== NOT EXECUTED 80035e8: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 80035ec: 5c 22 00 13 bne r1,r2,8003638 <== NOT EXECUTED 80035f0: c3 a0 00 00 ret <== NOT EXECUTED 80035f4: 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; 80035f8: 34 01 00 11 mvi r1,17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80035fc: 44 43 00 10 be r2,r3,800363c <== NOT EXECUTED 8003600: 48 43 00 08 bg r2,r3,8003620 <== NOT EXECUTED 8003604: 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; 8003608: b8 40 08 00 mv r1,r2 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800360c: 44 43 00 0c be r2,r3,800363c <== NOT EXECUTED 8003610: 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; 8003614: 34 01 00 10 mvi r1,16 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003618: 5c 43 00 08 bne r2,r3,8003638 <== NOT EXECUTED 800361c: c3 a0 00 00 ret <== NOT EXECUTED 8003620: 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; 8003624: 34 01 00 12 mvi r1,18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003628: 44 43 00 05 be r2,r3,800363c <== NOT EXECUTED 800362c: 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; 8003630: 34 01 00 13 mvi r1,19 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003634: 44 43 00 02 be r2,r3,800363c <== 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; 8003638: 34 01 ff ff mvi r1,-1 default: baud_index = -1; break; } return baud_index; } 800363c: c3 a0 00 00 ret 080038e4 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 80038e4: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 80038e8: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 80038ec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 80038f0: 38 c6 32 34 ori r6,r6,0x3234 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 80038f4: 38 a5 32 38 ori r5,r5,0x3238 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 80038f8: 38 84 32 3c ori r4,r4,0x323c <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 80038fc: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003900: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003904: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8003908: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800390c: c3 a0 00 00 ret <== NOT EXECUTED 08004f8c : } } rtems_status_code rtems_termios_close (void *arg) { 8004f8c: 37 9c ff ec addi sp,sp,-20 8004f90: 5b 8b 00 14 sw (sp+20),r11 8004f94: 5b 8c 00 10 sw (sp+16),r12 8004f98: 5b 8d 00 0c sw (sp+12),r13 8004f9c: 5b 8e 00 08 sw (sp+8),r14 8004fa0: 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); 8004fa4: 78 02 08 02 mvhi r2,0x802 } } rtems_status_code rtems_termios_close (void *arg) { 8004fa8: b8 20 70 00 mv r14,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); 8004fac: 38 42 39 4c ori r2,r2,0x394c 8004fb0: 28 41 00 00 lw r1,(r2+0) rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004fb4: 29 c4 00 00 lw r4,(r14+0) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004fb8: 34 02 00 00 mvi r2,0 8004fbc: 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; 8004fc0: 28 8b 00 38 lw r11,(r4+56) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004fc4: f8 00 04 8c calli 80061f4 if (sc != RTEMS_SUCCESSFUL) 8004fc8: 5c 20 00 23 bne r1,r0,8005054 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 8004fcc: 29 6d 00 08 lw r13,(r11+8) 8004fd0: 35 ad ff ff addi r13,r13,-1 8004fd4: 59 6d 00 08 sw (r11+8),r13 8004fd8: 5d a1 00 4f bne r13,r1,8005114 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 8004fdc: 29 61 00 cc lw r1,(r11+204) 8004fe0: 78 0c 08 02 mvhi r12,0x802 8004fe4: 34 02 00 05 mvi r2,5 8004fe8: 39 8c 37 7c ori r12,r12,0x377c 8004fec: fb ff f1 00 calli 80013ec <__ashlsi3> 8004ff0: b5 81 08 00 add r1,r12,r1 8004ff4: 28 2c 00 04 lw r12,(r1+4) 8004ff8: 45 8d 00 04 be r12,r13,8005008 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 8004ffc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005000: d9 80 00 00 call r12 <== NOT EXECUTED 8005004: e0 00 00 08 bi 8005024 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8005008: 29 61 00 18 lw r1,(r11+24) 800500c: b9 80 10 00 mv r2,r12 8005010: b9 80 18 00 mv r3,r12 8005014: f8 00 04 78 calli 80061f4 if (sc != RTEMS_SUCCESSFUL) { 8005018: 5d 81 00 0f bne r12,r1,8005054 rtems_fatal_error_occurred (sc); } drainOutput (tty); 800501c: b9 60 08 00 mv r1,r11 8005020: fb ff fd e0 calli 80047a0 } if (tty->device.outputUsesInterrupts 8005024: 29 62 00 b4 lw r2,(r11+180) 8005028: 34 01 00 02 mvi r1,2 800502c: 5c 41 00 0b bne r2,r1,8005058 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 8005030: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005034: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005038: f8 00 03 1b calli 8005ca4 <== NOT EXECUTED 800503c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005040: 5c 20 00 05 bne r1,r0,8005054 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 8005044: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 8005048: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800504c: f8 00 03 16 calli 8005ca4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005050: 44 2c 00 02 be r1,r12,8005058 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8005054: f8 00 06 60 calli 80069d4 <== NOT EXECUTED } if (tty->device.lastClose) 8005058: 29 64 00 9c lw r4,(r11+156) 800505c: 44 80 00 05 be r4,r0,8005070 (*tty->device.lastClose)(tty->major, tty->minor, arg); 8005060: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8005064: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 8005068: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 800506c: d8 80 00 00 call r4 <== NOT EXECUTED if (tty->forw == NULL) { 8005070: 29 61 00 00 lw r1,(r11+0) 8005074: 29 62 00 04 lw r2,(r11+4) 8005078: 5c 20 00 07 bne r1,r0,8005094 rtems_termios_ttyTail = tty->back; 800507c: 78 03 08 02 mvhi r3,0x802 8005080: 38 63 39 50 ori r3,r3,0x3950 8005084: 58 62 00 00 sw (r3+0),r2 if ( rtems_termios_ttyTail != NULL ) { 8005088: 44 41 00 04 be r2,r1,8005098 rtems_termios_ttyTail->forw = NULL; 800508c: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED 8005090: e0 00 00 02 bi 8005098 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 8005094: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED } if (tty->back == NULL) { 8005098: 29 61 00 04 lw r1,(r11+4) 800509c: 29 62 00 00 lw r2,(r11+0) 80050a0: 5c 20 00 07 bne r1,r0,80050bc rtems_termios_ttyHead = tty->forw; 80050a4: 78 03 08 02 mvhi r3,0x802 80050a8: 38 63 39 54 ori r3,r3,0x3954 80050ac: 58 62 00 00 sw (r3+0),r2 if ( rtems_termios_ttyHead != NULL ) { 80050b0: 44 41 00 04 be r2,r1,80050c0 rtems_termios_ttyHead->back = NULL; 80050b4: 58 41 00 04 sw (r2+4),r1 <== NOT EXECUTED 80050b8: e0 00 00 02 bi 80050c0 <== NOT EXECUTED } } else { tty->back->forw = tty->forw; 80050bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 80050c0: 29 61 00 14 lw r1,(r11+20) 80050c4: f8 00 04 20 calli 8006144 rtems_semaphore_delete (tty->osem); 80050c8: 29 61 00 18 lw r1,(r11+24) 80050cc: f8 00 04 1e calli 8006144 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 80050d0: 29 61 00 8c lw r1,(r11+140) 80050d4: f8 00 04 1c calli 8006144 if ((tty->device.pollRead == NULL) || 80050d8: 29 61 00 a0 lw r1,(r11+160) 80050dc: 44 20 00 04 be r1,r0,80050ec (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 80050e0: 29 62 00 b4 lw r2,(r11+180) 80050e4: 34 01 00 02 mvi r1,2 80050e8: 5c 41 00 03 bne r2,r1,80050f4 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 80050ec: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 80050f0: f8 00 04 15 calli 8006144 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 80050f4: 29 61 00 58 lw r1,(r11+88) 80050f8: f8 00 1a 3e calli 800b9f0 free (tty->rawOutBuf.theBuf); 80050fc: 29 61 00 7c lw r1,(r11+124) 8005100: f8 00 1a 3c calli 800b9f0 free (tty->cbuf); 8005104: 29 61 00 1c lw r1,(r11+28) 8005108: f8 00 1a 3a calli 800b9f0 free (tty); 800510c: b9 60 08 00 mv r1,r11 8005110: f8 00 1a 38 calli 800b9f0 } rtems_semaphore_release (rtems_termios_ttyMutex); 8005114: 78 01 08 02 mvhi r1,0x802 8005118: 38 21 39 4c ori r1,r1,0x394c 800511c: 28 21 00 00 lw r1,(r1+0) 8005120: f8 00 04 85 calli 8006334 return RTEMS_SUCCESSFUL; } 8005124: 34 01 00 00 mvi r1,0 8005128: 2b 9d 00 04 lw ra,(sp+4) 800512c: 2b 8b 00 14 lw r11,(sp+20) 8005130: 2b 8c 00 10 lw r12,(sp+16) 8005134: 2b 8d 00 0c lw r13,(sp+12) 8005138: 2b 8e 00 08 lw r14,(sp+8) 800513c: 37 9c 00 14 addi sp,sp,20 8005140: c3 a0 00 00 ret 08003b40 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 8003b40: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003b44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003b48: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003b4c: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003b50: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED 8003b54: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003b58: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003b5c: 5c 82 00 06 bne r4,r2,8003b74 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 8003b60: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED 8003b64: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8003b68: f8 00 08 4f calli 8005ca4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 8003b6c: 44 20 00 0d be r1,r0,8003ba0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8003b70: f8 00 0b 99 calli 80069d4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 8003b74: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED 8003b78: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8003b7c: 5c 62 00 07 bne r3,r2,8003b98 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8003b80: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8003b84: 38 42 37 7c ori r2,r2,0x377c <== NOT EXECUTED 8003b88: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED 8003b8c: 44 40 00 05 be r2,r0,8003ba0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8003b90: d8 40 00 00 call r2 <== NOT EXECUTED 8003b94: e0 00 00 03 bi 8003ba0 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 8003b98: fb ff ff 66 calli 8003930 <== NOT EXECUTED 8003b9c: e0 00 00 02 bi 8003ba4 <== NOT EXECUTED 8003ba0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } 8003ba4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003ba8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003bac: c3 a0 00 00 ret <== NOT EXECUTED 08003bb0 : * 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) { 8003bb0: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED 8003bb4: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED 8003bb8: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED 8003bbc: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED 8003bc0: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED 8003bc4: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED 8003bc8: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED 8003bcc: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED 8003bd0: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED 8003bd4: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED 8003bd8: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED 8003bdc: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED 8003be0: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED 8003be4: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED 8003be8: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED 8003bec: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED 8003bf0: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED 8003bf4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8003bf8: 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) { 8003bfc: 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) { 8003c00: 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) { 8003c04: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8003c08: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003c0c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003c10: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8003c14: 39 8c 37 7c ori r12,r12,0x377c <== 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) { 8003c18: b8 60 80 00 mv r16,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) { 8003c1c: fb ff f5 f4 calli 80013ec <__ashlsi3> <== NOT EXECUTED 8003c20: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8003c24: 28 2f 00 00 lw r15,(r1+0) <== NOT EXECUTED while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003c28: b9 80 70 00 mv r14,r12 <== 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); 8003c2c: ba 00 60 00 mv r12,r16 <== 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) { 8003c30: 5d e0 00 19 bne r15,r0,8003c94 <== 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, 8003c34: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED 8003c38: 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); 8003c3c: 35 7b 00 30 addi fp,r11,48 <== NOT EXECUTED 8003c40: b9 e0 60 00 mv r12,r15 <== 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) { 8003c44: 34 19 00 20 mvi r25,32 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 8003c48: 34 12 ff fe mvi r18,-2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 8003c4c: 34 18 ff df mvi r24,-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, 8003c50: 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)) 8003c54: 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)) 8003c58: 34 15 01 00 mvi r21,256 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 8003c5c: 34 14 ff ef mvi r20,-17 <== NOT EXECUTED 8003c60: e0 00 00 86 bi 8003e78 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003c64: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED 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--) { c = *buf++; 8003c68: 41 af 00 00 lbu r15,(r13+0) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003c6c: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED 8003c70: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 8003c74: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8003c78: fb ff f5 dd calli 80013ec <__ashlsi3> <== NOT EXECUTED 8003c7c: b5 c1 10 00 add r2,r14,r1 <== NOT EXECUTED 8003c80: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED 8003c84: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8003c88: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8003c8c: d8 60 00 00 call r3 <== NOT EXECUTED 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--) { c = *buf++; 8003c90: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003c94: 34 02 00 04 mvi r2,4 <== 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--) { 8003c98: 5d 80 ff f3 bne r12,r0,8003c64 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8003c9c: 29 61 00 e4 lw r1,(r11+228) <== NOT EXECUTED 8003ca0: 5c 2c 00 7d bne r1,r12,8003e94 <== NOT EXECUTED 8003ca4: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED 8003ca8: 44 60 00 7b be r3,r0,8003e94 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8003cac: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8003cb0: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003cb4: d8 60 00 00 call r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8003cb8: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8003cbc: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED 8003cc0: e0 00 00 76 bi 8003e98 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 8003cc4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 8003cc8: 41 b1 00 00 lbu r17,(r13+0) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 8003ccc: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8003cd0: 44 20 00 11 be r1,r0,8003d14 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 8003cd4: 41 64 00 4a lbu r4,(r11+74) <== NOT EXECUTED 8003cd8: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED 8003cdc: 5c 91 00 0a bne r4,r17,8003d04 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 8003ce0: 5c 64 00 04 bne r3,r4,8003cf0 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 8003ce4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003ce8: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED 8003cec: e0 00 00 03 bi 8003cf8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 8003cf0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003cf4: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED 8003cf8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 8003cfc: 34 0f 00 01 mvi r15,1 <== NOT EXECUTED 8003d00: e0 00 00 06 bi 8003d18 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 8003d04: 5c 71 00 04 bne r3,r17,8003d14 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 8003d08: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d0c: a0 34 08 00 and r1,r1,r20 <== NOT EXECUTED 8003d10: e3 ff ff fa bi 8003cf8 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 8003d14: 45 e0 00 15 be r15,r0,8003d68 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 8003d18: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d1c: 20 21 00 30 andi r1,r1,0x30 <== NOT EXECUTED 8003d20: 5c 39 00 54 bne r1,r25,8003e70 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 8003d24: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 8003d28: a1 d2 08 00 and r1,r14,r18 <== NOT EXECUTED 8003d2c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 8003d30: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8003d34: 29 62 00 94 lw r2,(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; 8003d38: a0 38 08 00 and r1,r1,r24 <== NOT EXECUTED 8003d3c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8003d40: 44 40 00 08 be r2,r0,8003d60 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 8003d44: 29 63 00 84 lw r3,(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, 8003d48: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003d4c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003d50: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003d54: b4 43 10 00 add r2,r2,r3 <== NOT EXECUTED 8003d58: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003d5c: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8003d60: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED 8003d64: e0 00 00 43 bi 8003e70 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 8003d68: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED 8003d6c: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8003d70: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8003d74: f8 00 6e 74 calli 801f744 <__umodsi3> <== NOT EXECUTED 8003d78: b8 20 70 00 mv r14,r1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 8003d7c: 90 00 98 00 rcsr r19,IE <== NOT EXECUTED 8003d80: a2 72 08 00 and r1,r19,r18 <== NOT EXECUTED 8003d84: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 8003d88: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8003d8c: 29 63 00 64 lw r3,(r11+100) <== NOT EXECUTED 8003d90: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8003d94: c8 61 18 00 sub r3,r3,r1 <== NOT EXECUTED 8003d98: b4 6e 08 00 add r1,r3,r14 <== NOT EXECUTED 8003d9c: f8 00 6e 6a calli 801f744 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 8003da0: 29 62 00 c0 lw r2,(r11+192) <== NOT EXECUTED 8003da4: 50 41 00 22 bgeu r2,r1,8003e2c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 8003da8: 29 61 00 b8 lw r1,(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) 8003dac: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 8003db0: 5c 20 00 1f bne r1,r0,8003e2c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 8003db4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003db8: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8003dbc: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 8003dc0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003dc4: 20 21 04 02 andi r1,r1,0x402 <== NOT EXECUTED 8003dc8: 5c 36 00 0f bne r1,r22,8003e04 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 8003dcc: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8003dd0: 20 63 00 20 andi r3,r3,0x20 <== NOT EXECUTED 8003dd4: 5c 60 00 03 bne r3,r0,8003de0 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 8003dd8: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8003ddc: 5c 23 00 14 bne r1,r3,8003e2c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 8003de0: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003de4: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003de8: 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; 8003dec: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED 8003df0: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003df4: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED 8003df8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003dfc: d8 80 00 00 call r4 <== NOT EXECUTED 8003e00: e0 00 00 0b bi 8003e2c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 8003e04: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003e08: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED 8003e0c: 5c 35 00 08 bne r1,r21,8003e2c <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 8003e10: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 8003e14: 29 63 00 ac lw r3,(r11+172) <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 8003e18: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED 8003e1c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 8003e20: 44 60 00 03 be r3,r0,8003e2c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 8003e24: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003e28: d8 60 00 00 call r3 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 8003e2c: d0 13 00 00 wcsr IE,r19 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 8003e30: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8003e34: 5d c1 00 03 bne r14,r1,8003e40 <== NOT EXECUTED dropped++; 8003e38: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8003e3c: e0 00 00 0d bi 8003e70 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 8003e40: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8003e44: b4 2e 08 00 add r1,r1,r14 <== NOT EXECUTED 8003e48: 30 31 00 00 sb (r1+0),r17 <== 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 )) { 8003e4c: 29 64 00 e4 lw r4,(r11+228) <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 8003e50: 59 6e 00 60 sw (r11+96),r14 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8003e54: 5c 80 00 07 bne r4,r0,8003e70 <== NOT EXECUTED 8003e58: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED 8003e5c: 44 64 00 05 be r3,r4,8003e70 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8003e60: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8003e64: bb 60 08 00 mv r1,fp <== NOT EXECUTED 8003e68: d8 60 00 00 call r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8003e6c: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 8003e70: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED 8003e74: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 8003e78: 5e 00 ff 93 bne r16,r0,8003cc4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 8003e7c: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8003e80: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 8003e84: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 8003e88: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8003e8c: f8 00 09 2a calli 8006334 <== NOT EXECUTED return dropped; 8003e90: e0 00 00 02 bi 8003e98 <== NOT EXECUTED 8003e94: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED } 8003e98: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003e9c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003ea0: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED 8003ea4: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED 8003ea8: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED 8003eac: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED 8003eb0: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED 8003eb4: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED 8003eb8: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED 8003ebc: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED 8003ec0: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED 8003ec4: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED 8003ec8: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED 8003ecc: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED 8003ed0: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED 8003ed4: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED 8003ed8: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED 8003edc: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED 8003ee0: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED 8003ee4: c3 a0 00 00 ret <== NOT EXECUTED 08003774 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 8003774: 37 9c ff f8 addi sp,sp,-8 8003778: 5b 8b 00 08 sw (sp+8),r11 800377c: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 8003780: 78 05 08 02 mvhi r5,0x802 8003784: 38 a5 39 4c ori r5,r5,0x394c 8003788: 28 ab 00 00 lw r11,(r5+0) 800378c: 5d 60 00 09 bne r11,r0,80037b0 sc = rtems_semaphore_create ( 8003790: 78 01 54 52 mvhi r1,0x5452 8003794: 38 21 6d 69 ori r1,r1,0x6d69 8003798: 34 02 00 01 mvi r2,1 800379c: 34 03 00 54 mvi r3,84 80037a0: b9 60 20 00 mv r4,r11 80037a4: f8 00 09 e6 calli 8005f3c 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) 80037a8: 44 2b 00 02 be r1,r11,80037b0 rtems_fatal_error_occurred (sc); 80037ac: f8 00 0c 8a calli 80069d4 <== NOT EXECUTED } } 80037b0: 2b 9d 00 04 lw ra,(sp+4) 80037b4: 2b 8b 00 08 lw r11,(sp+8) 80037b8: 37 9c 00 08 addi sp,sp,8 80037bc: c3 a0 00 00 ret 08004ba0 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 8004ba0: 37 9c ff e8 addi sp,sp,-24 8004ba4: 5b 8b 00 18 sw (sp+24),r11 8004ba8: 5b 8c 00 14 sw (sp+20),r12 8004bac: 5b 8d 00 10 sw (sp+16),r13 8004bb0: 5b 8e 00 0c sw (sp+12),r14 8004bb4: 5b 8f 00 08 sw (sp+8),r15 8004bb8: 5b 9d 00 04 sw (sp+4),ra 8004bbc: b8 20 60 00 mv r12,r1 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004bc0: 28 21 00 00 lw r1,(r1+0) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 8004bc4: 34 02 00 00 mvi r2,0 8004bc8: 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; 8004bcc: 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); 8004bd0: 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; 8004bd4: 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); 8004bd8: 29 61 00 18 lw r1,(r11+24) 8004bdc: f8 00 05 86 calli 80061f4 8004be0: b8 20 68 00 mv r13,r1 if (sc != RTEMS_SUCCESSFUL) { 8004be4: 5c 20 00 e0 bne r1,r0,8004f64 args->ioctl_return = sc; return sc; } switch (args->command) { 8004be8: 29 82 00 04 lw r2,(r12+4) 8004bec: 34 01 00 04 mvi r1,4 8004bf0: 44 41 00 ab be r2,r1,8004e9c 8004bf4: 54 41 00 07 bgu r2,r1,8004c10 8004bf8: 34 01 00 02 mvi r1,2 8004bfc: 44 41 00 24 be r2,r1,8004c8c 8004c00: 54 41 00 9f bgu r2,r1,8004e7c 8004c04: 34 01 00 01 mvi r1,1 8004c08: 5c 41 00 0f bne r2,r1,8004c44 8004c0c: e0 00 00 1b bi 8004c78 8004c10: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED 8004c14: 38 21 66 7f ori r1,r1,0x667f <== NOT EXECUTED 8004c18: 44 41 00 c5 be r2,r1,8004f2c <== NOT EXECUTED 8004c1c: 54 41 00 04 bgu r2,r1,8004c2c <== NOT EXECUTED 8004c20: 34 01 00 05 mvi r1,5 <== NOT EXECUTED 8004c24: 5c 41 00 08 bne r2,r1,8004c44 <== NOT EXECUTED 8004c28: e0 00 00 98 bi 8004e88 <== NOT EXECUTED 8004c2c: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED 8004c30: 38 21 74 1a ori r1,r1,0x741a <== NOT EXECUTED 8004c34: 44 41 00 ba be r2,r1,8004f1c <== NOT EXECUTED 8004c38: 78 01 80 04 mvhi r1,0x8004 <== NOT EXECUTED 8004c3c: 38 21 74 1b ori r1,r1,0x741b <== NOT EXECUTED 8004c40: 44 41 00 9c be r2,r1,8004eb0 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 8004c44: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004c48: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8004c4c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004c50: 39 ad 37 7c ori r13,r13,0x377c <== NOT EXECUTED 8004c54: fb ff f1 e6 calli 80013ec <__ashlsi3> <== NOT EXECUTED 8004c58: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8004c5c: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 8004c60: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED 8004c64: 44 60 00 be be r3,r0,8004f5c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 8004c68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004c6c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8004c70: d8 60 00 00 call r3 <== NOT EXECUTED 8004c74: e0 00 00 a8 bi 8004f14 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 8004c78: 29 81 00 08 lw r1,(r12+8) 8004c7c: 35 62 00 30 addi r2,r11,48 8004c80: 34 03 00 24 mvi r3,36 8004c84: f8 00 2b 3c calli 800f974 break; 8004c88: e0 00 00 b5 bi 8004f5c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8004c8c: 29 82 00 08 lw r2,(r12+8) 8004c90: 35 61 00 30 addi r1,r11,48 8004c94: 34 03 00 24 mvi r3,36 8004c98: f8 00 2b 37 calli 800f974 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8004c9c: 29 61 00 b8 lw r1,(r11+184) 8004ca0: 20 21 02 00 andi r1,r1,0x200 8004ca4: 44 20 00 1d be r1,r0,8004d18 8004ca8: 29 61 00 30 lw r1,(r11+48) 8004cac: 20 21 04 00 andi r1,r1,0x400 8004cb0: 5c 20 00 1a bne r1,r0,8004d18 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 8004cb4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004cb8: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED 8004cbc: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004cc0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 8004cc4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004cc8: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004ccc: 44 20 00 13 be r1,r0,8004d18 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 8004cd0: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 8004cd4: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8004cd8: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED 8004cdc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 8004ce0: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004ce4: 34 01 ff df mvi r1,-33 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8004ce8: 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; 8004cec: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004cf0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 8004cf4: 44 60 00 08 be r3,r0,8004d14 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 8004cf8: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8004cfc: 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, 8004d00: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004d04: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004d08: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8004d0c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004d10: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8004d14: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 8004d18: 29 61 00 b8 lw r1,(r11+184) 8004d1c: 20 21 04 00 andi r1,r1,0x400 8004d20: 44 20 00 0c be r1,r0,8004d50 8004d24: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8004d28: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED 8004d2c: 5c 20 00 09 bne r1,r0,8004d50 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 8004d30: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d34: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED 8004d38: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d3c: 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); 8004d40: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d44: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED 8004d48: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d4c: 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) && 8004d50: 29 61 00 b8 lw r1,(r11+184) 8004d54: 20 21 01 00 andi r1,r1,0x100 8004d58: 44 20 00 12 be r1,r0,8004da0 8004d5c: 29 61 00 38 lw r1,(r11+56) <== NOT EXECUTED 8004d60: 48 01 00 10 bg r0,r1,8004da0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 8004d64: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d68: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED 8004d6c: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d70: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 8004d74: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004d78: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 8004d7c: 44 20 00 05 be r1,r0,8004d90 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 8004d80: 29 62 00 b0 lw r2,(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) && 8004d84: 44 40 00 03 be r2,r0,8004d90 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 8004d88: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004d8c: d8 40 00 00 call r2 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 8004d90: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d94: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED 8004d98: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d9c: 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) { 8004da0: 29 61 00 38 lw r1,(r11+56) 8004da4: 4c 20 00 04 bge r1,r0,8004db4 tty->flow_ctrl |= FL_MDRTS; 8004da8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004dac: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED 8004db0: 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) { 8004db4: 29 61 00 30 lw r1,(r11+48) 8004db8: 20 21 10 00 andi r1,r1,0x1000 8004dbc: 44 20 00 04 be r1,r0,8004dcc tty->flow_ctrl |= FL_MDXOF; 8004dc0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004dc4: 38 21 04 00 ori r1,r1,0x400 <== NOT EXECUTED 8004dc8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 8004dcc: 29 61 00 30 lw r1,(r11+48) 8004dd0: 20 21 04 00 andi r1,r1,0x400 8004dd4: 44 20 00 04 be r1,r0,8004de4 tty->flow_ctrl |= FL_MDXON; 8004dd8: 29 61 00 b8 lw r1,(r11+184) 8004ddc: 38 21 02 00 ori r1,r1,0x200 8004de0: 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) { 8004de4: 29 6e 00 3c lw r14,(r11+60) 8004de8: 34 01 00 00 mvi r1,0 8004dec: 21 ce 00 02 andi r14,r14,0x2 8004df0: 45 c1 00 05 be r14,r1,8004e04 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 8004df4: 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; 8004df8: 59 61 00 6c sw (r11+108),r1 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 8004dfc: 59 61 00 70 sw (r11+112),r1 8004e00: e0 00 00 19 bi 8004e64 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 8004e04: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED 8004e08: f8 00 03 1d calli 8005a7c <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 8004e0c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8004e10: f8 00 69 be calli 801f508 <__mulsi3> <== NOT EXECUTED 8004e14: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8004e18: f8 00 6a 3b calli 801f704 <__udivsi3> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8004e1c: 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] * 8004e20: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED 8004e24: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8004e28: 44 4e 00 08 be r2,r14,8004e48 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 8004e2c: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 8004e30: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 8004e34: 44 60 00 03 be r3,r0,8004e40 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 8004e38: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED 8004e3c: e0 00 00 0a bi 8004e64 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 8004e40: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED 8004e44: e0 00 00 08 bi 8004e64 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 8004e48: 44 62 00 05 be r3,r2,8004e5c <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 8004e4c: 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; 8004e50: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 8004e54: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED 8004e58: e0 00 00 03 bi 8004e64 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 8004e5c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004e60: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED } } } if (tty->device.setAttributes) 8004e64: 29 63 00 a8 lw r3,(r11+168) 8004e68: 44 60 00 3d be r3,r0,8004f5c (*tty->device.setAttributes)(tty->minor, &tty->termios); 8004e6c: 29 61 00 10 lw r1,(r11+16) 8004e70: 35 62 00 30 addi r2,r11,48 8004e74: d8 60 00 00 call r3 8004e78: e0 00 00 39 bi 8004f5c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 8004e7c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004e80: fb ff fe 48 calli 80047a0 <== NOT EXECUTED break; 8004e84: e0 00 00 36 bi 8004f5c <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 8004e88: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8004e8c: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED 8004e90: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8004e94: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED break; 8004e98: e0 00 00 31 bi 8004f5c <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 8004e9c: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 8004ea0: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED 8004ea4: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8004ea8: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED break; 8004eac: e0 00 00 2c bi 8004f5c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 8004eb0: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004eb4: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004eb8: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8004ebc: fb ff f1 4c calli 80013ec <__ashlsi3> <== NOT EXECUTED 8004ec0: 39 ce 37 7c ori r14,r14,0x377c <== NOT EXECUTED 8004ec4: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8004ec8: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8004ecc: 44 40 00 04 be r2,r0,8004edc <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 8004ed0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004ed4: d8 40 00 00 call r2 <== NOT EXECUTED 8004ed8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 8004edc: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 8004ee0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004ee4: 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); 8004ee8: 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) { 8004eec: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004ef0: 78 0e 08 02 mvhi r14,0x802 <== 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); 8004ef4: 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) { 8004ef8: fb ff f1 3d calli 80013ec <__ashlsi3> <== NOT EXECUTED 8004efc: 39 ce 37 7c ori r14,r14,0x377c <== NOT EXECUTED 8004f00: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8004f04: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8004f08: 44 40 00 15 be r2,r0,8004f5c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 8004f0c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004f10: d8 40 00 00 call r2 <== NOT EXECUTED 8004f14: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8004f18: e0 00 00 11 bi 8004f5c <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 8004f1c: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED 8004f20: 29 62 00 cc lw r2,(r11+204) <== NOT EXECUTED 8004f24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED break; 8004f28: e0 00 00 0d bi 8004f5c <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 8004f2c: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED 8004f30: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8004f34: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED if ( rawnc < 0 ) 8004f38: 4c 20 00 03 bge r1,r0,8004f44 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 8004f3c: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004f40: 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; 8004f44: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED 8004f48: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8004f4c: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED 8004f50: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED 8004f54: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004f58: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 8004f5c: 29 61 00 18 lw r1,(r11+24) 8004f60: f8 00 04 f5 calli 8006334 args->ioctl_return = sc; return sc; } 8004f64: 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; 8004f68: 59 8d 00 0c sw (r12+12),r13 return sc; } 8004f6c: 2b 9d 00 04 lw ra,(sp+4) 8004f70: 2b 8b 00 18 lw r11,(sp+24) 8004f74: 2b 8c 00 14 lw r12,(sp+20) 8004f78: 2b 8d 00 10 lw r13,(sp+16) 8004f7c: 2b 8e 00 0c lw r14,(sp+12) 8004f80: 2b 8f 00 08 lw r15,(sp+8) 8004f84: 37 9c 00 18 addi sp,sp,24 8004f88: c3 a0 00 00 ret 08005144 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8005144: 37 9c ff d0 addi sp,sp,-48 8005148: 5b 8b 00 30 sw (sp+48),r11 800514c: 5b 8c 00 2c sw (sp+44),r12 8005150: 5b 8d 00 28 sw (sp+40),r13 8005154: 5b 8e 00 24 sw (sp+36),r14 8005158: 5b 8f 00 20 sw (sp+32),r15 800515c: 5b 90 00 1c sw (sp+28),r16 8005160: 5b 91 00 18 sw (sp+24),r17 8005164: 5b 92 00 14 sw (sp+20),r18 8005168: 5b 93 00 10 sw (sp+16),r19 800516c: 5b 94 00 0c sw (sp+12),r20 8005170: 5b 95 00 08 sw (sp+8),r21 8005174: 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, 8005178: 78 05 08 02 mvhi r5,0x802 800517c: 38 a5 39 4c ori r5,r5,0x394c rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8005180: b8 20 88 00 mv r17,r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 8005184: 28 a1 00 00 lw r1,(r5+0) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8005188: b8 40 90 00 mv r18,r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 800518c: 34 02 00 00 mvi r2,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8005190: b8 60 98 00 mv r19,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 8005194: b8 40 18 00 mv r3,r2 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 8005198: b8 80 a0 00 mv r20,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 800519c: f8 00 04 16 calli 80061f4 80051a0: b8 20 70 00 mv r14,r1 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 80051a4: 5c 20 00 f7 bne r1,r0,8005580 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 80051a8: 78 01 08 02 mvhi r1,0x802 80051ac: 38 21 39 54 ori r1,r1,0x3954 80051b0: 28 2b 00 00 lw r11,(r1+0) 80051b4: e0 00 00 06 bi 80051cc if ((tty->major == major) && (tty->minor == minor)) 80051b8: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 80051bc: 5c 31 00 03 bne r1,r17,80051c8 <== NOT EXECUTED 80051c0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80051c4: 44 32 00 ce be r1,r18,80054fc <== NOT EXECUTED */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 80051c8: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED 80051cc: 34 0d 00 00 mvi r13,0 80051d0: 5d 6d ff fa bne r11,r13,80051b8 80051d4: e0 00 00 fa bi 80055bc return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 80051d8: 78 01 08 02 mvhi r1,0x802 80051dc: 38 21 32 38 ori r1,r1,0x3238 80051e0: 28 21 00 00 lw r1,(r1+0) 80051e4: 59 61 00 64 sw (r11+100),r1 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 80051e8: 29 61 00 64 lw r1,(r11+100) 80051ec: f8 00 1a ff calli 800bde8 80051f0: 59 61 00 58 sw (r11+88),r1 if (tty->rawInBuf.theBuf == NULL) { 80051f4: 5c 20 00 08 bne r1,r0,8005214 free(tty); 80051f8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80051fc: f8 00 19 fd calli 800b9f0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005200: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8005204: 38 21 39 4c ori r1,r1,0x394c <== NOT EXECUTED 8005208: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800520c: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 8005210: e0 00 00 db bi 800557c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 8005214: 78 01 08 02 mvhi r1,0x802 8005218: 38 21 32 3c ori r1,r1,0x323c 800521c: 28 21 00 00 lw r1,(r1+0) 8005220: 59 61 00 88 sw (r11+136),r1 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 8005224: 29 61 00 88 lw r1,(r11+136) 8005228: f8 00 1a f0 calli 800bde8 800522c: 59 61 00 7c sw (r11+124),r1 if (tty->rawOutBuf.theBuf == NULL) { 8005230: 5c 20 00 04 bne r1,r0,8005240 free((void *)(tty->rawInBuf.theBuf)); 8005234: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 8005238: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 800523c: e0 00 00 0b bi 8005268 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 8005240: 78 01 08 02 mvhi r1,0x802 8005244: 38 21 32 34 ori r1,r1,0x3234 8005248: 28 21 00 00 lw r1,(r1+0) 800524c: f8 00 1a e7 calli 800bde8 8005250: 59 61 00 1c sw (r11+28),r1 if (tty->cbuf == NULL) { 8005254: 5c 20 00 09 bne r1,r0,8005278 free((void *)(tty->rawOutBuf.theBuf)); 8005258: 29 61 00 7c lw r1,(r11+124) <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 800525c: 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)); 8005260: f8 00 19 e4 calli 800b9f0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 8005264: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8005268: f8 00 19 e2 calli 800b9f0 <== NOT EXECUTED free(tty); 800526c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005270: f8 00 19 e0 calli 800b9f0 <== NOT EXECUTED 8005274: e0 00 00 bf bi 8005570 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 8005278: 78 01 08 02 mvhi r1,0x802 800527c: 38 21 39 54 ori r1,r1,0x3954 8005280: 28 21 00 00 lw r1,(r1+0) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 8005284: 59 6d 00 d4 sw (r11+212),r13 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 8005288: 59 6d 00 04 sw (r11+4),r13 } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; tty->tty_snd.sw_arg = NULL; 800528c: 59 6d 00 d8 sw (r11+216),r13 tty->tty_rcv.sw_pfn = NULL; 8005290: 59 6d 00 dc sw (r11+220),r13 tty->tty_rcv.sw_arg = NULL; 8005294: 59 6d 00 e0 sw (r11+224),r13 tty->tty_rcvwakeup = 0; 8005298: 59 6d 00 e4 sw (r11+228),r13 /* * link tty */ tty->forw = rtems_termios_ttyHead; 800529c: 59 61 00 00 sw (r11+0),r1 tty->back = NULL; if (rtems_termios_ttyHead != NULL) 80052a0: 44 20 00 02 be r1,r0,80052a8 rtems_termios_ttyHead->back = tty; 80052a4: 58 2b 00 04 sw (r1+4),r11 <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 80052a8: 78 05 08 02 mvhi r5,0x802 80052ac: 38 a5 39 50 ori r5,r5,0x3950 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 80052b0: 78 01 08 02 mvhi r1,0x802 if (rtems_termios_ttyTail == NULL) 80052b4: 28 a2 00 00 lw r2,(r5+0) */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 80052b8: 38 21 39 54 ori r1,r1,0x3954 80052bc: 58 2c 00 00 sw (r1+0),r12 if (rtems_termios_ttyTail == NULL) 80052c0: 5c 40 00 02 bne r2,r0,80052c8 rtems_termios_ttyTail = tty; 80052c4: 58 ac 00 00 sw (r5+0),r12 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 80052c8: 78 0d 08 02 mvhi r13,0x802 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 80052cc: 59 92 00 10 sw (r12+16),r18 tty->major = major; 80052d0: 59 91 00 0c sw (r12+12),r17 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 80052d4: 39 ad 32 40 ori r13,r13,0x3240 80052d8: 41 a1 00 00 lbu r1,(r13+0) 80052dc: 78 05 54 52 mvhi r5,0x5452 80052e0: 38 a5 69 00 ori r5,r5,0x6900 80052e4: b8 25 08 00 or r1,r1,r5 80052e8: 34 02 00 01 mvi r2,1 80052ec: 34 03 00 54 mvi r3,84 80052f0: 34 04 00 00 mvi r4,0 80052f4: 35 85 00 14 addi r5,r12,20 80052f8: f8 00 03 11 calli 8005f3c 80052fc: b8 20 78 00 mv r15,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) 8005300: 5c 20 00 9b bne r1,r0,800556c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 8005304: 41 a1 00 00 lbu r1,(r13+0) 8005308: 78 05 54 52 mvhi r5,0x5452 800530c: 38 a5 6f 00 ori r5,r5,0x6f00 8005310: b8 25 08 00 or r1,r1,r5 8005314: 34 02 00 01 mvi r2,1 8005318: 34 03 00 54 mvi r3,84 800531c: b9 e0 20 00 mv r4,r15 8005320: 35 85 00 18 addi r5,r12,24 8005324: f8 00 03 06 calli 8005f3c 8005328: b8 20 80 00 mv r16,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) 800532c: 5c 2f 00 90 bne r1,r15,800556c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 8005330: 41 a1 00 00 lbu r1,(r13+0) 8005334: 78 05 54 52 mvhi r5,0x5452 8005338: 38 a5 78 00 ori r5,r5,0x7800 800533c: b8 25 08 00 or r1,r1,r5 8005340: ba 00 10 00 mv r2,r16 8005344: 34 03 00 20 mvi r3,32 8005348: ba 00 20 00 mv r4,r16 800534c: 35 85 00 8c addi r5,r12,140 8005350: f8 00 02 fb calli 8005f3c 8005354: b8 20 78 00 mv r15,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) 8005358: 5c 30 00 85 bne r1,r16,800556c rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 800535c: 59 81 00 94 sw (r12+148),r1 /* * Set callbacks */ tty->device = *callbacks; 8005360: ba 80 10 00 mv r2,r20 8005364: 35 81 00 98 addi r1,r12,152 8005368: 34 03 00 20 mvi r3,32 800536c: f8 00 29 82 calli 800f974 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8005370: 29 82 00 b4 lw r2,(r12+180) 8005374: 34 01 00 02 mvi r1,2 8005378: 5c 41 00 18 bne r2,r1,80053d8 sc = rtems_task_create ( 800537c: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED 8005380: 78 04 54 78 mvhi r4,0x5478 <== NOT EXECUTED 8005384: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED 8005388: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 800538c: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8005390: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005394: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005398: b9 e0 28 00 mv r5,r15 <== NOT EXECUTED 800539c: 35 86 00 c8 addi r6,r12,200 <== NOT EXECUTED 80053a0: f8 00 04 22 calli 8006428 <== NOT EXECUTED 80053a4: b8 20 80 00 mv r16,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) 80053a8: 5c 2f 00 71 bne r1,r15,800556c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 80053ac: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED 80053b0: 78 04 52 78 mvhi r4,0x5278 <== NOT EXECUTED 80053b4: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED 80053b8: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 80053bc: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80053c0: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 80053c4: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 80053c8: ba 00 28 00 mv r5,r16 <== NOT EXECUTED 80053cc: 35 86 00 c4 addi r6,r12,196 <== NOT EXECUTED 80053d0: f8 00 04 16 calli 8006428 <== 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) 80053d4: 5c 30 00 66 bne r1,r16,800556c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 80053d8: 29 81 00 a0 lw r1,(r12+160) 80053dc: 44 20 00 04 be r1,r0,80053ec (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 80053e0: 29 82 00 b4 lw r2,(r12+180) 80053e4: 34 01 00 02 mvi r1,2 80053e8: 5c 41 00 0d bne r2,r1,800541c sc = rtems_semaphore_create ( 80053ec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80053f0: 38 21 32 40 ori r1,r1,0x3240 <== NOT EXECUTED 80053f4: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 80053f8: 78 04 54 52 mvhi r4,0x5452 <== NOT EXECUTED 80053fc: 38 84 72 00 ori r4,r4,0x7200 <== NOT EXECUTED 8005400: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005404: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 8005408: 34 03 00 24 mvi r3,36 <== NOT EXECUTED 800540c: b8 40 20 00 mv r4,r2 <== NOT EXECUTED 8005410: 35 85 00 68 addi r5,r12,104 <== NOT EXECUTED 8005414: f8 00 02 ca calli 8005f3c <== 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) 8005418: 5c 20 00 55 bne r1,r0,800556c <== NOT EXECUTED 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; 800541c: 34 01 00 00 mvi r1,0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005420: 34 15 25 02 mvi r21,9474 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; 8005424: 59 81 00 b8 sw (r12+184),r1 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005428: 59 95 00 30 sw (r12+48),r21 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 800542c: 34 15 18 05 mvi r21,6149 /* 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; 8005430: 29 81 00 64 lw r1,(r12+100) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 8005434: 59 95 00 34 sw (r12+52),r21 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 8005438: 34 15 08 bd mvi r21,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'; 800543c: 34 02 00 00 mvi r2,0 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'; 8005440: 34 0a 00 04 mvi r10,4 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 8005444: 34 09 00 11 mvi r9,17 tty->termios.c_cc[VSTOP] = '\023'; 8005448: 34 08 00 13 mvi r8,19 tty->termios.c_cc[VSUSP] = '\032'; 800544c: 34 07 00 1a mvi r7,26 tty->termios.c_cc[VREPRINT] = '\022'; 8005450: 34 06 00 12 mvi r6,18 tty->termios.c_cc[VDISCARD] = '\017'; 8005454: 34 05 00 0f mvi r5,15 tty->termios.c_cc[VWERASE] = '\027'; 8005458: 34 04 00 17 mvi r4,23 tty->termios.c_cc[VLNEXT] = '\026'; 800545c: 34 03 00 16 mvi r3,22 /* * 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; 8005460: 59 95 00 38 sw (r12+56),r21 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 8005464: 34 14 00 03 mvi r20,3 tty->termios.c_cc[VQUIT] = '\034'; 8005468: 34 10 00 1c mvi r16,28 tty->termios.c_cc[VERASE] = '\177'; 800546c: 34 0f 00 7f mvi r15,127 tty->termios.c_cc[VKILL] = '\025'; 8005470: 34 0d 00 15 mvi r13,21 * 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; 8005474: 38 15 82 3b mvu r21,0x823b 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'; 8005478: 31 8a 00 45 sb (r12+69),r10 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; 800547c: 31 82 00 51 sb (r12+81),r2 tty->termios.c_cc[VSTART] = '\021'; 8005480: 31 89 00 49 sb (r12+73),r9 tty->termios.c_cc[VSTOP] = '\023'; 8005484: 31 88 00 4a sb (r12+74),r8 tty->termios.c_cc[VSUSP] = '\032'; 8005488: 31 87 00 4b sb (r12+75),r7 tty->termios.c_cc[VREPRINT] = '\022'; 800548c: 31 86 00 4d sb (r12+77),r6 tty->termios.c_cc[VDISCARD] = '\017'; 8005490: 31 85 00 4e sb (r12+78),r5 tty->termios.c_cc[VWERASE] = '\027'; 8005494: 31 84 00 4f sb (r12+79),r4 tty->termios.c_cc[VLNEXT] = '\026'; 8005498: 31 83 00 50 sb (r12+80),r3 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'; 800549c: 31 82 00 4c sb (r12+76),r2 * 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; 80054a0: 59 95 00 3c sw (r12+60),r21 /* 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; 80054a4: 34 02 00 01 mvi r2,1 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 80054a8: 31 94 00 41 sb (r12+65),r20 tty->termios.c_cc[VQUIT] = '\034'; 80054ac: 31 90 00 42 sb (r12+66),r16 tty->termios.c_cc[VERASE] = '\177'; 80054b0: 31 8f 00 43 sb (r12+67),r15 tty->termios.c_cc[VKILL] = '\025'; 80054b4: 31 8d 00 44 sb (r12+68),r13 /* 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; 80054b8: fb ff ef f5 calli 800148c <__lshrsi3> tty->highwater = tty->rawInBuf.Size * 3/4; 80054bc: 29 84 00 64 lw r4,(r12+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; 80054c0: 59 81 00 bc sw (r12+188),r1 tty->highwater = tty->rawInBuf.Size * 3/4; 80054c4: 34 02 00 02 mvi r2,2 80054c8: b4 84 08 00 add r1,r4,r4 80054cc: b4 24 08 00 add r1,r1,r4 80054d0: fb ff ef ef calli 800148c <__lshrsi3> /* * Bump name characer */ if (c++ == 'z') 80054d4: 78 04 08 02 mvhi r4,0x802 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; 80054d8: 59 81 00 c0 sw (r12+192),r1 /* * Bump name characer */ if (c++ == 'z') 80054dc: 38 84 32 40 ori r4,r4,0x3240 80054e0: 40 81 00 00 lbu r1,(r4+0) 80054e4: 34 22 00 01 addi r2,r1,1 80054e8: 30 82 00 00 sb (r4+0),r2 80054ec: 34 02 00 7a mvi r2,122 80054f0: 5c 22 00 03 bne r1,r2,80054fc c = 'a'; 80054f4: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 80054f8: 30 81 00 00 sb (r4+0),r1 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 80054fc: 29 62 00 08 lw r2,(r11+8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8005500: 2a 63 00 00 lw r3,(r19+0) if (!tty->refcount++) { 8005504: 34 41 00 01 addi r1,r2,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8005508: 58 6b 00 38 sw (r3+56),r11 if (!tty->refcount++) { 800550c: 59 61 00 08 sw (r11+8),r1 8005510: 5c 40 00 18 bne r2,r0,8005570 if (tty->device.firstOpen) 8005514: 29 64 00 98 lw r4,(r11+152) 8005518: 44 82 00 05 be r4,r2,800552c (*tty->device.firstOpen)(major, minor, arg); 800551c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005520: ba 40 10 00 mv r2,r18 <== NOT EXECUTED 8005524: ba 60 18 00 mv r3,r19 <== NOT EXECUTED 8005528: d8 80 00 00 call r4 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 800552c: 29 62 00 b4 lw r2,(r11+180) 8005530: 34 01 00 02 mvi r1,2 8005534: 5c 41 00 0f bne r2,r1,8005570 sc = rtems_task_start(tty->rxTaskId, 8005538: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 800553c: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 8005540: 38 42 56 64 ori r2,r2,0x5664 <== NOT EXECUTED 8005544: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8005548: f8 00 04 74 calli 8006718 <== NOT EXECUTED 800554c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 8005550: 5c 20 00 07 bne r1,r0,800556c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 8005554: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 8005558: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800555c: 38 42 55 d8 ori r2,r2,0x55d8 <== NOT EXECUTED 8005560: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8005564: f8 00 04 6d calli 8006718 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 8005568: 44 2c 00 02 be r1,r12,8005570 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 800556c: f8 00 05 1a calli 80069d4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 8005570: 78 01 08 02 mvhi r1,0x802 8005574: 38 21 39 4c ori r1,r1,0x394c 8005578: 28 21 00 00 lw r1,(r1+0) 800557c: f8 00 03 6e calli 8006334 return RTEMS_SUCCESSFUL; } 8005580: b9 c0 08 00 mv r1,r14 8005584: 2b 9d 00 04 lw ra,(sp+4) 8005588: 2b 8b 00 30 lw r11,(sp+48) 800558c: 2b 8c 00 2c lw r12,(sp+44) 8005590: 2b 8d 00 28 lw r13,(sp+40) 8005594: 2b 8e 00 24 lw r14,(sp+36) 8005598: 2b 8f 00 20 lw r15,(sp+32) 800559c: 2b 90 00 1c lw r16,(sp+28) 80055a0: 2b 91 00 18 lw r17,(sp+24) 80055a4: 2b 92 00 14 lw r18,(sp+20) 80055a8: 2b 93 00 10 lw r19,(sp+16) 80055ac: 2b 94 00 0c lw r20,(sp+12) 80055b0: 2b 95 00 08 lw r21,(sp+8) 80055b4: 37 9c 00 30 addi sp,sp,48 80055b8: c3 a0 00 00 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 80055bc: 34 01 00 01 mvi r1,1 80055c0: 34 02 00 e8 mvi r2,232 80055c4: f8 00 18 ec calli 800b974 80055c8: b8 20 58 00 mv r11,r1 80055cc: b8 20 60 00 mv r12,r1 if (tty == NULL) { 80055d0: 5c 20 ff 02 bne r1,r0,80051d8 80055d4: e3 ff ff 0b bi 8005200 <== NOT EXECUTED 08003ee8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 8003ee8: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8003eec: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 8003ef0: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 8003ef4: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 8003ef8: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 8003efc: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 8003f00: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 8003f04: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 8003f08: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 8003f0c: 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) { 8003f10: 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) { 8003f14: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8003f18: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8003f1c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED const unsigned char *buf = _buf; 8003f20: b8 20 70 00 mv r14,r1 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 8003f24: 5c 80 00 07 bne r4,r0,8003f40 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)buf, len); 8003f28: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003f2c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003f30: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8003f34: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8003f38: d8 80 00 00 call r4 <== NOT EXECUTED return; 8003f3c: e0 00 00 36 bi 8004014 <== NOT EXECUTED } newHead = tty->rawOutBuf.Head; 8003f40: 29 6c 00 80 lw r12,(r11+128) <== NOT EXECUTED * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 8003f44: 34 10 ff fe mvi r16,-2 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 8003f48: 34 12 00 02 mvi r18,2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 8003f4c: 34 11 00 01 mvi r17,1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 8003f50: e0 00 00 30 bi 8004010 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 8003f54: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003f58: 35 81 00 01 addi r1,r12,1 <== NOT EXECUTED 8003f5c: f8 00 6d fa calli 801f744 <__umodsi3> <== NOT EXECUTED 8003f60: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_interrupt_disable (level); 8003f64: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED 8003f68: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED 8003f6c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 8003f70: e0 00 00 0c bi 8003fa0 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 8003f74: 59 72 00 94 sw (r11+148),r18 <== NOT EXECUTED rtems_interrupt_enable (level); 8003f78: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 8003f7c: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003f80: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8003f84: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8003f88: f8 00 08 9b calli 80061f4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8003f8c: 44 20 00 02 be r1,r0,8003f94 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8003f90: f8 00 0a 91 calli 80069d4 <== NOT EXECUTED rtems_interrupt_disable (level); 8003f94: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED 8003f98: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED 8003f9c: d0 01 00 00 wcsr IE,r1 <== 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) { 8003fa0: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003fa4: 45 81 ff f4 be r12,r1,8003f74 <== 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++; 8003fa8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003fac: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003fb0: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8003fb4: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED 8003fb8: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 8003fbc: 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; 8003fc0: 59 6c 00 80 sw (r11+128),r12 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 8003fc4: 5c 20 00 10 bne r1,r0,8004004 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 8003fc8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003fcc: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED 8003fd0: 5c 41 00 09 bne r2,r1,8003ff4 <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003fd4: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8003fd8: 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, 8003fdc: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003fe0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003fe4: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8003fe8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003fec: d8 80 00 00 call r4 <== NOT EXECUTED 8003ff0: e0 00 00 04 bi 8004000 <== NOT EXECUTED (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 8003ff4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003ff8: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED 8003ffc: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 8004000: 59 71 00 94 sw (r11+148),r17 <== 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++; 8004004: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 8004008: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED len--; 800400c: 35 ad ff ff addi r13,r13,-1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 8004010: 5d a0 ff d1 bne r13,r0,8003f54 <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 8004014: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004018: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800401c: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 8004020: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 8004024: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 8004028: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800402c: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 8004030: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 8004034: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 8004038: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800403c: c3 a0 00 00 ret <== NOT EXECUTED 08004830 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 8004830: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED 8004834: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED 8004838: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED 800483c: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED 8004840: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED 8004844: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED 8004848: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED 800484c: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED 8004850: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED 8004854: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED 8004858: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED 800485c: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED 8004860: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED 8004864: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004868: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 800486c: 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); 8004870: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004874: 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; 8004878: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED uint32_t count = args->count; 800487c: 29 8e 00 14 lw r14,(r12+20) <== NOT EXECUTED char *buffer = args->buffer; 8004880: 29 92 00 10 lw r18,(r12+16) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004884: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004888: f8 00 06 5b calli 80061f4 <== NOT EXECUTED 800488c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8004890: 5c 20 00 b4 bne r1,r0,8004b60 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 8004894: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004898: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800489c: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 80048a0: fb ff f2 d3 calli 80013ec <__ashlsi3> <== NOT EXECUTED 80048a4: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 80048a8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80048ac: fb ff f2 d0 calli 80013ec <__ashlsi3> <== NOT EXECUTED 80048b0: 39 ef 37 7c ori r15,r15,0x377c <== NOT EXECUTED 80048b4: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 80048b8: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80048bc: 44 6d 00 09 be r3,r13,80048e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 80048c0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80048c4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80048c8: d8 60 00 00 call r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 80048cc: 34 02 00 00 mvi r2,0 <== 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); 80048d0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 80048d4: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 80048d8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 80048dc: e0 00 00 a0 bi 8004b5c <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 80048e0: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 80048e4: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 80048e8: 5c 41 00 92 bne r2,r1,8004b30 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 80048ec: 29 62 00 28 lw r2,(r11+40) <== NOT EXECUTED if (tty->device.pollRead != NULL 80048f0: 29 61 00 a0 lw r1,(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; 80048f4: 59 6d 00 20 sw (r11+32),r13 <== NOT EXECUTED tty->read_start_column = tty->column; 80048f8: 59 62 00 2c sw (r11+44),r2 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 80048fc: 59 6d 00 24 sw (r11+36),r13 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 8004900: 44 20 00 32 be r1,r0,80049c8 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 8004904: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED 8004908: 5c 20 00 30 bne r1,r0,80049c8 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 800490c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004910: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004914: 44 20 00 0e be r1,r0,800494c <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004918: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 800491c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004920: d8 40 00 00 call r2 <== NOT EXECUTED 8004924: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8004928: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800492c: 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) { 8004930: 4c 60 00 04 bge r3,r0,8004940 <== NOT EXECUTED rtems_task_wake_after (1); 8004934: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004938: f8 00 07 98 calli 8006798 <== NOT EXECUTED 800493c: e3 ff ff f7 bi 8004918 <== NOT EXECUTED } else { if (siproc (n, tty)) 8004940: fb ff ff 3d calli 8004634 <== NOT EXECUTED 8004944: 44 20 ff f5 be r1,r0,8004918 <== NOT EXECUTED 8004948: e0 00 00 7a bi 8004b30 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 800494c: f8 00 04 57 calli 8005aa8 <== NOT EXECUTED 8004950: b8 20 78 00 mv r15,r1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004954: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004958: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800495c: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8004960: 4c 20 00 10 bge r1,r0,80049a0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 8004964: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8004968: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED 800496c: 44 20 00 05 be r1,r0,8004980 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 8004970: 44 40 00 09 be r2,r0,8004994 <== NOT EXECUTED 8004974: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004978: 44 20 00 07 be r1,r0,8004994 <== NOT EXECUTED 800497c: e0 00 00 02 bi 8004984 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 8004980: 44 41 00 6c be r2,r1,8004b30 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 8004984: f8 00 04 49 calli 8005aa8 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 8004988: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED 800498c: c8 2f 08 00 sub r1,r1,r15 <== NOT EXECUTED 8004990: 54 22 00 68 bgu r1,r2,8004b30 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 8004994: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004998: f8 00 07 80 calli 8006798 <== NOT EXECUTED 800499c: e3 ff ff ee bi 8004954 <== NOT EXECUTED } else { siproc (n, tty); 80049a0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049a4: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED 80049a8: fb ff ff 23 calli 8004634 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 80049ac: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 80049b0: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80049b4: 4c 41 00 5f bge r2,r1,8004b30 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 80049b8: 44 20 ff e7 be r1,r0,8004954 <== NOT EXECUTED 80049bc: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 80049c0: 44 20 ff e5 be r1,r0,8004954 <== NOT EXECUTED 80049c4: e3 ff ff e2 bi 800494c <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 80049c8: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 80049cc: 39 ef 32 34 ori r15,r15,0x3234 <== 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; 80049d0: 29 71 00 74 lw r17,(r11+116) <== 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, 80049d4: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED 80049d8: 34 10 00 01 mvi r16,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; 80049dc: 34 15 ff fe mvi r21,-2 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 80049e0: 34 14 02 02 mvi r20,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; 80049e4: 34 13 ff fb mvi r19,-5 <== NOT EXECUTED 80049e8: e0 00 00 3d bi 8004adc <== 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; 80049ec: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 80049f0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80049f4: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 80049f8: f8 00 6b 53 calli 801f744 <__umodsi3> <== NOT EXECUTED 80049fc: b8 20 18 00 mv r3,r1 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 8004a00: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8004a04: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8004a08: 40 31 00 00 lbu r17,(r1+0) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 8004a0c: 59 63 00 5c sw (r11+92),r3 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 8004a10: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004a14: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED 8004a18: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004a1c: b4 81 08 00 add r1,r4,r1 <== NOT EXECUTED 8004a20: c8 23 08 00 sub r1,r1,r3 <== NOT EXECUTED 8004a24: f8 00 6b 48 calli 801f744 <__umodsi3> <== NOT EXECUTED 8004a28: 29 62 00 bc lw r2,(r11+188) <== NOT EXECUTED 8004a2c: 50 22 00 1c bgeu r1,r2,8004a9c <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 8004a30: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004a34: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED 8004a38: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004a3c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004a40: 20 21 02 02 andi r1,r1,0x202 <== NOT EXECUTED 8004a44: 5c 34 00 0c bne r1,r20,8004a74 <== NOT EXECUTED 8004a48: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8004a4c: 44 20 00 04 be r1,r0,8004a5c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 8004a50: 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)) 8004a54: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004a58: 44 20 00 07 be r1,r0,8004a74 <== 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, 8004a5c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004a60: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004a64: ba c0 10 00 mv r2,r22 <== NOT EXECUTED 8004a68: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004a6c: d8 80 00 00 call r4 <== NOT EXECUTED 8004a70: e0 00 00 0b bi 8004a9c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 8004a74: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004a78: 20 21 01 00 andi r1,r1,0x100 <== NOT EXECUTED 8004a7c: 44 20 00 08 be r1,r0,8004a9c <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 8004a80: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004a84: 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; 8004a88: a0 33 08 00 and r1,r1,r19 <== NOT EXECUTED 8004a8c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004a90: 44 60 00 03 be r3,r0,8004a9c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 8004a94: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004a98: d8 60 00 00 call r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 8004a9c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004aa0: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004aa4: 44 20 00 06 be r1,r0,8004abc <== NOT EXECUTED if (siproc (c, tty)) 8004aa8: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004aac: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004ab0: fb ff fe e1 calli 8004634 <== NOT EXECUTED 8004ab4: 5c 20 00 08 bne r1,r0,8004ad4 <== NOT EXECUTED 8004ab8: e0 00 00 08 bi 8004ad8 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 8004abc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004ac0: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004ac4: fb ff fe dc calli 8004634 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8004ac8: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8004acc: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004ad0: 48 22 00 02 bg r1,r2,8004ad8 <== NOT EXECUTED 8004ad4: 34 10 00 00 mvi r16,0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 8004ad8: 29 71 00 70 lw r17,(r11+112) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004adc: 29 62 00 5c lw r2,(r11+92) <== NOT EXECUTED 8004ae0: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004ae4: 44 41 00 05 be r2,r1,8004af8 <== NOT EXECUTED 8004ae8: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 8004aec: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004af0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004af4: 48 22 ff be bg r1,r2,80049ec <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 8004af8: 46 00 00 0e be r16,r0,8004b30 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 8004afc: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 8004b00: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED 8004b04: ba 20 18 00 mv r3,r17 <== NOT EXECUTED 8004b08: f8 00 05 bb calli 80061f4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 8004b0c: 44 20 ff f4 be r1,r0,8004adc <== NOT EXECUTED 8004b10: e0 00 00 08 bi 8004b30 <== 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++]; 8004b14: 29 63 00 1c lw r3,(r11+28) <== NOT EXECUTED count--; 8004b18: 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++]; 8004b1c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8004b20: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004b24: 32 41 00 00 sb (r18+0),r1 <== NOT EXECUTED 8004b28: 59 62 00 24 sw (r11+36),r2 <== NOT EXECUTED 8004b2c: 36 52 00 01 addi r18,r18,1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004b30: 45 c0 00 05 be r14,r0,8004b44 <== NOT EXECUTED 8004b34: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 8004b38: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 8004b3c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004b40: 48 61 ff f5 bg r3,r1,8004b14 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8004b44: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 8004b48: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004b4c: 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; 8004b50: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED 8004b54: 59 8e 00 1c sw (r12+28),r14 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 8004b58: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004b5c: f8 00 05 f6 calli 8006334 <== NOT EXECUTED return sc; } 8004b60: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004b64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004b68: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED 8004b6c: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED 8004b70: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED 8004b74: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED 8004b78: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED 8004b7c: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED 8004b80: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED 8004b84: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED 8004b88: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED 8004b8c: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED 8004b90: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED 8004b94: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED 8004b98: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED 8004b9c: c3 a0 00 00 ret <== NOT EXECUTED 08003930 : * 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) { 8003930: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8003934: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8003938: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 800393c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8003940: 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)) 8003944: 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) { 8003948: 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)) 800394c: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED 8003950: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED 8003954: 5c 41 00 12 bne r2,r1,800399c <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 8003958: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 800395c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003960: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED 8003964: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003968: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 800396c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003970: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003974: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003978: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 800397c: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003980: 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--; 8003984: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003988: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED 800398c: 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--; 8003990: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 8003994: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003998: e0 00 00 16 bi 80039f0 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 800399c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80039a0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 80039a4: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED 80039a8: 5c 41 00 14 bne r2,r1,80039f8 <== 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, 80039ac: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80039b0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80039b4: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED 80039b8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80039bc: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 80039c0: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 80039c4: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 80039c8: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 80039cc: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 80039d0: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 80039d4: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED 80039d8: 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--; 80039dc: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 80039e0: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 80039e4: 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--; 80039e8: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 80039ec: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 80039f0: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED 80039f4: e0 00 00 4c bi 8003b24 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 80039f8: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 80039fc: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED 8003a00: 5c 62 00 07 bne r3,r2,8003a1c <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 8003a04: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8003a08: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003a0c: 5c 41 00 46 bne r2,r1,8003b24 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003a10: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003a14: f8 00 0a 48 calli 8006334 <== NOT EXECUTED 8003a18: e0 00 00 43 bi 8003b24 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 8003a1c: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8003a20: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8003a24: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8003a28: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 8003a2c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 8003a30: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED tty->t_dqlen = 0; 8003a34: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED rtems_interrupt_enable(level); 8003a38: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 8003a3c: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003a40: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003a44: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003a48: f8 00 6f 3f calli 801f744 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 8003a4c: 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; 8003a50: b8 20 68 00 mv r13,r1 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 8003a54: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 8003a58: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003a5c: 5c 41 00 03 bne r2,r1,8003a68 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003a60: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003a64: f8 00 0a 34 calli 8006334 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 8003a68: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003a6c: 5d a1 00 0b bne r13,r1,8003a98 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8003a70: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 8003a74: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8003a78: 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) { 8003a7c: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 8003a80: 44 64 00 28 be r3,r4,8003b20 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 8003a84: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED 8003a88: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003a8c: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 8003a90: d8 60 00 00 call r3 <== NOT EXECUTED 8003a94: e0 00 00 23 bi 8003b20 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 8003a98: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003a9c: 34 01 02 10 mvi r1,528 <== NOT EXECUTED 8003aa0: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED 8003aa4: 5c 41 00 0d bne r2,r1,8003ad8 <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 8003aa8: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003aac: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003ab0: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003ab4: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 8003ab8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 8003abc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003ac0: 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; 8003ac4: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED 8003ac8: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 8003acc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003ad0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003ad4: e0 00 00 13 bi 8003b20 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 8003ad8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003adc: 50 2d 00 03 bgeu r1,r13,8003ae8 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 8003ae0: 29 6c 00 88 lw r12,(r11+136) <== NOT EXECUTED 8003ae4: e0 00 00 02 bi 8003aec <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 8003ae8: 29 6c 00 80 lw r12,(r11+128) <== 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)) { 8003aec: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 8003af0: c9 8d 60 00 sub r12,r12,r13 <== 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)) { 8003af4: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED 8003af8: 44 20 00 02 be r1,r0,8003b00 <== NOT EXECUTED 8003afc: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 8003b00: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003b04: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003b08: 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*/ 8003b0c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003b10: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003b14: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8003b18: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8003b1c: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003b20: 59 6d 00 84 sw (r11+132),r13 <== NOT EXECUTED } return nToSend; } 8003b24: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003b28: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003b2c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003b30: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003b34: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003b38: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003b3c: c3 a0 00 00 ret <== NOT EXECUTED 08005664 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005664: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8005668: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 800566c: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 8005670: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8005674: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 8005678: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 800567c: 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 | 8005680: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005684: b8 20 58 00 mv r11,r1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005688: 37 8f 00 1c addi r15,sp,28 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 800568c: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 8005690: 37 8d 00 23 addi r13,sp,35 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005694: b9 e0 20 00 mv r4,r15 <== NOT EXECUTED 8005698: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800569c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80056a0: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 80056a4: f8 00 01 19 calli 8005b08 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 80056a8: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 80056ac: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 80056b0: 44 20 00 05 be r1,r0,80056c4 <== NOT EXECUTED tty->rxTaskId = 0; 80056b4: 59 6c 00 c4 sw (r11+196),r12 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 80056b8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80056bc: f8 00 03 c4 calli 80065cc <== NOT EXECUTED 80056c0: e3 ff ff f5 bi 8005694 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 80056c4: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 80056c8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80056cc: d8 40 00 00 call r2 <== NOT EXECUTED 80056d0: 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 ( 80056d4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80056d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80056dc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 80056e0: 44 ae ff ed be r5,r14,8005694 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 80056e4: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 80056e8: fb ff f9 32 calli 8003bb0 <== NOT EXECUTED 80056ec: e3 ff ff ea bi 8005694 <== NOT EXECUTED 08003910 : * 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) { 8003910: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003914: 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); 8003918: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED 800391c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003920: f8 00 08 e1 calli 8005ca4 <== NOT EXECUTED } 8003924: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003928: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800392c: c3 a0 00 00 ret <== NOT EXECUTED 080055d8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 80055d8: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 80055dc: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 80055e0: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 80055e4: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 80055e8: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 80055ec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 80055f0: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 80055f4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 80055f8: 39 8c 37 7c ori r12,r12,0x377c <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 80055fc: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 8005600: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005604: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005608: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED 800560c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005610: f8 00 01 3e calli 8005b08 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 8005614: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005618: 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) { 800561c: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED 8005620: 45 c0 00 05 be r14,r0,8005634 <== NOT EXECUTED tty->txTaskId = 0; 8005624: 59 6d 00 c8 sw (r11+200),r13 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8005628: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800562c: f8 00 03 e8 calli 80065cc <== NOT EXECUTED 8005630: e3 ff ff f4 bi 8005600 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005634: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8005638: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 800563c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8005640: fb ff ef 6b calli 80013ec <__ashlsi3> <== NOT EXECUTED 8005644: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8005648: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 800564c: 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) { 8005650: 44 4e 00 02 be r2,r14,8005658 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8005654: d8 40 00 00 call r2 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 8005658: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800565c: fb ff f8 b5 calli 8003930 <== NOT EXECUTED 8005660: e3 ff ff e8 bi 8005600 <== NOT EXECUTED 080046a8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 80046a8: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 80046ac: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 80046b0: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 80046b4: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 80046b8: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 80046bc: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 80046c0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80046c4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 80046c8: 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); 80046cc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80046d0: 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; 80046d4: 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); 80046d8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 80046dc: f8 00 06 c6 calli 80061f4 <== NOT EXECUTED 80046e0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 80046e4: 5c 20 00 26 bne r1,r0,800477c <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 80046e8: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 80046ec: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80046f0: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 80046f4: fb ff f3 3e calli 80013ec <__ashlsi3> <== NOT EXECUTED 80046f8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 80046fc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004700: fb ff f3 3b calli 80013ec <__ashlsi3> <== NOT EXECUTED 8004704: 39 ce 37 7c ori r14,r14,0x377c <== NOT EXECUTED 8004708: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 800470c: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED 8004710: 44 6d 00 06 be r3,r13,8004728 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 8004714: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8004718: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800471c: d8 60 00 00 call r3 <== NOT EXECUTED 8004720: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8004724: e0 00 00 14 bi 8004774 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 8004728: 29 63 00 34 lw r3,(r11+52) <== NOT EXECUTED 800472c: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED 8004730: 29 81 00 10 lw r1,(r12+16) <== NOT EXECUTED 8004734: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED uint32_t count = args->count; 8004738: b8 40 78 00 mv r15,r2 <== NOT EXECUTED char *buffer = args->buffer; 800473c: b8 20 70 00 mv r14,r1 <== 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) { 8004740: 5c 60 00 06 bne r3,r0,8004758 <== NOT EXECUTED 8004744: e0 00 00 08 bi 8004764 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 8004748: 41 c1 00 00 lbu r1,(r14+0) <== NOT EXECUTED 800474c: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 8004750: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED 8004754: fb ff fe 3b calli 8004040 <== NOT EXECUTED 8004758: b9 60 10 00 mv r2,r11 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 800475c: 5d e0 ff fb bne r15,r0,8004748 <== NOT EXECUTED 8004760: e0 00 00 03 bi 800476c <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 8004764: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004768: fb ff fd e0 calli 8003ee8 <== NOT EXECUTED args->bytes_moved = args->count; 800476c: 29 81 00 14 lw r1,(r12+20) <== NOT EXECUTED 8004770: 59 81 00 1c sw (r12+28),r1 <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 8004774: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004778: f8 00 06 ef calli 8006334 <== NOT EXECUTED return sc; } 800477c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004780: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004784: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 8004788: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 800478c: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 8004790: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 8004794: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 8004798: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED 800479c: c3 a0 00 00 ret <== NOT EXECUTED 08006a00 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006a00: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006a04: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8006a08: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8006a0c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8006a10: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8006a14: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8006a18: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8006a1c: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8006a20: 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) 8006a24: 78 0f 20 00 mvhi r15,0x2000 <== NOT EXECUTED 8006a28: 39 ef 00 00 ori r15,r15,0x0 <== NOT EXECUTED 8006a2c: a0 2f 78 00 and r15,r1,r15 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006a30: b8 20 70 00 mv r14,r1 <== NOT EXECUTED 8006a34: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 8006a38: b8 60 60 00 mv r12,r3 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 8006a3c: 45 e0 00 11 be r15,r0,8006a80 <== NOT EXECUTED { if (rtems_panic_in_progress++) 8006a40: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8006a44: 38 84 98 1c ori r4,r4,0x981c <== NOT EXECUTED 8006a48: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8006a4c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 8006a50: 58 82 00 00 sw (r4+0),r2 <== NOT EXECUTED 8006a54: 44 20 00 06 be r1,r0,8006a6c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8006a58: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8006a5c: 38 84 99 b4 ori r4,r4,0x99b4 <== NOT EXECUTED 8006a60: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8006a64: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8006a68: 58 81 00 00 sw (r4+0),r1 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 8006a6c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006a70: 38 21 98 1c ori r1,r1,0x981c <== NOT EXECUTED 8006a74: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006a78: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8006a7c: 48 41 00 59 bg r2,r1,8006be0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 8006a80: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006a84: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED 8006a88: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8006a8c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8006a90: f8 00 32 5f calli 801340c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8006a94: 78 04 40 00 mvhi r4,0x4000 <== NOT EXECUTED 8006a98: 38 84 00 00 ori r4,r4,0x0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 8006a9c: 78 01 8f ff mvhi r1,0x8fff <== NOT EXECUTED 8006aa0: 38 21 ff ff ori r1,r1,0xffff <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8006aa4: a1 c4 20 00 and r4,r14,r4 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 8006aa8: a1 c1 80 00 and r16,r14,r1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8006aac: b8 80 58 00 mv r11,r4 <== NOT EXECUTED 8006ab0: 44 80 00 03 be r4,r0,8006abc <== NOT EXECUTED local_errno = errno; 8006ab4: f8 00 31 46 calli 8012fcc <__errno> <== NOT EXECUTED 8006ab8: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 8006abc: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8006ac0: 39 ad 91 e8 ori r13,r13,0x91e8 <== NOT EXECUTED 8006ac4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006ac8: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8006acc: ba 20 10 00 mv r2,r17 <== NOT EXECUTED 8006ad0: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006ad4: f8 00 48 b5 calli 8018da8 <== NOT EXECUTED 8006ad8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if (status) 8006adc: 46 00 00 0b be r16,r0,8006b08 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 8006ae0: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED 8006ae4: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8006ae8: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED 8006aec: fb ff ff bc calli 80069dc <== NOT EXECUTED 8006af0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006af4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8006af8: 38 42 60 60 ori r2,r2,0x6060 <== NOT EXECUTED 8006afc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006b00: f8 00 33 50 calli 8013840 <== NOT EXECUTED 8006b04: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED if (local_errno) 8006b08: 45 60 00 1a be r11,r0,8006b70 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 8006b0c: 4c 0b 00 10 bge r0,r11,8006b4c <== NOT EXECUTED 8006b10: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006b14: f8 00 37 1e calli 801478c <== NOT EXECUTED 8006b18: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8006b1c: 44 20 00 0c be r1,r0,8006b4c <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 8006b20: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006b24: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED 8006b28: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006b2c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006b30: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED 8006b34: f8 00 37 16 calli 801478c <== NOT EXECUTED 8006b38: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006b3c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8006b40: 38 42 60 70 ori r2,r2,0x6070 <== NOT EXECUTED 8006b44: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006b48: e0 00 00 08 bi 8006b68 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 8006b4c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006b50: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED 8006b54: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8006b58: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006b5c: 38 42 60 80 ori r2,r2,0x6080 <== NOT EXECUTED 8006b60: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006b64: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8006b68: f8 00 33 36 calli 8013840 <== NOT EXECUTED 8006b6c: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 8006b70: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8006b74: 39 ad 91 e8 ori r13,r13,0x91e8 <== NOT EXECUTED 8006b78: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006b7c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006b80: 38 42 58 a4 ori r2,r2,0x58a4 <== NOT EXECUTED 8006b84: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006b88: f8 00 33 2e calli 8013840 <== NOT EXECUTED 8006b8c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED (void) fflush(stderr); 8006b90: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006b94: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006b98: f8 00 32 1d calli 801340c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 8006b9c: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED 8006ba0: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED 8006ba4: a1 c2 70 00 and r14,r14,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"); 8006ba8: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 8006bac: 45 c0 00 0e be r14,r0,8006be4 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 8006bb0: 45 e0 00 07 be r15,r0,8006bcc <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 8006bb4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006bb8: 38 42 60 94 ori r2,r2,0x6094 <== NOT EXECUTED 8006bbc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006bc0: f8 00 00 26 calli 8006c58 <== NOT EXECUTED _exit(local_errno); 8006bc4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006bc8: f8 00 03 30 calli 8007888 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 8006bcc: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006bd0: 38 42 60 ac ori r2,r2,0x60ac <== NOT EXECUTED 8006bd4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8006bd8: f8 00 00 20 calli 8006c58 <== NOT EXECUTED abort(); 8006bdc: f8 00 30 ec calli 8012f8c <== NOT EXECUTED 8006be0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } return chars_written; } 8006be4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006be8: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8006bec: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 8006bf0: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8006bf4: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8006bf8: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8006bfc: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 8006c00: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8006c04: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8006c08: c3 a0 00 00 ret <== NOT EXECUTED 08027228 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8027228: 37 9c ff d4 addi sp,sp,-44 802722c: 5b 8b 00 2c sw (sp+44),r11 8027230: 5b 8c 00 28 sw (sp+40),r12 8027234: 5b 8d 00 24 sw (sp+36),r13 8027238: 5b 8e 00 20 sw (sp+32),r14 802723c: 5b 8f 00 1c sw (sp+28),r15 8027240: 5b 90 00 18 sw (sp+24),r16 8027244: 5b 91 00 14 sw (sp+20),r17 8027248: 5b 92 00 10 sw (sp+16),r18 802724c: 5b 93 00 0c sw (sp+12),r19 8027250: 5b 94 00 08 sw (sp+8),r20 8027254: 5b 9d 00 04 sw (sp+4),ra 8027258: 78 0d 7f ff mvhi r13,0x7fff 802725c: 34 0b 00 00 mvi r11,0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8027260: 78 11 08 06 mvhi r17,0x806 limit++; continue; } sign = 1; } if (!isdigit(c)) 8027264: 78 10 08 06 mvhi r16,0x806 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8027268: b8 20 60 00 mv r12,r1 802726c: b8 40 90 00 mv r18,r2 8027270: 39 ad ff ff ori r13,r13,0xffff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8027274: 3a 31 ba c8 ori r17,r17,0xbac8 limit++; continue; } sign = 1; } if (!isdigit(c)) 8027278: 3a 10 ba b8 ori r16,r16,0xbab8 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 802727c: b9 60 70 00 mv r14,r11 int sign = 0; int d; for (;;) { c = getc(fp); if (c == ':') 8027280: 34 14 00 3a mvi r20,58 break; if (sign == 0) { if (c == '-') { 8027284: 34 13 00 2d mvi r19,45 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8027288: 29 81 00 04 lw r1,(r12+4) 802728c: 34 21 ff ff addi r1,r1,-1 8027290: 59 81 00 04 sw (r12+4),r1 8027294: 4c 20 00 06 bge r1,r0,80272ac 8027298: 2a 21 00 00 lw r1,(r17+0) <== NOT EXECUTED 802729c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80272a0: f8 00 85 e2 calli 8048a28 <__srget_r> <== NOT EXECUTED 80272a4: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 80272a8: e0 00 00 05 bi 80272bc <== NOT EXECUTED 80272ac: 29 82 00 00 lw r2,(r12+0) 80272b0: 34 41 00 01 addi r1,r2,1 80272b4: 40 4f 00 00 lbu r15,(r2+0) 80272b8: 59 81 00 00 sw (r12+0),r1 if (c == ':') 80272bc: 45 f4 00 1d be r15,r20,8027330 break; if (sign == 0) { 80272c0: 5d c0 00 06 bne r14,r0,80272d8 if (c == '-') { sign = -1; limit++; continue; 80272c4: 34 0e 00 01 mvi r14,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 80272c8: 5d f3 00 04 bne r15,r19,80272d8 sign = -1; limit++; 80272cc: b5 ae 68 00 add r13,r13,r14 <== NOT EXECUTED 80272d0: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED continue; 80272d4: e3 ff ff ed bi 8027288 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 80272d8: 2a 01 00 00 lw r1,(r16+0) 80272dc: b4 2f 08 00 add r1,r1,r15 80272e0: 40 21 00 01 lbu r1,(r1+1) 80272e4: 20 21 00 04 andi r1,r1,0x4 80272e8: 44 20 00 19 be r1,r0,802734c return 0; d = c - '0'; if ((i > (limit / 10)) 80272ec: b9 a0 08 00 mv r1,r13 80272f0: 34 02 00 0a mvi r2,10 80272f4: fb ff 70 ca calli 800361c <__udivsi3> 80272f8: 55 61 00 15 bgu r11,r1,802734c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 80272fc: 35 ef ff d0 addi r15,r15,-48 if ((i > (limit / 10)) 8027300: 5d 61 00 05 bne r11,r1,8027314 8027304: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8027308: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 802730c: fb ff 70 d4 calli 800365c <__umodsi3> <== NOT EXECUTED 8027310: 55 e1 00 0f bgu r15,r1,802734c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 8027314: b5 6b 58 00 add r11,r11,r11 8027318: b9 60 08 00 mv r1,r11 802731c: 34 02 00 02 mvi r2,2 8027320: fb ff 67 86 calli 8001138 <__ashlsi3> 8027324: b5 61 58 00 add r11,r11,r1 8027328: b5 eb 58 00 add r11,r15,r11 802732c: e3 ff ff d7 bi 8027288 } if (sign == 0) 8027330: 45 c0 00 07 be r14,r0,802734c return 0; *val = i * sign; 8027334: b9 c0 08 00 mv r1,r14 8027338: b9 60 10 00 mv r2,r11 802733c: fb ff 70 98 calli 800359c <__mulsi3> 8027340: 5a 41 00 00 sw (r18+0),r1 8027344: 34 01 00 01 mvi r1,1 return 1; 8027348: e0 00 00 02 bi 8027350 802734c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8027350: 2b 9d 00 04 lw ra,(sp+4) 8027354: 2b 8b 00 2c lw r11,(sp+44) 8027358: 2b 8c 00 28 lw r12,(sp+40) 802735c: 2b 8d 00 24 lw r13,(sp+36) 8027360: 2b 8e 00 20 lw r14,(sp+32) 8027364: 2b 8f 00 1c lw r15,(sp+28) 8027368: 2b 90 00 18 lw r16,(sp+24) 802736c: 2b 91 00 14 lw r17,(sp+20) 8027370: 2b 92 00 10 lw r18,(sp+16) 8027374: 2b 93 00 0c lw r19,(sp+12) 8027378: 2b 94 00 08 lw r20,(sp+8) 802737c: 37 9c 00 2c addi sp,sp,44 8027380: c3 a0 00 00 ret 08027384 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8027384: 37 9c ff d8 addi sp,sp,-40 8027388: 5b 8b 00 28 sw (sp+40),r11 802738c: 5b 8c 00 24 sw (sp+36),r12 8027390: 5b 8d 00 20 sw (sp+32),r13 8027394: 5b 8e 00 1c sw (sp+28),r14 8027398: 5b 8f 00 18 sw (sp+24),r15 802739c: 5b 90 00 14 sw (sp+20),r16 80273a0: 5b 91 00 10 sw (sp+16),r17 80273a4: 5b 92 00 0c sw (sp+12),r18 80273a8: 5b 93 00 08 sw (sp+8),r19 80273ac: 5b 9d 00 04 sw (sp+4),ra 80273b0: b8 60 58 00 mv r11,r3 int c; *name = *bufp; 80273b4: 28 63 00 00 lw r3,(r3+0) for (;;) { c = getc(fp); 80273b8: 78 0e 08 06 mvhi r14,0x806 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 80273bc: b8 20 68 00 mv r13,r1 int c; *name = *bufp; 80273c0: 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) { 80273c4: b8 80 60 00 mv r12,r4 80273c8: b8 a0 78 00 mv r15,r5 int c; *name = *bufp; for (;;) { c = getc(fp); 80273cc: 39 ce ba c8 ori r14,r14,0xbac8 if (c == ':') { 80273d0: 34 13 00 3a mvi r19,58 if (nlFlag) return 0; break; } if (c == '\n') { 80273d4: 34 12 00 0a mvi r18,10 if (!nlFlag) return 0; break; } if (c == EOF) 80273d8: 34 11 ff ff mvi r17,-1 return 0; if (*nleft < 2) 80273dc: 34 10 00 01 mvi r16,1 { int c; *name = *bufp; for (;;) { c = getc(fp); 80273e0: 29 a1 00 04 lw r1,(r13+4) 80273e4: 34 21 ff ff addi r1,r1,-1 80273e8: 59 a1 00 04 sw (r13+4),r1 80273ec: 4c 20 00 05 bge r1,r0,8027400 80273f0: 29 c1 00 00 lw r1,(r14+0) 80273f4: b9 a0 10 00 mv r2,r13 80273f8: f8 00 85 8c calli 8048a28 <__srget_r> 80273fc: e0 00 00 05 bi 8027410 8027400: 29 a1 00 00 lw r1,(r13+0) 8027404: 34 22 00 01 addi r2,r1,1 8027408: 40 21 00 00 lbu r1,(r1+0) 802740c: 59 a2 00 00 sw (r13+0),r2 if (c == ':') { 8027410: 5c 33 00 03 bne r1,r19,802741c if (nlFlag) 8027414: 45 e0 00 11 be r15,r0,8027458 8027418: e0 00 00 1b bi 8027484 <== NOT EXECUTED return 0; break; } if (c == '\n') { 802741c: 5c 32 00 03 bne r1,r18,8027428 if (!nlFlag) 8027420: 5d e0 00 0e bne r15,r0,8027458 8027424: e0 00 00 18 bi 8027484 <== NOT EXECUTED return 0; break; } if (c == EOF) 8027428: 44 31 00 17 be r1,r17,8027484 return 0; if (*nleft < 2) 802742c: 29 82 00 00 lw r2,(r12+0) 8027430: 52 02 00 15 bgeu r16,r2,8027484 return 0; **bufp = c; 8027434: 29 62 00 00 lw r2,(r11+0) 8027438: 30 41 00 00 sb (r2+0),r1 ++(*bufp); 802743c: 29 62 00 00 lw r2,(r11+0) --(*nleft); 8027440: 29 81 00 00 lw r1,(r12+0) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 8027444: 34 42 00 01 addi r2,r2,1 --(*nleft); 8027448: 34 21 ff ff addi r1,r1,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 802744c: 59 62 00 00 sw (r11+0),r2 --(*nleft); 8027450: 59 81 00 00 sw (r12+0),r1 } 8027454: e3 ff ff e3 bi 80273e0 **bufp = '\0'; 8027458: 29 63 00 00 lw r3,(r11+0) 802745c: 34 02 00 00 mvi r2,0 ++(*bufp); --(*nleft); 8027460: 34 01 00 01 mvi r1,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 8027464: 30 62 00 00 sb (r3+0),r2 ++(*bufp); 8027468: 29 63 00 00 lw r3,(r11+0) --(*nleft); 802746c: 29 82 00 00 lw r2,(r12+0) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 8027470: b4 61 18 00 add r3,r3,r1 --(*nleft); 8027474: 34 42 ff ff addi r2,r2,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 8027478: 59 63 00 00 sw (r11+0),r3 --(*nleft); 802747c: 59 82 00 00 sw (r12+0),r2 return 1; 8027480: e0 00 00 02 bi 8027488 8027484: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8027488: 2b 9d 00 04 lw ra,(sp+4) 802748c: 2b 8b 00 28 lw r11,(sp+40) 8027490: 2b 8c 00 24 lw r12,(sp+36) 8027494: 2b 8d 00 20 lw r13,(sp+32) 8027498: 2b 8e 00 1c lw r14,(sp+28) 802749c: 2b 8f 00 18 lw r15,(sp+24) 80274a0: 2b 90 00 14 lw r16,(sp+20) 80274a4: 2b 91 00 10 lw r17,(sp+16) 80274a8: 2b 92 00 0c lw r18,(sp+12) 80274ac: 2b 93 00 08 lw r19,(sp+8) 80274b0: 37 9c 00 28 addi sp,sp,40 80274b4: c3 a0 00 00 ret 080274b8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 80274b8: 37 9c ff d4 addi sp,sp,-44 80274bc: 5b 8b 00 1c sw (sp+28),r11 80274c0: 5b 8c 00 18 sw (sp+24),r12 80274c4: 5b 8d 00 14 sw (sp+20),r13 80274c8: 5b 8e 00 10 sw (sp+16),r14 80274cc: 5b 8f 00 0c sw (sp+12),r15 80274d0: 5b 90 00 08 sw (sp+8),r16 80274d4: 5b 9d 00 04 sw (sp+4),ra int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 80274d8: 37 8d 00 24 addi r13,sp,36 80274dc: 37 8c 00 20 addi r12,sp,32 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 80274e0: 5b 83 00 24 sw (sp+36),r3 80274e4: 5b 84 00 20 sw (sp+32),r4 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 80274e8: b9 a0 18 00 mv r3,r13 80274ec: b9 80 20 00 mv r4,r12 80274f0: 34 05 00 00 mvi r5,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 80274f4: b8 20 70 00 mv r14,r1 80274f8: b8 40 58 00 mv r11,r2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 80274fc: fb ff ff a2 calli 8027384 8027500: 44 20 00 44 be r1,r0,8027610 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 8027504: b9 c0 08 00 mv r1,r14 8027508: 35 62 00 04 addi r2,r11,4 802750c: b9 a0 18 00 mv r3,r13 8027510: b9 80 20 00 mv r4,r12 8027514: 34 05 00 00 mvi r5,0 8027518: fb ff ff 9b calli 8027384 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802751c: 44 20 00 3d be r1,r0,8027610 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 8027520: b9 c0 08 00 mv r1,r14 8027524: 37 82 00 2c addi r2,sp,44 8027528: fb ff ff 40 calli 8027228 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802752c: 44 20 00 39 be r1,r0,8027610 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 8027530: b9 c0 08 00 mv r1,r14 8027534: b9 a0 18 00 mv r3,r13 8027538: b9 80 20 00 mv r4,r12 802753c: 37 82 00 28 addi r2,sp,40 8027540: 34 05 00 01 mvi r5,1 8027544: fb ff ff 90 calli 8027384 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8027548: 44 20 00 32 be r1,r0,8027610 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 802754c: 2f 82 00 2e lhu r2,(sp+46) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027550: 2b 8d 00 28 lw r13,(sp+40) 8027554: 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; 8027558: 0d 62 00 08 sh (r11+8),r2 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802755c: b9 a0 10 00 mv r2,r13 8027560: e0 00 00 02 bi 8027568 if(*cp == ',') memcount++; 8027564: b4 23 08 00 add r1,r1,r3 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027568: 40 4c 00 00 lbu r12,(r2+0) 802756c: 34 42 00 01 addi r2,r2,1 if(*cp == ',') memcount++; 8027570: 65 83 00 2c cmpei r3,r12,44 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027574: 5d 80 ff fc bne r12,r0,8027564 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 8027578: 34 02 00 02 mvi r2,2 802757c: 34 21 00 01 addi r1,r1,1 8027580: fb ff 66 ee calli 8001138 <__ashlsi3> 8027584: 2b 82 00 20 lw r2,(sp+32) 8027588: 34 21 00 0f addi r1,r1,15 802758c: 54 22 00 21 bgu r1,r2,8027610 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 8027590: 2b 81 00 24 lw r1,(sp+36) 8027594: 34 02 ff f0 mvi r2,-16 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027598: b9 80 80 00 mv r16,r12 /* * 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); 802759c: 34 21 00 0f addi r1,r1,15 80275a0: a0 22 08 00 and r1,r1,r2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 80275a4: 58 2d 00 00 sw (r1+0),r13 80275a8: 2b 8c 00 28 lw r12,(sp+40) 80275ac: 34 0d 00 01 mvi r13,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); 80275b0: 59 61 00 0c sw (r11+12),r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 80275b4: b5 8d 60 00 add r12,r12,r13 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 80275b8: 34 0f 00 2c mvi r15,44 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80275bc: e0 00 00 0b bi 80275e8 if(*cp == ',') { 80275c0: 5d cf 00 09 bne r14,r15,80275e4 *cp = '\0'; 80275c4: 31 90 ff ff sb (r12+-1),r16 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 80275c8: 29 6e 00 0c lw r14,(r11+12) <== NOT EXECUTED 80275cc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80275d0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80275d4: fb ff 66 d9 calli 8001138 <__ashlsi3> <== NOT EXECUTED 80275d8: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 80275dc: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 80275e0: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED 80275e4: 35 8c 00 01 addi r12,r12,1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80275e8: 41 8e ff ff lbu r14,(r12+-1) 80275ec: 5d c0 ff f5 bne r14,r0,80275c0 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 80275f0: 29 6b 00 0c lw r11,(r11+12) 80275f4: b9 a0 08 00 mv r1,r13 80275f8: 34 02 00 02 mvi r2,2 80275fc: fb ff 66 cf calli 8001138 <__ashlsi3> 8027600: b5 61 08 00 add r1,r11,r1 8027604: 58 2e 00 00 sw (r1+0),r14 8027608: 34 01 00 01 mvi r1,1 return 1; 802760c: e0 00 00 02 bi 8027614 8027610: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8027614: 2b 9d 00 04 lw ra,(sp+4) 8027618: 2b 8b 00 1c lw r11,(sp+28) 802761c: 2b 8c 00 18 lw r12,(sp+24) 8027620: 2b 8d 00 14 lw r13,(sp+20) 8027624: 2b 8e 00 10 lw r14,(sp+16) 8027628: 2b 8f 00 0c lw r15,(sp+12) 802762c: 2b 90 00 08 lw r16,(sp+8) 8027630: 37 9c 00 2c addi sp,sp,44 8027634: c3 a0 00 00 ret 08027688 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 8027688: 37 9c ff dc addi sp,sp,-36 802768c: 5b 8b 00 14 sw (sp+20),r11 8027690: 5b 8c 00 10 sw (sp+16),r12 8027694: 5b 8d 00 0c sw (sp+12),r13 8027698: 5b 8e 00 08 sw (sp+8),r14 802769c: 5b 9d 00 04 sw (sp+4),ra int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80276a0: 37 8e 00 1c addi r14,sp,28 80276a4: 37 8d 00 18 addi r13,sp,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 80276a8: 5b 83 00 1c sw (sp+28),r3 80276ac: 5b 84 00 18 sw (sp+24),r4 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80276b0: b9 c0 18 00 mv r3,r14 80276b4: b9 a0 20 00 mv r4,r13 80276b8: 34 05 00 00 mvi r5,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 80276bc: b8 20 60 00 mv r12,r1 80276c0: b8 40 58 00 mv r11,r2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80276c4: fb ff ff 30 calli 8027384 80276c8: 44 20 00 32 be r1,r0,8027790 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 80276cc: b9 80 08 00 mv r1,r12 80276d0: 35 62 00 04 addi r2,r11,4 80276d4: b9 c0 18 00 mv r3,r14 80276d8: b9 a0 20 00 mv r4,r13 80276dc: 34 05 00 00 mvi r5,0 80276e0: fb ff ff 29 calli 8027384 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80276e4: 44 20 00 2b be r1,r0,8027790 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 80276e8: b9 80 08 00 mv r1,r12 80276ec: 37 82 00 24 addi r2,sp,36 80276f0: fb ff fe ce calli 8027228 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80276f4: 44 20 00 27 be r1,r0,8027790 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 80276f8: b9 80 08 00 mv r1,r12 80276fc: 37 82 00 20 addi r2,sp,32 8027700: fb ff fe ca calli 8027228 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027704: 44 20 00 23 be r1,r0,8027790 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 8027708: b9 80 08 00 mv r1,r12 802770c: 35 62 00 0c addi r2,r11,12 8027710: b9 c0 18 00 mv r3,r14 8027714: b9 a0 20 00 mv r4,r13 8027718: 34 05 00 00 mvi r5,0 802771c: fb ff ff 1a calli 8027384 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027720: 44 20 00 1c be r1,r0,8027790 || !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) 8027724: b9 80 08 00 mv r1,r12 8027728: 35 62 00 10 addi r2,r11,16 802772c: b9 c0 18 00 mv r3,r14 8027730: b9 a0 20 00 mv r4,r13 8027734: 34 05 00 00 mvi r5,0 8027738: fb ff ff 13 calli 8027384 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802773c: 44 20 00 15 be r1,r0,8027790 || !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) 8027740: b9 80 08 00 mv r1,r12 8027744: 35 62 00 14 addi r2,r11,20 8027748: b9 c0 18 00 mv r3,r14 802774c: b9 a0 20 00 mv r4,r13 8027750: 34 05 00 00 mvi r5,0 8027754: fb ff ff 0c calli 8027384 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027758: 44 20 00 0e be r1,r0,8027790 || !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)) 802775c: b9 80 08 00 mv r1,r12 8027760: b9 c0 18 00 mv r3,r14 8027764: b9 a0 20 00 mv r4,r13 8027768: 35 62 00 18 addi r2,r11,24 802776c: 34 05 00 01 mvi r5,1 8027770: fb ff ff 05 calli 8027384 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027774: 44 20 00 07 be r1,r0,8027790 || !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; 8027778: 2f 82 00 26 lhu r2,(sp+38) pwd->pw_gid = pwgid; 802777c: 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; 8027780: 0d 62 00 08 sh (r11+8),r2 pwd->pw_gid = pwgid; 8027784: 2b 82 00 20 lw r2,(sp+32) 8027788: 0d 62 00 0a sh (r11+10),r2 return 1; 802778c: e0 00 00 02 bi 8027794 8027790: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8027794: 2b 9d 00 04 lw ra,(sp+4) 8027798: 2b 8b 00 14 lw r11,(sp+20) 802779c: 2b 8c 00 10 lw r12,(sp+16) 80277a0: 2b 8d 00 0c lw r13,(sp+12) 80277a4: 2b 8e 00 08 lw r14,(sp+8) 80277a8: 37 9c 00 24 addi sp,sp,36 80277ac: c3 a0 00 00 ret 080271c0 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 80271c0: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80271c4: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 80271c8: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 80271cc: 0c 41 00 34 sh (r2+52),r1 <== NOT EXECUTED return 0; } 80271d0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80271d4: c3 a0 00 00 ret <== NOT EXECUTED 080278ec : return NULL; return &grent; } void setgrent(void) { 80278ec: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80278f0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); 80278f4: fb ff ff c3 calli 8027800 <== NOT EXECUTED if (group_fp != NULL) 80278f8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80278fc: 38 21 ec a0 ori r1,r1,0xeca0 <== NOT EXECUTED 8027900: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027904: 44 20 00 02 be r1,r0,802790c <== NOT EXECUTED fclose(group_fp); 8027908: f8 00 6c 69 calli 8042aac <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 802790c: 78 01 08 05 mvhi r1,0x805 <== NOT EXECUTED 8027910: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027914: 38 42 78 ac ori r2,r2,0x78ac <== NOT EXECUTED 8027918: 38 21 fe 34 ori r1,r1,0xfe34 <== NOT EXECUTED 802791c: f8 00 6f 09 calli 8043540 <== NOT EXECUTED 8027920: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027924: 38 42 ec a0 ori r2,r2,0xeca0 <== NOT EXECUTED 8027928: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } 802792c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027930: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027934: c3 a0 00 00 ret <== NOT EXECUTED 08027b28 : return NULL; return &pwent; } void setpwent(void) { 8027b28: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027b2c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); 8027b30: fb ff ff 34 calli 8027800 <== NOT EXECUTED if (passwd_fp != NULL) 8027b34: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027b38: 38 21 eb b8 ori r1,r1,0xebb8 <== NOT EXECUTED 8027b3c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027b40: 44 20 00 02 be r1,r0,8027b48 <== NOT EXECUTED fclose(passwd_fp); 8027b44: f8 00 6b da calli 8042aac <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 8027b48: 78 01 08 05 mvhi r1,0x805 <== NOT EXECUTED 8027b4c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027b50: 38 42 78 ac ori r2,r2,0x78ac <== NOT EXECUTED 8027b54: 38 21 fd 84 ori r1,r1,0xfd84 <== NOT EXECUTED 8027b58: f8 00 6e 7a calli 8043540 <== NOT EXECUTED 8027b5c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027b60: 38 42 eb b8 ori r2,r2,0xebb8 <== NOT EXECUTED 8027b64: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } 8027b68: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027b6c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027b70: c3 a0 00 00 ret <== NOT EXECUTED 08007748 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 8007748: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800774c: 38 42 b2 f0 ori r2,r2,0xb2f0 <== NOT EXECUTED 8007750: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8007754: 0c 41 00 32 sh (r2+50),r1 <== NOT EXECUTED return 0; } 8007758: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800775c: c3 a0 00 00 ret <== NOT EXECUTED 08004634 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8004634: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004638: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800463c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004640: 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)) { 8004644: 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) { 8004648: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED 800464c: 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)) { 8004650: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED 8004654: 44 20 00 0c be r1,r0,8004684 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004658: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 800465c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004660: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004664: f8 00 06 e4 calli 80061f4 <== NOT EXECUTED i = iproc (c, tty); 8004668: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800466c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004670: fb ff ff 82 calli 8004478 <== NOT EXECUTED 8004674: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 8004678: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 800467c: f8 00 07 2e calli 8006334 <== NOT EXECUTED 8004680: e0 00 00 04 bi 8004690 <== NOT EXECUTED } else { i = iproc (c, tty); 8004684: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004688: fb ff ff 7c calli 8004478 <== NOT EXECUTED 800468c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED } return i; } 8004690: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004694: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004698: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800469c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80046a0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80046a4: c3 a0 00 00 ret <== NOT EXECUTED 08008ef4 : int _STAT_NAME( const char *path, struct stat *buf ) { 8008ef4: 37 9c ff dc addi sp,sp,-36 8008ef8: 5b 8b 00 10 sw (sp+16),r11 8008efc: 5b 8c 00 0c sw (sp+12),r12 8008f00: 5b 8d 00 08 sw (sp+8),r13 8008f04: 5b 9d 00 04 sw (sp+4),ra 8008f08: b8 40 68 00 mv r13,r2 8008f0c: b8 20 58 00 mv r11,r1 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 8008f10: 5c 40 00 04 bne r2,r0,8008f20 rtems_set_errno_and_return_minus_one( EFAULT ); 8008f14: f8 00 e6 84 calli 8042924 <__errno> 8008f18: 34 02 00 0e mvi r2,14 8008f1c: e0 00 00 16 bi 8008f74 status = rtems_filesystem_evaluate_path( path, strlen( path ), 8008f20: f8 01 04 6b calli 804a0cc 8008f24: 37 8c 00 14 addi r12,sp,20 8008f28: b8 20 10 00 mv r2,r1 8008f2c: 34 03 00 00 mvi r3,0 8008f30: b9 60 08 00 mv r1,r11 8008f34: b9 80 20 00 mv r4,r12 8008f38: 34 05 00 01 mvi r5,1 8008f3c: fb ff f9 67 calli 80074d8 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 8008f40: 34 0b ff ff mvi r11,-1 8008f44: 5c 20 00 1f bne r1,r0,8008fc0 return -1; if ( !loc.handlers->fstat_h ){ 8008f48: 2b 82 00 1c lw r2,(sp+28) 8008f4c: 28 42 00 18 lw r2,(r2+24) 8008f50: 5c 41 00 0c bne r2,r1,8008f80 rtems_filesystem_freenode( &loc ); 8008f54: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8008f58: 44 22 00 05 be r1,r2,8008f6c <== NOT EXECUTED 8008f5c: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 8008f60: 44 62 00 03 be r3,r2,8008f6c <== NOT EXECUTED 8008f64: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8008f68: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8008f6c: f8 00 e6 6e calli 8042924 <__errno> <== NOT EXECUTED 8008f70: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8008f74: 58 22 00 00 sw (r1+0),r2 8008f78: 34 0b ff ff mvi r11,-1 8008f7c: e0 00 00 11 bi 8008fc0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 8008f80: b8 20 10 00 mv r2,r1 8008f84: 34 03 00 48 mvi r3,72 8008f88: b9 a0 08 00 mv r1,r13 8008f8c: f8 00 f5 d2 calli 80466d4 status = (*loc.handlers->fstat_h)( &loc, buf ); 8008f90: 2b 83 00 1c lw r3,(sp+28) 8008f94: b9 a0 10 00 mv r2,r13 8008f98: b9 80 08 00 mv r1,r12 8008f9c: 28 63 00 18 lw r3,(r3+24) 8008fa0: d8 60 00 00 call r3 8008fa4: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8008fa8: 2b 81 00 20 lw r1,(sp+32) 8008fac: 44 20 00 05 be r1,r0,8008fc0 8008fb0: 28 22 00 1c lw r2,(r1+28) 8008fb4: 44 40 00 03 be r2,r0,8008fc0 8008fb8: b9 80 08 00 mv r1,r12 8008fbc: d8 40 00 00 call r2 return status; } 8008fc0: b9 60 08 00 mv r1,r11 8008fc4: 2b 9d 00 04 lw ra,(sp+4) 8008fc8: 2b 8b 00 10 lw r11,(sp+16) 8008fcc: 2b 8c 00 0c lw r12,(sp+12) 8008fd0: 2b 8d 00 08 lw r13,(sp+8) 8008fd4: 37 9c 00 24 addi sp,sp,36 8008fd8: c3 a0 00 00 ret 08028a74 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 8028a74: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8028a78: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8028a7c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8028a80: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8028a84: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028a88: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8028a8c: b8 40 68 00 mv r13,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 ) ) 8028a90: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 8028a94: f8 00 85 8e calli 804a0cc <== NOT EXECUTED 8028a98: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028a9c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8028aa0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028aa4: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8028aa8: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8028aac: fb ff 7a 8b calli 80074d8 <== NOT EXECUTED 8028ab0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8028ab4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028ab8: 5c 20 00 1a bne r1,r0,8028b20 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 8028abc: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 8028ac0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8028ac4: 28 21 00 44 lw r1,(r1+68) <== NOT EXECUTED 8028ac8: 5c 23 00 06 bne r1,r3,8028ae0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028acc: f8 00 67 96 calli 8042924 <__errno> <== NOT EXECUTED 8028ad0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028ad4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028ad8: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028adc: e0 00 00 11 bi 8028b20 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 8028ae0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8028ae4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028ae8: 34 03 00 38 mvi r3,56 <== NOT EXECUTED 8028aec: f8 00 76 fa calli 80466d4 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 8028af0: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED 8028af4: 35 61 00 1c addi r1,r11,28 <== NOT EXECUTED 8028af8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8028afc: 28 63 00 44 lw r3,(r3+68) <== NOT EXECUTED 8028b00: d8 60 00 00 call r3 <== NOT EXECUTED 8028b04: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8028b08: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8028b0c: 44 20 00 05 be r1,r0,8028b20 <== NOT EXECUTED 8028b10: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028b14: 44 40 00 03 be r2,r0,8028b20 <== NOT EXECUTED 8028b18: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028b1c: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 8028b20: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028b24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028b28: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8028b2c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8028b30: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8028b34: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8028b38: c3 a0 00 00 ret <== NOT EXECUTED 08028b3c : int symlink( const char *actualpath, const char *sympath ) { 8028b3c: 37 9c ff d4 addi sp,sp,-44 8028b40: 5b 8b 00 14 sw (sp+20),r11 8028b44: 5b 8c 00 10 sw (sp+16),r12 8028b48: 5b 8d 00 0c sw (sp+12),r13 8028b4c: 5b 8e 00 08 sw (sp+8),r14 8028b50: 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 ); 8028b54: 40 43 00 00 lbu r3,(r2+0) int symlink( const char *actualpath, const char *sympath ) { 8028b58: b8 20 70 00 mv r14,r1 8028b5c: b8 40 68 00 mv r13,r2 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 8028b60: 64 6b 00 5c cmpei r11,r3,92 8028b64: 64 61 00 2f cmpei r1,r3,47 8028b68: b9 61 58 00 or r11,r11,r1 8028b6c: 5d 60 00 02 bne r11,r0,8028b74 8028b70: 5c 6b 00 0a bne r3,r11,8028b98 8028b74: 78 03 08 06 mvhi r3,0x806 8028b78: 38 63 b2 f0 ori r3,r3,0xb2f0 8028b7c: 28 64 00 00 lw r4,(r3+0) 8028b80: 37 81 00 18 addi r1,sp,24 8028b84: 34 03 00 14 mvi r3,20 8028b88: 34 82 00 18 addi r2,r4,24 8028b8c: f8 00 76 08 calli 80463ac 8028b90: 34 0b 00 01 mvi r11,1 8028b94: e0 00 00 08 bi 8028bb4 8028b98: 78 03 08 06 mvhi r3,0x806 8028b9c: 38 63 b2 f0 ori r3,r3,0xb2f0 8028ba0: 28 64 00 00 lw r4,(r3+0) 8028ba4: 37 81 00 18 addi r1,sp,24 8028ba8: 34 03 00 14 mvi r3,20 8028bac: 34 82 00 04 addi r2,r4,4 8028bb0: f8 00 75 ff calli 80463ac if ( !loc.ops->evalformake_h ) { 8028bb4: 2b 81 00 24 lw r1,(sp+36) 8028bb8: 28 24 00 04 lw r4,(r1+4) 8028bbc: 44 80 00 0f be r4,r0,8028bf8 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 8028bc0: 37 8c 00 18 addi r12,sp,24 8028bc4: b5 ab 08 00 add r1,r13,r11 8028bc8: b9 80 10 00 mv r2,r12 8028bcc: 37 83 00 2c addi r3,sp,44 8028bd0: d8 80 00 00 call r4 if ( result != 0 ) 8028bd4: 34 0b ff ff mvi r11,-1 8028bd8: 5c 20 00 18 bne r1,r0,8028c38 return -1; if ( !loc.ops->symlink_h ) { 8028bdc: 2b 83 00 24 lw r3,(sp+36) 8028be0: 28 64 00 38 lw r4,(r3+56) 8028be4: 5c 81 00 0a bne r4,r1,8028c0c rtems_filesystem_freenode( &loc ); 8028be8: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 8028bec: 44 44 00 03 be r2,r4,8028bf8 <== NOT EXECUTED 8028bf0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028bf4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028bf8: f8 00 67 4b calli 8042924 <__errno> <== NOT EXECUTED 8028bfc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028c00: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028c04: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028c08: e0 00 00 0c bi 8028c38 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 8028c0c: 2b 83 00 2c lw r3,(sp+44) 8028c10: b9 c0 10 00 mv r2,r14 8028c14: b9 80 08 00 mv r1,r12 8028c18: d8 80 00 00 call r4 8028c1c: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8028c20: 2b 81 00 24 lw r1,(sp+36) 8028c24: 44 20 00 05 be r1,r0,8028c38 8028c28: 28 22 00 1c lw r2,(r1+28) 8028c2c: 44 40 00 03 be r2,r0,8028c38 8028c30: b9 80 08 00 mv r1,r12 8028c34: d8 40 00 00 call r2 return result; } 8028c38: b9 60 08 00 mv r1,r11 8028c3c: 2b 9d 00 04 lw ra,(sp+4) 8028c40: 2b 8b 00 14 lw r11,(sp+20) 8028c44: 2b 8c 00 10 lw r12,(sp+16) 8028c48: 2b 8d 00 0c lw r13,(sp+12) 8028c4c: 2b 8e 00 08 lw r14,(sp+8) 8028c50: 37 9c 00 2c addi sp,sp,44 8028c54: c3 a0 00 00 ret 08010748 : int tcsetattr( int fd, int opt, struct termios *tp ) { 8010748: 37 9c ff f4 addi sp,sp,-12 801074c: 5b 8b 00 0c sw (sp+12),r11 8010750: 5b 8c 00 08 sw (sp+8),r12 8010754: 5b 9d 00 04 sw (sp+4),ra 8010758: b8 60 58 00 mv r11,r3 801075c: b8 20 60 00 mv r12,r1 switch (opt) { 8010760: 44 40 00 0d be r2,r0,8010794 8010764: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8010768: 44 43 00 05 be r2,r3,801077c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 801076c: f8 00 12 44 calli 801507c <__errno> <== NOT EXECUTED 8010770: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8010774: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010778: e0 00 00 05 bi 801078c <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 801077c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8010780: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8010784: f8 00 0e 1c calli 8013ff4 <== NOT EXECUTED 8010788: 4c 20 00 03 bge r1,r0,8010794 <== NOT EXECUTED 801078c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010790: e0 00 00 05 bi 80107a4 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 8010794: b9 80 08 00 mv r1,r12 8010798: b9 60 18 00 mv r3,r11 801079c: 34 02 00 02 mvi r2,2 80107a0: f8 00 0e 15 calli 8013ff4 } } 80107a4: 2b 9d 00 04 lw ra,(sp+4) 80107a8: 2b 8b 00 0c lw r11,(sp+12) 80107ac: 2b 8c 00 08 lw r12,(sp+8) 80107b0: 37 9c 00 0c addi sp,sp,12 80107b4: c3 a0 00 00 ret 0800abd4 : #include int unlink( const char *path ) { 800abd4: 37 9c ff c0 addi sp,sp,-64 800abd8: 5b 8b 00 18 sw (sp+24),r11 800abdc: 5b 8c 00 14 sw (sp+20),r12 800abe0: 5b 8d 00 10 sw (sp+16),r13 800abe4: 5b 8e 00 0c sw (sp+12),r14 800abe8: 5b 8f 00 08 sw (sp+8),r15 800abec: 5b 9d 00 04 sw (sp+4),ra 800abf0: b8 20 78 00 mv r15,r1 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 800abf4: fb ff d8 2e calli 8000cac 800abf8: b8 20 68 00 mv r13,r1 if ( parentpathlen == 0 ) 800abfc: 5c 20 00 19 bne r1,r0,800ac60 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800ac00: 41 e1 00 00 lbu r1,(r15+0) 800ac04: 64 23 00 5c cmpei r3,r1,92 800ac08: 64 22 00 2f cmpei r2,r1,47 800ac0c: b8 62 10 00 or r2,r3,r2 800ac10: 5c 4d 00 02 bne r2,r13,800ac18 800ac14: 5c 20 00 0a bne r1,r0,800ac3c <== NOT EXECUTED 800ac18: 78 01 08 01 mvhi r1,0x801 800ac1c: 38 21 c1 10 ori r1,r1,0xc110 800ac20: 28 22 00 00 lw r2,(r1+0) 800ac24: 34 03 00 14 mvi r3,20 800ac28: 37 81 00 30 addi r1,sp,48 800ac2c: 34 42 00 18 addi r2,r2,24 800ac30: f8 00 03 59 calli 800b994 800ac34: 34 0c 00 00 mvi r12,0 800ac38: e0 00 00 12 bi 800ac80 800ac3c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800ac40: 38 21 c1 10 ori r1,r1,0xc110 <== NOT EXECUTED 800ac44: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 800ac48: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 800ac4c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800ac50: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 800ac54: f8 00 03 50 calli 800b994 <== NOT EXECUTED 800ac58: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED 800ac5c: e0 00 00 09 bi 800ac80 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 800ac60: b9 e0 08 00 mv r1,r15 800ac64: b9 a0 10 00 mv r2,r13 800ac68: 34 03 00 02 mvi r3,2 800ac6c: 37 84 00 30 addi r4,sp,48 800ac70: 34 05 00 00 mvi r5,0 800ac74: fb ff d8 5c calli 8000de4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 800ac78: 5c 20 00 5d bne r1,r0,800adec 800ac7c: 34 0c 00 01 mvi r12,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800ac80: 37 8b 00 1c addi r11,sp,28 800ac84: 37 8e 00 30 addi r14,sp,48 800ac88: 34 03 00 14 mvi r3,20 800ac8c: b9 c0 10 00 mv r2,r14 800ac90: b9 60 08 00 mv r1,r11 800ac94: f8 00 03 40 calli 800b994 name = path + parentpathlen; 800ac98: b5 ed 68 00 add r13,r15,r13 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800ac9c: b9 a0 08 00 mv r1,r13 800aca0: f8 00 05 67 calli 800c23c 800aca4: b8 20 10 00 mv r2,r1 800aca8: b9 a0 08 00 mv r1,r13 800acac: fb ff d7 f1 calli 8000c70 800acb0: b5 a1 68 00 add r13,r13,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 800acb4: b9 a0 08 00 mv r1,r13 800acb8: f8 00 05 61 calli 800c23c 800acbc: 34 03 00 00 mvi r3,0 800acc0: b8 20 10 00 mv r2,r1 800acc4: b9 60 20 00 mv r4,r11 800acc8: b9 a0 08 00 mv r1,r13 800accc: b8 60 28 00 mv r5,r3 800acd0: fb ff d8 0b calli 8000cfc 0, &loc, false ); if ( result != 0 ) { 800acd4: 44 20 00 09 be r1,r0,800acf8 if ( free_parentloc ) 800acd8: 45 80 00 45 be r12,r0,800adec rtems_filesystem_freenode( &parentloc ); 800acdc: 2b 81 00 3c lw r1,(sp+60) 800ace0: 44 20 00 43 be r1,r0,800adec 800ace4: 28 22 00 1c lw r2,(r1+28) 800ace8: 44 40 00 41 be r2,r0,800adec 800acec: b9 c0 08 00 mv r1,r14 800acf0: d8 40 00 00 call r2 800acf4: e0 00 00 3e bi 800adec return -1; } if ( !loc.ops->node_type_h ) { 800acf8: 2b 82 00 28 lw r2,(sp+40) 800acfc: 28 43 00 10 lw r3,(r2+16) 800ad00: 5c 61 00 04 bne r3,r1,800ad10 rtems_filesystem_freenode( &loc ); 800ad04: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800ad08: 5c 43 00 1a bne r2,r3,800ad70 <== NOT EXECUTED 800ad0c: e0 00 00 1b bi 800ad78 <== NOT EXECUTED 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 ) { 800ad10: b9 60 08 00 mv r1,r11 800ad14: d8 60 00 00 call r3 800ad18: 34 02 00 01 mvi r2,1 800ad1c: 2b 83 00 28 lw r3,(sp+40) 800ad20: 5c 22 00 10 bne r1,r2,800ad60 rtems_filesystem_freenode( &loc ); 800ad24: 44 60 00 05 be r3,r0,800ad38 800ad28: 28 62 00 1c lw r2,(r3+28) 800ad2c: 44 40 00 03 be r2,r0,800ad38 800ad30: b9 60 08 00 mv r1,r11 800ad34: d8 40 00 00 call r2 if ( free_parentloc ) 800ad38: 45 80 00 07 be r12,r0,800ad54 rtems_filesystem_freenode( &parentloc ); 800ad3c: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800ad40: 44 20 00 05 be r1,r0,800ad54 <== NOT EXECUTED 800ad44: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800ad48: 44 40 00 03 be r2,r0,800ad54 <== NOT EXECUTED 800ad4c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800ad50: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 800ad54: f8 00 00 6a calli 800aefc <__errno> 800ad58: 34 02 00 15 mvi r2,21 800ad5c: e0 00 00 10 bi 800ad9c } if ( !loc.ops->unlink_h ) { 800ad60: 28 64 00 0c lw r4,(r3+12) 800ad64: 5c 80 00 10 bne r4,r0,800ada4 rtems_filesystem_freenode( &loc ); 800ad68: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 800ad6c: 44 44 00 03 be r2,r4,800ad78 <== NOT EXECUTED 800ad70: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ad74: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_parentloc ) 800ad78: 45 80 00 07 be r12,r0,800ad94 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 800ad7c: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800ad80: 44 20 00 05 be r1,r0,800ad94 <== NOT EXECUTED 800ad84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800ad88: 44 40 00 03 be r2,r0,800ad94 <== NOT EXECUTED 800ad8c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800ad90: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800ad94: f8 00 00 5a calli 800aefc <__errno> <== NOT EXECUTED 800ad98: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800ad9c: 58 22 00 00 sw (r1+0),r2 800ada0: e0 00 00 13 bi 800adec } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800ada4: b9 c0 08 00 mv r1,r14 800ada8: b9 60 10 00 mv r2,r11 800adac: d8 80 00 00 call r4 800adb0: b8 20 68 00 mv r13,r1 rtems_filesystem_freenode( &loc ); 800adb4: 2b 81 00 28 lw r1,(sp+40) 800adb8: 44 20 00 05 be r1,r0,800adcc 800adbc: 28 22 00 1c lw r2,(r1+28) 800adc0: 44 40 00 03 be r2,r0,800adcc 800adc4: b9 60 08 00 mv r1,r11 800adc8: d8 40 00 00 call r2 if ( free_parentloc ) 800adcc: 45 80 00 09 be r12,r0,800adf0 rtems_filesystem_freenode( &parentloc ); 800add0: 2b 81 00 3c lw r1,(sp+60) 800add4: 44 20 00 07 be r1,r0,800adf0 800add8: 28 22 00 1c lw r2,(r1+28) 800addc: 44 40 00 05 be r2,r0,800adf0 800ade0: 37 81 00 30 addi r1,sp,48 800ade4: d8 40 00 00 call r2 800ade8: e0 00 00 02 bi 800adf0 800adec: 34 0d ff ff mvi r13,-1 return result; } 800adf0: b9 a0 08 00 mv r1,r13 800adf4: 2b 9d 00 04 lw ra,(sp+4) 800adf8: 2b 8b 00 18 lw r11,(sp+24) 800adfc: 2b 8c 00 14 lw r12,(sp+20) 800ae00: 2b 8d 00 10 lw r13,(sp+16) 800ae04: 2b 8e 00 0c lw r14,(sp+12) 800ae08: 2b 8f 00 08 lw r15,(sp+8) 800ae0c: 37 9c 00 40 addi sp,sp,64 800ae10: c3 a0 00 00 ret 0800929c : */ int unmount( const char *path ) { 800929c: 37 9c ff dc addi sp,sp,-36 80092a0: 5b 8b 00 10 sw (sp+16),r11 80092a4: 5b 8c 00 0c sw (sp+12),r12 80092a8: 5b 8d 00 08 sw (sp+8),r13 80092ac: 5b 9d 00 04 sw (sp+4),ra 80092b0: 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 ) ) 80092b4: 37 8c 00 14 addi r12,sp,20 80092b8: f8 01 03 85 calli 804a0cc 80092bc: b8 20 10 00 mv r2,r1 80092c0: 34 03 00 00 mvi r3,0 80092c4: b9 60 08 00 mv r1,r11 80092c8: b9 80 20 00 mv r4,r12 80092cc: 34 05 00 01 mvi r5,1 80092d0: fb ff f8 82 calli 80074d8 80092d4: 5c 20 00 4e bne r1,r0,800940c return -1; mt_entry = loc.mt_entry; 80092d8: 2b 8b 00 24 lw r11,(sp+36) fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 80092dc: 2b 81 00 14 lw r1,(sp+20) 80092e0: 2b 82 00 20 lw r2,(sp+32) 80092e4: 29 63 00 1c lw r3,(r11+28) 80092e8: 44 61 00 09 be r3,r1,800930c /* * 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 ); 80092ec: 44 40 00 05 be r2,r0,8009300 80092f0: 28 42 00 1c lw r2,(r2+28) 80092f4: 44 40 00 03 be r2,r0,8009300 80092f8: b9 80 08 00 mv r1,r12 80092fc: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EACCES ); 8009300: f8 00 e5 89 calli 8042924 <__errno> 8009304: 34 02 00 0d mvi r2,13 8009308: e0 00 00 20 bi 8009388 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 800930c: 44 40 00 05 be r2,r0,8009320 8009310: 28 42 00 1c lw r2,(r2+28) 8009314: 44 40 00 03 be r2,r0,8009320 8009318: b9 80 08 00 mv r1,r12 800931c: 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; 8009320: 29 61 00 14 lw r1,(r11+20) 8009324: 28 21 00 28 lw r1,(r1+40) 8009328: 44 20 00 04 be r1,r0,8009338 fs_root_loc = &mt_entry->mt_fs_root; 800932c: 29 61 00 28 lw r1,(r11+40) 8009330: 28 21 00 2c lw r1,(r1+44) 8009334: 5c 20 00 04 bne r1,r0,8009344 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 ); 8009338: f8 00 e5 7b calli 8042924 <__errno> <== NOT EXECUTED 800933c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009340: e0 00 00 12 bi 8009388 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 8009344: 78 01 08 06 mvhi r1,0x806 8009348: 38 21 b2 f0 ori r1,r1,0xb2f0 800934c: 28 21 00 00 lw r1,(r1+0) 8009350: 28 21 00 14 lw r1,(r1+20) 8009354: 44 2b 00 0b be r1,r11,8009380 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009358: 78 01 08 06 mvhi r1,0x806 800935c: 38 21 ee d8 ori r1,r1,0xeed8 8009360: 34 22 00 04 addi r2,r1,4 8009364: e0 00 00 04 bi 8009374 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 8009368: 28 24 00 18 lw r4,(r1+24) 800936c: 29 63 00 2c lw r3,(r11+44) 8009370: 44 83 00 04 be r4,r3,8009380 * 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 ) { 8009374: 28 21 00 00 lw r1,(r1+0) 8009378: 5c 22 ff fc bne r1,r2,8009368 800937c: e0 00 00 2b bi 8009428 * 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 ); 8009380: f8 00 e5 69 calli 8042924 <__errno> 8009384: 34 02 00 10 mvi r2,16 8009388: 58 22 00 00 sw (r1+0),r2 800938c: e0 00 00 20 bi 800940c * 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 ) 8009390: 29 62 00 14 lw r2,(r11+20) 8009394: b9 60 08 00 mv r1,r11 8009398: 28 42 00 28 lw r2,(r2+40) 800939c: d8 40 00 00 call r2 80093a0: b8 20 68 00 mv r13,r1 80093a4: 5c 20 00 1a bne r1,r0,800940c * 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){ 80093a8: 29 62 00 28 lw r2,(r11+40) 80093ac: b9 60 08 00 mv r1,r11 80093b0: 28 42 00 2c lw r2,(r2+44) 80093b4: d8 40 00 00 call r2 80093b8: b8 20 60 00 mv r12,r1 80093bc: 44 2d 00 08 be r1,r13,80093dc if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 80093c0: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 80093c4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80093c8: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED 80093cc: d8 40 00 00 call r2 <== NOT EXECUTED 80093d0: 44 20 00 0f be r1,r0,800940c <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 80093d4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80093d8: f8 00 04 5e calli 800a550 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 80093dc: b9 60 08 00 mv r1,r11 80093e0: f8 00 05 59 calli 800a944 <_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 ); 80093e4: 29 61 00 14 lw r1,(r11+20) 80093e8: 44 2c 00 05 be r1,r12,80093fc 80093ec: 28 22 00 1c lw r2,(r1+28) 80093f0: 44 4c 00 03 be r2,r12,80093fc 80093f4: 35 61 00 08 addi r1,r11,8 80093f8: d8 40 00 00 call r2 free( mt_entry ); 80093fc: b9 60 08 00 mv r1,r11 8009400: fb ff f8 73 calli 80075cc 8009404: 34 01 00 00 mvi r1,0 return 0; 8009408: e0 00 00 02 bi 8009410 800940c: 34 01 ff ff mvi r1,-1 } 8009410: 2b 9d 00 04 lw ra,(sp+4) 8009414: 2b 8b 00 10 lw r11,(sp+16) 8009418: 2b 8c 00 0c lw r12,(sp+12) 800941c: 2b 8d 00 08 lw r13,(sp+8) 8009420: 37 9c 00 24 addi sp,sp,36 8009424: c3 a0 00 00 ret * 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 ) 8009428: b9 60 08 00 mv r1,r11 800942c: fb ff f9 3f calli 8007928 8009430: 34 02 00 01 mvi r2,1 8009434: 5c 22 ff d7 bne r1,r2,8009390 8009438: e3 ff ff d2 bi 8009380 08028d24 : int utime( const char *path, const struct utimbuf *times ) { 8028d24: 37 9c ff dc addi sp,sp,-36 8028d28: 5b 8b 00 10 sw (sp+16),r11 8028d2c: 5b 8c 00 0c sw (sp+12),r12 8028d30: 5b 8d 00 08 sw (sp+8),r13 8028d34: 5b 9d 00 04 sw (sp+4),ra 8028d38: b8 20 60 00 mv r12,r1 8028d3c: 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 ) ) 8028d40: 37 8b 00 14 addi r11,sp,20 8028d44: f8 00 84 e2 calli 804a0cc 8028d48: b8 20 10 00 mv r2,r1 8028d4c: 34 03 00 00 mvi r3,0 8028d50: b9 80 08 00 mv r1,r12 8028d54: b9 60 20 00 mv r4,r11 8028d58: 34 05 00 01 mvi r5,1 8028d5c: fb ff 79 df calli 80074d8 8028d60: 34 0c ff ff mvi r12,-1 8028d64: 5c 20 00 18 bne r1,r0,8028dc4 return -1; if ( !temp_loc.ops->utime_h ){ 8028d68: 2b 82 00 20 lw r2,(sp+32) 8028d6c: 28 44 00 30 lw r4,(r2+48) 8028d70: 5c 81 00 0a bne r4,r1,8028d98 rtems_filesystem_freenode( &temp_loc ); 8028d74: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028d78: 44 44 00 03 be r2,r4,8028d84 <== NOT EXECUTED 8028d7c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028d80: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028d84: f8 00 66 e8 calli 8042924 <__errno> <== NOT EXECUTED 8028d88: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028d8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028d90: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8028d94: e0 00 00 0c bi 8028dc4 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 8028d98: 29 a3 00 04 lw r3,(r13+4) 8028d9c: 29 a2 00 00 lw r2,(r13+0) 8028da0: b9 60 08 00 mv r1,r11 8028da4: d8 80 00 00 call r4 8028da8: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &temp_loc ); 8028dac: 2b 81 00 20 lw r1,(sp+32) 8028db0: 44 20 00 05 be r1,r0,8028dc4 8028db4: 28 22 00 1c lw r2,(r1+28) 8028db8: 44 40 00 03 be r2,r0,8028dc4 8028dbc: b9 60 08 00 mv r1,r11 8028dc0: d8 40 00 00 call r2 return result; } 8028dc4: b9 80 08 00 mv r1,r12 8028dc8: 2b 9d 00 04 lw ra,(sp+4) 8028dcc: 2b 8b 00 10 lw r11,(sp+16) 8028dd0: 2b 8c 00 0c lw r12,(sp+12) 8028dd4: 2b 8d 00 08 lw r13,(sp+8) 8028dd8: 37 9c 00 24 addi sp,sp,36 8028ddc: c3 a0 00 00 ret 08019928 : ssize_t write( int fd, const void *buffer, size_t count ) { 8019928: 37 9c ff e8 addi sp,sp,-24 801992c: 5b 8b 00 14 sw (sp+20),r11 8019930: 5b 8c 00 10 sw (sp+16),r12 8019934: 5b 8d 00 0c sw (sp+12),r13 8019938: 5b 8e 00 08 sw (sp+8),r14 801993c: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8019940: 78 04 08 01 mvhi r4,0x801 8019944: 38 84 c0 10 ori r4,r4,0xc010 8019948: 28 84 00 00 lw r4,(r4+0) ssize_t write( int fd, const void *buffer, size_t count ) { 801994c: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8019950: 54 81 00 02 bgu r4,r1,8019958 8019954: e0 00 00 10 bi 8019994 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8019958: 34 02 00 03 mvi r2,3 801995c: 5b 83 00 18 sw (sp+24),r3 8019960: 78 0b 08 01 mvhi r11,0x801 8019964: fb ff 9a 23 calli 80001f0 <__ashlsi3> 8019968: 34 02 00 03 mvi r2,3 801996c: 39 6b c6 9c ori r11,r11,0xc69c 8019970: b8 20 70 00 mv r14,r1 8019974: fb ff 9a 1f calli 80001f0 <__ashlsi3> 8019978: 29 6c 00 00 lw r12,(r11+0) 801997c: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 8019980: 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 ); 8019984: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 8019988: 29 81 00 18 lw r1,(r12+24) 801998c: 20 22 01 00 andi r2,r1,0x100 8019990: 5c 40 00 04 bne r2,r0,80199a0 8019994: fb ff c5 5a calli 800aefc <__errno> <== NOT EXECUTED 8019998: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801999c: e0 00 00 0e bi 80199d4 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 80199a0: 45 a0 00 05 be r13,r0,80199b4 rtems_libio_check_count( count ); 80199a4: b8 60 58 00 mv r11,r3 80199a8: 44 60 00 1d be r3,r0,8019a1c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80199ac: 20 21 00 04 andi r1,r1,0x4 80199b0: 5c 20 00 04 bne r1,r0,80199c0 80199b4: fb ff c5 52 calli 800aefc <__errno> <== NOT EXECUTED 80199b8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80199bc: e0 00 00 06 bi 80199d4 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 80199c0: 29 81 00 40 lw r1,(r12+64) 80199c4: 28 24 00 0c lw r4,(r1+12) 80199c8: 5c 80 00 06 bne r4,r0,80199e0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 80199cc: fb ff c5 4c calli 800aefc <__errno> <== NOT EXECUTED 80199d0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80199d4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80199d8: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80199dc: e0 00 00 10 bi 8019a1c <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 80199e0: b9 a0 10 00 mv r2,r13 80199e4: b9 80 08 00 mv r1,r12 80199e8: d8 80 00 00 call r4 80199ec: b8 20 58 00 mv r11,r1 if ( rc > 0 ) 80199f0: 4c 01 00 0b bge r0,r1,8019a1c iop->offset += rc; 80199f4: 34 02 00 1f mvi r2,31 80199f8: fb ff 9a 4e calli 8000330 <__ashrsi3> 80199fc: 29 82 00 14 lw r2,(r12+20) 8019a00: 29 84 00 10 lw r4,(r12+16) 8019a04: b5 62 10 00 add r2,r11,r2 8019a08: f5 62 18 00 cmpgu r3,r11,r2 8019a0c: b4 24 08 00 add r1,r1,r4 8019a10: b4 61 08 00 add r1,r3,r1 8019a14: 59 82 00 14 sw (r12+20),r2 8019a18: 59 81 00 10 sw (r12+16),r1 return rc; } 8019a1c: b9 60 08 00 mv r1,r11 8019a20: 2b 9d 00 04 lw ra,(sp+4) 8019a24: 2b 8b 00 14 lw r11,(sp+20) 8019a28: 2b 8c 00 10 lw r12,(sp+16) 8019a2c: 2b 8d 00 0c lw r13,(sp+12) 8019a30: 2b 8e 00 08 lw r14,(sp+8) 8019a34: 37 9c 00 18 addi sp,sp,24 8019a38: c3 a0 00 00 ret 08003a04 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003a04: 37 9c ff e4 addi sp,sp,-28 8003a08: 5b 8b 00 1c sw (sp+28),r11 8003a0c: 5b 8c 00 18 sw (sp+24),r12 8003a10: 5b 8d 00 14 sw (sp+20),r13 8003a14: 5b 8e 00 10 sw (sp+16),r14 8003a18: 5b 8f 00 0c sw (sp+12),r15 8003a1c: 5b 90 00 08 sw (sp+8),r16 8003a20: 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 ); 8003a24: 78 04 08 02 mvhi r4,0x802 8003a28: 38 84 00 10 ori r4,r4,0x10 8003a2c: 28 84 00 00 lw r4,(r4+0) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003a30: b8 40 68 00 mv r13,r2 8003a34: b8 60 80 00 mv r16,r3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 8003a38: 54 81 00 02 bgu r4,r1,8003a40 8003a3c: e0 00 00 0e bi 8003a74 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8003a40: 34 02 00 03 mvi r2,3 8003a44: fb ff f5 1c calli 8000eb4 <__ashlsi3> 8003a48: 78 0b 08 02 mvhi r11,0x802 8003a4c: 34 02 00 03 mvi r2,3 8003a50: 39 6b 0e 70 ori r11,r11,0xe70 8003a54: b8 20 70 00 mv r14,r1 8003a58: fb ff f5 17 calli 8000eb4 <__ashlsi3> 8003a5c: 29 6c 00 00 lw r12,(r11+0) 8003a60: b5 c1 08 00 add r1,r14,r1 8003a64: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 8003a68: 29 81 00 18 lw r1,(r12+24) 8003a6c: 20 22 01 00 andi r2,r1,0x100 8003a70: 5c 40 00 04 bne r2,r0,8003a80 8003a74: f8 00 27 1b calli 800d6e0 <__errno> 8003a78: 34 02 00 09 mvi r2,9 8003a7c: e0 00 00 22 bi 8003b04 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8003a80: 20 21 00 04 andi r1,r1,0x4 8003a84: 44 20 00 1e be r1,r0,8003afc /* * Argument validation on IO vector */ if ( !iov ) 8003a88: 45 a0 00 1d be r13,r0,8003afc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003a8c: 4a 00 00 02 bg r16,r0,8003a94 8003a90: e0 00 00 1b bi 8003afc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003a94: 34 01 04 00 mvi r1,1024 8003a98: 4c 30 00 02 bge r1,r16,8003aa0 8003a9c: e0 00 00 18 bi 8003afc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 8003aa0: 29 81 00 40 lw r1,(r12+64) 8003aa4: 28 21 00 0c lw r1,(r1+12) 8003aa8: 5c 20 00 04 bne r1,r0,8003ab8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003aac: f8 00 27 0d calli 800d6e0 <__errno> <== NOT EXECUTED 8003ab0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8003ab4: e0 00 00 14 bi 8003b04 <== NOT EXECUTED 8003ab8: 34 02 00 00 mvi r2,0 8003abc: b9 a0 08 00 mv r1,r13 8003ac0: 34 0f 00 01 mvi r15,1 8003ac4: b8 40 18 00 mv r3,r2 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 8003ac8: 28 24 00 00 lw r4,(r1+0) * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 8003acc: 34 42 00 01 addi r2,r2,1 if ( !iov[v].iov_base ) 8003ad0: 44 80 00 0b be r4,r0,8003afc 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 ) 8003ad4: 28 25 00 04 lw r5,(r1+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++ ) { 8003ad8: 34 21 00 08 addi r1,r1,8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 8003adc: b4 65 20 00 add r4,r3,r5 if ( total < old || total > SSIZE_MAX ) 8003ae0: e8 64 18 00 cmpg r3,r3,r4 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 ) 8003ae4: 64 a5 00 00 cmpei r5,r5,0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003ae8: 68 86 7f ff cmpgi r6,r4,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 ) 8003aec: c8 05 28 00 sub r5,r0,r5 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003af0: b8 c3 18 00 or r3,r6,r3 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 ) 8003af4: a1 e5 78 00 and r15,r15,r5 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003af8: 44 60 00 05 be r3,r0,8003b0c rtems_set_errno_and_return_minus_one( EINVAL ); 8003afc: f8 00 26 f9 calli 800d6e0 <__errno> 8003b00: 34 02 00 16 mvi r2,22 8003b04: 58 22 00 00 sw (r1+0),r2 8003b08: e0 00 00 13 bi 8003b54 * 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++ ) { 8003b0c: 4c 50 00 03 bge r2,r16,8003b18 8003b10: b8 80 18 00 mv r3,r4 8003b14: e3 ff ff ed bi 8003ac8 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 8003b18: b9 e0 58 00 mv r11,r15 <== NOT EXECUTED 8003b1c: 45 e0 00 03 be r15,r0,8003b28 <== NOT EXECUTED 8003b20: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8003b24: e0 00 00 1d bi 8003b98 <== 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 ) 8003b28: 29 a3 00 04 lw r3,(r13+4) <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003b2c: 35 ef 00 01 addi r15,r15,1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 8003b30: 44 60 00 18 be r3,r0,8003b90 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 8003b34: 29 81 00 40 lw r1,(r12+64) <== NOT EXECUTED 8003b38: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED 8003b3c: 28 24 00 0c lw r4,(r1+12) <== NOT EXECUTED 8003b40: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003b44: d8 80 00 00 call r4 <== NOT EXECUTED 8003b48: b8 20 70 00 mv r14,r1 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003b4c: 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 ) 8003b50: 4c 20 00 03 bge r1,r0,8003b5c <== NOT EXECUTED 8003b54: 34 0b ff ff mvi r11,-1 8003b58: e0 00 00 10 bi 8003b98 return -1; if ( bytes > 0 ) { 8003b5c: 44 20 00 0b be r1,r0,8003b88 <== NOT EXECUTED iop->offset += bytes; 8003b60: fb ff f5 25 calli 8000ff4 <__ashrsi3> <== NOT EXECUTED 8003b64: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED 8003b68: 29 84 00 10 lw r4,(r12+16) <== NOT EXECUTED total += bytes; 8003b6c: b5 6e 58 00 add r11,r11,r14 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003b70: b5 c2 10 00 add r2,r14,r2 <== NOT EXECUTED 8003b74: f5 c2 18 00 cmpgu r3,r14,r2 <== NOT EXECUTED 8003b78: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 8003b7c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003b80: 59 81 00 10 sw (r12+16),r1 <== NOT EXECUTED 8003b84: 59 82 00 14 sw (r12+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 8003b88: 29 a1 00 04 lw r1,(r13+4) <== NOT EXECUTED 8003b8c: 5d c1 00 03 bne r14,r1,8003b98 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003b90: 35 ad 00 08 addi r13,r13,8 <== NOT EXECUTED 8003b94: 4a 0f ff e5 bg r16,r15,8003b28 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 8003b98: b9 60 08 00 mv r1,r11 8003b9c: 2b 9d 00 04 lw ra,(sp+4) 8003ba0: 2b 8b 00 1c lw r11,(sp+28) 8003ba4: 2b 8c 00 18 lw r12,(sp+24) 8003ba8: 2b 8d 00 14 lw r13,(sp+20) 8003bac: 2b 8e 00 10 lw r14,(sp+16) 8003bb0: 2b 8f 00 0c lw r15,(sp+12) 8003bb4: 2b 90 00 08 lw r16,(sp+8) 8003bb8: 37 9c 00 1c addi sp,sp,28 8003bbc: c3 a0 00 00 ret