0800bb80 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 800bb80: 37 9c ff e4 addi sp,sp,-28 800bb84: 5b 8b 00 14 sw (sp+20),r11 800bb88: 5b 8c 00 10 sw (sp+16),r12 800bb8c: 5b 8d 00 0c sw (sp+12),r13 800bb90: 5b 8e 00 08 sw (sp+8),r14 800bb94: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 800bb98: 28 2b 00 00 lw r11,(r1+0) int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 800bb9c: 20 4e ff ff andi r14,r2,0xffff 800bba0: 20 6d ff ff andi r13,r3,0xffff /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 800bba4: f8 00 05 25 calli 800d038 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 800bba8: 2d 62 00 3c lhu r2,(r11+60) 800bbac: 7c 2c 00 00 cmpnei r12,r1,0 800bbb0: fc 41 08 00 cmpne r1,r2,r1 800bbb4: a1 81 60 00 and r12,r12,r1 800bbb8: 45 80 00 06 be r12,r0,800bbd0 rtems_set_errno_and_return_minus_one( EPERM ); 800bbbc: f8 00 1c 7a calli 8012da4 <__errno> <== NOT EXECUTED 800bbc0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800bbc4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800bbc8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800bbcc: e0 00 00 09 bi 800bbf0 <== NOT EXECUTED #endif jnode->st_uid = owner; 800bbd0: 0d 6e 00 3c sh (r11+60),r14 jnode->st_gid = group; 800bbd4: 0d 6d 00 3e sh (r11+62),r13 IMFS_update_ctime( jnode ); 800bbd8: 37 81 00 18 addi r1,sp,24 800bbdc: b9 80 10 00 mv r2,r12 800bbe0: fb ff db 98 calli 8002a40 800bbe4: 2b 81 00 18 lw r1,(sp+24) 800bbe8: 59 61 00 48 sw (r11+72),r1 800bbec: b9 80 08 00 mv r1,r12 return 0; } 800bbf0: 2b 9d 00 04 lw ra,(sp+4) 800bbf4: 2b 8b 00 14 lw r11,(sp+20) 800bbf8: 2b 8c 00 10 lw r12,(sp+16) 800bbfc: 2b 8d 00 0c lw r13,(sp+12) 800bc00: 2b 8e 00 08 lw r14,(sp+8) 800bc04: 37 9c 00 1c addi sp,sp,28 800bc08: c3 a0 00 00 ret 0800a928 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 800a928: 37 9c ff ec addi sp,sp,-20 800a92c: 5b 8b 00 14 sw (sp+20),r11 800a930: 5b 8c 00 10 sw (sp+16),r12 800a934: 5b 8d 00 0c sw (sp+12),r13 800a938: 5b 8e 00 08 sw (sp+8),r14 800a93c: 5b 9d 00 04 sw (sp+4),ra 800a940: b8 40 70 00 mv r14,r2 800a944: b8 20 60 00 mv r12,r1 800a948: b8 60 10 00 mv r2,r3 800a94c: 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 ) 800a950: b8 20 58 00 mv r11,r1 800a954: 44 20 00 42 be r1,r0,800aa5c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 800a958: 78 05 08 01 mvhi r5,0x801 800a95c: 38 a5 d1 10 ori r5,r5,0xd110 800a960: 28 a3 00 00 lw r3,(r5+0) 800a964: b9 c0 08 00 mv r1,r14 800a968: 28 63 00 2c lw r3,(r3+44) 800a96c: a4 60 18 00 not r3,r3 800a970: a0 83 18 00 and r3,r4,r3 800a974: fb ff ff b3 calli 800a840 800a978: b8 20 58 00 mv r11,r1 if ( !node ) 800a97c: 44 20 00 38 be r1,r0,800aa5c return NULL; /* * Set the type specific information */ switch (type) { 800a980: 35 c1 ff ff addi r1,r14,-1 800a984: 34 02 00 06 mvi r2,6 800a988: 54 22 00 22 bgu r1,r2,800aa10 800a98c: 78 0e 08 01 mvhi r14,0x801 800a990: 34 02 00 02 mvi r2,2 800a994: fb ff d6 17 calli 80001f0 <__ashlsi3> 800a998: 39 ce c2 3c ori r14,r14,0xc23c 800a99c: b5 c1 08 00 add r1,r14,r1 800a9a0: 28 21 00 00 lw r1,(r1+0) 800a9a4: c0 20 00 00 b r1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 800a9a8: 35 62 00 54 addi r2,r11,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 800a9ac: 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); 800a9b0: 59 62 00 50 sw (r11+80),r2 the_chain->permanent_null = NULL; 800a9b4: 34 02 00 00 mvi r2,0 800a9b8: 59 62 00 54 sw (r11+84),r2 the_chain->last = _Chain_Head(the_chain); 800a9bc: 59 61 00 58 sw (r11+88),r1 800a9c0: e0 00 00 1c bi 800aa30 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; 800a9c4: 29 a1 00 04 lw r1,(r13+4) 800a9c8: 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; 800a9cc: 29 ad 00 00 lw r13,(r13+0) 800a9d0: 59 6d 00 50 sw (r11+80),r13 node->info.device.minor = info->device.minor; break; 800a9d4: e0 00 00 17 bi 800aa30 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 800a9d8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED node->info.linearfile.direct = 0; 800a9dc: 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; 800a9e0: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED 800a9e4: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 800a9e8: 34 02 00 00 mvi r2,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 800a9ec: 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; 800a9f0: 59 62 00 50 sw (r11+80),r2 800a9f4: 59 62 00 54 sw (r11+84),r2 node->info.file.indirect = 0; 800a9f8: 59 62 00 58 sw (r11+88),r2 node->info.file.doubly_indirect = 0; 800a9fc: 59 62 00 5c sw (r11+92),r2 node->info.file.triply_indirect = 0; break; 800aa00: e0 00 00 0c bi 800aa30 case IMFS_FIFO: node->info.fifo.pipe = NULL; 800aa04: 34 01 00 00 mvi r1,0 800aa08: 59 61 00 50 sw (r11+80),r1 break; 800aa0c: e0 00 00 09 bi 800aa30 default: assert(0); 800aa10: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800aa14: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800aa18: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 800aa1c: 38 21 c1 ec ori r1,r1,0xc1ec <== NOT EXECUTED 800aa20: 38 63 c2 58 ori r3,r3,0xc258 <== NOT EXECUTED 800aa24: 38 84 c2 38 ori r4,r4,0xc238 <== NOT EXECUTED 800aa28: 34 02 00 5c mvi r2,92 <== NOT EXECUTED 800aa2c: fb ff f1 23 calli 8006eb8 <__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; 800aa30: 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; 800aa34: 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 ); 800aa38: b9 60 10 00 mv r2,r11 fs_info = parent_loc->mt_entry->fs_info; 800aa3c: 28 63 00 34 lw r3,(r3+52) node->Parent = parent; 800aa40: 59 61 00 08 sw (r11+8),r1 800aa44: 34 21 00 50 addi r1,r1,80 node->st_ino = ++fs_info->ino_count; 800aa48: 28 64 00 00 lw r4,(r3+0) 800aa4c: 34 84 00 01 addi r4,r4,1 800aa50: 58 64 00 00 sw (r3+0),r4 800aa54: 59 64 00 38 sw (r11+56),r4 800aa58: fb ff e0 08 calli 8002a78 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 800aa5c: b9 60 08 00 mv r1,r11 800aa60: 2b 9d 00 04 lw ra,(sp+4) 800aa64: 2b 8b 00 14 lw r11,(sp+20) 800aa68: 2b 8c 00 10 lw r12,(sp+16) 800aa6c: 2b 8d 00 0c lw r13,(sp+12) 800aa70: 2b 8e 00 08 lw r14,(sp+8) 800aa74: 37 9c 00 14 addi sp,sp,20 800aa78: 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002c90: 38 63 55 1c ori r3,r3,0x551c <== NOT EXECUTED 8002c94: 38 84 54 1c ori r4,r4,0x541c <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002cb4: 38 63 55 1c ori r3,r3,0x551c <== NOT EXECUTED 8002cb8: 38 84 54 2c ori r4,r4,0x542c <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002ce0: 38 63 55 1c ori r3,r3,0x551c <== NOT EXECUTED 8002ce4: 38 84 54 38 ori r4,r4,0x5438 <== 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 81 d8 ori r12,r12,0x81d8 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 54 60 ori r1,r1,0x5460 8002d28: f8 00 3c e6 calli 80120c0 !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 0800609c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 800609c: 37 9c ff 84 addi sp,sp,-124 80060a0: 5b 8b 00 40 sw (sp+64),r11 80060a4: 5b 8c 00 3c sw (sp+60),r12 80060a8: 5b 8d 00 38 sw (sp+56),r13 80060ac: 5b 8e 00 34 sw (sp+52),r14 80060b0: 5b 8f 00 30 sw (sp+48),r15 80060b4: 5b 90 00 2c sw (sp+44),r16 80060b8: 5b 91 00 28 sw (sp+40),r17 80060bc: 5b 92 00 24 sw (sp+36),r18 80060c0: 5b 93 00 20 sw (sp+32),r19 80060c4: 5b 94 00 1c sw (sp+28),r20 80060c8: 5b 95 00 18 sw (sp+24),r21 80060cc: 5b 96 00 14 sw (sp+20),r22 80060d0: 5b 97 00 10 sw (sp+16),r23 80060d4: 5b 98 00 0c sw (sp+12),r24 80060d8: 5b 99 00 08 sw (sp+8),r25 80060dc: 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; 80060e0: 34 0e 00 01 mvi r14,1 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80060e4: 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 */ ) { 80060e8: b8 80 58 00 mv r11,r4 80060ec: b8 20 90 00 mv r18,r1 80060f0: b8 40 78 00 mv r15,r2 80060f4: b8 60 88 00 mv r17,r3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80060f8: 3a 73 d1 10 ori r19,r19,0xd110 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 80060fc: 28 8c 00 00 lw r12,(r4+0) 8006100: 34 10 00 00 mvi r16,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 ); 8006104: 37 96 00 44 addi r22,sp,68 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006108: b9 c0 a0 00 mv r20,r14 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 800610c: 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 ) { 8006110: 34 15 00 04 mvi r21,4 result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 ) 8006114: 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 ) { 8006118: 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) ) { 800611c: e0 00 00 4b bi 8006248 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8006120: b6 50 08 00 add r1,r18,r16 8006124: b9 e0 10 00 mv r2,r15 8006128: ba c0 18 00 mv r3,r22 800612c: 37 84 00 7c addi r4,sp,124 8006130: f8 00 02 43 calli 8006a3c 8006134: b8 20 70 00 mv r14,r1 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8006138: 29 61 00 00 lw r1,(r11+0) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 800613c: 2b 8d 00 7c lw r13,(sp+124) i += len; if ( !pathloc->node_access ) 8006140: 44 20 00 3a be r1,r0,8006228 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006144: 45 c0 00 07 be r14,r0,8006160 if ( node->type == IMFS_DIRECTORY ) 8006148: 29 81 00 4c lw r1,(r12+76) 800614c: 5c 34 00 05 bne r1,r20,8006160 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8006150: b9 60 08 00 mv r1,r11 8006154: ba 80 10 00 mv r2,r20 8006158: fb ff ff 56 calli 8005eb0 800615c: 44 20 00 5f be r1,r0,80062d8 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 8006160: b6 0d 80 00 add r16,r16,r13 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 8006164: c9 ed 78 00 sub r15,r15,r13 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; 8006168: 29 6c 00 00 lw r12,(r11+0) switch( type ) { 800616c: 45 d9 00 11 be r14,r25,80061b0 8006170: 45 d5 00 33 be r14,r21,800623c 8006174: 5d d7 00 35 bne r14,r23,8006248 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006178: 2a 61 00 00 lw r1,(r19+0) 800617c: 28 21 00 18 lw r1,(r1+24) 8006180: 45 81 00 32 be r12,r1,8006248 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 8006184: 29 64 00 10 lw r4,(r11+16) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8006188: 28 81 00 1c lw r1,(r4+28) 800618c: 5d 81 00 04 bne r12,r1,800619c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8006190: 37 8c 00 68 addi r12,sp,104 8006194: 34 82 00 08 addi r2,r4,8 8006198: e0 00 00 37 bi 8006274 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 800619c: 29 8c 00 08 lw r12,(r12+8) 80061a0: 5d 80 00 25 bne r12,r0,8006234 rtems_set_errno_and_return_minus_one( ENOENT ); 80061a4: f8 00 19 6f calli 800c760 <__errno> 80061a8: 58 2e 00 00 sw (r1+0),r14 80061ac: e0 00 00 4e bi 80062e4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 80061b0: 29 81 00 4c lw r1,(r12+76) 80061b4: 5c 2e 00 07 bne r1,r14,80061d0 IMFS_evaluate_hard_link( pathloc, 0 ); 80061b8: b9 60 08 00 mv r1,r11 80061bc: 34 02 00 00 mvi r2,0 80061c0: fb ff ff 5b calli 8005f2c node = pathloc->node_access; 80061c4: 29 6c 00 00 lw r12,(r11+0) if ( !node ) 80061c8: 5d 80 00 09 bne r12,r0,80061ec 80061cc: e0 00 00 0a bi 80061f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 80061d0: 5c 35 00 07 bne r1,r21,80061ec result = IMFS_evaluate_sym_link( pathloc, 0 ); 80061d4: b9 60 08 00 mv r1,r11 80061d8: 34 02 00 00 mvi r2,0 80061dc: fb ff ff 71 calli 8005fa0 80061e0: b8 20 68 00 mv r13,r1 node = pathloc->node_access; 80061e4: 29 6c 00 00 lw r12,(r11+0) if ( result == -1 ) 80061e8: 44 38 00 40 be r1,r24,80062e8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 80061ec: 29 81 00 4c lw r1,(r12+76) 80061f0: 44 34 00 04 be r1,r20,8006200 rtems_set_errno_and_return_minus_one( ENOTDIR ); 80061f4: f8 00 19 5b calli 800c760 <__errno> 80061f8: 34 02 00 14 mvi r2,20 80061fc: e0 00 00 39 bi 80062e0 /* * 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 ) { 8006200: 29 8d 00 5c lw r13,(r12+92) 8006204: 45 a0 00 04 be r13,r0,8006214 newloc = node->info.directory.mt_fs->mt_fs_root; 8006208: 37 8c 00 68 addi r12,sp,104 800620c: 35 a2 00 1c addi r2,r13,28 8006210: e0 00 00 19 bi 8006274 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8006214: b9 80 08 00 mv r1,r12 8006218: ba c0 10 00 mv r2,r22 800621c: f8 00 01 da calli 8006984 8006220: b8 20 60 00 mv r12,r1 if ( !node ) 8006224: 5c 2d 00 04 bne r1,r13,8006234 rtems_set_errno_and_return_minus_one( ENOENT ); 8006228: f8 00 19 4e calli 800c760 <__errno> 800622c: 34 02 00 02 mvi r2,2 8006230: e0 00 00 2c bi 80062e0 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8006234: 59 6c 00 00 sw (r11+0),r12 8006238: e0 00 00 04 bi 8006248 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 800623c: f8 00 19 49 calli 800c760 <__errno> 8006240: 34 02 00 5b mvi r2,91 8006244: e0 00 00 27 bi 80062e0 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8006248: 7d c1 00 00 cmpnei r1,r14,0 800624c: 7d ce 00 04 cmpnei r14,r14,4 8006250: a1 c1 70 00 and r14,r14,r1 8006254: 5d c0 ff b3 bne r14,r0,8006120 * 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 ) { 8006258: 29 82 00 4c lw r2,(r12+76) 800625c: 34 01 00 01 mvi r1,1 8006260: 5c 41 00 17 bne r2,r1,80062bc if ( node->info.directory.mt_fs != NULL ) { 8006264: 29 83 00 5c lw r3,(r12+92) 8006268: 44 60 00 15 be r3,r0,80062bc newloc = node->info.directory.mt_fs->mt_fs_root; 800626c: 37 8c 00 68 addi r12,sp,104 8006270: 34 62 00 1c addi r2,r3,28 8006274: 34 03 00 14 mvi r3,20 8006278: b9 80 08 00 mv r1,r12 800627c: f8 00 1b df calli 800d1f8 *pathloc = newloc; 8006280: b9 80 10 00 mv r2,r12 8006284: 34 03 00 14 mvi r3,20 8006288: b9 60 08 00 mv r1,r11 800628c: f8 00 1b db calli 800d1f8 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006290: 29 61 00 0c lw r1,(r11+12) 8006294: 2b 82 00 7c lw r2,(sp+124) 8006298: ba 20 18 00 mv r3,r17 800629c: 28 25 00 00 lw r5,(r1+0) 80062a0: ca 02 08 00 sub r1,r16,r2 80062a4: b6 41 08 00 add r1,r18,r1 80062a8: b5 e2 10 00 add r2,r15,r2 80062ac: b9 60 20 00 mv r4,r11 80062b0: d8 a0 00 00 call r5 80062b4: b8 20 68 00 mv r13,r1 80062b8: e0 00 00 0c bi 80062e8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 80062bc: b9 60 08 00 mv r1,r11 80062c0: fb ff fe d3 calli 8005e0c 80062c4: b8 20 68 00 mv r13,r1 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 80062c8: ba 20 10 00 mv r2,r17 80062cc: b9 60 08 00 mv r1,r11 80062d0: fb ff fe f8 calli 8005eb0 80062d4: 5c 20 00 05 bne r1,r0,80062e8 rtems_set_errno_and_return_minus_one( EACCES ); 80062d8: f8 00 19 22 calli 800c760 <__errno> 80062dc: 34 02 00 0d mvi r2,13 80062e0: 58 22 00 00 sw (r1+0),r2 80062e4: 34 0d ff ff mvi r13,-1 return result; } 80062e8: b9 a0 08 00 mv r1,r13 80062ec: 2b 9d 00 04 lw ra,(sp+4) 80062f0: 2b 8b 00 40 lw r11,(sp+64) 80062f4: 2b 8c 00 3c lw r12,(sp+60) 80062f8: 2b 8d 00 38 lw r13,(sp+56) 80062fc: 2b 8e 00 34 lw r14,(sp+52) 8006300: 2b 8f 00 30 lw r15,(sp+48) 8006304: 2b 90 00 2c lw r16,(sp+44) 8006308: 2b 91 00 28 lw r17,(sp+40) 800630c: 2b 92 00 24 lw r18,(sp+36) 8006310: 2b 93 00 20 lw r19,(sp+32) 8006314: 2b 94 00 1c lw r20,(sp+28) 8006318: 2b 95 00 18 lw r21,(sp+24) 800631c: 2b 96 00 14 lw r22,(sp+20) 8006320: 2b 97 00 10 lw r23,(sp+16) 8006324: 2b 98 00 0c lw r24,(sp+12) 8006328: 2b 99 00 08 lw r25,(sp+8) 800632c: 37 9c 00 7c addi sp,sp,124 8006330: c3 a0 00 00 ret 08005f2c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005f2c: 37 9c ff f4 addi sp,sp,-12 8005f30: 5b 8b 00 08 sw (sp+8),r11 8005f34: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8005f38: 28 23 00 00 lw r3,(r1+0) /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8005f3c: 34 04 00 03 mvi r4,3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005f40: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8005f44: 28 65 00 4c lw r5,(r3+76) 8005f48: 44 a4 00 04 be r5,r4,8005f58 rtems_fatal_error_occurred (0xABCD0000); 8005f4c: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8005f50: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005f54: fb ff f1 c3 calli 8002660 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 8005f58: 28 63 00 50 lw r3,(r3+80) IMFS_Set_handlers( node ); 8005f5c: 5b 82 00 0c sw (sp+12),r2 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 8005f60: 58 23 00 00 sw (r1+0),r3 IMFS_Set_handlers( node ); 8005f64: fb ff ff aa calli 8005e0c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8005f68: 2b 82 00 0c lw r2,(sp+12) 8005f6c: b9 60 08 00 mv r1,r11 8005f70: fb ff ff d0 calli 8005eb0 8005f74: 34 02 00 00 mvi r2,0 8005f78: 5c 22 00 05 bne r1,r2,8005f8c rtems_set_errno_and_return_minus_one( EACCES ); 8005f7c: f8 00 19 f9 calli 800c760 <__errno> <== NOT EXECUTED 8005f80: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8005f84: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8005f88: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED return result; } 8005f8c: b8 40 08 00 mv r1,r2 8005f90: 2b 9d 00 04 lw ra,(sp+4) 8005f94: 2b 8b 00 08 lw r11,(sp+8) 8005f98: 37 9c 00 0c addi sp,sp,12 8005f9c: c3 a0 00 00 ret 08005fa0 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005fa0: 37 9c ff f0 addi sp,sp,-16 8005fa4: 5b 8b 00 10 sw (sp+16),r11 8005fa8: 5b 8c 00 0c sw (sp+12),r12 8005fac: 5b 8d 00 08 sw (sp+8),r13 8005fb0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8005fb4: 28 2c 00 00 lw r12,(r1+0) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8005fb8: b8 40 68 00 mv r13,r2 8005fbc: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8005fc0: 29 82 00 4c lw r2,(r12+76) 8005fc4: 34 01 00 04 mvi r1,4 8005fc8: 44 41 00 04 be r2,r1,8005fd8 rtems_fatal_error_occurred (0xABCD0000); 8005fcc: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8005fd0: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005fd4: e0 00 00 05 bi 8005fe8 <== NOT EXECUTED if ( !jnode->Parent ) 8005fd8: 29 81 00 08 lw r1,(r12+8) 8005fdc: 5c 20 00 04 bne r1,r0,8005fec rtems_fatal_error_occurred( 0xBAD00000 ); 8005fe0: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8005fe4: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005fe8: fb ff f1 9e calli 8002660 <== 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; 8005fec: 59 61 00 00 sw (r11+0),r1 rtems_filesystem_get_sym_start_loc( 8005ff0: 29 81 00 50 lw r1,(r12+80) 8005ff4: 40 25 00 00 lbu r5,(r1+0) 8005ff8: 64 a4 00 5c cmpei r4,r5,92 8005ffc: 64 a1 00 2f cmpei r1,r5,47 8006000: b8 81 20 00 or r4,r4,r1 8006004: 5c 80 00 03 bne r4,r0,8006010 8006008: b8 80 08 00 mv r1,r4 800600c: 5c a4 00 09 bne r5,r4,8006030 8006010: 78 01 08 01 mvhi r1,0x801 8006014: 38 21 d1 10 ori r1,r1,0xd110 8006018: 28 22 00 00 lw r2,(r1+0) 800601c: 34 03 00 14 mvi r3,20 8006020: b9 60 08 00 mv r1,r11 8006024: 34 42 00 18 addi r2,r2,24 8006028: f8 00 1c 74 calli 800d1f8 800602c: 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] ), 8006030: 29 8c 00 50 lw r12,(r12+80) 8006034: b5 81 60 00 add r12,r12,r1 8006038: b9 80 08 00 mv r1,r12 800603c: f8 00 1e 99 calli 800daa0 8006040: b8 20 10 00 mv r2,r1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8006044: b9 a0 18 00 mv r3,r13 8006048: b9 80 08 00 mv r1,r12 800604c: b9 60 20 00 mv r4,r11 8006050: f8 00 00 13 calli 800609c 8006054: b8 20 60 00 mv r12,r1 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8006058: b9 60 08 00 mv r1,r11 800605c: fb ff ff 6c calli 8005e0c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8006060: b9 60 08 00 mv r1,r11 8006064: b9 a0 10 00 mv r2,r13 8006068: fb ff ff 92 calli 8005eb0 800606c: 5c 20 00 05 bne r1,r0,8006080 rtems_set_errno_and_return_minus_one( EACCES ); 8006070: f8 00 19 bc calli 800c760 <__errno> <== NOT EXECUTED 8006074: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8006078: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800607c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED return result; } 8006080: b9 80 08 00 mv r1,r12 8006084: 2b 9d 00 04 lw ra,(sp+4) 8006088: 2b 8b 00 10 lw r11,(sp+16) 800608c: 2b 8c 00 0c lw r12,(sp+12) 8006090: 2b 8d 00 08 lw r13,(sp+8) 8006094: 37 9c 00 10 addi sp,sp,16 8006098: c3 a0 00 00 ret 0800aa7c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 800aa7c: 37 9c ff e8 addi sp,sp,-24 800aa80: 5b 8b 00 10 sw (sp+16),r11 800aa84: 5b 8c 00 0c sw (sp+12),r12 800aa88: 5b 8d 00 08 sw (sp+8),r13 800aa8c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 800aa90: 28 2b 00 00 lw r11,(r1+0) int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 800aa94: b8 40 68 00 mv r13,r2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 800aa98: fb ff f1 ed calli 800724c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 800aa9c: 2d 62 00 3c lhu r2,(r11+60) 800aaa0: 7c 2c 00 00 cmpnei r12,r1,0 800aaa4: fc 41 08 00 cmpne r1,r2,r1 800aaa8: a1 81 60 00 and r12,r12,r1 800aaac: 45 80 00 06 be r12,r0,800aac4 rtems_set_errno_and_return_minus_one( EPERM ); 800aab0: f8 00 07 2c calli 800c760 <__errno> <== NOT EXECUTED 800aab4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800aab8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800aabc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800aac0: e0 00 00 0d bi 800aaf4 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 800aac4: 29 63 00 30 lw r3,(r11+48) 800aac8: 34 01 f0 00 mvi r1,-4096 800aacc: 21 a2 0f ff andi r2,r13,0xfff 800aad0: a0 61 08 00 and r1,r3,r1 800aad4: b8 41 10 00 or r2,r2,r1 800aad8: 59 62 00 30 sw (r11+48),r2 IMFS_update_ctime( jnode ); 800aadc: 37 81 00 14 addi r1,sp,20 800aae0: b9 80 10 00 mv r2,r12 800aae4: fb ff f1 df calli 8007260 800aae8: 2b 81 00 14 lw r1,(sp+20) 800aaec: 59 61 00 48 sw (r11+72),r1 800aaf0: b9 80 08 00 mv r1,r12 return 0; } 800aaf4: 2b 9d 00 04 lw ra,(sp+4) 800aaf8: 2b 8b 00 10 lw r11,(sp+16) 800aafc: 2b 8c 00 0c lw r12,(sp+12) 800ab00: 2b 8d 00 08 lw r13,(sp+8) 800ab04: 37 9c 00 18 addi sp,sp,24 800ab08: c3 a0 00 00 ret 080068ac : } int IMFS_fifo_close( rtems_libio_t *iop ) { 80068ac: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 80068b0: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 80068b4: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 80068b8: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 80068bc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 80068c0: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 80068c4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 80068c8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 80068cc: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED 80068d0: f8 00 0e a5 calli 800a364 <== NOT EXECUTED 80068d4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (! err) { 80068d8: 5c 20 00 0d bne r1,r0,800690c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 80068dc: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 80068e0: 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) 80068e4: 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; 80068e8: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 80068ec: 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) 80068f0: f8 00 02 a4 calli 8007380 <== NOT EXECUTED 80068f4: 5c 2b 00 0b bne r1,r11,8006920 <== NOT EXECUTED 80068f8: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED 80068fc: 5c 20 00 09 bne r1,r0,8006920 <== NOT EXECUTED free(jnode); 8006900: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006904: f8 00 01 d8 calli 8007064 <== NOT EXECUTED 8006908: e0 00 00 06 bi 8006920 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 800690c: 4c 20 00 05 bge r1,r0,8006920 <== NOT EXECUTED 8006910: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006914: f8 00 17 93 calli 800c760 <__errno> <== NOT EXECUTED 8006918: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 800691c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006920: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006924: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006928: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800692c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8006930: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8006934: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8006938: c3 a0 00 00 ret <== NOT EXECUTED 08006748 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8006748: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800674c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006750: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int err; if (command == FIONBIO) { 8006754: 78 04 80 04 mvhi r4,0x8004 <== NOT EXECUTED 8006758: 38 84 66 7e ori r4,r4,0x667e <== NOT EXECUTED 800675c: 5c 44 00 0e bne r2,r4,8006794 <== NOT EXECUTED if (buffer == NULL) 8006760: 34 0b ff f2 mvi r11,-14 <== NOT EXECUTED 8006764: 44 60 00 12 be r3,r0,80067ac <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8006768: 28 6b 00 00 lw r11,(r3+0) <== NOT EXECUTED 800676c: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 8006770: 45 60 00 05 be r11,r0,8006784 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8006774: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED 8006778: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 800677c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8006780: e0 00 00 0f bi 80067bc <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8006784: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED 8006788: a0 43 10 00 and r2,r2,r3 <== NOT EXECUTED 800678c: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 8006790: e0 00 00 0b bi 80067bc <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8006794: 28 25 00 3c lw r5,(r1+60) <== NOT EXECUTED 8006798: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 800679c: 28 a1 00 50 lw r1,(r5+80) <== NOT EXECUTED 80067a0: f8 00 0d dc calli 8009f10 <== NOT EXECUTED 80067a4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 80067a8: 4c 20 00 05 bge r1,r0,80067bc <== NOT EXECUTED 80067ac: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80067b0: f8 00 17 ec calli 800c760 <__errno> <== NOT EXECUTED 80067b4: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80067b8: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 80067bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80067c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80067c4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80067c8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80067cc: c3 a0 00 00 ret <== NOT EXECUTED 080066dc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 80066dc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 80066e0: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 80066e4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80066e8: b8 20 28 00 mv r5,r1 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 80066ec: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 80066f0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80066f4: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 80066f8: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 80066fc: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED 8006700: f8 00 0d e7 calli 8009e9c <== NOT EXECUTED 8006704: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006708: 4c 20 00 07 bge r1,r0,8006724 <== NOT EXECUTED 800670c: f8 00 18 15 calli 800c760 <__errno> <== NOT EXECUTED 8006710: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006714: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8006718: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 800671c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8006720: e0 00 00 04 bi 8006730 <== NOT EXECUTED 8006724: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 8006728: fb ff e7 02 calli 8000330 <__ashrsi3> <== NOT EXECUTED 800672c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } 8006730: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8006734: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8006738: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800673c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006740: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006744: c3 a0 00 00 ret <== NOT EXECUTED 08006840 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8006840: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006844: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006848: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 800684c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006850: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 8006854: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006858: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 800685c: f8 00 0d cd calli 8009f90 <== NOT EXECUTED 8006860: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) 8006864: 4c 01 00 07 bge r0,r1,8006880 <== NOT EXECUTED IMFS_update_atime(jnode); 8006868: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 800686c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006870: f8 00 02 7c calli 8007260 <== NOT EXECUTED 8006874: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006878: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED 800687c: e0 00 00 06 bi 8006894 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006880: 44 20 00 05 be r1,r0,8006894 <== NOT EXECUTED 8006884: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006888: f8 00 17 b6 calli 800c760 <__errno> <== NOT EXECUTED 800688c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006890: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006894: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006898: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800689c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80068a0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80068a4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80068a8: c3 a0 00 00 ret <== NOT EXECUTED 080067d0 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 80067d0: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80067d4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80067d8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80067dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 80067e0: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 80067e4: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 80067e8: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 80067ec: f8 00 0e 52 calli 800a134 <== NOT EXECUTED 80067f0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) { 80067f4: 4c 01 00 08 bge r0,r1,8006814 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 80067f8: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 80067fc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006800: f8 00 02 98 calli 8007260 <== NOT EXECUTED 8006804: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006808: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED 800680c: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED 8006810: e0 00 00 06 bi 8006828 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 8006814: 44 20 00 05 be r1,r0,8006828 <== NOT EXECUTED 8006818: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 800681c: f8 00 17 d1 calli 800c760 <__errno> <== NOT EXECUTED 8006820: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006824: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8006828: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800682c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006830: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006834: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006838: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800683c: c3 a0 00 00 ret <== NOT EXECUTED 08006984 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 8006984: 37 9c ff f0 addi sp,sp,-16 8006988: 5b 8b 00 10 sw (sp+16),r11 800698c: 5b 8c 00 0c sw (sp+12),r12 8006990: 5b 8d 00 08 sw (sp+8),r13 8006994: 5b 9d 00 04 sw (sp+4),ra 8006998: b8 20 58 00 mv r11,r1 800699c: b8 40 60 00 mv r12,r2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 80069a0: 5c 20 00 09 bne r1,r0,80069c4 80069a4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80069a8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 80069ac: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 80069b0: 38 21 bd 70 ori r1,r1,0xbd70 <== NOT EXECUTED 80069b4: 38 63 bd d0 ori r3,r3,0xbdd0 <== NOT EXECUTED 80069b8: 38 84 bd bc ori r4,r4,0xbdbc <== NOT EXECUTED 80069bc: 34 02 00 2a mvi r2,42 <== NOT EXECUTED 80069c0: f8 00 01 3e calli 8006eb8 <__assert_func> <== NOT EXECUTED if ( !name ) 80069c4: 44 40 00 16 be r2,r0,8006a1c /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 80069c8: 78 02 08 01 mvhi r2,0x801 80069cc: 38 42 bd c8 ori r2,r2,0xbdc8 80069d0: b9 80 08 00 mv r1,r12 80069d4: f8 00 1b e3 calli 800d960 80069d8: 44 20 00 12 be r1,r0,8006a20 return directory; if ( !strcmp( name, dotdotname ) ) 80069dc: 78 02 08 01 mvhi r2,0x801 80069e0: 38 42 bd cc ori r2,r2,0xbdcc 80069e4: b9 80 08 00 mv r1,r12 80069e8: f8 00 1b de calli 800d960 80069ec: 5c 20 00 03 bne r1,r0,80069f8 return directory->Parent; 80069f0: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 80069f4: e0 00 00 0b bi 8006a20 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80069f8: 35 6d 00 54 addi r13,r11,84 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 80069fc: 29 6b 00 50 lw r11,(r11+80) 8006a00: e0 00 00 06 bi 8006a18 !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 ) ) 8006a04: b9 80 08 00 mv r1,r12 8006a08: 35 62 00 0c addi r2,r11,12 8006a0c: f8 00 1b d5 calli 800d960 8006a10: 44 20 00 04 be r1,r0,8006a20 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 ) { 8006a14: 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; 8006a18: 5d 6d ff fb bne r11,r13,8006a04 8006a1c: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8006a20: b9 60 08 00 mv r1,r11 8006a24: 2b 9d 00 04 lw ra,(sp+4) 8006a28: 2b 8b 00 10 lw r11,(sp+16) 8006a2c: 2b 8c 00 0c lw r12,(sp+12) 8006a30: 2b 8d 00 08 lw r13,(sp+8) 8006a34: 37 9c 00 10 addi sp,sp,16 8006a38: c3 a0 00 00 ret 0800c9c8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800c9c8: 37 9c ff d8 addi sp,sp,-40 800c9cc: 5b 8b 00 14 sw (sp+20),r11 800c9d0: 5b 8c 00 10 sw (sp+16),r12 800c9d4: 5b 8d 00 0c sw (sp+12),r13 800c9d8: 5b 8e 00 08 sw (sp+8),r14 800c9dc: 5b 9d 00 04 sw (sp+4),ra 800c9e0: 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; 800c9e4: 37 8c 00 18 addi r12,sp,24 800c9e8: 35 a2 00 1c addi r2,r13,28 800c9ec: b9 80 08 00 mv r1,r12 800c9f0: 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; 800c9f4: 29 ab 00 1c lw r11,(r13+28) loc = temp_mt_entry->mt_fs_root; 800c9f8: f8 00 1b 91 calli 801383c /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 800c9fc: 34 01 00 00 mvi r1,0 800ca00: 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 ) { 800ca04: 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 ); 800ca08: 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; 800ca0c: 5b 8b 00 18 sw (sp+24),r11 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 800ca10: 29 6e 00 08 lw r14,(r11+8) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800ca14: fb ff fd 0d calli 800be48 if ( jnode->type != IMFS_DIRECTORY ) { 800ca18: 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; 800ca1c: 35 61 00 54 addi r1,r11,84 800ca20: 5c 4d 00 03 bne r2,r13,800ca2c 800ca24: 29 62 00 50 lw r2,(r11+80) 800ca28: 5c 41 00 06 bne r2,r1,800ca40 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 800ca2c: 34 01 00 00 mvi r1,0 800ca30: b9 80 10 00 mv r2,r12 800ca34: fb ff d6 20 calli 80022b4 if (result != 0) 800ca38: 5c 20 00 0b bne r1,r0,800ca64 800ca3c: b9 c0 58 00 mv r11,r14 return -1; jnode = next; } if ( jnode != NULL ) { 800ca40: 45 60 00 0b be r11,r0,800ca6c if ( jnode->type == IMFS_DIRECTORY ) { 800ca44: 29 61 00 4c lw r1,(r11+76) 800ca48: 5c 2d ff f0 bne r1,r13,800ca08 800ca4c: 29 61 00 50 lw r1,(r11+80) 800ca50: 35 62 00 54 addi r2,r11,84 800ca54: 44 22 ff ed be r1,r2,800ca08 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 800ca58: b8 20 58 00 mv r11,r1 } } } while (jnode != NULL); 800ca5c: 5c 20 ff eb bne r1,r0,800ca08 800ca60: e0 00 00 03 bi 800ca6c <== NOT EXECUTED 800ca64: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800ca68: e0 00 00 02 bi 800ca70 <== NOT EXECUTED 800ca6c: 34 01 00 00 mvi r1,0 return 0; } 800ca70: 2b 9d 00 04 lw ra,(sp+4) 800ca74: 2b 8b 00 14 lw r11,(sp+20) 800ca78: 2b 8c 00 10 lw r12,(sp+16) 800ca7c: 2b 8d 00 0c lw r13,(sp+12) 800ca80: 2b 8e 00 08 lw r14,(sp+8) 800ca84: 37 9c 00 28 addi sp,sp,40 800ca88: c3 a0 00 00 ret 08006b38 : 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 ) { 8006b38: 37 9c ff ec addi sp,sp,-20 8006b3c: 5b 8b 00 14 sw (sp+20),r11 8006b40: 5b 8c 00 10 sw (sp+16),r12 8006b44: 5b 8d 00 0c sw (sp+12),r13 8006b48: 5b 8e 00 08 sw (sp+8),r14 8006b4c: 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, 8006b50: 78 05 08 01 mvhi r5,0x801 8006b54: 38 a5 d0 14 ori r5,r5,0xd014 8006b58: 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 ) { 8006b5c: b8 20 58 00 mv r11,r1 8006b60: b8 40 70 00 mv r14,r2 8006b64: b8 60 68 00 mv r13,r3 8006b68: 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, 8006b6c: 34 05 00 00 mvi r5,0 8006b70: 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) { 8006b74: 34 02 00 06 mvi r2,6 8006b78: 34 a5 00 01 addi r5,r5,1 8006b7c: 44 26 00 04 be r1,r6,8006b8c 8006b80: b4 21 08 00 add r1,r1,r1 8006b84: 5c a2 ff fd bne r5,r2,8006b78 8006b88: 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) 8006b8c: 78 05 08 01 mvhi r5,0x801 8006b90: 38 a5 d6 a0 ori r5,r5,0xd6a0 8006b94: 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(); 8006b98: f8 00 0f 53 calli 800a8e4 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; 8006b9c: 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(); 8006ba0: 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; 8006ba4: 38 42 c1 bc ori r2,r2,0xc1bc 8006ba8: 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; 8006bac: 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; 8006bb0: 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; 8006bb4: 35 61 00 38 addi r1,r11,56 8006bb8: f8 00 19 90 calli 800d1f8 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 8006bbc: 34 02 00 0c mvi r2,12 8006bc0: 34 01 00 01 mvi r1,1 8006bc4: f8 00 00 d0 calli 8006f04 8006bc8: b8 20 10 00 mv r2,r1 8006bcc: 29 61 00 1c lw r1,(r11+28) if ( !fs_info ) { 8006bd0: 5c 40 00 07 bne r2,r0,8006bec free(temp_mt_entry->mt_fs_root.node_access); 8006bd4: f8 00 01 24 calli 8007064 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8006bd8: f8 00 16 e2 calli 800c760 <__errno> <== NOT EXECUTED 8006bdc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006be0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006be4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006be8: e0 00 00 09 bi 8006c0c <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8006bec: 34 04 00 01 mvi r4,1 8006bf0: 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; 8006bf4: 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; 8006bf8: 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; 8006bfc: 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; 8006c00: 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(); 8006c04: f8 00 0c a8 calli 8009ea4 8006c08: 34 01 00 00 mvi r1,0 return 0; } 8006c0c: 2b 9d 00 04 lw ra,(sp+4) 8006c10: 2b 8b 00 14 lw r11,(sp+20) 8006c14: 2b 8c 00 10 lw r12,(sp+16) 8006c18: 2b 8d 00 0c lw r13,(sp+12) 8006c1c: 2b 8e 00 08 lw r14,(sp+8) 8006c20: 37 9c 00 14 addi sp,sp,20 8006c24: 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 43 92 calli 8012da4 <__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 48 3f calli 8014068 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 f0 calli 800cb44 * 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 27 56 calli 800bcf4 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 43 80 calli 8012da4 <__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 0801091c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 801091c: 37 9c ff f4 addi sp,sp,-12 8010920: 5b 8b 00 0c sw (sp+12),r11 8010924: 5b 8c 00 08 sw (sp+8),r12 8010928: 5b 9d 00 04 sw (sp+4),ra block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 801092c: 5c 20 00 09 bne r1,r0,8010950 8010930: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010934: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010938: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801093c: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010940: 38 63 37 7c ori r3,r3,0x377c <== NOT EXECUTED 8010944: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 8010948: 34 02 01 69 mvi r2,361 <== NOT EXECUTED 801094c: e0 00 00 0b bi 8010978 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010950: 28 24 00 4c lw r4,(r1+76) 8010954: 34 03 00 05 mvi r3,5 8010958: 44 83 00 09 be r4,r3,801097c 801095c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010960: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010964: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010968: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 801096c: 38 63 37 7c ori r3,r3,0x377c <== NOT EXECUTED 8010970: 38 84 36 20 ori r4,r4,0x3620 <== NOT EXECUTED 8010974: 34 02 01 6d mvi r2,365 <== NOT EXECUTED 8010978: fb ff f1 18 calli 800cdd8 <__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 ); 801097c: 34 03 00 01 mvi r3,1 8010980: fb ff fe 45 calli 8010294 if ( *block_entry_ptr ) 8010984: 28 2b 00 00 lw r11,(r1+0) 8010988: 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 ); 801098c: b8 20 60 00 mv r12,r1 if ( *block_entry_ptr ) 8010990: 5d 62 00 06 bne r11,r2,80109a8 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 8010994: fb ff fe 30 calli 8010254 if ( !memory ) 8010998: 34 02 00 01 mvi r2,1 801099c: 44 2b 00 03 be r1,r11,80109a8 return 1; *block_entry_ptr = memory; 80109a0: 59 81 00 00 sw (r12+0),r1 80109a4: b9 60 10 00 mv r2,r11 return 0; } 80109a8: b8 40 08 00 mv r1,r2 80109ac: 2b 9d 00 04 lw ra,(sp+4) 80109b0: 2b 8b 00 0c lw r11,(sp+12) 80109b4: 2b 8c 00 08 lw r12,(sp+8) 80109b8: 37 9c 00 0c addi sp,sp,12 80109bc: c3 a0 00 00 ret 080109c0 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 80109c0: 37 9c ff e0 addi sp,sp,-32 80109c4: 5b 8b 00 20 sw (sp+32),r11 80109c8: 5b 8c 00 1c sw (sp+28),r12 80109cc: 5b 8d 00 18 sw (sp+24),r13 80109d0: 5b 8e 00 14 sw (sp+20),r14 80109d4: 5b 8f 00 10 sw (sp+16),r15 80109d8: 5b 90 00 0c sw (sp+12),r16 80109dc: 5b 91 00 08 sw (sp+8),r17 80109e0: 5b 9d 00 04 sw (sp+4),ra 80109e4: b8 20 58 00 mv r11,r1 80109e8: b8 40 68 00 mv r13,r2 /* * Perform internal consistency checks */ assert( the_jnode ); 80109ec: 5c 20 00 09 bne r1,r0,8010a10 80109f0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80109f4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80109f8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80109fc: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010a00: 38 63 37 94 ori r3,r3,0x3794 <== NOT EXECUTED 8010a04: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 8010a08: 34 02 01 31 mvi r2,305 <== NOT EXECUTED 8010a0c: e0 00 00 0b bi 8010a38 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010a10: 28 22 00 4c lw r2,(r1+76) 8010a14: 34 01 00 05 mvi r1,5 8010a18: 44 41 00 09 be r2,r1,8010a3c 8010a1c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010a20: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010a24: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010a28: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010a2c: 38 63 37 94 ori r3,r3,0x3794 <== NOT EXECUTED 8010a30: 38 84 36 20 ori r4,r4,0x3620 <== NOT EXECUTED 8010a34: 34 02 01 35 mvi r2,309 <== NOT EXECUTED 8010a38: fb ff f0 e8 calli 800cdd8 <__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 ) 8010a3c: 78 01 08 02 mvhi r1,0x802 8010a40: 38 21 56 d8 ori r1,r1,0x56d8 8010a44: 28 2c 00 00 lw r12,(r1+0) 8010a48: 34 02 00 02 mvi r2,2 8010a4c: b9 80 08 00 mv r1,r12 8010a50: fb ff c0 87 calli 8000c6c <__lshrsi3> 8010a54: b8 20 10 00 mv r2,r1 8010a58: b8 20 70 00 mv r14,r1 8010a5c: 34 21 00 01 addi r1,r1,1 8010a60: f8 00 44 92 calli 8021ca8 <__mulsi3> 8010a64: b9 c0 10 00 mv r2,r14 8010a68: 34 21 00 01 addi r1,r1,1 8010a6c: f8 00 44 8f calli 8021ca8 <__mulsi3> 8010a70: 34 21 ff ff addi r1,r1,-1 8010a74: b9 80 10 00 mv r2,r12 8010a78: f8 00 44 8c calli 8021ca8 <__mulsi3> 8010a7c: 54 2d 00 04 bgu r1,r13,8010a8c rtems_set_errno_and_return_minus_one( EINVAL ); 8010a80: f8 00 08 c9 calli 8012da4 <__errno> <== NOT EXECUTED 8010a84: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010a88: e0 00 00 26 bi 8010b20 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 8010a8c: b9 a0 08 00 mv r1,r13 8010a90: 34 02 00 1f mvi r2,31 8010a94: fb ff c0 9e calli 8000d0c <__ashrsi3> 8010a98: 29 6f 00 50 lw r15,(r11+80) 8010a9c: b8 20 70 00 mv r14,r1 8010aa0: 29 70 00 54 lw r16,(r11+84) 8010aa4: 48 2f 00 04 bg r1,r15,8010ab4 8010aa8: 5c 2f 00 25 bne r1,r15,8010b3c 8010aac: 55 b0 00 02 bgu r13,r16,8010ab4 8010ab0: e0 00 00 23 bi 8010b3c /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010ab4: b9 80 10 00 mv r2,r12 8010ab8: b9 a0 08 00 mv r1,r13 8010abc: f8 00 44 9b calli 8021d28 <__divsi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010ac0: 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; 8010ac4: b8 20 88 00 mv r17,r1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010ac8: b9 80 08 00 mv r1,r12 8010acc: fb ff c0 90 calli 8000d0c <__ashrsi3> 8010ad0: b8 20 18 00 mv r3,r1 8010ad4: b9 80 20 00 mv r4,r12 8010ad8: b9 e0 08 00 mv r1,r15 8010adc: ba 00 10 00 mv r2,r16 8010ae0: f8 00 2f 41 calli 801c7e4 <__divdi3> 8010ae4: b8 40 78 00 mv r15,r2 8010ae8: b8 40 60 00 mv r12,r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8010aec: e0 00 00 11 bi 8010b30 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 8010af0: b9 60 08 00 mv r1,r11 8010af4: b9 80 10 00 mv r2,r12 8010af8: fb ff ff 89 calli 801091c 8010afc: 44 20 00 0c be r1,r0,8010b2c 8010b00: e0 00 00 05 bi 8010b14 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 8010b04: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8010b08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010b0c: fb ff fe bd calli 8010600 <== 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-- ) { 8010b10: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED 8010b14: 51 8f ff fc bgeu r12,r15,8010b04 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 8010b18: f8 00 08 a3 calli 8012da4 <__errno> <== NOT EXECUTED 8010b1c: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010b20: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010b24: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010b28: e0 00 00 06 bi 8010b40 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8010b2c: 35 8c 00 01 addi r12,r12,1 8010b30: 52 2c ff f0 bgeu r17,r12,8010af0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 8010b34: 59 6d 00 54 sw (r11+84),r13 8010b38: 59 6e 00 50 sw (r11+80),r14 8010b3c: 34 01 00 00 mvi r1,0 return 0; } 8010b40: 2b 9d 00 04 lw ra,(sp+4) 8010b44: 2b 8b 00 20 lw r11,(sp+32) 8010b48: 2b 8c 00 1c lw r12,(sp+28) 8010b4c: 2b 8d 00 18 lw r13,(sp+24) 8010b50: 2b 8e 00 14 lw r14,(sp+20) 8010b54: 2b 8f 00 10 lw r15,(sp+16) 8010b58: 2b 90 00 0c lw r16,(sp+12) 8010b5c: 2b 91 00 08 lw r17,(sp+8) 8010b60: 37 9c 00 20 addi sp,sp,32 8010b64: c3 a0 00 00 ret 08010294 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 8010294: 37 9c ff e4 addi sp,sp,-28 8010298: 5b 8b 00 1c sw (sp+28),r11 801029c: 5b 8c 00 18 sw (sp+24),r12 80102a0: 5b 8d 00 14 sw (sp+20),r13 80102a4: 5b 8e 00 10 sw (sp+16),r14 80102a8: 5b 8f 00 0c sw (sp+12),r15 80102ac: 5b 90 00 08 sw (sp+8),r16 80102b0: 5b 9d 00 04 sw (sp+4),ra 80102b4: b8 20 60 00 mv r12,r1 80102b8: b8 40 68 00 mv r13,r2 80102bc: b8 60 70 00 mv r14,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 80102c0: 5c 20 00 09 bne r1,r0,80102e4 80102c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80102c8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80102cc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80102d0: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80102d4: 38 63 36 e4 ori r3,r3,0x36e4 <== NOT EXECUTED 80102d8: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 80102dc: 34 02 03 88 mvi r2,904 <== NOT EXECUTED 80102e0: e0 00 00 0b bi 801030c <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 80102e4: 28 22 00 4c lw r2,(r1+76) 80102e8: 34 01 00 05 mvi r1,5 80102ec: 44 41 00 09 be r2,r1,8010310 80102f0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80102f4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80102f8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80102fc: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010300: 38 63 36 e4 ori r3,r3,0x36e4 <== NOT EXECUTED 8010304: 38 84 36 20 ori r4,r4,0x3620 <== NOT EXECUTED 8010308: 34 02 03 8c mvi r2,908 <== NOT EXECUTED 801030c: fb ff f2 b3 calli 800cdd8 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 8010310: 78 01 08 02 mvhi r1,0x802 8010314: 38 21 56 d8 ori r1,r1,0x56d8 8010318: 28 21 00 00 lw r1,(r1+0) 801031c: 34 02 00 02 mvi r2,2 8010320: fb ff c2 53 calli 8000c6c <__lshrsi3> 8010324: b8 20 58 00 mv r11,r1 8010328: 34 21 ff ff addi r1,r1,-1 801032c: 55 a1 00 0f bgu r13,r1,8010368 #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 8010330: 29 8b 00 58 lw r11,(r12+88) if ( malloc_it ) { 8010334: 45 c0 00 0a be r14,r0,801035c if ( !p ) { 8010338: 5d 60 00 04 bne r11,r0,8010348 p = memfile_alloc_block(); 801033c: fb ff ff c6 calli 8010254 if ( !p ) 8010340: 44 2b 00 7d be r1,r11,8010534 return 0; info->indirect = p; 8010344: 59 81 00 58 sw (r12+88),r1 } return &info->indirect[ my_block ]; 8010348: 34 02 00 02 mvi r2,2 801034c: b9 a0 08 00 mv r1,r13 8010350: fb ff c2 1f calli 8000bcc <__ashlsi3> 8010354: 29 82 00 58 lw r2,(r12+88) 8010358: e0 00 00 75 bi 801052c } if ( !p ) return 0; return &info->indirect[ my_block ]; 801035c: b9 a0 08 00 mv r1,r13 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 8010360: 5d 6e 00 60 bne r11,r14,80104e0 8010364: e0 00 00 74 bi 8010534 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 8010368: 35 61 00 01 addi r1,r11,1 <== NOT EXECUTED 801036c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010370: f8 00 46 4e calli 8021ca8 <__mulsi3> <== NOT EXECUTED 8010374: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8010378: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 801037c: 55 a1 00 28 bgu r13,r1,801041c <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 8010380: c9 ab 68 00 sub r13,r13,r11 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010384: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010388: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801038c: f8 00 46 d6 calli 8021ee4 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010390: b9 60 10 00 mv r2,r11 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010394: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010398: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801039c: f8 00 46 c2 calli 8021ea4 <__udivsi3> <== NOT EXECUTED 80103a0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->doubly_indirect; 80103a4: 29 8b 00 5c lw r11,(r12+92) <== NOT EXECUTED if ( malloc_it ) { 80103a8: 45 c0 00 15 be r14,r0,80103fc <== NOT EXECUTED if ( !p ) { 80103ac: 5d 60 00 05 bne r11,r0,80103c0 <== NOT EXECUTED p = memfile_alloc_block(); 80103b0: fb ff ff a9 calli 8010254 <== NOT EXECUTED 80103b4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p ) 80103b8: 44 20 00 5f be r1,r0,8010534 <== NOT EXECUTED return 0; info->doubly_indirect = p; 80103bc: 59 81 00 5c sw (r12+92),r1 <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 80103c0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80103c4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80103c8: fb ff c2 01 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80103cc: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 80103d0: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED if ( !p1 ) { 80103d4: 5d 80 00 05 bne r12,r0,80103e8 <== NOT EXECUTED p1 = memfile_alloc_block(); 80103d8: fb ff ff 9f calli 8010254 <== NOT EXECUTED 80103dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p1 ) 80103e0: 44 20 00 55 be r1,r0,8010534 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 80103e4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 80103e8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80103ec: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80103f0: fb ff c1 f7 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80103f4: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 80103f8: e0 00 00 50 bi 8010538 <== NOT EXECUTED } if ( !p ) 80103fc: 45 6e 00 4e be r11,r14,8010534 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 8010400: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010404: fb ff c1 f2 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010408: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 801040c: 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 ]; 8010410: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 8010414: 5d 60 00 33 bne r11,r0,80104e0 <== NOT EXECUTED 8010418: e0 00 00 47 bi 8010534 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 801041c: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 8010420: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010424: f8 00 46 21 calli 8021ca8 <__mulsi3> <== NOT EXECUTED 8010428: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 801042c: 55 a1 00 42 bgu r13,r1,8010534 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 8010430: c9 af 68 00 sub r13,r13,r15 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 8010434: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010438: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801043c: f8 00 46 aa calli 8021ee4 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010440: 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; 8010444: b8 20 80 00 mv r16,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8010448: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801044c: f8 00 46 96 calli 8021ea4 <__udivsi3> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 8010450: 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; 8010454: b8 20 68 00 mv r13,r1 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 8010458: f8 00 46 93 calli 8021ea4 <__udivsi3> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 801045c: 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; 8010460: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 8010464: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010468: f8 00 46 9f calli 8021ee4 <__umodsi3> <== NOT EXECUTED 801046c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->triply_indirect; 8010470: 29 8b 00 60 lw r11,(r12+96) <== NOT EXECUTED if ( malloc_it ) { 8010474: 45 c0 00 1f be r14,r0,80104f0 <== NOT EXECUTED if ( !p ) { 8010478: 5d 60 00 05 bne r11,r0,801048c <== NOT EXECUTED p = memfile_alloc_block(); 801047c: fb ff ff 76 calli 8010254 <== NOT EXECUTED 8010480: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p ) 8010484: 44 20 00 2c be r1,r0,8010534 <== NOT EXECUTED return 0; info->triply_indirect = p; 8010488: 59 81 00 60 sw (r12+96),r1 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 801048c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8010490: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010494: fb ff c1 ce calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010498: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 801049c: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED if ( !p1 ) { 80104a0: 5d 80 00 05 bne r12,r0,80104b4 <== NOT EXECUTED p1 = memfile_alloc_block(); 80104a4: fb ff ff 6c calli 8010254 <== NOT EXECUTED 80104a8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p1 ) 80104ac: 44 20 00 22 be r1,r0,8010534 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 80104b0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 80104b4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80104b8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80104bc: fb ff c1 c4 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80104c0: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 80104c4: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p2 ) { 80104c8: 5d 60 00 05 bne r11,r0,80104dc <== NOT EXECUTED p2 = memfile_alloc_block(); 80104cc: fb ff ff 62 calli 8010254 <== NOT EXECUTED 80104d0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p2 ) 80104d4: 44 20 00 18 be r1,r0,8010534 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 80104d8: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 80104dc: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80104e0: 34 02 00 02 mvi r2,2 80104e4: fb ff c1 ba calli 8000bcc <__ashlsi3> 80104e8: b5 61 08 00 add r1,r11,r1 80104ec: e0 00 00 13 bi 8010538 } if ( !p ) 80104f0: 45 6e 00 11 be r11,r14,8010534 <== 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 ]; 80104f4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80104f8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80104fc: fb ff c1 b4 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010500: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 8010504: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p1 ) 8010508: 45 60 00 0b be r11,r0,8010534 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 801050c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010510: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010514: fb ff c1 ae calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010518: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 801051c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010520: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8010524: fb ff c1 aa calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010528: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 801052c: b4 41 08 00 add r1,r2,r1 8010530: e0 00 00 02 bi 8010538 8010534: 34 01 00 00 mvi r1,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 8010538: 2b 9d 00 04 lw ra,(sp+4) 801053c: 2b 8b 00 1c lw r11,(sp+28) 8010540: 2b 8c 00 18 lw r12,(sp+24) 8010544: 2b 8d 00 14 lw r13,(sp+20) 8010548: 2b 8e 00 10 lw r14,(sp+16) 801054c: 2b 8f 00 0c lw r15,(sp+12) 8010550: 2b 90 00 08 lw r16,(sp+8) 8010554: 37 9c 00 1c addi sp,sp,28 8010558: c3 a0 00 00 ret 0801104c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 801104c: 37 9c ff d4 addi sp,sp,-44 8011050: 5b 8b 00 24 sw (sp+36),r11 8011054: 5b 8c 00 20 sw (sp+32),r12 8011058: 5b 8d 00 1c sw (sp+28),r13 801105c: 5b 8e 00 18 sw (sp+24),r14 8011060: 5b 8f 00 14 sw (sp+20),r15 8011064: 5b 90 00 10 sw (sp+16),r16 8011068: 5b 91 00 0c sw (sp+12),r17 801106c: 5b 92 00 08 sw (sp+8),r18 8011070: 5b 9d 00 04 sw (sp+4),ra 8011074: b8 20 60 00 mv r12,r1 8011078: b8 40 68 00 mv r13,r2 801107c: b8 60 80 00 mv r16,r3 8011080: b8 80 58 00 mv r11,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 8011084: 5c 20 00 09 bne r1,r0,80110a8 8011088: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801108c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011090: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011094: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8011098: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 801109c: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 80110a0: 34 02 02 4c mvi r2,588 <== NOT EXECUTED 80110a4: e0 00 00 0c bi 80110d4 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 80110a8: 28 21 00 4c lw r1,(r1+76) 80110ac: 34 03 00 01 mvi r3,1 80110b0: 34 22 ff fb addi r2,r1,-5 80110b4: 50 62 00 09 bgeu r3,r2,80110d8 80110b8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80110bc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80110c0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80110c4: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80110c8: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 80110cc: 38 84 36 90 ori r4,r4,0x3690 <== NOT EXECUTED 80110d0: 34 02 02 51 mvi r2,593 <== NOT EXECUTED 80110d4: fb ff ef 41 calli 800cdd8 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 80110d8: 5e 00 00 09 bne r16,r0,80110fc 80110dc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80110e0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80110e4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80110e8: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80110ec: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 80110f0: 38 84 36 dc ori r4,r4,0x36dc <== NOT EXECUTED 80110f4: 34 02 02 5a mvi r2,602 <== NOT EXECUTED 80110f8: e3 ff ff f7 bi 80110d4 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 80110fc: 5c 80 00 06 bne r4,r0,8011114 rtems_set_errno_and_return_minus_one( EINVAL ); 8011100: f8 00 07 29 calli 8012da4 <__errno> <== NOT EXECUTED 8011104: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011108: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801110c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8011110: e0 00 00 88 bi 8011330 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 8011114: 34 02 00 06 mvi r2,6 8011118: 29 8e 00 50 lw r14,(r12+80) 801111c: 29 8f 00 54 lw r15,(r12+84) 8011120: 5c 22 00 19 bne r1,r2,8011184 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 8011124: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 8011128: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801112c: fb ff be f8 calli 8000d0c <__ashrsi3> <== NOT EXECUTED 8011130: c9 ed 18 00 sub r3,r15,r13 <== NOT EXECUTED 8011134: f4 6f 10 00 cmpgu r2,r3,r15 <== NOT EXECUTED 8011138: c9 c1 08 00 sub r1,r14,r1 <== NOT EXECUTED 801113c: 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; 8011140: 29 82 00 58 lw r2,(r12+88) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 8011144: 48 0e 00 04 bg r0,r14,8011154 <== NOT EXECUTED 8011148: 5c 0e 00 04 bne r0,r14,8011158 <== NOT EXECUTED 801114c: 55 63 00 02 bgu r11,r3,8011154 <== NOT EXECUTED 8011150: e0 00 00 02 bi 8011158 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 8011154: c9 ed 58 00 sub r11,r15,r13 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 8011158: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 801115c: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8011160: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8011164: f8 00 09 b6 calli 801383c <== NOT EXECUTED IMFS_update_atime( the_jnode ); 8011168: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 801116c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8011170: fb ff c6 34 calli 8002a40 <== NOT EXECUTED 8011174: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8011178: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED return my_length; 801117c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8011180: e0 00 00 6c bi 8011330 <== 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 ) 8011184: b4 8d 08 00 add r1,r4,r13 8011188: 48 0e 00 04 bg r0,r14,8011198 801118c: 5c 0e 00 04 bne r0,r14,801119c 8011190: 54 2f 00 02 bgu r1,r15,8011198 8011194: e0 00 00 02 bi 801119c <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 8011198: 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; 801119c: 78 01 08 02 mvhi r1,0x802 80111a0: 38 21 56 d8 ori r1,r1,0x56d8 80111a4: 28 32 00 00 lw r18,(r1+0) 80111a8: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 80111ac: ba 00 78 00 mv r15,r16 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80111b0: ba 40 10 00 mv r2,r18 80111b4: f8 00 43 10 calli 8021df4 <__modsi3> 80111b8: b8 20 88 00 mv r17,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 80111bc: ba 40 10 00 mv r2,r18 80111c0: b9 a0 08 00 mv r1,r13 80111c4: f8 00 42 d9 calli 8021d28 <__divsi3> 80111c8: b8 20 68 00 mv r13,r1 if ( start_offset ) { 80111cc: ba 20 70 00 mv r14,r17 80111d0: 46 20 00 1a be r17,r0,8011238 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 ); 80111d4: b9 80 08 00 mv r1,r12 80111d8: b9 a0 10 00 mv r2,r13 80111dc: 34 03 00 00 mvi r3,0 80111e0: fb ff fc 2d calli 8010294 assert( block_ptr ); 80111e4: 5c 20 00 09 bne r1,r0,8011208 80111e8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80111ec: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80111f0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80111f4: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80111f8: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 80111fc: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 8011200: 34 02 02 96 mvi r2,662 <== NOT EXECUTED 8011204: e3 ff ff b4 bi 80110d4 <== 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; 8011208: ca 51 90 00 sub r18,r18,r17 801120c: b9 60 70 00 mv r14,r11 8011210: 52 4b 00 02 bgeu r18,r11,8011218 8011214: 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 ); 8011218: 28 22 00 00 lw r2,(r1+0) 801121c: b9 c0 18 00 mv r3,r14 8011220: ba 00 08 00 mv r1,r16 8011224: b4 51 10 00 add r2,r2,r17 8011228: f8 00 09 85 calli 801383c dest += to_copy; 801122c: b6 0e 78 00 add r15,r16,r14 block++; 8011230: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8011234: c9 6e 58 00 sub r11,r11,r14 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8011238: 78 01 08 02 mvhi r1,0x802 801123c: 38 21 56 d8 ori r1,r1,0x56d8 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011240: b8 20 88 00 mv r17,r1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8011244: 28 30 00 00 lw r16,(r1+0) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011248: e0 00 00 16 bi 80112a0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 801124c: b9 80 08 00 mv r1,r12 8011250: b9 a0 10 00 mv r2,r13 8011254: 34 03 00 00 mvi r3,0 8011258: fb ff fc 0f calli 8010294 assert( block_ptr ); 801125c: 5c 20 00 09 bne r1,r0,8011280 8011260: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011264: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011268: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801126c: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8011270: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 8011274: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 8011278: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED 801127c: e3 ff ff 96 bi 80110d4 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 8011280: 28 22 00 00 lw r2,(r1+0) 8011284: ba 00 18 00 mv r3,r16 8011288: b9 e0 08 00 mv r1,r15 801128c: f8 00 09 6c calli 801383c dest += to_copy; 8011290: b5 f0 78 00 add r15,r15,r16 block++; 8011294: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8011298: c9 70 58 00 sub r11,r11,r16 copied += to_copy; 801129c: 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 ) { 80112a0: 2a 21 00 00 lw r1,(r17+0) 80112a4: 51 61 ff ea bgeu r11,r1,801124c /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); 80112a8: 54 2b 00 09 bgu r1,r11,80112cc 80112ac: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80112b0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80112b4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80112b8: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80112bc: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 80112c0: 38 84 36 64 ori r4,r4,0x3664 <== NOT EXECUTED 80112c4: 34 02 02 b5 mvi r2,693 <== NOT EXECUTED 80112c8: e3 ff ff 83 bi 80110d4 <== NOT EXECUTED if ( my_length ) { 80112cc: 45 60 00 13 be r11,r0,8011318 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 80112d0: b9 a0 10 00 mv r2,r13 80112d4: b9 80 08 00 mv r1,r12 80112d8: 34 03 00 00 mvi r3,0 80112dc: fb ff fb ee calli 8010294 assert( block_ptr ); 80112e0: 5c 20 00 09 bne r1,r0,8011304 80112e4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80112e8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80112ec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80112f0: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80112f4: 38 63 37 18 ori r3,r3,0x3718 <== NOT EXECUTED 80112f8: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 80112fc: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED 8011300: e3 ff ff 75 bi 80110d4 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 8011304: 28 22 00 00 lw r2,(r1+0) 8011308: b9 60 18 00 mv r3,r11 801130c: b9 e0 08 00 mv r1,r15 8011310: f8 00 09 4b calli 801383c copied += my_length; 8011314: b5 6e 70 00 add r14,r11,r14 } IMFS_update_atime( the_jnode ); 8011318: 37 81 00 28 addi r1,sp,40 801131c: 34 02 00 00 mvi r2,0 8011320: fb ff c5 c8 calli 8002a40 8011324: 2b 81 00 28 lw r1,(sp+40) 8011328: 59 81 00 40 sw (r12+64),r1 return copied; 801132c: b9 c0 08 00 mv r1,r14 } 8011330: 2b 9d 00 04 lw ra,(sp+4) 8011334: 2b 8b 00 24 lw r11,(sp+36) 8011338: 2b 8c 00 20 lw r12,(sp+32) 801133c: 2b 8d 00 1c lw r13,(sp+28) 8011340: 2b 8e 00 18 lw r14,(sp+24) 8011344: 2b 8f 00 14 lw r15,(sp+20) 8011348: 2b 90 00 10 lw r16,(sp+16) 801134c: 2b 91 00 0c lw r17,(sp+12) 8011350: 2b 92 00 08 lw r18,(sp+8) 8011354: 37 9c 00 2c addi sp,sp,44 8011358: c3 a0 00 00 ret 08010658 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 8010658: 37 9c ff e0 addi sp,sp,-32 801065c: 5b 8b 00 20 sw (sp+32),r11 8010660: 5b 8c 00 1c sw (sp+28),r12 8010664: 5b 8d 00 18 sw (sp+24),r13 8010668: 5b 8e 00 14 sw (sp+20),r14 801066c: 5b 8f 00 10 sw (sp+16),r15 8010670: 5b 90 00 0c sw (sp+12),r16 8010674: 5b 91 00 08 sw (sp+8),r17 8010678: 5b 9d 00 04 sw (sp+4),ra 801067c: b8 20 58 00 mv r11,r1 /* * Perform internal consistency checks */ assert( the_jnode ); 8010680: 5c 20 00 09 bne r1,r0,80106a4 8010684: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010688: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801068c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010690: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010694: 38 63 37 2c ori r3,r3,0x372c <== NOT EXECUTED 8010698: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 801069c: 34 02 01 ee mvi r2,494 <== NOT EXECUTED 80106a0: e0 00 00 0b bi 80106cc <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 80106a4: 28 22 00 4c lw r2,(r1+76) 80106a8: 34 01 00 05 mvi r1,5 80106ac: 44 41 00 09 be r2,r1,80106d0 80106b0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80106b4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80106b8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80106bc: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 80106c0: 38 63 37 2c ori r3,r3,0x372c <== NOT EXECUTED 80106c4: 38 84 36 20 ori r4,r4,0x3620 <== NOT EXECUTED 80106c8: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED 80106cc: fb ff f1 c3 calli 800cdd8 <__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; 80106d0: 78 01 08 02 mvhi r1,0x802 80106d4: 38 21 56 d8 ori r1,r1,0x56d8 80106d8: 28 21 00 00 lw r1,(r1+0) 80106dc: 34 02 00 02 mvi r2,2 80106e0: fb ff c1 63 calli 8000c6c <__lshrsi3> 80106e4: b8 20 60 00 mv r12,r1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 80106e8: 29 61 00 58 lw r1,(r11+88) 80106ec: 44 20 00 04 be r1,r0,80106fc if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 80106f0: 35 61 00 58 addi r1,r11,88 80106f4: b9 80 10 00 mv r2,r12 80106f8: fb ff ff 99 calli 801055c * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 80106fc: 29 61 00 5c lw r1,(r11+92) 8010700: 44 20 00 15 be r1,r0,8010754 8010704: 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; 8010710: b9 a0 70 00 mv r14,r13 <== NOT EXECUTED 8010714: e0 00 00 09 bi 8010738 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 8010718: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 801071c: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 8010720: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8010724: 44 40 00 03 be r2,r0,8010730 <== NOT EXECUTED memfile_free_blocks_in_table( 8010728: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 801072c: fb ff ff 8c calli 801055c <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 8010744: 54 2e ff f5 bgu r1,r14,8010718 <== 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 ); 8010748: 35 61 00 5c addi r1,r11,92 <== NOT EXECUTED 801074c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8010750: fb ff ff 83 calli 801055c <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 8010754: 29 61 00 60 lw r1,(r11+96) 8010758: 44 20 00 24 be r1,r0,80107e8 801075c: 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; 8010768: b9 a0 80 00 mv r16,r13 <== NOT EXECUTED 801076c: e0 00 00 18 bi 80107cc <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 8010770: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8010774: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 8010778: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 801077c: 45 c0 00 18 be r14,r0,80107dc <== NOT EXECUTED 8010780: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 8010784: e0 00 00 08 bi 80107a4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 8010790: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8010794: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8010798: fb ff ff 71 calli 801055c <== 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 80107b0: 54 31 ff f6 bgu r1,r17,8010788 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 80107b4: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 80107b8: 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 80107d8: 54 30 ff e6 bgu r1,r16,8010770 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 80107dc: 35 61 00 60 addi r1,r11,96 <== NOT EXECUTED 80107e0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80107e4: fb ff ff 5e calli 801055c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 80107e8: 34 01 00 00 mvi r1,0 80107ec: 2b 9d 00 04 lw ra,(sp+4) 80107f0: 2b 8b 00 20 lw r11,(sp+32) 80107f4: 2b 8c 00 1c lw r12,(sp+28) 80107f8: 2b 8d 00 18 lw r13,(sp+24) 80107fc: 2b 8e 00 14 lw r14,(sp+20) 8010800: 2b 8f 00 10 lw r15,(sp+16) 8010804: 2b 90 00 0c lw r16,(sp+12) 8010808: 2b 91 00 08 lw r17,(sp+8) 801080c: 37 9c 00 20 addi sp,sp,32 8010810: c3 a0 00 00 ret 08010600 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 8010600: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8010604: 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 ); 8010608: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 801060c: fb ff ff 22 calli 8010294 <== NOT EXECUTED assert( block_ptr ); 8010610: 5c 20 00 09 bne r1,r0,8010634 <== NOT EXECUTED 8010614: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010618: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801061c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010620: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010624: 38 63 37 60 ori r3,r3,0x3760 <== NOT EXECUTED 8010628: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 801062c: 34 02 01 96 mvi r2,406 <== NOT EXECUTED 8010630: fb ff f1 ea calli 800cdd8 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 8010634: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED *block_ptr = 0; 8010638: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 801063c: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED memfile_free_block( ptr ); 8010640: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8010644: fb ff fe f9 calli 8010228 <== NOT EXECUTED } return 1; } 8010648: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 801064c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8010650: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8010654: c3 a0 00 00 ret <== NOT EXECUTED 08010c80 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 8010c80: 37 9c ff d0 addi sp,sp,-48 8010c84: 5b 8b 00 28 sw (sp+40),r11 8010c88: 5b 8c 00 24 sw (sp+36),r12 8010c8c: 5b 8d 00 20 sw (sp+32),r13 8010c90: 5b 8e 00 1c sw (sp+28),r14 8010c94: 5b 8f 00 18 sw (sp+24),r15 8010c98: 5b 90 00 14 sw (sp+20),r16 8010c9c: 5b 91 00 10 sw (sp+16),r17 8010ca0: 5b 92 00 0c sw (sp+12),r18 8010ca4: 5b 93 00 08 sw (sp+8),r19 8010ca8: 5b 9d 00 04 sw (sp+4),ra 8010cac: b8 20 58 00 mv r11,r1 8010cb0: b8 40 60 00 mv r12,r2 8010cb4: b8 60 88 00 mv r17,r3 8010cb8: b8 80 78 00 mv r15,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 8010cbc: 5c 20 00 09 bne r1,r0,8010ce0 8010cc0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010cc4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010cc8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010ccc: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010cd0: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010cd4: 38 84 36 14 ori r4,r4,0x3614 <== NOT EXECUTED 8010cd8: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED 8010cdc: e0 00 00 0b bi 8010d08 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8010ce0: 28 22 00 4c lw r2,(r1+76) 8010ce4: 34 01 00 05 mvi r1,5 8010ce8: 44 41 00 09 be r2,r1,8010d0c 8010cec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010cf0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010cf4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010cf8: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010cfc: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010d00: 38 84 36 20 ori r4,r4,0x3620 <== NOT EXECUTED 8010d04: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED 8010d08: fb ff f0 34 calli 800cdd8 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 8010d0c: 5c 60 00 09 bne r3,r0,8010d30 8010d10: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010d14: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010d18: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010d1c: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010d20: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010d24: 38 84 36 5c ori r4,r4,0x365c <== NOT EXECUTED 8010d28: 34 02 02 ef mvi r2,751 <== NOT EXECUTED 8010d2c: e3 ff ff f7 bi 8010d08 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 8010d30: 5c 80 00 04 bne r4,r0,8010d40 rtems_set_errno_and_return_minus_one( EINVAL ); 8010d34: f8 00 08 1c calli 8012da4 <__errno> <== NOT EXECUTED 8010d38: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010d3c: e0 00 00 0d bi 8010d70 <== 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 ) { 8010d40: 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; 8010d44: b4 8c 10 00 add r2,r4,r12 if ( last_byte > the_jnode->info.file.size ) { 8010d48: 48 01 00 05 bg r0,r1,8010d5c 8010d4c: 5c 20 00 0c bne r1,r0,8010d7c 8010d50: 29 61 00 54 lw r1,(r11+84) 8010d54: 54 41 00 02 bgu r2,r1,8010d5c 8010d58: e0 00 00 09 bi 8010d7c <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, last_byte ); 8010d5c: b9 60 08 00 mv r1,r11 8010d60: fb ff ff 18 calli 80109c0 if ( status ) 8010d64: 44 20 00 06 be r1,r0,8010d7c rtems_set_errno_and_return_minus_one( ENOSPC ); 8010d68: f8 00 08 0f calli 8012da4 <__errno> <== NOT EXECUTED 8010d6c: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010d70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010d74: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8010d78: e0 00 00 66 bi 8010f10 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010d7c: 78 01 08 02 mvhi r1,0x802 8010d80: 38 21 56 d8 ori r1,r1,0x56d8 8010d84: 28 33 00 00 lw r19,(r1+0) 8010d88: b9 80 08 00 mv r1,r12 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 8010d8c: ba 20 80 00 mv r16,r17 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8010d90: ba 60 10 00 mv r2,r19 8010d94: f8 00 44 18 calli 8021df4 <__modsi3> 8010d98: b8 20 90 00 mv r18,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 8010d9c: ba 60 10 00 mv r2,r19 8010da0: b9 80 08 00 mv r1,r12 8010da4: f8 00 43 e1 calli 8021d28 <__divsi3> 8010da8: b8 20 70 00 mv r14,r1 if ( start_offset ) { 8010dac: b9 e0 68 00 mv r13,r15 8010db0: ba 40 60 00 mv r12,r18 8010db4: 46 40 00 19 be r18,r0,8010e18 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 ); 8010db8: b9 60 08 00 mv r1,r11 8010dbc: b9 c0 10 00 mv r2,r14 8010dc0: 34 03 00 00 mvi r3,0 8010dc4: fb ff fd 34 calli 8010294 assert( block_ptr ); 8010dc8: 5c 20 00 09 bne r1,r0,8010dec 8010dcc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010dd0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010dd4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010dd8: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010ddc: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010de0: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 8010de4: 34 02 03 1c mvi r2,796 <== NOT EXECUTED 8010de8: e3 ff ff c8 bi 8010d08 <== 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; 8010dec: ca 72 60 00 sub r12,r19,r18 8010df0: 51 ec 00 02 bgeu r15,r12,8010df8 8010df4: 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 ); 8010df8: 28 21 00 00 lw r1,(r1+0) 8010dfc: ba 20 10 00 mv r2,r17 8010e00: b9 80 18 00 mv r3,r12 8010e04: b4 32 08 00 add r1,r1,r18 8010e08: f8 00 0a 8d calli 801383c src += to_copy; 8010e0c: b6 2c 80 00 add r16,r17,r12 block++; 8010e10: 35 ce 00 01 addi r14,r14,1 my_length -= to_copy; 8010e14: c9 ec 68 00 sub r13,r15,r12 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e18: 78 01 08 02 mvhi r1,0x802 8010e1c: 38 21 56 d8 ori r1,r1,0x56d8 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010e20: b8 20 88 00 mv r17,r1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 8010e24: 28 2f 00 00 lw r15,(r1+0) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8010e28: e0 00 00 16 bi 8010e80 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010e2c: b9 60 08 00 mv r1,r11 8010e30: b9 c0 10 00 mv r2,r14 8010e34: 34 03 00 00 mvi r3,0 8010e38: fb ff fd 17 calli 8010294 assert( block_ptr ); 8010e3c: 5c 20 00 09 bne r1,r0,8010e60 8010e40: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010e44: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010e48: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010e4c: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010e50: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010e54: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 8010e58: 34 02 03 30 mvi r2,816 <== NOT EXECUTED 8010e5c: e3 ff ff ab bi 8010d08 <== 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 ); 8010e60: 28 21 00 00 lw r1,(r1+0) 8010e64: ba 00 10 00 mv r2,r16 8010e68: b9 e0 18 00 mv r3,r15 8010e6c: f8 00 0a 74 calli 801383c src += to_copy; 8010e70: b6 0f 80 00 add r16,r16,r15 block++; 8010e74: 35 ce 00 01 addi r14,r14,1 my_length -= to_copy; 8010e78: 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( 8010e7c: 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 ) { 8010e80: 2a 21 00 00 lw r1,(r17+0) 8010e84: 51 a1 ff ea bgeu r13,r1,8010e2c /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); 8010e88: 54 2d 00 09 bgu r1,r13,8010eac 8010e8c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010e90: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010e94: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010e98: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010e9c: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010ea0: 38 84 36 64 ori r4,r4,0x3664 <== NOT EXECUTED 8010ea4: 34 02 03 41 mvi r2,833 <== NOT EXECUTED 8010ea8: e3 ff ff 98 bi 8010d08 <== NOT EXECUTED to_copy = my_length; if ( my_length ) { 8010eac: 45 a0 00 13 be r13,r0,8010ef8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8010eb0: b9 c0 10 00 mv r2,r14 8010eb4: b9 60 08 00 mv r1,r11 8010eb8: 34 03 00 00 mvi r3,0 8010ebc: fb ff fc f6 calli 8010294 assert( block_ptr ); 8010ec0: 5c 20 00 09 bne r1,r0,8010ee4 8010ec4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010ec8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010ecc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010ed0: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010ed4: 38 63 37 04 ori r3,r3,0x3704 <== NOT EXECUTED 8010ed8: 38 84 36 50 ori r4,r4,0x3650 <== NOT EXECUTED 8010edc: 34 02 03 46 mvi r2,838 <== NOT EXECUTED 8010ee0: e3 ff ff 8a bi 8010d08 <== 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 ); 8010ee4: 28 21 00 00 lw r1,(r1+0) 8010ee8: ba 00 10 00 mv r2,r16 8010eec: b9 a0 18 00 mv r3,r13 8010ef0: f8 00 0a 53 calli 801383c my_length = 0; copied += to_copy; 8010ef4: b5 8d 60 00 add r12,r12,r13 } IMFS_mtime_ctime_update( the_jnode ); 8010ef8: 37 81 00 2c addi r1,sp,44 8010efc: 34 02 00 00 mvi r2,0 8010f00: fb ff c6 d0 calli 8002a40 8010f04: 2b 81 00 2c lw r1,(sp+44) 8010f08: 59 61 00 48 sw (r11+72),r1 8010f0c: 59 61 00 44 sw (r11+68),r1 return copied; } 8010f10: b9 80 08 00 mv r1,r12 8010f14: 2b 9d 00 04 lw ra,(sp+4) 8010f18: 2b 8b 00 28 lw r11,(sp+40) 8010f1c: 2b 8c 00 24 lw r12,(sp+36) 8010f20: 2b 8d 00 20 lw r13,(sp+32) 8010f24: 2b 8e 00 1c lw r14,(sp+28) 8010f28: 2b 8f 00 18 lw r15,(sp+24) 8010f2c: 2b 90 00 14 lw r16,(sp+20) 8010f30: 2b 91 00 10 lw r17,(sp+16) 8010f34: 2b 92 00 0c lw r18,(sp+12) 8010f38: 2b 93 00 08 lw r19,(sp+8) 8010f3c: 37 9c 00 30 addi sp,sp,48 8010f40: c3 a0 00 00 ret 08006c28 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8006c28: 37 9c ff a8 addi sp,sp,-88 8006c2c: 5b 8b 00 18 sw (sp+24),r11 8006c30: 5b 8c 00 14 sw (sp+20),r12 8006c34: 5b 8d 00 10 sw (sp+16),r13 8006c38: 5b 8e 00 0c sw (sp+12),r14 8006c3c: 5b 8f 00 08 sw (sp+8),r15 8006c40: 5b 9d 00 04 sw (sp+4),ra 8006c44: b8 40 58 00 mv r11,r2 8006c48: b8 20 78 00 mv r15,r1 8006c4c: b8 60 70 00 mv r14,r3 8006c50: b8 80 68 00 mv r13,r4 8006c54: 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 ); 8006c58: f8 00 1b 92 calli 800daa0 8006c5c: b8 20 10 00 mv r2,r1 8006c60: 37 83 00 1c addi r3,sp,28 8006c64: b9 e0 08 00 mv r1,r15 8006c68: 37 84 00 58 addi r4,sp,88 8006c6c: fb ff ff 74 calli 8006a3c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8006c70: 21 66 f0 00 andi r6,r11,0xf000 8006c74: 34 01 40 00 mvi r1,16384 8006c78: 44 c1 00 12 be r6,r1,8006cc0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8006c7c: 38 01 80 00 mvu r1,0x8000 8006c80: 34 02 00 05 mvi r2,5 8006c84: 44 c1 00 10 be r6,r1,8006cc4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8006c88: 64 c2 20 00 cmpei r2,r6,8192 8006c8c: 64 c1 60 00 cmpei r1,r6,24576 8006c90: b8 41 08 00 or r1,r2,r1 8006c94: 44 20 00 05 be r1,r0,8006ca8 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8006c98: 5b 8e 00 40 sw (sp+64),r14 8006c9c: 5b 8d 00 44 sw (sp+68),r13 8006ca0: 34 02 00 02 mvi r2,2 8006ca4: e0 00 00 08 bi 8006cc4 } else if (S_ISFIFO(mode)) 8006ca8: 34 01 10 00 mvi r1,4096 8006cac: 34 02 00 07 mvi r2,7 8006cb0: 44 c1 00 05 be r6,r1,8006cc4 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8006cb4: f8 00 16 ab calli 800c760 <__errno> <== NOT EXECUTED 8006cb8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8006cbc: e0 00 00 0b bi 8006ce8 <== NOT EXECUTED 8006cc0: 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( 8006cc4: b9 80 08 00 mv r1,r12 8006cc8: b9 60 20 00 mv r4,r11 8006ccc: 37 83 00 1c addi r3,sp,28 8006cd0: 37 85 00 40 addi r5,sp,64 8006cd4: f8 00 0f 15 calli 800a928 new_name, mode, &info ); if ( !new_node ) 8006cd8: 34 02 00 00 mvi r2,0 8006cdc: 5c 22 00 05 bne r1,r2,8006cf0 rtems_set_errno_and_return_minus_one( ENOMEM ); 8006ce0: f8 00 16 a0 calli 800c760 <__errno> <== NOT EXECUTED 8006ce4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006ce8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006cec: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED return 0; } 8006cf0: b8 40 08 00 mv r1,r2 8006cf4: 2b 9d 00 04 lw ra,(sp+4) 8006cf8: 2b 8b 00 18 lw r11,(sp+24) 8006cfc: 2b 8c 00 14 lw r12,(sp+20) 8006d00: 2b 8d 00 10 lw r13,(sp+16) 8006d04: 2b 8e 00 0c lw r14,(sp+12) 8006d08: 2b 8f 00 08 lw r15,(sp+8) 8006d0c: 37 9c 00 58 addi sp,sp,88 8006d10: 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 43 29 calli 8012da4 <__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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002a9c: 38 63 55 30 ori r3,r3,0x5530 <== NOT EXECUTED 8002aa0: 38 84 53 a4 ori r4,r4,0x53a4 <== 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 81 d8 ori r12,r12,0x81d8 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 3d 80 calli 80120c0 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 55 00 ori r13,r13,0x5500 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 3d 1b calli 8011f68 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 53 b0 ori r2,r2,0x53b0 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 53 c4 ori r2,r2,0x53c4 <== NOT EXECUTED 8002b38: f8 00 3c eb calli 8011ee4 (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 53 d4 ori r2,r2,0x53d4 8002b54: f8 00 3c e4 calli 8011ee4 (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 53 e0 ori r1,r1,0x53e0 <== NOT EXECUTED 8002b68: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002b6c: f8 00 3d 55 calli 80120c0 <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002b80: 38 63 55 30 ori r3,r3,0x5530 <== NOT EXECUTED 8002b84: 38 84 53 f4 ori r4,r4,0x53f4 <== 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 53 e0 ori r1,r1,0x53e0 <== NOT EXECUTED 8002b9c: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002ba0: f8 00 3d 48 calli 80120c0 <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002bb4: 38 63 55 30 ori r3,r3,0x5530 <== NOT EXECUTED 8002bb8: 38 84 53 f4 ori r4,r4,0x53f4 <== 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 53 f8 ori r1,r1,0x53f8 <== NOT EXECUTED 8002bd0: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002bd4: f8 00 3d 3b calli 80120c0 <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002be8: 38 63 55 30 ori r3,r3,0x5530 <== NOT EXECUTED 8002bec: 38 84 53 f4 ori r4,r4,0x53f4 <== 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 54 0c ori r2,r2,0x540c <== NOT EXECUTED 8002c04: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002c08: f8 00 3c b7 calli 8011ee4 <== 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 53 58 ori r1,r1,0x5358 <== NOT EXECUTED 8002c1c: 38 63 55 30 ori r3,r3,0x5530 <== NOT EXECUTED 8002c20: 38 84 53 f4 ori r4,r4,0x53f4 <== 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 4d c4 ori r1,r1,0x4dc4 8002c34: f8 00 44 d2 calli 8013f7c } 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 43 15 calli 8012da4 <__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 47 d8 calli 8014114 <== 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 e8 calli 8004d64 <_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 d7 calli 8004d34 <_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 08006d20 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8006d20: 37 9c ff ec addi sp,sp,-20 8006d24: 5b 8b 00 0c sw (sp+12),r11 8006d28: 5b 8c 00 08 sw (sp+8),r12 8006d2c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8006d30: 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 */ ) { 8006d34: 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 ) { 8006d38: 29 61 00 08 lw r1,(r11+8) 8006d3c: 44 20 00 05 be r1,r0,8006d50 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8006d40: b9 60 08 00 mv r1,r11 8006d44: f8 00 07 5b calli 8008ab0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8006d48: 34 01 00 00 mvi r1,0 8006d4c: 59 61 00 08 sw (r11+8),r1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8006d50: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8006d54: 34 02 00 00 mvi r2,0 8006d58: 37 81 00 10 addi r1,sp,16 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8006d5c: 34 63 ff ff addi r3,r3,-1 8006d60: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8006d64: f8 00 01 3f calli 8007260 8006d68: 2b 81 00 10 lw r1,(sp+16) 8006d6c: 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) ) { 8006d70: b9 60 08 00 mv r1,r11 8006d74: f8 00 01 83 calli 8007380 8006d78: 5c 20 00 12 bne r1,r0,8006dc0 8006d7c: 2d 63 00 34 lhu r3,(r11+52) 8006d80: 5c 61 00 10 bne r3,r1,8006dc0 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8006d84: 78 01 08 01 mvhi r1,0x801 8006d88: 38 21 d1 10 ori r1,r1,0xd110 8006d8c: 28 21 00 00 lw r1,(r1+0) 8006d90: 29 82 00 00 lw r2,(r12+0) 8006d94: 28 24 00 04 lw r4,(r1+4) 8006d98: 5c 82 00 02 bne r4,r2,8006da0 rtems_filesystem_current.node_access = NULL; 8006d9c: 58 23 00 04 sw (r1+4),r3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 8006da0: 29 62 00 4c lw r2,(r11+76) 8006da4: 34 01 00 04 mvi r1,4 8006da8: 5c 41 00 04 bne r2,r1,8006db8 if ( the_jnode->info.sym_link.name ) 8006dac: 29 61 00 50 lw r1,(r11+80) 8006db0: 44 20 00 02 be r1,r0,8006db8 free( (void*) the_jnode->info.sym_link.name ); 8006db4: f8 00 00 ac calli 8007064 } free( the_jnode ); 8006db8: b9 60 08 00 mv r1,r11 8006dbc: f8 00 00 aa calli 8007064 } return 0; } 8006dc0: 34 01 00 00 mvi r1,0 8006dc4: 2b 9d 00 04 lw ra,(sp+4) 8006dc8: 2b 8b 00 0c lw r11,(sp+12) 8006dcc: 2b 8c 00 08 lw r12,(sp+8) 8006dd0: 37 9c 00 14 addi sp,sp,20 8006dd4: c3 a0 00 00 ret 08006dd8 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8006dd8: 37 9c ff f0 addi sp,sp,-16 8006ddc: 5b 8b 00 10 sw (sp+16),r11 8006de0: 5b 8c 00 0c sw (sp+12),r12 8006de4: 5b 8d 00 08 sw (sp+8),r13 8006de8: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8006dec: 28 2c 00 00 lw r12,(r1+0) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8006df0: b8 40 58 00 mv r11,r2 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8006df4: 34 02 00 05 mvi r2,5 8006df8: 29 81 00 4c lw r1,(r12+76) 8006dfc: 34 21 ff fe addi r1,r1,-2 8006e00: 54 22 00 12 bgu r1,r2,8006e48 8006e04: 78 0d 08 01 mvhi r13,0x801 8006e08: 34 02 00 02 mvi r2,2 8006e0c: fb ff e4 f9 calli 80001f0 <__ashlsi3> 8006e10: 39 ad be 60 ori r13,r13,0xbe60 8006e14: b5 a1 08 00 add r1,r13,r1 8006e18: 28 21 00 00 lw r1,(r1+0) 8006e1c: 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 ); 8006e20: 29 81 00 54 lw r1,(r12+84) 8006e24: 29 82 00 50 lw r2,(r12+80) 8006e28: 59 61 00 1c sw (r11+28),r1 8006e2c: 59 62 00 18 sw (r11+24),r2 break; 8006e30: e0 00 00 0b bi 8006e5c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8006e34: 29 81 00 54 lw r1,(r12+84) 8006e38: e0 00 00 02 bi 8006e40 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8006e3c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006e40: 59 61 00 20 sw (r11+32),r1 break; 8006e44: e0 00 00 06 bi 8006e5c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8006e48: f8 00 16 46 calli 800c760 <__errno> <== NOT EXECUTED 8006e4c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8006e50: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006e54: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006e58: e0 00 00 12 bi 8006ea0 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 8006e5c: 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; 8006e60: 2d 81 00 34 lhu r1,(r12+52) buf->st_ino = the_jnode->st_ino; 8006e64: 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; 8006e68: 29 82 00 30 lw r2,(r12+48) buf->st_nlink = the_jnode->st_nlink; 8006e6c: 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; 8006e70: 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; 8006e74: 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; 8006e78: 2d 82 00 3c lhu r2,(r12+60) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 8006e7c: 59 61 00 24 sw (r11+36),r1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8006e80: 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; 8006e84: 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; 8006e88: 29 82 00 44 lw r2,(r12+68) 8006e8c: 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; 8006e90: 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; 8006e94: 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; 8006e98: 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; 8006e9c: 59 6c 00 34 sw (r11+52),r12 return 0; } 8006ea0: 2b 9d 00 04 lw ra,(sp+4) 8006ea4: 2b 8b 00 10 lw r11,(sp+16) 8006ea8: 2b 8c 00 0c lw r12,(sp+12) 8006eac: 2b 8d 00 08 lw r13,(sp+8) 8006eb0: 37 9c 00 10 addi sp,sp,16 8006eb4: 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 47 8d calli 8014068 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 2a 3f calli 800cb44 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 800224c: b9 c0 08 00 mv r1,r14 8002250: f8 00 47 63 calli 8013fdc 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 a1 calli 800bcf4 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 42 c8 calli 8012da4 <__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 42 ad calli 8012da4 <__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 45 4b calli 801383c 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 cb calli 800be48 /* * 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 42 78 calli 8012da4 <__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 42 72 calli 8012da4 <__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 d6 50 ori r4,r4,0xd650 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 ae calli 8007688 /* * 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 d6 54 ori r1,r1,0xd654 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 d6 4d ori r1,r1,0xd64d 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 d0 c4 ori r1,r1,0xd0c4 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 30 d2 calli 800d370 * 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 d6 4d ori r1,r1,0xd64d 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 d0 1c ori r1,r1,0xd01c 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 bb calli 8002f40 <_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 80 calli 8002660 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 8001064: 78 01 08 01 mvhi r1,0x801 8001068: 38 21 d0 1c ori r1,r1,0xd01c 800106c: 78 0b 08 01 mvhi r11,0x801 8001070: 39 6b d7 28 ori r11,r11,0xd728 8001074: 28 21 00 00 lw r1,(r1+0) 8001078: 29 6c 00 00 lw r12,(r11+0) 800107c: f8 00 0b 1a calli 8003ce4 <_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 e5 2c ori r1,r1,0xe52c <== 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 07 mvhi r12,0x807 <== NOT EXECUTED 8005418: 39 8c 0f 00 ori r12,r12,0xf00 <== 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 14 lw r16,(r11+276) <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 8005434: 35 6c 00 c4 addi r12,r11,196 <== 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 e5 28 ori r4,r4,0xe528 <== 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 1f 38 ori r2,r2,0x1f38 <== 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 1f 48 ori r2,r2,0x1f48 <== 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 e5 2c ori r11,r11,0xe52c <== NOT EXECUTED 80054cc: 39 8c e5 28 ori r12,r12,0xe528 <== 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 1f 58 ori r2,r2,0x1f58 <== 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 e5 24 ori r2,r2,0xe524 <== 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 1f 78 ori r2,r2,0x1f78 <== 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 1f 88 ori r2,r2,0x1f88 <== 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 1f f4 ori r1,r1,0x1ff4 <== 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 c8 lw r12,(r11+200) <== 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 20 04 ori r1,r1,0x2004 <== 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 20 24 ori r1,r1,0x2024 <== 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 20 38 ori r1,r1,0x2038 <== 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 20 4c ori r1,r1,0x204c <== 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 c4 lw r2,(r11+196) <== NOT EXECUTED 8005690: 29 63 00 c8 lw r3,(r11+200) <== NOT EXECUTED 8005694: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005698: 38 21 20 64 ori r1,r1,0x2064 <== 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 20 98 ori r1,r1,0x2098 <== 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 a4 calli 800a554 <== NOT EXECUTED 080149ec <_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 ) { 80149ec: 37 9c ff e4 addi sp,sp,-28 80149f0: 5b 8b 00 1c sw (sp+28),r11 80149f4: 5b 8c 00 18 sw (sp+24),r12 80149f8: 5b 8d 00 14 sw (sp+20),r13 80149fc: 5b 8e 00 10 sw (sp+16),r14 8014a00: 5b 8f 00 0c sw (sp+12),r15 8014a04: 5b 90 00 08 sw (sp+8),r16 8014a08: 5b 9d 00 04 sw (sp+4),ra 8014a0c: 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 ) { 8014a10: 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 ) { 8014a14: b8 60 70 00 mv r14,r3 8014a18: b8 40 80 00 mv r16,r2 8014a1c: 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 ) { 8014a20: 50 23 00 03 bgeu r1,r3,8014a2c <_CORE_message_queue_Broadcast+0x40> 8014a24: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8014a28: e0 00 00 13 bi 8014a74 <_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 ) { 8014a2c: 29 63 00 48 lw r3,(r11+72) 8014a30: 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))) { 8014a34: 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 ) { 8014a38: 44 61 00 08 be r3,r1,8014a58 <_CORE_message_queue_Broadcast+0x6c> *count = 0; 8014a3c: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8014a40: e0 00 00 0d bi 8014a74 <_CORE_message_queue_Broadcast+0x88> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 8014a44: 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; 8014a48: 35 ad 00 01 addi r13,r13,1 8014a4c: f8 00 2d 08 calli 801fe6c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8014a50: 29 81 00 28 lw r1,(r12+40) 8014a54: 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))) { 8014a58: b9 60 08 00 mv r1,r11 8014a5c: f8 00 0c 28 calli 8017afc <_Thread_queue_Dequeue> 8014a60: b8 20 60 00 mv r12,r1 8014a64: ba 00 10 00 mv r2,r16 8014a68: 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 = 8014a6c: 5c 20 ff f6 bne r1,r0,8014a44 <_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; 8014a70: 59 ed 00 00 sw (r15+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 8014a74: 2b 9d 00 04 lw ra,(sp+4) 8014a78: 2b 8b 00 1c lw r11,(sp+28) 8014a7c: 2b 8c 00 18 lw r12,(sp+24) 8014a80: 2b 8d 00 14 lw r13,(sp+20) 8014a84: 2b 8e 00 10 lw r14,(sp+16) 8014a88: 2b 8f 00 0c lw r15,(sp+12) 8014a8c: 2b 90 00 08 lw r16,(sp+8) 8014a90: 37 9c 00 1c addi sp,sp,28 8014a94: c3 a0 00 00 ret 08008cc8 <_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 ) { 8008cc8: 37 9c ff f8 addi sp,sp,-8 8008ccc: 5b 8b 00 08 sw (sp+8),r11 8008cd0: 5b 9d 00 04 sw (sp+4),ra 8008cd4: 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)) ) { 8008cd8: fb ff ee 91 calli 800471c <_Thread_queue_Dequeue> 8008cdc: 34 02 00 00 mvi r2,0 8008ce0: 5c 22 00 0e bne r1,r2,8008d18 <_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 ); 8008ce4: 90 00 08 00 rcsr r1,IE 8008ce8: 34 02 ff fe mvi r2,-2 8008cec: a0 22 10 00 and r2,r1,r2 8008cf0: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8008cf4: 29 62 00 48 lw r2,(r11+72) 8008cf8: 29 63 00 40 lw r3,(r11+64) 8008cfc: 54 62 00 03 bgu r3,r2,8008d08 <_CORE_semaphore_Surrender+0x40> 8008d00: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8008d04: e0 00 00 04 bi 8008d14 <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED the_semaphore->count += 1; 8008d08: 34 42 00 01 addi r2,r2,1 8008d0c: 59 62 00 48 sw (r11+72),r2 8008d10: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008d14: d0 01 00 00 wcsr IE,r1 } return status; } 8008d18: b8 40 08 00 mv r1,r2 8008d1c: 2b 9d 00 04 lw ra,(sp+4) 8008d20: 2b 8b 00 08 lw r11,(sp+8) 8008d24: 37 9c 00 08 addi sp,sp,8 8008d28: c3 a0 00 00 ret 0800e4c4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800e4c4: 37 9c ff f8 addi sp,sp,-8 800e4c8: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800e4cc: 37 82 00 08 addi r2,sp,8 800e4d0: fb ff e0 c3 calli 80067dc <_Thread_Get> switch ( location ) { 800e4d4: 2b 82 00 08 lw r2,(sp+8) 800e4d8: 5c 40 00 1d bne r2,r0,800e54c <_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 ); 800e4dc: 90 00 18 00 rcsr r3,IE 800e4e0: 34 02 ff fe mvi r2,-2 800e4e4: a0 62 10 00 and r2,r3,r2 800e4e8: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800e4ec: 78 02 08 02 mvhi r2,0x802 800e4f0: 38 42 5a 00 ori r2,r2,0x5a00 800e4f4: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800e4f8: 34 04 00 00 mvi r4,0 800e4fc: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800e500: 5c 22 00 08 bne r1,r2,800e520 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800e504: 78 02 08 02 mvhi r2,0x802 800e508: 38 42 62 ec ori r2,r2,0x62ec 800e50c: 28 45 00 00 lw r5,(r2+0) 800e510: 34 04 00 01 mvi r4,1 800e514: 5c a4 00 03 bne r5,r4,800e520 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800e518: 34 04 00 02 mvi r4,2 <== NOT EXECUTED 800e51c: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800e520: 34 02 00 06 mvi r2,6 800e524: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800e528: d0 03 00 00 wcsr IE,r3 800e52c: 78 02 10 03 mvhi r2,0x1003 800e530: 38 42 ff f8 ori r2,r2,0xfff8 800e534: f8 00 05 3d calli 800fa28 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800e538: 78 01 08 02 mvhi r1,0x802 800e53c: 38 21 59 44 ori r1,r1,0x5944 800e540: 28 22 00 00 lw r2,(r1+0) 800e544: 34 42 ff ff addi r2,r2,-1 800e548: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800e54c: 2b 9d 00 04 lw ra,(sp+4) 800e550: 37 9c 00 08 addi sp,sp,8 800e554: c3 a0 00 00 ret 0800ed80 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800ed80: 37 9c ff e8 addi sp,sp,-24 800ed84: 5b 8b 00 18 sw (sp+24),r11 800ed88: 5b 8c 00 14 sw (sp+20),r12 800ed8c: 5b 8d 00 10 sw (sp+16),r13 800ed90: 5b 8e 00 0c sw (sp+12),r14 800ed94: 5b 8f 00 08 sw (sp+8),r15 800ed98: 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; 800ed9c: 28 2d 00 18 lw r13,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800eda0: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800eda4: 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; 800eda8: 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 ) { 800edac: f4 a2 08 00 cmpgu r1,r5,r2 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800edb0: 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; 800edb4: 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; 800edb8: 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; 800edbc: 34 01 00 01 mvi r1,1 800edc0: 5d a0 00 26 bne r13,r0,800ee58 <_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 ) { 800edc4: 34 01 00 02 mvi r1,2 800edc8: 5c 45 00 24 bne r2,r5,800ee58 <_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; 800edcc: 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 800edd0: 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); 800edd4: 29 62 00 10 lw r2,(r11+16) 800edd8: 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; 800eddc: 59 63 00 1c sw (r11+28),r3 800ede0: b9 c0 08 00 mv r1,r14 800ede4: fb ff d5 55 calli 8004338 <__umodsi3> 800ede8: 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; 800edec: 59 e1 00 00 sw (r15+0),r1 if( extend_size >= heap->min_block_size ) { 800edf0: 29 62 00 14 lw r2,(r11+20) 800edf4: 50 22 00 02 bgeu r1,r2,800edfc <_Heap_Extend+0x7c> 800edf8: e0 00 00 17 bi 800ee54 <_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; 800edfc: 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 = 800ee00: 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); 800ee04: 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; 800ee08: 20 84 00 01 andi r4,r4,0x1 800ee0c: b8 24 20 00 or r4,r1,r4 800ee10: c8 62 18 00 sub r3,r3,r2 800ee14: 59 84 00 04 sw (r12+4),r4 800ee18: 38 63 00 01 ori r3,r3,0x1 800ee1c: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800ee20: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800ee24: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800ee28: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800ee2c: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800ee30: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800ee34: 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; 800ee38: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800ee3c: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800ee40: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800ee44: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800ee48: b9 60 08 00 mv r1,r11 800ee4c: 35 82 00 08 addi r2,r12,8 800ee50: fb ff e5 2d calli 8008304 <_Heap_Free> 800ee54: b9 a0 08 00 mv r1,r13 } return HEAP_EXTEND_SUCCESSFUL; } 800ee58: 2b 9d 00 04 lw ra,(sp+4) 800ee5c: 2b 8b 00 18 lw r11,(sp+24) 800ee60: 2b 8c 00 14 lw r12,(sp+20) 800ee64: 2b 8d 00 10 lw r13,(sp+16) 800ee68: 2b 8e 00 0c lw r14,(sp+12) 800ee6c: 2b 8f 00 08 lw r15,(sp+8) 800ee70: 37 9c 00 18 addi sp,sp,24 800ee74: c3 a0 00 00 ret 08009074 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 8009074: 37 9c ff f4 addi sp,sp,-12 8009078: 5b 8b 00 0c sw (sp+12),r11 800907c: 5b 8c 00 08 sw (sp+8),r12 8009080: 5b 9d 00 04 sw (sp+4),ra 8009084: 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 ) 8009088: 28 22 00 10 lw r2,(r1+16) 800908c: b8 20 58 00 mv r11,r1 8009090: b8 60 08 00 mv r1,r3 8009094: 34 6c ff f8 addi r12,r3,-8 8009098: f8 00 46 26 calli 801a930 <__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; 800909c: 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 ) 80090a0: 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 80090a4: 50 26 00 03 bgeu r1,r6,80090b0 <_Heap_Free+0x3c> 80090a8: 34 02 00 00 mvi r2,0 80090ac: e0 00 00 03 bi 80090b8 <_Heap_Free+0x44> 80090b0: 29 62 00 24 lw r2,(r11+36) 80090b4: 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 ) ) { 80090b8: 44 40 00 66 be r2,r0,8009250 <_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; 80090bc: 28 25 00 04 lw r5,(r1+4) 80090c0: 34 02 ff fe mvi r2,-2 80090c4: 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); 80090c8: 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 80090cc: 50 66 00 03 bgeu r3,r6,80090d8 <_Heap_Free+0x64> 80090d0: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 80090d4: e0 00 00 03 bi 80090e0 <_Heap_Free+0x6c> <== NOT EXECUTED 80090d8: 29 64 00 24 lw r4,(r11+36) 80090dc: 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 ) ) { 80090e0: 44 80 00 5c be r4,r0,8009250 <_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; 80090e4: 28 64 00 04 lw r4,(r3+4) _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 80090e8: 20 87 00 01 andi r7,r4,0x1 80090ec: 44 e0 00 59 be r7,r0,8009250 <_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 )); 80090f0: 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; 80090f4: 34 07 ff fe mvi r7,-2 80090f8: 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 80090fc: 34 07 00 00 mvi r7,0 8009100: 45 03 00 05 be r8,r3,8009114 <_Heap_Free+0xa0> 8009104: b4 64 38 00 add r7,r3,r4 8009108: 28 e7 00 04 lw r7,(r7+4) 800910c: 20 e7 00 01 andi r7,r7,0x1 8009110: 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 ) ) { 8009114: 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 8009118: 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 ) ) { 800911c: 5c a0 00 23 bne r5,r0,80091a8 <_Heap_Free+0x134> uintptr_t const prev_size = block->prev_size; 8009120: 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); 8009124: 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 8009128: f0 26 30 00 cmpgeu r6,r1,r6 800912c: f1 01 40 00 cmpgeu r8,r8,r1 8009130: 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 ) ) { 8009134: a1 06 40 00 and r8,r8,r6 8009138: 45 00 00 46 be r8,r0,8009250 <_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) ) { 800913c: 28 26 00 04 lw r6,(r1+4) 8009140: 20 c6 00 01 andi r6,r6,0x1 8009144: 44 c0 00 43 be r6,r0,8009250 <_Heap_Free+0x1dc> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 8009148: 44 e0 00 0f be r7,r0,8009184 <_Heap_Free+0x110> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 800914c: 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; 8009150: 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; 8009154: 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; 8009158: b4 44 20 00 add r4,r2,r4 800915c: b4 85 28 00 add r5,r4,r5 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 8009160: 35 03 ff ff addi r3,r8,-1 8009164: 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; 8009168: 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; 800916c: 38 a3 00 01 ori r3,r5,0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8009170: 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; 8009174: 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; 8009178: 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; 800917c: 58 c7 00 08 sw (r6+8),r7 8009180: e0 00 00 29 bi 8009224 <_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; 8009184: b4 45 28 00 add r5,r2,r5 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8009188: 38 a4 00 01 ori r4,r5,0x1 800918c: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8009190: 28 64 00 04 lw r4,(r3+4) 8009194: 34 01 ff fe mvi r1,-2 next_block->prev_size = size; 8009198: 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; 800919c: a0 81 08 00 and r1,r4,r1 80091a0: 58 61 00 04 sw (r3+4),r1 80091a4: e0 00 00 20 bi 8009224 <_Heap_Free+0x1b0> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 80091a8: 44 e0 00 0d be r7,r0,80091dc <_Heap_Free+0x168> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 80091ac: 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; 80091b0: 28 66 00 08 lw r6,(r3+8) uintptr_t const size = block_size + next_block_size; 80091b4: b4 82 18 00 add r3,r4,r2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 80091b8: 58 25 00 0c sw (r1+12),r5 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 80091bc: 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; 80091c0: 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; 80091c4: 38 64 00 01 ori r4,r3,0x1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 80091c8: 58 e3 00 00 sw (r7+0),r3 new_block->prev = prev; next->prev = new_block; 80091cc: 58 c1 00 0c sw (r6+12),r1 prev->next = new_block; 80091d0: 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; 80091d4: 58 24 00 04 sw (r1+4),r4 80091d8: e0 00 00 13 bi 8009224 <_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; 80091dc: 38 44 00 01 ori r4,r2,0x1 80091e0: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 80091e4: 28 65 00 04 lw r5,(r3+4) 80091e8: 34 04 ff fe mvi r4,-2 next_block->prev_size = block_size; 80091ec: 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; 80091f0: a0 a4 20 00 and r4,r5,r4 80091f4: 58 64 00 04 sw (r3+4),r4 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 80091f8: 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; 80091fc: 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; 8009200: 29 65 00 3c lw r5,(r11+60) new_block->next = next; new_block->prev = block_before; 8009204: 58 2b 00 0c sw (r1+12),r11 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 8009208: 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; 800920c: 34 63 00 01 addi r3,r3,1 new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 8009210: 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; 8009214: 59 61 00 08 sw (r11+8),r1 8009218: 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; 800921c: 50 a3 00 02 bgeu r5,r3,8009224 <_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; 8009220: 59 63 00 3c sw (r11+60),r3 } } /* Statistics */ --stats->used_blocks; 8009224: 29 63 00 40 lw r3,(r11+64) ++stats->frees; 8009228: 29 61 00 50 lw r1,(r11+80) stats->free_size += block_size; 800922c: 29 64 00 30 lw r4,(r11+48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 8009230: 34 63 ff ff addi r3,r3,-1 ++stats->frees; 8009234: 34 21 00 01 addi r1,r1,1 stats->free_size += block_size; 8009238: b4 82 10 00 add r2,r4,r2 } } /* Statistics */ --stats->used_blocks; ++stats->frees; 800923c: 59 61 00 50 sw (r11+80),r1 stats->free_size += block_size; 8009240: 59 62 00 30 sw (r11+48),r2 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 8009244: 59 63 00 40 sw (r11+64),r3 ++stats->frees; stats->free_size += block_size; 8009248: 34 01 00 01 mvi r1,1 return( true ); 800924c: e0 00 00 02 bi 8009254 <_Heap_Free+0x1e0> 8009250: 34 01 00 00 mvi r1,0 } 8009254: 2b 9d 00 04 lw ra,(sp+4) 8009258: 2b 8b 00 0c lw r11,(sp+12) 800925c: 2b 8c 00 08 lw r12,(sp+8) 8009260: 37 9c 00 0c addi sp,sp,12 8009264: c3 a0 00 00 ret 0801b4cc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 801b4cc: 37 9c ff f0 addi sp,sp,-16 801b4d0: 5b 8b 00 10 sw (sp+16),r11 801b4d4: 5b 8c 00 0c sw (sp+12),r12 801b4d8: 5b 8d 00 08 sw (sp+8),r13 801b4dc: 5b 9d 00 04 sw (sp+4),ra 801b4e0: 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 ) 801b4e4: 28 22 00 10 lw r2,(r1+16) 801b4e8: b8 20 58 00 mv r11,r1 801b4ec: b9 80 08 00 mv r1,r12 801b4f0: b8 60 68 00 mv r13,r3 801b4f4: fb ff fd 0f calli 801a930 <__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; 801b4f8: 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 ) 801b4fc: 35 84 ff f8 addi r4,r12,-8 801b500: 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 801b504: 50 82 00 03 bgeu r4,r2,801b510 <_Heap_Size_of_alloc_area+0x44> 801b508: 34 01 00 00 mvi r1,0 801b50c: e0 00 00 03 bi 801b518 <_Heap_Size_of_alloc_area+0x4c> 801b510: 29 61 00 24 lw r1,(r11+36) 801b514: 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 ) ) { 801b518: 44 20 00 13 be r1,r0,801b564 <_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); 801b51c: 28 83 00 04 lw r3,(r4+4) 801b520: 34 01 ff fe mvi r1,-2 801b524: a0 61 08 00 and r1,r3,r1 801b528: 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 801b52c: 50 82 00 03 bgeu r4,r2,801b538 <_Heap_Size_of_alloc_area+0x6c> 801b530: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 801b534: e0 00 00 03 bi 801b540 <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED 801b538: 29 61 00 24 lw r1,(r11+36) 801b53c: f0 24 08 00 cmpgeu r1,r1,r4 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 801b540: 44 20 00 09 be r1,r0,801b564 <_Heap_Size_of_alloc_area+0x98> 801b544: 28 81 00 04 lw r1,(r4+4) 801b548: 20 21 00 01 andi r1,r1,0x1 801b54c: 44 20 00 06 be r1,r0,801b564 <_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; 801b550: c8 8c 20 00 sub r4,r4,r12 801b554: 34 84 00 04 addi r4,r4,4 801b558: 59 a4 00 00 sw (r13+0),r4 801b55c: 34 01 00 01 mvi r1,1 return true; 801b560: e0 00 00 02 bi 801b568 <_Heap_Size_of_alloc_area+0x9c> 801b564: 34 01 00 00 mvi r1,0 } 801b568: 2b 9d 00 04 lw ra,(sp+4) 801b56c: 2b 8b 00 10 lw r11,(sp+16) 801b570: 2b 8c 00 0c lw r12,(sp+12) 801b574: 2b 8d 00 08 lw r13,(sp+8) 801b578: 37 9c 00 10 addi sp,sp,16 801b57c: c3 a0 00 00 ret 08003c00 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003c00: 37 9c ff ac addi sp,sp,-84 8003c04: 5b 8b 00 50 sw (sp+80),r11 8003c08: 5b 8c 00 4c sw (sp+76),r12 8003c0c: 5b 8d 00 48 sw (sp+72),r13 8003c10: 5b 8e 00 44 sw (sp+68),r14 8003c14: 5b 8f 00 40 sw (sp+64),r15 8003c18: 5b 90 00 3c sw (sp+60),r16 8003c1c: 5b 91 00 38 sw (sp+56),r17 8003c20: 5b 92 00 34 sw (sp+52),r18 8003c24: 5b 93 00 30 sw (sp+48),r19 8003c28: 5b 94 00 2c sw (sp+44),r20 8003c2c: 5b 95 00 28 sw (sp+40),r21 8003c30: 5b 96 00 24 sw (sp+36),r22 8003c34: 5b 97 00 20 sw (sp+32),r23 8003c38: 5b 98 00 1c sw (sp+28),r24 8003c3c: 5b 99 00 18 sw (sp+24),r25 8003c40: 5b 9b 00 14 sw (sp+20),fp 8003c44: 5b 9d 00 10 sw (sp+16),ra 8003c48: 20 63 00 ff andi r3,r3,0xff 8003c4c: b8 20 68 00 mv r13,r1 8003c50: b8 40 70 00 mv r14,r2 uintptr_t const page_size = heap->page_size; 8003c54: 28 2f 00 10 lw r15,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003c58: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003c5c: 28 32 00 24 lw r18,(r1+36) Heap_Block *block = heap->first_block; 8003c60: 28 2b 00 20 lw r11,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003c64: 5c 60 00 04 bne r3,r0,8003c74 <_Heap_Walk+0x74> 8003c68: 78 0c 08 00 mvhi r12,0x800 8003c6c: 39 8c 3b dc ori r12,r12,0x3bdc 8003c70: e0 00 00 03 bi 8003c7c <_Heap_Walk+0x7c> 8003c74: 78 0c 08 00 mvhi r12,0x800 8003c78: 39 8c 41 2c ori r12,r12,0x412c if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003c7c: 78 02 08 02 mvhi r2,0x802 8003c80: 38 42 0a 88 ori r2,r2,0xa88 8003c84: 28 42 00 00 lw r2,(r2+0) 8003c88: 34 01 00 03 mvi r1,3 8003c8c: 5c 41 01 0c bne r2,r1,80040bc <_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)( 8003c90: 29 a1 00 08 lw r1,(r13+8) 8003c94: 29 a6 00 18 lw r6,(r13+24) 8003c98: 29 a7 00 1c lw r7,(r13+28) 8003c9c: 5b 81 00 08 sw (sp+8),r1 8003ca0: 29 a1 00 0c lw r1,(r13+12) 8003ca4: 78 03 08 01 mvhi r3,0x801 8003ca8: 5b 92 00 04 sw (sp+4),r18 8003cac: 5b 81 00 0c sw (sp+12),r1 8003cb0: 38 63 ce c4 ori r3,r3,0xcec4 8003cb4: b9 c0 08 00 mv r1,r14 8003cb8: 34 02 00 00 mvi r2,0 8003cbc: b9 e0 20 00 mv r4,r15 8003cc0: ba 60 28 00 mv r5,r19 8003cc4: b9 60 40 00 mv r8,r11 8003cc8: 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 ) { 8003ccc: 5d e0 00 05 bne r15,r0,8003ce0 <_Heap_Walk+0xe0> (*printer)( source, true, "page size is zero\n" ); 8003cd0: 78 03 08 01 mvhi r3,0x801 8003cd4: b9 c0 08 00 mv r1,r14 8003cd8: 38 63 cf 58 ori r3,r3,0xcf58 8003cdc: e0 00 00 3b bi 8003dc8 <_Heap_Walk+0x1c8> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8003ce0: 21 f0 00 07 andi r16,r15,0x7 8003ce4: 46 00 00 06 be r16,r0,8003cfc <_Heap_Walk+0xfc> (*printer)( 8003ce8: 78 03 08 01 mvhi r3,0x801 8003cec: b9 c0 08 00 mv r1,r14 8003cf0: 38 63 cf 6c ori r3,r3,0xcf6c 8003cf4: b9 e0 20 00 mv r4,r15 8003cf8: e0 00 01 09 bi 800411c <_Heap_Walk+0x51c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8003cfc: ba 60 08 00 mv r1,r19 8003d00: b9 e0 10 00 mv r2,r15 8003d04: fb ff f3 ef calli 8000cc0 <__umodsi3> 8003d08: b8 20 88 00 mv r17,r1 8003d0c: 44 30 00 08 be r1,r16,8003d2c <_Heap_Walk+0x12c> (*printer)( 8003d10: 78 03 08 01 mvhi r3,0x801 8003d14: b9 c0 08 00 mv r1,r14 8003d18: 38 63 cf 8c ori r3,r3,0xcf8c 8003d1c: ba 60 20 00 mv r4,r19 8003d20: 34 02 00 01 mvi r2,1 8003d24: d9 80 00 00 call r12 8003d28: e0 00 00 5a bi 8003e90 <_Heap_Walk+0x290> ); return false; } if ( 8003d2c: 35 61 00 08 addi r1,r11,8 8003d30: b9 e0 10 00 mv r2,r15 8003d34: fb ff f3 e3 calli 8000cc0 <__umodsi3> 8003d38: b8 20 80 00 mv r16,r1 8003d3c: 44 31 00 08 be r1,r17,8003d5c <_Heap_Walk+0x15c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 8003d40: 78 03 08 01 mvhi r3,0x801 8003d44: b9 c0 08 00 mv r1,r14 8003d48: 38 63 cf b0 ori r3,r3,0xcfb0 8003d4c: b9 60 20 00 mv r4,r11 8003d50: 34 02 00 01 mvi r2,1 8003d54: d9 80 00 00 call r12 8003d58: e0 00 00 92 bi 8003fa0 <_Heap_Walk+0x3a0> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8003d5c: 29 71 00 04 lw r17,(r11+4) 8003d60: 22 31 00 01 andi r17,r17,0x1 8003d64: 5e 21 00 07 bne r17,r1,8003d80 <_Heap_Walk+0x180> (*printer)( 8003d68: 78 03 08 01 mvhi r3,0x801 8003d6c: b9 c0 08 00 mv r1,r14 8003d70: 38 63 cf e4 ori r3,r3,0xcfe4 8003d74: 34 02 00 01 mvi r2,1 8003d78: d9 80 00 00 call r12 8003d7c: e0 00 00 89 bi 8003fa0 <_Heap_Walk+0x3a0> ); return false; } if ( first_block->prev_size != page_size ) { 8003d80: 29 79 00 00 lw r25,(r11+0) 8003d84: 47 2f 00 07 be r25,r15,8003da0 <_Heap_Walk+0x1a0> (*printer)( 8003d88: 78 03 08 01 mvhi r3,0x801 8003d8c: b9 c0 08 00 mv r1,r14 8003d90: 38 63 d0 14 ori r3,r3,0xd014 8003d94: bb 20 20 00 mv r4,r25 8003d98: b9 e0 28 00 mv r5,r15 8003d9c: e0 00 00 3b bi 8003e88 <_Heap_Walk+0x288> ); return false; } if ( _Heap_Is_free( last_block ) ) { 8003da0: 2a 41 00 04 lw r1,(r18+4) 8003da4: 34 02 ff fe mvi r2,-2 8003da8: a0 22 08 00 and r1,r1,r2 8003dac: b6 41 08 00 add r1,r18,r1 8003db0: 28 2f 00 04 lw r15,(r1+4) 8003db4: 21 ef 00 01 andi r15,r15,0x1 8003db8: 5d f0 00 07 bne r15,r16,8003dd4 <_Heap_Walk+0x1d4> (*printer)( 8003dbc: 78 03 08 01 mvhi r3,0x801 8003dc0: b9 c0 08 00 mv r1,r14 8003dc4: 38 63 d0 40 ori r3,r3,0xd040 8003dc8: 34 02 00 01 mvi r2,1 8003dcc: d9 80 00 00 call r12 8003dd0: e0 00 00 a5 bi 8004064 <_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; 8003dd4: 29 a4 00 08 lw r4,(r13+8) ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003dd8: b8 40 a8 00 mv r21,r2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 8003ddc: 29 b4 00 10 lw r20,(r13+16) 8003de0: b9 a0 88 00 mv r17,r13 8003de4: b8 80 b0 00 mv r22,r4 8003de8: e0 00 00 2e bi 8003ea0 <_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 8003dec: 29 a1 00 20 lw r1,(r13+32) 8003df0: 34 0f 00 00 mvi r15,0 8003df4: 52 c1 00 02 bgeu r22,r1,8003dfc <_Heap_Walk+0x1fc> 8003df8: e0 00 00 03 bi 8003e04 <_Heap_Walk+0x204> 8003dfc: 29 af 00 24 lw r15,(r13+36) 8003e00: f1 f6 78 00 cmpgeu r15,r15,r22 ); return false; } if ( 8003e04: 36 c1 00 08 addi r1,r22,8 8003e08: 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 ) ) { 8003e0c: 5d e0 00 06 bne r15,r0,8003e24 <_Heap_Walk+0x224> (*printer)( 8003e10: 78 03 08 01 mvhi r3,0x801 8003e14: ba c0 20 00 mv r4,r22 8003e18: b9 c0 08 00 mv r1,r14 8003e1c: 38 63 d0 58 ori r3,r3,0xd058 8003e20: e0 00 00 8f bi 800405c <_Heap_Walk+0x45c> ); return false; } if ( 8003e24: fb ff f3 a7 calli 8000cc0 <__umodsi3> 8003e28: 44 20 00 06 be r1,r0,8003e40 <_Heap_Walk+0x240> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 8003e2c: 78 03 08 01 mvhi r3,0x801 8003e30: ba c0 20 00 mv r4,r22 8003e34: b9 c0 08 00 mv r1,r14 8003e38: 38 63 d0 78 ori r3,r3,0xd078 8003e3c: e0 00 00 b8 bi 800411c <_Heap_Walk+0x51c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003e40: 2a c3 00 04 lw r3,(r22+4) 8003e44: a0 75 18 00 and r3,r3,r21 8003e48: b6 c3 18 00 add r3,r22,r3 8003e4c: 28 70 00 04 lw r16,(r3+4) 8003e50: 22 10 00 01 andi r16,r16,0x1 8003e54: 46 01 00 07 be r16,r1,8003e70 <_Heap_Walk+0x270> (*printer)( 8003e58: 78 03 08 01 mvhi r3,0x801 8003e5c: b8 20 78 00 mv r15,r1 8003e60: ba c0 20 00 mv r4,r22 8003e64: b9 c0 08 00 mv r1,r14 8003e68: 38 63 d0 a8 ori r3,r3,0xd0a8 8003e6c: e0 00 00 7c bi 800405c <_Heap_Walk+0x45c> ); return false; } if ( free_block->prev != prev_block ) { 8003e70: 2a c5 00 0c lw r5,(r22+12) 8003e74: 44 b1 00 09 be r5,r17,8003e98 <_Heap_Walk+0x298> (*printer)( 8003e78: 78 03 08 01 mvhi r3,0x801 8003e7c: ba c0 20 00 mv r4,r22 8003e80: b9 c0 08 00 mv r1,r14 8003e84: 38 63 d0 c4 ori r3,r3,0xd0c4 8003e88: 34 02 00 01 mvi r2,1 8003e8c: d9 80 00 00 call r12 8003e90: ba 00 08 00 mv r1,r16 8003e94: e0 00 00 8b bi 80040c0 <_Heap_Walk+0x4c0> return false; } prev_block = free_block; free_block = free_block->next; 8003e98: ba c0 88 00 mv r17,r22 8003e9c: 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 ) { 8003ea0: 5e cd ff d3 bne r22,r13,8003dec <_Heap_Walk+0x1ec> 8003ea4: e0 00 00 7a bi 800408c <_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; 8003ea8: 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 ) { 8003eac: 21 e2 00 01 andi r2,r15,0x1 8003eb0: 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); 8003eb4: b5 6f 80 00 add r16,r11,r15 8003eb8: 44 40 00 09 be r2,r0,8003edc <_Heap_Walk+0x2dc> (*printer)( 8003ebc: 78 03 08 01 mvhi r3,0x801 8003ec0: b9 c0 08 00 mv r1,r14 8003ec4: 34 02 00 00 mvi r2,0 8003ec8: 38 63 d0 f8 ori r3,r3,0xd0f8 8003ecc: b9 60 20 00 mv r4,r11 8003ed0: b9 e0 28 00 mv r5,r15 8003ed4: d9 80 00 00 call r12 8003ed8: e0 00 00 08 bi 8003ef8 <_Heap_Walk+0x2f8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8003edc: 29 66 00 00 lw r6,(r11+0) 8003ee0: 78 03 08 01 mvhi r3,0x801 8003ee4: b9 c0 08 00 mv r1,r14 8003ee8: 38 63 d1 10 ori r3,r3,0xd110 8003eec: b9 60 20 00 mv r4,r11 8003ef0: b9 e0 28 00 mv r5,r15 8003ef4: 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 8003ef8: 29 a1 00 20 lw r1,(r13+32) 8003efc: 52 01 00 03 bgeu r16,r1,8003f08 <_Heap_Walk+0x308> 8003f00: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 8003f04: e0 00 00 03 bi 8003f10 <_Heap_Walk+0x310> <== NOT EXECUTED 8003f08: 29 b1 00 24 lw r17,(r13+36) 8003f0c: f2 30 88 00 cmpgeu r17,r17,r16 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8003f10: 5e 20 00 05 bne r17,r0,8003f24 <_Heap_Walk+0x324> (*printer)( 8003f14: 78 03 08 01 mvhi r3,0x801 8003f18: b9 c0 08 00 mv r1,r14 8003f1c: 38 63 d1 38 ori r3,r3,0xd138 8003f20: e0 00 00 1c bi 8003f90 <_Heap_Walk+0x390> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8003f24: b9 e0 08 00 mv r1,r15 8003f28: bb 20 10 00 mv r2,r25 8003f2c: fb ff f3 65 calli 8000cc0 <__umodsi3> 8003f30: b8 20 88 00 mv r17,r1 8003f34: 44 20 00 09 be r1,r0,8003f58 <_Heap_Walk+0x358> (*printer)( 8003f38: 78 03 08 01 mvhi r3,0x801 8003f3c: b9 c0 08 00 mv r1,r14 8003f40: 38 63 d1 68 ori r3,r3,0xd168 8003f44: b9 60 20 00 mv r4,r11 8003f48: b9 e0 28 00 mv r5,r15 8003f4c: 34 02 00 01 mvi r2,1 8003f50: d9 80 00 00 call r12 8003f54: e0 00 00 74 bi 8004124 <_Heap_Walk+0x524> ); return false; } if ( block_size < min_block_size ) { 8003f58: 51 f3 00 0a bgeu r15,r19,8003f80 <_Heap_Walk+0x380> (*printer)( 8003f5c: 78 03 08 01 mvhi r3,0x801 8003f60: b9 c0 08 00 mv r1,r14 8003f64: 38 63 d1 98 ori r3,r3,0xd198 8003f68: b9 60 20 00 mv r4,r11 8003f6c: b9 e0 28 00 mv r5,r15 8003f70: ba 60 30 00 mv r6,r19 8003f74: 34 02 00 01 mvi r2,1 8003f78: d9 80 00 00 call r12 8003f7c: e0 00 00 09 bi 8003fa0 <_Heap_Walk+0x3a0> ); return false; } if ( next_block_begin <= block_begin ) { 8003f80: 56 0b 00 0a bgu r16,r11,8003fa8 <_Heap_Walk+0x3a8> (*printer)( 8003f84: 78 03 08 01 mvhi r3,0x801 8003f88: b9 c0 08 00 mv r1,r14 8003f8c: 38 63 d1 c4 ori r3,r3,0xd1c4 8003f90: b9 60 20 00 mv r4,r11 8003f94: ba 00 28 00 mv r5,r16 8003f98: 34 02 00 01 mvi r2,1 8003f9c: d9 80 00 00 call r12 8003fa0: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 8003fa4: e0 00 00 47 bi 80040c0 <_Heap_Walk+0x4c0> } if ( !_Heap_Is_prev_used( next_block ) ) { 8003fa8: 2a 03 00 04 lw r3,(r16+4) 8003fac: 20 63 00 01 andi r3,r3,0x1 8003fb0: 5c 60 00 35 bne r3,r0,8004084 <_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; 8003fb4: 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)( 8003fb8: 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; 8003fbc: 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; 8003fc0: 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; 8003fc4: 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); 8003fc8: 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; 8003fcc: ba a0 30 00 mv r6,r21 8003fd0: 44 a1 00 04 be r5,r1,8003fe0 <_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)" : ""), 8003fd4: ba 80 30 00 mv r6,r20 8003fd8: 5c ad 00 02 bne r5,r13,8003fe0 <_Heap_Walk+0x3e0> 8003fdc: 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)( 8003fe0: 29 67 00 08 lw r7,(r11+8) 8003fe4: ba e0 40 00 mv r8,r23 8003fe8: 44 e3 00 04 be r7,r3,8003ff8 <_Heap_Walk+0x3f8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8003fec: ba 80 40 00 mv r8,r20 8003ff0: 5c ed 00 02 bne r7,r13,8003ff8 <_Heap_Walk+0x3f8> 8003ff4: 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)( 8003ff8: 78 03 08 01 mvhi r3,0x801 8003ffc: 5b 8a 00 54 sw (sp+84),r10 8004000: b9 c0 08 00 mv r1,r14 8004004: 34 02 00 00 mvi r2,0 8004008: 38 63 d2 28 ori r3,r3,0xd228 800400c: b9 60 20 00 mv r4,r11 8004010: 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 ) { 8004014: 2b 8a 00 54 lw r10,(sp+84) 8004018: 29 46 00 00 lw r6,(r10+0) 800401c: 46 26 00 0a be r17,r6,8004044 <_Heap_Walk+0x444> (*printer)( 8004020: 78 03 08 01 mvhi r3,0x801 8004024: b9 c0 08 00 mv r1,r14 8004028: 38 63 d2 54 ori r3,r3,0xd254 800402c: b9 60 20 00 mv r4,r11 8004030: ba 20 28 00 mv r5,r17 8004034: b9 40 38 00 mv r7,r10 8004038: 34 02 00 01 mvi r2,1 800403c: d9 80 00 00 call r12 8004040: e0 00 00 39 bi 8004124 <_Heap_Walk+0x524> ); return false; } if ( !prev_used ) { 8004044: 21 ef 00 01 andi r15,r15,0x1 8004048: 5d e0 00 09 bne r15,r0,800406c <_Heap_Walk+0x46c> (*printer)( 800404c: 78 03 08 01 mvhi r3,0x801 8004050: b9 c0 08 00 mv r1,r14 8004054: 38 63 d2 90 ori r3,r3,0xd290 8004058: b9 60 20 00 mv r4,r11 800405c: 34 02 00 01 mvi r2,1 8004060: d9 80 00 00 call r12 8004064: b9 e0 08 00 mv r1,r15 8004068: e0 00 00 16 bi 80040c0 <_Heap_Walk+0x4c0> 800406c: 29 a3 00 08 lw r3,(r13+8) 8004070: e0 00 00 03 bi 800407c <_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 ) { 8004074: 44 6b 00 04 be r3,r11,8004084 <_Heap_Walk+0x484> return true; } free_block = free_block->next; 8004078: 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 ) { 800407c: 5c 6d ff fe bne r3,r13,8004074 <_Heap_Walk+0x474> 8004080: e0 00 00 23 bi 800410c <_Heap_Walk+0x50c> 8004084: ba 00 58 00 mv r11,r16 8004088: e0 00 00 0c bi 80040b8 <_Heap_Walk+0x4b8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 800408c: 78 18 08 01 mvhi r24,0x801 8004090: 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)( 8004094: 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)" : ""), 8004098: 78 16 08 01 mvhi r22,0x801 800409c: 78 15 08 01 mvhi r21,0x801 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 80040a0: 3b 18 d2 1c ori r24,r24,0xd21c 80040a4: 3a 94 d2 8c ori r20,r20,0xd28c 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)( 80040a8: 3a f7 d2 10 ori r23,r23,0xd210 "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)" : ""), 80040ac: 3a d6 d2 04 ori r22,r22,0xd204 80040b0: 3a b5 d1 f8 ori r21,r21,0xd1f8 - 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; 80040b4: 34 1b ff fe mvi fp,-2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80040b8: 5d 72 ff 7c bne r11,r18,8003ea8 <_Heap_Walk+0x2a8> 80040bc: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 80040c0: 2b 9d 00 10 lw ra,(sp+16) 80040c4: 2b 8b 00 50 lw r11,(sp+80) 80040c8: 2b 8c 00 4c lw r12,(sp+76) 80040cc: 2b 8d 00 48 lw r13,(sp+72) 80040d0: 2b 8e 00 44 lw r14,(sp+68) 80040d4: 2b 8f 00 40 lw r15,(sp+64) 80040d8: 2b 90 00 3c lw r16,(sp+60) 80040dc: 2b 91 00 38 lw r17,(sp+56) 80040e0: 2b 92 00 34 lw r18,(sp+52) 80040e4: 2b 93 00 30 lw r19,(sp+48) 80040e8: 2b 94 00 2c lw r20,(sp+44) 80040ec: 2b 95 00 28 lw r21,(sp+40) 80040f0: 2b 96 00 24 lw r22,(sp+36) 80040f4: 2b 97 00 20 lw r23,(sp+32) 80040f8: 2b 98 00 1c lw r24,(sp+28) 80040fc: 2b 99 00 18 lw r25,(sp+24) 8004100: 2b 9b 00 14 lw fp,(sp+20) 8004104: 37 9c 00 54 addi sp,sp,84 8004108: c3 a0 00 00 ret return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 800410c: 78 03 08 01 mvhi r3,0x801 8004110: b9 c0 08 00 mv r1,r14 8004114: 38 63 d2 c0 ori r3,r3,0xd2c0 8004118: b9 60 20 00 mv r4,r11 800411c: 34 02 00 01 mvi r2,1 8004120: d9 80 00 00 call r12 8004124: 34 01 00 00 mvi r1,0 8004128: e3 ff ff e6 bi 80040c0 <_Heap_Walk+0x4c0> 080033ec <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 80033ec: 37 9c ff f4 addi sp,sp,-12 80033f0: 5b 8b 00 0c sw (sp+12),r11 80033f4: 5b 8c 00 08 sw (sp+8),r12 80033f8: 5b 9d 00 04 sw (sp+4),ra _ISR_Signals_to_thread_executing = false; 80033fc: 78 03 08 01 mvhi r3,0x801 _ISR_Nest_level = 0; 8003400: 78 02 08 01 mvhi r2,0x801 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003404: 34 04 00 00 mvi r4,0 8003408: 38 63 d9 f8 ori r3,r3,0xd9f8 _ISR_Nest_level = 0; 800340c: 38 42 d9 3c ori r2,r2,0xd93c * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003410: 30 64 00 00 sb (r3+0),r4 _ISR_Nest_level = 0; 8003414: 58 44 00 00 sw (r2+0),r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003418: 34 01 00 80 mvi r1,128 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; 800341c: b8 80 60 00 mv r12,r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003420: f8 00 09 4a calli 8005948 <_Workspace_Allocate_or_fatal_error> _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 8003424: 78 0b 08 01 mvhi r11,0x801 8003428: 78 02 08 01 mvhi r2,0x801 800342c: 38 42 d0 bc ori r2,r2,0xd0bc 8003430: 39 6b d0 c4 ori r11,r11,0xd0c4 8003434: 28 44 00 00 lw r4,(r2+0) 8003438: 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( 800343c: 78 02 08 01 mvhi r2,0x801 8003440: 38 42 d9 20 ori r2,r2,0xd920 8003444: 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) ) 8003448: 50 64 00 05 bgeu r3,r4,800345c <_ISR_Handler_initialization+0x70> _Internal_error_Occurred( 800344c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003450: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8003454: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 8003458: fb ff ff d6 calli 80033b0 <_Internal_error_Occurred> <== NOT EXECUTED INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 800345c: b8 60 08 00 mv r1,r3 8003460: f8 00 09 3a calli 8005948 <_Workspace_Allocate_or_fatal_error> Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003464: 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( 8003468: 78 02 08 01 mvhi r2,0x801 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 800346c: 78 03 08 01 mvhi r3,0x801 8003470: 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( 8003474: 38 42 d8 b4 ori r2,r2,0xd8b4 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003478: 38 63 d8 38 ori r3,r3,0xd838 800347c: 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( 8003480: 58 41 00 00 sw (r2+0),r1 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 8003484: 2b 9d 00 04 lw ra,(sp+4) 8003488: 2b 8b 00 0c lw r11,(sp+12) 800348c: 2b 8c 00 08 lw r12,(sp+8) 8003490: 37 9c 00 0c addi sp,sp,12 8003494: c3 a0 00 00 ret 0800395c <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 800395c: 37 9c ff e0 addi sp,sp,-32 8003960: 5b 8b 00 1c sw (sp+28),r11 8003964: 5b 8c 00 18 sw (sp+24),r12 8003968: 5b 8d 00 14 sw (sp+20),r13 800396c: 5b 8e 00 10 sw (sp+16),r14 8003970: 5b 8f 00 0c sw (sp+12),r15 8003974: 5b 90 00 08 sw (sp+8),r16 8003978: 5b 9d 00 04 sw (sp+4),ra 800397c: b8 40 60 00 mv r12,r2 8003980: b8 20 78 00 mv r15,r1 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003984: 37 82 00 20 addi r2,sp,32 8003988: b9 80 08 00 mv r1,r12 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 800398c: b8 60 80 00 mv r16,r3 8003990: 20 8e 00 ff andi r14,r4,0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003994: f8 00 00 84 calli 8003ba4 <_POSIX_Mutex_Get> 8003998: 44 20 00 33 be r1,r0,8003a64 <_POSIX_Condition_variables_Wait_support+0x108> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800399c: 78 05 08 02 mvhi r5,0x802 80039a0: 38 a5 08 74 ori r5,r5,0x874 80039a4: 28 a3 00 00 lw r3,(r5+0) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 80039a8: b9 e0 08 00 mv r1,r15 80039ac: 37 82 00 20 addi r2,sp,32 80039b0: 34 63 ff ff addi r3,r3,-1 80039b4: 58 a3 00 00 sw (r5+0),r3 80039b8: fb ff ff 49 calli 80036dc <_POSIX_Condition_variables_Get> switch ( location ) { 80039bc: 2b 84 00 20 lw r4,(sp+32) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 80039c0: b8 20 68 00 mv r13,r1 switch ( location ) { 80039c4: 5c 80 00 28 bne r4,r0,8003a64 <_POSIX_Condition_variables_Wait_support+0x108> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 80039c8: 28 21 00 14 lw r1,(r1+20) 80039cc: 44 24 00 05 be r1,r4,80039e0 <_POSIX_Condition_variables_Wait_support+0x84> 80039d0: 29 82 00 00 lw r2,(r12+0) 80039d4: 44 22 00 03 be r1,r2,80039e0 <_POSIX_Condition_variables_Wait_support+0x84> _Thread_Enable_dispatch(); 80039d8: f8 00 0b eb calli 8006984 <_Thread_Enable_dispatch> 80039dc: e0 00 00 22 bi 8003a64 <_POSIX_Condition_variables_Wait_support+0x108> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 80039e0: b9 80 08 00 mv r1,r12 80039e4: f8 00 01 1e calli 8003e5c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 80039e8: 5d c0 00 1a bne r14,r0,8003a50 <_POSIX_Condition_variables_Wait_support+0xf4> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 80039ec: 78 0b 08 02 mvhi r11,0x802 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 80039f0: 29 81 00 00 lw r1,(r12+0) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 80039f4: 39 6b 09 30 ori r11,r11,0x930 80039f8: 29 64 00 00 lw r4,(r11+0) return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 80039fc: 59 a1 00 14 sw (r13+20),r1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 8003a00: 35 a5 00 18 addi r5,r13,24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003a04: 58 8e 00 34 sw (r4+52),r14 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 8003a08: 29 ef 00 00 lw r15,(r15+0) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8003a0c: 34 01 00 01 mvi r1,1 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003a10: 78 03 08 00 mvhi r3,0x800 8003a14: ba 00 10 00 mv r2,r16 the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 8003a18: 58 8f 00 20 sw (r4+32),r15 8003a1c: 59 a1 00 48 sw (r13+72),r1 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003a20: 38 63 73 50 ori r3,r3,0x7350 8003a24: b8 a0 08 00 mv r1,r5 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 8003a28: 58 85 00 44 sw (r4+68),r5 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003a2c: f8 00 0d 22 calli 8006eb4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 8003a30: f8 00 0b d5 calli 8006984 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 8003a34: 29 61 00 00 lw r1,(r11+0) 8003a38: 28 2b 00 34 lw r11,(r1+52) if ( status && status != ETIMEDOUT ) 8003a3c: 7d 62 00 74 cmpnei r2,r11,116 8003a40: 7d 61 00 00 cmpnei r1,r11,0 8003a44: a0 41 08 00 and r1,r2,r1 8003a48: 44 2e 00 04 be r1,r14,8003a58 <_POSIX_Condition_variables_Wait_support+0xfc> 8003a4c: e0 00 00 07 bi 8003a68 <_POSIX_Condition_variables_Wait_support+0x10c> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 8003a50: f8 00 0b cd calli 8006984 <_Thread_Enable_dispatch> 8003a54: 34 0b 00 74 mvi r11,116 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 8003a58: b9 80 08 00 mv r1,r12 8003a5c: f8 00 00 ce calli 8003d94 if ( mutex_status ) 8003a60: 44 20 00 02 be r1,r0,8003a68 <_POSIX_Condition_variables_Wait_support+0x10c> 8003a64: 34 0b 00 16 mvi r11,22 case OBJECTS_ERROR: break; } return EINVAL; } 8003a68: b9 60 08 00 mv r1,r11 8003a6c: 2b 9d 00 04 lw ra,(sp+4) 8003a70: 2b 8b 00 1c lw r11,(sp+28) 8003a74: 2b 8c 00 18 lw r12,(sp+24) 8003a78: 2b 8d 00 14 lw r13,(sp+20) 8003a7c: 2b 8e 00 10 lw r14,(sp+16) 8003a80: 2b 8f 00 0c lw r15,(sp+12) 8003a84: 2b 90 00 08 lw r16,(sp+8) 8003a88: 37 9c 00 20 addi sp,sp,32 8003a8c: c3 a0 00 00 ret 080028b0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 80028b0: 37 9c ff f8 addi sp,sp,-8 80028b4: 5b 8b 00 08 sw (sp+8),r11 80028b8: 5b 9d 00 04 sw (sp+4),ra 80028bc: b8 40 58 00 mv r11,r2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 80028c0: 28 42 00 68 lw r2,(r2+104) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 80028c4: 29 61 00 54 lw r1,(r11+84) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 80028c8: 34 42 00 01 addi r2,r2,1 80028cc: 59 62 00 68 sw (r11+104),r2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 80028d0: 5c 20 00 03 bne r1,r0,80028dc <_POSIX_Timer_TSR+0x2c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 80028d4: 29 62 00 58 lw r2,(r11+88) 80028d8: 44 41 00 0d be r2,r1,800290c <_POSIX_Timer_TSR+0x5c> activated = _POSIX_Timer_Insert_helper( 80028dc: 29 62 00 64 lw r2,(r11+100) 80028e0: 29 63 00 08 lw r3,(r11+8) 80028e4: 78 04 08 00 mvhi r4,0x800 80028e8: 38 84 28 b0 ori r4,r4,0x28b0 80028ec: 35 61 00 10 addi r1,r11,16 80028f0: b9 60 28 00 mv r5,r11 80028f4: f8 00 15 7b calli 8007ee0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 80028f8: 44 20 00 0c be r1,r0,8002928 <_POSIX_Timer_TSR+0x78> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 80028fc: 35 61 00 6c addi r1,r11,108 8002900: f8 00 03 1e calli 8003578 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002904: 34 01 00 03 mvi r1,3 8002908: e0 00 00 02 bi 8002910 <_POSIX_Timer_TSR+0x60> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 800290c: 34 01 00 04 mvi r1,4 <== NOT EXECUTED 8002910: 31 61 00 3c sb (r11+60),r1 /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 8002914: 29 62 00 44 lw r2,(r11+68) 8002918: 29 61 00 38 lw r1,(r11+56) 800291c: f8 00 14 1b calli 8007988 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 8002920: 34 01 00 00 mvi r1,0 8002924: 59 61 00 68 sw (r11+104),r1 } 8002928: 2b 9d 00 04 lw ra,(sp+4) 800292c: 2b 8b 00 08 lw r11,(sp+8) 8002930: 37 9c 00 08 addi sp,sp,8 8002934: c3 a0 00 00 ret 08008d2c <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8008d2c: 37 9c ff e4 addi sp,sp,-28 8008d30: 5b 8b 00 0c sw (sp+12),r11 8008d34: 5b 8c 00 08 sw (sp+8),r12 8008d38: 5b 9d 00 04 sw (sp+4),ra 8008d3c: 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 ); 8008d40: 90 00 60 00 rcsr r12,IE 8008d44: 34 01 ff fe mvi r1,-2 8008d48: a1 81 08 00 and r1,r12,r1 8008d4c: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8008d50: 78 02 08 01 mvhi r2,0x801 8008d54: 38 42 d9 34 ori r2,r2,0xd934 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d58: 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; 8008d5c: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d60: 38 63 da 44 ori r3,r3,0xda44 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008d64: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d68: 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; 8008d6c: 5b 81 00 14 sw (sp+20),r1 8008d70: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008d74: b8 60 20 00 mv r4,r3 8008d78: 44 60 00 03 be r3,r0,8008d84 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008d7c: d8 60 00 00 call r3 <== NOT EXECUTED 8008d80: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008d84: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008d88: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 8008d8c: 37 81 00 10 addi r1,sp,16 8008d90: 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 ); 8008d94: 5b 83 00 18 sw (sp+24),r3 8008d98: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 8008d9c: fb ff f1 13 calli 80051e8 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 8008da0: 2b 81 00 14 lw r1,(sp+20) 8008da4: 59 61 00 04 sw (r11+4),r1 8008da8: 2b 81 00 10 lw r1,(sp+16) 8008dac: 59 61 00 00 sw (r11+0),r1 } 8008db0: 2b 9d 00 04 lw ra,(sp+4) 8008db4: 2b 8b 00 0c lw r11,(sp+12) 8008db8: 2b 8c 00 08 lw r12,(sp+8) 8008dbc: 37 9c 00 1c addi sp,sp,28 8008dc0: c3 a0 00 00 ret 08008dc4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 8008dc4: 37 9c ff e4 addi sp,sp,-28 8008dc8: 5b 8b 00 0c sw (sp+12),r11 8008dcc: 5b 8c 00 08 sw (sp+8),r12 8008dd0: 5b 9d 00 04 sw (sp+4),ra 8008dd4: 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 ); 8008dd8: 90 00 60 00 rcsr r12,IE 8008ddc: 34 01 ff fe mvi r1,-2 8008de0: a1 81 08 00 and r1,r12,r1 8008de4: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8008de8: 78 02 08 01 mvhi r2,0x801 8008dec: 38 42 d9 24 ori r2,r2,0xd924 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008df0: 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; 8008df4: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008df8: 38 63 da 44 ori r3,r3,0xda44 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8008dfc: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008e00: 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; 8008e04: 5b 81 00 14 sw (sp+20),r1 8008e08: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008e0c: b8 60 20 00 mv r4,r3 8008e10: 44 60 00 03 be r3,r0,8008e1c <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008e14: d8 60 00 00 call r3 <== NOT EXECUTED 8008e18: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8008e1c: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008e20: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8008e24: 37 81 00 10 addi r1,sp,16 8008e28: 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 ); 8008e2c: 5b 83 00 18 sw (sp+24),r3 8008e30: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8008e34: fb ff f0 ed calli 80051e8 <_Timespec_Add_to> *uptime = up; 8008e38: 2b 81 00 14 lw r1,(sp+20) 8008e3c: 59 61 00 04 sw (r11+4),r1 8008e40: 2b 81 00 10 lw r1,(sp+16) 8008e44: 59 61 00 00 sw (r11+0),r1 } 8008e48: 2b 9d 00 04 lw ra,(sp+4) 8008e4c: 2b 8b 00 0c lw r11,(sp+12) 8008e50: 2b 8c 00 08 lw r12,(sp+8) 8008e54: 37 9c 00 1c addi sp,sp,28 8008e58: c3 a0 00 00 ret 080045f8 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 80045f8: 37 9c ff f0 addi sp,sp,-16 80045fc: 5b 8b 00 10 sw (sp+16),r11 8004600: 5b 8c 00 0c sw (sp+12),r12 8004604: 5b 8d 00 08 sw (sp+8),r13 8004608: 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; 800460c: 78 01 08 01 mvhi r1,0x801 8004610: 38 21 d0 c4 ori r1,r1,0xd0c4 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004614: 28 22 00 20 lw r2,(r1+32) 8004618: 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; 800461c: 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) 8004620: 64 42 00 00 cmpei r2,r2,0 8004624: 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; 8004628: 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) 800462c: 99 22 48 00 xor r9,r9,r2 8004630: b9 20 58 00 mv r11,r9 8004634: 45 20 00 05 be r9,r0,8004648 <_Thread_Handler_initialization+0x50> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 8004638: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800463c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004640: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004644: fb ff fb 5b calli 80033b0 <_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( 8004648: 78 0c 08 01 mvhi r12,0x801 800464c: 39 8c d0 c0 ori r12,r12,0xd0c0 8004650: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004654: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 8004658: 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( 800465c: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004660: 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; 8004664: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 8004668: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 800466c: 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; 8004670: 38 63 d9 44 ori r3,r3,0xd944 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004674: 38 c6 d8 34 ori r6,r6,0xd834 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004678: 39 08 d9 70 ori r8,r8,0xd970 _Thread_Executing = NULL; 800467c: 38 a5 d9 60 ori r5,r5,0xd960 _Thread_Heir = NULL; 8004680: 38 84 d9 30 ori r4,r4,0xd930 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004684: 38 e7 d9 40 ori r7,r7,0xd940 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004688: 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; 800468c: 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; 8004690: 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( 8004694: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004698: 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( 800469c: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 80046a0: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 80046a4: 58 a9 00 00 sw (r5+0),r9 _Thread_Heir = NULL; 80046a8: 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( 80046ac: fb ff ee d1 calli 80001f0 <__ashlsi3> 80046b0: f8 00 04 a6 calli 8005948 <_Workspace_Allocate_or_fatal_error> 80046b4: 78 02 08 01 mvhi r2,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 80046b8: 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( 80046bc: 38 42 d8 30 ori r2,r2,0xd830 80046c0: 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; 80046c4: 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); 80046c8: 34 22 00 04 addi r2,r1,4 80046cc: 58 22 00 00 sw (r1+0),r2 the_chain->permanent_null = NULL; 80046d0: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 80046d4: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 80046d8: 35 6b 00 01 addi r11,r11,1 80046dc: 34 21 00 0c addi r1,r1,12 80046e0: 50 6b ff fa bgeu r3,r11,80046c8 <_Thread_Handler_initialization+0xd0> /* * Initialize this class of objects. */ _Objects_Initialize_information( 80046e4: 34 02 00 01 mvi r2,1 80046e8: 78 01 08 01 mvhi r1,0x801 80046ec: 38 21 da 00 ori r1,r1,0xda00 80046f0: b8 40 18 00 mv r3,r2 80046f4: b8 40 20 00 mv r4,r2 80046f8: 34 05 01 3c mvi r5,316 80046fc: 34 07 00 08 mvi r7,8 8004700: fb ff fc c1 calli 8003a04 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004704: 2b 9d 00 04 lw ra,(sp+4) 8004708: 2b 8b 00 10 lw r11,(sp+16) 800470c: 2b 8c 00 0c lw r12,(sp+12) 8004710: 2b 8d 00 08 lw r13,(sp+8) 8004714: 37 9c 00 10 addi sp,sp,16 8004718: c3 a0 00 00 ret 08005c74 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005c74: 37 9c ff f0 addi sp,sp,-16 8005c78: 5b 8b 00 08 sw (sp+8),r11 8005c7c: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005c80: 28 25 00 10 lw r5,(r1+16) 8005c84: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005c88: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005c8c: 20 a5 00 01 andi r5,r5,0x1 8005c90: 5c a4 00 16 bne r5,r4,8005ce8 <_Thread_Restart+0x74> _Thread_Set_transient( the_thread ); 8005c94: 5b 82 00 10 sw (sp+16),r2 8005c98: 5b 83 00 0c sw (sp+12),r3 8005c9c: f8 00 00 bb calli 8005f88 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8005ca0: 2b 82 00 10 lw r2,(sp+16) 8005ca4: 2b 83 00 0c lw r3,(sp+12) 8005ca8: b9 60 08 00 mv r1,r11 8005cac: f8 00 14 17 calli 800ad08 <_Thread_Reset> _Thread_Load_environment( the_thread ); 8005cb0: b9 60 08 00 mv r1,r11 8005cb4: f8 00 12 ec calli 800a864 <_Thread_Load_environment> _Thread_Ready( the_thread ); 8005cb8: b9 60 08 00 mv r1,r11 8005cbc: f8 00 13 af calli 800ab78 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8005cc0: b9 60 08 00 mv r1,r11 8005cc4: f8 00 02 60 calli 8006644 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8005cc8: 78 01 08 02 mvhi r1,0x802 8005ccc: 38 21 29 b8 ori r1,r1,0x29b8 8005cd0: 28 21 00 00 lw r1,(r1+0) 8005cd4: 34 04 00 01 mvi r4,1 8005cd8: 5d 61 00 04 bne r11,r1,8005ce8 <_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 ); 8005cdc: 35 61 00 d0 addi r1,r11,208 8005ce0: f8 00 03 de calli 8006c58 <_CPU_Context_restore> 8005ce4: 34 04 00 01 mvi r4,1 <== NOT EXECUTED return true; } return false; } 8005ce8: b8 80 08 00 mv r1,r4 8005cec: 2b 9d 00 04 lw ra,(sp+4) 8005cf0: 2b 8b 00 08 lw r11,(sp+8) 8005cf4: 37 9c 00 10 addi sp,sp,16 8005cf8: c3 a0 00 00 ret 0800499c <_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 ) { 800499c: 37 9c ff ec addi sp,sp,-20 80049a0: 5b 8b 00 14 sw (sp+20),r11 80049a4: 5b 8c 00 10 sw (sp+16),r12 80049a8: 5b 8d 00 0c sw (sp+12),r13 80049ac: 5b 8e 00 08 sw (sp+8),r14 80049b0: 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; 80049b4: 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 ) { 80049b8: 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); 80049bc: 34 44 00 3c addi r4,r2,60 80049c0: 59 64 00 38 sw (r11+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 80049c4: 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; 80049c8: 34 04 00 00 mvi r4,0 80049cc: b8 20 60 00 mv r12,r1 80049d0: 59 64 00 3c sw (r11+60),r4 the_chain->last = _Chain_Head(the_chain); 80049d4: 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 ]; 80049d8: b9 a0 08 00 mv r1,r13 80049dc: 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 ) { 80049e0: 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 ]; 80049e4: fb ff ee 2b calli 8000290 <__lshrsi3> 80049e8: b4 21 10 00 add r2,r1,r1 80049ec: b4 41 08 00 add r1,r2,r1 80049f0: 34 02 00 02 mvi r2,2 80049f4: fb ff ed ff calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 80049f8: 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 ]; 80049fc: b5 81 08 00 add r1,r12,r1 block_state = the_thread_queue->state; 8004a00: 29 87 00 38 lw r7,(r12+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004a04: 5c 40 00 23 bne r2,r0,8004a90 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004a08: 34 28 00 04 addi r8,r1,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004a0c: 34 03 ff fe mvi r3,-2 8004a10: 90 00 20 00 rcsr r4,IE 8004a14: a0 83 30 00 and r6,r4,r3 8004a18: d0 06 00 00 wcsr IE,r6 search_thread = (Thread_Control *) header->first; 8004a1c: 34 05 ff ff mvi r5,-1 8004a20: 28 22 00 00 lw r2,(r1+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004a24: e0 00 00 0b bi 8004a50 <_Thread_queue_Enqueue_priority+0xb4> search_priority = search_thread->current_priority; 8004a28: 28 45 00 14 lw r5,(r2+20) if ( priority <= search_priority ) 8004a2c: 50 ad 00 0a bgeu r5,r13,8004a54 <_Thread_queue_Enqueue_priority+0xb8> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004a30: d0 04 00 00 wcsr IE,r4 8004a34: d0 06 00 00 wcsr IE,r6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004a38: 28 49 00 10 lw r9,(r2+16) 8004a3c: a0 e9 48 00 and r9,r7,r9 8004a40: 5d 20 00 03 bne r9,r0,8004a4c <_Thread_queue_Enqueue_priority+0xb0> _ISR_Enable( level ); 8004a44: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED goto restart_forward_search; 8004a48: e3 ff ff f2 bi 8004a10 <_Thread_queue_Enqueue_priority+0x74> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004a4c: 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 ) ) { 8004a50: 5c 48 ff f6 bne r2,r8,8004a28 <_Thread_queue_Enqueue_priority+0x8c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004a54: 29 83 00 30 lw r3,(r12+48) 8004a58: 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; 8004a5c: b8 80 38 00 mv r7,r4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004a60: 5c 61 00 3b bne r3,r1,8004b4c <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004a64: 34 01 00 00 mvi r1,0 8004a68: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 8004a6c: 45 a5 00 2f be r13,r5,8004b28 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8004a70: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004a74: 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; 8004a78: 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; 8004a7c: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 8004a80: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 8004a84: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004a88: d0 04 00 00 wcsr IE,r4 8004a8c: e0 00 00 25 bi 8004b20 <_Thread_queue_Enqueue_priority+0x184> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8004a90: 78 04 08 01 mvhi r4,0x801 8004a94: 38 84 d0 c0 ori r4,r4,0xd0c0 _ISR_Disable( level ); 8004a98: 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; 8004a9c: 40 86 00 00 lbu r6,(r4+0) 8004aa0: 34 c6 00 01 addi r6,r6,1 _ISR_Disable( level ); 8004aa4: 90 00 28 00 rcsr r5,IE 8004aa8: a0 a3 40 00 and r8,r5,r3 8004aac: d0 08 00 00 wcsr IE,r8 search_thread = (Thread_Control *) header->last; 8004ab0: 28 22 00 08 lw r2,(r1+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004ab4: e0 00 00 0b bi 8004ae0 <_Thread_queue_Enqueue_priority+0x144> search_priority = search_thread->current_priority; 8004ab8: 28 46 00 14 lw r6,(r2+20) if ( priority >= search_priority ) 8004abc: 51 a6 00 0a bgeu r13,r6,8004ae4 <_Thread_queue_Enqueue_priority+0x148> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004ac0: d0 05 00 00 wcsr IE,r5 8004ac4: d0 08 00 00 wcsr IE,r8 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004ac8: 28 49 00 10 lw r9,(r2+16) 8004acc: a0 e9 48 00 and r9,r7,r9 8004ad0: 5d 20 00 03 bne r9,r0,8004adc <_Thread_queue_Enqueue_priority+0x140> _ISR_Enable( level ); 8004ad4: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED goto restart_reverse_search; 8004ad8: e3 ff ff f1 bi 8004a9c <_Thread_queue_Enqueue_priority+0x100> <== NOT EXECUTED } search_thread = (Thread_Control *) 8004adc: 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 ) ) { 8004ae0: 5c 41 ff f6 bne r2,r1,8004ab8 <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004ae4: 29 83 00 30 lw r3,(r12+48) 8004ae8: 34 01 00 01 mvi r1,1 8004aec: b8 a0 38 00 mv r7,r5 8004af0: 5c 61 00 17 bne r3,r1,8004b4c <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004af4: 34 01 00 00 mvi r1,0 8004af8: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 8004afc: b8 a0 20 00 mv r4,r5 8004b00: 45 a6 00 0a be r13,r6,8004b28 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004b04: 28 41 00 00 lw r1,(r2+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004b08: 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; 8004b0c: 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; 8004b10: 59 61 00 00 sw (r11+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004b14: 58 4b 00 00 sw (r2+0),r11 next_node->previous = the_node; 8004b18: 58 2b 00 04 sw (r1+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004b1c: d0 05 00 00 wcsr IE,r5 8004b20: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004b24: e0 00 00 0c bi 8004b54 <_Thread_queue_Enqueue_priority+0x1b8> 8004b28: 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; 8004b2c: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004b30: 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; 8004b34: 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; 8004b38: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 8004b3c: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 8004b40: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004b44: d0 04 00 00 wcsr IE,r4 8004b48: e3 ff ff f6 bi 8004b20 <_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; 8004b4c: 29 81 00 30 lw r1,(r12+48) * 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; 8004b50: 59 c7 00 00 sw (r14+0),r7 return the_thread_queue->sync_state; } 8004b54: 2b 9d 00 04 lw ra,(sp+4) 8004b58: 2b 8b 00 14 lw r11,(sp+20) 8004b5c: 2b 8c 00 10 lw r12,(sp+16) 8004b60: 2b 8d 00 0c lw r13,(sp+12) 8004b64: 2b 8e 00 08 lw r14,(sp+8) 8004b68: 37 9c 00 14 addi sp,sp,20 8004b6c: c3 a0 00 00 ret 08009934 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 8009934: 37 9c ff fc addi sp,sp,-4 8009938: 5b 9d 00 04 sw (sp+4),ra 800993c: b8 20 10 00 mv r2,r1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 8009940: 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 && 8009944: 28 24 00 30 lw r4,(r1+48) 8009948: 44 80 00 0c be r4,r0,8009978 <_Thread_queue_Process_timeout+0x44> 800994c: 78 03 08 01 mvhi r3,0x801 8009950: 38 63 d9 60 ori r3,r3,0xd960 8009954: 28 63 00 00 lw r3,(r3+0) 8009958: 5c 43 00 08 bne r2,r3,8009978 <_Thread_queue_Process_timeout+0x44> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 800995c: 34 03 00 03 mvi r3,3 8009960: 44 83 00 0a be r4,r3,8009988 <_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; 8009964: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 8009968: 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; 800996c: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8009970: 58 41 00 34 sw (r2+52),r1 <== NOT EXECUTED 8009974: e0 00 00 05 bi 8009988 <_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; 8009978: 28 21 00 3c lw r1,(r1+60) 800997c: 58 41 00 34 sw (r2+52),r1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 8009980: 28 41 00 44 lw r1,(r2+68) 8009984: fb ff ff 93 calli 80097d0 <_Thread_queue_Extract> } } 8009988: 2b 9d 00 04 lw ra,(sp+4) 800998c: 37 9c 00 04 addi sp,sp,4 8009990: 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 fd fc ori r17,r17,0xfdfc 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 fd 3c ori r16,r16,0xfd3c */ _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 fc ac ori r13,r13,0xfcac */ 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 af calli 8018fec <_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 a8 calli 8018fec <_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 14 6a calli 8018f0c <_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 03 02 calli 8014978 <_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) <== NOT EXECUTED 8013d7c: 5c 78 00 04 bne r3,r24,8013d8c <_Timer_server_Body+0x12c> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8013d80: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8013d84: ba 80 08 00 mv r1,r20 <== NOT EXECUTED 8013d88: e0 00 00 04 bi 8013d98 <_Timer_server_Body+0x138> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8013d8c: 5c 77 ff f8 bne r3,r23,8013d6c <_Timer_server_Body+0x10c> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 8013d90: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8013d94: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8013d98: f8 00 14 c0 calli 8019098 <_Watchdog_Insert> <== NOT EXECUTED 8013d9c: e3 ff ff f4 bi 8013d6c <_Timer_server_Body+0x10c> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 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 11 2e calli 80182f4 <_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 fd calli 8017644 <_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 ed calli 8019214 <_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 eb calli 8019214 <_Watchdog_Remove> 8013e6c: e3 ff ff a9 bi 8013d10 <_Timer_server_Body+0xb0> 08013e70 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 8013e70: 37 9c ff f8 addi sp,sp,-8 8013e74: 5b 8b 00 08 sw (sp+8),r11 8013e78: 5b 9d 00 04 sw (sp+4),ra 8013e7c: b8 20 58 00 mv r11,r1 if ( ts->insert_chain == NULL ) { 8013e80: 28 21 00 78 lw r1,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 8013e84: b8 40 20 00 mv r4,r2 if ( ts->insert_chain == NULL ) { 8013e88: 5c 20 00 47 bne r1,r0,8013fa4 <_Timer_server_Schedule_operation_method+0x134> 8013e8c: 78 01 08 03 mvhi r1,0x803 8013e90: 38 21 fc ac ori r1,r1,0xfcac 8013e94: 28 22 00 00 lw r2,(r1+0) 8013e98: 34 42 00 01 addi r2,r2,1 8013e9c: 58 22 00 00 sw (r1+0),r2 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8013ea0: 28 81 00 38 lw r1,(r4+56) 8013ea4: 34 02 00 01 mvi r2,1 8013ea8: 5c 22 00 1d bne r1,r2,8013f1c <_Timer_server_Schedule_operation_method+0xac> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 8013eac: 90 00 18 00 rcsr r3,IE 8013eb0: 34 01 ff fe mvi r1,-2 8013eb4: a0 61 08 00 and r1,r3,r1 8013eb8: d0 01 00 00 wcsr IE,r1 snapshot = _Watchdog_Ticks_since_boot; 8013ebc: 78 02 08 03 mvhi r2,0x803 8013ec0: 38 42 fd fc ori r2,r2,0xfdfc */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 8013ec4: 29 61 00 30 lw r1,(r11+48) 8013ec8: 28 45 00 00 lw r5,(r2+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 8013ecc: 29 62 00 3c lw r2,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8013ed0: 35 66 00 34 addi r6,r11,52 8013ed4: 44 26 00 08 be r1,r6,8013ef4 <_Timer_server_Schedule_operation_method+0x84> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 8013ed8: 28 27 00 10 lw r7,(r1+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 8013edc: c8 a2 10 00 sub r2,r5,r2 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8013ee0: f4 e2 30 00 cmpgu r6,r7,r2 delta_interval -= delta; 8013ee4: c8 e2 10 00 sub r2,r7,r2 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8013ee8: c8 06 30 00 sub r6,r0,r6 8013eec: a0 46 10 00 and r2,r2,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 8013ef0: 58 22 00 10 sw (r1+16),r2 } ts->Interval_watchdogs.last_snapshot = snapshot; 8013ef4: 59 65 00 3c sw (r11+60),r5 _ISR_Enable( level ); 8013ef8: d0 03 00 00 wcsr IE,r3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8013efc: 35 61 00 30 addi r1,r11,48 8013f00: 34 82 00 10 addi r2,r4,16 8013f04: f8 00 14 65 calli 8019098 <_Watchdog_Insert> if ( !ts->active ) { 8013f08: 41 61 00 7c lbu r1,(r11+124) 8013f0c: 5c 20 00 24 bne r1,r0,8013f9c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_interval_system_watchdog( ts ); 8013f10: b9 60 08 00 mv r1,r11 8013f14: fb ff ff 19 calli 8013b78 <_Timer_server_Reset_interval_system_watchdog> 8013f18: e0 00 00 21 bi 8013f9c <_Timer_server_Schedule_operation_method+0x12c> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8013f1c: 34 02 00 03 mvi r2,3 8013f20: 5c 22 00 1f bne r1,r2,8013f9c <_Timer_server_Schedule_operation_method+0x12c> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 8013f24: 90 00 38 00 rcsr r7,IE 8013f28: 34 01 ff fe mvi r1,-2 8013f2c: a0 e1 08 00 and r1,r7,r1 8013f30: 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)); 8013f34: 29 62 00 68 lw r2,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8013f38: 78 01 08 03 mvhi r1,0x803 last_snapshot = ts->TOD_watchdogs.last_snapshot; 8013f3c: 29 66 00 74 lw r6,(r11+116) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8013f40: 38 21 fd 3c ori r1,r1,0xfd3c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8013f44: 35 63 00 6c addi r3,r11,108 8013f48: 28 21 00 00 lw r1,(r1+0) 8013f4c: 44 43 00 0b be r2,r3,8013f78 <_Timer_server_Schedule_operation_method+0x108> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 8013f50: 28 45 00 10 lw r5,(r2+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 8013f54: b4 a6 18 00 add r3,r5,r6 delta_interval += delta; 8013f58: c8 61 18 00 sub r3,r3,r1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 8013f5c: 50 c1 00 06 bgeu r6,r1,8013f74 <_Timer_server_Schedule_operation_method+0x104> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8013f60: c8 26 18 00 sub r3,r1,r6 if (delta_interval > delta) { 8013f64: f4 a3 30 00 cmpgu r6,r5,r3 delta_interval -= delta; 8013f68: c8 a3 18 00 sub r3,r5,r3 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 8013f6c: c8 06 28 00 sub r5,r0,r6 8013f70: a0 65 18 00 and r3,r3,r5 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 8013f74: 58 43 00 10 sw (r2+16),r3 } ts->TOD_watchdogs.last_snapshot = snapshot; 8013f78: 59 61 00 74 sw (r11+116),r1 _ISR_Enable( level ); 8013f7c: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 8013f80: 35 61 00 68 addi r1,r11,104 8013f84: 34 82 00 10 addi r2,r4,16 8013f88: f8 00 14 44 calli 8019098 <_Watchdog_Insert> if ( !ts->active ) { 8013f8c: 41 61 00 7c lbu r1,(r11+124) 8013f90: 5c 20 00 03 bne r1,r0,8013f9c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_tod_system_watchdog( ts ); 8013f94: b9 60 08 00 mv r1,r11 8013f98: fb ff ff 15 calli 8013bec <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 8013f9c: f8 00 0d aa calli 8017644 <_Thread_Enable_dispatch> 8013fa0: e0 00 00 03 bi 8013fac <_Timer_server_Schedule_operation_method+0x13c> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 8013fa4: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 8013fa8: f8 00 02 68 calli 8014948 <_Chain_Append> <== NOT EXECUTED } } 8013fac: 2b 9d 00 04 lw ra,(sp+4) 8013fb0: 2b 8b 00 08 lw r11,(sp+8) 8013fb4: 37 9c 00 08 addi sp,sp,8 8013fb8: c3 a0 00 00 ret 08005948 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005948: 37 9c ff fc addi sp,sp,-4 800594c: 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 ); 8005950: 34 03 00 00 mvi r3,0 8005954: b8 20 10 00 mv r2,r1 8005958: 78 01 08 01 mvhi r1,0x801 800595c: 38 21 d8 c8 ori r1,r1,0xd8c8 8005960: b8 60 20 00 mv r4,r3 8005964: f8 00 0d 3e calli 8008e5c <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 8005968: 5c 20 00 04 bne r1,r0,8005978 <_Workspace_Allocate_or_fatal_error+0x30> _Internal_error_Occurred( 800596c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005970: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005974: fb ff f6 8f calli 80033b0 <_Internal_error_Occurred> <== NOT EXECUTED true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 8005978: 2b 9d 00 04 lw ra,(sp+4) 800597c: 37 9c 00 04 addi sp,sp,4 8005980: c3 a0 00 00 ret 0801ae68 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 801ae68: 37 9c ff f8 addi sp,sp,-8 801ae6c: 5b 9d 00 04 sw (sp+4),ra 801ae70: 5b 81 00 08 sw (sp+8),r1 801ae74: f8 00 02 7b calli 801b860 <__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(); 801ae78: fb ff ff d9 calli 801addc rtems_shutdown_executive(status); 801ae7c: 2b 81 00 08 lw r1,(sp+8) 801ae80: f8 00 00 61 calli 801b004 801ae84: e0 00 00 00 bi 801ae84 <_exit+0x1c> <== NOT EXECUTED 0803cbc8 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 803cbc8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 803cbcc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return fcntl( fd, cmd, arg ); 803cbd0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 803cbd4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 803cbd8: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 803cbdc: fb ff ff 69 calli 803c980 <== NOT EXECUTED } 803cbe0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803cbe4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 803cbe8: c3 a0 00 00 ret <== NOT EXECUTED 0800ac38 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 800ac38: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800ac3c: c3 a0 00 00 ret <== NOT EXECUTED 080072d8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 80072d8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80072dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return gettimeofday( tp, tzp ); 80072e0: fb ff ff e0 calli 8007260 <== NOT EXECUTED } 80072e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80072e8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80072ec: c3 a0 00 00 ret <== NOT EXECUTED 080281a4 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 80281a4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80281a8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return link( existing, new ); 80281ac: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 80281b0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80281b4: fb ff ff 7e calli 8027fac <== NOT EXECUTED } 80281b8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80281bc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80281c0: c3 a0 00 00 ret <== NOT EXECUTED 08028460 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 8028460: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8028464: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 8028468: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802846c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8028470: fb ff ff c2 calli 8028378 <== NOT EXECUTED } 8028474: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028478: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802847c: c3 a0 00 00 ret <== NOT EXECUTED 0801afc0 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 801afc0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 801afc4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return realloc( ptr, size ); 801afc8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 801afcc: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 801afd0: f8 00 00 1b calli 801b03c <== NOT EXECUTED } 801afd4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801afd8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 801afdc: c3 a0 00 00 ret <== NOT EXECUTED 08060a44 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8060a44: 37 9c ff a4 addi sp,sp,-92 <== NOT EXECUTED 8060a48: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8060a4c: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8060a50: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8060a54: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8060a58: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8060a5c: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8060a60: 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 ); 8060a64: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8060a68: b8 40 70 00 mv r14,r2 <== NOT EXECUTED 8060a6c: 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 ); 8060a70: fb fe 9a 4c calli 80073a0 <== NOT EXECUTED 8060a74: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8060a78: 5c 20 00 19 bne r1,r0,8060adc <_rename_r+0x98> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8060a7c: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED 8060a80: 64 43 00 5c cmpei r3,r2,92 <== NOT EXECUTED 8060a84: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 8060a88: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 8060a8c: 5c 2d 00 02 bne r1,r13,8060a94 <_rename_r+0x50> <== NOT EXECUTED 8060a90: 5c 40 00 0a bne r2,r0,8060ab8 <_rename_r+0x74> <== NOT EXECUTED 8060a94: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8060a98: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8060a9c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8060aa0: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060aa4: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060aa8: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 8060aac: fb ff 9c 57 calli 8047c08 <== NOT EXECUTED 8060ab0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8060ab4: e0 00 00 13 bi 8060b00 <_rename_r+0xbc> <== NOT EXECUTED 8060ab8: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8060abc: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8060ac0: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8060ac4: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060ac8: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060acc: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 8060ad0: fb ff 9c 4e calli 8047c08 <== NOT EXECUTED 8060ad4: b9 a0 58 00 mv r11,r13 <== NOT EXECUTED 8060ad8: e0 00 00 0a bi 8060b00 <_rename_r+0xbc> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 8060adc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8060ae0: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8060ae4: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 8060ae8: 37 84 00 34 addi r4,sp,52 <== NOT EXECUTED 8060aec: 34 05 00 00 mvi r5,0 <== NOT EXECUTED 8060af0: fb fe 9a 7a calli 80074d8 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 8060af4: 34 0b 00 01 mvi r11,1 <== NOT EXECUTED 8060af8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8060afc: 5c 20 00 a6 bne r1,r0,8060d94 <_rename_r+0x350> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8060b00: 37 90 00 48 addi r16,sp,72 <== NOT EXECUTED 8060b04: 37 8c 00 34 addi r12,sp,52 <== NOT EXECUTED 8060b08: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060b0c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8060b10: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8060b14: fb ff 9c 3d calli 8047c08 <== NOT EXECUTED name = old + old_parent_pathlen; 8060b18: b5 cd 68 00 add r13,r14,r13 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8060b1c: 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; 8060b20: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8060b24: fb ff ab 97 calli 804b980 <== NOT EXECUTED 8060b28: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8060b2c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060b30: fb fe 9a 0d calli 8007364 <== NOT EXECUTED 8060b34: b5 a1 68 00 add r13,r13,r1 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8060b38: 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 ) ); 8060b3c: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8060b40: fb ff ab 90 calli 804b980 <== NOT EXECUTED 8060b44: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8060b48: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8060b4c: ba 00 20 00 mv r4,r16 <== NOT EXECUTED 8060b50: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060b54: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 8060b58: fb fe 9a 26 calli 80073f0 <== NOT EXECUTED 8060b5c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8060b60: 44 20 00 0b be r1,r0,8060b8c <_rename_r+0x148> <== NOT EXECUTED if ( free_old_parentloc ) 8060b64: 45 60 00 07 be r11,r0,8060b80 <_rename_r+0x13c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8060b68: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060b6c: 44 20 00 05 be r1,r0,8060b80 <_rename_r+0x13c> <== NOT EXECUTED 8060b70: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 8060b74: 44 60 00 03 be r3,r0,8060b80 <_rename_r+0x13c> <== NOT EXECUTED 8060b78: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8060b7c: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8060b80: fb ff 8d 80 calli 8044180 <__errno> <== NOT EXECUTED 8060b84: 58 2d 00 00 sw (r1+0),r13 <== NOT EXECUTED 8060b88: e0 00 00 2a bi 8060c30 <_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 ); 8060b8c: 41 e2 00 00 lbu r2,(r15+0) <== NOT EXECUTED 8060b90: 64 4c 00 5c cmpei r12,r2,92 <== NOT EXECUTED 8060b94: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 8060b98: b9 81 60 00 or r12,r12,r1 <== NOT EXECUTED 8060b9c: 5d 8d 00 02 bne r12,r13,8060ba4 <_rename_r+0x160> <== NOT EXECUTED 8060ba0: 5c 4c 00 0a bne r2,r12,8060bc8 <_rename_r+0x184> <== NOT EXECUTED 8060ba4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8060ba8: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8060bac: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8060bb0: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 8060bb4: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060bb8: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 8060bbc: fb ff 9c 13 calli 8047c08 <== NOT EXECUTED 8060bc0: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED 8060bc4: e0 00 00 08 bi 8060be4 <_rename_r+0x1a0> <== NOT EXECUTED 8060bc8: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8060bcc: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8060bd0: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8060bd4: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 8060bd8: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060bdc: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 8060be0: fb ff 9c 0a calli 8047c08 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8060be4: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060be8: 28 24 00 04 lw r4,(r1+4) <== NOT EXECUTED 8060bec: 5c 80 00 13 bne r4,r0,8060c38 <_rename_r+0x1f4> <== NOT EXECUTED if ( free_old_parentloc ) 8060bf0: 45 64 00 07 be r11,r4,8060c0c <_rename_r+0x1c8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8060bf4: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060bf8: 44 20 00 05 be r1,r0,8060c0c <_rename_r+0x1c8> <== NOT EXECUTED 8060bfc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060c00: 44 40 00 03 be r2,r0,8060c0c <_rename_r+0x1c8> <== NOT EXECUTED 8060c04: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060c08: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8060c0c: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060c10: 44 20 00 05 be r1,r0,8060c24 <_rename_r+0x1e0> <== NOT EXECUTED 8060c14: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060c18: 44 40 00 03 be r2,r0,8060c24 <_rename_r+0x1e0> <== NOT EXECUTED 8060c1c: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060c20: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8060c24: fb ff 8d 57 calli 8044180 <__errno> <== NOT EXECUTED 8060c28: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8060c2c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8060c30: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8060c34: e0 00 00 58 bi 8060d94 <_rename_r+0x350> <== NOT EXECUTED } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 8060c38: 37 8d 00 20 addi r13,sp,32 <== NOT EXECUTED 8060c3c: b5 ec 08 00 add r1,r15,r12 <== NOT EXECUTED 8060c40: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8060c44: 37 83 00 5c addi r3,sp,92 <== NOT EXECUTED 8060c48: d8 80 00 00 call r4 <== NOT EXECUTED 8060c4c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( result != 0 ) { 8060c50: 44 20 00 17 be r1,r0,8060cac <_rename_r+0x268> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8060c54: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060c58: 44 20 00 05 be r1,r0,8060c6c <_rename_r+0x228> <== NOT EXECUTED 8060c5c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060c60: 44 40 00 03 be r2,r0,8060c6c <_rename_r+0x228> <== NOT EXECUTED 8060c64: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060c68: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8060c6c: 45 60 00 07 be r11,r0,8060c88 <_rename_r+0x244> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8060c70: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060c74: 44 20 00 05 be r1,r0,8060c88 <_rename_r+0x244> <== NOT EXECUTED 8060c78: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060c7c: 44 40 00 03 be r2,r0,8060c88 <_rename_r+0x244> <== NOT EXECUTED 8060c80: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060c84: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8060c88: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060c8c: 44 20 00 05 be r1,r0,8060ca0 <_rename_r+0x25c> <== NOT EXECUTED 8060c90: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060c94: 44 40 00 03 be r2,r0,8060ca0 <_rename_r+0x25c> <== NOT EXECUTED 8060c98: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060c9c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8060ca0: fb ff 8d 38 calli 8044180 <__errno> <== NOT EXECUTED 8060ca4: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 8060ca8: e3 ff ff e2 bi 8060c30 <_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 ) { 8060cac: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED 8060cb0: 2b 83 00 44 lw r3,(sp+68) <== NOT EXECUTED 8060cb4: 2b 82 00 2c lw r2,(sp+44) <== NOT EXECUTED 8060cb8: 44 61 00 16 be r3,r1,8060d10 <_rename_r+0x2cc> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8060cbc: 44 40 00 05 be r2,r0,8060cd0 <_rename_r+0x28c> <== NOT EXECUTED 8060cc0: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8060cc4: 44 40 00 03 be r2,r0,8060cd0 <_rename_r+0x28c> <== NOT EXECUTED 8060cc8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060ccc: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8060cd0: 45 60 00 07 be r11,r0,8060cec <_rename_r+0x2a8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8060cd4: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060cd8: 44 20 00 05 be r1,r0,8060cec <_rename_r+0x2a8> <== NOT EXECUTED 8060cdc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060ce0: 44 40 00 03 be r2,r0,8060cec <_rename_r+0x2a8> <== NOT EXECUTED 8060ce4: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060ce8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8060cec: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060cf0: 44 20 00 05 be r1,r0,8060d04 <_rename_r+0x2c0> <== NOT EXECUTED 8060cf4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060cf8: 44 40 00 03 be r2,r0,8060d04 <_rename_r+0x2c0> <== NOT EXECUTED 8060cfc: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060d00: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 8060d04: fb ff 8d 1f calli 8044180 <__errno> <== NOT EXECUTED 8060d08: 34 02 00 12 mvi r2,18 <== NOT EXECUTED 8060d0c: e3 ff ff c8 bi 8060c2c <_rename_r+0x1e8> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 8060d10: 28 45 00 40 lw r5,(r2+64) <== NOT EXECUTED 8060d14: 5c a0 00 07 bne r5,r0,8060d30 <_rename_r+0x2ec> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8060d18: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8060d1c: 44 45 00 03 be r2,r5,8060d28 <_rename_r+0x2e4> <== NOT EXECUTED 8060d20: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060d24: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8060d28: 45 60 ff b9 be r11,r0,8060c0c <_rename_r+0x1c8> <== NOT EXECUTED 8060d2c: e3 ff ff b2 bi 8060bf4 <_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 ); 8060d30: 2b 84 00 5c lw r4,(sp+92) <== NOT EXECUTED 8060d34: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060d38: 37 82 00 48 addi r2,sp,72 <== NOT EXECUTED 8060d3c: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8060d40: d8 a0 00 00 call r5 <== NOT EXECUTED 8060d44: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8060d48: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060d4c: 44 20 00 05 be r1,r0,8060d60 <_rename_r+0x31c> <== NOT EXECUTED 8060d50: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060d54: 44 40 00 03 be r2,r0,8060d60 <_rename_r+0x31c> <== NOT EXECUTED 8060d58: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060d5c: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8060d60: 45 60 00 07 be r11,r0,8060d7c <_rename_r+0x338> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8060d64: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060d68: 44 20 00 05 be r1,r0,8060d7c <_rename_r+0x338> <== NOT EXECUTED 8060d6c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060d70: 44 40 00 03 be r2,r0,8060d7c <_rename_r+0x338> <== NOT EXECUTED 8060d74: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060d78: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8060d7c: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060d80: 44 20 00 05 be r1,r0,8060d94 <_rename_r+0x350> <== NOT EXECUTED 8060d84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060d88: 44 40 00 03 be r2,r0,8060d94 <_rename_r+0x350> <== NOT EXECUTED 8060d8c: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060d90: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 8060d94: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8060d98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8060d9c: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8060da0: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8060da4: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8060da8: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8060dac: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8060db0: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8060db4: 37 9c 00 5c addi sp,sp,92 <== NOT EXECUTED 8060db8: 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 0800c00c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 800c00c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800c010: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return unlink( path ); 800c014: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800c018: fb ff ff 6d calli 800bdcc <== NOT EXECUTED } 800c01c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800c020: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800c024: c3 a0 00 00 ret <== NOT EXECUTED 0802690c : #include int chdir( const char *pathname ) { 802690c: 37 9c ff e0 addi sp,sp,-32 8026910: 5b 8b 00 0c sw (sp+12),r11 8026914: 5b 8c 00 08 sw (sp+8),r12 8026918: 5b 9d 00 04 sw (sp+4),ra 802691c: 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 ); 8026920: f8 00 94 18 calli 804b980 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 8026924: 34 03 00 01 mvi r3,1 8026928: 37 8b 00 10 addi r11,sp,16 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 802692c: b8 20 10 00 mv r2,r1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 8026930: b9 60 20 00 mv r4,r11 8026934: b9 80 08 00 mv r1,r12 8026938: b8 60 28 00 mv r5,r3 802693c: fb ff 82 e7 calli 80074d8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 8026940: 34 02 ff ff mvi r2,-1 8026944: 5c 20 00 2b bne r1,r0,80269f0 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 8026948: 2b 83 00 1c lw r3,(sp+28) 802694c: 28 62 00 10 lw r2,(r3+16) 8026950: 5c 41 00 08 bne r2,r1,8026970 rtems_filesystem_freenode( &loc ); 8026954: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8026958: 44 62 00 03 be r3,r2,8026964 <== NOT EXECUTED 802695c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8026960: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026964: f8 00 76 07 calli 8044180 <__errno> <== NOT EXECUTED 8026968: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802696c: e0 00 00 0d bi 80269a0 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 8026970: b9 60 08 00 mv r1,r11 8026974: d8 40 00 00 call r2 8026978: 34 02 00 01 mvi r2,1 802697c: 44 22 00 0c be r1,r2,80269ac rtems_filesystem_freenode( &loc ); 8026980: 2b 81 00 1c lw r1,(sp+28) 8026984: 44 20 00 05 be r1,r0,8026998 8026988: 28 22 00 1c lw r2,(r1+28) 802698c: 44 40 00 03 be r2,r0,8026998 8026990: b9 60 08 00 mv r1,r11 8026994: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8026998: f8 00 75 fa calli 8044180 <__errno> 802699c: 34 02 00 14 mvi r2,20 80269a0: 58 22 00 00 sw (r1+0),r2 80269a4: 34 02 ff ff mvi r2,-1 80269a8: e0 00 00 12 bi 80269f0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 80269ac: 78 01 08 06 mvhi r1,0x806 80269b0: 38 21 d2 f0 ori r1,r1,0xd2f0 80269b4: 28 21 00 00 lw r1,(r1+0) 80269b8: 28 22 00 10 lw r2,(r1+16) 80269bc: 44 40 00 05 be r2,r0,80269d0 80269c0: 28 42 00 1c lw r2,(r2+28) 80269c4: 44 40 00 03 be r2,r0,80269d0 80269c8: 34 21 00 04 addi r1,r1,4 80269cc: d8 40 00 00 call r2 rtems_filesystem_current = loc; 80269d0: 78 01 08 06 mvhi r1,0x806 80269d4: 38 21 d2 f0 ori r1,r1,0xd2f0 80269d8: 28 21 00 00 lw r1,(r1+0) 80269dc: 37 82 00 10 addi r2,sp,16 80269e0: 34 03 00 14 mvi r3,20 80269e4: 34 21 00 04 addi r1,r1,4 80269e8: f8 00 84 88 calli 8047c08 80269ec: 34 02 00 00 mvi r2,0 return 0; } 80269f0: b8 40 08 00 mv r1,r2 80269f4: 2b 9d 00 04 lw ra,(sp+4) 80269f8: 2b 8b 00 0c lw r11,(sp+12) 80269fc: 2b 8c 00 08 lw r12,(sp+8) 8026a00: 37 9c 00 20 addi sp,sp,32 8026a04: 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 11 f2 calli 804b980 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 f3 e1 calli 8044180 <__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 f3 d6 calli 8044180 <__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 08026a08 : int chown( const char *path, uid_t owner, gid_t group ) { 8026a08: 37 9c ff d8 addi sp,sp,-40 8026a0c: 5b 8b 00 14 sw (sp+20),r11 8026a10: 5b 8c 00 10 sw (sp+16),r12 8026a14: 5b 8d 00 0c sw (sp+12),r13 8026a18: 5b 8e 00 08 sw (sp+8),r14 8026a1c: 5b 9d 00 04 sw (sp+4),ra 8026a20: b8 20 60 00 mv r12,r1 8026a24: 20 4e ff ff andi r14,r2,0xffff 8026a28: 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 ) ) 8026a2c: 37 8b 00 18 addi r11,sp,24 8026a30: f8 00 93 d4 calli 804b980 8026a34: b8 20 10 00 mv r2,r1 8026a38: 34 03 00 00 mvi r3,0 8026a3c: b9 80 08 00 mv r1,r12 8026a40: b9 60 20 00 mv r4,r11 8026a44: 34 05 00 01 mvi r5,1 8026a48: fb ff 82 a4 calli 80074d8 8026a4c: 34 0c ff ff mvi r12,-1 8026a50: 5c 20 00 18 bne r1,r0,8026ab0 return -1; if ( !loc.ops->chown_h ) { 8026a54: 2b 85 00 24 lw r5,(sp+36) 8026a58: 28 a4 00 18 lw r4,(r5+24) 8026a5c: 5c 81 00 0a bne r4,r1,8026a84 rtems_filesystem_freenode( &loc ); 8026a60: 28 a2 00 1c lw r2,(r5+28) <== NOT EXECUTED 8026a64: 44 44 00 03 be r2,r4,8026a70 <== NOT EXECUTED 8026a68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8026a6c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026a70: f8 00 75 c4 calli 8044180 <__errno> <== NOT EXECUTED 8026a74: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026a78: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026a7c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8026a80: e0 00 00 0c bi 8026ab0 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 8026a84: b9 c0 10 00 mv r2,r14 8026a88: b9 a0 18 00 mv r3,r13 8026a8c: b9 60 08 00 mv r1,r11 8026a90: d8 80 00 00 call r4 8026a94: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 8026a98: 2b 81 00 24 lw r1,(sp+36) 8026a9c: 44 20 00 05 be r1,r0,8026ab0 8026aa0: 28 22 00 1c lw r2,(r1+28) 8026aa4: 44 40 00 03 be r2,r0,8026ab0 8026aa8: b9 60 08 00 mv r1,r11 8026aac: d8 40 00 00 call r2 return result; } 8026ab0: b9 80 08 00 mv r1,r12 8026ab4: 2b 9d 00 04 lw ra,(sp+4) 8026ab8: 2b 8b 00 14 lw r11,(sp+20) 8026abc: 2b 8c 00 10 lw r12,(sp+16) 8026ac0: 2b 8d 00 0c lw r13,(sp+12) 8026ac4: 2b 8e 00 08 lw r14,(sp+8) 8026ac8: 37 9c 00 28 addi sp,sp,40 8026acc: c3 a0 00 00 ret 08026ad0 : #include int chroot( const char *pathname ) { 8026ad0: 37 9c ff dc addi sp,sp,-36 8026ad4: 5b 8b 00 10 sw (sp+16),r11 8026ad8: 5b 8c 00 0c sw (sp+12),r12 8026adc: 5b 8d 00 08 sw (sp+8),r13 8026ae0: 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) { 8026ae4: 78 0b 08 06 mvhi r11,0x806 8026ae8: 39 6b d2 f0 ori r11,r11,0xd2f0 8026aec: 29 6c 00 00 lw r12,(r11+0) 8026af0: 78 02 08 07 mvhi r2,0x807 8026af4: 38 42 0f 5c ori r2,r2,0xf5c #include int chroot( const char *pathname ) { 8026af8: 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) { 8026afc: 5d 82 00 08 bne r12,r2,8026b1c rtems_libio_set_private_env(); /* try to set a new private env*/ 8026b00: f8 00 07 6e calli 80288b8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 8026b04: 29 61 00 00 lw r1,(r11+0) 8026b08: 5c 2c 00 05 bne r1,r12,8026b1c rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026b0c: f8 00 75 9d calli 8044180 <__errno> <== NOT EXECUTED 8026b10: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026b14: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026b18: e0 00 00 0a bi 8026b40 <== NOT EXECUTED } result = chdir(pathname); 8026b1c: b9 a0 08 00 mv r1,r13 8026b20: fb ff ff 7b calli 802690c 8026b24: b8 20 58 00 mv r11,r1 if (result) { 8026b28: 44 20 00 08 be r1,r0,8026b48 rtems_set_errno_and_return_minus_one( errno ); 8026b2c: f8 00 75 95 calli 8044180 <__errno> <== NOT EXECUTED 8026b30: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8026b34: f8 00 75 93 calli 8044180 <__errno> <== NOT EXECUTED 8026b38: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8026b3c: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED 8026b40: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026b44: e0 00 00 1b bi 8026bb0 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 8026b48: 78 01 08 06 mvhi r1,0x806 8026b4c: 34 02 00 01 mvi r2,1 8026b50: 38 21 2c 9c ori r1,r1,0x2c9c 8026b54: b9 60 18 00 mv r3,r11 8026b58: 37 84 00 14 addi r4,sp,20 8026b5c: b9 60 28 00 mv r5,r11 8026b60: fb ff 82 5e calli 80074d8 8026b64: b8 20 10 00 mv r2,r1 8026b68: 5c 2b ff f1 bne r1,r11,8026b2c /* 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); 8026b6c: 78 01 08 06 mvhi r1,0x806 8026b70: 38 21 d2 f0 ori r1,r1,0xd2f0 8026b74: 28 21 00 00 lw r1,(r1+0) 8026b78: 28 23 00 24 lw r3,(r1+36) 8026b7c: 44 62 00 05 be r3,r2,8026b90 8026b80: 28 63 00 1c lw r3,(r3+28) 8026b84: 44 62 00 03 be r3,r2,8026b90 8026b88: 34 21 00 18 addi r1,r1,24 8026b8c: d8 60 00 00 call r3 rtems_filesystem_root = loc; 8026b90: 78 01 08 06 mvhi r1,0x806 8026b94: 38 21 d2 f0 ori r1,r1,0xd2f0 8026b98: 28 21 00 00 lw r1,(r1+0) 8026b9c: 37 82 00 14 addi r2,sp,20 8026ba0: 34 03 00 14 mvi r3,20 8026ba4: 34 21 00 18 addi r1,r1,24 8026ba8: f8 00 84 18 calli 8047c08 8026bac: 34 01 00 00 mvi r1,0 return 0; } 8026bb0: 2b 9d 00 04 lw ra,(sp+4) 8026bb4: 2b 8b 00 10 lw r11,(sp+16) 8026bb8: 2b 8c 00 0c lw r12,(sp+12) 8026bbc: 2b 8d 00 08 lw r13,(sp+8) 8026bc0: 37 9c 00 24 addi sp,sp,36 8026bc4: c3 a0 00 00 ret 08004b90 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004b90: 37 9c ff f0 addi sp,sp,-16 8004b94: 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; 8004b98: 28 23 00 3c lw r3,(r1+60) #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8004b9c: 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; 8004ba0: 34 01 00 00 mvi r1,0 args.mode = 0; 8004ba4: 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; 8004ba8: 5b 81 00 0c sw (sp+12),r1 args.mode = 0; status = rtems_io_close( 8004bac: 28 62 00 0c lw r2,(r3+12) 8004bb0: 28 61 00 08 lw r1,(r3+8) 8004bb4: 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; 8004bb8: 5b 84 00 08 sw (sp+8),r4 args.flags = 0; args.mode = 0; status = rtems_io_close( 8004bbc: f8 00 07 5e calli 8006934 np->major, np->minor, (void *) &args ); if ( status ) { 8004bc0: b8 20 10 00 mv r2,r1 8004bc4: 44 20 00 03 be r1,r0,8004bd0 return rtems_deviceio_errno(status); 8004bc8: f8 00 00 48 calli 8004ce8 <== NOT EXECUTED 8004bcc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 8004bd0: b8 40 08 00 mv r1,r2 8004bd4: 2b 9d 00 04 lw ra,(sp+4) 8004bd8: 37 9c 00 10 addi sp,sp,16 8004bdc: c3 a0 00 00 ret 08004bec : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8004bec: 37 9c ff e0 addi sp,sp,-32 8004bf0: 5b 8b 00 20 sw (sp+32),r11 8004bf4: 5b 8c 00 1c sw (sp+28),r12 8004bf8: 5b 8d 00 18 sw (sp+24),r13 8004bfc: 5b 8e 00 14 sw (sp+20),r14 8004c00: 5b 8f 00 10 sw (sp+16),r15 8004c04: 5b 90 00 0c sw (sp+12),r16 8004c08: 5b 91 00 08 sw (sp+8),r17 8004c0c: 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; 8004c10: 28 8c 00 00 lw r12,(r4+0) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8004c14: b8 80 58 00 mv r11,r4 8004c18: b8 20 88 00 mv r17,r1 8004c1c: 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) 8004c20: 45 80 00 05 be r12,r0,8004c34 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8004c24: 78 0d 08 00 mvhi r13,0x800 8004c28: 39 ad e0 14 ori r13,r13,0xe014 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) 8004c2c: 34 0e 00 00 mvi r14,0 8004c30: e0 00 00 1c bi 8004ca0 rtems_set_errno_and_return_minus_one( EFAULT ); 8004c34: f8 00 14 40 calli 8009d34 <__errno> <== NOT EXECUTED 8004c38: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8004c3c: e0 00 00 1f bi 8004cb8 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 8004c40: 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++) { 8004c44: 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) 8004c48: 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) 8004c4c: 45 e0 00 14 be r15,r0,8004c9c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8004c50: f8 00 18 ce calli 800af88 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8004c54: 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) 8004c58: 5c 20 00 11 bne r1,r0,8004c9c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8004c5c: 41 e5 00 00 lbu r5,(r15+0) 8004c60: 5c a1 00 0f bne r5,r1,8004c9c /* 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; 8004c64: 78 02 08 00 mvhi r2,0x800 8004c68: 38 42 e1 7c ori r2,r2,0xe17c 8004c6c: 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; 8004c70: 78 03 08 00 mvhi r3,0x800 pathloc->ops = &devFS_ops; 8004c74: 78 02 08 00 mvhi r2,0x800 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004c78: 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; 8004c7c: 38 63 e1 44 ori r3,r3,0xe144 pathloc->ops = &devFS_ops; 8004c80: 38 42 e0 fc ori r2,r2,0xe0fc pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004c84: 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]; 8004c88: 59 6c 00 00 sw (r11+0),r12 pathloc->handlers = &devFS_file_handlers; 8004c8c: 59 63 00 08 sw (r11+8),r3 pathloc->ops = &devFS_ops; 8004c90: 59 62 00 0c sw (r11+12),r2 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8004c94: b8 a0 08 00 mv r1,r5 return 0; 8004c98: e0 00 00 0a bi 8004cc0 /* 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++) { 8004c9c: 35 8c 00 14 addi r12,r12,20 8004ca0: 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) 8004ca4: ba 20 08 00 mv r1,r17 8004ca8: 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++) { 8004cac: 54 4e ff e5 bgu r2,r14,8004c40 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8004cb0: f8 00 14 21 calli 8009d34 <__errno> 8004cb4: 34 02 00 02 mvi r2,2 8004cb8: 58 22 00 00 sw (r1+0),r2 8004cbc: 34 01 ff ff mvi r1,-1 } 8004cc0: 2b 9d 00 04 lw ra,(sp+4) 8004cc4: 2b 8b 00 20 lw r11,(sp+32) 8004cc8: 2b 8c 00 1c lw r12,(sp+28) 8004ccc: 2b 8d 00 18 lw r13,(sp+24) 8004cd0: 2b 8e 00 14 lw r14,(sp+20) 8004cd4: 2b 8f 00 10 lw r15,(sp+16) 8004cd8: 2b 90 00 0c lw r16,(sp+12) 8004cdc: 2b 91 00 08 lw r17,(sp+8) 8004ce0: 37 9c 00 20 addi sp,sp,32 8004ce4: 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 e0 14 ori r11,r11,0xe014 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 c4 calli 8004734 <_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 25 41 calli 8009d34 <__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 28 16 calli 800a8c0 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 e1 44 ori r3,r3,0xe144 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000878: 38 42 e0 fc ori r2,r2,0xe0fc /* 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 b6 calli 8002540 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 9e calli 8004ce8 <== 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 25 04 calli 8009d34 <__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 e0 14 ori r14,r14,0xe014 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 24 fa calli 8009d34 <__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 29 0b calli 800ad9c <== NOT EXECUTED 8000974: 5c 20 00 05 bne r1,r0,8000988 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 8000978: f8 00 24 ef calli 8009d34 <__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 24 e5 calli 8009d34 <__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 29 3c calli 800aedc 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 13 calli 8002700 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 8a calli 8004ce8 <== 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 1d calli 8002794 <== 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 70 calli 8004ce8 <== 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 24 79 calli 8009d34 <__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 15 calli 8002828 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 43 calli 8004ce8 <== 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 08009e04 : */ int device_close( rtems_libio_t *iop ) { 8009e04: 37 9c ff f0 addi sp,sp,-16 8009e08: 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; 8009e0c: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = 0; 8009e10: 34 02 00 00 mvi r2,0 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 8009e14: 5b 81 00 08 sw (sp+8),r1 args.flags = 0; args.mode = 0; 8009e18: 5b 82 00 10 sw (sp+16),r2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; 8009e1c: 5b 82 00 0c sw (sp+12),r2 args.mode = 0; status = rtems_io_close( 8009e20: 28 62 00 54 lw r2,(r3+84) 8009e24: 28 61 00 50 lw r1,(r3+80) 8009e28: 37 83 00 08 addi r3,sp,8 8009e2c: f8 00 05 f3 calli 800b5f8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 8009e30: b8 20 10 00 mv r2,r1 8009e34: 44 20 00 03 be r1,r0,8009e40 return rtems_deviceio_errno(status); 8009e38: f8 00 07 c2 calli 800bd40 <== NOT EXECUTED 8009e3c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 8009e40: b8 40 08 00 mv r1,r2 8009e44: 2b 9d 00 04 lw ra,(sp+4) 8009e48: 37 9c 00 10 addi sp,sp,16 8009e4c: c3 a0 00 00 ret 08009cf8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8009cf8: 37 9c ff ec addi sp,sp,-20 8009cfc: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 8009d00: 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; 8009d04: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8009d08: 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; 8009d0c: 5b 81 00 08 sw (sp+8),r1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 8009d10: 28 82 00 54 lw r2,(r4+84) 8009d14: 28 81 00 50 lw r1,(r4+80) 8009d18: 37 83 00 08 addi r3,sp,8 8009d1c: f8 00 06 5c calli 800b68c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009d20: 44 20 00 03 be r1,r0,8009d2c return rtems_deviceio_errno(status); 8009d24: f8 00 08 07 calli 800bd40 <== NOT EXECUTED 8009d28: e0 00 00 02 bi 8009d30 <== NOT EXECUTED return args.ioctl_return; 8009d2c: 2b 81 00 14 lw r1,(sp+20) } 8009d30: 2b 9d 00 04 lw ra,(sp+4) 8009d34: 37 9c 00 14 addi sp,sp,20 8009d38: c3 a0 00 00 ret 08009e50 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8009e50: 37 9c ff f0 addi sp,sp,-16 8009e54: 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; 8009e58: 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; 8009e5c: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = iop->flags; args.mode = mode; 8009e60: 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; 8009e64: 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; 8009e68: 5b 81 00 08 sw (sp+8),r1 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 8009e6c: 28 62 00 54 lw r2,(r3+84) 8009e70: 28 61 00 50 lw r1,(r3+80) 8009e74: 37 83 00 08 addi r3,sp,8 8009e78: f8 00 06 2a calli 800b720 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009e7c: b8 20 10 00 mv r2,r1 8009e80: 44 20 00 03 be r1,r0,8009e8c return rtems_deviceio_errno(status); 8009e84: f8 00 07 af calli 800bd40 <== NOT EXECUTED 8009e88: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 8009e8c: b8 40 08 00 mv r1,r2 8009e90: 2b 9d 00 04 lw ra,(sp+4) 8009e94: 37 9c 00 10 addi sp,sp,16 8009e98: c3 a0 00 00 ret 08009da0 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8009da0: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009da4: 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; 8009da8: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8009dac: 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; 8009db0: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED 8009db4: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8009db8: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED args.buffer = buffer; 8009dbc: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8009dc0: 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; 8009dc4: 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; 8009dc8: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 8009dcc: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8009dd0: 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; 8009dd4: 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( 8009dd8: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED 8009ddc: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED 8009de0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8009de4: f8 00 06 74 calli 800b7b4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009de8: 44 20 00 03 be r1,r0,8009df4 <== NOT EXECUTED return rtems_deviceio_errno(status); 8009dec: f8 00 07 d5 calli 800bd40 <== NOT EXECUTED 8009df0: e0 00 00 02 bi 8009df8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8009df4: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8009df8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009dfc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009e00: c3 a0 00 00 ret <== NOT EXECUTED 08009d3c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8009d3c: 37 9c ff dc addi sp,sp,-36 8009d40: 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; 8009d44: 28 24 00 18 lw r4,(r1+24) 8009d48: 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; 8009d4c: 28 24 00 14 lw r4,(r1+20) 8009d50: 5b 84 00 14 sw (sp+20),r4 8009d54: 28 24 00 10 lw r4,(r1+16) args.buffer = (void *) buffer; 8009d58: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8009d5c: 34 02 00 00 mvi r2,0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 8009d60: 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; 8009d64: 28 24 00 3c lw r4,(r1+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 8009d68: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 8009d6c: 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; 8009d70: 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( 8009d74: 28 82 00 54 lw r2,(r4+84) 8009d78: 28 81 00 50 lw r1,(r4+80) 8009d7c: 37 83 00 08 addi r3,sp,8 8009d80: f8 00 06 b2 calli 800b848 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 8009d84: 44 20 00 03 be r1,r0,8009d90 return rtems_deviceio_errno(status); 8009d88: f8 00 07 ee calli 800bd40 <== NOT EXECUTED 8009d8c: e0 00 00 02 bi 8009d94 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 8009d90: 2b 81 00 24 lw r1,(sp+36) } 8009d94: 2b 9d 00 04 lw ra,(sp+4) 8009d98: 37 9c 00 24 addi sp,sp,36 8009d9c: 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 78 calli 80069d8 <== 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 53 0c ori r1,r1,0x530c <== 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 08027350 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 8027350: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027354: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp != NULL) 8027358: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802735c: 38 21 0d 18 ori r1,r1,0xd18 <== NOT EXECUTED 8027360: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027364: 44 20 00 02 be r1,r0,802736c <== NOT EXECUTED fclose(group_fp); 8027368: f8 00 73 e8 calli 8044308 <== NOT EXECUTED } 802736c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027370: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027374: c3 a0 00 00 ret <== NOT EXECUTED 08027378 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 8027378: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802737c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp != NULL) 8027380: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027384: 38 21 0c 30 ori r1,r1,0xc30 <== NOT EXECUTED 8027388: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802738c: 44 20 00 02 be r1,r0,8027394 <== NOT EXECUTED fclose(passwd_fp); 8027390: f8 00 73 de calli 8044308 <== NOT EXECUTED } 8027394: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027398: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802739c: 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 2c 24 ori r1,r1,0x2c24 <== 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 2c 28 ori r1,r1,0x2c28 <== 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 2c 28 ori r1,r1,0x2c28 <== 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 53 0c ori r13,r13,0x530c <== 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 0803c7f0 : #include int fchdir( int fd ) { 803c7f0: 37 9c ff c0 addi sp,sp,-64 <== NOT EXECUTED 803c7f4: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 803c7f8: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 803c7fc: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 803c800: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 803c804: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 803c808: 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 ); 803c80c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 803c810: 38 42 d0 10 ori r2,r2,0xd010 <== NOT EXECUTED 803c814: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 803c818: 54 41 00 02 bgu r2,r1,803c820 <== NOT EXECUTED 803c81c: e0 00 00 0e bi 803c854 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 803c820: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c824: fb ff 12 45 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c828: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c82c: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 803c830: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 803c834: 39 6b 0f 08 ori r11,r11,0xf08 <== NOT EXECUTED 803c838: fb ff 12 40 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c83c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 803c840: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 803c844: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 803c848: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 803c84c: 20 23 01 00 andi r3,r1,0x100 <== NOT EXECUTED 803c850: 5c 60 00 04 bne r3,r0,803c860 <== NOT EXECUTED 803c854: f8 00 1e 4b calli 8044180 <__errno> <== NOT EXECUTED 803c858: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803c85c: e0 00 00 15 bi 803c8b0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 803c860: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 803c864: 5c 20 00 04 bne r1,r0,803c874 <== NOT EXECUTED 803c868: f8 00 1e 46 calli 8044180 <__errno> <== NOT EXECUTED 803c86c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 803c870: e0 00 00 10 bi 803c8b0 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 803c874: 28 41 00 28 lw r1,(r2+40) <== NOT EXECUTED 803c878: 44 20 00 03 be r1,r0,803c884 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 803c87c: 28 23 00 10 lw r3,(r1+16) <== NOT EXECUTED 803c880: 5c 60 00 04 bne r3,r0,803c890 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 803c884: f8 00 1e 3f calli 8044180 <__errno> <== NOT EXECUTED 803c888: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 803c88c: e0 00 00 09 bi 803c8b0 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 803c890: 34 4e 00 1c addi r14,r2,28 <== NOT EXECUTED 803c894: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803c898: d8 60 00 00 call r3 <== NOT EXECUTED 803c89c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803c8a0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 803c8a4: 45 a1 00 05 be r13,r1,803c8b8 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 803c8a8: f8 00 1e 36 calli 8044180 <__errno> <== NOT EXECUTED 803c8ac: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 803c8b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 803c8b4: e0 00 00 1b bi 803c920 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 803c8b8: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 803c8bc: 39 6b d2 f0 ori r11,r11,0xd2f0 <== NOT EXECUTED 803c8c0: 29 6f 00 00 lw r15,(r11+0) <== NOT EXECUTED 803c8c4: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED 803c8c8: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c8cc: 35 ef 00 04 addi r15,r15,4 <== NOT EXECUTED 803c8d0: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 803c8d4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803c8d8: f8 00 2c cc calli 8047c08 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 803c8dc: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 803c8e0: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c8e4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 803c8e8: f8 00 2c c8 calli 8047c08 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 803c8ec: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 803c8f0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803c8f4: 38 21 2c 9c ori r1,r1,0x2c9c <== NOT EXECUTED 803c8f8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 803c8fc: 37 84 00 30 addi r4,sp,48 <== NOT EXECUTED 803c900: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 803c904: fb ff 2a f5 calli 80074d8 <== NOT EXECUTED 803c908: 44 20 00 08 be r1,r0,803c928 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 803c90c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 803c910: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 803c914: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c918: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803c91c: f8 00 2c bb calli 8047c08 <== NOT EXECUTED 803c920: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 803c924: e0 00 00 0f bi 803c960 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 803c928: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED 803c92c: 44 41 00 05 be r2,r1,803c940 <== NOT EXECUTED 803c930: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 803c934: 44 40 00 03 be r2,r0,803c940 <== NOT EXECUTED 803c938: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803c93c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_current = loc; 803c940: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803c944: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 803c948: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 803c94c: 37 82 00 30 addi r2,sp,48 <== NOT EXECUTED 803c950: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c954: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803c958: f8 00 2c ac calli 8047c08 <== NOT EXECUTED 803c95c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; } 803c960: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803c964: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 803c968: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 803c96c: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 803c970: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 803c974: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 803c978: 37 9c 00 40 addi sp,sp,64 <== NOT EXECUTED 803c97c: c3 a0 00 00 ret <== NOT EXECUTED 08026e7c : int fchmod( int fd, mode_t mode ) { 8026e7c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8026e80: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8026e84: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8026e88: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8026e8c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026e90: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8026e94: 38 63 d0 10 ori r3,r3,0xd010 <== NOT EXECUTED 8026e98: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 8026e9c: b8 40 60 00 mv r12,r2 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026ea0: 54 61 00 02 bgu r3,r1,8026ea8 <== NOT EXECUTED 8026ea4: e0 00 00 0e bi 8026edc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8026ea8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026eac: fb ff 68 a3 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026eb0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026eb4: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 8026eb8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8026ebc: 39 6b 0f 08 ori r11,r11,0xf08 <== NOT EXECUTED 8026ec0: fb ff 68 9e calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026ec4: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8026ec8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8026ecc: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8026ed0: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 8026ed4: 20 62 01 00 andi r2,r3,0x100 <== NOT EXECUTED 8026ed8: 5c 40 00 04 bne r2,r0,8026ee8 <== NOT EXECUTED 8026edc: f8 00 74 a9 calli 8044180 <__errno> <== NOT EXECUTED 8026ee0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026ee4: e0 00 00 0b bi 8026f10 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8026ee8: 20 63 00 04 andi r3,r3,0x4 <== NOT EXECUTED 8026eec: 5c 60 00 04 bne r3,r0,8026efc <== NOT EXECUTED 8026ef0: f8 00 74 a4 calli 8044180 <__errno> <== NOT EXECUTED 8026ef4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026ef8: e0 00 00 06 bi 8026f10 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 8026efc: 28 22 00 40 lw r2,(r1+64) <== NOT EXECUTED 8026f00: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8026f04: 5c 40 00 06 bne r2,r0,8026f1c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026f08: f8 00 74 9e calli 8044180 <__errno> <== NOT EXECUTED 8026f0c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026f10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026f14: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026f18: e0 00 00 06 bi 8026f30 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 8026f1c: 28 23 00 24 lw r3,(r1+36) <== NOT EXECUTED 8026f20: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8026f24: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026f28: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8026f2c: d8 60 00 00 call r3 <== NOT EXECUTED } 8026f30: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026f34: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8026f38: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8026f3c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8026f40: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8026f44: c3 a0 00 00 ret <== NOT EXECUTED 08026f48 : int fchown( int fd, uid_t owner, gid_t group ) { 8026f48: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8026f4c: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8026f50: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8026f54: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8026f58: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8026f5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026f60: 78 04 08 06 mvhi r4,0x806 <== NOT EXECUTED 8026f64: 38 84 d0 10 ori r4,r4,0xd010 <== NOT EXECUTED 8026f68: 28 84 00 00 lw r4,(r4+0) <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 8026f6c: 20 4d ff ff andi r13,r2,0xffff <== NOT EXECUTED 8026f70: 20 6c ff ff andi r12,r3,0xffff <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8026f74: 54 81 00 02 bgu r4,r1,8026f7c <== NOT EXECUTED 8026f78: e0 00 00 0e bi 8026fb0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8026f7c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026f80: fb ff 68 6e calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026f84: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026f88: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 8026f8c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED 8026f90: 39 6b 0f 08 ori r11,r11,0xf08 <== NOT EXECUTED 8026f94: fb ff 68 69 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026f98: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8026f9c: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8026fa0: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8026fa4: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8026fa8: 20 82 01 00 andi r2,r4,0x100 <== NOT EXECUTED 8026fac: 5c 40 00 04 bne r2,r0,8026fbc <== NOT EXECUTED 8026fb0: f8 00 74 74 calli 8044180 <__errno> <== NOT EXECUTED 8026fb4: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026fb8: e0 00 00 0b bi 8026fe4 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8026fbc: 20 84 00 04 andi r4,r4,0x4 <== NOT EXECUTED 8026fc0: 5c 80 00 04 bne r4,r0,8026fd0 <== NOT EXECUTED 8026fc4: f8 00 74 6f calli 8044180 <__errno> <== NOT EXECUTED 8026fc8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026fcc: e0 00 00 06 bi 8026fe4 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 8026fd0: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 8026fd4: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 8026fd8: 5c 80 00 06 bne r4,r0,8026ff0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8026fdc: f8 00 74 69 calli 8044180 <__errno> <== NOT EXECUTED 8026fe0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026fe4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026fe8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026fec: e0 00 00 05 bi 8027000 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 8026ff0: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026ff4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8026ff8: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8026ffc: d8 80 00 00 call r4 <== NOT EXECUTED } 8027000: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027004: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 8027008: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 802700c: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8027010: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8027014: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8027018: c3 a0 00 00 ret <== NOT EXECUTED 0803c980 : int fcntl( int fd, int cmd, ... ) { 803c980: 37 9c ff c4 addi sp,sp,-60 803c984: 5b 8b 00 20 sw (sp+32),r11 803c988: 5b 8c 00 1c sw (sp+28),r12 803c98c: 5b 8d 00 18 sw (sp+24),r13 803c990: 5b 8e 00 14 sw (sp+20),r14 803c994: 5b 8f 00 10 sw (sp+16),r15 803c998: 5b 90 00 0c sw (sp+12),r16 803c99c: 5b 91 00 08 sw (sp+8),r17 803c9a0: 5b 9d 00 04 sw (sp+4),ra int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 803c9a4: 78 09 08 06 mvhi r9,0x806 803c9a8: 39 29 d0 10 ori r9,r9,0xd010 803c9ac: 29 2d 00 00 lw r13,(r9+0) int fcntl( int fd, int cmd, ... ) { 803c9b0: 5b 83 00 28 sw (sp+40),r3 803c9b4: 5b 84 00 2c sw (sp+44),r4 803c9b8: 5b 85 00 30 sw (sp+48),r5 803c9bc: 5b 86 00 34 sw (sp+52),r6 803c9c0: 5b 87 00 38 sw (sp+56),r7 803c9c4: 5b 88 00 3c sw (sp+60),r8 803c9c8: 5b 82 00 24 sw (sp+36),r2 803c9cc: 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, ...)); 803c9d0: 37 8b 00 28 addi r11,sp,40 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 803c9d4: 55 a1 00 02 bgu r13,r1,803c9dc 803c9d8: e0 00 00 0e bi 803ca10 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 803c9dc: 78 03 08 07 mvhi r3,0x807 803c9e0: 38 63 0f 08 ori r3,r3,0xf08 803c9e4: 34 02 00 03 mvi r2,3 803c9e8: 28 71 00 00 lw r17,(r3+0) 803c9ec: fb ff 11 d3 calli 8001138 <__ashlsi3> 803c9f0: 34 02 00 03 mvi r2,3 803c9f4: b8 20 60 00 mv r12,r1 803c9f8: fb ff 11 d0 calli 8001138 <__ashlsi3> 803c9fc: b5 81 08 00 add r1,r12,r1 803ca00: b6 21 60 00 add r12,r17,r1 rtems_libio_check_is_open(iop); 803ca04: 29 8e 00 18 lw r14,(r12+24) 803ca08: 21 c1 01 00 andi r1,r14,0x100 803ca0c: 5c 20 00 04 bne r1,r0,803ca1c 803ca10: f8 00 1d dc calli 8044180 <__errno> <== NOT EXECUTED 803ca14: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803ca18: e0 00 00 54 bi 803cb68 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 803ca1c: 34 01 00 09 mvi r1,9 803ca20: 55 e1 00 50 bgu r15,r1,803cb60 803ca24: 78 10 08 06 mvhi r16,0x806 803ca28: b9 e0 08 00 mv r1,r15 803ca2c: 34 02 00 02 mvi r2,2 803ca30: fb ff 11 c2 calli 8001138 <__ashlsi3> 803ca34: 3a 10 a2 18 ori r16,r16,0xa218 803ca38: b6 01 08 00 add r1,r16,r1 803ca3c: 28 21 00 00 lw r1,(r1+0) 803ca40: c0 20 00 00 b r1 case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 803ca44: 29 6e 00 00 lw r14,(r11+0) if ( fd2 ) 803ca48: 45 c0 00 0d be r14,r0,803ca7c diop = rtems_libio_iop( fd2 ); 803ca4c: 55 ae 00 03 bgu r13,r14,803ca58 <== NOT EXECUTED 803ca50: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 803ca54: e0 00 00 0e bi 803ca8c <== NOT EXECUTED 803ca58: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803ca5c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803ca60: fb ff 11 b6 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803ca64: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803ca68: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803ca6c: fb ff 11 b3 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803ca70: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 803ca74: b6 21 68 00 add r13,r17,r1 <== NOT EXECUTED 803ca78: e0 00 00 05 bi 803ca8c <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 803ca7c: fb ff 2b ef calli 8007a38 803ca80: b8 20 68 00 mv r13,r1 if ( diop == 0 ) { 803ca84: 34 0b ff ff mvi r11,-1 803ca88: 44 2e 00 45 be r1,r14,803cb9c ret = -1; break; } } diop->handlers = iop->handlers; 803ca8c: 29 81 00 40 lw r1,(r12+64) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 803ca90: 34 03 00 14 mvi r3,20 803ca94: 35 82 00 1c addi r2,r12,28 ret = -1; break; } } diop->handlers = iop->handlers; 803ca98: 59 a1 00 40 sw (r13+64),r1 diop->file_info = iop->file_info; 803ca9c: 29 81 00 3c lw r1,(r12+60) 803caa0: 59 a1 00 3c sw (r13+60),r1 diop->flags = iop->flags; 803caa4: 29 81 00 18 lw r1,(r12+24) 803caa8: 59 a1 00 18 sw (r13+24),r1 diop->pathinfo = iop->pathinfo; 803caac: 35 a1 00 1c addi r1,r13,28 803cab0: f8 00 2c 56 calli 8047c08 ret = (int) (diop - rtems_libio_iops); 803cab4: 78 01 08 07 mvhi r1,0x807 803cab8: 38 21 0f 08 ori r1,r1,0xf08 803cabc: 28 21 00 00 lw r1,(r1+0) 803cac0: 34 02 00 03 mvi r2,3 803cac4: c9 a1 08 00 sub r1,r13,r1 803cac8: fb ff 11 ec calli 8001278 <__ashrsi3> 803cacc: 78 02 38 e3 mvhi r2,0x38e3 803cad0: 38 42 8e 39 ori r2,r2,0x8e39 803cad4: fb ff 1a b2 calli 800359c <__mulsi3> 803cad8: e0 00 00 12 bi 803cb20 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 803cadc: b9 c0 08 00 mv r1,r14 803cae0: 34 02 00 0b mvi r2,11 803cae4: fb ff 11 bd calli 80011d8 <__lshrsi3> 803cae8: 20 2b 00 01 andi r11,r1,0x1 803caec: e0 00 00 21 bi 803cb70 * 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 ) ) 803caf0: 29 6b 00 00 lw r11,(r11+0) 803caf4: 45 60 00 05 be r11,r0,803cb08 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 803caf8: 39 ce 08 00 ori r14,r14,0x800 803cafc: 59 8e 00 18 sw (r12+24),r14 803cb00: 34 0b 00 00 mvi r11,0 803cb04: e0 00 00 1b bi 803cb70 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 803cb08: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED 803cb0c: a1 c1 70 00 and r14,r14,r1 <== NOT EXECUTED 803cb10: 59 8e 00 18 sw (r12+24),r14 <== NOT EXECUTED 803cb14: e0 00 00 17 bi 803cb70 <== NOT EXECUTED break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 803cb18: b9 c0 08 00 mv r1,r14 803cb1c: fb ff 2b 41 calli 8007820 803cb20: 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) { 803cb24: 48 01 00 1e bg r0,r1,803cb9c 803cb28: e0 00 00 12 bi 803cb70 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 ) ); 803cb2c: 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); 803cb30: 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 ) ); 803cb34: fb ff 2b fa calli 8007b1c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 803cb38: 29 83 00 18 lw r3,(r12+24) 803cb3c: 34 02 fd fe mvi r2,-514 803cb40: 20 21 02 01 andi r1,r1,0x201 803cb44: a0 62 10 00 and r2,r3,r2 803cb48: b8 22 08 00 or r1,r1,r2 803cb4c: 59 81 00 18 sw (r12+24),r1 803cb50: e0 00 00 08 bi 803cb70 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 803cb54: f8 00 1d 8b calli 8044180 <__errno> 803cb58: 34 02 00 86 mvi r2,134 803cb5c: e0 00 00 03 bi 803cb68 ret = -1; break; default: errno = EINVAL; 803cb60: f8 00 1d 88 calli 8044180 <__errno> 803cb64: 34 02 00 16 mvi r2,22 803cb68: 58 22 00 00 sw (r1+0),r2 803cb6c: e0 00 00 0b bi 803cb98 * 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) { 803cb70: 29 81 00 40 lw r1,(r12+64) 803cb74: 28 23 00 30 lw r3,(r1+48) 803cb78: 44 60 00 09 be r3,r0,803cb9c int err = (*iop->handlers->fcntl_h)( cmd, iop ); 803cb7c: b9 80 10 00 mv r2,r12 803cb80: b9 e0 08 00 mv r1,r15 803cb84: d8 60 00 00 call r3 803cb88: b8 20 60 00 mv r12,r1 if (err) { 803cb8c: 44 20 00 04 be r1,r0,803cb9c errno = err; 803cb90: f8 00 1d 7c calli 8044180 <__errno> <== NOT EXECUTED 803cb94: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 803cb98: 34 0b ff ff mvi r11,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 803cb9c: b9 60 08 00 mv r1,r11 803cba0: 2b 9d 00 04 lw ra,(sp+4) 803cba4: 2b 8b 00 20 lw r11,(sp+32) 803cba8: 2b 8c 00 1c lw r12,(sp+28) 803cbac: 2b 8d 00 18 lw r13,(sp+24) 803cbb0: 2b 8e 00 14 lw r14,(sp+20) 803cbb4: 2b 8f 00 10 lw r15,(sp+16) 803cbb8: 2b 90 00 0c lw r16,(sp+12) 803cbbc: 2b 91 00 08 lw r17,(sp+8) 803cbc0: 37 9c 00 3c addi sp,sp,60 803cbc4: c3 a0 00 00 ret 0800a484 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a484: 37 9c ff d8 addi sp,sp,-40 800a488: 5b 8b 00 20 sw (sp+32),r11 800a48c: 5b 8c 00 1c sw (sp+28),r12 800a490: 5b 8d 00 18 sw (sp+24),r13 800a494: 5b 8e 00 14 sw (sp+20),r14 800a498: 5b 8f 00 10 sw (sp+16),r15 800a49c: 5b 90 00 0c sw (sp+12),r16 800a4a0: 5b 91 00 08 sw (sp+8),r17 800a4a4: 5b 9d 00 04 sw (sp+4),ra ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a4a8: 78 03 08 01 mvhi r3,0x801 800a4ac: 38 63 d6 a4 ori r3,r3,0xd6a4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a4b0: b8 20 70 00 mv r14,r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a4b4: 28 61 00 00 lw r1,(r3+0) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a4b8: b8 40 78 00 mv r15,r2 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800a4bc: 34 02 00 00 mvi r2,0 800a4c0: b8 40 18 00 mv r3,r2 800a4c4: fb ff f7 fe calli 80084bc 800a4c8: b8 20 80 00 mv r16,r1 800a4cc: 34 0c ff fc mvi r12,-4 800a4d0: 5c 20 00 d1 bne r1,r0,800a814 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 800a4d4: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED if (pipe == NULL) { 800a4d8: 5d 61 00 57 bne r11,r1,800a634 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 800a4dc: 34 01 00 34 mvi r1,52 <== NOT EXECUTED 800a4e0: fb ff f4 89 calli 8007704 <== NOT EXECUTED 800a4e4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800a4e8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (pipe == NULL) 800a4ec: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED 800a4f0: 44 20 00 5f be r1,r0,800a66c <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 800a4f4: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a4f8: 34 03 00 34 mvi r3,52 <== NOT EXECUTED 800a4fc: f8 00 0b 9d calli 800d370 <== NOT EXECUTED pipe->Size = PIPE_BUF; 800a500: 34 02 02 00 mvi r2,512 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800a504: 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; 800a508: 59 a2 00 04 sw (r13+4),r2 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800a50c: fb ff f4 7e calli 8007704 <== NOT EXECUTED 800a510: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED if (! pipe->Buffer) 800a514: 44 20 00 45 be r1,r0,800a628 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 800a518: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800a51c: 39 8c d1 9c ori r12,r12,0xd19c <== NOT EXECUTED 800a520: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED 800a524: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a528: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 800a52c: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a530: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 800a534: 35 a4 00 2c addi r4,r13,44 <== NOT EXECUTED 800a538: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a53c: f8 00 03 26 calli 800b1d4 <== NOT EXECUTED 800a540: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 800a544: 5c 20 00 36 bne r1,r0,800a61c <== 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( 800a548: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800a54c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a550: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED 800a554: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800a558: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a55c: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a560: 35 a4 00 30 addi r4,r13,48 <== NOT EXECUTED 800a564: f8 00 03 1c calli 800b1d4 <== NOT EXECUTED 800a568: b8 20 88 00 mv r17,r1 <== NOT EXECUTED 800a56c: 5c 30 00 2a bne r1,r16,800a614 <== 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( 800a570: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800a574: 78 02 50 49 mvhi r2,0x5049 <== NOT EXECUTED 800a578: 38 42 73 00 ori r2,r2,0x7300 <== NOT EXECUTED 800a57c: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED 800a580: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 800a584: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800a588: ba 20 20 00 mv r4,r17 <== NOT EXECUTED 800a58c: 35 a5 00 28 addi r5,r13,40 <== NOT EXECUTED 800a590: fb ff de 5f calli 8001f0c <== NOT EXECUTED 800a594: 5c 31 00 1e bne r1,r17,800a60c <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 800a598: 29 a2 00 2c lw r2,(r13+44) <== NOT EXECUTED 800a59c: 37 90 00 24 addi r16,sp,36 <== NOT EXECUTED 800a5a0: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a5a4: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a5a8: 38 21 e1 98 ori r1,r1,0xe198 <== NOT EXECUTED 800a5ac: fb ff fb 84 calli 80093bc <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 800a5b0: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800a5b4: 78 0d 10 00 mvhi r13,0x1000 <== NOT EXECUTED 800a5b8: 39 ad 00 00 ori r13,r13,0x0 <== NOT EXECUTED 800a5bc: b8 4d 10 00 or r2,r2,r13 <== NOT EXECUTED 800a5c0: 58 22 00 4c sw (r1+76),r2 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 800a5c4: fb ff e7 3b calli 80042b0 <_Thread_Enable_dispatch> <== NOT EXECUTED 800a5c8: 29 62 00 30 lw r2,(r11+48) <== NOT EXECUTED 800a5cc: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a5d0: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a5d4: 38 21 e1 98 ori r1,r1,0xe198 <== NOT EXECUTED 800a5d8: fb ff fb 79 calli 80093bc <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 800a5dc: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800a5e0: b8 4d 68 00 or r13,r2,r13 <== NOT EXECUTED 800a5e4: 58 2d 00 4c sw (r1+76),r13 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 800a5e8: fb ff e7 32 calli 80042b0 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 800a5ec: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800a5f0: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 800a5f4: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED 800a5f8: 34 02 00 7a mvi r2,122 <== NOT EXECUTED 800a5fc: 5c 22 00 0e bne r1,r2,800a634 <== NOT EXECUTED c = 'a'; 800a600: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 800a604: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED 800a608: e0 00 00 0b bi 800a634 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 800a60c: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED 800a610: f8 00 03 2e calli 800b2c8 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 800a614: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED 800a618: f8 00 03 2c calli 800b2c8 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 800a61c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800a620: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a624: fb ff f2 90 calli 8007064 <== NOT EXECUTED err_buf: free(pipe); 800a628: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800a62c: fb ff f2 8e calli 8007064 <== NOT EXECUTED 800a630: e0 00 00 0f bi 800a66c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 800a634: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a638: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a63c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a640: fb ff f7 9f calli 80084bc <== NOT EXECUTED 800a644: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800a648: 44 20 00 02 be r1,r0,800a650 <== NOT EXECUTED 800a64c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 800a650: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800a654: 5c 20 00 06 bne r1,r0,800a66c <== NOT EXECUTED if (err) 800a658: 45 81 00 04 be r12,r1,800a668 <== NOT EXECUTED pipe_free(pipe); 800a65c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a660: fb ff ff 2f calli 800a31c <== NOT EXECUTED 800a664: e0 00 00 02 bi 800a66c <== NOT EXECUTED else *pipep = pipe; 800a668: 59 cb 00 00 sw (r14+0),r11 <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 800a66c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a670: 38 21 d6 a4 ori r1,r1,0xd6a4 <== NOT EXECUTED 800a674: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800a678: fb ff f7 e1 calli 80085fc <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 800a67c: 5d 80 00 66 bne r12,r0,800a814 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 800a680: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 800a684: 34 03 00 04 mvi r3,4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 800a688: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 800a68c: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED 800a690: 44 23 00 24 be r1,r3,800a720 <== NOT EXECUTED 800a694: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 800a698: 44 22 00 44 be r1,r2,800a7a8 <== NOT EXECUTED 800a69c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800a6a0: 5c 22 00 56 bne r1,r2,800a7f8 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a6a4: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a6a8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a6ac: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a6b0: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800a6b4: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a6b8: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a6bc: 5c 20 00 04 bne r1,r0,800a6cc <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 800a6c0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a6c4: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a6c8: f8 00 03 20 calli 800b348 <== NOT EXECUTED if (pipe->Writers == 0) { 800a6cc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a6d0: 5c 20 00 4a bne r1,r0,800a7f8 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 800a6d4: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 800a6d8: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a6dc: 5c 41 00 47 bne r2,r1,800a7f8 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 800a6e0: 29 70 00 24 lw r16,(r11+36) <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 800a6e4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a6e8: fb ff f7 c5 calli 80085fc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800a6ec: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a6f0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a6f4: f8 00 03 34 calli 800b3c4 <== NOT EXECUTED 800a6f8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a6fc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a700: 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)) 800a704: 5c 20 00 40 bne r1,r0,800a804 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a708: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a70c: fb ff f7 6c calli 80084bc <== NOT EXECUTED 800a710: 5c 2d 00 3d bne r1,r13,800a804 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 800a714: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 800a718: 46 01 ff f3 be r16,r1,800a6e4 <== NOT EXECUTED 800a71c: e0 00 00 37 bi 800a7f8 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 800a720: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a724: 5c 20 00 05 bne r1,r0,800a738 <== NOT EXECUTED 800a728: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a72c: 44 40 00 03 be r2,r0,800a738 <== NOT EXECUTED 800a730: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED 800a734: e0 00 00 35 bi 800a808 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a738: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a73c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a740: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a744: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800a748: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a74c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800a750: 5c 20 00 04 bne r1,r0,800a760 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a754: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a758: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a75c: f8 00 02 fb calli 800b348 <== NOT EXECUTED if (pipe->Readers == 0) { 800a760: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a764: 5c 20 00 25 bne r1,r0,800a7f8 <== NOT EXECUTED prevCounter = pipe->readerCounter; 800a768: 29 70 00 20 lw r16,(r11+32) <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 800a76c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a770: fb ff f7 a3 calli 80085fc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 800a774: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a778: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a77c: f8 00 03 12 calli 800b3c4 <== NOT EXECUTED 800a780: b8 20 68 00 mv r13,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a784: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a788: 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)) 800a78c: 5c 20 00 1e bne r1,r0,800a804 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800a790: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a794: fb ff f7 4a calli 80084bc <== NOT EXECUTED 800a798: 5c 2d 00 1b bne r1,r13,800a804 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 800a79c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 800a7a0: 46 01 ff f3 be r16,r1,800a76c <== NOT EXECUTED 800a7a4: e0 00 00 15 bi 800a7f8 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a7a8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a7ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a7b0: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a7b4: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800a7b8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800a7bc: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a7c0: 5c 20 00 04 bne r1,r0,800a7d0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 800a7c4: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a7c8: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a7cc: f8 00 02 df calli 800b348 <== NOT EXECUTED pipe->writerCounter ++; 800a7d0: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a7d4: 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 ++; 800a7d8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a7dc: 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 ++; 800a7e0: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800a7e4: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800a7e8: 5c 20 00 04 bne r1,r0,800a7f8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a7ec: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a7f0: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a7f4: f8 00 02 d5 calli 800b348 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 800a7f8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a7fc: fb ff f7 80 calli 80085fc <== NOT EXECUTED return 0; 800a800: e0 00 00 05 bi 800a814 <== NOT EXECUTED 800a804: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 800a808: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800a80c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a810: fb ff fe d5 calli 800a364 <== NOT EXECUTED return err; } 800a814: b9 80 08 00 mv r1,r12 800a818: 2b 9d 00 04 lw ra,(sp+4) 800a81c: 2b 8b 00 20 lw r11,(sp+32) 800a820: 2b 8c 00 1c lw r12,(sp+28) 800a824: 2b 8d 00 18 lw r13,(sp+24) 800a828: 2b 8e 00 14 lw r14,(sp+20) 800a82c: 2b 8f 00 10 lw r15,(sp+16) 800a830: 2b 90 00 0c lw r16,(sp+12) 800a834: 2b 91 00 08 lw r17,(sp+8) 800a838: 37 9c 00 28 addi sp,sp,40 800a83c: 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 07 mvhi r1,0x807 <== NOT EXECUTED 800926c: 38 21 0f 50 ori r1,r1,0xf50 <== 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 08007064 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8007064: 37 9c ff f4 addi sp,sp,-12 8007068: 5b 8b 00 0c sw (sp+12),r11 800706c: 5b 8c 00 08 sw (sp+8),r12 8007070: 5b 9d 00 04 sw (sp+4),ra 8007074: 78 02 08 01 mvhi r2,0x801 8007078: 38 42 d7 28 ori r2,r2,0xd728 800707c: 28 43 00 0c lw r3,(r2+12) 8007080: b8 20 58 00 mv r11,r1 8007084: 34 61 00 01 addi r1,r3,1 8007088: 58 41 00 0c sw (r2+12),r1 if ( !ptr ) 800708c: 45 60 00 1f be r11,r0,8007108 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 8007090: 78 01 08 01 mvhi r1,0x801 8007094: 38 21 da 40 ori r1,r1,0xda40 8007098: 28 22 00 00 lw r2,(r1+0) 800709c: 34 01 00 03 mvi r1,3 80070a0: 5c 41 00 06 bne r2,r1,80070b8 80070a4: f8 00 01 6f calli 8007660 80070a8: 5c 20 00 04 bne r1,r0,80070b8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 80070ac: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80070b0: f8 00 01 7e calli 80076a8 <== NOT EXECUTED return; 80070b4: e0 00 00 15 bi 8007108 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 80070b8: 78 01 08 01 mvhi r1,0x801 80070bc: 38 21 d6 50 ori r1,r1,0xd650 80070c0: 28 21 00 00 lw r1,(r1+0) 80070c4: 44 20 00 04 be r1,r0,80070d4 (*rtems_malloc_statistics_helpers->at_free)(ptr); 80070c8: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 80070cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80070d0: d8 40 00 00 call r2 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 80070d4: 78 0c 08 01 mvhi r12,0x801 80070d8: 39 8c d0 1c ori r12,r12,0xd01c 80070dc: 29 81 00 00 lw r1,(r12+0) 80070e0: b9 60 10 00 mv r2,r11 80070e4: f8 00 09 06 calli 80094fc <_Protected_heap_Free> 80070e8: 5c 20 00 08 bne r1,r0,8007108 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 80070ec: 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", 80070f0: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80070f4: 38 21 be b8 ori r1,r1,0xbeb8 <== NOT EXECUTED 80070f8: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED 80070fc: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8007100: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8007104: fb ff ea 7d calli 8001af8 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8007108: 2b 9d 00 04 lw ra,(sp+4) 800710c: 2b 8b 00 0c lw r11,(sp+12) 8007110: 2b 8c 00 08 lw r12,(sp+8) 8007114: 37 9c 00 0c addi sp,sp,12 8007118: c3 a0 00 00 ret 0802878c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 802878c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8028790: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8028794: 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 8028798: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802879c: 38 42 0f 5c ori r2,r2,0xf5c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 80287a0: 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 80287a4: 44 22 00 0f be r1,r2,80287e0 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 80287a8: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED 80287ac: 44 20 00 05 be r1,r0,80287c0 <== NOT EXECUTED 80287b0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80287b4: 44 40 00 03 be r2,r0,80287c0 <== NOT EXECUTED 80287b8: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED 80287bc: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 80287c0: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 80287c4: 44 20 00 05 be r1,r0,80287d8 <== NOT EXECUTED 80287c8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80287cc: 44 40 00 03 be r2,r0,80287d8 <== NOT EXECUTED 80287d0: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 80287d4: d8 40 00 00 call r2 <== NOT EXECUTED free(env); 80287d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80287dc: fb ff 7b 7c calli 80075cc <== NOT EXECUTED } } 80287e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80287e4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80287e8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80287ec: c3 a0 00 00 ret <== NOT EXECUTED 0801aaf0 : int fstat( int fd, struct stat *sbuf ) { 801aaf0: 37 9c ff ec addi sp,sp,-20 801aaf4: 5b 8b 00 14 sw (sp+20),r11 801aaf8: 5b 8c 00 10 sw (sp+16),r12 801aafc: 5b 8d 00 0c sw (sp+12),r13 801ab00: 5b 8e 00 08 sw (sp+8),r14 801ab04: 5b 9d 00 04 sw (sp+4),ra 801ab08: b8 40 60 00 mv r12,r2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 801ab0c: 5c 40 00 04 bne r2,r0,801ab1c rtems_set_errno_and_return_minus_one( EFAULT ); 801ab10: fb ff c7 14 calli 800c760 <__errno> 801ab14: 34 02 00 0e mvi r2,14 801ab18: e0 00 00 14 bi 801ab68 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 801ab1c: 78 02 08 01 mvhi r2,0x801 801ab20: 38 42 d0 10 ori r2,r2,0xd010 801ab24: 28 42 00 00 lw r2,(r2+0) 801ab28: 50 22 00 0e bgeu r1,r2,801ab60 801ab2c: 34 02 00 03 mvi r2,3 801ab30: fb ff 95 b0 calli 80001f0 <__ashlsi3> 801ab34: 78 0d 08 01 mvhi r13,0x801 801ab38: 39 ad d7 18 ori r13,r13,0xd718 801ab3c: 34 02 00 03 mvi r2,3 801ab40: b8 20 70 00 mv r14,r1 801ab44: fb ff 95 ab calli 80001f0 <__ashlsi3> 801ab48: 29 ab 00 00 lw r11,(r13+0) 801ab4c: b5 c1 08 00 add r1,r14,r1 801ab50: b5 61 58 00 add r11,r11,r1 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 801ab54: 29 61 00 18 lw r1,(r11+24) 801ab58: 20 21 01 00 andi r1,r1,0x100 801ab5c: 5c 20 00 06 bne r1,r0,801ab74 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 801ab60: fb ff c7 00 calli 800c760 <__errno> 801ab64: 34 02 00 09 mvi r2,9 801ab68: 58 22 00 00 sw (r1+0),r2 801ab6c: 34 01 ff ff mvi r1,-1 801ab70: e0 00 00 11 bi 801abb4 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 801ab74: 29 61 00 40 lw r1,(r11+64) 801ab78: 44 20 ff fa be r1,r0,801ab60 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 801ab7c: 28 21 00 18 lw r1,(r1+24) 801ab80: 5c 20 00 04 bne r1,r0,801ab90 rtems_set_errno_and_return_minus_one( ENOTSUP ); 801ab84: fb ff c6 f7 calli 800c760 <__errno> <== NOT EXECUTED 801ab88: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801ab8c: e3 ff ff f7 bi 801ab68 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 801ab90: 34 02 00 00 mvi r2,0 801ab94: 34 03 00 48 mvi r3,72 801ab98: b9 80 08 00 mv r1,r12 801ab9c: fb ff c9 f5 calli 800d370 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 801aba0: 29 63 00 40 lw r3,(r11+64) 801aba4: 35 61 00 1c addi r1,r11,28 801aba8: b9 80 10 00 mv r2,r12 801abac: 28 63 00 18 lw r3,(r3+24) 801abb0: d8 60 00 00 call r3 } 801abb4: 2b 9d 00 04 lw ra,(sp+4) 801abb8: 2b 8b 00 14 lw r11,(sp+20) 801abbc: 2b 8c 00 10 lw r12,(sp+16) 801abc0: 2b 8d 00 0c lw r13,(sp+12) 801abc4: 2b 8e 00 08 lw r14,(sp+8) 801abc8: 37 9c 00 14 addi sp,sp,20 801abcc: c3 a0 00 00 ret 0802711c : #include int fsync( int fd ) { 802711c: 37 9c ff f4 addi sp,sp,-12 8027120: 5b 8b 00 0c sw (sp+12),r11 8027124: 5b 8c 00 08 sw (sp+8),r12 8027128: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_libio_check_fd( fd ); 802712c: 78 02 08 06 mvhi r2,0x806 8027130: 38 42 d0 10 ori r2,r2,0xd010 8027134: 28 42 00 00 lw r2,(r2+0) 8027138: 54 41 00 02 bgu r2,r1,8027140 802713c: e0 00 00 15 bi 8027190 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 8027140: 34 02 00 03 mvi r2,3 8027144: fb ff 67 fd calli 8001138 <__ashlsi3> 8027148: 34 02 00 03 mvi r2,3 802714c: 78 0b 08 07 mvhi r11,0x807 8027150: b8 20 60 00 mv r12,r1 8027154: 39 6b 0f 08 ori r11,r11,0xf08 8027158: fb ff 67 f8 calli 8001138 <__ashlsi3> 802715c: 29 62 00 00 lw r2,(r11+0) 8027160: b5 81 08 00 add r1,r12,r1 8027164: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 8027168: 28 22 00 18 lw r2,(r1+24) 802716c: 20 43 01 00 andi r3,r2,0x100 8027170: 44 60 00 08 be r3,r0,8027190 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8027174: 20 42 00 04 andi r2,r2,0x4 8027178: 5c 40 00 04 bne r2,r0,8027188 802717c: f8 00 74 01 calli 8044180 <__errno> 8027180: 34 02 00 16 mvi r2,22 8027184: e0 00 00 0a bi 80271ac /* * Now process the fsync(). */ if ( !iop->handlers ) 8027188: 28 22 00 40 lw r2,(r1+64) 802718c: 5c 40 00 04 bne r2,r0,802719c rtems_set_errno_and_return_minus_one( EBADF ); 8027190: f8 00 73 fc calli 8044180 <__errno> <== NOT EXECUTED 8027194: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8027198: e0 00 00 05 bi 80271ac <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 802719c: 28 42 00 28 lw r2,(r2+40) 80271a0: 5c 40 00 06 bne r2,r0,80271b8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 80271a4: f8 00 73 f7 calli 8044180 <__errno> 80271a8: 34 02 00 86 mvi r2,134 80271ac: 58 22 00 00 sw (r1+0),r2 80271b0: 34 01 ff ff mvi r1,-1 80271b4: e0 00 00 02 bi 80271bc return (*iop->handlers->fsync_h)( iop ); 80271b8: d8 40 00 00 call r2 } 80271bc: 2b 9d 00 04 lw ra,(sp+4) 80271c0: 2b 8b 00 0c lw r11,(sp+12) 80271c4: 2b 8c 00 08 lw r12,(sp+8) 80271c8: 37 9c 00 0c addi sp,sp,12 80271cc: c3 a0 00 00 ret 0800711c : int ftruncate( int fd, off_t length ) { 800711c: 37 9c ff d8 addi sp,sp,-40 8007120: 5b 8b 00 14 sw (sp+20),r11 8007124: 5b 8c 00 10 sw (sp+16),r12 8007128: 5b 8d 00 0c sw (sp+12),r13 800712c: 5b 8e 00 08 sw (sp+8),r14 8007130: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8007134: 78 03 08 01 mvhi r3,0x801 8007138: 38 63 d0 10 ori r3,r3,0xd010 800713c: 28 63 00 00 lw r3,(r3+0) int ftruncate( int fd, off_t length ) { 8007140: b8 40 68 00 mv r13,r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8007144: 54 61 00 02 bgu r3,r1,800714c 8007148: e0 00 00 0e bi 8007180 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 800714c: 34 02 00 03 mvi r2,3 8007150: fb ff e4 28 calli 80001f0 <__ashlsi3> 8007154: 78 0c 08 01 mvhi r12,0x801 8007158: 39 8c d7 18 ori r12,r12,0xd718 800715c: 34 02 00 03 mvi r2,3 8007160: b8 20 70 00 mv r14,r1 8007164: fb ff e4 23 calli 80001f0 <__ashlsi3> 8007168: 29 8b 00 00 lw r11,(r12+0) 800716c: b5 c1 08 00 add r1,r14,r1 8007170: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 8007174: 29 61 00 18 lw r1,(r11+24) 8007178: 20 21 01 00 andi r1,r1,0x100 800717c: 5c 20 00 04 bne r1,r0,800718c 8007180: f8 00 15 78 calli 800c760 <__errno> <== NOT EXECUTED 8007184: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8007188: e0 00 00 1b bi 80071f4 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 800718c: 37 8c 00 18 addi r12,sp,24 8007190: b9 80 08 00 mv r1,r12 8007194: 35 62 00 1c addi r2,r11,28 8007198: 34 03 00 14 mvi r3,20 800719c: f8 00 18 17 calli 800d1f8 if ( !loc.ops->node_type_h ) 80071a0: 2b 81 00 24 lw r1,(sp+36) 80071a4: 28 24 00 10 lw r4,(r1+16) 80071a8: 44 80 00 11 be r4,r0,80071ec rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 80071ac: b9 80 08 00 mv r1,r12 80071b0: d8 80 00 00 call r4 80071b4: 34 02 00 01 mvi r2,1 80071b8: 5c 22 00 04 bne r1,r2,80071c8 rtems_set_errno_and_return_minus_one( EISDIR ); 80071bc: f8 00 15 69 calli 800c760 <__errno> 80071c0: 34 02 00 15 mvi r2,21 80071c4: e0 00 00 0c bi 80071f4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80071c8: 29 61 00 18 lw r1,(r11+24) 80071cc: 20 21 00 04 andi r1,r1,0x4 80071d0: 5c 20 00 04 bne r1,r0,80071e0 80071d4: f8 00 15 63 calli 800c760 <__errno> <== NOT EXECUTED 80071d8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80071dc: e0 00 00 06 bi 80071f4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 80071e0: 29 61 00 40 lw r1,(r11+64) 80071e4: 28 2c 00 20 lw r12,(r1+32) 80071e8: 5d 80 00 06 bne r12,r0,8007200 rtems_set_errno_and_return_minus_one( ENOTSUP ); 80071ec: f8 00 15 5d calli 800c760 <__errno> <== NOT EXECUTED 80071f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80071f4: 58 22 00 00 sw (r1+0),r2 80071f8: 34 01 ff ff mvi r1,-1 80071fc: e0 00 00 08 bi 800721c return (*iop->handlers->ftruncate_h)( iop, length ); 8007200: 34 02 00 1f mvi r2,31 8007204: b9 a0 08 00 mv r1,r13 8007208: fb ff e4 4a calli 8000330 <__ashrsi3> 800720c: b8 20 10 00 mv r2,r1 8007210: b9 a0 18 00 mv r3,r13 8007214: b9 60 08 00 mv r1,r11 8007218: d9 80 00 00 call r12 } 800721c: 2b 9d 00 04 lw ra,(sp+4) 8007220: 2b 8b 00 14 lw r11,(sp+20) 8007224: 2b 8c 00 10 lw r12,(sp+16) 8007228: 2b 8d 00 0c lw r13,(sp+12) 800722c: 2b 8e 00 08 lw r14,(sp+8) 8007230: 37 9c 00 28 addi sp,sp,40 8007234: c3 a0 00 00 ret 080608f8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 80608f8: 37 9c ff d4 addi sp,sp,-44 80608fc: 5b 8b 00 18 sw (sp+24),r11 8060900: 5b 8c 00 14 sw (sp+20),r12 8060904: 5b 8d 00 10 sw (sp+16),r13 8060908: 5b 8e 00 0c sw (sp+12),r14 806090c: 5b 8f 00 08 sw (sp+8),r15 8060910: 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 ); 8060914: 78 04 08 06 mvhi r4,0x806 8060918: 38 84 d0 10 ori r4,r4,0xd010 806091c: 28 84 00 00 lw r4,(r4+0) int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8060920: b8 40 78 00 mv r15,r2 8060924: b8 60 70 00 mv r14,r3 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8060928: 54 81 00 03 bgu r4,r1,8060934 806092c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8060930: e0 00 00 0b bi 806095c <== NOT EXECUTED 8060934: 34 02 00 03 mvi r2,3 8060938: fb fe 82 00 calli 8001138 <__ashlsi3> 806093c: 78 0c 08 07 mvhi r12,0x807 8060940: 39 8c 0f 08 ori r12,r12,0xf08 8060944: 34 02 00 03 mvi r2,3 8060948: b8 20 68 00 mv r13,r1 806094c: fb fe 81 fb calli 8001138 <__ashlsi3> 8060950: 29 8b 00 00 lw r11,(r12+0) 8060954: b5 a1 08 00 add r1,r13,r1 8060958: b5 61 58 00 add r11,r11,r1 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 806095c: 37 8d 00 1c addi r13,sp,28 8060960: 34 0c 00 14 mvi r12,20 8060964: b9 a0 08 00 mv r1,r13 8060968: 35 62 00 1c addi r2,r11,28 806096c: b9 80 18 00 mv r3,r12 8060970: fb ff 9c a6 calli 8047c08 if ( !loc.ops->node_type_h ) 8060974: 2b 81 00 28 lw r1,(sp+40) 8060978: 28 24 00 10 lw r4,(r1+16) 806097c: 44 80 00 0c be r4,r0,80609ac rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8060980: b9 a0 08 00 mv r1,r13 8060984: d8 80 00 00 call r4 8060988: 34 02 00 01 mvi r2,1 806098c: 44 22 00 05 be r1,r2,80609a0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8060990: fb ff 8d fc calli 8044180 <__errno> 8060994: 58 2c 00 00 sw (r1+0),r12 8060998: 34 01 ff ff mvi r1,-1 806099c: e0 00 00 0c bi 80609cc /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 80609a0: 29 61 00 40 lw r1,(r11+64) 80609a4: 28 24 00 08 lw r4,(r1+8) 80609a8: 5c 80 00 05 bne r4,r0,80609bc rtems_set_errno_and_return_minus_one( ENOTSUP ); 80609ac: fb ff 8d f5 calli 8044180 <__errno> <== NOT EXECUTED 80609b0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80609b4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80609b8: e3 ff ff f8 bi 8060998 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 80609bc: b9 60 08 00 mv r1,r11 80609c0: b9 e0 10 00 mv r2,r15 80609c4: b9 c0 18 00 mv r3,r14 80609c8: d8 80 00 00 call r4 } 80609cc: 2b 9d 00 04 lw ra,(sp+4) 80609d0: 2b 8b 00 18 lw r11,(sp+24) 80609d4: 2b 8c 00 14 lw r12,(sp+20) 80609d8: 2b 8d 00 10 lw r13,(sp+16) 80609dc: 2b 8e 00 0c lw r14,(sp+12) 80609e0: 2b 8f 00 08 lw r15,(sp+8) 80609e4: 37 9c 00 2c addi sp,sp,44 80609e8: c3 a0 00 00 ret 08027314 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 8027314: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027318: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 802731c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Gid; } 8027320: 2c 21 00 34 lhu r1,(r1+52) <== NOT EXECUTED 8027324: c3 a0 00 00 ret <== NOT EXECUTED 08027ab0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 8027ab0: 37 9c ff e0 addi sp,sp,-32 8027ab4: 5b 8b 00 20 sw (sp+32),r11 8027ab8: 5b 8c 00 1c sw (sp+28),r12 8027abc: 5b 8d 00 18 sw (sp+24),r13 8027ac0: 5b 8e 00 14 sw (sp+20),r14 8027ac4: 5b 8f 00 10 sw (sp+16),r15 8027ac8: 5b 90 00 0c sw (sp+12),r16 8027acc: 5b 91 00 08 sw (sp+8),r17 8027ad0: 5b 9d 00 04 sw (sp+4),ra 8027ad4: b8 20 68 00 mv r13,r1 8027ad8: b8 40 88 00 mv r17,r2 8027adc: b8 60 58 00 mv r11,r3 8027ae0: b8 80 80 00 mv r16,r4 8027ae4: b8 a0 78 00 mv r15,r5 8027ae8: b8 c0 70 00 mv r14,r6 FILE *fp; int match; init_etc_passwd_group(); 8027aec: fb ff ff a3 calli 8027978 if ((fp = fopen("/etc/group", "r")) == NULL) { 8027af0: 78 01 08 06 mvhi r1,0x806 8027af4: 78 02 08 06 mvhi r2,0x806 8027af8: 38 21 16 e4 ori r1,r1,0x16e4 8027afc: 38 42 93 e8 ori r2,r2,0x93e8 8027b00: f8 00 74 a7 calli 8044d9c 8027b04: b8 20 60 00 mv r12,r1 8027b08: 5c 20 00 05 bne r1,r0,8027b1c errno = EINVAL; 8027b0c: f8 00 71 9d calli 8044180 <__errno> <== NOT EXECUTED 8027b10: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027b14: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8027b18: e0 00 00 0d bi 8027b4c <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 8027b1c: b9 60 10 00 mv r2,r11 8027b20: ba 00 18 00 mv r3,r16 8027b24: b9 e0 20 00 mv r4,r15 8027b28: b9 80 08 00 mv r1,r12 8027b2c: fb ff fe c1 calli 8027630 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 8027b30: 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)) { 8027b34: 5c 20 00 08 bne r1,r0,8027b54 errno = EINVAL; 8027b38: f8 00 71 92 calli 8044180 <__errno> <== NOT EXECUTED 8027b3c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027b40: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 8027b44: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027b48: f8 00 71 f0 calli 8044308 <== NOT EXECUTED 8027b4c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8027b50: e0 00 00 0d bi 8027b84 <== NOT EXECUTED } if (name) { 8027b54: 45 a0 00 05 be r13,r0,8027b68 match = (strcmp(grp->gr_name, name) == 0); 8027b58: 29 61 00 00 lw r1,(r11+0) 8027b5c: f8 00 8e 0d calli 804b390 8027b60: 64 27 00 00 cmpei r7,r1,0 8027b64: e0 00 00 03 bi 8027b70 } else { match = (grp->gr_gid == gid); 8027b68: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 8027b6c: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED } if (match) { 8027b70: 44 e0 ff eb be r7,r0,8027b1c fclose(fp); 8027b74: b9 80 08 00 mv r1,r12 8027b78: f8 00 71 e4 calli 8044308 *result = grp; 8027b7c: 34 01 00 00 mvi r1,0 8027b80: 59 cb 00 00 sw (r14+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 8027b84: 2b 9d 00 04 lw ra,(sp+4) 8027b88: 2b 8b 00 20 lw r11,(sp+32) 8027b8c: 2b 8c 00 1c lw r12,(sp+28) 8027b90: 2b 8d 00 18 lw r13,(sp+24) 8027b94: 2b 8e 00 14 lw r14,(sp+20) 8027b98: 2b 8f 00 10 lw r15,(sp+16) 8027b9c: 2b 90 00 0c lw r16,(sp+12) 8027ba0: 2b 91 00 08 lw r17,(sp+8) 8027ba4: 37 9c 00 20 addi sp,sp,32 8027ba8: c3 a0 00 00 ret 080277b0 : return NULL; return p; } struct group *getgrent(void) { 80277b0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80277b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp == NULL) 80277b8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80277bc: 38 21 0d 18 ori r1,r1,0xd18 <== 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 (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 80277c8: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80277cc: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 80277d0: 38 42 0d e4 ori r2,r2,0xde4 <== NOT EXECUTED 80277d4: 38 63 0d 1c ori r3,r3,0xd1c <== NOT EXECUTED 80277d8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 80277dc: fb ff ff 95 calli 8027630 <== NOT EXECUTED 80277e0: 44 20 00 04 be r1,r0,80277f0 <== NOT EXECUTED 80277e4: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80277e8: 38 21 0d e4 ori r1,r1,0xde4 <== NOT EXECUTED 80277ec: e0 00 00 02 bi 80277f4 <== NOT EXECUTED 80277f0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &grent; } 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 08027be8 : struct group *getgrgid( gid_t gid ) { 8027be8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027bec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 8027bf0: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027bf4: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8027bf8: 38 42 0d e4 ori r2,r2,0xde4 <== NOT EXECUTED 8027bfc: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027c00: 38 63 0d 1c ori r3,r3,0xd1c <== NOT EXECUTED 8027c04: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027c08: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027c0c: fb ff ff e8 calli 8027bac <== NOT EXECUTED 8027c10: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8027c14: 5c 22 00 02 bne r1,r2,8027c1c <== NOT EXECUTED return NULL; return p; 8027c18: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 8027c1c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027c20: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027c24: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8027c28: c3 a0 00 00 ret <== NOT EXECUTED 08027bac : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 8027bac: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027bb0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027bb4: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 8027bb8: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 8027bbc: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 8027bc0: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 8027bc4: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 8027bc8: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 8027bcc: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 8027bd0: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 8027bd4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8027bd8: fb ff ff b6 calli 8027ab0 <== NOT EXECUTED } 8027bdc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027be0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027be4: c3 a0 00 00 ret <== NOT EXECUTED 08027cec : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 8027cec: 37 9c ff e0 addi sp,sp,-32 8027cf0: 5b 8b 00 20 sw (sp+32),r11 8027cf4: 5b 8c 00 1c sw (sp+28),r12 8027cf8: 5b 8d 00 18 sw (sp+24),r13 8027cfc: 5b 8e 00 14 sw (sp+20),r14 8027d00: 5b 8f 00 10 sw (sp+16),r15 8027d04: 5b 90 00 0c sw (sp+12),r16 8027d08: 5b 91 00 08 sw (sp+8),r17 8027d0c: 5b 9d 00 04 sw (sp+4),ra 8027d10: b8 20 68 00 mv r13,r1 8027d14: b8 40 88 00 mv r17,r2 8027d18: b8 60 58 00 mv r11,r3 8027d1c: b8 80 80 00 mv r16,r4 8027d20: b8 a0 78 00 mv r15,r5 8027d24: b8 c0 70 00 mv r14,r6 FILE *fp; int match; init_etc_passwd_group(); 8027d28: fb ff ff 14 calli 8027978 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 8027d2c: 78 01 08 06 mvhi r1,0x806 8027d30: 78 02 08 06 mvhi r2,0x806 8027d34: 38 21 16 34 ori r1,r1,0x1634 8027d38: 38 42 93 e8 ori r2,r2,0x93e8 8027d3c: f8 00 74 18 calli 8044d9c 8027d40: b8 20 60 00 mv r12,r1 8027d44: 5c 20 00 05 bne r1,r0,8027d58 errno = EINVAL; 8027d48: f8 00 71 0e calli 8044180 <__errno> <== NOT EXECUTED 8027d4c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027d50: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8027d54: e0 00 00 0d bi 8027d88 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 8027d58: b9 60 10 00 mv r2,r11 8027d5c: ba 00 18 00 mv r3,r16 8027d60: b9 e0 20 00 mv r4,r15 8027d64: b9 80 08 00 mv r1,r12 8027d68: fb ff fe a6 calli 8027800 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 8027d6c: 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)) { 8027d70: 5c 20 00 08 bne r1,r0,8027d90 errno = EINVAL; 8027d74: f8 00 71 03 calli 8044180 <__errno> <== NOT EXECUTED 8027d78: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027d7c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 8027d80: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027d84: f8 00 71 61 calli 8044308 <== NOT EXECUTED 8027d88: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8027d8c: e0 00 00 0d bi 8027dc0 <== NOT EXECUTED } if (name) { 8027d90: 45 a0 00 05 be r13,r0,8027da4 match = (strcmp(pwd->pw_name, name) == 0); 8027d94: 29 61 00 00 lw r1,(r11+0) 8027d98: f8 00 8d 7e calli 804b390 8027d9c: 64 27 00 00 cmpei r7,r1,0 8027da0: e0 00 00 03 bi 8027dac } else { match = (pwd->pw_uid == uid); 8027da4: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 8027da8: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED } if (match) { 8027dac: 44 e0 ff eb be r7,r0,8027d58 fclose(fp); 8027db0: b9 80 08 00 mv r1,r12 8027db4: f8 00 71 55 calli 8044308 *result = pwd; 8027db8: 34 01 00 00 mvi r1,0 8027dbc: 59 cb 00 00 sw (r14+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 8027dc0: 2b 9d 00 04 lw ra,(sp+4) 8027dc4: 2b 8b 00 20 lw r11,(sp+32) 8027dc8: 2b 8c 00 1c lw r12,(sp+28) 8027dcc: 2b 8d 00 18 lw r13,(sp+24) 8027dd0: 2b 8e 00 14 lw r14,(sp+20) 8027dd4: 2b 8f 00 10 lw r15,(sp+16) 8027dd8: 2b 90 00 0c lw r16,(sp+12) 8027ddc: 2b 91 00 08 lw r17,(sp+8) 8027de0: 37 9c 00 20 addi sp,sp,32 8027de4: c3 a0 00 00 ret 08027928 : return NULL; return p; } struct passwd *getpwent(void) { 8027928: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802792c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp == NULL) 8027930: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027934: 38 21 0c 30 ori r1,r1,0xc30 <== NOT EXECUTED 8027938: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802793c: 44 20 00 0b be r1,r0,8027968 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 8027940: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027944: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8027948: 38 42 0c fc ori r2,r2,0xcfc <== NOT EXECUTED 802794c: 38 63 0c 34 ori r3,r3,0xc34 <== NOT EXECUTED 8027950: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027954: fb ff ff ab calli 8027800 <== NOT EXECUTED 8027958: 44 20 00 04 be r1,r0,8027968 <== NOT EXECUTED 802795c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027960: 38 21 0c fc ori r1,r1,0xcfc <== NOT EXECUTED 8027964: e0 00 00 02 bi 802796c <== NOT EXECUTED 8027968: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &pwent; } 802796c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027970: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027974: c3 a0 00 00 ret <== NOT EXECUTED 08027e24 : struct passwd *getpwuid( uid_t uid ) { 8027e24: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027e28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 8027e2c: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027e30: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8027e34: 38 42 0c fc ori r2,r2,0xcfc <== NOT EXECUTED 8027e38: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027e3c: 38 63 0c 34 ori r3,r3,0xc34 <== NOT EXECUTED 8027e40: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027e44: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027e48: fb ff ff e8 calli 8027de8 <== NOT EXECUTED 8027e4c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8027e50: 5c 22 00 02 bne r1,r2,8027e58 <== NOT EXECUTED return NULL; return p; 8027e54: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 8027e58: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027e5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027e60: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8027e64: c3 a0 00 00 ret <== NOT EXECUTED 08027de8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 8027de8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027dec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027df0: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 8027df4: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 8027df8: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 8027dfc: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 8027e00: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 8027e04: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 8027e08: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 8027e0c: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 8027e10: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8027e14: fb ff ff b6 calli 8027cec <== NOT EXECUTED } 8027e18: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027e1c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027e20: c3 a0 00 00 ret <== NOT EXECUTED 08007260 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8007260: 37 9c ff ec addi sp,sp,-20 8007264: 5b 8b 00 0c sw (sp+12),r11 8007268: 5b 8c 00 08 sw (sp+8),r12 800726c: 5b 9d 00 04 sw (sp+4),ra 8007270: b8 20 58 00 mv r11,r1 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 8007274: 5c 20 00 06 bne r1,r0,800728c errno = EFAULT; 8007278: f8 00 15 3a calli 800c760 <__errno> <== NOT EXECUTED 800727c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8007280: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007284: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8007288: e0 00 00 0f bi 80072c4 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 800728c: 90 00 60 00 rcsr r12,IE 8007290: 34 01 ff fe mvi r1,-2 8007294: a1 81 08 00 and r1,r12,r1 8007298: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 800729c: 37 81 00 10 addi r1,sp,16 80072a0: f8 00 06 a3 calli 8008d2c <_TOD_Get> _ISR_Enable(level); 80072a4: 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; 80072a8: 2b 82 00 10 lw r2,(sp+16) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 80072ac: 2b 81 00 14 lw r1,(sp+20) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 80072b0: 59 62 00 00 sw (r11+0),r2 time->tv_usec = useconds; 80072b4: 34 02 03 e8 mvi r2,1000 80072b8: f8 00 4d 2f calli 801a774 <__divsi3> 80072bc: 59 61 00 04 sw (r11+4),r1 80072c0: 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; } 80072c4: 2b 9d 00 04 lw ra,(sp+4) 80072c8: 2b 8b 00 0c lw r11,(sp+12) 80072cc: 2b 8c 00 08 lw r12,(sp+8) 80072d0: 37 9c 00 14 addi sp,sp,20 80072d4: 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 d2 f0 ori r1,r1,0xd2f0 <== 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 0801180c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 801180c: 37 9c ff e8 addi sp,sp,-24 8011810: 5b 8b 00 10 sw (sp+16),r11 8011814: 5b 8c 00 0c sw (sp+12),r12 8011818: 5b 8d 00 08 sw (sp+8),r13 801181c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8011820: 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 */ ) { 8011824: b8 40 60 00 mv r12,r2 8011828: 29 62 00 50 lw r2,(r11+80) 801182c: 35 61 00 54 addi r1,r11,84 8011830: 44 41 00 04 be r2,r1,8011840 /* * 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 ); 8011834: f8 00 05 5c calli 8012da4 <__errno> 8011838: 34 02 00 5a mvi r2,90 801183c: e0 00 00 08 bi 801185c /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 8011840: 29 81 00 10 lw r1,(r12+16) 8011844: 28 21 00 1c lw r1,(r1+28) 8011848: 44 2b 00 03 be r1,r11,8011854 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 801184c: 29 6d 00 5c lw r13,(r11+92) 8011850: 45 a0 00 06 be r13,r0,8011868 rtems_set_errno_and_return_minus_one( EBUSY ); 8011854: f8 00 05 54 calli 8012da4 <__errno> 8011858: 34 02 00 10 mvi r2,16 801185c: 58 22 00 00 sw (r1+0),r2 8011860: 34 01 ff ff mvi r1,-1 8011864: e0 00 00 1d bi 80118d8 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8011868: 29 61 00 08 lw r1,(r11+8) 801186c: 44 2d 00 04 be r1,r13,801187c 8011870: b9 60 08 00 mv r1,r11 8011874: fb ff cd 3c calli 8004d64 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8011878: 59 6d 00 08 sw (r11+8),r13 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 801187c: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8011880: 34 02 00 00 mvi r2,0 8011884: 37 81 00 14 addi r1,sp,20 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8011888: 34 63 ff ff addi r3,r3,-1 801188c: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8011890: fb ff c4 6c calli 8002a40 8011894: 2b 81 00 14 lw r1,(sp+20) 8011898: 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) ) { 801189c: b9 60 08 00 mv r1,r11 80118a0: fb ff ee 0b calli 800d0cc 80118a4: 5c 20 00 0c bne r1,r0,80118d4 80118a8: 2d 62 00 34 lhu r2,(r11+52) 80118ac: 5c 41 00 0a bne r2,r1,80118d4 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 80118b0: 78 01 08 02 mvhi r1,0x802 80118b4: 38 21 50 f8 ori r1,r1,0x50f8 80118b8: 28 21 00 00 lw r1,(r1+0) 80118bc: 29 83 00 00 lw r3,(r12+0) 80118c0: 28 24 00 04 lw r4,(r1+4) 80118c4: 5c 83 00 02 bne r4,r3,80118cc rtems_filesystem_current.node_access = NULL; 80118c8: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 80118cc: b9 60 08 00 mv r1,r11 80118d0: fb ff c4 2e calli 8002988 80118d4: 34 01 00 00 mvi r1,0 } return 0; } 80118d8: 2b 9d 00 04 lw ra,(sp+4) 80118dc: 2b 8b 00 10 lw r11,(sp+16) 80118e0: 2b 8c 00 0c lw r12,(sp+12) 80118e4: 2b 8d 00 08 lw r13,(sp+8) 80118e8: 37 9c 00 18 addi sp,sp,24 80118ec: 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 50 10 ori r9,r9,0x5010 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 57 f0 ori r11,r11,0x57f0 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 37 2a calli 8013288 <__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 37 25 calli 8013288 <__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 53 0c ori r1,r1,0x530c <== 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 52 34 ori r1,r1,0x5234 <== 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 08027fac : int link( const char *existing, const char *new ) { 8027fac: 37 9c ff c4 addi sp,sp,-60 8027fb0: 5b 8b 00 10 sw (sp+16),r11 8027fb4: 5b 8c 00 0c sw (sp+12),r12 8027fb8: 5b 8d 00 08 sw (sp+8),r13 8027fbc: 5b 9d 00 04 sw (sp+4),ra 8027fc0: b8 20 58 00 mv r11,r1 8027fc4: b8 40 60 00 mv r12,r2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 8027fc8: f8 00 8e 6e calli 804b980 8027fcc: b8 20 10 00 mv r2,r1 8027fd0: 34 03 00 00 mvi r3,0 8027fd4: b9 60 08 00 mv r1,r11 8027fd8: 37 84 00 28 addi r4,sp,40 8027fdc: 34 05 00 01 mvi r5,1 8027fe0: fb ff 7d 3e calli 80074d8 0, &existing_loc, true ); if ( result != 0 ) 8027fe4: 34 0b ff ff mvi r11,-1 8027fe8: 5c 20 00 68 bne r1,r0,8028188 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 8027fec: 41 83 00 00 lbu r3,(r12+0) 8027ff0: 64 6b 00 5c cmpei r11,r3,92 8027ff4: 64 62 00 2f cmpei r2,r3,47 8027ff8: b9 62 58 00 or r11,r11,r2 8027ffc: 5d 61 00 02 bne r11,r1,8028004 8028000: 5c 6b 00 0a bne r3,r11,8028028 8028004: 78 03 08 06 mvhi r3,0x806 8028008: 38 63 d2 f0 ori r3,r3,0xd2f0 802800c: 28 62 00 00 lw r2,(r3+0) 8028010: 37 81 00 14 addi r1,sp,20 8028014: 34 03 00 14 mvi r3,20 8028018: 34 42 00 18 addi r2,r2,24 802801c: f8 00 7e fb calli 8047c08 8028020: 34 0b 00 01 mvi r11,1 8028024: e0 00 00 08 bi 8028044 8028028: 78 03 08 06 mvhi r3,0x806 802802c: 38 63 d2 f0 ori r3,r3,0xd2f0 8028030: 28 62 00 00 lw r2,(r3+0) 8028034: 37 81 00 14 addi r1,sp,20 8028038: 34 03 00 14 mvi r3,20 802803c: 34 42 00 04 addi r2,r2,4 8028040: f8 00 7e f2 calli 8047c08 if ( !parent_loc.ops->evalformake_h ) { 8028044: 2b 81 00 20 lw r1,(sp+32) 8028048: 28 24 00 04 lw r4,(r1+4) 802804c: 5c 80 00 07 bne r4,r0,8028068 rtems_filesystem_freenode( &existing_loc ); 8028050: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8028054: 44 24 00 37 be r1,r4,8028130 <== NOT EXECUTED 8028058: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802805c: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8028060: 5c 40 00 33 bne r2,r0,802812c <== NOT EXECUTED 8028064: e0 00 00 33 bi 8028130 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 8028068: 37 8d 00 14 addi r13,sp,20 802806c: b5 8b 08 00 add r1,r12,r11 8028070: b9 a0 10 00 mv r2,r13 8028074: 37 83 00 3c addi r3,sp,60 8028078: d8 80 00 00 call r4 802807c: b8 20 58 00 mv r11,r1 if ( result != 0 ) { 8028080: 44 20 00 0b be r1,r0,80280ac rtems_filesystem_freenode( &existing_loc ); 8028084: 2b 81 00 34 lw r1,(sp+52) 8028088: 44 20 00 05 be r1,r0,802809c 802808c: 28 22 00 1c lw r2,(r1+28) 8028090: 44 40 00 03 be r2,r0,802809c 8028094: 37 81 00 28 addi r1,sp,40 8028098: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( result ); 802809c: f8 00 70 39 calli 8044180 <__errno> 80280a0: 58 2b 00 00 sw (r1+0),r11 80280a4: 34 0b ff ff mvi r11,-1 80280a8: e0 00 00 38 bi 8028188 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 80280ac: 2b 81 00 38 lw r1,(sp+56) 80280b0: 2b 82 00 24 lw r2,(sp+36) 80280b4: 44 41 00 10 be r2,r1,80280f4 rtems_filesystem_freenode( &existing_loc ); 80280b8: 2b 81 00 34 lw r1,(sp+52) 80280bc: 44 20 00 05 be r1,r0,80280d0 80280c0: 28 22 00 1c lw r2,(r1+28) 80280c4: 44 40 00 03 be r2,r0,80280d0 80280c8: 37 81 00 28 addi r1,sp,40 80280cc: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 80280d0: 2b 81 00 20 lw r1,(sp+32) 80280d4: 44 20 00 05 be r1,r0,80280e8 80280d8: 28 22 00 1c lw r2,(r1+28) 80280dc: 44 40 00 03 be r2,r0,80280e8 80280e0: 37 81 00 14 addi r1,sp,20 80280e4: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EXDEV ); 80280e8: f8 00 70 26 calli 8044180 <__errno> 80280ec: 34 02 00 12 mvi r2,18 80280f0: e0 00 00 12 bi 8028138 } if ( !parent_loc.ops->link_h ) { 80280f4: 2b 81 00 20 lw r1,(sp+32) 80280f8: 28 24 00 08 lw r4,(r1+8) 80280fc: 5c 80 00 11 bne r4,r0,8028140 rtems_filesystem_freenode( &existing_loc ); 8028100: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8028104: 44 24 00 05 be r1,r4,8028118 <== NOT EXECUTED 8028108: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802810c: 44 44 00 03 be r2,r4,8028118 <== NOT EXECUTED 8028110: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8028114: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 8028118: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802811c: 44 20 00 05 be r1,r0,8028130 <== NOT EXECUTED 8028120: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028124: 44 40 00 03 be r2,r0,8028130 <== NOT EXECUTED 8028128: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED 802812c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028130: f8 00 70 14 calli 8044180 <__errno> <== NOT EXECUTED 8028134: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028138: 58 22 00 00 sw (r1+0),r2 802813c: e3 ff ff da bi 80280a4 } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 8028140: 2b 83 00 3c lw r3,(sp+60) 8028144: 37 8c 00 28 addi r12,sp,40 8028148: b9 a0 10 00 mv r2,r13 802814c: b9 80 08 00 mv r1,r12 8028150: d8 80 00 00 call r4 8028154: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &existing_loc ); 8028158: 2b 81 00 34 lw r1,(sp+52) 802815c: 44 20 00 05 be r1,r0,8028170 8028160: 28 22 00 1c lw r2,(r1+28) 8028164: 44 40 00 03 be r2,r0,8028170 8028168: b9 80 08 00 mv r1,r12 802816c: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 8028170: 2b 81 00 20 lw r1,(sp+32) 8028174: 44 20 00 05 be r1,r0,8028188 8028178: 28 22 00 1c lw r2,(r1+28) 802817c: 44 40 00 03 be r2,r0,8028188 8028180: 37 81 00 14 addi r1,sp,20 8028184: d8 40 00 00 call r2 return result; } 8028188: b9 60 08 00 mv r1,r11 802818c: 2b 9d 00 04 lw ra,(sp+4) 8028190: 2b 8b 00 10 lw r11,(sp+16) 8028194: 2b 8c 00 0c lw r12,(sp+12) 8028198: 2b 8d 00 08 lw r13,(sp+8) 802819c: 37 9c 00 3c addi sp,sp,60 80281a0: c3 a0 00 00 ret 0801ac0c : off_t lseek( int fd, off_t offset, int whence ) { 801ac0c: 37 9c ff e8 addi sp,sp,-24 801ac10: 5b 8b 00 18 sw (sp+24),r11 801ac14: 5b 8c 00 14 sw (sp+20),r12 801ac18: 5b 8d 00 10 sw (sp+16),r13 801ac1c: 5b 8e 00 0c sw (sp+12),r14 801ac20: 5b 8f 00 08 sw (sp+8),r15 801ac24: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801ac28: 78 04 08 01 mvhi r4,0x801 801ac2c: 38 84 d0 10 ori r4,r4,0xd010 801ac30: 28 84 00 00 lw r4,(r4+0) off_t lseek( int fd, off_t offset, int whence ) { 801ac34: b8 40 60 00 mv r12,r2 801ac38: b8 60 68 00 mv r13,r3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801ac3c: 54 81 00 02 bgu r4,r1,801ac44 801ac40: e0 00 00 0e bi 801ac78 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 801ac44: 34 02 00 03 mvi r2,3 801ac48: fb ff 95 6a calli 80001f0 <__ashlsi3> 801ac4c: 78 0e 08 01 mvhi r14,0x801 801ac50: 39 ce d7 18 ori r14,r14,0xd718 801ac54: 34 02 00 03 mvi r2,3 801ac58: b8 20 78 00 mv r15,r1 801ac5c: fb ff 95 65 calli 80001f0 <__ashlsi3> 801ac60: 29 cb 00 00 lw r11,(r14+0) 801ac64: b5 e1 08 00 add r1,r15,r1 801ac68: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 801ac6c: 29 61 00 18 lw r1,(r11+24) 801ac70: 20 21 01 00 andi r1,r1,0x100 801ac74: 5c 20 00 04 bne r1,r0,801ac84 801ac78: fb ff c6 ba calli 800c760 <__errno> <== NOT EXECUTED 801ac7c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801ac80: e0 00 00 29 bi 801ad24 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 801ac84: 29 61 00 40 lw r1,(r11+64) 801ac88: 28 21 00 14 lw r1,(r1+20) 801ac8c: 5c 20 00 04 bne r1,r0,801ac9c rtems_set_errno_and_return_minus_one( ENOTSUP ); 801ac90: fb ff c6 b4 calli 800c760 <__errno> <== NOT EXECUTED 801ac94: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801ac98: e0 00 00 23 bi 801ad24 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 801ac9c: 34 01 00 01 mvi r1,1 /* * Now process the lseek(). */ old_offset = iop->offset; 801aca0: 29 6f 00 10 lw r15,(r11+16) 801aca4: 29 6e 00 14 lw r14,(r11+20) switch ( whence ) { 801aca8: 45 a1 00 0a be r13,r1,801acd0 801acac: 34 01 00 02 mvi r1,2 801acb0: 45 a1 00 0f be r13,r1,801acec 801acb4: 5d a0 00 1a bne r13,r0,801ad1c case SEEK_SET: iop->offset = offset; 801acb8: b9 80 08 00 mv r1,r12 801acbc: 34 02 00 1f mvi r2,31 801acc0: fb ff 95 9c calli 8000330 <__ashrsi3> 801acc4: 59 61 00 10 sw (r11+16),r1 801acc8: 59 6c 00 14 sw (r11+20),r12 break; 801accc: e0 00 00 19 bi 801ad30 case SEEK_CUR: iop->offset += offset; 801acd0: 34 02 00 1f mvi r2,31 801acd4: b9 80 08 00 mv r1,r12 801acd8: fb ff 95 96 calli 8000330 <__ashrsi3> 801acdc: b5 8e 10 00 add r2,r12,r14 801ace0: f5 82 18 00 cmpgu r3,r12,r2 801ace4: b4 2f 08 00 add r1,r1,r15 801ace8: e0 00 00 09 bi 801ad0c break; case SEEK_END: iop->offset = iop->size + offset; 801acec: 34 02 00 1f mvi r2,31 801acf0: b9 80 08 00 mv r1,r12 801acf4: fb ff 95 8f calli 8000330 <__ashrsi3> 801acf8: 29 62 00 0c lw r2,(r11+12) 801acfc: 29 64 00 08 lw r4,(r11+8) 801ad00: b5 82 10 00 add r2,r12,r2 801ad04: f5 82 18 00 cmpgu r3,r12,r2 801ad08: b4 24 08 00 add r1,r1,r4 801ad0c: b4 61 08 00 add r1,r3,r1 801ad10: 59 61 00 10 sw (r11+16),r1 801ad14: 59 62 00 14 sw (r11+20),r2 break; 801ad18: e0 00 00 06 bi 801ad30 default: rtems_set_errno_and_return_minus_one( EINVAL ); 801ad1c: fb ff c6 91 calli 800c760 <__errno> 801ad20: 34 02 00 16 mvi r2,22 801ad24: 58 22 00 00 sw (r1+0),r2 801ad28: 34 0c ff ff mvi r12,-1 801ad2c: e0 00 00 13 bi 801ad78 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 801ad30: 29 6f 00 40 lw r15,(r11+64) 801ad34: 34 02 00 1f mvi r2,31 801ad38: b9 80 08 00 mv r1,r12 801ad3c: fb ff 95 7d calli 8000330 <__ashrsi3> 801ad40: 29 e5 00 14 lw r5,(r15+20) 801ad44: b8 20 10 00 mv r2,r1 801ad48: b9 80 18 00 mv r3,r12 801ad4c: b9 a0 20 00 mv r4,r13 801ad50: b9 60 08 00 mv r1,r11 801ad54: d8 a0 00 00 call r5 if ( status == (off_t) -1 ) 801ad58: 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 ); 801ad5c: b8 40 60 00 mv r12,r2 if ( status == (off_t) -1 ) 801ad60: 5c 41 00 06 bne r2,r1,801ad78 iop->offset = old_offset; 801ad64: b9 c0 08 00 mv r1,r14 801ad68: 34 02 00 1f mvi r2,31 801ad6c: fb ff 95 71 calli 8000330 <__ashrsi3> 801ad70: 59 61 00 10 sw (r11+16),r1 801ad74: 59 6e 00 14 sw (r11+20),r14 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 801ad78: b9 80 08 00 mv r1,r12 801ad7c: 2b 9d 00 04 lw ra,(sp+4) 801ad80: 2b 8b 00 18 lw r11,(sp+24) 801ad84: 2b 8c 00 14 lw r12,(sp+20) 801ad88: 2b 8d 00 10 lw r13,(sp+16) 801ad8c: 2b 8e 00 0c lw r14,(sp+12) 801ad90: 2b 8f 00 08 lw r15,(sp+8) 801ad94: 37 9c 00 18 addi sp,sp,24 801ad98: c3 a0 00 00 ret 08028378 : int _STAT_NAME( const char *path, struct stat *buf ) { 8028378: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 802837c: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8028380: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8028384: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8028388: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802838c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8028390: b8 20 58 00 mv r11,r1 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 8028394: 5c 40 00 04 bne r2,r0,80283a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 8028398: f8 00 6f 7a calli 8044180 <__errno> <== NOT EXECUTED 802839c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80283a0: e0 00 00 16 bi 80283f8 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 80283a4: f8 00 8d 77 calli 804b980 <== NOT EXECUTED 80283a8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80283ac: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 80283b0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80283b4: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 80283b8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80283bc: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 80283c0: fb ff 7c 46 calli 80074d8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 80283c4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80283c8: 5c 20 00 1f bne r1,r0,8028444 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 80283cc: 2b 82 00 1c lw r2,(sp+28) <== NOT EXECUTED 80283d0: 28 42 00 18 lw r2,(r2+24) <== NOT EXECUTED 80283d4: 5c 41 00 0c bne r2,r1,8028404 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 80283d8: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 80283dc: 44 22 00 05 be r1,r2,80283f0 <== NOT EXECUTED 80283e0: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 80283e4: 44 62 00 03 be r3,r2,80283f0 <== NOT EXECUTED 80283e8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80283ec: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 80283f0: f8 00 6f 64 calli 8044180 <__errno> <== NOT EXECUTED 80283f4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80283f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80283fc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028400: e0 00 00 11 bi 8028444 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 8028404: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028408: 34 03 00 48 mvi r3,72 <== NOT EXECUTED 802840c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028410: f8 00 7e c8 calli 8047f30 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 8028414: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8028418: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 802841c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028420: 28 63 00 18 lw r3,(r3+24) <== NOT EXECUTED 8028424: d8 60 00 00 call r3 <== NOT EXECUTED 8028428: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 802842c: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8028430: 44 20 00 05 be r1,r0,8028444 <== NOT EXECUTED 8028434: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028438: 44 40 00 03 be r2,r0,8028444 <== NOT EXECUTED 802843c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028440: d8 40 00 00 call r2 <== NOT EXECUTED return status; } 8028444: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028448: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802844c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8028450: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8028454: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8028458: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802845c: c3 a0 00 00 ret <== NOT EXECUTED 08007704 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8007704: 37 9c ff f0 addi sp,sp,-16 8007708: 5b 8b 00 10 sw (sp+16),r11 800770c: 5b 8c 00 0c sw (sp+12),r12 8007710: 5b 8d 00 08 sw (sp+8),r13 8007714: 5b 9d 00 04 sw (sp+4),ra 8007718: 78 03 08 01 mvhi r3,0x801 800771c: 38 63 d7 28 ori r3,r3,0xd728 8007720: 28 62 00 04 lw r2,(r3+4) 8007724: b8 20 68 00 mv r13,r1 8007728: 34 41 00 01 addi r1,r2,1 800772c: 58 61 00 04 sw (r3+4),r1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8007730: fb ff ff e7 calli 80076cc /* * Validate the parameters */ if ( !size ) 8007734: 45 a0 00 30 be r13,r0,80077f4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8007738: 78 01 08 01 mvhi r1,0x801 800773c: 38 21 da 40 ori r1,r1,0xda40 8007740: 28 22 00 00 lw r2,(r1+0) 8007744: 34 01 00 03 mvi r1,3 8007748: 5c 41 00 03 bne r2,r1,8007754 800774c: fb ff ff c5 calli 8007660 8007750: 44 20 00 29 be r1,r0,80077f4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8007754: 78 01 08 01 mvhi r1,0x801 8007758: 38 21 d0 1c ori r1,r1,0xd01c 800775c: 28 21 00 00 lw r1,(r1+0) 8007760: 34 03 00 00 mvi r3,0 8007764: b9 a0 10 00 mv r2,r13 8007768: b8 60 20 00 mv r4,r3 800776c: f8 00 07 4a calli 8009494 <_Protected_heap_Allocate_aligned_with_boundary> 8007770: 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; 8007774: 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 ) { 8007778: 5c 20 00 0e bne r1,r0,80077b0 if (rtems_malloc_sbrk_helpers) 800777c: 78 01 08 01 mvhi r1,0x801 8007780: 38 21 d6 54 ori r1,r1,0xd654 8007784: 28 21 00 00 lw r1,(r1+0) 8007788: 44 2b 00 06 be r1,r11,80077a0 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 800778c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007790: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007794: d8 40 00 00 call r2 <== NOT EXECUTED 8007798: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !return_this ) { 800779c: 5c 20 00 05 bne r1,r0,80077b0 <== NOT EXECUTED errno = ENOMEM; 80077a0: f8 00 13 f0 calli 800c760 <__errno> 80077a4: 34 02 00 0c mvi r2,12 80077a8: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 80077ac: e0 00 00 13 bi 80077f8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 80077b0: 78 01 08 01 mvhi r1,0x801 80077b4: 38 21 d6 58 ori r1,r1,0xd658 80077b8: 28 21 00 00 lw r1,(r1+0) 80077bc: 44 20 00 05 be r1,r0,80077d0 (*rtems_malloc_dirty_helper)( return_this, size ); 80077c0: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80077c4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80077c8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80077cc: d8 60 00 00 call r3 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 80077d0: 78 01 08 01 mvhi r1,0x801 80077d4: 38 21 d6 50 ori r1,r1,0xd650 80077d8: 28 21 00 00 lw r1,(r1+0) 80077dc: b9 80 58 00 mv r11,r12 80077e0: 44 20 00 06 be r1,r0,80077f8 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 80077e4: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 80077e8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80077ec: d8 40 00 00 call r2 <== NOT EXECUTED 80077f0: e0 00 00 02 bi 80077f8 <== NOT EXECUTED 80077f4: 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; } 80077f8: b9 60 08 00 mv r1,r11 80077fc: 2b 9d 00 04 lw ra,(sp+4) 8007800: 2b 8b 00 10 lw r11,(sp+16) 8007804: 2b 8c 00 0c lw r12,(sp+12) 8007808: 2b 8d 00 08 lw r13,(sp+8) 800780c: 37 9c 00 10 addi sp,sp,16 8007810: c3 a0 00 00 ret 080076a8 : } void malloc_deferred_free( void *pointer ) { 80076a8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80076ac: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80076b0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80076b4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80076b8: 38 21 dd a4 ori r1,r1,0xdda4 <== NOT EXECUTED 80076bc: fb ff ec ef calli 8002a78 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 80076c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80076c4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80076c8: c3 a0 00 00 ret <== NOT EXECUTED 080076cc : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 80076cc: 37 9c ff f8 addi sp,sp,-8 80076d0: 5b 8b 00 08 sw (sp+8),r11 80076d4: 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 ); 80076d8: 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) 80076dc: e0 00 00 02 bi 80076e4 free(to_be_freed); 80076e0: fb ff fe 61 calli 8007064 <== NOT EXECUTED 80076e4: b9 60 08 00 mv r1,r11 80076e8: 38 21 dd a4 ori r1,r1,0xdda4 80076ec: f8 00 04 fb calli 8008ad8 <_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) 80076f0: 5c 20 ff fc bne r1,r0,80076e0 free(to_be_freed); } 80076f4: 2b 9d 00 04 lw ra,(sp+4) 80076f8: 2b 8b 00 08 lw r11,(sp+8) 80076fc: 37 9c 00 08 addi sp,sp,8 8007700: c3 a0 00 00 ret 08010814 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 8010814: 37 9c ff f8 addi sp,sp,-8 8010818: 5b 8b 00 08 sw (sp+8),r11 801081c: 5b 9d 00 04 sw (sp+4),ra 8010820: 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) ) { 8010824: fb ff f2 2a calli 800d0cc 8010828: 5c 20 00 10 bne r1,r0,8010868 801082c: 2d 62 00 34 lhu r2,(r11+52) 8010830: 5c 41 00 0e bne r2,r1,8010868 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 8010834: 78 01 08 02 mvhi r1,0x802 8010838: 38 21 50 f8 ori r1,r1,0x50f8 801083c: 28 21 00 00 lw r1,(r1+0) 8010840: 28 23 00 04 lw r3,(r1+4) 8010844: 5c 6b 00 02 bne r3,r11,801084c rtems_filesystem_current.node_access = NULL; 8010848: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 801084c: 29 62 00 4c lw r2,(r11+76) 8010850: 34 01 00 06 mvi r1,6 8010854: 44 41 00 03 be r2,r1,8010860 IMFS_memfile_remove( the_jnode ); 8010858: b9 60 08 00 mv r1,r11 801085c: fb ff ff 7f calli 8010658 free( the_jnode ); 8010860: b9 60 08 00 mv r1,r11 8010864: fb ff c8 49 calli 8002988 } return 0; } 8010868: 34 01 00 00 mvi r1,0 801086c: 2b 9d 00 04 lw ra,(sp+4) 8010870: 2b 8b 00 08 lw r11,(sp+8) 8010874: 37 9c 00 08 addi sp,sp,8 8010878: c3 a0 00 00 ret 0801055c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 801055c: 37 9c ff e8 addi sp,sp,-24 8010560: 5b 8b 00 18 sw (sp+24),r11 8010564: 5b 8c 00 14 sw (sp+20),r12 8010568: 5b 8d 00 10 sw (sp+16),r13 801056c: 5b 8e 00 0c sw (sp+12),r14 8010570: 5b 8f 00 08 sw (sp+8),r15 8010574: 5b 9d 00 04 sw (sp+4),ra 8010578: b8 20 58 00 mv r11,r1 801057c: b8 40 78 00 mv r15,r2 /* * Perform internal consistency checks */ assert( block_table ); 8010580: 5c 20 00 09 bne r1,r0,80105a4 8010584: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010588: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801058c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010590: 38 21 35 cc ori r1,r1,0x35cc <== NOT EXECUTED 8010594: 38 63 37 40 ori r3,r3,0x3740 <== NOT EXECUTED 8010598: 38 84 36 44 ori r4,r4,0x3644 <== NOT EXECUTED 801059c: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED 80105a0: fb ff f2 0e calli 800cdd8 <__assert_func> <== NOT EXECUTED 80105a4: 34 0c 00 00 mvi r12,0 80105a8: 28 2d 00 00 lw r13,(r1+0) */ b = *block_table; for ( i=0 ; i if ( b[i] ) { 80105b4: 29 a1 00 00 lw r1,(r13+0) 80105b8: 44 20 00 03 be r1,r0,80105c4 memfile_free_block( b[i] ); 80105bc: fb ff ff 1b calli 8010228 b[i] = 0; 80105c0: 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 ); 80105d0: 29 61 00 00 lw r1,(r11+0) 80105d4: fb ff ff 15 calli 8010228 *block_table = 0; 80105d8: 34 01 00 00 mvi r1,0 80105dc: 59 61 00 00 sw (r11+0),r1 } 80105e0: 2b 9d 00 04 lw ra,(sp+4) 80105e4: 2b 8b 00 18 lw r11,(sp+24) 80105e8: 2b 8c 00 14 lw r12,(sp+20) 80105ec: 2b 8d 00 10 lw r13,(sp+16) 80105f0: 2b 8e 00 0c lw r14,(sp+12) 80105f4: 2b 8f 00 08 lw r15,(sp+8) 80105f8: 37 9c 00 18 addi sp,sp,24 80105fc: c3 a0 00 00 ret 08010b68 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 8010b68: 37 9c ff f0 addi sp,sp,-16 8010b6c: 5b 8b 00 08 sw (sp+8),r11 8010b70: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010b74: 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 ) 8010b78: 29 64 00 50 lw r4,(r11+80) 8010b7c: 48 44 00 05 bg r2,r4,8010b90 8010b80: 5c 82 00 08 bne r4,r2,8010ba0 8010b84: 29 64 00 54 lw r4,(r11+84) 8010b88: 54 64 00 02 bgu r3,r4,8010b90 8010b8c: e0 00 00 05 bi 8010ba0 return IMFS_memfile_extend( the_jnode, length ); 8010b90: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010b94: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010b98: fb ff ff 8a calli 80109c0 <== NOT EXECUTED 8010b9c: e0 00 00 0b bi 8010bc8 <== 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; 8010ba0: 59 62 00 50 sw (r11+80),r2 8010ba4: 59 63 00 54 sw (r11+84),r3 iop->size = the_jnode->info.file.size; 8010ba8: 58 22 00 08 sw (r1+8),r2 8010bac: 58 23 00 0c sw (r1+12),r3 IMFS_update_atime( the_jnode ); 8010bb0: 34 02 00 00 mvi r2,0 8010bb4: 37 81 00 0c addi r1,sp,12 8010bb8: fb ff c7 a2 calli 8002a40 8010bbc: 2b 81 00 0c lw r1,(sp+12) 8010bc0: 59 61 00 40 sw (r11+64),r1 8010bc4: 34 01 00 00 mvi r1,0 return 0; } 8010bc8: 2b 9d 00 04 lw ra,(sp+4) 8010bcc: 2b 8b 00 08 lw r11,(sp+8) 8010bd0: 37 9c 00 10 addi sp,sp,16 8010bd4: c3 a0 00 00 ret 08010bd8 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8010bd8: 37 9c ff f4 addi sp,sp,-12 8010bdc: 5b 8b 00 0c sw (sp+12),r11 8010be0: 5b 8c 00 08 sw (sp+8),r12 8010be4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010be8: 28 2c 00 3c lw r12,(r1+60) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8010bec: b8 20 58 00 mv r11,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 8010bf0: 34 01 00 06 mvi r1,6 8010bf4: 29 82 00 4c lw r2,(r12+76) 8010bf8: 5c 41 00 0c bne r2,r1,8010c28 if (iop->offset > the_jnode->info.linearfile.size) 8010bfc: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8010c00: 29 63 00 10 lw r3,(r11+16) <== NOT EXECUTED 8010c04: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED 8010c08: 48 61 00 05 bg r3,r1,8010c1c <== NOT EXECUTED 8010c0c: 5c 61 00 15 bne r3,r1,8010c60 <== NOT EXECUTED 8010c10: 29 63 00 14 lw r3,(r11+20) <== NOT EXECUTED 8010c14: 54 62 00 02 bgu r3,r2,8010c1c <== NOT EXECUTED 8010c18: e0 00 00 12 bi 8010c60 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 8010c1c: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED 8010c20: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8010c24: e0 00 00 0f bi 8010c60 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 8010c28: 29 62 00 14 lw r2,(r11+20) 8010c2c: b9 80 08 00 mv r1,r12 8010c30: fb ff ff 64 calli 80109c0 8010c34: 44 20 00 07 be r1,r0,8010c50 rtems_set_errno_and_return_minus_one( ENOSPC ); 8010c38: f8 00 08 5b calli 8012da4 <__errno> <== NOT EXECUTED 8010c3c: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010c40: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8010c44: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010c48: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010c4c: e0 00 00 07 bi 8010c68 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 8010c50: 29 81 00 50 lw r1,(r12+80) 8010c54: 59 61 00 08 sw (r11+8),r1 8010c58: 29 8c 00 54 lw r12,(r12+84) 8010c5c: 59 6c 00 0c sw (r11+12),r12 } return iop->offset; 8010c60: 29 62 00 14 lw r2,(r11+20) 8010c64: 29 63 00 10 lw r3,(r11+16) } 8010c68: b8 60 08 00 mv r1,r3 8010c6c: 2b 9d 00 04 lw ra,(sp+4) 8010c70: 2b 8b 00 0c lw r11,(sp+12) 8010c74: 2b 8c 00 08 lw r12,(sp+8) 8010c78: 37 9c 00 0c addi sp,sp,12 8010c7c: c3 a0 00 00 ret 08010f98 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8010f98: 37 9c ff f4 addi sp,sp,-12 8010f9c: 5b 8b 00 0c sw (sp+12),r11 8010fa0: 5b 8c 00 08 sw (sp+8),r12 8010fa4: 5b 9d 00 04 sw (sp+4),ra 8010fa8: 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)) 8010fac: 28 21 00 18 lw r1,(r1+24) 8010fb0: 34 02 00 00 mvi r2,0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8010fb4: 29 8b 00 3c lw r11,(r12+60) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 8010fb8: 20 21 02 04 andi r1,r1,0x204 8010fbc: 44 22 00 13 be r1,r2,8011008 && (the_jnode->type == IMFS_LINEAR_FILE)) { 8010fc0: 29 63 00 4c lw r3,(r11+76) 8010fc4: 34 01 00 06 mvi r1,6 8010fc8: 5c 61 00 10 bne r3,r1,8011008 uint32_t count = the_jnode->info.linearfile.size; 8010fcc: 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; 8010fd0: 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; 8010fd4: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 8010fd8: 59 61 00 4c sw (r11+76),r1 <== NOT EXECUTED the_jnode->info.file.size = 0; 8010fdc: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED 8010fe0: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 8010fe4: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 8010fe8: 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; 8010fec: 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) 8010ff0: 44 82 00 06 be r4,r2,8011008 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 8010ff4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010ff8: fb ff ff 22 calli 8010c80 <== NOT EXECUTED 8010ffc: 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) 8011000: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8011004: 44 43 00 0d be r2,r3,8011038 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 8011008: 29 81 00 18 lw r1,(r12+24) 801100c: 20 21 02 00 andi r1,r1,0x200 8011010: 44 20 00 05 be r1,r0,8011024 iop->offset = the_jnode->info.file.size; 8011014: 29 61 00 50 lw r1,(r11+80) 8011018: 59 81 00 10 sw (r12+16),r1 801101c: 29 61 00 54 lw r1,(r11+84) 8011020: 59 81 00 14 sw (r12+20),r1 iop->size = the_jnode->info.file.size; 8011024: 29 61 00 50 lw r1,(r11+80) 8011028: 59 81 00 08 sw (r12+8),r1 801102c: 29 6b 00 54 lw r11,(r11+84) 8011030: 34 01 00 00 mvi r1,0 8011034: 59 8b 00 0c sw (r12+12),r11 return 0; } 8011038: 2b 9d 00 04 lw ra,(sp+4) 801103c: 2b 8b 00 0c lw r11,(sp+12) 8011040: 2b 8c 00 08 lw r12,(sp+8) 8011044: 37 9c 00 0c addi sp,sp,12 8011048: 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 2d 99 calli 800c760 <__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 d1 10 ori r5,r5,0xd110 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 30 30 calli 800d1f8 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 d1 10 ori r5,r5,0xd110 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 30 27 calli 800d1f8 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 2d 7d calli 800c760 <__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 2d 38 calli 800c760 <__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 2d 33 calli 800c760 <__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 31 fb calli 800daa0 <== NOT EXECUTED 80012b8: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); 80012bc: f8 00 19 12 calli 8007704 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 2d 25 calli 800c760 <__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 31 c8 calli 800da18 <== 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 31 e5 calli 800daa0 * 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 2d 08 calli 800c760 <__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 2d 01 calli 800c760 <__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 d7 58 ori r3,r3,0xd758 */ 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 2c f2 calli 800c760 <__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 2c ef calli 800c760 <__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 d7 58 ori r1,r1,0xd758 8001424: f8 00 05 95 calli 8002a78 <_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 17 08 calli 8007064 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 2d a2 calli 800cbf0 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 b7 calli 8007064 <== 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 2c d0 calli 800c8e8 <== 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 27 20 ori r4,r4,0x2720 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 fa dc ori r1,r1,0xfadc 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 f2 calli 8003848 <== NOT EXECUTED NULL_major = major; 8001884: 78 03 08 02 mvhi r3,0x802 8001888: 38 63 27 c4 ori r3,r3,0x27c4 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 29 calli 8007528 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 30 82 calli 800daa0 /* * 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 2b a8 calli 800c760 <__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 2b 9a calli 800c760 <__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 30 65 calli 800daa0 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 29 calli 800760c 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 2e 1e calli 800d1f8 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 2b 6c calli 800c760 <__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 d7 18 ori r1,r1,0xd718 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 63 44 calli 801a6f4 <__mulsi3> 80019e8: b9 80 10 00 mv r2,r12 80019ec: f8 00 15 cc calli 800711c 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 2b 5a calli 800c760 <__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 2b 57 calli 800c760 <__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 d7 18 ori r1,r1,0xd718 <== 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 63 32 calli 801a6f4 <__mulsi3> <== NOT EXECUTED 8001a30: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8001a34: f8 00 15 53 calli 8006f80 <== 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 9a calli 80074b0 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 2b 3e calli 800c760 <__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 d7 18 ori r1,r1,0xd718 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 63 17 calli 801a6f4 <__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 bb 30 ori r1,r1,0xbb30 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 bb 30 ori r1,r1,0xbb30 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 bb 30 ori r1,r1,0xbb30 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 98 calli 8002660 <== 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 2c 14 ori r1,r1,0x2c14 <== 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 2c 18 ori r1,r1,0x2c18 <== 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 53 0c ori r2,r2,0x530c <== 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 53 0c ori r1,r1,0x530c <== 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 0800bb9c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 800bb9c: 37 9c ff cc addi sp,sp,-52 800bba0: 5b 8b 00 10 sw (sp+16),r11 800bba4: 5b 8c 00 0c sw (sp+12),r12 800bba8: 5b 8d 00 08 sw (sp+8),r13 800bbac: 5b 9d 00 04 sw (sp+4),ra 800bbb0: 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) 800bbb4: 37 8b 00 14 addi r11,sp,20 800bbb8: 78 01 08 01 mvhi r1,0x801 800bbbc: 38 21 c2 78 ori r1,r1,0xc278 800bbc0: 34 02 00 03 mvi r2,3 800bbc4: 34 03 00 07 mvi r3,7 800bbc8: b9 60 20 00 mv r4,r11 800bbcc: 34 05 00 01 mvi r5,1 800bbd0: fb ff d4 85 calli 8000de4 800bbd4: 44 20 00 0b be r1,r0,800bc00 != 0) { if (errno != ENOENT) 800bbd8: f8 00 02 e2 calli 800c760 <__errno> 800bbdc: 28 22 00 00 lw r2,(r1+0) 800bbe0: 34 01 00 02 mvi r1,2 800bbe4: 5c 41 00 50 bne r2,r1,800bd24 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 800bbe8: 78 01 08 01 mvhi r1,0x801 800bbec: 38 21 c2 78 ori r1,r1,0xc278 800bbf0: 34 02 03 ff mvi r2,1023 800bbf4: fb ff d5 2b calli 80010a0 800bbf8: 44 20 00 08 be r1,r0,800bc18 800bbfc: e0 00 00 4a bi 800bd24 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 800bc00: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED 800bc04: 44 41 00 05 be r2,r1,800bc18 <== NOT EXECUTED 800bc08: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800bc0c: 44 40 00 03 be r2,r0,800bc18 <== NOT EXECUTED 800bc10: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800bc14: d8 40 00 00 call r2 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800bc18: 37 8b 00 28 addi r11,sp,40 800bc1c: 78 02 08 01 mvhi r2,0x801 800bc20: 38 42 c2 80 ori r2,r2,0xc280 800bc24: 34 03 00 0a mvi r3,10 800bc28: b9 60 08 00 mv r1,r11 800bc2c: f8 00 05 73 calli 800d1f8 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800bc30: 78 04 08 01 mvhi r4,0x801 800bc34: 38 84 d6 aa ori r4,r4,0xd6aa 800bc38: 2c 81 00 00 lhu r1,(r4+0) 800bc3c: 78 02 08 01 mvhi r2,0x801 800bc40: 38 42 c2 8c ori r2,r2,0xc28c 800bc44: 34 25 00 01 addi r5,r1,1 800bc48: b8 20 18 00 mv r3,r1 800bc4c: 0c 85 00 00 sh (r4+0),r5 800bc50: 37 81 00 32 addi r1,sp,50 800bc54: f8 00 06 69 calli 800d5f8 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 800bc58: b9 60 08 00 mv r1,r11 800bc5c: 34 02 01 80 mvi r2,384 800bc60: f8 00 00 52 calli 800bda8 800bc64: b8 20 60 00 mv r12,r1 800bc68: 44 20 00 03 be r1,r0,800bc74 if (errno != EEXIST){ 800bc6c: f8 00 02 bd calli 800c760 <__errno> <== NOT EXECUTED 800bc70: e0 00 00 2d bi 800bd24 <== 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); 800bc74: b9 60 08 00 mv r1,r11 800bc78: 34 02 40 00 mvi r2,16384 800bc7c: fb ff d6 e6 calli 8001814 800bc80: 59 a1 00 00 sw (r13+0),r1 if (filsdes[0] < 0) { 800bc84: 4c 2c 00 05 bge r1,r12,800bc98 err = errno; 800bc88: f8 00 02 b6 calli 800c760 <__errno> 800bc8c: 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); 800bc90: b9 60 08 00 mv r1,r11 800bc94: e0 00 00 21 bi 800bd18 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800bc98: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800bc9c: 38 42 d0 10 ori r2,r2,0xd010 <== NOT EXECUTED 800bca0: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 800bca4: 54 41 00 03 bgu r2,r1,800bcb0 <== NOT EXECUTED 800bca8: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800bcac: e0 00 00 0b bi 800bcd8 <== NOT EXECUTED 800bcb0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800bcb4: fb ff d1 4f calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800bcb8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800bcbc: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 800bcc0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800bcc4: 39 6b d7 18 ori r11,r11,0xd718 <== NOT EXECUTED 800bcc8: fb ff d1 4a calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800bccc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800bcd0: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800bcd4: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800bcd8: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 800bcdc: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800bce0: 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; 800bce4: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 800bce8: 58 43 00 18 sw (r2+24),r3 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800bcec: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800bcf0: fb ff d6 c9 calli 8001814 <== NOT EXECUTED 800bcf4: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED if (filsdes[1] < 0) { 800bcf8: 48 01 00 03 bg r0,r1,800bd04 <== NOT EXECUTED 800bcfc: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800bd00: e0 00 00 05 bi 800bd14 <== NOT EXECUTED err = errno; 800bd04: f8 00 02 97 calli 800c760 <__errno> <== NOT EXECUTED 800bd08: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED close(filsdes[0]); 800bd0c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800bd10: fb ff ec 9c calli 8006f80 <== NOT EXECUTED } unlink(fifopath); 800bd14: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 800bd18: f8 00 00 2d calli 800bdcc } rtems_set_errno_and_return_minus_one(err); 800bd1c: f8 00 02 91 calli 800c760 <__errno> 800bd20: 58 2c 00 00 sw (r1+0),r12 } 800bd24: 34 01 ff ff mvi r1,-1 800bd28: 2b 9d 00 04 lw ra,(sp+4) 800bd2c: 2b 8b 00 10 lw r11,(sp+16) 800bd30: 2b 8c 00 0c lw r12,(sp+12) 800bd34: 2b 8d 00 08 lw r13,(sp+8) 800bd38: 37 9c 00 34 addi sp,sp,52 800bd3c: c3 a0 00 00 ret 0800a31c : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 800a31c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800a320: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800a324: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800a328: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 800a32c: 28 21 00 2c lw r1,(r1+44) <== NOT EXECUTED 800a330: f8 00 03 e6 calli 800b2c8 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800a334: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a338: f8 00 03 e4 calli 800b2c8 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800a33c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a340: fb ff f8 23 calli 80083cc <== NOT EXECUTED free(pipe->Buffer); 800a344: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a348: fb ff f3 47 calli 8007064 <== NOT EXECUTED free(pipe); 800a34c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a350: fb ff f3 45 calli 8007064 <== NOT EXECUTED } 800a354: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a358: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800a35c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800a360: c3 a0 00 00 ret <== NOT EXECUTED 08009f10 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 8009f10: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8009f14: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8009f18: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8009f1c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8009f20: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (cmd == FIONREAD) { 8009f24: 78 05 40 04 mvhi r5,0x4004 <== NOT EXECUTED 8009f28: 38 a5 66 7f ori r5,r5,0x667f <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 8009f2c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8009f30: b8 60 68 00 mv r13,r3 <== NOT EXECUTED if (cmd == FIONREAD) { 8009f34: 34 04 ff ea mvi r4,-22 <== NOT EXECUTED 8009f38: 5c 45 00 0f bne r2,r5,8009f74 <== NOT EXECUTED if (buffer == NULL) 8009f3c: 34 04 ff f2 mvi r4,-14 <== NOT EXECUTED 8009f40: 44 60 00 0d be r3,r0,8009f74 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 8009f44: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 8009f48: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009f4c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009f50: fb ff f9 5b calli 80084bc <== NOT EXECUTED 8009f54: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8009f58: 34 04 ff fc mvi r4,-4 <== NOT EXECUTED 8009f5c: 5c 20 00 06 bne r1,r0,8009f74 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 8009f60: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8009f64: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 8009f68: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009f6c: fb ff f9 a4 calli 80085fc <== NOT EXECUTED 8009f70: b9 80 20 00 mv r4,r12 <== NOT EXECUTED return 0; } return -EINVAL; } 8009f74: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 8009f78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009f7c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8009f80: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8009f84: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8009f88: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8009f8c: c3 a0 00 00 ret <== NOT EXECUTED 08009e9c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 8009e9c: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED 8009ea0: c3 a0 00 00 ret <== NOT EXECUTED 08009f90 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009f90: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009f94: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8009f98: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8009f9c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8009fa0: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8009fa4: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8009fa8: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8009fac: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8009fb0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8009fb4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009fb8: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009fbc: b8 40 88 00 mv r17,r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009fc0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009fc4: b8 60 80 00 mv r16,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009fc8: b8 40 18 00 mv r3,r2 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 8009fcc: b8 80 78 00 mv r15,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 8009fd0: fb ff f9 3b calli 80084bc <== NOT EXECUTED 8009fd4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8009fd8: 44 20 00 46 be r1,r0,800a0f0 <== NOT EXECUTED 8009fdc: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 8009fe0: e0 00 00 4a bi 800a108 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 8009fe4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8009fe8: 44 2d 00 43 be r1,r13,800a0f4 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 8009fec: 29 ee 00 18 lw r14,(r15+24) <== NOT EXECUTED 8009ff0: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED 8009ff4: 45 c0 00 03 be r14,r0,800a000 <== NOT EXECUTED 8009ff8: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 8009ffc: e0 00 00 3f bi 800a0f8 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800a000: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a004: 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 ++; 800a008: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 800a00c: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a010: fb ff f9 7b calli 80085fc <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800a014: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a018: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 800a01c: f8 00 04 ea calli 800b3c4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a020: 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)) 800a024: b8 20 68 00 mv r13,r1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a028: 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)) 800a02c: 44 2e 00 02 be r1,r14,800a034 <== NOT EXECUTED 800a030: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a034: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a038: fb ff f9 21 calli 80084bc <== NOT EXECUTED 800a03c: 44 20 00 03 be r1,r0,800a048 <== NOT EXECUTED 800a040: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 800a044: e0 00 00 2f bi 800a100 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 800a048: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED 800a04c: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 800a050: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED if (ret != 0) 800a054: 5d a1 00 29 bne r13,r1,800a0f8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 800a058: 29 6d 00 0c lw r13,(r11+12) <== NOT EXECUTED 800a05c: 45 a0 ff e2 be r13,r0,8009fe4 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 800a060: ca 0c 08 00 sub r1,r16,r12 <== NOT EXECUTED 800a064: 50 2d 00 02 bgeu r1,r13,800a06c <== NOT EXECUTED 800a068: b8 20 68 00 mv r13,r1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 800a06c: 29 65 00 08 lw r5,(r11+8) <== NOT EXECUTED 800a070: 29 6e 00 04 lw r14,(r11+4) <== NOT EXECUTED 800a074: 29 66 00 00 lw r6,(r11+0) <== NOT EXECUTED 800a078: b6 2c 08 00 add r1,r17,r12 <== NOT EXECUTED 800a07c: 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); 800a080: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 800a084: 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) { 800a088: 4d cd 00 08 bge r14,r13,800a0a8 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 800a08c: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 800a090: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 800a094: f8 00 0c 59 calli 800d1f8 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 800a098: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800a09c: b5 8e 08 00 add r1,r12,r14 <== NOT EXECUTED 800a0a0: b6 21 08 00 add r1,r17,r1 <== NOT EXECUTED 800a0a4: c9 ae 18 00 sub r3,r13,r14 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 800a0a8: f8 00 0c 54 calli 800d1f8 <== NOT EXECUTED pipe->Start += chunk; 800a0ac: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED pipe->Start %= pipe->Size; 800a0b0: 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; 800a0b4: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 800a0b8: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Start %= pipe->Size; 800a0bc: f8 00 42 1d calli 801a930 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; 800a0c0: 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; 800a0c4: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Length -= chunk; 800a0c8: c8 4d 08 00 sub r1,r2,r13 <== NOT EXECUTED 800a0cc: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 800a0d0: 5c 20 00 02 bne r1,r0,800a0d8 <== NOT EXECUTED pipe->Start = 0; 800a0d4: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED if (pipe->waitingWriters > 0) 800a0d8: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 800a0dc: 44 20 00 04 be r1,r0,800a0ec <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 800a0e0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a0e4: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 800a0e8: f8 00 04 98 calli 800b348 <== NOT EXECUTED read += chunk; 800a0ec: 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) { 800a0f0: 56 0c ff da bgu r16,r12,800a058 <== NOT EXECUTED 800a0f4: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 800a0f8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a0fc: fb ff f9 40 calli 80085fc <== NOT EXECUTED out_nolock: if (read > 0) 800a100: 49 80 00 02 bg r12,r0,800a108 <== NOT EXECUTED 800a104: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED return read; return ret; } 800a108: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800a10c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a110: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 800a114: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 800a118: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 800a11c: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 800a120: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 800a124: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 800a128: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 800a12c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800a130: c3 a0 00 00 ret <== NOT EXECUTED 0800a364 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a364: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 800a368: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 800a36c: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 800a370: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 800a374: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 800a378: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED pipe_control_t *pipe = *pipep; 800a37c: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800a380: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800a384: 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, 800a388: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a38c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a390: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a394: fb ff f8 4a calli 80084bc <== NOT EXECUTED 800a398: b8 20 18 00 mv r3,r1 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 800a39c: 5c 20 00 15 bne r1,r0,800a3f0 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800a3a0: 29 8c 00 18 lw r12,(r12+24) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800a3a4: 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); 800a3a8: 21 8c 00 06 andi r12,r12,0x6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800a3ac: 44 23 00 04 be r1,r3,800a3bc <== NOT EXECUTED pipe->Readers --; 800a3b0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a3b4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a3b8: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 800a3bc: 21 81 00 04 andi r1,r12,0x4 <== NOT EXECUTED 800a3c0: 44 20 00 04 be r1,r0,800a3d0 <== NOT EXECUTED pipe->Writers --; 800a3c4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a3c8: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a3cc: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 800a3d0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800a3d4: 38 42 d6 a4 ori r2,r2,0xd6a4 <== NOT EXECUTED 800a3d8: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 800a3dc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a3e0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a3e4: fb ff f8 36 calli 80084bc <== NOT EXECUTED 800a3e8: 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) 800a3ec: 44 20 00 02 be r1,r0,800a3f4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 800a3f0: fb ff e0 9c calli 8002660 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a3f4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a3f8: fb ff f8 81 calli 80085fc <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 800a3fc: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800a400: 5c 4e 00 07 bne r2,r14,800a41c <== NOT EXECUTED 800a404: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED 800a408: 5d c2 00 05 bne r14,r2,800a41c <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 800a40c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a410: fb ff ff c3 calli 800a31c <== NOT EXECUTED *pipep = NULL; 800a414: 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) { 800a418: e0 00 00 0f bi 800a454 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 800a41c: 64 42 00 00 cmpei r2,r2,0 <== NOT EXECUTED 800a420: 7d 81 00 04 cmpnei r1,r12,4 <== NOT EXECUTED 800a424: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 800a428: 44 40 00 03 be r2,r0,800a434 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 800a42c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a430: e0 00 00 07 bi 800a44c <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 800a434: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a438: 7d 8c 00 02 cmpnei r12,r12,2 <== NOT EXECUTED 800a43c: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED 800a440: a1 81 60 00 and r12,r12,r1 <== NOT EXECUTED 800a444: 45 82 00 04 be r12,r2,800a454 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a448: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a44c: 37 82 00 18 addi r2,sp,24 <== NOT EXECUTED 800a450: f8 00 03 be calli 800b348 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 800a454: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a458: 38 21 d6 a4 ori r1,r1,0xd6a4 <== NOT EXECUTED 800a45c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800a460: fb ff f8 67 calli 80085fc <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 800a464: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800a468: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a46c: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 800a470: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 800a474: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 800a478: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 800a47c: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED 800a480: c3 a0 00 00 ret <== NOT EXECUTED 0800a134 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 800a134: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 800a138: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 800a13c: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800a140: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 800a144: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 800a148: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 800a14c: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800a150: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 800a154: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 800a158: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800a15c: b8 60 70 00 mv r14,r3 <== NOT EXECUTED 800a160: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800a164: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 800a168: b8 80 90 00 mv r18,r4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 800a16c: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 800a170: 44 60 00 5f be r3,r0,800a2ec <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 800a174: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 800a178: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a17c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a180: fb ff f8 cf calli 80084bc <== NOT EXECUTED 800a184: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a188: 5c 20 00 59 bne r1,r0,800a2ec <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 800a18c: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800a190: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 800a194: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 800a198: 44 41 00 4c be r2,r1,800a2c8 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 800a19c: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 800a1a0: b9 c0 80 00 mv r16,r14 <== NOT EXECUTED 800a1a4: 50 2e 00 02 bgeu r1,r14,800a1ac <== NOT EXECUTED 800a1a8: 34 10 00 01 mvi r16,1 <== NOT EXECUTED 800a1ac: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800a1b0: e0 00 00 44 bi 800a2c0 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 800a1b4: 2a 4f 00 18 lw r15,(r18+24) <== NOT EXECUTED 800a1b8: 21 ef 00 01 andi r15,r15,0x1 <== NOT EXECUTED 800a1bc: 45 e0 00 03 be r15,r0,800a1c8 <== NOT EXECUTED 800a1c0: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 800a1c4: e0 00 00 41 bi 800a2c8 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 800a1c8: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a1cc: 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 ++; 800a1d0: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 800a1d4: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800a1d8: fb ff f9 09 calli 80085fc <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 800a1dc: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a1e0: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a1e4: f8 00 04 78 calli 800b3c4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a1e8: 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)) 800a1ec: b8 20 68 00 mv r13,r1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a1f0: 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)) 800a1f4: 44 2f 00 02 be r1,r15,800a1fc <== NOT EXECUTED 800a1f8: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800a1fc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a200: fb ff f8 af calli 80084bc <== NOT EXECUTED 800a204: 44 20 00 03 be r1,r0,800a210 <== NOT EXECUTED 800a208: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 800a20c: e0 00 00 36 bi 800a2e4 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 800a210: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED 800a214: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 800a218: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED if (ret != 0) 800a21c: 5d a1 00 2b bne r13,r1,800a2c8 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 800a220: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a224: 5c 2d 00 03 bne r1,r13,800a230 <== NOT EXECUTED 800a228: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 800a22c: e0 00 00 27 bi 800a2c8 <== 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) { 800a230: 29 6f 00 04 lw r15,(r11+4) <== NOT EXECUTED 800a234: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 800a238: c9 e1 68 00 sub r13,r15,r1 <== NOT EXECUTED 800a23c: 56 0d ff de bgu r16,r13,800a1b4 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 800a240: c9 cc 10 00 sub r2,r14,r12 <== NOT EXECUTED 800a244: 50 4d 00 02 bgeu r2,r13,800a24c <== NOT EXECUTED 800a248: b8 40 68 00 mv r13,r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 800a24c: 29 63 00 08 lw r3,(r11+8) <== NOT EXECUTED 800a250: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a254: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 800a258: f8 00 41 b6 calli 801a930 <__umodsi3> <== NOT EXECUTED 800a25c: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED 800a260: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 800a264: b6 2c 10 00 add r2,r17,r12 <== NOT EXECUTED if (chunk > chunk1) { 800a268: 4d ed 00 09 bge r15,r13,800a28c <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 800a26c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800a270: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 800a274: f8 00 0b e1 calli 800d1f8 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 800a278: b5 ec 10 00 add r2,r15,r12 <== NOT EXECUTED 800a27c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a280: b6 22 10 00 add r2,r17,r2 <== NOT EXECUTED 800a284: c9 af 18 00 sub r3,r13,r15 <== NOT EXECUTED 800a288: e0 00 00 03 bi 800a294 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 800a28c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800a290: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 800a294: f8 00 0b d9 calli 800d1f8 <== NOT EXECUTED pipe->Length += chunk; 800a298: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 800a29c: 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; 800a2a0: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 800a2a4: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED if (pipe->waitingReaders > 0) 800a2a8: 44 40 00 04 be r2,r0,800a2b8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800a2ac: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a2b0: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a2b4: f8 00 04 25 calli 800b348 <== NOT EXECUTED written += chunk; 800a2b8: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED 800a2bc: 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) { 800a2c0: 55 cc ff dc bgu r14,r12,800a230 <== NOT EXECUTED 800a2c4: 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); 800a2c8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a2cc: fb ff f8 cc calli 80085fc <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 800a2d0: 34 01 ff e0 mvi r1,-32 <== NOT EXECUTED 800a2d4: 5d a1 00 04 bne r13,r1,800a2e4 <== NOT EXECUTED kill(getpid(), SIGPIPE); 800a2d8: f8 00 02 56 calli 800ac30 <== NOT EXECUTED 800a2dc: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 800a2e0: f8 00 02 fc calli 800aed0 <== NOT EXECUTED #endif if (written > 0) 800a2e4: 49 80 00 02 bg r12,r0,800a2ec <== NOT EXECUTED 800a2e8: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED return written; return ret; } 800a2ec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800a2f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a2f4: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800a2f8: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 800a2fc: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 800a300: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 800a304: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800a308: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 800a30c: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 800a310: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 800a314: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 800a318: c3 a0 00 00 ret <== NOT EXECUTED 0800b1ac : void pthread_exit( void *value_ptr ) { 800b1ac: 37 9c ff fc addi sp,sp,-4 800b1b0: 5b 9d 00 04 sw (sp+4),ra _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800b1b4: 78 03 08 01 mvhi r3,0x801 800b1b8: 38 63 d9 60 ori r3,r3,0xd960 } void pthread_exit( void *value_ptr ) { 800b1bc: b8 20 10 00 mv r2,r1 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800b1c0: 28 61 00 00 lw r1,(r3+0) 800b1c4: fb ff ff d4 calli 800b114 <_POSIX_Thread_Exit> } 800b1c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800b1cc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800b1d0: c3 a0 00 00 ret <== NOT EXECUTED 0801ae88 : ssize_t read( int fd, void *buffer, size_t count ) { 801ae88: 37 9c ff e8 addi sp,sp,-24 801ae8c: 5b 8b 00 14 sw (sp+20),r11 801ae90: 5b 8c 00 10 sw (sp+16),r12 801ae94: 5b 8d 00 0c sw (sp+12),r13 801ae98: 5b 8e 00 08 sw (sp+8),r14 801ae9c: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801aea0: 78 04 08 01 mvhi r4,0x801 801aea4: 38 84 d0 10 ori r4,r4,0xd010 801aea8: 28 84 00 00 lw r4,(r4+0) ssize_t read( int fd, void *buffer, size_t count ) { 801aeac: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801aeb0: 54 81 00 02 bgu r4,r1,801aeb8 801aeb4: e0 00 00 10 bi 801aef4 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 801aeb8: 34 02 00 03 mvi r2,3 801aebc: 5b 83 00 18 sw (sp+24),r3 801aec0: 78 0b 08 01 mvhi r11,0x801 801aec4: fb ff 94 cb calli 80001f0 <__ashlsi3> 801aec8: 34 02 00 03 mvi r2,3 801aecc: 39 6b d7 18 ori r11,r11,0xd718 801aed0: b8 20 70 00 mv r14,r1 801aed4: fb ff 94 c7 calli 80001f0 <__ashlsi3> 801aed8: 29 6c 00 00 lw r12,(r11+0) 801aedc: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801aee0: 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 ); 801aee4: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 801aee8: 29 81 00 18 lw r1,(r12+24) 801aeec: 20 22 01 00 andi r2,r1,0x100 801aef0: 5c 40 00 04 bne r2,r0,801af00 801aef4: fb ff c6 1b calli 800c760 <__errno> 801aef8: 34 02 00 09 mvi r2,9 801aefc: e0 00 00 0e bi 801af34 rtems_libio_check_buffer( buffer ); 801af00: 45 a0 00 05 be r13,r0,801af14 rtems_libio_check_count( count ); 801af04: b8 60 58 00 mv r11,r3 801af08: 44 60 00 1d be r3,r0,801af7c rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801af0c: 20 21 00 02 andi r1,r1,0x2 801af10: 5c 20 00 04 bne r1,r0,801af20 801af14: fb ff c6 13 calli 800c760 <__errno> <== NOT EXECUTED 801af18: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801af1c: e0 00 00 06 bi 801af34 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 801af20: 29 81 00 40 lw r1,(r12+64) 801af24: 28 24 00 08 lw r4,(r1+8) 801af28: 5c 80 00 06 bne r4,r0,801af40 rtems_set_errno_and_return_minus_one( ENOTSUP ); 801af2c: fb ff c6 0d calli 800c760 <__errno> <== NOT EXECUTED 801af30: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801af34: 58 22 00 00 sw (r1+0),r2 801af38: 34 0b ff ff mvi r11,-1 801af3c: e0 00 00 10 bi 801af7c rc = (*iop->handlers->read_h)( iop, buffer, count ); 801af40: b9 a0 10 00 mv r2,r13 801af44: b9 80 08 00 mv r1,r12 801af48: d8 80 00 00 call r4 801af4c: b8 20 58 00 mv r11,r1 if ( rc > 0 ) 801af50: 4c 01 00 0b bge r0,r1,801af7c iop->offset += rc; 801af54: 34 02 00 1f mvi r2,31 801af58: fb ff 94 f6 calli 8000330 <__ashrsi3> 801af5c: 29 82 00 14 lw r2,(r12+20) 801af60: 29 84 00 10 lw r4,(r12+16) 801af64: b5 62 10 00 add r2,r11,r2 801af68: f5 62 18 00 cmpgu r3,r11,r2 801af6c: b4 24 08 00 add r1,r1,r4 801af70: b4 61 08 00 add r1,r3,r1 801af74: 59 82 00 14 sw (r12+20),r2 801af78: 59 81 00 10 sw (r12+16),r1 return rc; } 801af7c: b9 60 08 00 mv r1,r11 801af80: 2b 9d 00 04 lw ra,(sp+4) 801af84: 2b 8b 00 14 lw r11,(sp+20) 801af88: 2b 8c 00 10 lw r12,(sp+16) 801af8c: 2b 8d 00 0c lw r13,(sp+12) 801af90: 2b 8e 00 08 lw r14,(sp+8) 801af94: 37 9c 00 18 addi sp,sp,24 801af98: c3 a0 00 00 ret 08028a10 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 8028a10: 37 9c ff d8 addi sp,sp,-40 8028a14: 5b 8b 00 14 sw (sp+20),r11 8028a18: 5b 8c 00 10 sw (sp+16),r12 8028a1c: 5b 8d 00 0c sw (sp+12),r13 8028a20: 5b 8e 00 08 sw (sp+8),r14 8028a24: 5b 9d 00 04 sw (sp+4),ra 8028a28: b8 40 68 00 mv r13,r2 8028a2c: b8 60 70 00 mv r14,r3 8028a30: b8 20 60 00 mv r12,r1 rtems_filesystem_location_info_t loc; int result; if (!buf) 8028a34: 5c 40 00 04 bne r2,r0,8028a44 rtems_set_errno_and_return_minus_one( EFAULT ); 8028a38: f8 00 6d d2 calli 8044180 <__errno> <== NOT EXECUTED 8028a3c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8028a40: e0 00 00 14 bi 8028a90 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 8028a44: f8 00 8b cf calli 804b980 8028a48: 34 03 00 00 mvi r3,0 8028a4c: 37 8b 00 18 addi r11,sp,24 8028a50: b8 20 10 00 mv r2,r1 8028a54: b9 60 20 00 mv r4,r11 8028a58: b9 80 08 00 mv r1,r12 8028a5c: b8 60 28 00 mv r5,r3 8028a60: fb ff 7a 9e calli 80074d8 0, &loc, false ); if ( result != 0 ) 8028a64: 34 0c ff ff mvi r12,-1 8028a68: 5c 20 00 2a bne r1,r0,8028b10 return -1; if ( !loc.ops->node_type_h ){ 8028a6c: 2b 82 00 24 lw r2,(sp+36) 8028a70: 28 44 00 10 lw r4,(r2+16) 8028a74: 5c 81 00 0a bne r4,r1,8028a9c rtems_filesystem_freenode( &loc ); 8028a78: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028a7c: 44 44 00 03 be r2,r4,8028a88 <== NOT EXECUTED 8028a80: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028a84: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028a88: f8 00 6d be calli 8044180 <__errno> <== NOT EXECUTED 8028a8c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028a90: 58 22 00 00 sw (r1+0),r2 8028a94: 34 0c ff ff mvi r12,-1 8028a98: e0 00 00 1e bi 8028b10 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 8028a9c: b9 60 08 00 mv r1,r11 8028aa0: d8 80 00 00 call r4 8028aa4: 34 02 00 04 mvi r2,4 8028aa8: 2b 84 00 24 lw r4,(sp+36) 8028aac: 44 22 00 09 be r1,r2,8028ad0 rtems_filesystem_freenode( &loc ); 8028ab0: 44 80 00 05 be r4,r0,8028ac4 8028ab4: 28 82 00 1c lw r2,(r4+28) 8028ab8: 44 40 00 03 be r2,r0,8028ac4 8028abc: b9 60 08 00 mv r1,r11 8028ac0: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EINVAL ); 8028ac4: f8 00 6d af calli 8044180 <__errno> 8028ac8: 34 02 00 16 mvi r2,22 8028acc: e3 ff ff f1 bi 8028a90 } if ( !loc.ops->readlink_h ){ 8028ad0: 28 85 00 3c lw r5,(r4+60) 8028ad4: 5c a0 00 04 bne r5,r0,8028ae4 rtems_filesystem_freenode( &loc ); 8028ad8: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED 8028adc: 5c 45 ff e9 bne r2,r5,8028a80 <== NOT EXECUTED 8028ae0: e3 ff ff ea bi 8028a88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 8028ae4: b9 a0 10 00 mv r2,r13 8028ae8: b9 c0 18 00 mv r3,r14 8028aec: b9 60 08 00 mv r1,r11 8028af0: d8 a0 00 00 call r5 8028af4: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 8028af8: 2b 81 00 24 lw r1,(sp+36) 8028afc: 44 20 00 05 be r1,r0,8028b10 8028b00: 28 22 00 1c lw r2,(r1+28) 8028b04: 44 40 00 03 be r2,r0,8028b10 8028b08: b9 60 08 00 mv r1,r11 8028b0c: d8 40 00 00 call r2 return result; } 8028b10: b9 80 08 00 mv r1,r12 8028b14: 2b 9d 00 04 lw ra,(sp+4) 8028b18: 2b 8b 00 14 lw r11,(sp+20) 8028b1c: 2b 8c 00 10 lw r12,(sp+16) 8028b20: 2b 8d 00 0c lw r13,(sp+12) 8028b24: 2b 8e 00 08 lw r14,(sp+8) 8028b28: 37 9c 00 28 addi sp,sp,40 8028b2c: 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 20 10 ori r4,r4,0x2010 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 2e ec ori r11,r11,0x2eec 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 2f 75 calli 800f114 <__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 2f 67 calli 800f114 <__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 2f 59 calli 800f114 <__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 0801b03c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801b03c: 37 9c ff e8 addi sp,sp,-24 801b040: 5b 8b 00 14 sw (sp+20),r11 801b044: 5b 8c 00 10 sw (sp+16),r12 801b048: 5b 8d 00 0c sw (sp+12),r13 801b04c: 5b 8e 00 08 sw (sp+8),r14 801b050: 5b 9d 00 04 sw (sp+4),ra 801b054: 78 03 08 01 mvhi r3,0x801 801b058: 38 63 d7 28 ori r3,r3,0xd728 801b05c: 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())) { 801b060: 78 04 08 01 mvhi r4,0x801 801b064: 38 84 da 40 ori r4,r4,0xda40 801b068: 28 84 00 00 lw r4,(r4+0) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801b06c: 34 a5 00 01 addi r5,r5,1 801b070: b8 20 58 00 mv r11,r1 801b074: 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())) { 801b078: 34 01 00 03 mvi r1,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801b07c: 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())) { 801b080: 5c 81 00 09 bne r4,r1,801b0a4 if (_Thread_Dispatch_disable_level > 0) 801b084: 78 01 08 01 mvhi r1,0x801 801b088: 38 21 d8 a4 ori r1,r1,0xd8a4 801b08c: 28 22 00 00 lw r2,(r1+0) 801b090: 5c 40 00 36 bne r2,r0,801b168 return (void *) 0; if (_ISR_Nest_level > 0) 801b094: 78 01 08 01 mvhi r1,0x801 801b098: 38 21 d9 3c ori r1,r1,0xd93c 801b09c: 28 21 00 00 lw r1,(r1+0) 801b0a0: 5c 22 00 32 bne r1,r2,801b168 } /* * Continue with realloc(). */ if ( !ptr ) 801b0a4: 5d 60 00 05 bne r11,r0,801b0b8 return malloc( size ); 801b0a8: b9 80 08 00 mv r1,r12 801b0ac: fb ff b1 96 calli 8007704 801b0b0: b8 20 58 00 mv r11,r1 801b0b4: e0 00 00 2e bi 801b16c if ( !size ) { 801b0b8: 5d 80 00 05 bne r12,r0,801b0cc free( ptr ); 801b0bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 801b0c0: fb ff af e9 calli 8007064 <== NOT EXECUTED 801b0c4: b9 80 58 00 mv r11,r12 <== NOT EXECUTED return (void *) 0; 801b0c8: e0 00 00 29 bi 801b16c <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 801b0cc: 78 0d 08 01 mvhi r13,0x801 801b0d0: 39 ad d0 1c ori r13,r13,0xd01c 801b0d4: 29 a1 00 00 lw r1,(r13+0) 801b0d8: b9 60 10 00 mv r2,r11 801b0dc: 37 83 00 18 addi r3,sp,24 801b0e0: f8 00 00 70 calli 801b2a0 <_Protected_heap_Get_block_size> 801b0e4: b8 20 70 00 mv r14,r1 801b0e8: 5c 20 00 06 bne r1,r0,801b100 errno = EINVAL; 801b0ec: fb ff c5 9d calli 800c760 <__errno> 801b0f0: 34 02 00 16 mvi r2,22 801b0f4: 58 22 00 00 sw (r1+0),r2 801b0f8: b9 c0 58 00 mv r11,r14 return (void *) 0; 801b0fc: e0 00 00 1c bi 801b16c #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 ) ) { 801b100: 29 a1 00 00 lw r1,(r13+0) 801b104: b9 60 10 00 mv r2,r11 801b108: b9 80 18 00 mv r3,r12 801b10c: f8 00 00 7d calli 801b300 <_Protected_heap_Resize_block> 801b110: b8 20 70 00 mv r14,r1 801b114: 5c 20 00 16 bne r1,r0,801b16c * 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 ); 801b118: b9 80 08 00 mv r1,r12 801b11c: fb ff b1 7a calli 8007704 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 801b120: 78 02 08 01 mvhi r2,0x801 801b124: 38 42 d7 28 ori r2,r2,0xd728 * 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 ); 801b128: b8 20 68 00 mv r13,r1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 801b12c: 28 41 00 04 lw r1,(r2+4) 801b130: 34 21 ff ff addi r1,r1,-1 801b134: 58 41 00 04 sw (r2+4),r1 if ( !new_area ) { 801b138: 45 ae 00 0c be r13,r14,801b168 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 801b13c: 2b 81 00 18 lw r1,(sp+24) 801b140: b9 80 18 00 mv r3,r12 801b144: 50 2c 00 02 bgeu r1,r12,801b14c 801b148: b8 20 18 00 mv r3,r1 801b14c: b9 60 10 00 mv r2,r11 801b150: b9 a0 08 00 mv r1,r13 801b154: fb ff c8 29 calli 800d1f8 free( ptr ); 801b158: b9 60 08 00 mv r1,r11 801b15c: fb ff af c2 calli 8007064 801b160: b9 a0 58 00 mv r11,r13 return new_area; 801b164: e0 00 00 02 bi 801b16c 801b168: 34 0b 00 00 mvi r11,0 } 801b16c: b9 60 08 00 mv r1,r11 801b170: 2b 9d 00 04 lw ra,(sp+4) 801b174: 2b 8b 00 14 lw r11,(sp+20) 801b178: 2b 8c 00 10 lw r12,(sp+16) 801b17c: 2b 8d 00 0c lw r13,(sp+12) 801b180: 2b 8e 00 08 lw r14,(sp+8) 801b184: 37 9c 00 18 addi sp,sp,24 801b188: 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 d2 f0 ori r1,r1,0xd2f0 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 fb c1 calli 8047c08 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 d2 f0 ori r1,r1,0xd2f0 <== 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 fb b8 calli 8047c08 <== 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 fb a8 calli 8047c08 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 0b 03 calli 804b980 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 0a fd calli 804b980 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 ec d6 calli 8044180 <__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 ec c3 calli 8044180 <__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 080136dc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 80136dc: 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; } 80136e0: 38 21 a1 f0 ori r1,r1,0xa1f0 <== NOT EXECUTED 80136e4: c3 a0 00 00 ret <== NOT EXECUTED 0800f550 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800f550: 37 9c ff f8 addi sp,sp,-8 800f554: 5b 8b 00 08 sw (sp+8),r11 800f558: 5b 9d 00 04 sw (sp+4),ra 800f55c: b8 40 58 00 mv r11,r2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800f560: f8 00 00 0a calli 800f588 if (nap) 800f564: 44 20 00 03 be r1,r0,800f570 return nap->name; 800f568: 28 21 00 00 lw r1,(r1+0) 800f56c: e0 00 00 03 bi 800f578 return rtems_assoc_name_bad(local_value); 800f570: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800f574: f8 00 10 5a calli 80136dc <== NOT EXECUTED } 800f578: 2b 9d 00 04 lw ra,(sp+4) 800f57c: 2b 8b 00 08 lw r11,(sp+8) 800f580: 37 9c 00 08 addi sp,sp,8 800f584: c3 a0 00 00 ret 0800c6c8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800c6c8: 37 9c ff f4 addi sp,sp,-12 800c6cc: 5b 8b 00 0c sw (sp+12),r11 800c6d0: 5b 8c 00 08 sw (sp+8),r12 800c6d4: 5b 9d 00 04 sw (sp+4),ra 800c6d8: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800c6dc: 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 ) { 800c6e0: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800c6e4: 44 20 00 07 be r1,r0,800c700 800c6e8: 78 02 08 01 mvhi r2,0x801 800c6ec: 38 42 c2 6c ori r2,r2,0xc26c 800c6f0: f8 00 04 9c calli 800d960 800c6f4: 5c 20 00 03 bne r1,r0,800c700 default_ap = ap++; 800c6f8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800c6fc: e0 00 00 05 bi 800c710 <== NOT EXECUTED 800c700: 34 01 00 00 mvi r1,0 800c704: e0 00 00 04 bi 800c714 for ( ; ap->name; ap++) if (ap->local_value == local_value) 800c708: 29 62 00 04 lw r2,(r11+4) 800c70c: 44 4c 00 05 be r2,r12,800c720 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800c710: 35 6b 00 0c addi r11,r11,12 800c714: 29 62 00 00 lw r2,(r11+0) 800c718: 5c 40 ff fc bne r2,r0,800c708 800c71c: b8 20 58 00 mv r11,r1 if (ap->local_value == local_value) return ap; return default_ap; } 800c720: b9 60 08 00 mv r1,r11 800c724: 2b 9d 00 04 lw ra,(sp+4) 800c728: 2b 8b 00 0c lw r11,(sp+12) 800c72c: 2b 8c 00 08 lw r12,(sp+8) 800c730: 37 9c 00 0c addi sp,sp,12 800c734: c3 a0 00 00 ret 0800abc0 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800abc0: 37 9c ff f4 addi sp,sp,-12 800abc4: 5b 8b 00 0c sw (sp+12),r11 800abc8: 5b 8c 00 08 sw (sp+8),r12 800abcc: 5b 9d 00 04 sw (sp+4),ra 800abd0: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800abd4: 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 ) { 800abd8: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800abdc: 44 20 00 07 be r1,r0,800abf8 800abe0: 78 02 08 01 mvhi r2,0x801 800abe4: 38 42 c2 6c ori r2,r2,0xc26c 800abe8: f8 00 0b 5e calli 800d960 800abec: 5c 20 00 03 bne r1,r0,800abf8 default_ap = ap++; 800abf0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800abf4: e0 00 00 05 bi 800ac08 <== NOT EXECUTED 800abf8: 34 01 00 00 mvi r1,0 800abfc: e0 00 00 04 bi 800ac0c for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 800ac00: 29 62 00 08 lw r2,(r11+8) 800ac04: 44 4c 00 05 be r2,r12,800ac18 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800ac08: 35 6b 00 0c addi r11,r11,12 800ac0c: 29 62 00 00 lw r2,(r11+0) 800ac10: 5c 40 ff fc bne r2,r0,800ac00 800ac14: b8 20 58 00 mv r11,r1 if (ap->remote_value == remote_value) return ap; return default_ap; } 800ac18: b9 60 08 00 mv r1,r11 800ac1c: 2b 9d 00 04 lw ra,(sp+4) 800ac20: 2b 8b 00 0c lw r11,(sp+12) 800ac24: 2b 8c 00 08 lw r12,(sp+8) 800ac28: 37 9c 00 0c addi sp,sp,12 800ac2c: c3 a0 00 00 ret 0800bd80 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800bd80: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800bd84: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800bd88: f8 00 02 50 calli 800c6c8 <== NOT EXECUTED if (nap) 800bd8c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800bd90: 44 20 00 02 be r1,r0,800bd98 <== NOT EXECUTED return nap->remote_value; 800bd94: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED return 0; } 800bd98: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800bd9c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bda0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800bda4: 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 32 d6 calli 800db0c <== 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 fe 4c ori r2,r2,0xfe4c <== 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 30 calli 8004ae4 <_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 cb e4 ori r1,r1,0xcbe4 8001a34: ba 20 10 00 mv r2,r17 8001a38: ba e0 18 00 mv r3,r23 8001a3c: f8 00 16 ba calli 8007524 <_Timespec_Subtract> } } } #endif (*print)( 8001a40: 78 02 08 02 mvhi r2,0x802 8001a44: b9 c0 08 00 mv r1,r14 8001a48: 78 0b 08 02 mvhi r11,0x802 8001a4c: 38 42 0d f8 ori r2,r2,0xdf8 /* * 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 c6 40 ori r11,r11,0xc640 /* * 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 c7 60 ori r15,r15,0xc760 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 02 mvhi r25,0x802 * 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 02 mvhi r2,0x802 8001abc: 38 42 0f 6c ori r2,r2,0xf6c 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 c7 68 ori r1,r1,0xc768 8001af4: ba 20 10 00 mv r2,r17 8001af8: ba 80 18 00 mv r3,r20 8001afc: f8 00 16 8a calli 8007524 <_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 16 1b calli 8007374 <_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 16 2c calli 80073cc <_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 77 dd calli 801fa9c <__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 0f 80 ori r2,r2,0xf80 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 c6 50 ori r1,r1,0xc650 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 77 ca calli 801fa9c <__udivsi3> 8001b78: 2b 83 00 68 lw r3,(sp+104) 8001b7c: 78 02 08 02 mvhi r2,0x802 8001b80: b8 20 20 00 mv r4,r1 8001b84: 38 42 0f 98 ori r2,r2,0xf98 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 0800bd40 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 800bd40: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800bd44: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800bd48: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800bd4c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 800bd50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800bd54: 38 21 c3 10 ori r1,r1,0xc310 <== NOT EXECUTED 800bd58: f8 00 00 0a calli 800bd80 <== NOT EXECUTED 800bd5c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800bd60: 44 20 00 03 be r1,r0,800bd6c <== NOT EXECUTED { errno = rc; 800bd64: f8 00 02 7f calli 800c760 <__errno> <== NOT EXECUTED 800bd68: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED return -1; } return -1; } 800bd6c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800bd70: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bd74: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800bd78: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800bd7c: 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 2e 51 calli 800c760 <__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 2e 4d calli 800c760 <__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 d1 10 ori r1,r1,0xd110 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 30 e2 calli 800d1f8 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 d1 10 ori r1,r1,0xd110 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 30 d9 calli 800d1f8 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 2e 90 calli 800c760 <__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 2e 8c calli 800c760 <__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 2e 6d calli 800c760 <__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 d1 10 ori r11,r11,0xd110 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 b8 e4 ori r1,r1,0xb8e4 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 d0 18 ori r1,r1,0xd018 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 ab calli 8002660 <== 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 31 8a calli 800d1f8 /* 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 bb 40 ori r1,r1,0xbb40 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 31 7d calli 800d1f8 /* 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 bb 40 ori r1,r1,0xbb40 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 31 71 calli 800d1f8 * * 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 bb 44 ori r1,r1,0xbb44 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 34 25 calli 800daa0 <== 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 2f 45 calli 800c760 <__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 34 01 calli 800daa0 <== 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 d0 10 ori r11,r11,0xd010 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 18 03 calli 8006f04 8000efc: 78 02 08 01 mvhi r2,0x801 8000f00: 38 42 d7 18 ori r2,r2,0xd718 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 d7 1c ori r2,r2,0xd71c 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 d7 20 ori r5,r5,0xd720 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 bc calli 8002660 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 8000f74: 78 02 08 01 mvhi r2,0x801 8000f78: 38 42 d0 0c ori r2,r2,0xd00c 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 080288b8 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 80288b8: 37 9c ff d4 addi sp,sp,-44 80288bc: 5b 8b 00 14 sw (sp+20),r11 80288c0: 5b 8c 00 10 sw (sp+16),r12 80288c4: 5b 8d 00 0c sw (sp+12),r13 80288c8: 5b 8e 00 08 sw (sp+8),r14 80288cc: 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); 80288d0: 34 01 00 00 mvi r1,0 80288d4: b8 20 10 00 mv r2,r1 80288d8: 37 83 00 2c addi r3,sp,44 80288dc: f8 00 08 3e calli 802a9d4 80288e0: b8 20 60 00 mv r12,r1 if (sc != RTEMS_SUCCESSFUL) return sc; 80288e4: 5c 20 00 43 bne r1,r0,80289f0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 80288e8: 78 0b 08 06 mvhi r11,0x806 80288ec: 39 6b d2 f0 ori r11,r11,0xd2f0 80288f0: 29 62 00 00 lw r2,(r11+0) 80288f4: 78 01 08 07 mvhi r1,0x807 80288f8: 38 21 0f 5c ori r1,r1,0xf5c 80288fc: 5c 41 00 13 bne r2,r1,8028948 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 8028900: 34 01 00 48 mvi r1,72 8028904: fb ff 7d 11 calli 8007d48 8028908: b8 20 68 00 mv r13,r1 if (!tmp) 802890c: 5c 20 00 03 bne r1,r0,8028918 8028910: 34 0c 00 1a mvi r12,26 <== NOT EXECUTED 8028914: e0 00 00 37 bi 80289f0 <== 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); 8028918: 78 03 08 02 mvhi r3,0x802 802891c: 38 63 87 8c ori r3,r3,0x878c 8028920: b9 80 08 00 mv r1,r12 8028924: b9 60 10 00 mv r2,r11 8028928: f8 00 09 52 calli 802ae70 802892c: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) { 8028930: 44 20 00 05 be r1,r0,8028944 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 8028934: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028938: fb ff 7b 25 calli 80075cc <== NOT EXECUTED 802893c: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED return sc; 8028940: e0 00 00 2c bi 80289f0 <== NOT EXECUTED } rtems_current_user_env = tmp; 8028944: 59 6d 00 00 sw (r11+0),r13 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 8028948: 78 0b 08 06 mvhi r11,0x806 802894c: 39 6b d2 f0 ori r11,r11,0xd2f0 8028950: 29 6d 00 00 lw r13,(r11+0) 8028954: 78 02 08 07 mvhi r2,0x807 8028958: 38 42 0f 5c ori r2,r2,0xf5c 802895c: 34 03 00 48 mvi r3,72 8028960: b9 a0 08 00 mv r1,r13 8028964: f8 00 7c a9 calli 8047c08 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 8028968: 78 01 08 07 mvhi r1,0x807 802896c: 38 21 0f 50 ori r1,r1,0xf50 8028970: 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*/ 8028974: 2b 81 00 2c lw r1,(sp+44) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 8028978: 34 03 00 14 mvi r3,20 802897c: 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*/ 8028980: 59 a1 00 00 sw (r13+0),r1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 8028984: 35 a1 00 18 addi r1,r13,24 8028988: f8 00 7c a0 calli 8047c08 * 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); 802898c: 37 8d 00 18 addi r13,sp,24 8028990: 34 03 00 00 mvi r3,0 8028994: 78 01 08 06 mvhi r1,0x806 8028998: b8 60 28 00 mv r5,r3 802899c: b9 a0 20 00 mv r4,r13 80289a0: 34 02 00 01 mvi r2,1 80289a4: 38 21 bc 64 ori r1,r1,0xbc64 80289a8: fb ff 7a cc calli 80074d8 rtems_filesystem_root = loc; 80289ac: 29 61 00 00 lw r1,(r11+0) 80289b0: b9 a0 10 00 mv r2,r13 80289b4: 34 03 00 14 mvi r3,20 80289b8: 34 21 00 18 addi r1,r1,24 80289bc: f8 00 7c 93 calli 8047c08 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 80289c0: 34 03 00 00 mvi r3,0 80289c4: 78 01 08 06 mvhi r1,0x806 80289c8: 34 02 00 01 mvi r2,1 80289cc: b8 60 28 00 mv r5,r3 80289d0: 38 21 bc 64 ori r1,r1,0xbc64 80289d4: b9 a0 20 00 mv r4,r13 80289d8: fb ff 7a c0 calli 80074d8 rtems_filesystem_current = loc; 80289dc: 29 61 00 00 lw r1,(r11+0) 80289e0: b9 a0 10 00 mv r2,r13 80289e4: 34 03 00 14 mvi r3,20 80289e8: 34 21 00 04 addi r1,r1,4 80289ec: f8 00 7c 87 calli 8047c08 return RTEMS_SUCCESSFUL; } 80289f0: b9 80 08 00 mv r1,r12 80289f4: 2b 9d 00 04 lw ra,(sp+4) 80289f8: 2b 8b 00 14 lw r11,(sp+20) 80289fc: 2b 8c 00 10 lw r12,(sp+16) 8028a00: 2b 8d 00 0c lw r13,(sp+12) 8028a04: 2b 8e 00 08 lw r14,(sp+8) 8028a08: 37 9c 00 2c addi sp,sp,44 8028a0c: c3 a0 00 00 ret 080287f0 : * 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) { 80287f0: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80287f4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80287f8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80287fc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028800: 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); 8028804: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8028808: 37 83 00 10 addi r3,sp,16 <== NOT EXECUTED 802880c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028810: f8 00 08 71 calli 802a9d4 <== NOT EXECUTED 8028814: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 8028818: 5c 20 00 22 bne r1,r0,80288a0 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 802881c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8028820: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8028824: 28 4b 00 00 lw r11,(r2+0) <== NOT EXECUTED 8028828: 2b 83 00 10 lw r3,(sp+16) <== NOT EXECUTED 802882c: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 8028830: 5c 83 00 06 bne r4,r3,8028848 <== 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); 8028834: f8 00 09 bf calli 802af30 <== NOT EXECUTED 8028838: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 802883c: 5c 20 00 19 bne r1,r0,80288a0 <== NOT EXECUTED free_user_env(tmp); 8028840: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028844: fb ff ff d2 calli 802878c <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 8028848: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 802884c: 39 6b d2 f0 ori r11,r11,0xd2f0 <== NOT EXECUTED 8028850: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 8028854: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028858: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802885c: f8 00 09 d8 calli 802afbc <== NOT EXECUTED 8028860: b8 20 18 00 mv r3,r1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 8028864: 5c 20 00 0a bne r1,r0,802888c <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 8028868: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 802886c: 38 63 87 8c ori r3,r3,0x878c <== NOT EXECUTED 8028870: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8028874: f8 00 09 7f calli 802ae70 <== NOT EXECUTED 8028878: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 802887c: 5c 20 00 04 bne r1,r0,802888c <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 8028880: 2b 81 00 14 lw r1,(sp+20) <== NOT EXECUTED 8028884: 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; 8028888: e0 00 00 06 bi 80288a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 802888c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8028890: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8028894: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 8028898: 38 42 0f 5c ori r2,r2,0xf5c <== NOT EXECUTED 802889c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED return sc; } 80288a0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 80288a4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80288a8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80288ac: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80288b0: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80288b4: c3 a0 00 00 ret <== NOT EXECUTED 08007310 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007310: 37 9c ff f8 addi sp,sp,-8 8007314: 5b 8b 00 08 sw (sp+8),r11 8007318: 5b 9d 00 04 sw (sp+4),ra uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 800731c: 34 03 00 06 mvi r3,6 8007320: 20 24 00 06 andi r4,r1,0x6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007324: b8 20 58 00 mv r11,r1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007328: 34 02 00 02 mvi r2,2 800732c: 44 83 00 07 be r4,r3,8007348 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8007330: a0 22 18 00 and r3,r1,r2 8007334: 34 02 00 00 mvi r2,0 8007338: 5c 62 00 04 bne r3,r2,8007348 800733c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8007340: fb ff e3 d4 calli 8000290 <__lshrsi3> <== NOT EXECUTED 8007344: 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 ) { 8007348: 21 61 00 01 andi r1,r11,0x1 800734c: 44 20 00 02 be r1,r0,8007354 fcntl_flags |= O_NONBLOCK; 8007350: 38 42 40 00 ori r2,r2,0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 8007354: 21 61 02 00 andi r1,r11,0x200 8007358: 44 20 00 02 be r1,r0,8007360 fcntl_flags |= O_APPEND; 800735c: 38 42 00 08 ori r2,r2,0x8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 8007360: 21 6b 04 00 andi r11,r11,0x400 8007364: 45 60 00 02 be r11,r0,800736c fcntl_flags |= O_CREAT; 8007368: 38 42 02 00 ori r2,r2,0x200 } return fcntl_flags; } 800736c: b8 40 08 00 mv r1,r2 8007370: 2b 9d 00 04 lw ra,(sp+4) 8007374: 2b 8b 00 08 lw r11,(sp+8) 8007378: 37 9c 00 08 addi sp,sp,8 800737c: 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 d0 1c ori r3,r3,0xd01c <== 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 be calli 800c16c <_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 07 mvhi r1,0x807 <== NOT EXECUTED 8007e80: 38 21 0f 20 ori r1,r1,0xf20 <== 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 d0 1c ori r3,r3,0xd01c <== 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 a5 calli 800c16c <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 8007edc: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8007ee0: 38 21 0f 20 ori r1,r1,0xf20 <== 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 07 mvhi r1,0x807 <== 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 0f 20 ori r1,r1,0xf20 <== NOT EXECUTED 8007f3c: f8 00 ff fd calli 8047f30 <== 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 0800d3ac : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800d3ac: 37 9c ff f0 addi sp,sp,-16 800d3b0: 5b 8b 00 10 sw (sp+16),r11 800d3b4: 5b 8c 00 0c sw (sp+12),r12 800d3b8: 5b 8d 00 08 sw (sp+8),r13 800d3bc: 5b 9d 00 04 sw (sp+4),ra 800d3c0: b8 20 58 00 mv r11,r1 800d3c4: b8 40 60 00 mv r12,r2 800d3c8: b8 60 68 00 mv r13,r3 void *return_this; /* * Parameter error checks */ if ( !pointer ) 800d3cc: 44 20 00 1f be r1,r0,800d448 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800d3d0: 78 01 08 02 mvhi r1,0x802 800d3d4: 38 21 5a e0 ori r1,r1,0x5ae0 800d3d8: 28 22 00 00 lw r2,(r1+0) * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; 800d3dc: 34 01 00 00 mvi r1,0 800d3e0: 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()) && 800d3e4: 34 01 00 03 mvi r1,3 800d3e8: 5c 41 00 03 bne r2,r1,800d3f4 800d3ec: fb ff d5 f1 calli 8002bb0 800d3f0: 44 20 00 16 be r1,r0,800d448 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800d3f4: fb ff d6 0a calli 8002c1c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 800d3f8: 78 01 08 02 mvhi r1,0x802 800d3fc: 38 21 50 1c ori r1,r1,0x501c 800d400: 28 21 00 00 lw r1,(r1+0) 800d404: b9 a0 10 00 mv r2,r13 800d408: b9 80 18 00 mv r3,r12 800d40c: 34 04 00 00 mvi r4,0 800d410: fb ff e3 47 calli 800612c <_Protected_heap_Allocate_aligned_with_boundary> 800d414: b8 20 60 00 mv r12,r1 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 800d418: 34 02 00 0c mvi r2,12 800d41c: 44 20 00 0c be r1,r0,800d44c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 800d420: 78 02 08 02 mvhi r2,0x802 800d424: 38 42 56 80 ori r2,r2,0x5680 800d428: 28 41 00 00 lw r1,(r2+0) 800d42c: 44 20 00 04 be r1,r0,800d43c (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 800d430: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800d434: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800d438: 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; 800d43c: 59 6c 00 00 sw (r11+0),r12 800d440: 34 02 00 00 mvi r2,0 return 0; 800d444: e0 00 00 02 bi 800d44c 800d448: 34 02 00 16 mvi r2,22 } 800d44c: b8 40 08 00 mv r1,r2 800d450: 2b 9d 00 04 lw ra,(sp+4) 800d454: 2b 8b 00 10 lw r11,(sp+16) 800d458: 2b 8c 00 0c lw r12,(sp+12) 800d45c: 2b 8d 00 08 lw r13,(sp+8) 800d460: 37 9c 00 10 addi sp,sp,16 800d464: 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 08009ea4 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 8009ea4: 37 9c ff f8 addi sp,sp,-8 8009ea8: 5b 8b 00 08 sw (sp+8),r11 8009eac: 5b 9d 00 04 sw (sp+4),ra if (!rtems_pipe_configured) 8009eb0: 78 01 08 01 mvhi r1,0x801 8009eb4: 38 21 d6 4c ori r1,r1,0xd64c 8009eb8: 40 21 00 00 lbu r1,(r1+0) 8009ebc: 44 20 00 11 be r1,r0,8009f00 return; if (rtems_pipe_semaphore) 8009ec0: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 8009ec4: 38 a5 d6 a4 ori r5,r5,0xd6a4 <== NOT EXECUTED 8009ec8: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED 8009ecc: 5d 60 00 0d bne r11,r0,8009f00 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 8009ed0: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 8009ed4: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED 8009ed8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009edc: 34 03 00 54 mvi r3,84 <== NOT EXECUTED 8009ee0: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8009ee4: fb ff e0 0a 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) 8009ee8: 44 2b 00 02 be r1,r11,8009ef0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8009eec: fb ff e1 dd calli 8002660 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 8009ef0: f8 00 05 55 calli 800b444 <== NOT EXECUTED rtems_pipe_no = now; 8009ef4: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009ef8: 38 42 d6 aa ori r2,r2,0xd6aa <== NOT EXECUTED 8009efc: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED } 8009f00: 2b 9d 00 04 lw ra,(sp+4) 8009f04: 2b 8b 00 08 lw r11,(sp+8) 8009f08: 37 9c 00 08 addi sp,sp,8 8009f0c: c3 a0 00 00 ret 0803dd98 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 803dd98: 37 9c ff e8 addi sp,sp,-24 803dd9c: 5b 8b 00 14 sw (sp+20),r11 803dda0: 5b 8c 00 10 sw (sp+16),r12 803dda4: 5b 8d 00 0c sw (sp+12),r13 803dda8: 5b 8e 00 08 sw (sp+8),r14 803ddac: 5b 9d 00 04 sw (sp+4),ra 803ddb0: b8 20 70 00 mv r14,r1 803ddb4: 78 01 08 07 mvhi r1,0x807 803ddb8: b8 40 60 00 mv r12,r2 803ddbc: 38 21 1b c0 ori r1,r1,0x1bc0 803ddc0: b9 c0 10 00 mv r2,r14 803ddc4: 37 83 00 18 addi r3,sp,24 803ddc8: fb ff 37 eb calli 800bd74 <_Objects_Get> 803ddcc: 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 ) { 803ddd0: 2b 81 00 18 lw r1,(sp+24) 803ddd4: 5c 20 00 61 bne r1,r0,803df58 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 803ddd8: 78 03 08 07 mvhi r3,0x807 803dddc: 38 63 11 58 ori r3,r3,0x1158 803dde0: 28 61 00 00 lw r1,(r3+0) 803dde4: 29 62 00 40 lw r2,(r11+64) 803dde8: 44 41 00 04 be r2,r1,803ddf8 _Thread_Enable_dispatch(); 803ddec: fb ff 3a 9a calli 800c854 <_Thread_Enable_dispatch> 803ddf0: 34 0b 00 17 mvi r11,23 return RTEMS_NOT_OWNER_OF_RESOURCE; 803ddf4: e0 00 00 5a bi 803df5c } if ( length == RTEMS_PERIOD_STATUS ) { 803ddf8: 5d 80 00 0d bne r12,r0,803de2c switch ( the_period->state ) { 803ddfc: 29 61 00 38 lw r1,(r11+56) 803de00: 34 02 00 04 mvi r2,4 803de04: 50 41 00 03 bgeu r2,r1,803de10 803de08: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 803de0c: e0 00 00 51 bi 803df50 <== NOT EXECUTED 803de10: 78 0b 08 06 mvhi r11,0x806 803de14: 34 02 00 02 mvi r2,2 803de18: 39 6b a2 40 ori r11,r11,0xa240 803de1c: fb ff 0c c7 calli 8001138 <__ashlsi3> 803de20: b5 61 08 00 add r1,r11,r1 803de24: 28 2b 00 00 lw r11,(r1+0) 803de28: e0 00 00 4a bi 803df50 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 803de2c: 90 00 68 00 rcsr r13,IE 803de30: 34 01 ff fe mvi r1,-2 803de34: a1 a1 08 00 and r1,r13,r1 803de38: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 803de3c: 29 63 00 38 lw r3,(r11+56) 803de40: 34 01 00 02 mvi r1,2 803de44: 44 61 00 18 be r3,r1,803dea4 803de48: 34 01 00 04 mvi r1,4 803de4c: 44 61 00 35 be r3,r1,803df20 803de50: 5c 60 00 42 bne r3,r0,803df58 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 803de54: d0 0d 00 00 wcsr IE,r13 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 803de58: b9 60 08 00 mv r1,r11 803de5c: fb ff ff 31 calli 803db20 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 803de60: 78 03 08 03 mvhi r3,0x803 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 803de64: 34 0d 00 00 mvi r13,0 the_watchdog->routine = routine; 803de68: 38 63 df 7c ori r3,r3,0xdf7c the_period->state = RATE_MONOTONIC_ACTIVE; 803de6c: 34 02 00 02 mvi r2,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803de70: 78 01 08 07 mvhi r1,0x807 803de74: 59 62 00 38 sw (r11+56),r2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 803de78: 59 63 00 2c sw (r11+44),r3 the_watchdog->id = id; 803de7c: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 803de80: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803de84: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 803de88: 59 6d 00 18 sw (r11+24),r13 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 803de8c: 59 6d 00 34 sw (r11+52),r13 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 803de90: 59 6c 00 3c sw (r11+60),r12 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803de94: 38 21 11 78 ori r1,r1,0x1178 803de98: fb ff 3f 68 calli 800dc38 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 803de9c: b9 a0 58 00 mv r11,r13 803dea0: e0 00 00 2c bi 803df50 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 803dea4: b9 60 08 00 mv r1,r11 803dea8: fb ff ff 7c calli 803dc98 <_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; 803deac: 34 01 00 01 mvi r1,1 the_period->next_length = length; 803deb0: 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; 803deb4: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 803deb8: d0 0d 00 00 wcsr IE,r13 _Thread_Executing->Wait.id = the_period->Object.id; 803debc: 78 01 08 07 mvhi r1,0x807 803dec0: 38 21 11 58 ori r1,r1,0x1158 803dec4: 28 21 00 00 lw r1,(r1+0) 803dec8: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803decc: 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; 803ded0: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803ded4: fb ff 3d 24 calli 800d364 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 803ded8: 90 00 08 00 rcsr r1,IE 803dedc: 34 02 ff fe mvi r2,-2 803dee0: a0 22 10 00 and r2,r1,r2 803dee4: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 803dee8: 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; 803deec: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 803def0: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 803def4: 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 ) 803def8: 34 01 00 03 mvi r1,3 803defc: 5c 41 00 06 bne r2,r1,803df14 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 803df00: 78 01 08 07 mvhi r1,0x807 803df04: 38 21 11 58 ori r1,r1,0x1158 803df08: 28 21 00 00 lw r1,(r1+0) 803df0c: 34 02 40 00 mvi r2,16384 803df10: fb ff b7 bb calli 802bdfc <_Thread_Clear_state> _Thread_Enable_dispatch(); 803df14: fb ff 3a 50 calli 800c854 <_Thread_Enable_dispatch> 803df18: 34 0b 00 00 mvi r11,0 return RTEMS_SUCCESSFUL; 803df1c: e0 00 00 10 bi 803df5c case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 803df20: b9 60 08 00 mv r1,r11 803df24: fb ff ff 5d calli 803dc98 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 803df28: d0 0d 00 00 wcsr IE,r13 the_period->state = RATE_MONOTONIC_ACTIVE; 803df2c: 34 02 00 02 mvi r2,2 803df30: 78 01 08 07 mvhi r1,0x807 803df34: 59 62 00 38 sw (r11+56),r2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 803df38: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 803df3c: 35 62 00 10 addi r2,r11,16 the_period->next_length = length; 803df40: 59 6c 00 3c sw (r11+60),r12 803df44: 38 21 11 78 ori r1,r1,0x1178 803df48: fb ff 3f 3c calli 800dc38 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 803df4c: 34 0b 00 06 mvi r11,6 803df50: fb ff 3a 41 calli 800c854 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 803df54: e0 00 00 02 bi 803df5c 803df58: 34 0b 00 04 mvi r11,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 803df5c: b9 60 08 00 mv r1,r11 803df60: 2b 9d 00 04 lw ra,(sp+4) 803df64: 2b 8b 00 14 lw r11,(sp+20) 803df68: 2b 8c 00 10 lw r12,(sp+16) 803df6c: 2b 8d 00 0c lw r13,(sp+12) 803df70: 2b 8e 00 08 lw r14,(sp+8) 803df74: 37 9c 00 18 addi sp,sp,24 803df78: 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 07 mvhi r1,0x807 80056e4: 38 21 11 58 ori r1,r1,0x1158 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 c8 lw r1,(r2+200) 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 c4 lw r11,(r2+196) 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 e5 24 ori r2,r2,0xe524 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 07 mvhi r2,0x807 8005720: 38 42 0e f0 ori r2,r2,0xef0 8005724: 34 21 00 08 addi r1,r1,8 8005728: 34 03 00 10 mvi r3,16 800572c: f8 01 09 17 calli 8047b88 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 07 mvhi r1,0x807 <== NOT EXECUTED 8005744: 38 21 11 58 ori r1,r1,0x1158 <== 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 e5 28 ori r11,r11,0xe528 <== NOT EXECUTED print_handler = print; 8005584: 39 8c e5 2c ori r12,r12,0xe52c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 8005588: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800558c: 38 42 1f 90 ori r2,r2,0x1f90 <== 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 1f a8 ori r2,r2,0x1fa8 <== 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 d9 calli 800b51c <== 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 c8 lw r1,(r1+200) ) { #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 c4 lw r12,(r11+196) 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 07 mvhi r2,0x807 80057a8: 38 42 0e f0 ori r2,r2,0xef0 80057ac: 34 21 00 08 addi r1,r1,8 80057b0: 34 03 00 10 mvi r3,16 80057b4: f8 01 08 f5 calli 8047b88 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 0801d120 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801d120: 37 9c ff e8 addi sp,sp,-24 801d124: 5b 8b 00 14 sw (sp+20),r11 801d128: 5b 8c 00 10 sw (sp+16),r12 801d12c: 5b 8d 00 0c sw (sp+12),r13 801d130: 5b 8e 00 08 sw (sp+8),r14 801d134: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801d138: 34 0c 00 00 mvi r12,0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801d13c: b8 40 58 00 mv r11,r2 801d140: b8 20 68 00 mv r13,r1 801d144: b8 60 70 00 mv r14,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801d148: 34 04 00 09 mvi r4,9 801d14c: 44 4c 00 18 be r2,r12,801d1ac return RTEMS_INVALID_ADDRESS; errno = 0; 801d150: f8 00 9c 0c calli 8044180 <__errno> 801d154: 58 2c 00 00 sw (r1+0),r12 *n = 0; 801d158: 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 ); 801d15c: b9 a0 08 00 mv r1,r13 801d160: 37 82 00 18 addi r2,sp,24 801d164: 34 03 00 10 mvi r3,16 801d168: f8 00 bf 36 calli 804ce40 801d16c: 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 ) 801d170: 45 c0 00 03 be r14,r0,801d17c *endptr = end; 801d174: 2b 81 00 18 lw r1,(sp+24) 801d178: 59 c1 00 00 sw (r14+0),r1 /* nothing was converted */ if ( end == s ) 801d17c: 2b 81 00 18 lw r1,(sp+24) 801d180: 34 04 00 0b mvi r4,11 801d184: 44 2d 00 0a be r1,r13,801d1ac return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801d188: 34 01 ff ff mvi r1,-1 801d18c: 5d 81 00 06 bne r12,r1,801d1a4 801d190: f8 00 9b fc calli 8044180 <__errno> <== NOT EXECUTED 801d194: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801d198: 34 01 00 22 mvi r1,34 <== NOT EXECUTED 801d19c: 34 04 00 0a mvi r4,10 <== NOT EXECUTED 801d1a0: 44 41 00 03 be r2,r1,801d1ac <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 801d1a4: 59 6c 00 00 sw (r11+0),r12 801d1a8: 34 04 00 00 mvi r4,0 return RTEMS_SUCCESSFUL; } 801d1ac: b8 80 08 00 mv r1,r4 801d1b0: 2b 9d 00 04 lw ra,(sp+4) 801d1b4: 2b 8b 00 14 lw r11,(sp+20) 801d1b8: 2b 8c 00 10 lw r12,(sp+16) 801d1bc: 2b 8d 00 0c lw r13,(sp+12) 801d1c0: 2b 8e 00 08 lw r14,(sp+8) 801d1c4: 37 9c 00 18 addi sp,sp,24 801d1c8: 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 52 34 ori r6,r6,0x5234 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 80038f4: 38 a5 52 38 ori r5,r5,0x5238 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 80038f8: 38 84 52 3c ori r4,r4,0x523c <== 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 59 c4 ori r2,r2,0x59c4 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 57 f8 ori r12,r12,0x57f8 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 61 calli 80069d8 <== 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 59 c8 ori r3,r3,0x59c8 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 59 cc ori r3,r3,0x59cc 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 63 calli 800ba84 free (tty->rawOutBuf.theBuf); 80050fc: 29 61 00 7c lw r1,(r11+124) 8005100: f8 00 1a 61 calli 800ba84 free (tty->cbuf); 8005104: 29 61 00 1c lw r1,(r11+28) 8005108: f8 00 1a 5f calli 800ba84 free (tty); 800510c: b9 60 08 00 mv r1,r11 8005110: f8 00 1a 5d calli 800ba84 } rtems_semaphore_release (rtems_termios_ttyMutex); 8005114: 78 01 08 02 mvhi r1,0x802 8005118: 38 21 59 c4 ori r1,r1,0x59c4 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 9a calli 80069d8 <== 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 57 f8 ori r2,r2,0x57f8 <== 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 57 f8 ori r12,r12,0x57f8 <== 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 74 8d calli 8020fa8 <__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 74 83 calli 8020fa8 <__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 59 c4 ori r5,r5,0x59c4 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 8b calli 80069d8 <== 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 57 f8 ori r13,r13,0x57f8 <== 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 31 55 calli 80111d8 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 31 50 calli 80111d8 /* * 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 6f d7 calli 8020d6c <__mulsi3> <== NOT EXECUTED 8004e14: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8004e18: f8 00 70 54 calli 8020f68 <__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 57 f8 ori r14,r14,0x57f8 <== 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 57 f8 ori r14,r14,0x57f8 <== 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 59 c4 ori r5,r5,0x59c4 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 59 cc ori r1,r1,0x59cc 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 52 38 ori r1,r1,0x5238 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 1b 2e calli 800bea4 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 1a 22 calli 800ba84 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005200: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8005204: 38 21 59 c4 ori r1,r1,0x59c4 <== 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 52 3c ori r1,r1,0x523c 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 1b 1f calli 800bea4 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 52 34 ori r1,r1,0x5234 8005248: 28 21 00 00 lw r1,(r1+0) 800524c: f8 00 1b 16 calli 800bea4 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 1a 09 calli 800ba84 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 8005264: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8005268: f8 00 1a 07 calli 800ba84 <== NOT EXECUTED free(tty); 800526c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005270: f8 00 1a 05 calli 800ba84 <== 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 59 cc ori r1,r1,0x59cc 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 59 c8 ori r5,r5,0x59c8 */ 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 59 cc ori r1,r1,0x59cc 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 52 40 ori r13,r13,0x5240 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 2f 9b calli 80111d8 /* * 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 52 40 ori r1,r1,0x5240 <== 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 52 40 ori r4,r4,0x5240 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 1b calli 80069d8 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 8005570: 78 01 08 02 mvhi r1,0x802 8005574: 38 21 59 c4 ori r1,r1,0x59c4 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 19 11 calli 800ba08 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 74 13 calli 8020fa8 <__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 92 calli 80069d8 <== 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 57 f8 ori r15,r15,0x57f8 <== 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 52 34 ori r15,r15,0x5234 <== 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 71 6c calli 8020fa8 <__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 71 61 calli 8020fa8 <__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 75 58 calli 8020fa8 <__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 57 f8 ori r12,r12,0x57f8 <== 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 57 f8 ori r14,r14,0x57f8 <== 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 a8 94 ori r4,r4,0xa894 <== 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 aa 2c ori r4,r4,0xaa2c <== 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 a8 94 ori r1,r1,0xa894 <== 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 a2 28 ori r1,r1,0xa228 <== 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 38 8b calli 8014cbc <== 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 37 72 calli 801487c <__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 a2 28 ori r13,r13,0xa228 <== 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 4e e1 calli 801a658 <== 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 79 10 ori r2,r2,0x7910 <== NOT EXECUTED 8006afc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006b00: f8 00 39 7c calli 80150f0 <== 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 3d 4a calli 801603c <== 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 a2 28 ori r1,r1,0xa228 <== 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 3d 42 calli 801603c <== 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 79 20 ori r2,r2,0x7920 <== 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 a2 28 ori r1,r1,0xa228 <== 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 79 30 ori r2,r2,0x7930 <== 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 39 62 calli 80150f0 <== 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 a2 28 ori r13,r13,0xa228 <== 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 71 54 ori r2,r2,0x7154 <== NOT EXECUTED 8006b84: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006b88: f8 00 39 5a calli 80150f0 <== 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 38 49 calli 8014cbc <== 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 79 44 ori r2,r2,0x7944 <== 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 79 5c ori r2,r2,0x795c <== 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 37 18 calli 801483c <== 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 080273a0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 80273a0: 37 9c ff d4 addi sp,sp,-44 80273a4: 5b 8b 00 2c sw (sp+44),r11 80273a8: 5b 8c 00 28 sw (sp+40),r12 80273ac: 5b 8d 00 24 sw (sp+36),r13 80273b0: 5b 8e 00 20 sw (sp+32),r14 80273b4: 5b 8f 00 1c sw (sp+28),r15 80273b8: 5b 90 00 18 sw (sp+24),r16 80273bc: 5b 91 00 14 sw (sp+20),r17 80273c0: 5b 92 00 10 sw (sp+16),r18 80273c4: 5b 93 00 0c sw (sp+12),r19 80273c8: 5b 94 00 08 sw (sp+8),r20 80273cc: 5b 9d 00 04 sw (sp+4),ra 80273d0: 34 0d 00 00 mvi r13,0 80273d4: 78 0e 7f ff mvhi r14,0x7fff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 80273d8: 78 11 08 06 mvhi r17,0x806 limit++; continue; } sign = 1; } if (!isdigit(c)) 80273dc: 78 10 08 06 mvhi r16,0x806 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 80273e0: b8 20 58 00 mv r11,r1 80273e4: b8 40 90 00 mv r18,r2 80273e8: 39 ce ff ff ori r14,r14,0xffff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 80273ec: 3a 31 db 08 ori r17,r17,0xdb08 limit++; continue; } sign = 1; } if (!isdigit(c)) 80273f0: 3a 10 da fc ori r16,r16,0xdafc /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 80273f4: b9 a0 60 00 mv r12,r13 int sign = 0; int d; for (;;) { c = getc(fp); if (c == ':') 80273f8: 34 14 00 3a mvi r20,58 break; if (sign == 0) { if (c == '-') { 80273fc: 34 13 00 2d mvi r19,45 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8027400: 29 61 00 04 lw r1,(r11+4) 8027404: 34 21 ff ff addi r1,r1,-1 8027408: 59 61 00 04 sw (r11+4),r1 802740c: 4c 20 00 06 bge r1,r0,8027424 8027410: 2a 21 00 00 lw r1,(r17+0) <== NOT EXECUTED 8027414: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8027418: f8 00 8b 9b calli 804a284 <__srget_r> <== NOT EXECUTED 802741c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8027420: e0 00 00 05 bi 8027434 <== NOT EXECUTED 8027424: 29 62 00 00 lw r2,(r11+0) 8027428: 34 41 00 01 addi r1,r2,1 802742c: 40 4f 00 00 lbu r15,(r2+0) 8027430: 59 61 00 00 sw (r11+0),r1 if (c == ':') 8027434: 45 f4 00 1d be r15,r20,80274a8 break; if (sign == 0) { 8027438: 5d a0 00 06 bne r13,r0,8027450 if (c == '-') { sign = -1; limit++; continue; 802743c: 34 0d 00 01 mvi r13,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 8027440: 5d f3 00 04 bne r15,r19,8027450 sign = -1; limit++; 8027444: b5 cd 70 00 add r14,r14,r13 <== NOT EXECUTED 8027448: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED continue; 802744c: e3 ff ff ed bi 8027400 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 8027450: 2a 01 00 00 lw r1,(r16+0) 8027454: b4 2f 08 00 add r1,r1,r15 8027458: 40 21 00 01 lbu r1,(r1+1) 802745c: 20 21 00 04 andi r1,r1,0x4 8027460: 44 20 00 19 be r1,r0,80274c4 return 0; d = c - '0'; if ((i > (limit / 10)) 8027464: b9 c0 08 00 mv r1,r14 8027468: 34 02 00 0a mvi r2,10 802746c: fb ff 70 6c calli 800361c <__udivsi3> 8027470: 55 81 00 15 bgu r12,r1,80274c4 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 8027474: 35 ef ff d0 addi r15,r15,-48 if ((i > (limit / 10)) 8027478: 5d 81 00 05 bne r12,r1,802748c 802747c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8027480: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8027484: fb ff 70 76 calli 800365c <__umodsi3> <== NOT EXECUTED 8027488: 55 e1 00 0f bgu r15,r1,80274c4 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 802748c: b5 8c 60 00 add r12,r12,r12 8027490: b9 80 08 00 mv r1,r12 8027494: 34 02 00 02 mvi r2,2 8027498: fb ff 67 28 calli 8001138 <__ashlsi3> 802749c: b5 81 60 00 add r12,r12,r1 80274a0: b5 ec 60 00 add r12,r15,r12 80274a4: e3 ff ff d7 bi 8027400 } if (sign == 0) 80274a8: 45 a0 00 07 be r13,r0,80274c4 return 0; *val = i * sign; 80274ac: b9 a0 08 00 mv r1,r13 80274b0: b9 80 10 00 mv r2,r12 80274b4: fb ff 70 3a calli 800359c <__mulsi3> 80274b8: 5a 41 00 00 sw (r18+0),r1 80274bc: 34 01 00 01 mvi r1,1 return 1; 80274c0: e0 00 00 02 bi 80274c8 80274c4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 80274c8: 2b 9d 00 04 lw ra,(sp+4) 80274cc: 2b 8b 00 2c lw r11,(sp+44) 80274d0: 2b 8c 00 28 lw r12,(sp+40) 80274d4: 2b 8d 00 24 lw r13,(sp+36) 80274d8: 2b 8e 00 20 lw r14,(sp+32) 80274dc: 2b 8f 00 1c lw r15,(sp+28) 80274e0: 2b 90 00 18 lw r16,(sp+24) 80274e4: 2b 91 00 14 lw r17,(sp+20) 80274e8: 2b 92 00 10 lw r18,(sp+16) 80274ec: 2b 93 00 0c lw r19,(sp+12) 80274f0: 2b 94 00 08 lw r20,(sp+8) 80274f4: 37 9c 00 2c addi sp,sp,44 80274f8: c3 a0 00 00 ret 080274fc : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 80274fc: 37 9c ff d8 addi sp,sp,-40 8027500: 5b 8b 00 28 sw (sp+40),r11 8027504: 5b 8c 00 24 sw (sp+36),r12 8027508: 5b 8d 00 20 sw (sp+32),r13 802750c: 5b 8e 00 1c sw (sp+28),r14 8027510: 5b 8f 00 18 sw (sp+24),r15 8027514: 5b 90 00 14 sw (sp+20),r16 8027518: 5b 91 00 10 sw (sp+16),r17 802751c: 5b 92 00 0c sw (sp+12),r18 8027520: 5b 93 00 08 sw (sp+8),r19 8027524: 5b 9d 00 04 sw (sp+4),ra 8027528: b8 60 58 00 mv r11,r3 int c; *name = *bufp; 802752c: 28 63 00 00 lw r3,(r3+0) for (;;) { c = getc(fp); 8027530: 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) { 8027534: b8 20 68 00 mv r13,r1 int c; *name = *bufp; 8027538: 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) { 802753c: b8 80 60 00 mv r12,r4 8027540: b8 a0 78 00 mv r15,r5 int c; *name = *bufp; for (;;) { c = getc(fp); 8027544: 39 ce db 08 ori r14,r14,0xdb08 if (c == ':') { 8027548: 34 13 00 3a mvi r19,58 if (nlFlag) return 0; break; } if (c == '\n') { 802754c: 34 12 00 0a mvi r18,10 if (!nlFlag) return 0; break; } if (c == EOF) 8027550: 34 11 ff ff mvi r17,-1 return 0; if (*nleft < 2) 8027554: 34 10 00 01 mvi r16,1 { int c; *name = *bufp; for (;;) { c = getc(fp); 8027558: 29 a1 00 04 lw r1,(r13+4) 802755c: 34 21 ff ff addi r1,r1,-1 8027560: 59 a1 00 04 sw (r13+4),r1 8027564: 4c 20 00 05 bge r1,r0,8027578 8027568: 29 c1 00 00 lw r1,(r14+0) 802756c: b9 a0 10 00 mv r2,r13 8027570: f8 00 8b 45 calli 804a284 <__srget_r> 8027574: e0 00 00 05 bi 8027588 8027578: 29 a1 00 00 lw r1,(r13+0) 802757c: 34 22 00 01 addi r2,r1,1 8027580: 40 21 00 00 lbu r1,(r1+0) 8027584: 59 a2 00 00 sw (r13+0),r2 if (c == ':') { 8027588: 5c 33 00 03 bne r1,r19,8027594 if (nlFlag) 802758c: 45 e0 00 11 be r15,r0,80275d0 8027590: e0 00 00 1b bi 80275fc <== NOT EXECUTED return 0; break; } if (c == '\n') { 8027594: 5c 32 00 03 bne r1,r18,80275a0 if (!nlFlag) 8027598: 5d e0 00 0e bne r15,r0,80275d0 802759c: e0 00 00 18 bi 80275fc <== NOT EXECUTED return 0; break; } if (c == EOF) 80275a0: 44 31 00 17 be r1,r17,80275fc return 0; if (*nleft < 2) 80275a4: 29 82 00 00 lw r2,(r12+0) 80275a8: 52 02 00 15 bgeu r16,r2,80275fc return 0; **bufp = c; 80275ac: 29 62 00 00 lw r2,(r11+0) 80275b0: 30 41 00 00 sb (r2+0),r1 ++(*bufp); 80275b4: 29 62 00 00 lw r2,(r11+0) --(*nleft); 80275b8: 29 81 00 00 lw r1,(r12+0) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 80275bc: 34 42 00 01 addi r2,r2,1 --(*nleft); 80275c0: 34 21 ff ff addi r1,r1,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 80275c4: 59 62 00 00 sw (r11+0),r2 --(*nleft); 80275c8: 59 81 00 00 sw (r12+0),r1 } 80275cc: e3 ff ff e3 bi 8027558 **bufp = '\0'; 80275d0: 29 63 00 00 lw r3,(r11+0) 80275d4: 34 02 00 00 mvi r2,0 ++(*bufp); --(*nleft); 80275d8: 34 01 00 01 mvi r1,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 80275dc: 30 62 00 00 sb (r3+0),r2 ++(*bufp); 80275e0: 29 63 00 00 lw r3,(r11+0) --(*nleft); 80275e4: 29 82 00 00 lw r2,(r12+0) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 80275e8: b4 61 18 00 add r3,r3,r1 --(*nleft); 80275ec: 34 42 ff ff addi r2,r2,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 80275f0: 59 63 00 00 sw (r11+0),r3 --(*nleft); 80275f4: 59 82 00 00 sw (r12+0),r2 return 1; 80275f8: e0 00 00 02 bi 8027600 80275fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8027600: 2b 9d 00 04 lw ra,(sp+4) 8027604: 2b 8b 00 28 lw r11,(sp+40) 8027608: 2b 8c 00 24 lw r12,(sp+36) 802760c: 2b 8d 00 20 lw r13,(sp+32) 8027610: 2b 8e 00 1c lw r14,(sp+28) 8027614: 2b 8f 00 18 lw r15,(sp+24) 8027618: 2b 90 00 14 lw r16,(sp+20) 802761c: 2b 91 00 10 lw r17,(sp+16) 8027620: 2b 92 00 0c lw r18,(sp+12) 8027624: 2b 93 00 08 lw r19,(sp+8) 8027628: 37 9c 00 28 addi sp,sp,40 802762c: c3 a0 00 00 ret 08027630 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8027630: 37 9c ff d4 addi sp,sp,-44 8027634: 5b 8b 00 1c sw (sp+28),r11 8027638: 5b 8c 00 18 sw (sp+24),r12 802763c: 5b 8d 00 14 sw (sp+20),r13 8027640: 5b 8e 00 10 sw (sp+16),r14 8027644: 5b 8f 00 0c sw (sp+12),r15 8027648: 5b 90 00 08 sw (sp+8),r16 802764c: 5b 9d 00 04 sw (sp+4),ra int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8027650: 37 8d 00 24 addi r13,sp,36 8027654: 37 8c 00 20 addi r12,sp,32 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 8027658: 5b 83 00 24 sw (sp+36),r3 802765c: 5b 84 00 20 sw (sp+32),r4 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8027660: b9 a0 18 00 mv r3,r13 8027664: b9 80 20 00 mv r4,r12 8027668: 34 05 00 00 mvi r5,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 802766c: b8 20 70 00 mv r14,r1 8027670: b8 40 58 00 mv r11,r2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8027674: fb ff ff a2 calli 80274fc 8027678: 44 20 00 44 be r1,r0,8027788 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 802767c: b9 c0 08 00 mv r1,r14 8027680: 35 62 00 04 addi r2,r11,4 8027684: b9 a0 18 00 mv r3,r13 8027688: b9 80 20 00 mv r4,r12 802768c: 34 05 00 00 mvi r5,0 8027690: fb ff ff 9b calli 80274fc { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 8027694: 44 20 00 3d be r1,r0,8027788 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 8027698: b9 c0 08 00 mv r1,r14 802769c: 37 82 00 2c addi r2,sp,44 80276a0: fb ff ff 40 calli 80273a0 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 80276a4: 44 20 00 39 be r1,r0,8027788 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 80276a8: b9 c0 08 00 mv r1,r14 80276ac: b9 a0 18 00 mv r3,r13 80276b0: b9 80 20 00 mv r4,r12 80276b4: 37 82 00 28 addi r2,sp,40 80276b8: 34 05 00 01 mvi r5,1 80276bc: fb ff ff 90 calli 80274fc { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 80276c0: 44 20 00 32 be r1,r0,8027788 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 80276c4: 2f 82 00 2e lhu r2,(sp+46) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80276c8: 2b 8d 00 28 lw r13,(sp+40) 80276cc: 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; 80276d0: 0d 62 00 08 sh (r11+8),r2 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80276d4: b9 a0 10 00 mv r2,r13 80276d8: e0 00 00 02 bi 80276e0 if(*cp == ',') memcount++; 80276dc: b4 23 08 00 add r1,r1,r3 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80276e0: 40 4c 00 00 lbu r12,(r2+0) 80276e4: 34 42 00 01 addi r2,r2,1 if(*cp == ',') memcount++; 80276e8: 65 83 00 2c cmpei r3,r12,44 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 80276ec: 5d 80 ff fc bne r12,r0,80276dc } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 80276f0: 34 02 00 02 mvi r2,2 80276f4: 34 21 00 01 addi r1,r1,1 80276f8: fb ff 66 90 calli 8001138 <__ashlsi3> 80276fc: 2b 82 00 20 lw r2,(sp+32) 8027700: 34 21 00 0f addi r1,r1,15 8027704: 54 22 00 21 bgu r1,r2,8027788 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 8027708: 2b 81 00 24 lw r1,(sp+36) 802770c: 34 02 ff f0 mvi r2,-16 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027710: 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); 8027714: 34 21 00 0f addi r1,r1,15 8027718: a0 22 08 00 and r1,r1,r2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 802771c: 58 2d 00 00 sw (r1+0),r13 8027720: 2b 8c 00 28 lw r12,(sp+40) 8027724: 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); 8027728: 59 61 00 0c sw (r11+12),r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 802772c: b5 8d 60 00 add r12,r12,r13 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 8027730: 34 0f 00 2c mvi r15,44 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027734: e0 00 00 0b bi 8027760 if(*cp == ',') { 8027738: 5d cf 00 09 bne r14,r15,802775c *cp = '\0'; 802773c: 31 90 ff ff sb (r12+-1),r16 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 8027740: 29 6e 00 0c lw r14,(r11+12) <== NOT EXECUTED 8027744: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8027748: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 802774c: fb ff 66 7b calli 8001138 <__ashlsi3> <== NOT EXECUTED 8027750: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8027754: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 8027758: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED 802775c: 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++) { 8027760: 41 8e ff ff lbu r14,(r12+-1) 8027764: 5d c0 ff f5 bne r14,r0,8027738 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 8027768: 29 6b 00 0c lw r11,(r11+12) 802776c: b9 a0 08 00 mv r1,r13 8027770: 34 02 00 02 mvi r2,2 8027774: fb ff 66 71 calli 8001138 <__ashlsi3> 8027778: b5 61 08 00 add r1,r11,r1 802777c: 58 2e 00 00 sw (r1+0),r14 8027780: 34 01 00 01 mvi r1,1 return 1; 8027784: e0 00 00 02 bi 802778c 8027788: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802778c: 2b 9d 00 04 lw ra,(sp+4) 8027790: 2b 8b 00 1c lw r11,(sp+28) 8027794: 2b 8c 00 18 lw r12,(sp+24) 8027798: 2b 8d 00 14 lw r13,(sp+20) 802779c: 2b 8e 00 10 lw r14,(sp+16) 80277a0: 2b 8f 00 0c lw r15,(sp+12) 80277a4: 2b 90 00 08 lw r16,(sp+8) 80277a8: 37 9c 00 2c addi sp,sp,44 80277ac: c3 a0 00 00 ret 08027800 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 8027800: 37 9c ff dc addi sp,sp,-36 8027804: 5b 8b 00 14 sw (sp+20),r11 8027808: 5b 8c 00 10 sw (sp+16),r12 802780c: 5b 8d 00 0c sw (sp+12),r13 8027810: 5b 8e 00 08 sw (sp+8),r14 8027814: 5b 9d 00 04 sw (sp+4),ra int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027818: 37 8e 00 1c addi r14,sp,28 802781c: 37 8d 00 18 addi r13,sp,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 8027820: 5b 83 00 1c sw (sp+28),r3 8027824: 5b 84 00 18 sw (sp+24),r4 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027828: b9 c0 18 00 mv r3,r14 802782c: b9 a0 20 00 mv r4,r13 8027830: 34 05 00 00 mvi r5,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 8027834: b8 20 60 00 mv r12,r1 8027838: b8 40 58 00 mv r11,r2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802783c: fb ff ff 30 calli 80274fc 8027840: 44 20 00 32 be r1,r0,8027908 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 8027844: b9 80 08 00 mv r1,r12 8027848: 35 62 00 04 addi r2,r11,4 802784c: b9 c0 18 00 mv r3,r14 8027850: b9 a0 20 00 mv r4,r13 8027854: 34 05 00 00 mvi r5,0 8027858: fb ff ff 29 calli 80274fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802785c: 44 20 00 2b be r1,r0,8027908 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 8027860: b9 80 08 00 mv r1,r12 8027864: 37 82 00 24 addi r2,sp,36 8027868: fb ff fe ce calli 80273a0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802786c: 44 20 00 27 be r1,r0,8027908 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 8027870: b9 80 08 00 mv r1,r12 8027874: 37 82 00 20 addi r2,sp,32 8027878: fb ff fe ca calli 80273a0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802787c: 44 20 00 23 be r1,r0,8027908 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 8027880: b9 80 08 00 mv r1,r12 8027884: 35 62 00 0c addi r2,r11,12 8027888: b9 c0 18 00 mv r3,r14 802788c: b9 a0 20 00 mv r4,r13 8027890: 34 05 00 00 mvi r5,0 8027894: fb ff ff 1a calli 80274fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 8027898: 44 20 00 1c be r1,r0,8027908 || !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) 802789c: b9 80 08 00 mv r1,r12 80278a0: 35 62 00 10 addi r2,r11,16 80278a4: b9 c0 18 00 mv r3,r14 80278a8: b9 a0 20 00 mv r4,r13 80278ac: 34 05 00 00 mvi r5,0 80278b0: fb ff ff 13 calli 80274fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80278b4: 44 20 00 15 be r1,r0,8027908 || !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) 80278b8: b9 80 08 00 mv r1,r12 80278bc: 35 62 00 14 addi r2,r11,20 80278c0: b9 c0 18 00 mv r3,r14 80278c4: b9 a0 20 00 mv r4,r13 80278c8: 34 05 00 00 mvi r5,0 80278cc: fb ff ff 0c calli 80274fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80278d0: 44 20 00 0e be r1,r0,8027908 || !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)) 80278d4: b9 80 08 00 mv r1,r12 80278d8: b9 c0 18 00 mv r3,r14 80278dc: b9 a0 20 00 mv r4,r13 80278e0: 35 62 00 18 addi r2,r11,24 80278e4: 34 05 00 01 mvi r5,1 80278e8: fb ff ff 05 calli 80274fc size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 80278ec: 44 20 00 07 be r1,r0,8027908 || !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; 80278f0: 2f 82 00 26 lhu r2,(sp+38) pwd->pw_gid = pwgid; 80278f4: 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; 80278f8: 0d 62 00 08 sh (r11+8),r2 pwd->pw_gid = pwgid; 80278fc: 2b 82 00 20 lw r2,(sp+32) 8027900: 0d 62 00 0a sh (r11+10),r2 return 1; 8027904: e0 00 00 02 bi 802790c 8027908: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802790c: 2b 9d 00 04 lw ra,(sp+4) 8027910: 2b 8b 00 14 lw r11,(sp+20) 8027914: 2b 8c 00 10 lw r12,(sp+16) 8027918: 2b 8d 00 0c lw r13,(sp+12) 802791c: 2b 8e 00 08 lw r14,(sp+8) 8027920: 37 9c 00 24 addi sp,sp,36 8027924: c3 a0 00 00 ret 0800314c : #include int sched_get_priority_min( int policy ) { 800314c: 37 9c ff fc addi sp,sp,-4 8003150: 5b 9d 00 04 sw (sp+4),ra switch ( policy ) { 8003154: 48 01 00 07 bg r0,r1,8003170 8003158: 34 02 00 02 mvi r2,2 800315c: 4c 41 00 03 bge r2,r1,8003168 8003160: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8003164: 5c 22 00 03 bne r1,r2,8003170 <== NOT EXECUTED 8003168: 34 01 00 01 mvi r1,1 800316c: e0 00 00 05 bi 8003180 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 8003170: f8 00 28 d2 calli 800d4b8 <__errno> 8003174: 34 02 00 16 mvi r2,22 8003178: 58 22 00 00 sw (r1+0),r2 800317c: 34 01 ff ff mvi r1,-1 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 8003180: 2b 9d 00 04 lw ra,(sp+4) 8003184: 37 9c 00 04 addi sp,sp,4 8003188: c3 a0 00 00 ret 08027328 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 8027328: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802732c: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8027330: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8027334: 0c 41 00 34 sh (r2+52),r1 <== NOT EXECUTED return 0; } 8027338: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802733c: c3 a0 00 00 ret <== NOT EXECUTED 08027a64 : return NULL; return &grent; } void setgrent(void) { 8027a64: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027a68: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); 8027a6c: fb ff ff c3 calli 8027978 <== NOT EXECUTED if (group_fp != NULL) 8027a70: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027a74: 38 21 0d 18 ori r1,r1,0xd18 <== NOT EXECUTED 8027a78: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027a7c: 44 20 00 02 be r1,r0,8027a84 <== NOT EXECUTED fclose(group_fp); 8027a80: f8 00 72 22 calli 8044308 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 8027a84: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027a88: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027a8c: 38 42 93 e8 ori r2,r2,0x93e8 <== NOT EXECUTED 8027a90: 38 21 16 e4 ori r1,r1,0x16e4 <== NOT EXECUTED 8027a94: f8 00 74 c2 calli 8044d9c <== NOT EXECUTED 8027a98: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027a9c: 38 42 0d 18 ori r2,r2,0xd18 <== NOT EXECUTED 8027aa0: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } 8027aa4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027aa8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027aac: c3 a0 00 00 ret <== NOT EXECUTED 08027ca0 : return NULL; return &pwent; } void setpwent(void) { 8027ca0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027ca4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); 8027ca8: fb ff ff 34 calli 8027978 <== NOT EXECUTED if (passwd_fp != NULL) 8027cac: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027cb0: 38 21 0c 30 ori r1,r1,0xc30 <== NOT EXECUTED 8027cb4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027cb8: 44 20 00 02 be r1,r0,8027cc0 <== NOT EXECUTED fclose(passwd_fp); 8027cbc: f8 00 71 93 calli 8044308 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 8027cc0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8027cc4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8027cc8: 38 42 93 e8 ori r2,r2,0x93e8 <== NOT EXECUTED 8027ccc: 38 21 16 34 ori r1,r1,0x1634 <== NOT EXECUTED 8027cd0: f8 00 74 33 calli 8044d9c <== NOT EXECUTED 8027cd4: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027cd8: 38 42 0c 30 ori r2,r2,0xc30 <== NOT EXECUTED 8027cdc: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } 8027ce0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027ce4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027ce8: 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 d2 f0 ori r2,r2,0xd2f0 <== 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 ec 9b calli 8044180 <__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 0a 98 calli 804b980 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 ec 85 calli 8044180 <__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 fb e9 calli 8047f30 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 08028bec : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 8028bec: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8028bf0: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8028bf4: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8028bf8: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8028bfc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028c00: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8028c04: 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 ) ) 8028c08: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 8028c0c: f8 00 8b 5d calli 804b980 <== NOT EXECUTED 8028c10: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028c14: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8028c18: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028c1c: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8028c20: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8028c24: fb ff 7a 2d calli 80074d8 <== NOT EXECUTED 8028c28: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8028c2c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028c30: 5c 20 00 1a bne r1,r0,8028c98 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 8028c34: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 8028c38: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8028c3c: 28 21 00 44 lw r1,(r1+68) <== NOT EXECUTED 8028c40: 5c 23 00 06 bne r1,r3,8028c58 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028c44: f8 00 6d 4f calli 8044180 <__errno> <== NOT EXECUTED 8028c48: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028c4c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028c50: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028c54: e0 00 00 11 bi 8028c98 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 8028c58: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8028c5c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028c60: 34 03 00 38 mvi r3,56 <== NOT EXECUTED 8028c64: f8 00 7c b3 calli 8047f30 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 8028c68: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED 8028c6c: 35 61 00 1c addi r1,r11,28 <== NOT EXECUTED 8028c70: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8028c74: 28 63 00 44 lw r3,(r3+68) <== NOT EXECUTED 8028c78: d8 60 00 00 call r3 <== NOT EXECUTED 8028c7c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8028c80: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8028c84: 44 20 00 05 be r1,r0,8028c98 <== NOT EXECUTED 8028c88: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028c8c: 44 40 00 03 be r2,r0,8028c98 <== NOT EXECUTED 8028c90: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028c94: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 8028c98: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028c9c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028ca0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8028ca4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8028ca8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8028cac: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8028cb0: c3 a0 00 00 ret <== NOT EXECUTED 08028cb4 : int symlink( const char *actualpath, const char *sympath ) { 8028cb4: 37 9c ff d4 addi sp,sp,-44 8028cb8: 5b 8b 00 14 sw (sp+20),r11 8028cbc: 5b 8c 00 10 sw (sp+16),r12 8028cc0: 5b 8d 00 0c sw (sp+12),r13 8028cc4: 5b 8e 00 08 sw (sp+8),r14 8028cc8: 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 ); 8028ccc: 40 43 00 00 lbu r3,(r2+0) int symlink( const char *actualpath, const char *sympath ) { 8028cd0: b8 20 70 00 mv r14,r1 8028cd4: 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 ); 8028cd8: 64 6b 00 5c cmpei r11,r3,92 8028cdc: 64 61 00 2f cmpei r1,r3,47 8028ce0: b9 61 58 00 or r11,r11,r1 8028ce4: 5d 60 00 02 bne r11,r0,8028cec 8028ce8: 5c 6b 00 0a bne r3,r11,8028d10 8028cec: 78 03 08 06 mvhi r3,0x806 8028cf0: 38 63 d2 f0 ori r3,r3,0xd2f0 8028cf4: 28 64 00 00 lw r4,(r3+0) 8028cf8: 37 81 00 18 addi r1,sp,24 8028cfc: 34 03 00 14 mvi r3,20 8028d00: 34 82 00 18 addi r2,r4,24 8028d04: f8 00 7b c1 calli 8047c08 8028d08: 34 0b 00 01 mvi r11,1 8028d0c: e0 00 00 08 bi 8028d2c 8028d10: 78 03 08 06 mvhi r3,0x806 8028d14: 38 63 d2 f0 ori r3,r3,0xd2f0 8028d18: 28 64 00 00 lw r4,(r3+0) 8028d1c: 37 81 00 18 addi r1,sp,24 8028d20: 34 03 00 14 mvi r3,20 8028d24: 34 82 00 04 addi r2,r4,4 8028d28: f8 00 7b b8 calli 8047c08 if ( !loc.ops->evalformake_h ) { 8028d2c: 2b 81 00 24 lw r1,(sp+36) 8028d30: 28 24 00 04 lw r4,(r1+4) 8028d34: 44 80 00 0f be r4,r0,8028d70 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 8028d38: 37 8c 00 18 addi r12,sp,24 8028d3c: b5 ab 08 00 add r1,r13,r11 8028d40: b9 80 10 00 mv r2,r12 8028d44: 37 83 00 2c addi r3,sp,44 8028d48: d8 80 00 00 call r4 if ( result != 0 ) 8028d4c: 34 0b ff ff mvi r11,-1 8028d50: 5c 20 00 18 bne r1,r0,8028db0 return -1; if ( !loc.ops->symlink_h ) { 8028d54: 2b 83 00 24 lw r3,(sp+36) 8028d58: 28 64 00 38 lw r4,(r3+56) 8028d5c: 5c 81 00 0a bne r4,r1,8028d84 rtems_filesystem_freenode( &loc ); 8028d60: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 8028d64: 44 44 00 03 be r2,r4,8028d70 <== NOT EXECUTED 8028d68: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028d6c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028d70: f8 00 6d 04 calli 8044180 <__errno> <== NOT EXECUTED 8028d74: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028d78: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028d7c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028d80: e0 00 00 0c bi 8028db0 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 8028d84: 2b 83 00 2c lw r3,(sp+44) 8028d88: b9 c0 10 00 mv r2,r14 8028d8c: b9 80 08 00 mv r1,r12 8028d90: d8 80 00 00 call r4 8028d94: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8028d98: 2b 81 00 24 lw r1,(sp+36) 8028d9c: 44 20 00 05 be r1,r0,8028db0 8028da0: 28 22 00 1c lw r2,(r1+28) 8028da4: 44 40 00 03 be r2,r0,8028db0 8028da8: b9 80 08 00 mv r1,r12 8028dac: d8 40 00 00 call r2 return result; } 8028db0: b9 60 08 00 mv r1,r11 8028db4: 2b 9d 00 04 lw ra,(sp+4) 8028db8: 2b 8b 00 14 lw r11,(sp+20) 8028dbc: 2b 8c 00 10 lw r12,(sp+16) 8028dc0: 2b 8d 00 0c lw r13,(sp+12) 8028dc4: 2b 8e 00 08 lw r14,(sp+8) 8028dc8: 37 9c 00 2c addi sp,sp,44 8028dcc: c3 a0 00 00 ret 0801080c : int tcsetattr( int fd, int opt, struct termios *tp ) { 801080c: 37 9c ff f4 addi sp,sp,-12 8010810: 5b 8b 00 0c sw (sp+12),r11 8010814: 5b 8c 00 08 sw (sp+8),r12 8010818: 5b 9d 00 04 sw (sp+4),ra 801081c: b8 60 58 00 mv r11,r3 8010820: b8 20 60 00 mv r12,r1 switch (opt) { 8010824: 44 40 00 0d be r2,r0,8010858 8010828: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 801082c: 44 43 00 05 be r2,r3,8010840 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8010830: f8 00 18 97 calli 8016a8c <__errno> <== NOT EXECUTED 8010834: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8010838: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801083c: e0 00 00 05 bi 8010850 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 8010840: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8010844: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8010848: f8 00 11 35 calli 8014d1c <== NOT EXECUTED 801084c: 4c 20 00 03 bge r1,r0,8010858 <== NOT EXECUTED 8010850: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010854: e0 00 00 05 bi 8010868 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 8010858: b9 80 08 00 mv r1,r12 801085c: b9 60 18 00 mv r3,r11 8010860: 34 02 00 02 mvi r2,2 8010864: f8 00 11 2e calli 8014d1c } } 8010868: 2b 9d 00 04 lw ra,(sp+4) 801086c: 2b 8b 00 0c lw r11,(sp+12) 8010870: 2b 8c 00 08 lw r12,(sp+8) 8010874: 37 9c 00 0c addi sp,sp,12 8010878: c3 a0 00 00 ret 08002598 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 8002598: 37 9c ff e8 addi sp,sp,-24 800259c: 5b 8b 00 18 sw (sp+24),r11 80025a0: 5b 8c 00 14 sw (sp+20),r12 80025a4: 5b 8d 00 10 sw (sp+16),r13 80025a8: 5b 8e 00 0c sw (sp+12),r14 80025ac: 5b 8f 00 08 sw (sp+8),r15 80025b0: 5b 9d 00 04 sw (sp+4),ra 80025b4: b8 40 60 00 mv r12,r2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 80025b8: 34 02 00 01 mvi r2,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 80025bc: b8 60 68 00 mv r13,r3 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 80025c0: 5c 22 00 0c bne r1,r2,80025f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 80025c4: 44 60 00 0b be r3,r0,80025f0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 80025c8: 45 80 00 0d be r12,r0,80025fc /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 80025cc: 29 82 00 00 lw r2,(r12+0) 80025d0: 34 42 ff ff addi r2,r2,-1 80025d4: 50 22 00 02 bgeu r1,r2,80025dc 80025d8: e0 00 00 06 bi 80025f0 <== NOT EXECUTED ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 80025dc: 29 81 00 04 lw r1,(r12+4) 80025e0: 44 20 00 04 be r1,r0,80025f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 80025e4: 34 21 ff ff addi r1,r1,-1 80025e8: 34 02 00 1f mvi r2,31 80025ec: 50 41 00 04 bgeu r2,r1,80025fc rtems_set_errno_and_return_minus_one( EINVAL ); 80025f0: f8 00 2b 7c calli 800d3e0 <__errno> 80025f4: 34 02 00 16 mvi r2,22 80025f8: e0 00 00 0e bi 8002630 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 80025fc: 78 01 08 02 mvhi r1,0x802 8002600: 38 21 28 b4 ori r1,r1,0x28b4 8002604: 28 22 00 00 lw r2,(r1+0) 8002608: 34 42 00 01 addi r2,r2,1 800260c: 58 22 00 00 sw (r1+0),r2 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 8002610: 78 01 08 02 mvhi r1,0x802 8002614: 38 21 2b 74 ori r1,r1,0x2b74 8002618: f8 00 05 8a calli 8003c40 <_Objects_Allocate> 800261c: b8 20 58 00 mv r11,r1 /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 8002620: 5c 20 00 07 bne r1,r0,800263c _Thread_Enable_dispatch(); 8002624: f8 00 08 25 calli 80046b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 8002628: f8 00 2b 6e calli 800d3e0 <__errno> 800262c: 34 02 00 0b mvi r2,11 8002630: 58 22 00 00 sw (r1+0),r2 8002634: 34 01 ff ff mvi r1,-1 8002638: e0 00 00 26 bi 80026d0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 800263c: 34 02 00 02 mvi r2,2 ptimer->thread_id = _Thread_Executing->Object.id; 8002640: 78 01 08 02 mvhi r1,0x802 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 8002644: 31 62 00 3c sb (r11+60),r2 ptimer->thread_id = _Thread_Executing->Object.id; 8002648: 38 21 29 70 ori r1,r1,0x2970 800264c: 28 21 00 00 lw r1,(r1+0) 8002650: 28 21 00 08 lw r1,(r1+8) 8002654: 59 61 00 38 sw (r11+56),r1 if ( evp != NULL ) { 8002658: 45 80 00 07 be r12,r0,8002674 ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 800265c: 29 81 00 08 lw r1,(r12+8) 8002660: 59 61 00 48 sw (r11+72),r1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 8002664: 29 81 00 00 lw r1,(r12+0) ptimer->inf.sigev_signo = evp->sigev_signo; 8002668: 29 8c 00 04 lw r12,(r12+4) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 800266c: 59 61 00 40 sw (r11+64),r1 ptimer->inf.sigev_signo = evp->sigev_signo; 8002670: 59 6c 00 44 sw (r11+68),r12 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 8002674: 29 6e 00 08 lw r14,(r11+8) 8002678: 78 01 08 02 mvhi r1,0x802 800267c: 38 21 2b 74 ori r1,r1,0x2b74 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 8002680: 34 0c 00 00 mvi r12,0 8002684: 28 2f 00 1c lw r15,(r1+28) 8002688: 34 02 00 02 mvi r2,2 800268c: 59 6c 00 68 sw (r11+104),r12 ptimer->timer_data.it_value.tv_sec = 0; 8002690: 59 6c 00 5c sw (r11+92),r12 ptimer->timer_data.it_value.tv_nsec = 0; 8002694: 59 6c 00 60 sw (r11+96),r12 ptimer->timer_data.it_interval.tv_sec = 0; 8002698: 59 6c 00 54 sw (r11+84),r12 ptimer->timer_data.it_interval.tv_nsec = 0; 800269c: 59 6c 00 58 sw (r11+88),r12 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80026a0: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; 80026a4: 59 6c 00 2c sw (r11+44),r12 the_watchdog->id = id; 80026a8: 59 6c 00 30 sw (r11+48),r12 the_watchdog->user_data = user_data; 80026ac: 59 6c 00 34 sw (r11+52),r12 80026b0: 21 c1 ff ff andi r1,r14,0xffff 80026b4: fb ff f7 c0 calli 80005b4 <__ashlsi3> 80026b8: b5 e1 08 00 add r1,r15,r1 80026bc: 58 2b 00 00 sw (r1+0),r11 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 80026c0: 59 6c 00 0c sw (r11+12),r12 _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 80026c4: 59 ae 00 00 sw (r13+0),r14 _Thread_Enable_dispatch(); 80026c8: f8 00 07 fc calli 80046b8 <_Thread_Enable_dispatch> 80026cc: b9 80 08 00 mv r1,r12 return 0; } 80026d0: 2b 9d 00 04 lw ra,(sp+4) 80026d4: 2b 8b 00 18 lw r11,(sp+24) 80026d8: 2b 8c 00 14 lw r12,(sp+20) 80026dc: 2b 8d 00 10 lw r13,(sp+16) 80026e0: 2b 8e 00 0c lw r14,(sp+12) 80026e4: 2b 8f 00 08 lw r15,(sp+8) 80026e8: 37 9c 00 18 addi sp,sp,24 80026ec: c3 a0 00 00 ret 080026f0 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 80026f0: 37 9c ff cc addi sp,sp,-52 80026f4: 5b 8b 00 18 sw (sp+24),r11 80026f8: 5b 8c 00 14 sw (sp+20),r12 80026fc: 5b 8d 00 10 sw (sp+16),r13 8002700: 5b 8e 00 0c sw (sp+12),r14 8002704: 5b 8f 00 08 sw (sp+8),r15 8002708: 5b 9d 00 04 sw (sp+4),ra 800270c: b8 60 60 00 mv r12,r3 8002710: b8 20 78 00 mv r15,r1 8002714: b8 40 58 00 mv r11,r2 8002718: b8 80 68 00 mv r13,r4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 800271c: 44 60 00 59 be r3,r0,8002880 rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 8002720: 28 61 00 0c lw r1,(r3+12) 8002724: 78 03 3b 9a mvhi r3,0x3b9a 8002728: 38 63 c9 ff ori r3,r3,0xc9ff 800272c: 54 23 00 55 bgu r1,r3,8002880 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 8002730: 29 81 00 04 lw r1,(r12+4) 8002734: 50 61 00 02 bgeu r3,r1,800273c 8002738: e0 00 00 52 bi 8002880 <== NOT EXECUTED ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 800273c: 7c 42 00 00 cmpnei r2,r2,0 8002740: 7d 61 00 04 cmpnei r1,r11,4 8002744: a0 41 08 00 and r1,r2,r1 8002748: 5c 20 00 4e bne r1,r0,8002880 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 800274c: 37 81 00 1c addi r1,sp,28 8002750: b9 80 10 00 mv r2,r12 8002754: 34 03 00 10 mvi r3,16 8002758: f8 00 2d e9 calli 800defc /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 800275c: 34 01 00 04 mvi r1,4 8002760: 5d 61 00 0d bne r11,r1,8002794 struct timespec now; _TOD_Get( &now ); 8002764: 37 8b 00 2c addi r11,sp,44 8002768: b9 60 08 00 mv r1,r11 800276c: f8 00 03 83 calli 8003578 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 8002770: 37 8e 00 24 addi r14,sp,36 8002774: b9 60 08 00 mv r1,r11 8002778: b9 c0 10 00 mv r2,r14 800277c: f8 00 09 c1 calli 8004e80 <_Timespec_Greater_than> 8002780: 5c 20 00 40 bne r1,r0,8002880 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 8002784: b9 c0 10 00 mv r2,r14 8002788: b9 60 08 00 mv r1,r11 800278c: b9 c0 18 00 mv r3,r14 8002790: f8 00 09 c8 calli 8004eb0 <_Timespec_Subtract> RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 8002794: 78 01 08 02 mvhi r1,0x802 8002798: b9 e0 10 00 mv r2,r15 800279c: 38 21 2b 74 ori r1,r1,0x2b74 80027a0: 37 83 00 34 addi r3,sp,52 80027a4: f8 00 06 4f calli 80040e0 <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 80027a8: 2b 82 00 34 lw r2,(sp+52) 80027ac: b8 20 58 00 mv r11,r1 80027b0: 5c 40 00 34 bne r2,r0,8002880 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 80027b4: 2b 81 00 24 lw r1,(sp+36) 80027b8: 5c 22 00 11 bne r1,r2,80027fc 80027bc: 2b 8e 00 28 lw r14,(sp+40) 80027c0: 5d c1 00 0f bne r14,r1,80027fc /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 80027c4: 35 61 00 10 addi r1,r11,16 80027c8: f8 00 0b 1f calli 8005444 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 80027cc: 45 ae 00 05 be r13,r14,80027e0 *ovalue = ptimer->timer_data; 80027d0: b9 a0 08 00 mv r1,r13 80027d4: 35 62 00 54 addi r2,r11,84 80027d8: 34 03 00 10 mvi r3,16 80027dc: f8 00 2d c8 calli 800defc /* The new data are set */ ptimer->timer_data = normalize; 80027e0: 37 82 00 1c addi r2,sp,28 80027e4: 34 03 00 10 mvi r3,16 80027e8: 35 61 00 54 addi r1,r11,84 80027ec: f8 00 2d c4 calli 800defc /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 80027f0: 34 01 00 04 mvi r1,4 80027f4: 31 61 00 3c sb (r11+60),r1 80027f8: e0 00 00 1f bi 8002874 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 80027fc: b9 80 08 00 mv r1,r12 8002800: f8 00 09 ba calli 8004ee8 <_Timespec_To_ticks> 8002804: 59 61 00 64 sw (r11+100),r1 initial_period = _Timespec_To_ticks( &normalize.it_value ); 8002808: 37 81 00 24 addi r1,sp,36 800280c: f8 00 09 b7 calli 8004ee8 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 8002810: 29 63 00 08 lw r3,(r11+8) 8002814: 78 04 08 00 mvhi r4,0x800 8002818: b8 20 10 00 mv r2,r1 800281c: 38 84 28 b0 ori r4,r4,0x28b0 8002820: 35 61 00 10 addi r1,r11,16 8002824: b9 60 28 00 mv r5,r11 8002828: f8 00 15 ae calli 8007ee0 <_POSIX_Timer_Insert_helper> 800282c: b8 20 60 00 mv r12,r1 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 8002830: 5c 20 00 04 bne r1,r0,8002840 _Thread_Enable_dispatch(); 8002834: f8 00 07 a1 calli 80046b8 <_Thread_Enable_dispatch> 8002838: b9 80 08 00 mv r1,r12 return 0; 800283c: e0 00 00 15 bi 8002890 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 8002840: 45 a0 00 05 be r13,r0,8002854 *ovalue = ptimer->timer_data; 8002844: b9 a0 08 00 mv r1,r13 8002848: 35 62 00 54 addi r2,r11,84 800284c: 34 03 00 10 mvi r3,16 8002850: f8 00 2d ab calli 800defc ptimer->timer_data = normalize; 8002854: 37 82 00 1c addi r2,sp,28 8002858: 34 03 00 10 mvi r3,16 800285c: 35 61 00 54 addi r1,r11,84 8002860: f8 00 2d a7 calli 800defc /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002864: 34 01 00 03 mvi r1,3 8002868: 31 61 00 3c sb (r11+60),r1 _TOD_Get( &ptimer->time ); 800286c: 35 61 00 6c addi r1,r11,108 8002870: f8 00 03 42 calli 8003578 <_TOD_Get> _Thread_Enable_dispatch(); 8002874: f8 00 07 91 calli 80046b8 <_Thread_Enable_dispatch> 8002878: 34 01 00 00 mvi r1,0 return 0; 800287c: e0 00 00 05 bi 8002890 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 8002880: f8 00 2a d8 calli 800d3e0 <__errno> 8002884: 34 02 00 16 mvi r2,22 8002888: 58 22 00 00 sw (r1+0),r2 800288c: 34 01 ff ff mvi r1,-1 } 8002890: 2b 9d 00 04 lw ra,(sp+4) 8002894: 2b 8b 00 18 lw r11,(sp+24) 8002898: 2b 8c 00 14 lw r12,(sp+20) 800289c: 2b 8d 00 10 lw r13,(sp+16) 80028a0: 2b 8e 00 0c lw r14,(sp+12) 80028a4: 2b 8f 00 08 lw r15,(sp+8) 80028a8: 37 9c 00 34 addi sp,sp,52 80028ac: c3 a0 00 00 ret 08008090 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 8008090: 37 9c ff ec addi sp,sp,-20 8008094: 5b 8b 00 0c sw (sp+12),r11 8008098: 5b 8c 00 08 sw (sp+8),r12 800809c: 5b 9d 00 04 sw (sp+4),ra /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80080a0: 78 0b 08 01 mvhi r11,0x801 80080a4: 39 6b e1 00 ori r11,r11,0xe100 80080a8: 29 62 00 1c lw r2,(r11+28) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 80080ac: b8 20 60 00 mv r12,r1 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80080b0: 5c 40 00 09 bne r2,r0,80080d4 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80080b4: 78 01 08 00 mvhi r1,0x800 80080b8: 38 21 81 a8 ori r1,r1,0x81a8 80080bc: 59 61 00 1c sw (r11+28),r1 the_watchdog->id = id; the_watchdog->user_data = user_data; 80080c0: 59 62 00 24 sw (r11+36),r2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80080c4: 59 62 00 08 sw (r11+8),r2 the_watchdog->routine = routine; the_watchdog->id = id; 80080c8: 59 62 00 20 sw (r11+32),r2 the_watchdog->user_data = user_data; 80080cc: b8 40 58 00 mv r11,r2 80080d0: e0 00 00 18 bi 8008130 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 80080d4: b9 60 08 00 mv r1,r11 80080d8: fb ff f5 bd calli 80057cc <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 80080dc: 34 21 ff fe addi r1,r1,-2 80080e0: 34 02 00 01 mvi r2,1 80080e4: 50 41 00 03 bgeu r2,r1,80080f0 80080e8: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80080ec: e0 00 00 11 bi 8008130 <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 80080f0: 29 64 00 14 lw r4,(r11+20) 80080f4: 29 61 00 0c lw r1,(r11+12) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 80080f8: 29 63 00 18 lw r3,(r11+24) 80080fc: 37 82 00 10 addi r2,sp,16 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 8008100: b4 81 08 00 add r1,r4,r1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 8008104: c8 23 08 00 sub r1,r1,r3 8008108: f8 00 06 ac calli 8009bb8 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 800810c: 2b 81 00 10 lw r1,(sp+16) 8008110: 78 02 00 0f mvhi r2,0xf 8008114: 38 42 42 40 ori r2,r2,0x4240 8008118: f8 00 49 77 calli 801a6f4 <__mulsi3> 800811c: b8 20 58 00 mv r11,r1 remaining += tp.tv_nsec / 1000; 8008120: 2b 81 00 14 lw r1,(sp+20) 8008124: 34 02 03 e8 mvi r2,1000 8008128: f8 00 49 93 calli 801a774 <__divsi3> 800812c: b4 2b 58 00 add r11,r1,r11 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 8008130: 45 80 00 18 be r12,r0,8008190 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 8008134: 78 02 00 0f mvhi r2,0xf 8008138: 38 42 42 40 ori r2,r2,0x4240 800813c: b9 80 08 00 mv r1,r12 8008140: f8 00 49 ec calli 801a8f0 <__udivsi3> tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008144: 78 02 00 0f mvhi r2,0xf * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 8008148: 5b 81 00 10 sw (sp+16),r1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 800814c: 38 42 42 40 ori r2,r2,0x4240 8008150: b9 80 08 00 mv r1,r12 8008154: f8 00 49 f7 calli 801a930 <__umodsi3> 8008158: 34 02 03 e8 mvi r2,1000 800815c: f8 00 49 66 calli 801a6f4 <__mulsi3> ticks = _Timespec_To_ticks( &tp ); 8008160: 37 8c 00 10 addi r12,sp,16 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008164: 5b 81 00 14 sw (sp+20),r1 ticks = _Timespec_To_ticks( &tp ); 8008168: b9 80 08 00 mv r1,r12 800816c: f8 00 06 ad calli 8009c20 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 8008170: b9 80 08 00 mv r1,r12 8008174: f8 00 06 ab calli 8009c20 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8008178: 78 02 08 01 mvhi r2,0x801 800817c: 38 42 e1 00 ori r2,r2,0xe100 8008180: 58 41 00 0c sw (r2+12),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8008184: 78 01 08 01 mvhi r1,0x801 8008188: 38 21 d9 80 ori r1,r1,0xd980 800818c: fb ff f5 31 calli 8005650 <_Watchdog_Insert> } return remaining; } 8008190: b9 60 08 00 mv r1,r11 8008194: 2b 9d 00 04 lw ra,(sp+4) 8008198: 2b 8b 00 0c lw r11,(sp+12) 800819c: 2b 8c 00 08 lw r12,(sp+8) 80081a0: 37 9c 00 14 addi sp,sp,20 80081a4: c3 a0 00 00 ret 0800bdcc : #include int unlink( const char *path ) { 800bdcc: 37 9c ff c0 addi sp,sp,-64 800bdd0: 5b 8b 00 18 sw (sp+24),r11 800bdd4: 5b 8c 00 14 sw (sp+20),r12 800bdd8: 5b 8d 00 10 sw (sp+16),r13 800bddc: 5b 8e 00 0c sw (sp+12),r14 800bde0: 5b 8f 00 08 sw (sp+8),r15 800bde4: 5b 9d 00 04 sw (sp+4),ra 800bde8: b8 20 78 00 mv r15,r1 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 800bdec: fb ff d3 b0 calli 8000cac 800bdf0: b8 20 68 00 mv r13,r1 if ( parentpathlen == 0 ) 800bdf4: 5c 20 00 19 bne r1,r0,800be58 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800bdf8: 41 e1 00 00 lbu r1,(r15+0) 800bdfc: 64 23 00 5c cmpei r3,r1,92 800be00: 64 22 00 2f cmpei r2,r1,47 800be04: b8 62 10 00 or r2,r3,r2 800be08: 5c 4d 00 02 bne r2,r13,800be10 800be0c: 5c 20 00 0a bne r1,r0,800be34 <== NOT EXECUTED 800be10: 78 01 08 01 mvhi r1,0x801 800be14: 38 21 d1 10 ori r1,r1,0xd110 800be18: 28 22 00 00 lw r2,(r1+0) 800be1c: 34 03 00 14 mvi r3,20 800be20: 37 81 00 30 addi r1,sp,48 800be24: 34 42 00 18 addi r2,r2,24 800be28: f8 00 04 f4 calli 800d1f8 800be2c: 34 0c 00 00 mvi r12,0 800be30: e0 00 00 12 bi 800be78 800be34: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800be38: 38 21 d1 10 ori r1,r1,0xd110 <== NOT EXECUTED 800be3c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 800be40: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 800be44: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800be48: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 800be4c: f8 00 04 eb calli 800d1f8 <== NOT EXECUTED 800be50: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED 800be54: e0 00 00 09 bi 800be78 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 800be58: b9 e0 08 00 mv r1,r15 800be5c: b9 a0 10 00 mv r2,r13 800be60: 34 03 00 02 mvi r3,2 800be64: 37 84 00 30 addi r4,sp,48 800be68: 34 05 00 00 mvi r5,0 800be6c: fb ff d3 de calli 8000de4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 800be70: 5c 20 00 5d bne r1,r0,800bfe4 800be74: 34 0c 00 01 mvi r12,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800be78: 37 8b 00 1c addi r11,sp,28 800be7c: 37 8e 00 30 addi r14,sp,48 800be80: 34 03 00 14 mvi r3,20 800be84: b9 c0 10 00 mv r2,r14 800be88: b9 60 08 00 mv r1,r11 800be8c: f8 00 04 db calli 800d1f8 name = path + parentpathlen; 800be90: b5 ed 68 00 add r13,r15,r13 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800be94: b9 a0 08 00 mv r1,r13 800be98: f8 00 07 02 calli 800daa0 800be9c: b8 20 10 00 mv r2,r1 800bea0: b9 a0 08 00 mv r1,r13 800bea4: fb ff d3 73 calli 8000c70 800bea8: b5 a1 68 00 add r13,r13,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 800beac: b9 a0 08 00 mv r1,r13 800beb0: f8 00 06 fc calli 800daa0 800beb4: 34 03 00 00 mvi r3,0 800beb8: b8 20 10 00 mv r2,r1 800bebc: b9 60 20 00 mv r4,r11 800bec0: b9 a0 08 00 mv r1,r13 800bec4: b8 60 28 00 mv r5,r3 800bec8: fb ff d3 8d calli 8000cfc 0, &loc, false ); if ( result != 0 ) { 800becc: 44 20 00 09 be r1,r0,800bef0 if ( free_parentloc ) 800bed0: 45 80 00 45 be r12,r0,800bfe4 rtems_filesystem_freenode( &parentloc ); 800bed4: 2b 81 00 3c lw r1,(sp+60) 800bed8: 44 20 00 43 be r1,r0,800bfe4 800bedc: 28 22 00 1c lw r2,(r1+28) 800bee0: 44 40 00 41 be r2,r0,800bfe4 800bee4: b9 c0 08 00 mv r1,r14 800bee8: d8 40 00 00 call r2 800beec: e0 00 00 3e bi 800bfe4 return -1; } if ( !loc.ops->node_type_h ) { 800bef0: 2b 82 00 28 lw r2,(sp+40) 800bef4: 28 43 00 10 lw r3,(r2+16) 800bef8: 5c 61 00 04 bne r3,r1,800bf08 rtems_filesystem_freenode( &loc ); 800befc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800bf00: 5c 43 00 1a bne r2,r3,800bf68 <== NOT EXECUTED 800bf04: e0 00 00 1b bi 800bf70 <== 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 ) { 800bf08: b9 60 08 00 mv r1,r11 800bf0c: d8 60 00 00 call r3 800bf10: 34 02 00 01 mvi r2,1 800bf14: 2b 83 00 28 lw r3,(sp+40) 800bf18: 5c 22 00 10 bne r1,r2,800bf58 rtems_filesystem_freenode( &loc ); 800bf1c: 44 60 00 05 be r3,r0,800bf30 800bf20: 28 62 00 1c lw r2,(r3+28) 800bf24: 44 40 00 03 be r2,r0,800bf30 800bf28: b9 60 08 00 mv r1,r11 800bf2c: d8 40 00 00 call r2 if ( free_parentloc ) 800bf30: 45 80 00 07 be r12,r0,800bf4c rtems_filesystem_freenode( &parentloc ); 800bf34: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800bf38: 44 20 00 05 be r1,r0,800bf4c <== NOT EXECUTED 800bf3c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800bf40: 44 40 00 03 be r2,r0,800bf4c <== NOT EXECUTED 800bf44: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800bf48: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 800bf4c: f8 00 02 05 calli 800c760 <__errno> 800bf50: 34 02 00 15 mvi r2,21 800bf54: e0 00 00 10 bi 800bf94 } if ( !loc.ops->unlink_h ) { 800bf58: 28 64 00 0c lw r4,(r3+12) 800bf5c: 5c 80 00 10 bne r4,r0,800bf9c rtems_filesystem_freenode( &loc ); 800bf60: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 800bf64: 44 44 00 03 be r2,r4,800bf70 <== NOT EXECUTED 800bf68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800bf6c: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_parentloc ) 800bf70: 45 80 00 07 be r12,r0,800bf8c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 800bf74: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800bf78: 44 20 00 05 be r1,r0,800bf8c <== NOT EXECUTED 800bf7c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800bf80: 44 40 00 03 be r2,r0,800bf8c <== NOT EXECUTED 800bf84: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800bf88: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800bf8c: f8 00 01 f5 calli 800c760 <__errno> <== NOT EXECUTED 800bf90: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800bf94: 58 22 00 00 sw (r1+0),r2 800bf98: e0 00 00 13 bi 800bfe4 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800bf9c: b9 c0 08 00 mv r1,r14 800bfa0: b9 60 10 00 mv r2,r11 800bfa4: d8 80 00 00 call r4 800bfa8: b8 20 68 00 mv r13,r1 rtems_filesystem_freenode( &loc ); 800bfac: 2b 81 00 28 lw r1,(sp+40) 800bfb0: 44 20 00 05 be r1,r0,800bfc4 800bfb4: 28 22 00 1c lw r2,(r1+28) 800bfb8: 44 40 00 03 be r2,r0,800bfc4 800bfbc: b9 60 08 00 mv r1,r11 800bfc0: d8 40 00 00 call r2 if ( free_parentloc ) 800bfc4: 45 80 00 09 be r12,r0,800bfe8 rtems_filesystem_freenode( &parentloc ); 800bfc8: 2b 81 00 3c lw r1,(sp+60) 800bfcc: 44 20 00 07 be r1,r0,800bfe8 800bfd0: 28 22 00 1c lw r2,(r1+28) 800bfd4: 44 40 00 05 be r2,r0,800bfe8 800bfd8: 37 81 00 30 addi r1,sp,48 800bfdc: d8 40 00 00 call r2 800bfe0: e0 00 00 02 bi 800bfe8 800bfe4: 34 0d ff ff mvi r13,-1 return result; } 800bfe8: b9 a0 08 00 mv r1,r13 800bfec: 2b 9d 00 04 lw ra,(sp+4) 800bff0: 2b 8b 00 18 lw r11,(sp+24) 800bff4: 2b 8c 00 14 lw r12,(sp+20) 800bff8: 2b 8d 00 10 lw r13,(sp+16) 800bffc: 2b 8e 00 0c lw r14,(sp+12) 800c000: 2b 8f 00 08 lw r15,(sp+8) 800c004: 37 9c 00 40 addi sp,sp,64 800c008: 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 09 b2 calli 804b980 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 eb a0 calli 8044180 <__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 eb 92 calli 8044180 <__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 d2 f0 ori r1,r1,0xd2f0 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 07 mvhi r1,0x807 800935c: 38 21 0f 50 ori r1,r1,0xf50 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 eb 80 calli 8044180 <__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 5f calli 800a554 <== 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 6f calli 800a99c <_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 08028e9c : int utime( const char *path, const struct utimbuf *times ) { 8028e9c: 37 9c ff dc addi sp,sp,-36 8028ea0: 5b 8b 00 10 sw (sp+16),r11 8028ea4: 5b 8c 00 0c sw (sp+12),r12 8028ea8: 5b 8d 00 08 sw (sp+8),r13 8028eac: 5b 9d 00 04 sw (sp+4),ra 8028eb0: b8 20 60 00 mv r12,r1 8028eb4: 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 ) ) 8028eb8: 37 8b 00 14 addi r11,sp,20 8028ebc: f8 00 8a b1 calli 804b980 8028ec0: b8 20 10 00 mv r2,r1 8028ec4: 34 03 00 00 mvi r3,0 8028ec8: b9 80 08 00 mv r1,r12 8028ecc: b9 60 20 00 mv r4,r11 8028ed0: 34 05 00 01 mvi r5,1 8028ed4: fb ff 79 81 calli 80074d8 8028ed8: 34 0c ff ff mvi r12,-1 8028edc: 5c 20 00 18 bne r1,r0,8028f3c return -1; if ( !temp_loc.ops->utime_h ){ 8028ee0: 2b 82 00 20 lw r2,(sp+32) 8028ee4: 28 44 00 30 lw r4,(r2+48) 8028ee8: 5c 81 00 0a bne r4,r1,8028f10 rtems_filesystem_freenode( &temp_loc ); 8028eec: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028ef0: 44 44 00 03 be r2,r4,8028efc <== NOT EXECUTED 8028ef4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028ef8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8028efc: f8 00 6c a1 calli 8044180 <__errno> <== NOT EXECUTED 8028f00: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028f04: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028f08: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8028f0c: e0 00 00 0c bi 8028f3c <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 8028f10: 29 a3 00 04 lw r3,(r13+4) 8028f14: 29 a2 00 00 lw r2,(r13+0) 8028f18: b9 60 08 00 mv r1,r11 8028f1c: d8 80 00 00 call r4 8028f20: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &temp_loc ); 8028f24: 2b 81 00 20 lw r1,(sp+32) 8028f28: 44 20 00 05 be r1,r0,8028f3c 8028f2c: 28 22 00 1c lw r2,(r1+28) 8028f30: 44 40 00 03 be r2,r0,8028f3c 8028f34: b9 60 08 00 mv r1,r11 8028f38: d8 40 00 00 call r2 return result; } 8028f3c: b9 80 08 00 mv r1,r12 8028f40: 2b 9d 00 04 lw ra,(sp+4) 8028f44: 2b 8b 00 10 lw r11,(sp+16) 8028f48: 2b 8c 00 0c lw r12,(sp+12) 8028f4c: 2b 8d 00 08 lw r13,(sp+8) 8028f50: 37 9c 00 24 addi sp,sp,36 8028f54: c3 a0 00 00 ret 0801b18c : ssize_t write( int fd, const void *buffer, size_t count ) { 801b18c: 37 9c ff e8 addi sp,sp,-24 801b190: 5b 8b 00 14 sw (sp+20),r11 801b194: 5b 8c 00 10 sw (sp+16),r12 801b198: 5b 8d 00 0c sw (sp+12),r13 801b19c: 5b 8e 00 08 sw (sp+8),r14 801b1a0: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801b1a4: 78 04 08 01 mvhi r4,0x801 801b1a8: 38 84 d0 10 ori r4,r4,0xd010 801b1ac: 28 84 00 00 lw r4,(r4+0) ssize_t write( int fd, const void *buffer, size_t count ) { 801b1b0: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801b1b4: 54 81 00 02 bgu r4,r1,801b1bc 801b1b8: e0 00 00 10 bi 801b1f8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 801b1bc: 34 02 00 03 mvi r2,3 801b1c0: 5b 83 00 18 sw (sp+24),r3 801b1c4: 78 0b 08 01 mvhi r11,0x801 801b1c8: fb ff 94 0a calli 80001f0 <__ashlsi3> 801b1cc: 34 02 00 03 mvi r2,3 801b1d0: 39 6b d7 18 ori r11,r11,0xd718 801b1d4: b8 20 70 00 mv r14,r1 801b1d8: fb ff 94 06 calli 80001f0 <__ashlsi3> 801b1dc: 29 6c 00 00 lw r12,(r11+0) 801b1e0: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801b1e4: 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 ); 801b1e8: b5 81 60 00 add r12,r12,r1 rtems_libio_check_is_open( iop ); 801b1ec: 29 81 00 18 lw r1,(r12+24) 801b1f0: 20 22 01 00 andi r2,r1,0x100 801b1f4: 5c 40 00 04 bne r2,r0,801b204 801b1f8: fb ff c5 5a calli 800c760 <__errno> <== NOT EXECUTED 801b1fc: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801b200: e0 00 00 0e bi 801b238 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 801b204: 45 a0 00 05 be r13,r0,801b218 rtems_libio_check_count( count ); 801b208: b8 60 58 00 mv r11,r3 801b20c: 44 60 00 1d be r3,r0,801b280 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 801b210: 20 21 00 04 andi r1,r1,0x4 801b214: 5c 20 00 04 bne r1,r0,801b224 801b218: fb ff c5 52 calli 800c760 <__errno> <== NOT EXECUTED 801b21c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801b220: e0 00 00 06 bi 801b238 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 801b224: 29 81 00 40 lw r1,(r12+64) 801b228: 28 24 00 0c lw r4,(r1+12) 801b22c: 5c 80 00 06 bne r4,r0,801b244 rtems_set_errno_and_return_minus_one( ENOTSUP ); 801b230: fb ff c5 4c calli 800c760 <__errno> <== NOT EXECUTED 801b234: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801b238: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801b23c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 801b240: e0 00 00 10 bi 801b280 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 801b244: b9 a0 10 00 mv r2,r13 801b248: b9 80 08 00 mv r1,r12 801b24c: d8 80 00 00 call r4 801b250: b8 20 58 00 mv r11,r1 if ( rc > 0 ) 801b254: 4c 01 00 0b bge r0,r1,801b280 iop->offset += rc; 801b258: 34 02 00 1f mvi r2,31 801b25c: fb ff 94 35 calli 8000330 <__ashrsi3> 801b260: 29 82 00 14 lw r2,(r12+20) 801b264: 29 84 00 10 lw r4,(r12+16) 801b268: b5 62 10 00 add r2,r11,r2 801b26c: f5 62 18 00 cmpgu r3,r11,r2 801b270: b4 24 08 00 add r1,r1,r4 801b274: b4 61 08 00 add r1,r3,r1 801b278: 59 82 00 14 sw (r12+20),r2 801b27c: 59 81 00 10 sw (r12+16),r1 return rc; } 801b280: b9 60 08 00 mv r1,r11 801b284: 2b 9d 00 04 lw ra,(sp+4) 801b288: 2b 8b 00 14 lw r11,(sp+20) 801b28c: 2b 8c 00 10 lw r12,(sp+16) 801b290: 2b 8d 00 0c lw r13,(sp+12) 801b294: 2b 8e 00 08 lw r14,(sp+8) 801b298: 37 9c 00 18 addi sp,sp,24 801b29c: 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 20 10 ori r4,r4,0x2010 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 2e ec ori r11,r11,0x2eec 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 2d a8 calli 800f114 <__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 2d 9a calli 800f114 <__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 2d 86 calli 800f114 <__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